package catala

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

Module Dcalc.InterpreterSource

Reference interpreter for the default calculus

Sourcemodule Pos = Utils.Pos
Sourcemodule Errors = Utils.Errors
Sourcemodule Cli = Utils.Cli
Sourcemodule A = Ast

Helpers

Sourceval is_empty_error : A.expr Pos.marked -> bool
Sourceval empty_thunked_term : Ast.expr Pos.marked

Evaluation

Sourceval evaluate_operator : A.operator Pos.marked -> A.expr Pos.marked list -> A.expr Pos.marked
Sourceval evaluate_expr : A.expr Pos.marked -> A.expr Pos.marked

API

Sourceval interpret_program : Ast.expr Pos.marked -> (Ast.Var.t * Ast.expr Pos.marked) list

Interpret 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.

OCaml

Innovation. Community. Security.