package catala

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

Generates verification conditions from scope definitions

type verification_condition_kind =
  1. | NoEmptyError
    (*

    This verification condition checks whether a definition never returns an empty error

    *)
  2. | NoOverlappingExceptions
    (*

    This verification condition checks whether a definition never returns a conflict error

    *)
type verification_condition = {
  1. vc_guard : Dcalc.Ast.typed Dcalc.Ast.marked_expr;
    (*

    This expression should have type bool

    *)
  2. vc_kind : verification_condition_kind;
  3. vc_scope : Dcalc.Ast.ScopeName.t;
  4. vc_variable : Dcalc.Ast.Var.t Utils.Marked.pos;
  5. vc_free_vars_typ : Dcalc.Ast.typ Utils.Marked.pos Dcalc.Ast.VarMap.t;
    (*

    Types of the locally free variables in vc_guard. The types of other free variables linked to scope variables can be obtained with Dcalc.Ast.variable_types.

    *)
}
val generate_verification_conditions : Dcalc.Ast.typed Dcalc.Ast.program -> Dcalc.Ast.ScopeName.t option -> verification_condition list

generate_verification_conditions p None will generate the verification conditions for all the variables of all the scopes of the program p, while generate_verification_conditions p (Some s) will focus only on the variables of scope s.

OCaml

Innovation. Community. Security.