Module Verification.Conditions

Generates verification conditions from scope definitions

type verification_condition_kind =
| NoEmptyError(*

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

*)
| NoOverlappingExceptions(*

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

*)
type verification_condition = {
vc_guard : Shared_ast.typed Dcalc.Ast.expr;(*

This expression should have type bool

*)
vc_kind : verification_condition_kind;
vc_asserts : Shared_ast.typed Dcalc.Ast.expr;(*

A conjunction of all assertions in scope of this VC. * This expression should have type bool

*)
vc_scope : Shared_ast.ScopeName.t;
vc_variable : Shared_ast.typed Dcalc.Ast.expr Shared_ast.Var.t Catala_utils.Mark.pos;
}
val generate_verification_conditions : Shared_ast.typed Dcalc.Ast.program -> Shared_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.