package catala

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

Reference interpreter for the default calculus

val evaluate_expr : Shared_ast.decl_ctx -> 'm Ast.expr -> 'm Ast.expr

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

val interpret_program : Shared_ast.decl_ctx -> 'm Ast.expr -> (Catala_utils.Uid.MarkedString.info * 'm Ast.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.