Gil_syntax.Proc
Labeled GIL procedures
Every command is annotated with a label, and the gotos indicate to which label one should jump. Labels can be of any type. However, we say "labeled" when the labels are strings, and "indexed" when the labels are integers. Most functions in Gillian that work with indexed procedures assume for efficiency that the label of the i-th command is always Some i (starting from 0).
type ('annot, 'label) t = {
proc_name : string;
proc_source_path : string option;
proc_internal : bool;
proc_body : ('annot * 'label option * 'label Gillian.Gil_syntax.Cmd.t) array;
proc_params : string list;
proc_spec : Gillian.Gil_syntax.Spec.t option;
proc_aliases : string list;
proc_calls : string list;
}
val to_yojson :
('annot -> Yojson.Safe.t) ->
('label -> Yojson.Safe.t) ->
('annot, 'label) t ->
Yojson.Safe.t
val of_yojson :
(Yojson.Safe.t -> 'annot Ppx_deriving_yojson_runtime.error_or) ->
(Yojson.Safe.t -> 'label Ppx_deriving_yojson_runtime.error_or) ->
Yojson.Safe.t ->
('annot, 'label) t Ppx_deriving_yojson_runtime.error_or
val get_params : ('a, 'b) t -> string list
Gets the parameters of the procedure
val pp :
show_labels:bool ->
pp_label:'a Fmt.t ->
?pp_annot:'b Fmt.t ->
Stdlib.Format.formatter ->
('b, 'a) t ->
unit
If the show_labels
flag is true, the labels will be written before the command they correspond to
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
Returns the indexed procedure for a labeled procedures where the labels can be of any type. Equality of labels is decided by structural equality
val check_proc_spec_correspondence :
(string, ('annot, 'a) t) Utils.Prelude.Hashtbl.t ->
unit