Module Gil_syntax.Pred
type t = {pred_name : string;(*Name of the predicate
*)pred_source_path : string option;pred_loc : Utils.Location.t option;pred_internal : bool;pred_num_params : int;(*Number of parameters
*)pred_params : (string * Type.t option) list;(*Parameter names and (optional) types
*)pred_ins : int list;(*Ins
*)pred_definitions : ((string * string list) option * Asrt.t) list;(*Predicate definitions
*)pred_facts : Expr.t list;(*Facts that hold for every definition
*)pred_guard : Asrt.t option;(*Cost for unfolding the predicate
*)pred_pure : bool;(*Is the predicate pure?
*)pred_abstract : bool;(*Is the predicate abstract?
*)pred_nounfold : bool;(*Should the predicate be unfolded?
*)pred_normalised : bool;(*Has the predicate been previously normalised?
*)
}val init : t list -> (string, t) Utils.Prelude.Hashtbl.tPopulates a Hashtbl from the given predicate list
val ins_and_outs : t -> Utils.Containers.SI.t * Utils.Containers.SI.tReturns the sets of in- and out-parameters of a predicate
val in_params : t -> string listReturns the names of in-parameters
val in_args : t -> 'a list -> 'a listReturns the in-parameters given all parameters
val out_params : t -> string listReturns the names of in-parameters
val out_args : t -> 'a list -> 'a listReturns the out-parameters given all parameters
val pp : Stdlib.Format.formatter -> t -> unitPretty-printer
val check_pvars : (string, t) Utils.Prelude.Hashtbl.t -> unitSanity check on program variables inside normalised predicates
val explicit_param_types :
(string, t) Utils.Prelude.Hashtbl.t ->
t ->
(t, string) Stdlib.resultInfers parameter types and makes them explicit in the assertions
val combine_ins_outs : t -> 'a list -> 'a list -> 'a listCombines a list of ins and a list of outs putting them in the right order according to a given predicate.
val iter_ins_outs :
t ->
('a -> unit) ->
('b -> unit) ->
('a list * 'b list) ->
unititer_ins_outs p f_ins f_outs (ins, outs) will iterate, applying f_ins on the ins and f_outs on the outs, in the order specified
val pp_ins_outs :
t ->
(Stdlib.Format.formatter -> 'a -> unit) ->
(Stdlib.Format.formatter -> 'b -> unit) ->
Stdlib.Format.formatter ->
('a list * 'b list) ->
unitPrints the ins and outs in the right order
val get : (string, t) Utils.Prelude.Hashtbl.t -> string -> tRetrieves a predicate definition by name
val close_token_name : t -> stringGiven a guarded predicate, return the name of its close token. Fails if the predicate isn't guarded.
Given a guarded predicate, return a "call" to its close token. The arguments given are PVars with the same name as the ins of the predicate.