-
This project contains abstract machines, krivine and SECD, implemented in Ocaml.
-
Krivine implements Call-by-name semantics. We consider Closures as a pair of a Table and expression, where Table is a partial function from variables to Answers(includes value Closures)
-
SECD implements Call-by-value semantics. We consider value closures in the set of answers.
Was created as one of the assignments in one Programming Languages course.
Fire up an ocaml interpreter:
$ ocaml
Use #use to import code from files:
# #use "filename.ml";;
Form expressions e, following the types declared in types.ml and evaluate using:
# krivine (CLOSURE([], e)) [];;
# secd [] [] (CLOSURE([], e)) [];;