OCaml Stepper
April 3, 2025
News
-
(2025 March 29) Created this page
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.
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
-
Asai, K., and H. Akiyama
``Algebraic Stepper for Simple Modules,''
ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation
(PEPM '25), pp. 13-29 (January 2025).
- Furukawa, T., Y. Cong, and K. Asai
``Stepping OCaml,''
Trends in Functional Programming in Education (June 2018).
Post proceedings version in Electronic Proceedings in Theoretical
Computer Science 295, pp. 17-34 (June 2019).
- Cong, Y., and K. Asai
``Implementing a stepper using delimited continuations,''
In J. H. Davenport and F. Ghourabi editors, 7th International
Symposium on Symbolic Computation in Software Science (SCSS '16),
EPiC Series in Computing, Vol. 39, pp. 42-54 (March 2016).
Members
This document was translated from LATEX by
HEVEA.