Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion GillianCore/gil_parser/gil_parsing.ml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ module Make (Annot : Annot.S) = struct
in
{ labeled_prog; init_data }

let get_callees (proc : ('a, 'b) Proc.t) : string list =
Array.to_list proc.proc_body
|> List.filter_map (function
| _, _, Cmd.Call (_, Expr.Lit (Literal.String callee), _, _, _) ->
Some callee
| _ -> None)

let trans_procs procs path internal_file =
let procs' = Hashtbl.create Config.small_tbl_size in
let () =
Expand All @@ -67,7 +74,9 @@ module Make (Annot : Annot.S) = struct
else Some path
in
let proc_internal = proc.proc_internal || internal_file in
Hashtbl.add procs' name { proc with proc_source_path; proc_internal })
let proc_calls = get_callees proc in
Hashtbl.add procs' name
{ proc with proc_source_path; proc_internal; proc_calls })
procs
in
procs'
Expand Down