Module Call_stack.Make
Parameters
Signature
type vt = Val.ttype store_t = Store.tA call stack is a list records, each of which contains 1) identifier of the current procedure (string) 2) arguments of the current procedure (list of values) 3) calling store 4) a list of loop invariant identifiers 5) variable that should hold the return value 6) index of the calling procedure from whence the procedure was called 7) normal continuation index in the calling procedure 8) optional error continuation index in the calling procedure
type stack_element = {pid : string;arguments : vt list;store : store_t option;loop_ids : string list;ret_var : Gil_syntax.Var.t;call_index : int;continue_index : int;error_index : int option;
}val stack_element_to_yojson : stack_element -> Yojson.Safe.tval stack_element_of_yojson :
Yojson.Safe.t ->
stack_element Ppx_deriving_yojson_runtime.error_ortype t = stack_element listval to_yojson : t -> Yojson.Safe.tval of_yojson : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_orval empty : tval push :
t ->
pid:string ->
arguments:vt list ->
?store:store_t ->
loop_ids:string list ->
ret_var:Gil_syntax.Var.t ->
call_index:int ->
continue_index:int ->
?error_index:int ->
unit ->
tval get_cur_proc_id : t -> stringGet current procedure identifier
val get_loop_ids : t -> string listGet current loop identifiers
val get_cur_procs : t -> string listval recursive_depth : t -> string -> intCall stack recursive depth
val pp : Stdlib.Format.formatter -> t -> unitCall stack pretty printer