Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 1.03 KB

README.md

File metadata and controls

30 lines (20 loc) · 1.03 KB

Krivine-SECD

  1. This project contains abstract machines, krivine and SECD, implemented in Ocaml.

  2. 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)

  3. SECD implements Call-by-value semantics. We consider value closures in the set of answers.

Motivation

Was created as one of the assignments in one Programming Languages course.

How to run?

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)) [];;