summaryrefslogtreecommitdiff
path: root/src/CfimAstUtils.ml
diff options
context:
space:
mode:
authorSon Ho2022-03-03 11:47:26 +0100
committerSon Ho2022-03-03 11:47:26 +0100
commit848874a4eb5d29742f7afa2567bc424871b1c7ef (patch)
tree2b5cc7ecb465124970fa89f372cd5b7d966779ef /src/CfimAstUtils.ml
parent872c4dda8970df119a5aa06cd0c91fb91627bb49 (diff)
Rename TypeDef...,type_def...,FunDef,fun_def to ...Decl,...decl
Diffstat (limited to '')
-rw-r--r--src/CfimAstUtils.ml14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/CfimAstUtils.ml b/src/CfimAstUtils.ml
index 04d3e6b0..c694d61b 100644
--- a/src/CfimAstUtils.ml
+++ b/src/CfimAstUtils.ml
@@ -16,19 +16,19 @@ let statement_has_loops (st : statement) : bool =
false
with Found -> true
-(** Check if a [fun_def] contains loops *)
-let fun_def_has_loops (fd : fun_def) : bool = statement_has_loops fd.body
+(** Check if a [fun_decl] contains loops *)
+let fun_decl_has_loops (fd : fun_decl) : bool = statement_has_loops fd.body
-let lookup_fun_sig (fun_id : fun_id) (fun_defs : fun_def FunDefId.Map.t) :
+let lookup_fun_sig (fun_id : fun_id) (fun_decls : fun_decl FunDeclId.Map.t) :
fun_sig =
match fun_id with
- | Local id -> (FunDefId.Map.find id fun_defs).signature
+ | Local id -> (FunDeclId.Map.find id fun_decls).signature
| Assumed aid -> Assumed.get_assumed_sig aid
-let lookup_fun_name (fun_id : fun_id) (fun_defs : fun_def FunDefId.Map.t) :
+let lookup_fun_name (fun_id : fun_id) (fun_decls : fun_decl FunDeclId.Map.t) :
Identifiers.fun_name =
match fun_id with
- | Local id -> (FunDefId.Map.find id fun_defs).name
+ | Local id -> (FunDeclId.Map.find id fun_decls).name
| Assumed aid -> Assumed.get_assumed_name aid
(** Small utility: list the transitive parents of a region var group.
@@ -64,6 +64,6 @@ let list_ordered_parent_region_groups (sg : fun_sig) (gid : T.RegionGroupId.id)
let parents = List.map (fun (rg : T.region_var_group) -> rg.id) parents in
parents
-let fun_def_get_input_vars (fdef : fun_def) : var list =
+let fun_decl_get_input_vars (fdef : fun_decl) : var list =
let locals = List.tl fdef.locals in
Collections.List.prefix fdef.arg_count locals