OCaml Stepper

April 3, 2025

News

What is the OCaml Stepper?

The OCaml Stepper is an algebraic stepper (as pioneered in the Racket language) that shows how a program is executed step by step. It is implemented in Ochanomizu University and is used in the functional programming course. It supports most of the basic language constructs, including conditionals, recursive functions, datatype declarations and pattern matching, exception handling, I/O, references, and modules, but it does not support advanced features such as imperative features, objects, functors, GADTs, and algebraic effects. The OCaml Stepper runs from Visual Studio Code.

Demo

Installation

For OCaml 4.14.2:
opam pin add stepper http://pllab.is.ocha.ac.jp/~asai/Stepper/4.14.2/stepper.tar.gz
For OCaml 4.12.0 (not maintained anymore):
opam pin add stepper http://pllab.is.ocha.ac.jp/~asai/Stepper/4.12.0/stepper.tar.gz

Using the OCaml Stepper in Visual Studio Code

Install the extension ocha-platform by downloading vsix file from the latest release and then executing
code --install-extension ocha-platform-?.?.?.vsix
or through the ``Install from VSIX'' command in the Extensions view command dropdown.

Button Usage

Start
start the OCaml Stepper
Prev
go to the previos step
Next
go to the next step
Skip
evaluate the current expression completely (without showing the steps) and skip to the result
Forward
go to the next toplevel definition (such as the next test case)
End
end the OCaml Stepper

Papers

Members


This document was translated from LATEX by HEVEA.