package catala

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Reference interpreter for the default calculus

val evaluate_expr : Ast.decl_ctx -> 'm Ast.marked_expr -> 'm Ast.marked_expr

Evaluates an expression according to the semantics of the default calculus.

val interpret_program : Ast.decl_ctx -> 'm Ast.marked_expr -> (Utils.Uid.MarkedString.info * 'm Ast.marked_expr) list

Interprets a program. This function expects an expression typed as a function whose argument are all thunked. The function is executed by providing for each argument a thunked empty default. Returns a list of all the computed values for the scope variables of the executed scope.

OCaml

Innovation. Community. Security.