Work In Progress - an implementation of Structure and Interpretation of Computer Programs Chapter 4 in Ocaml.
I decided to implement section 4.3 (a non-deterministic evaluator) in a statically typed language to aid my understanding of the continuations used to implement backtracking. These branches show the various stages of development:
v0
- A hastily written Scheme/Lisp interpreter.v1
- I decided thatv0
was doing too much work in the parsing stage.v1
removes the overuse of variant types and sticks to using lists as the main data structure.non_deterministic_first_attempt
- Aborted attempt to add non-determinism with continuations for back-tracking.cps
- Rewrotev1
to use continuation passing style (without adding backtracking/non-determinism).non_deterministic
- Added failure continuations tocps
and implemented back-tracking/non-determinism.cps_monadic
- Refactoredcps
to use a monadic continuation interface.master
- currently based-offnon_deterministic