Gil_syntax.Prog
A full GIL program
type ('annot, 'label) t = {
imports : (string * bool) list;
List of imported GIL files, and whether each has to be verified
*)lemmas : (string, Gillian.Gil_syntax.Lemma.t) Utils.Prelude.Hashtbl.t;
Lemmas
*)preds : (string, Gillian.Gil_syntax.Pred.t) Utils.Prelude.Hashtbl.t;
Predicates
*)only_specs : (string, Gillian.Gil_syntax.Spec.t) Utils.Prelude.Hashtbl.t;
Specs without function definitions
*)procs : (string, ('annot, 'label) Gillian.Gil_syntax.Proc.t)
Utils.Prelude.Hashtbl.t;
Proceudes
*)macros : (string, Gillian.Gil_syntax.Macro.t) Utils.Prelude.Hashtbl.t;
Macros
*)bi_specs : (string, Gillian.Gil_syntax.BiSpec.t) Utils.Prelude.Hashtbl.t;
Bi-abductive specs
*)proc_names : string list;
Names of the procedures
*)predecessors : (string * int * int, int) Utils.Prelude.Hashtbl.t;
Table used for Phi-assignment
*)}
val make :
imports:(string * bool) list ->
lemmas:(string, Gillian.Gil_syntax.Lemma.t) Utils.Prelude.Hashtbl.t ->
preds:(string, Gillian.Gil_syntax.Pred.t) Utils.Prelude.Hashtbl.t ->
only_specs:(string, Gillian.Gil_syntax.Spec.t) Utils.Prelude.Hashtbl.t ->
procs:
(string, ('annot, 'label) Gillian.Gil_syntax.Proc.t)
Utils.Prelude.Hashtbl.t ->
macros:(string, Gillian.Gil_syntax.Macro.t) Utils.Prelude.Hashtbl.t ->
bi_specs:(string, Gillian.Gil_syntax.BiSpec.t) Utils.Prelude.Hashtbl.t ->
proc_names:string list ->
predecessors:(string * int * int, int) Utils.Prelude.Hashtbl.t ->
unit ->
('annot, 'label) t
Makes a full program
val make_labeled :
procs:
(string, ('annot, string) Gillian.Gil_syntax.Proc.t)
Utils.Prelude.Hashtbl.t ->
imports:(string * bool) list ->
lemmas:(string, Gillian.Gil_syntax.Lemma.t) Utils.Prelude.Hashtbl.t ->
preds:(string, Gillian.Gil_syntax.Pred.t) Utils.Prelude.Hashtbl.t ->
only_specs:(string, Gillian.Gil_syntax.Spec.t) Utils.Prelude.Hashtbl.t ->
macros:(string, Gillian.Gil_syntax.Macro.t) Utils.Prelude.Hashtbl.t ->
bi_specs:(string, Gillian.Gil_syntax.BiSpec.t) Utils.Prelude.Hashtbl.t ->
proc_names:string list ->
unit ->
('annot, string) t
Initialises a labeled program (with empty predecessors, to be computed later)
val make_indexed :
procs:('annot, int) Gillian.Gil_syntax.Proc.t list ->
predecessors:(string * int * int * int) list ->
lemmas:(string, Gillian.Gil_syntax.Lemma.t) Utils.Prelude.Hashtbl.t ->
preds:(string, Gillian.Gil_syntax.Pred.t) Utils.Prelude.Hashtbl.t ->
only_specs:(string, Gillian.Gil_syntax.Spec.t) Utils.Prelude.Hashtbl.t ->
macros:(string, Gillian.Gil_syntax.Macro.t) Utils.Prelude.Hashtbl.t ->
bi_specs:(string, Gillian.Gil_syntax.BiSpec.t) Utils.Prelude.Hashtbl.t ->
unit ->
('annot, int) t
Initialises an indexed program (with empty proc_names and imports, useless for the rest)
val create : unit -> ('a, string) t
Creates an empty program
val get_lemmas : ('a, 'b) t -> Gillian.Gil_syntax.Lemma.t list
Getters
Get all lemmas
val get_preds : ('a, 'b) t -> Gillian.Gil_syntax.Pred.t list
Get all predicates
val get_ospecs : ('a, 'b) t -> Gillian.Gil_syntax.Spec.t list
Get all only-specs
val get_specs : ('a, 'b) t -> Gillian.Gil_syntax.Spec.t list
Get all specs
val get_procs :
?proc_names:string list ->
('a, 'b) t ->
('a, 'b) Gillian.Gil_syntax.Proc.t list
Get all procedures
val get_bispecs : ('a, 'b) t -> Gillian.Gil_syntax.BiSpec.t list
Get all bi-abductive specs
val get_proc_names : ('a, 'b) t -> string list
Get names of all procedures
val get_noninternal_proc_names : ('a, 'b) t -> string list
Get names of all procedures not marked as internal
val get_noninternal_pred_names : ('a, 'b) t -> string list
Get names of all predicates not marked as internal
val get_noninternal_lemma_names : ('a, 'b) t -> string list
Get names of all lemmas not marked as internal
val get_proc :
('a, 'b) t ->
string ->
('a, 'b) Gillian.Gil_syntax.Proc.t option
Get a specific procedure
val get_proc_exn : ('a, 'b) t -> string -> ('a, 'b) Gillian.Gil_syntax.Proc.t
Get a specific procedure. Raises Failure
if it does not exist
val get_pred : ('a, 'b) t -> string -> Gillian.Gil_syntax.Pred.t option
Get a specific predicate
val get_pred_exn : ('a, 'b) t -> string -> Gillian.Gil_syntax.Pred.t
Get a specific predicate. Raises Failure
if it does not exist
val get_bispec : ('a, 'b) t -> string -> Gillian.Gil_syntax.BiSpec.t option
Get a specific bi-abductive spec
val get_bispec_exn : ('a, 'b) t -> string -> Gillian.Gil_syntax.BiSpec.t
Get a specific bi-abductive spec. Raises Failure
if it does not exist
val get_lemma : ('a, 'b) t -> string -> Gillian.Gil_syntax.Lemma.t option
Get a specific lemma
val get_lemma_exn : ('a, 'b) t -> string -> Gillian.Gil_syntax.Lemma.t
Get a specific lemma. Raises Failure
if it does not exist
val add_lemma : ('a, 'b) t -> Gillian.Gil_syntax.Lemma.t -> ('a, 'b) t
Add a lemma
val add_pred : ('a, 'b) t -> Gillian.Gil_syntax.Pred.t -> ('a, 'b) t
Add a predicate
val add_ospec : ('a, 'b) t -> Gillian.Gil_syntax.Spec.t -> ('a, 'b) t
Add an only-spec
val add_proc : ('a, 'b) t -> ('a, 'b) Gillian.Gil_syntax.Proc.t -> ('a, 'b) t
Add a proc
val add_macro : ('a, 'b) t -> Gillian.Gil_syntax.Macro.t -> ('a, 'b) t
Add a macro
val add_bispec : ('a, 'b) t -> Gillian.Gil_syntax.BiSpec.t -> ('a, 'b) t
Add a bi-abductive spec
val pp :
show_labels:bool ->
pp_label:'b Fmt.t ->
?pp_annot:'a Fmt.t ->
Stdlib.Format.formatter ->
('a, 'b) t ->
unit
Printers
val pp_labeled :
Stdlib.Format.formatter ->
?pp_annot:'a Fmt.t ->
('a, string) t ->
unit
Print labelled
val pp_indexed :
Stdlib.Format.formatter ->
?pp_annot:'a Fmt.t ->
('a, int) t ->
unit
Print indexed