[clang frontend] Pre-process AST locations to make them explicit and easier to deal with. Don't dive into include files.

Summary:
@public
The clang location information is described in an incremental way: each location information is a delta with respect to the previous one in the AST. This is based on a the visit of the AST nodes which corresponds to the order in which the lines are printed with the standard clang AST dump:
  clang -cc1 -ast-dump filename.c

This diff adds a preprocessing phase to the front-end so that location information is composed during a visit, and explicit location information is used instead.

In the case of include files, we report the last known location before including the file.

The current file for a function is the file where it is defined. So if a function is entirely defined in a .h file, then the location information will consistently be about the .h file. If instead a function is defined in the source file being analyzed, and some AST nodes come from macro expansion, line information will refer to the original file.

The front-end tests reveal that the location information was incorrect in a few dot files.

Test Plan: arc unit, after having fixed the wrong location in the existing .dot files
master
Cristiano Calcagno 10 years ago
parent d95c4cd12c
commit 10970c4f51

@ -0,0 +1,290 @@
(*
* Copyright (c) 2015 - Facebook.
* All rights reserved.
*)
(** Module to preprocess location information in the AST.
The original location information is incremental, each location is a delta
w.r.t. the previous one. This module processes the AST and makes locations explicit. *)
open Utils
open Clang_ast_j
module L = Logging
module F = Format
(** Get the sub-declarations of the current declaration. *)
let decl_get_sub_decls decl = match decl with
| CXXRecordDecl (_, _, _, decl_list, _, _)
| RecordDecl (_, _, _, decl_list, _, _)
| ObjCInterfaceDecl (_, _, decl_list, _, _)
| ObjCProtocolDecl (_, _, decl_list, _, _)
| ObjCCategoryDecl (_, _, decl_list, _, _)
| ObjCCategoryImplDecl (_, _, decl_list, _, _)
| ObjCImplementationDecl (_, _, decl_list, _, _)
| EnumDecl (_, _, _, decl_list, _, _)
| LinkageSpecDecl (_, decl_list, _)
| NamespaceDecl (_, _, decl_list, _, _) ->
decl_list
| _ ->
[]
(** Set the sub-declarations of the current declaration. *)
let decl_set_sub_decls decl decl_list' = match decl with
| CXXRecordDecl (decl_info, name, opt_type, decl_list, decl_context_info, record_decl_info) ->
CXXRecordDecl (decl_info, name, opt_type, decl_list', decl_context_info, record_decl_info)
| RecordDecl (decl_info, name, opt_type, decl_list, decl_context_info, record_decl_info) ->
RecordDecl (decl_info, name, opt_type, decl_list', decl_context_info, record_decl_info)
| ObjCInterfaceDecl (decl_info, name, decl_list, decl_context_info, obj_c_interface_decl_info) ->
ObjCInterfaceDecl (decl_info, name, decl_list', decl_context_info, obj_c_interface_decl_info)
| ObjCProtocolDecl (decl_info, name, decl_list, decl_context_info, obj_c_protocol_decl_info) ->
ObjCProtocolDecl (decl_info, name, decl_list', decl_context_info, obj_c_protocol_decl_info)
| ObjCCategoryDecl (decl_info, name, decl_list, decl_context_info, category_decl_info) ->
ObjCCategoryDecl (decl_info, name, decl_list', decl_context_info, category_decl_info)
| ObjCCategoryImplDecl (decl_info, name, decl_list, decl_context_info, category_impl_info) ->
ObjCCategoryImplDecl (decl_info, name, decl_list', decl_context_info, category_impl_info)
| ObjCImplementationDecl (decl_info, class_name, decl_list, decl_context_info, idi) ->
ObjCImplementationDecl (decl_info, class_name, decl_list', decl_context_info, idi)
| EnumDecl (decl_info, name, opt_type, decl_list, decl_context_info, enum_decl_info) ->
EnumDecl (decl_info, name, opt_type, decl_list', decl_context_info, enum_decl_info)
| LinkageSpecDecl (decl_info, decl_list, decl_context_info) ->
LinkageSpecDecl (decl_info, decl_list', decl_context_info)
| NamespaceDecl (decl_info, name, decl_list, decl_context_info, namespace_decl_info) ->
NamespaceDecl (decl_info, name, decl_list', decl_context_info, namespace_decl_info)
| _ ->
decl
(** Pretty print a source location. *)
let pp_source_loc fmt source_loc =
let file = match source_loc.sl_file with
| Some file -> file
| None -> "None" in
let line = match source_loc.sl_line with
| Some n -> string_of_int n
| None -> "None" in
let column = match source_loc.sl_column with
| Some n -> string_of_int n
| None -> "None" in
if file = "None" && line = "None" && column = "None"
then F.fprintf fmt "_"
else F.fprintf fmt "%s:%s:%s" file line column
(** Pretty print a source range. *)
let pp_source_range fmt (sloc1, sloc2) =
F.fprintf fmt "<%a, %a>" pp_source_loc sloc1 pp_source_loc sloc2
(** Pretty print an AST. *)
let pp_ast_decl fmt ast_decl =
let rec dump_stmt prefix stmt =
let prefix1 = prefix ^ " " in
let stmt_str = Clang_ast_proj.get_stmt_kind_string stmt in
let stmt_info, stmt_list = Clang_ast_proj.get_stmt_tuple stmt in
let decl_list = match stmt with
| DeclStmt (_, _, decl_list) -> decl_list
| _ -> [] in
F.fprintf fmt "%s%s %a@\n"
prefix
stmt_str
pp_source_range stmt_info.si_source_range;
list_iter (dump_stmt prefix1) stmt_list;
list_iter (dump_decl prefix1) decl_list
and dump_decl prefix decl =
let prefix1 = prefix ^ " " in
match decl with
| FunctionDecl (decl_info, name, qt, fdecl_info) ->
F.fprintf fmt "%sFunctionDecl %s %a@\n"
prefix
name
pp_source_range decl_info.di_source_range;
list_iter (dump_decl prefix1) fdecl_info.fdi_decls_in_prototype_scope;
list_iter (dump_decl prefix1) fdecl_info.fdi_parameters;
Option.may (dump_stmt prefix1) fdecl_info.fdi_body
| ObjCMethodDecl (decl_info, name, obj_c_method_decl_info) ->
F.fprintf fmt "%sObjCMethodDecl %s %a@\n"
prefix
name
pp_source_range decl_info.di_source_range;
Option.may (dump_stmt prefix1) obj_c_method_decl_info.omdi_body
| VarDecl (decl_info, string, qual_type, var_decl_info) ->
F.fprintf fmt "%sVarDecl %a@\n"
prefix
pp_source_range decl_info.di_source_range;
Option.may (dump_stmt prefix1) var_decl_info.vdi_init_expr
| _ ->
let decl_kind_str = Clang_ast_proj.get_decl_kind_string decl in
let decl_info = Clang_ast_proj.get_decl_tuple decl in
let decl_list = decl_get_sub_decls decl in
F.fprintf fmt "%s%s %a@\n"
prefix
decl_kind_str
pp_source_range decl_info.di_source_range;
list_iter (dump_decl prefix1) decl_list in
let decl_str = Clang_ast_proj.get_decl_kind_string ast_decl in
match ast_decl with
| TranslationUnitDecl (_, decl_list, _) ->
F.fprintf fmt "%s (%d declarations)@\n" decl_str (list_length decl_list);
list_iter (dump_decl "") decl_list
| _ ->
assert false
(** Compose incremental location information and make locations explicit. *)
module LocComposer : sig
(** Status of the composer. *)
type status
(** Create a new composer with the initial status. *)
val create : unit -> status
(** Compose a new source_range to the current one. *)
val compose : status -> source_range -> source_range
(** Set the current file if specified in the source_range.
The composer will not descend into file included from the current one.
For locations in included files, it will return instead the last known
location of the current file. *)
val set_current_file : status -> source_range -> unit
end = struct
type status =
{ mutable curr_file: string option;
mutable curr_source_range: source_range;
mutable in_curr_file : bool }
let empty_sloc = { Clang_ast_t.sl_file = None; sl_line = None; sl_column = None }
let create () =
{ curr_file = None;
curr_source_range = (empty_sloc, empty_sloc);
in_curr_file = true; }
let set_current_file st (sloc1, sloc2) =
match sloc1.sl_file, sloc2.sl_file with
| _, Some fname
| Some fname, None ->
st.curr_file <- Some fname;
st.in_curr_file <- true
| _ ->
()
let sloc_is_current_file st sloc = match st.curr_file, sloc.sl_file with
| Some curr_f, Some f ->
Some (f = curr_f)
| None, _ -> None
| _, None -> None
let update_sloc st old_sloc new_sloc =
match sloc_is_current_file st new_sloc with
| Some true ->
st.in_curr_file <- true;
new_sloc
| Some false ->
st.in_curr_file <- false;
old_sloc
| None ->
if st.in_curr_file
then
let update x_opt y_opt =
if y_opt <> None then y_opt else x_opt in
{ sl_file = update old_sloc.sl_file new_sloc.sl_file;
sl_line = update old_sloc.sl_line new_sloc.sl_line;
sl_column = update old_sloc.sl_column new_sloc.sl_column }
else
old_sloc
let update_status st (sloc1, sloc2) =
if sloc1 = empty_sloc && sloc2 = empty_sloc
then
()
else
let _, old_sloc2 = st.curr_source_range in
let new_sloc1 = update_sloc st old_sloc2 sloc1 in
let new_sloc2 = update_sloc st new_sloc1 sloc2 in
st.curr_source_range <- (new_sloc1, new_sloc2)
let compose st source_range =
update_status st source_range;
st.curr_source_range
end
(** Apply a location composer to the locations in a statement. *)
let rec stmt_process_locs loc_composer stmt =
let update (stmt_info, stmt_list) =
let stmt_info' =
{ stmt_info with
si_source_range = LocComposer.compose loc_composer stmt_info.si_source_range } in
let stmt_list' = list_map (stmt_process_locs loc_composer) stmt_list in
(stmt_info', stmt_list') in
match Clang_ast_proj.update_stmt_tuple update stmt with
| DeclStmt (stmt_info, stmt_list, decl_list) ->
let decl_list' = list_map (decl_process_locs loc_composer) decl_list in
DeclStmt (stmt_info, stmt_list, decl_list')
| stmt' ->
stmt'
(** Apply a location composer to the locations in a declaration. *)
and decl_process_locs loc_composer decl =
let decl' =
let update decl_info =
{ decl_info with
di_source_range = LocComposer.compose loc_composer decl_info.di_source_range } in
let decl_list = decl_get_sub_decls decl in
let decl1 = Clang_ast_proj.update_decl_tuple update decl in
let decl_list' = list_map (decl_process_locs loc_composer) decl_list in
decl_set_sub_decls decl1 decl_list' in
match decl' with
| FunctionDecl (decl_info', name, qt, fdecl_info) ->
let fdi_decls_in_prototype_scope' =
list_map (decl_process_locs loc_composer) fdecl_info.fdi_decls_in_prototype_scope in
let fdi_parameters' =
list_map (decl_process_locs loc_composer) fdecl_info.fdi_parameters in
let body' = Option.map (stmt_process_locs loc_composer) fdecl_info.fdi_body in
let fdecl_info' =
{ fdecl_info with
fdi_body = body';
fdi_parameters = fdi_parameters';
fdi_decls_in_prototype_scope = fdi_decls_in_prototype_scope'; } in
FunctionDecl (decl_info', name, qt, fdecl_info')
| ObjCMethodDecl (decl_info', name, obj_c_method_decl_info) ->
let body' =
Option.map (stmt_process_locs loc_composer) obj_c_method_decl_info.omdi_body in
let obj_c_method_decl_info' = { obj_c_method_decl_info with omdi_body = body' } in
ObjCMethodDecl (decl_info', name, obj_c_method_decl_info')
| VarDecl (decl_info, string, qual_type, var_decl_info) ->
let vdi_init_expr' =
Option.map (stmt_process_locs loc_composer) var_decl_info.vdi_init_expr in
let var_decl_info' =
{ var_decl_info with vdi_init_expr = vdi_init_expr' } in
VarDecl (decl_info, string, qual_type, var_decl_info')
| _ ->
decl'
(** Process locations in the AST by making them explicit.
Each toplevel declaration determines the current file,
and once diving into the details of the declaration, location
information about other (include) files is ignored. *)
let ast_decl_process_locs loc_composer ast_decl =
let toplevel_decl_process_locs decl =
let decl_info = Clang_ast_proj.get_decl_tuple decl in
LocComposer.set_current_file loc_composer decl_info.di_source_range;
decl_process_locs loc_composer decl in
match ast_decl with
| TranslationUnitDecl (decl_info, decl_list, decl_context_info) ->
let decl_list' = list_map toplevel_decl_process_locs decl_list in
TranslationUnitDecl (decl_info, decl_list', decl_context_info)
| _ ->
assert false
let preprocess_ast_decl ast_decl =
let loc_composer = LocComposer.create () in
ast_decl_process_locs loc_composer ast_decl

@ -0,0 +1,14 @@
(*
* Copyright (c) 2015 - Facebook.
* All rights reserved.
*)
(** Module to preprocess location information in the AST.
The original location information is incremental, each location is a delta
w.r.t. the previous one. This module processes the AST and makes locations explicit. *)
(** Pretty print an AST. *)
val pp_ast_decl : Format.formatter -> Clang_ast_j.decl -> unit
(** Preprocess the AST to make locations explicit. *)
val preprocess_ast_decl : Clang_ast_j.decl -> Clang_ast_j.decl

@ -99,11 +99,17 @@ let do_run source_path ast_path =
match ast_path with
| Some path -> path, validate_decl_from_file path
| None -> "stdin of " ^ source_path, validate_decl_from_stdin () in
let ast_decl' = CAstProcessor.preprocess_ast_decl ast_decl in
L.stdout "Original AST@.%a@." CAstProcessor.pp_ast_decl ast_decl;
L.stdout "AST with explicit locations:@.%a@." CAstProcessor.pp_ast_decl ast_decl';
CFrontend_config.json := ast_filename;
CLocation.check_source_file source_path;
let source_file = CLocation.source_file_from_path source_path in
print_endline ("Start translation of AST from " ^ !CFrontend_config.json);
CFrontend.do_source_file source_file ast_decl;
CFrontend.do_source_file source_file ast_decl';
print_endline ("End translation AST file " ^ !CFrontend_config.json ^ "... OK!")
with
(Yojson.Json_error s) as exc -> Printing.log_err ~fmt:"%s\n" s;

@ -6,7 +6,7 @@ digraph iCFG {
2 [label="2: Exit revert \n " color=yellow style=filled]
1 [label="1: Start revert\nFormals: e:_Bool \nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled]
1 [label="1: Start revert\nFormals: e:_Bool \nLocals: \n DECLARE_LOCALS(&return); [line -1]\n " color=yellow style=filled]
1 -> 3 ;

@ -32,7 +32,7 @@ digraph iCFG {
245 -> 244 ;
244 [label="244: Call _fun_printf \n n$57=_fun_printf(\"wow\\n\":char *) [line 184]\n REMOVE_TEMPS(n$57); [line 184]\n APPLY_ABSTRACTION; [line 184]\n " shape="box"]
244 [label="244: Call _fun_printf \n n$57=_fun_printf(\"wow\\n\":char *) [line 186]\n REMOVE_TEMPS(n$57); [line 186]\n APPLY_ABSTRACTION; [line 186]\n " shape="box"]
244 -> 240 ;
@ -108,7 +108,7 @@ digraph iCFG {
227 -> 226 ;
226 [label="226: Call _fun_printf \n n$52=_fun_printf(\"out!\\n\":char *) [line 177]\n REMOVE_TEMPS(n$52); [line 177]\n " shape="box"]
226 [label="226: Call _fun_printf \n n$52=_fun_printf(\"out!\\n\":char *) [line 193]\n REMOVE_TEMPS(n$52); [line 193]\n " shape="box"]
226 -> 225 ;
@ -116,7 +116,7 @@ digraph iCFG {
225 -> 224 ;
224 [label="224: Call _fun_printf \n n$51=_fun_printf(\"terminating!\\n\":char *) [line 177]\n REMOVE_TEMPS(n$51); [line 177]\n " shape="box"]
224 [label="224: Call _fun_printf \n n$51=_fun_printf(\"terminating!\\n\":char *) [line 195]\n REMOVE_TEMPS(n$51); [line 195]\n " shape="box"]
224 -> 223 ;
@ -147,7 +147,7 @@ digraph iCFG {
217 -> 213 ;
216 [label="216: Call _fun_printf \n n$47=_fun_printf(\"wow\\n\":char *) [line 159]\n REMOVE_TEMPS(n$47); [line 159]\n " shape="box"]
216 [label="216: Call _fun_printf \n n$47=_fun_printf(\"wow\\n\":char *) [line 162]\n REMOVE_TEMPS(n$47); [line 162]\n " shape="box"]
216 -> 196 ;
@ -223,7 +223,7 @@ digraph iCFG {
199 -> 198 ;
198 [label="198: Call _fun_printf \n n$42=_fun_printf(\"out!\\n\":char *) [line 153]\n REMOVE_TEMPS(n$42); [line 153]\n " shape="box"]
198 [label="198: Call _fun_printf \n n$42=_fun_printf(\"out!\\n\":char *) [line 169]\n REMOVE_TEMPS(n$42); [line 169]\n " shape="box"]
198 -> 197 ;
@ -235,7 +235,7 @@ digraph iCFG {
196 -> 195 ;
195 [label="195: Call _fun_printf \n n$41=_fun_printf(\"terminating!\\n\":char *) [line 153]\n REMOVE_TEMPS(n$41); [line 153]\n " shape="box"]
195 [label="195: Call _fun_printf \n n$41=_fun_printf(\"terminating!\\n\":char *) [line 172]\n REMOVE_TEMPS(n$41); [line 172]\n " shape="box"]
195 -> 194 ;
@ -250,7 +250,7 @@ digraph iCFG {
192 -> 220 ;
191 [label="191: Call _fun_printf \n n$40=_fun_printf(\"B\\n\":char *) [line 129]\n REMOVE_TEMPS(n$40); [line 129]\n " shape="box"]
191 [label="191: Call _fun_printf \n n$40=_fun_printf(\"B\\n\":char *) [line 131]\n REMOVE_TEMPS(n$40); [line 131]\n " shape="box"]
191 -> 184 ;
@ -367,7 +367,7 @@ digraph iCFG {
164 -> 163 ;
163 [label="163: Call _fun_printf \n n$33=_fun_printf(\"exit\\n\":char *) [line 129]\n REMOVE_TEMPS(n$33); [line 129]\n APPLY_ABSTRACTION; [line 129]\n " shape="box"]
163 [label="163: Call _fun_printf \n n$33=_fun_printf(\"exit\\n\":char *) [line 147]\n REMOVE_TEMPS(n$33); [line 147]\n APPLY_ABSTRACTION; [line 147]\n " shape="box"]
163 -> 162 ;
@ -382,7 +382,7 @@ digraph iCFG {
160 -> 172 ;
159 [label="159: Call _fun_printf \n n$32=_fun_printf(\"B\\n\":char *) [line 106]\n REMOVE_TEMPS(n$32); [line 106]\n " shape="box"]
159 [label="159: Call _fun_printf \n n$32=_fun_printf(\"B\\n\":char *) [line 108]\n REMOVE_TEMPS(n$32); [line 108]\n " shape="box"]
159 -> 152 ;
@ -499,7 +499,7 @@ digraph iCFG {
132 -> 131 ;
131 [label="131: Call _fun_printf \n n$25=_fun_printf(\"exit\\n\":char *) [line 106]\n REMOVE_TEMPS(n$25); [line 106]\n APPLY_ABSTRACTION; [line 106]\n " shape="box"]
131 [label="131: Call _fun_printf \n n$25=_fun_printf(\"exit\\n\":char *) [line 124]\n REMOVE_TEMPS(n$25); [line 124]\n APPLY_ABSTRACTION; [line 124]\n " shape="box"]
131 -> 130 ;
@ -514,7 +514,7 @@ digraph iCFG {
128 -> 140 ;
127 [label="127: Call _fun_printf \n n$24=_fun_printf(\"B\\n\":char *) [line 84]\n REMOVE_TEMPS(n$24); [line 84]\n " shape="box"]
127 [label="127: Call _fun_printf \n n$24=_fun_printf(\"B\\n\":char *) [line 86]\n REMOVE_TEMPS(n$24); [line 86]\n " shape="box"]
127 -> 120 ;
@ -635,7 +635,7 @@ digraph iCFG {
99 -> 98 ;
98 [label="98: Call _fun_printf \n n$16=_fun_printf(\"exit\\n\":char *) [line 84]\n REMOVE_TEMPS(n$16); [line 84]\n " shape="box"]
98 [label="98: Call _fun_printf \n n$16=_fun_printf(\"exit\\n\":char *) [line 101]\n REMOVE_TEMPS(n$16); [line 101]\n " shape="box"]
98 -> 97 ;
@ -650,7 +650,7 @@ digraph iCFG {
95 -> 108 ;
94 [label="94: Call _fun_printf \n n$15=_fun_printf(\"B\\n\":char *) [line 61]\n REMOVE_TEMPS(n$15); [line 61]\n " shape="box"]
94 [label="94: Call _fun_printf \n n$15=_fun_printf(\"B\\n\":char *) [line 63]\n REMOVE_TEMPS(n$15); [line 63]\n " shape="box"]
94 -> 87 ;
@ -775,7 +775,7 @@ digraph iCFG {
65 -> 64 ;
64 [label="64: Call _fun_printf \n n$7=_fun_printf(\"exit\\n\":char *) [line 61]\n REMOVE_TEMPS(n$7); [line 61]\n " shape="box"]
64 [label="64: Call _fun_printf \n n$7=_fun_printf(\"exit\\n\":char *) [line 79]\n REMOVE_TEMPS(n$7); [line 79]\n " shape="box"]
64 -> 63 ;
@ -794,7 +794,7 @@ digraph iCFG {
60 -> 40 ;
59 [label="59: BinaryOperatorStmt: Assign \n *&a:int =1 [line 38]\n NULLIFY(&a,false); [line 38]\n " shape="box"]
59 [label="59: BinaryOperatorStmt: Assign \n *&a:int =1 [line 41]\n NULLIFY(&a,false); [line 41]\n " shape="box"]
59 -> 52 ;
@ -915,7 +915,7 @@ digraph iCFG {
31 -> 30 ;
30 [label="30: BinaryOperatorStmt: Assign \n *&a:int =3 [line 38]\n NULLIFY(&a,false); [line 38]\n " shape="box"]
30 [label="30: BinaryOperatorStmt: Assign \n *&a:int =3 [line 56]\n NULLIFY(&a,false); [line 56]\n " shape="box"]
30 -> 29 ;
@ -959,7 +959,7 @@ digraph iCFG {
20 -> 19 ;
19 [label="19: BinaryOperatorStmt: Assign \n *&a:int =1 [line 26]\n NULLIFY(&a,false); [line 26]\n " shape="box"]
19 [label="19: BinaryOperatorStmt: Assign \n *&a:int =1 [line 33]\n NULLIFY(&a,false); [line 33]\n " shape="box"]
19 -> 18 ;
@ -1007,7 +1007,7 @@ digraph iCFG {
8 -> 7 ;
7 [label="7: BinaryOperatorStmt: Assign \n *&a:int =1 [line 13]\n NULLIFY(&a,false); [line 13]\n " shape="box"]
7 [label="7: BinaryOperatorStmt: Assign \n *&a:int =1 [line 21]\n NULLIFY(&a,false); [line 21]\n " shape="box"]
7 -> 6 ;

@ -757,7 +757,7 @@ digraph iCFG {
12 -> 11 ;
11 [label="11: Call _fun_printf \n n$3=_fun_printf(\"(2/def)HELLO WORLD!\":char *) [line 11]\n REMOVE_TEMPS(n$3); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"]
11 [label="11: Call _fun_printf \n n$3=_fun_printf(\"(2/def)HELLO WORLD!\":char *) [line 24]\n REMOVE_TEMPS(n$3); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"]
11 -> 4 ;

@ -1,5 +1,5 @@
digraph iCFG {
6 [label="6: Return Stmt \n n$0=*&#GB$pi:double [line -1]\n *&return:double =(2 * n$0) [line -1]\n REMOVE_TEMPS(n$0); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
6 [label="6: Return Stmt \n n$0=*&#GB$pi:double [line 25]\n *&return:double =(2 * n$0) [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
6 -> 5 ;
@ -10,7 +10,7 @@ digraph iCFG {
4 -> 6 ;
3 [label="3: Return Stmt \n *&return:int =5 [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
3 [label="3: Return Stmt \n *&return:int =5 [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"]
3 -> 2 ;

@ -1,5 +1,5 @@
digraph iCFG {
12 [label="12: DeclStmt \n n$6=_fun___objc_alloc_no_fail(sizeof(class A ):class A *) [line 41]\n n$7=_fun_A_init(n$6:class A *) virtual [line 41]\n *&a:struct objc_object *=n$7 [line 41]\n REMOVE_TEMPS(n$6,n$7); [line 41]\n NULLIFY(&a,false); [line 41]\n " shape="box"]
12 [label="12: DeclStmt \n n$6=_fun___objc_alloc_no_fail(sizeof(class A ):class A *) [line 41]\n n$7=_fun_A_init(n$6:class A *) virtual [line 41]\n *&a:struct objc_object *=n$7 [line 42]\n REMOVE_TEMPS(n$6,n$7); [line 42]\n NULLIFY(&a,false); [line 42]\n " shape="box"]
12 -> 11 ;

@ -1,5 +1,5 @@
digraph iCFG {
14 [label="14: BinaryOperatorStmt: Assign \n n$10=*&self:class A * [line -1]\n n$11=*&son:class A * [line -1]\n _fun___objc_retain(n$11:class A *) [line -1]\n n$12=*n$10._son:class A * [line -1]\n *n$10._son:class A *=n$11 [line -1]\n _fun___objc_release(n$12:class A *) [line -1]\n REMOVE_TEMPS(n$10,n$11,n$12); [line -1]\n NULLIFY(&self,false); [line -1]\n NULLIFY(&son,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
14 [label="14: BinaryOperatorStmt: Assign \n n$10=*&self:class A * [line 12]\n n$11=*&son:class A * [line 12]\n _fun___objc_retain(n$11:class A *) [line -1]\n n$12=*n$10._son:class A * [line -1]\n *n$10._son:class A *=n$11 [line -1]\n _fun___objc_release(n$12:class A *) [line -1]\n REMOVE_TEMPS(n$10,n$11,n$12); [line -1]\n NULLIFY(&self,false); [line -1]\n NULLIFY(&son,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
14 -> 13 ;

@ -119,7 +119,7 @@ digraph iCFG {
11 -> 14 ;
10 [label="10: BinaryOperatorStmt: Assign \n n$6=*&self:class A * [line -1]\n n$7=*&son:class A * [line -1]\n *n$6._son:class A *=n$7 [line -1]\n REMOVE_TEMPS(n$6,n$7); [line -1]\n NULLIFY(&self,false); [line -1]\n NULLIFY(&son,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
10 [label="10: BinaryOperatorStmt: Assign \n n$6=*&self:class A * [line 13]\n n$7=*&son:class A * [line 13]\n *n$6._son:class A *=n$7 [line -1]\n REMOVE_TEMPS(n$6,n$7); [line -1]\n NULLIFY(&self,false); [line -1]\n NULLIFY(&son,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
10 -> 9 ;

@ -1,5 +1,5 @@
digraph iCFG {
60 [label="60: BinaryOperatorStmt: Assign \n n$41=*&self:class MemoryLeakExample * [line -1]\n n$42=*&attachmentContainerView:class UIView * [line -1]\n *n$41._attachmentContainerView:class UIView *=n$42 [line -1]\n REMOVE_TEMPS(n$41,n$42); [line -1]\n NULLIFY(&attachmentContainerView,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
60 [label="60: BinaryOperatorStmt: Assign \n n$41=*&self:class MemoryLeakExample * [line 12]\n n$42=*&attachmentContainerView:class UIView * [line 12]\n *n$41._attachmentContainerView:class UIView *=n$42 [line -1]\n REMOVE_TEMPS(n$41,n$42); [line -1]\n NULLIFY(&attachmentContainerView,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
60 -> 59 ;
@ -21,7 +21,7 @@ digraph iCFG {
55 -> 57 ;
54 [label="54: BinaryOperatorStmt: Assign \n n$37=*&self:class MemoryLeakExample * [line -1]\n n$38=*&backgroundCoveringView:class UIView * [line -1]\n *n$37._backgroundCoveringView:class UIView *=n$38 [line -1]\n REMOVE_TEMPS(n$37,n$38); [line -1]\n NULLIFY(&backgroundCoveringView,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
54 [label="54: BinaryOperatorStmt: Assign \n n$37=*&self:class MemoryLeakExample * [line 11]\n n$38=*&backgroundCoveringView:class UIView * [line 11]\n *n$37._backgroundCoveringView:class UIView *=n$38 [line -1]\n REMOVE_TEMPS(n$37,n$38); [line -1]\n NULLIFY(&backgroundCoveringView,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
54 -> 53 ;

@ -1,29 +1,29 @@
digraph iCFG {
69 [label="69: Assertion failure \n _fun___infer_fail(\"Assertion_failure\":void ) [line 113]\n APPLY_ABSTRACTION; [line 113]\n " shape="box"]
69 [label="69: Assertion failure \n _fun___infer_fail(\"Assertion_failure\":void ) [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"]
69 -> 56 ;
68 [label="68: Prune (false branch) \n n$33=*&SIL_temp_conditional___62:int [line 112]\n NULLIFY(&SIL_temp_conditional___62,true); [line 112]\n PRUNE((n$33 == 0), false); [line 112]\n REMOVE_TEMPS(n$33); [line 112]\n " shape="invhouse"]
68 [label="68: Prune (false branch) \n n$33=*&SIL_temp_conditional___62:int [line 34]\n NULLIFY(&SIL_temp_conditional___62,true); [line 34]\n PRUNE((n$33 == 0), false); [line 34]\n REMOVE_TEMPS(n$33); [line 34]\n " shape="invhouse"]
68 -> 61 ;
67 [label="67: Prune (true branch) \n n$33=*&SIL_temp_conditional___62:int [line 112]\n NULLIFY(&SIL_temp_conditional___62,true); [line 112]\n PRUNE((n$33 != 0), true); [line 112]\n REMOVE_TEMPS(n$33); [line 112]\n NULLIFY(&target,false); [line 112]\n " shape="invhouse"]
67 [label="67: Prune (true branch) \n n$33=*&SIL_temp_conditional___62:int [line 34]\n NULLIFY(&SIL_temp_conditional___62,true); [line 34]\n PRUNE((n$33 != 0), true); [line 34]\n REMOVE_TEMPS(n$33); [line 34]\n NULLIFY(&target,false); [line 34]\n " shape="invhouse"]
67 -> 69 ;
66 [label="66: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___62); [line 112]\n *&SIL_temp_conditional___62:int =1 [line 112]\n APPLY_ABSTRACTION; [line 112]\n " shape="box"]
66 [label="66: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___62); [line 34]\n *&SIL_temp_conditional___62:int =1 [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"]
66 -> 62 ;
65 [label="65: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___62); [line 112]\n *&SIL_temp_conditional___62:int =0 [line 112]\n APPLY_ABSTRACTION; [line 112]\n " shape="box"]
65 [label="65: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___62); [line 34]\n *&SIL_temp_conditional___62:int =0 [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"]
65 -> 62 ;
64 [label="64: Prune (false branch) \n n$32=*&target:class A * [line 112]\n PRUNE((n$32 == 0), false); [line 112]\n REMOVE_TEMPS(n$32); [line 112]\n " shape="invhouse"]
64 [label="64: Prune (false branch) \n n$32=*&target:class A * [line 34]\n PRUNE((n$32 == 0), false); [line 34]\n REMOVE_TEMPS(n$32); [line 34]\n " shape="invhouse"]
64 -> 66 ;
63 [label="63: Prune (true branch) \n n$32=*&target:class A * [line 112]\n PRUNE((n$32 != 0), true); [line 112]\n REMOVE_TEMPS(n$32); [line 112]\n " shape="invhouse"]
63 [label="63: Prune (true branch) \n n$32=*&target:class A * [line 34]\n PRUNE((n$32 != 0), true); [line 34]\n REMOVE_TEMPS(n$32); [line 34]\n " shape="invhouse"]
63 -> 65 ;
@ -37,11 +37,11 @@ digraph iCFG {
61 -> 59 ;
61 -> 60 ;
60 [label="60: Prune (false branch) \n PRUNE((0 == 0), false); [line 118]\n " shape="invhouse"]
60 [label="60: Prune (false branch) \n PRUNE((0 == 0), false); [line 32]\n " shape="invhouse"]
60 -> 57 ;
59 [label="59: Prune (true branch) \n PRUNE((0 != 0), true); [line 118]\n APPLY_ABSTRACTION; [line 118]\n " shape="invhouse"]
59 [label="59: Prune (true branch) \n PRUNE((0 != 0), true); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="invhouse"]
59 -> 58 ;
@ -61,23 +61,23 @@ digraph iCFG {
55 -> 58 ;
54 [label="54: Assertion failure \n _fun___infer_fail(\"Assertion_failure\":void ) [line 113]\n APPLY_ABSTRACTION; [line 113]\n " shape="box"]
54 [label="54: Assertion failure \n _fun___infer_fail(\"Assertion_failure\":void ) [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"]
54 -> 40 ;
53 [label="53: Prune (false branch) \n n$25=*&SIL_temp_conditional___46:int [line 112]\n NULLIFY(&SIL_temp_conditional___46,true); [line 112]\n PRUNE((n$25 == 0), false); [line 112]\n REMOVE_TEMPS(n$25); [line 112]\n " shape="invhouse"]
53 [label="53: Prune (false branch) \n n$25=*&SIL_temp_conditional___46:int [line 29]\n NULLIFY(&SIL_temp_conditional___46,true); [line 29]\n PRUNE((n$25 == 0), false); [line 29]\n REMOVE_TEMPS(n$25); [line 29]\n " shape="invhouse"]
53 -> 45 ;
52 [label="52: Prune (true branch) \n n$25=*&SIL_temp_conditional___46:int [line 112]\n NULLIFY(&SIL_temp_conditional___46,true); [line 112]\n PRUNE((n$25 != 0), true); [line 112]\n REMOVE_TEMPS(n$25); [line 112]\n NULLIFY(&target,false); [line 112]\n " shape="invhouse"]
52 [label="52: Prune (true branch) \n n$25=*&SIL_temp_conditional___46:int [line 29]\n NULLIFY(&SIL_temp_conditional___46,true); [line 29]\n PRUNE((n$25 != 0), true); [line 29]\n REMOVE_TEMPS(n$25); [line 29]\n NULLIFY(&target,false); [line 29]\n " shape="invhouse"]
52 -> 54 ;
51 [label="51: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___46); [line 112]\n *&SIL_temp_conditional___46:int =1 [line 112]\n APPLY_ABSTRACTION; [line 112]\n " shape="box"]
51 [label="51: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___46); [line 29]\n *&SIL_temp_conditional___46:int =1 [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"]
51 -> 46 ;
50 [label="50: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___46); [line 112]\n *&SIL_temp_conditional___46:int =0 [line 112]\n APPLY_ABSTRACTION; [line 112]\n " shape="box"]
50 [label="50: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___46); [line 29]\n *&SIL_temp_conditional___46:int =0 [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"]
50 -> 46 ;
@ -104,11 +104,11 @@ digraph iCFG {
45 -> 43 ;
45 -> 44 ;
44 [label="44: Prune (false branch) \n PRUNE((0 == 0), false); [line 118]\n " shape="invhouse"]
44 [label="44: Prune (false branch) \n PRUNE((0 == 0), false); [line 27]\n " shape="invhouse"]
44 -> 41 ;
43 [label="43: Prune (true branch) \n PRUNE((0 != 0), true); [line 118]\n APPLY_ABSTRACTION; [line 118]\n " shape="invhouse"]
43 [label="43: Prune (true branch) \n PRUNE((0 != 0), true); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="invhouse"]
43 -> 42 ;
@ -127,7 +127,7 @@ digraph iCFG {
39 -> 42 ;
38 [label="38: BinaryOperatorStmt: Assign \n n$20=*&self:class A * [line -1]\n n$21=*&x:int [line -1]\n *n$20._x:int =n$21 [line -1]\n REMOVE_TEMPS(n$20,n$21); [line -1]\n NULLIFY(&self,false); [line -1]\n NULLIFY(&x,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
38 [label="38: BinaryOperatorStmt: Assign \n n$20=*&self:class A * [line 9]\n n$21=*&x:int [line 9]\n *n$20._x:int =n$21 [line -1]\n REMOVE_TEMPS(n$20,n$21); [line -1]\n NULLIFY(&self,false); [line -1]\n NULLIFY(&x,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
38 -> 37 ;
@ -149,23 +149,23 @@ digraph iCFG {
33 -> 35 ;
32 [label="32: Assertion failure \n _fun___infer_fail(\"Assertion_failure\":void ) [line 100]\n APPLY_ABSTRACTION; [line 100]\n " shape="box"]
32 [label="32: Assertion failure \n _fun___infer_fail(\"Assertion_failure\":void ) [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"]
32 -> 18 ;
31 [label="31: Prune (false branch) \n n$12=*&SIL_temp_conditional___24:int [line 99]\n NULLIFY(&SIL_temp_conditional___24,true); [line 99]\n PRUNE((n$12 == 0), false); [line 99]\n REMOVE_TEMPS(n$12); [line 99]\n " shape="invhouse"]
31 [label="31: Prune (false branch) \n n$12=*&SIL_temp_conditional___24:int [line 22]\n NULLIFY(&SIL_temp_conditional___24,true); [line 22]\n PRUNE((n$12 == 0), false); [line 22]\n REMOVE_TEMPS(n$12); [line 22]\n " shape="invhouse"]
31 -> 23 ;
30 [label="30: Prune (true branch) \n n$12=*&SIL_temp_conditional___24:int [line 99]\n NULLIFY(&SIL_temp_conditional___24,true); [line 99]\n PRUNE((n$12 != 0), true); [line 99]\n REMOVE_TEMPS(n$12); [line 99]\n NULLIFY(&a,false); [line 99]\n " shape="invhouse"]
30 [label="30: Prune (true branch) \n n$12=*&SIL_temp_conditional___24:int [line 22]\n NULLIFY(&SIL_temp_conditional___24,true); [line 22]\n PRUNE((n$12 != 0), true); [line 22]\n REMOVE_TEMPS(n$12); [line 22]\n NULLIFY(&a,false); [line 22]\n " shape="invhouse"]
30 -> 32 ;
29 [label="29: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___24); [line 99]\n *&SIL_temp_conditional___24:int =1 [line 99]\n APPLY_ABSTRACTION; [line 99]\n " shape="box"]
29 [label="29: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___24); [line 22]\n *&SIL_temp_conditional___24:int =1 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
29 -> 24 ;
28 [label="28: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___24); [line 99]\n *&SIL_temp_conditional___24:int =0 [line 99]\n APPLY_ABSTRACTION; [line 99]\n " shape="box"]
28 [label="28: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___24); [line 22]\n *&SIL_temp_conditional___24:int =0 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
28 -> 24 ;
@ -192,11 +192,11 @@ digraph iCFG {
23 -> 21 ;
23 -> 22 ;
22 [label="22: Prune (false branch) \n PRUNE((0 == 0), false); [line 105]\n " shape="invhouse"]
22 [label="22: Prune (false branch) \n PRUNE((0 == 0), false); [line 20]\n " shape="invhouse"]
22 -> 19 ;
21 [label="21: Prune (true branch) \n PRUNE((0 != 0), true); [line 105]\n APPLY_ABSTRACTION; [line 105]\n " shape="invhouse"]
21 [label="21: Prune (true branch) \n PRUNE((0 != 0), true); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="invhouse"]
21 -> 20 ;
@ -215,23 +215,23 @@ digraph iCFG {
17 -> 20 ;
16 [label="16: Assertion failure \n _fun___infer_fail(\"Assertion_failure\":void ) [line 100]\n APPLY_ABSTRACTION; [line 100]\n " shape="box"]
16 [label="16: Assertion failure \n _fun___infer_fail(\"Assertion_failure\":void ) [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
16 -> 2 ;
15 [label="15: Prune (false branch) \n n$3=*&SIL_temp_conditional___8:int [line 99]\n NULLIFY(&SIL_temp_conditional___8,true); [line 99]\n PRUNE((n$3 == 0), false); [line 99]\n REMOVE_TEMPS(n$3); [line 99]\n " shape="invhouse"]
15 [label="15: Prune (false branch) \n n$3=*&SIL_temp_conditional___8:int [line 17]\n NULLIFY(&SIL_temp_conditional___8,true); [line 17]\n PRUNE((n$3 == 0), false); [line 17]\n REMOVE_TEMPS(n$3); [line 17]\n " shape="invhouse"]
15 -> 7 ;
14 [label="14: Prune (true branch) \n n$3=*&SIL_temp_conditional___8:int [line 99]\n NULLIFY(&SIL_temp_conditional___8,true); [line 99]\n PRUNE((n$3 != 0), true); [line 99]\n REMOVE_TEMPS(n$3); [line 99]\n NULLIFY(&target,false); [line 99]\n " shape="invhouse"]
14 [label="14: Prune (true branch) \n n$3=*&SIL_temp_conditional___8:int [line 17]\n NULLIFY(&SIL_temp_conditional___8,true); [line 17]\n PRUNE((n$3 != 0), true); [line 17]\n REMOVE_TEMPS(n$3); [line 17]\n NULLIFY(&target,false); [line 17]\n " shape="invhouse"]
14 -> 16 ;
13 [label="13: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___8); [line 99]\n *&SIL_temp_conditional___8:int =1 [line 99]\n APPLY_ABSTRACTION; [line 99]\n " shape="box"]
13 [label="13: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___8); [line 17]\n *&SIL_temp_conditional___8:int =1 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
13 -> 8 ;
12 [label="12: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___8); [line 99]\n *&SIL_temp_conditional___8:int =0 [line 99]\n APPLY_ABSTRACTION; [line 99]\n " shape="box"]
12 [label="12: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___8); [line 17]\n *&SIL_temp_conditional___8:int =0 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
12 -> 8 ;
@ -258,11 +258,11 @@ digraph iCFG {
7 -> 5 ;
7 -> 6 ;
6 [label="6: Prune (false branch) \n PRUNE((0 == 0), false); [line 105]\n " shape="invhouse"]
6 [label="6: Prune (false branch) \n PRUNE((0 == 0), false); [line 15]\n " shape="invhouse"]
6 -> 3 ;
5 [label="5: Prune (true branch) \n PRUNE((0 != 0), true); [line 105]\n APPLY_ABSTRACTION; [line 105]\n " shape="invhouse"]
5 [label="5: Prune (true branch) \n PRUNE((0 != 0), true); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="invhouse"]
5 -> 4 ;

@ -18,7 +18,7 @@ digraph iCFG {
23 -> 27 ;
22 [label="22: BinaryOperatorStmt: Assign \n n$15=*&self:class A * [line -1]\n n$16=*&x:int [line -1]\n *n$15._x:int =n$16 [line -1]\n REMOVE_TEMPS(n$15,n$16); [line -1]\n NULLIFY(&self,false); [line -1]\n NULLIFY(&x,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
22 [label="22: BinaryOperatorStmt: Assign \n n$15=*&self:class A * [line 10]\n n$16=*&x:int [line 10]\n *n$15._x:int =n$16 [line -1]\n REMOVE_TEMPS(n$15,n$16); [line -1]\n NULLIFY(&self,false); [line -1]\n NULLIFY(&x,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
22 -> 21 ;

@ -132,7 +132,7 @@ digraph iCFG {
26 -> 29 ;
25 [label="25: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_after_example______3); [line 38]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_after_example______3); [line 38]\n n$26=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_after_example______3 ):class __objc_anonymous_block_A_dispatch_after_example______3 *) [line 38]\n *&__objc_anonymous_block_A_dispatch_after_example______3:class __objc_anonymous_block_A_dispatch_after_example______3 =n$26 [line 38]\n *&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_after_example______3) [line 38]\n REMOVE_TEMPS(n$26); [line 38]\n " shape="box"]
25 [label="25: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_after_example______3); [line 38]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_after_example______3); [line 39]\n n$26=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_after_example______3 ):class __objc_anonymous_block_A_dispatch_after_example______3 *) [line 39]\n *&__objc_anonymous_block_A_dispatch_after_example______3:class __objc_anonymous_block_A_dispatch_after_example______3 =n$26 [line 39]\n *&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_after_example______3) [line 38]\n REMOVE_TEMPS(n$26); [line 38]\n " shape="box"]
25 -> 24 ;
@ -208,11 +208,11 @@ digraph iCFG {
6 -> 9 ;
5 [label="5: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_once_example______1); [line 23]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_once_example______1); [line 23]\n n$8=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_once_example______1 ):class __objc_anonymous_block_A_dispatch_once_example______1 *) [line 23]\n *&__objc_anonymous_block_A_dispatch_once_example______1:class __objc_anonymous_block_A_dispatch_once_example______1 =n$8 [line 23]\n *&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_once_example______1) [line 23]\n REMOVE_TEMPS(n$8); [line 23]\n " shape="box"]
5 [label="5: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_once_example______1); [line 19]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_once_example______1); [line 20]\n n$8=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_once_example______1 ):class __objc_anonymous_block_A_dispatch_once_example______1 *) [line 20]\n *&__objc_anonymous_block_A_dispatch_once_example______1:class __objc_anonymous_block_A_dispatch_once_example______1 =n$8 [line 20]\n *&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_once_example______1) [line 19]\n REMOVE_TEMPS(n$8); [line 19]\n " shape="box"]
5 -> 4 ;
4 [label="4: Call n$2 \n n$2=*&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*) [line 23]\n n$3=n$2() [line 23]\n REMOVE_TEMPS(n$2,n$3); [line 23]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_once_example______1,true); [line 23]\n " shape="box"]
4 [label="4: Call n$2 \n n$2=*&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*) [line 19]\n n$3=n$2() [line 19]\n REMOVE_TEMPS(n$2,n$3); [line 19]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_once_example______1,true); [line 19]\n " shape="box"]
4 -> 3 ;

@ -1,5 +1,5 @@
digraph iCFG {
10 [label="10: DeclStmt \n n$6=_fun_NSString_stringWithUTF8String:(\"Mercedes-Benz\":char *) [line 14]\n n$7=_fun_NSString_stringWithUTF8String:(\"BMW\":char *) [line 14]\n n$8=_fun_NSString_stringWithUTF8String:(\"Porsche\":char *) [line 14]\n n$9=_fun_NSString_stringWithUTF8String:(\"Opel\":char *) [line 15]\n n$10=_fun_NSString_stringWithUTF8String:(\"Volkswagen\":char *) [line 14]\n n$11=_fun_NSString_stringWithUTF8String:(\"Audi\":char *) [line 14]\n n$5=_fun_NSArray_arrayWithObjects:count:(n$6:struct objc_object *,n$7:struct objc_object *,n$8:struct objc_object *,n$9:struct objc_object *,n$10:struct objc_object *,n$11:struct objc_object *,0:struct objc_object *) [line 14]\n *&germanCars:class NSArray *=n$5 [line 14]\n REMOVE_TEMPS(n$5,n$6,n$7,n$8,n$9,n$10,n$11); [line 14]\n " shape="box"]
10 [label="10: DeclStmt \n n$6=_fun_NSString_stringWithUTF8String:(\"Mercedes-Benz\":char *) [line 14]\n n$7=_fun_NSString_stringWithUTF8String:(\"BMW\":char *) [line 14]\n n$8=_fun_NSString_stringWithUTF8String:(\"Porsche\":char *) [line 14]\n n$9=_fun_NSString_stringWithUTF8String:(\"Opel\":char *) [line 15]\n n$10=_fun_NSString_stringWithUTF8String:(\"Volkswagen\":char *) [line 15]\n n$11=_fun_NSString_stringWithUTF8String:(\"Audi\":char *) [line 15]\n n$5=_fun_NSArray_arrayWithObjects:count:(n$6:struct objc_object *,n$7:struct objc_object *,n$8:struct objc_object *,n$9:struct objc_object *,n$10:struct objc_object *,n$11:struct objc_object *,0:struct objc_object *) [line 14]\n *&germanCars:class NSArray *=n$5 [line 14]\n REMOVE_TEMPS(n$5,n$6,n$7,n$8,n$9,n$10,n$11); [line 14]\n " shape="box"]
10 -> 9 ;

@ -10,7 +10,7 @@ digraph iCFG {
4 -> 6 ;
3 [label="3: Return Stmt \n n$1=_fun_NSString_stringWithUTF8String:(\"Matt\":char *) [line 13]\n n$2=_fun_NSString_stringWithUTF8String:(\"firstName\":char *) [line 12]\n n$3=_fun_NSString_stringWithUTF8String:(\"Galloway\":char *) [line 12]\n n$4=_fun_NSString_stringWithUTF8String:(\"lastName\":char *) [line 12]\n n$5=_fun_NSNumber_numberWithInt:(28:int ) [line 14]\n n$6=_fun_NSString_stringWithUTF8String:(\"age\":char *) [line 12]\n n$0=_fun_NSDictionary_dictionaryWithObjectsAndKeys:(n$1:struct objc_object *,n$2:class NSString *,n$3:class NSString *,n$4:class NSString *,n$5:class NSNumber *,n$6:class NSString *,0:void *) [line 12]\n *&return:class NSDictionary *=n$0 [line 12]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3,n$4,n$5,n$6); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"]
3 [label="3: Return Stmt \n n$1=_fun_NSString_stringWithUTF8String:(\"Matt\":char *) [line 13]\n n$2=_fun_NSString_stringWithUTF8String:(\"firstName\":char *) [line 13]\n n$3=_fun_NSString_stringWithUTF8String:(\"Galloway\":char *) [line 13]\n n$4=_fun_NSString_stringWithUTF8String:(\"lastName\":char *) [line 13]\n n$5=_fun_NSNumber_numberWithInt:(28:int ) [line 14]\n n$6=_fun_NSString_stringWithUTF8String:(\"age\":char *) [line 14]\n n$0=_fun_NSDictionary_dictionaryWithObjectsAndKeys:(n$1:struct objc_object *,n$2:class NSString *,n$3:class NSString *,n$4:class NSString *,n$5:class NSNumber *,n$6:class NSString *,0:void *) [line 12]\n *&return:class NSDictionary *=n$0 [line 12]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3,n$4,n$5,n$6); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"]
3 -> 2 ;

@ -22,7 +22,7 @@ digraph iCFG {
31 -> 36 ;
30 [label="30: BinaryOperatorStmt: Assign \n n$30=*&self:class A * [line -1]\n n$31=*&last_name:class A * [line -1]\n *n$30._last_name:class A *=n$31 [line -1]\n REMOVE_TEMPS(n$30,n$31); [line -1]\n NULLIFY(&last_name,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
30 [label="30: BinaryOperatorStmt: Assign \n n$30=*&self:class A * [line 14]\n n$31=*&last_name:class A * [line 14]\n *n$30._last_name:class A *=n$31 [line -1]\n REMOVE_TEMPS(n$30,n$31); [line -1]\n NULLIFY(&last_name,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
30 -> 29 ;
@ -48,11 +48,11 @@ digraph iCFG {
24 -> 23 ;
23 [label="23: Message Call: release \n n$24=*&self:class A * [line -1]\n n$25=*n$24._name:class A * [line -1]\n n$23=_fun___objc_release(n$25:class A *) [line -1]\n REMOVE_TEMPS(n$23,n$24,n$25); [line -1]\n " shape="box"]
23 [label="23: Message Call: release \n n$24=*&self:class A * [line 12]\n n$25=*n$24._name:class A * [line -1]\n n$23=_fun___objc_release(n$25:class A *) [line -1]\n REMOVE_TEMPS(n$23,n$24,n$25); [line -1]\n " shape="box"]
23 -> 22 ;
22 [label="22: BinaryOperatorStmt: Assign \n n$21=*&self:class A * [line -1]\n n$22=*&name:class A * [line -1]\n *n$21._name:class A *=n$22 [line -1]\n REMOVE_TEMPS(n$21,n$22); [line -1]\n NULLIFY(&name,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
22 [label="22: BinaryOperatorStmt: Assign \n n$21=*&self:class A * [line 12]\n n$22=*&name:class A * [line 12]\n *n$21._name:class A *=n$22 [line -1]\n REMOVE_TEMPS(n$21,n$22); [line -1]\n NULLIFY(&name,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
22 -> 21 ;
@ -74,7 +74,7 @@ digraph iCFG {
17 -> 19 ;
16 [label="16: BinaryOperatorStmt: Assign \n n$16=*&self:class A * [line -1]\n n$18=*&child:class A * [line -1]\n n$17=_fun_A_copy(n$18:class A *) virtual [line -1]\n *n$16._child:class A *=n$17 [line -1]\n REMOVE_TEMPS(n$16,n$17,n$18); [line -1]\n NULLIFY(&child,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
16 [label="16: BinaryOperatorStmt: Assign \n n$16=*&self:class A * [line 10]\n n$18=*&child:class A * [line -1]\n n$17=_fun_A_copy(n$18:class A *) virtual [line -1]\n *n$16._child:class A *=n$17 [line -1]\n REMOVE_TEMPS(n$16,n$17,n$18); [line -1]\n NULLIFY(&child,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
16 -> 15 ;

@ -1,5 +1,5 @@
digraph iCFG {
6 [label="6: BinaryOperatorStmt: Assign \n n$2=*&self:class ASDisplayNode * [line -1]\n n$3=*&opaque:signed char [line -1]\n *n$2._opaque:signed char =n$3 [line -1]\n REMOVE_TEMPS(n$2,n$3); [line -1]\n NULLIFY(&opaque,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
6 [label="6: BinaryOperatorStmt: Assign \n n$2=*&self:class ASDisplayNode * [line 10]\n n$3=*&opaque:signed char [line 10]\n *n$2._opaque:signed char =n$3 [line -1]\n REMOVE_TEMPS(n$2,n$3); [line -1]\n NULLIFY(&opaque,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
6 -> 5 ;

@ -1,5 +1,5 @@
digraph iCFG {
9 [label="9: BinaryOperatorStmt: Assign \n n$4=*&self:class A * [line -1]\n n$5=*&x:int [line -1]\n *n$4._x:int =n$5 [line -1]\n REMOVE_TEMPS(n$4,n$5); [line -1]\n NULLIFY(&self,false); [line -1]\n NULLIFY(&x,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
9 [label="9: BinaryOperatorStmt: Assign \n n$4=*&self:class A * [line 9]\n n$5=*&x:int [line 9]\n *n$4._x:int =n$5 [line -1]\n REMOVE_TEMPS(n$4,n$5); [line -1]\n NULLIFY(&self,false); [line -1]\n NULLIFY(&x,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
9 -> 8 ;

@ -3,11 +3,11 @@ digraph iCFG {
8 -> 7 ;
7 [label="7: Message Call: release \n n$5=*&self:class AClass * [line -1]\n n$6=*n$5.aDynValue:class NSObject * [line -1]\n n$4=_fun___objc_release(n$6:class NSObject *) [line -1]\n REMOVE_TEMPS(n$4,n$5,n$6); [line -1]\n " shape="box"]
7 [label="7: Message Call: release \n n$5=*&self:class AClass * [line 9]\n n$6=*n$5.aDynValue:class NSObject * [line -1]\n n$4=_fun___objc_release(n$6:class NSObject *) [line -1]\n REMOVE_TEMPS(n$4,n$5,n$6); [line -1]\n " shape="box"]
7 -> 6 ;
6 [label="6: BinaryOperatorStmt: Assign \n n$2=*&self:class AClass * [line -1]\n n$3=*&aDynValue:class NSObject * [line -1]\n *n$2.aDynValue:class NSObject *=n$3 [line -1]\n REMOVE_TEMPS(n$2,n$3); [line -1]\n NULLIFY(&aDynValue,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
6 [label="6: BinaryOperatorStmt: Assign \n n$2=*&self:class AClass * [line 9]\n n$3=*&aDynValue:class NSObject * [line 9]\n *n$2.aDynValue:class NSObject *=n$3 [line -1]\n REMOVE_TEMPS(n$2,n$3); [line -1]\n NULLIFY(&aDynValue,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
6 -> 5 ;

@ -1,5 +1,5 @@
digraph iCFG {
6 [label="6: BinaryOperatorStmt: Assign \n n$2=*&self:class Test * [line -1]\n n$3=*&numberOfFiles:int [line -1]\n *n$2.numberOfFiles:int =n$3 [line -1]\n REMOVE_TEMPS(n$2,n$3); [line -1]\n NULLIFY(&numberOfFiles,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
6 [label="6: BinaryOperatorStmt: Assign \n n$2=*&self:class Test * [line 10]\n n$3=*&numberOfFiles:int [line 10]\n *n$2.numberOfFiles:int =n$3 [line -1]\n REMOVE_TEMPS(n$2,n$3); [line -1]\n NULLIFY(&numberOfFiles,false); [line -1]\n NULLIFY(&self,false); [line -1]\n APPLY_ABSTRACTION; [line -1]\n " shape="box"]
6 -> 5 ;

Loading…
Cancel
Save