Module Verifier.SMatcher
type state_t = SPState.state_ttype t = {state : state_t;preds : Engine.Preds.t;wands : Engine.Wands.t;pred_defs : Engine.MP.preds_tbl_t;
}type post_res = (Gil_syntax.Flag.t * Gil_syntax.Asrt.t list) optiontype search_state = (t * Symbolic.Subst.t * Engine.MP.t) list * err_t listmodule Logging : sig ... endval produce_assertion :
t ->
Symbolic.Subst.t ->
Gil_syntax.Asrt.atom ->
(t, err_t) Engine.Res_list.tval produce :
t ->
Symbolic.Subst.t ->
Gil_syntax.Asrt.t ->
(t, err_t) Engine.Res_list.tval produce_posts : t -> Symbolic.Subst.t -> Gil_syntax.Asrt.t list -> t listval unfold :
?additional_bindings:unfold_info_t ->
t ->
string ->
Gil_syntax.Expr.t list ->
(Symbolic.Subst.t * t, err_t) Engine.Res_list.tunfold state name args unfold_info returns a list of pairs (subst, state), resulting from unfolding the predicate name(..args..) from the given state. unfold_info contains information about how to bind new variables.
val rec_unfold :
?fuel:int ->
t ->
string ->
Gil_syntax.Expr.t list ->
(t, err_t) Engine.Res_list.tval unfold_all : t -> string -> (t, err_t) Engine.Res_list.tval try_recovering :
t ->
Gil_syntax.Expr.t Engine.Recovery_tactic.t ->
(t list * Engine.Matcher.recovery_tactic, string) Stdlib.resultTries recovering from an error using the provided recovery tactic.
val unfold_with_vals :
auto_level:[ `High | `Low ] ->
t ->
Gil_syntax.Expr.t list ->
(Symbolic.Subst.t * t) list optionTries to unfold the given predicate in the state. If it manages, it returns the new set of states and corresponding substitutions, otherwise, it returns None.
val unfold_concrete_preds : t -> (Symbolic.Subst.t option * t) optionUnfolds 1 predicate for which all arguments are concrete.
- If it finds one:
- if it succeeds to unfold, it returns Some (Some subst, new_state )
- if it fails to unfold it returns None
- If it doesn't find one, it returns Some (None, input_state)
val match_assertion :
?no_auto_fold:bool ->
t ->
Symbolic.Subst.t ->
Engine.MP.step ->
(t, err_t) Engine.Res_list.tval match_ :
?in_matching:bool ->
t ->
Symbolic.Subst.t ->
Engine.MP.t ->
Engine.Matcher.match_kind ->
(t * Symbolic.Subst.t * post_res, err_t) Engine.Res_list.tval fold :
?in_matching:bool ->
?additional_bindings:(Gil_syntax.Expr.t * Gil_syntax.Expr.t) list ->
match_kind:Engine.Matcher.match_kind ->
state:t ->
Engine.MP.pred ->
Gil_syntax.Expr.t list ->
(t, err_t) Engine.Res_list.tFolds a predicate in the state, consuming its definition and producing the folded predicate. If the predicate has a guard, the guard is produced.
val consume_pred :
?in_matching:bool ->
?fold_outs_info:(Symbolic.Subst.t * Engine.MP.step * Gil_syntax.Expr.t list) ->
?no_auto_fold:bool ->
t ->
string ->
Gil_syntax.Expr.t option list ->
(t * Gil_syntax.Expr.t list, err_t) Engine.Res_list.tConsumes a predicate from the state. If the predicate is not "verbatim" in our set of preds, and it is not abstract and we are not in manual mode, we attempt to fold it.
val package_wand : t -> Engine.Wands.wand -> (t, err_t) Utils.List_res.t