Module Engine.MP

val outs_pp : outs Fmt.t

The step type represents a matching plan step, consisting of an assertion together with the possible learned outs

val step_to_yojson : step -> Yojson.Safe.t
val step_of_yojson : Yojson.Safe.t -> step Ppx_deriving_yojson_runtime.error_or
type label = string * Utils.Containers.SS.t
val label_to_yojson : label -> Yojson.Safe.t
val label_of_yojson : Yojson.Safe.t -> label Ppx_deriving_yojson_runtime.error_or
type post = Gillian.Gil_syntax.Flag.t * Gillian.Gil_syntax.Asrt.t list
val post_to_yojson : post -> Yojson.Safe.t
val post_of_yojson : Yojson.Safe.t -> post Ppx_deriving_yojson_runtime.error_or
val pp_step : step Fmt.t
type t =
  1. | Choice of t * t
  2. | ConsumeStep of step * t
  3. | LabelStep of label * t
    (*

    Labels provide additional existentials to be bound manually by the user

    *)
  4. | Finished of post option
    (*

    The optional assertion corresponds to some post-condition that may be produced after successfuly matching. For example, a matching plan corresponding to a set of specifications will contain leaves that are respectively anntated with the corresponding post.

    *)
val to_yojson : t -> Yojson.Safe.t
val of_yojson : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_or
type pred = {
  1. pred : Gillian.Gil_syntax.Pred.t;
  2. def_mp : t;
  3. guard_mp : t option;
}
type 'a with_mp = {
  1. mp : t;
  2. data : 'a;
}
type 'annot prog = {
  1. preds : (string, pred) Utils.Prelude.Hashtbl.t;
  2. specs : (string, spec) Utils.Prelude.Hashtbl.t;
  3. lemmas : (string, lemma) Utils.Prelude.Hashtbl.t;
  4. coverage : (string * int, int) Utils.Prelude.Hashtbl.t;
  5. prog : ('annot, int) Gillian.Gil_syntax.Prog.t;
}
type preds_tbl_t = (string, pred) Utils.Prelude.Hashtbl.t
type err =
  1. | MPSpec of string * Gillian.Gil_syntax.Asrt.t list list
  2. | MPPred of string * Gillian.Gil_syntax.Asrt.t list list
  3. | MPLemma of string * Gillian.Gil_syntax.Asrt.t list list
  4. | MPAssert of Gillian.Gil_syntax.Asrt.t * Gillian.Gil_syntax.Asrt.t list list
  5. | MPInvariant of Gillian.Gil_syntax.Asrt.t * Gillian.Gil_syntax.Asrt.t list list
val pp_err : Ppx_deriving_runtime.Format.formatter -> err -> Ppx_deriving_runtime.unit
val show_err : err -> Ppx_deriving_runtime.string
val learn_expr : ?top_level:bool -> KB.t -> Gillian.Gil_syntax.Expr.t -> Gillian.Gil_syntax.Expr.t -> outs
val ins_outs_expr : KB.t -> Gillian.Gil_syntax.Expr.t -> Gillian.Gil_syntax.Expr.t -> (KB.t * outs) list
val collect_simple_asrts : Gillian.Gil_syntax.Asrt.t -> Gillian.Gil_syntax.Asrt.t list
val s_init_atoms : preds:(string, int list) Utils.Prelude.Hashtbl.t -> KB.t -> Gillian.Gil_syntax.Asrt.t list -> (step list, Gillian.Gil_syntax.Asrt.t list) Stdlib.result
val of_step_list : ?post:post -> ?label:label -> step list -> t
val init : ?use_params:bool -> KB.t -> KB.t -> (string, int list) Utils.Prelude.Hashtbl.t -> (Gillian.Gil_syntax.Asrt.t * ((string * Utils.Containers.SS.t) option * (Gillian.Gil_syntax.Flag.t * Gillian.Gil_syntax.Asrt.t list) option)) list -> (t, Gillian.Gil_syntax.Asrt.t list list) Stdlib.result
val init_prog : ?preds_tbl:(string, pred) Utils.Prelude.Hashtbl.t -> ('a, int) Gillian.Gil_syntax.Prog.t -> ('a prog, err) Stdlib.result
val init_preds : (string, Gillian.Gil_syntax.Pred.t) Utils.Prelude.Hashtbl.t -> ((string, pred) Utils.Prelude.Hashtbl.t, err) Stdlib.result
val pp : Stdlib.Format.formatter -> t -> unit
val get_pred_def : preds_tbl_t -> string -> pred
val init_pred_defs : unit -> preds_tbl_t
val pp_pred_defs : Stdlib.Format.formatter -> preds_tbl_t -> unit
val get_procs : 'a prog -> ('a, int) Gillian.Gil_syntax.Proc.t list
val get_bispecs : 'a prog -> Gillian.Gil_syntax.BiSpec.t list
val pp_asrt : ?preds_printer: (Stdlib.Format.formatter -> (string * Gillian.Gil_syntax.Expr.t list) -> unit) -> preds:preds_tbl_t -> Stdlib.Format.formatter -> Gillian.Gil_syntax.Asrt.t -> unit
val pp_spec : ?preds_printer: (Stdlib.Format.formatter -> (string * Gillian.Gil_syntax.Expr.t list) -> unit) -> preds:preds_tbl_t -> Stdlib.Format.formatter -> Gillian.Gil_syntax.Spec.t -> unit
val pp_normal_spec : ?preds_printer: (Stdlib.Format.formatter -> (string * Gillian.Gil_syntax.Expr.t list) -> unit) -> preds:preds_tbl_t -> Stdlib.Format.formatter -> Gillian.Gil_syntax.Spec.t -> unit
val add_spec : 'a prog -> Gillian.Gil_syntax.Spec.t -> unit
val remove_spec : 'a prog -> string -> unit
val get_lemma : 'a prog -> string -> (lemma, unit) Stdlib.result
val update_coverage : 'a prog -> string -> int -> unit
val first_time_running : 'a prog -> string -> int -> bool