module Pinterp:sig..end
val init_real : int * int * int -> unitGive a precision on real computation.
type ctx
The execution context
val mk_empty_env : Env.env -> Pmodule.pmodule -> Pinterp_core.envPinterp_core.env repeated here for convenience.
val mk_rac : ?ignore_incomplete:bool -> Pinterp_core.check_term -> Pinterp_core.racPinterp_core.mk_rac repeated here for convenience.
val mk_ctx : Pinterp_core.env ->
limits:Call_provers.resource_limits ->
?giant_steps:bool ->
?do_rac:bool ->
?rac:Pinterp_core.rac ->
?oracle:Pinterp_core.oracle ->
?compute_term:(Pinterp_core.env -> Term.term -> Term.term) ->
unit -> ctxCreate an execution context.
giant_steps : execute function calls and loops with giant steps (false by default)do_rac : enable runtime-assertion checking (RAC) (false by default)rac : the RAC engine (Pinterp_core.rac_dummy by default)oracle : for values when they are needed (program parameters and giant stepscompute_term : callback to compute terms in pure expressionsval get_env : ctx -> Pinterp_core.envReturn the environment of an execution context.
val get_do_rac : ctx -> boolReturn true if RAC is enabled in the execution context.
val get_rac : ctx -> Pinterp_core.racReturn the RAC engine of the execution context.
val get_giant_steps : ctx -> boolReturn true if the execution context is configured with giant steps.
type result =
| |
Normal of |
| |
Excep of |
| |
Irred of |
An execution may terminate normally, with an exception, or with an irreducible expression.
val print_logic_result : result Pp.ppval exec_rs : ctx -> Expr.rsymbol -> result * ctxeval_rs ~rac env pm rs evaluates the definition of rs and returns an
evaluation result and a final environment.
Fail if an assertion was violated during RACStuck if an assumption was violated during RAC or a giant step.Incomplete if there is an unsopported feature or some term could not be
reduced.val exec_global_fundef : ctx ->
(Expr.rsymbol * Expr.cexp) list ->
Expr.rec_defn list option ->
Expr.expr ->
result * Pinterp_core.Value.value Term.Mvs.t *
Pinterp_core.Value.value Stdlib.Lazy.t Expr.Mrs.teval_global_fundef ~rac env pkm dkm rcl rdl e evaluates e and returns an
evaluation result and a final variable environment (for both local and global
variables).
Same exceptions as exec_global_fundef.
val report_eval_result : Expr.expr ->
Stdlib.Format.formatter ->
result * Pinterp_core.Value.value Term.Mvs.t *
Pinterp_core.Value.value Stdlib.Lazy.t Expr.Mrs.t -> unitReport an evaluation result
val report_cntr : (Pinterp_core.cntr_ctx * Term.term) Pp.pp