diff --git a/infer/src/backend/preanal.ml b/infer/src/backend/preanal.ml index 463e48e97..53a146592 100644 --- a/infer/src/backend/preanal.ml +++ b/infer/src/backend/preanal.ml @@ -448,11 +448,124 @@ let add_removetemps_instructions cfg = if temps != [] then Node.append_instrs_temps node [Sil.Remove_temps (temps, loc)] [] in IList.iter do_node all_nodes +module BackwardCfg = ProcCfg.Backward(ProcCfg.Exceptional) + +module LivenessAnalysis = + AbstractInterpreter.Make + (BackwardCfg) + (Scheduler.ReversePostorder) + (Liveness.Domain) + (Liveness.TransferFunctions) + +module VarDomain = AbstractDomain.FiniteSet(Var.Set) + +(* (reaching non-nullified vars) * (vars to nullify) *) +module NullifyDomain = AbstractDomain.Pair (VarDomain) (VarDomain) + +(** computes the non-nullified reaching definitions at the end of each node by building on the + results of a liveness analysis to be precise, what we want to compute is: + to_nullify := (live_before U non_nullifed_reaching_defs) - live_after + non_nullified_reaching_defs := non_nullified_reaching_defs - to_nullify + Note that this can't be done with by combining the results of reaching definitions and liveness + after the fact, nor can it be done with liveness alone. We will insert nullify instructions for + each pvar in to_nullify afer we finish the analysis. Nullify instructions speed up the analysis + by enabling it to GC state that will no longer be read. *) +module NullifyTransferFunctions = struct + type astate = NullifyDomain.astate + type extras = LivenessAnalysis.inv_map + type node_id = BackwardCfg.node_id + + let postprocess ((reaching_defs, _) as astate) node_id { ProcData.extras; } = + match LivenessAnalysis.extract_state node_id extras with + (* note: because the analysis backward, post and pre are reversed *) + | Some { LivenessAnalysis.post = live_before; pre = live_after; } -> + let to_nullify = VarDomain.diff (VarDomain.union live_before reaching_defs) live_after in + let reaching_defs' = VarDomain.diff reaching_defs to_nullify in + (reaching_defs', to_nullify) + | None -> astate + + let exec_instr ((active_defs, to_nullify) as astate) _ = function + | Sil.Set (Sil.Lvar lhs_pvar, _, _, _) -> + VarDomain.add (Var.ProgramVar lhs_pvar) active_defs, to_nullify + | Sil.Set _ | Letderef _ | Call _ | Prune _ | Declare_locals _ | Stackop _ | Remove_temps _ + | Abstract _ -> + astate + | Sil.Nullify _ -> + failwith "Should not add nullify instructions before running nullify analysis!" +end + + +module NullifyAnalysis = + AbstractInterpreter.Make + (ProcCfg.Exceptional) + (Scheduler.ReversePostorder) + (NullifyDomain) + (NullifyTransferFunctions) + +let add_nullify_instrs tenv _ pdesc = + let liveness_proc_cfg = BackwardCfg.from_pdesc pdesc in + let proc_data_no_extras = ProcData.make_default pdesc tenv in + let liveness_inv_map = LivenessAnalysis.exec_cfg liveness_proc_cfg proc_data_no_extras in + + let address_taken_vars = + if Procname.is_java (Cfg.Procdesc.get_proc_name pdesc) + then AddressTaken.Domain.empty (* can't take the address of a variable in Java *) + else + match AddressTaken.Analyzer.compute_post proc_data_no_extras with + | Some post -> post + | None -> AddressTaken.Domain.empty in + + let nullify_proc_cfg = ProcCfg.Exceptional.from_pdesc pdesc in + let nullify_proc_data = ProcData.make pdesc tenv liveness_inv_map in + let nullify_inv_map = NullifyAnalysis.exec_cfg nullify_proc_cfg nullify_proc_data in + + (* only nullify pvars that are local; don't nullify those that can escape *) + let is_local pvar = + not (Pvar.is_return pvar || Pvar.is_global pvar) in + + let node_add_nullify_instructions node pvars = + let loc = Cfg.Node.get_last_loc node in + let nullify_instrs = + IList.filter is_local pvars + |> IList.map (fun pvar -> Sil.Nullify (pvar, loc, false)) in + if nullify_instrs <> [] + then Cfg.Node.append_instrs_temps node (IList.rev nullify_instrs) [] in + + IList.iter + (fun node -> + match NullifyAnalysis.extract_post (ProcCfg.Exceptional.id node) nullify_inv_map with + | Some (_, to_nullify) -> + let pvars_to_nullify = + Var.Set.fold + (fun var acc -> match var with + (* we nullify all address taken variables at the end of the procedure *) + | ProgramVar pvar when not (AddressTaken.Domain.mem pvar address_taken_vars) -> + pvar :: acc + | _ -> acc) + to_nullify + [] in + node_add_nullify_instructions node pvars_to_nullify + | None -> ()) + (ProcCfg.Exceptional.nodes nullify_proc_cfg); + (* nullify all address taken variables *) + if not (AddressTaken.Domain.is_empty address_taken_vars) + then + let exit_node = ProcCfg.Exceptional.exit_node nullify_proc_cfg in + node_add_nullify_instructions exit_node (AddressTaken.Domain.elements address_taken_vars) + +let old_nullify_analysis = false + let doit ?(f_translate_typ=None) cfg cg tenv = add_removetemps_instructions cfg; - AllPreds.mk_table cfg; - Cfg.iter_proc_desc cfg (analyze_and_annotate_proc cfg tenv); - AllPreds.clear_table (); + if old_nullify_analysis + then + begin + AllPreds.mk_table cfg; + Cfg.iter_proc_desc cfg (analyze_and_annotate_proc cfg tenv); + AllPreds.clear_table () + end + else + Cfg.iter_proc_desc cfg (add_nullify_instrs tenv); if !Config.curr_language = Config.Java then add_dispatch_calls cfg cg tenv f_translate_typ; add_abstraction_instructions cfg; diff --git a/infer/src/checkers/liveness.ml b/infer/src/checkers/liveness.ml index ff5acfa2a..11d86a3dc 100644 --- a/infer/src/checkers/liveness.ml +++ b/infer/src/checkers/liveness.ml @@ -54,12 +54,8 @@ module TransferFunctions = struct astate |> exp_add_live call_exp |> IList.fold_right exp_add_live (IList.map fst params) - | Sil.Declare_locals _ | Stackop _ -> + | Sil.Declare_locals _ | Stackop _ | Remove_temps _ | Abstract _ | Nullify _ -> astate - | Sil.Nullify _ | Remove_temps _ | Abstract _ -> - failwith - "Nullify, Remove_temps, and Abstract instructions should be added after running liveness" - end module Analyzer = diff --git a/infer/src/clang/cTrans.ml b/infer/src/clang/cTrans.ml index 9a74018f4..da33f9fd8 100644 --- a/infer/src/clang/cTrans.ml +++ b/infer/src/clang/cTrans.ml @@ -146,17 +146,6 @@ struct let block_var = Pvar.mk mblock procname in let declare_block_local = Sil.Declare_locals ([(block_var, Sil.Tptr (block_type, Sil.Pk_pointer))], loc) in - (* Adds Nullify of the temp block variable in the predecessors of the exit node. *) - let pred_exit = Cfg.Node.get_preds (Cfg.Procdesc.get_exit_node procdesc) in - let block_nullify_instr = - if pred_exit = [] then - [Sil.Nullify (block_var, loc, true)] - else - (IList.iter - (fun n -> let loc = Cfg.Node.get_loc n in - Cfg.Node.append_instrs_temps n [Sil.Nullify(block_var, loc, true)] []) - pred_exit; - []) in let set_instr = Sil.Set (Sil.Lvar block_var, block_type, Sil.Var id_block, loc) in let create_field_exp (var, typ) = let id = Ident.create_fresh Ident.knormal in @@ -168,8 +157,7 @@ struct (declare_block_local :: trans_res.instrs) @ [set_instr] @ captured_instrs @ - set_fields @ - block_nullify_instr, + set_fields, id_block :: ids (* From a list of expression extract blocks from tuples and *) @@ -1094,25 +1082,12 @@ struct instruction trans_state transformed_stmt and block_enumeration_trans trans_state stmt_info stmt_list ei = - let declare_nullify_vars loc preds pvar = - (* Add nullify of the temp block var to the last node (predecessor or the successor nodes)*) - IList.iter - (fun n -> Cfg.Node.append_instrs_temps n [Sil.Nullify(pvar, loc, true)] []) - preds in - Printing.log_out "\n Call to a block enumeration function treated as special case...\n@."; let procname = Cfg.Procdesc.get_proc_name trans_state.context.CContext.procdesc in let pvar = CFrontend_utils.General_utils.get_next_block_pvar procname in - let transformed_stmt, vars_to_register = + let transformed_stmt, _ = Ast_expressions.translate_block_enumerate (Pvar.to_string pvar) stmt_info stmt_list ei in - let pvars = IList.map (fun (v, _, _) -> - Pvar.mk (Mangled.from_string v) procname - ) vars_to_register in - let loc = CLocation.get_sil_location stmt_info trans_state.context in - let res_state = instruction trans_state transformed_stmt in - let preds = IList.flatten (IList.map (fun n -> Cfg.Node.get_preds n) trans_state.succ_nodes) in - IList.iter (declare_nullify_vars loc preds) pvars; - res_state + instruction trans_state transformed_stmt and compoundStmt_trans trans_state stmt_list = instructions trans_state stmt_list diff --git a/infer/tests/build_systems/expected_outputs/ant_report.json b/infer/tests/build_systems/expected_outputs/ant_report.json index 760ea8e9e..014494680 100644 --- a/infer/tests/build_systems/expected_outputs/ant_report.json +++ b/infer/tests/build_systems/expected_outputs/ant_report.json @@ -342,12 +342,27 @@ { "bug_type": "RESOURCE_LEAK", "file": "codetoanalyze/java/infer/ResourceLeaks.java", - "procedure": "int ResourceLeaks.fileOutputStreamTwoLeaks(boolean)" + "procedure": "void ResourceLeaks.fileOutputStreamOneLeak()" }, { "bug_type": "RESOURCE_LEAK", "file": "codetoanalyze/java/infer/ResourceLeaks.java", - "procedure": "int ResourceLeaks.fileOutputStreamTwoLeaks(boolean)" + "procedure": "int ResourceLeaks.fileOutputStreamTwoLeaks1(boolean)" + }, + { + "bug_type": "RESOURCE_LEAK", + "file": "codetoanalyze/java/infer/ResourceLeaks.java", + "procedure": "int ResourceLeaks.fileOutputStreamTwoLeaks1(boolean)" + }, + { + "bug_type": "RESOURCE_LEAK", + "file": "codetoanalyze/java/infer/ResourceLeaks.java", + "procedure": "void ResourceLeaks.fileOutputStreamTwoLeaks2()" + }, + { + "bug_type": "RESOURCE_LEAK", + "file": "codetoanalyze/java/infer/ResourceLeaks.java", + "procedure": "void ResourceLeaks.fileOutputStreamTwoLeaks2()" }, { "bug_type": "RESOURCE_LEAK", diff --git a/infer/tests/build_systems/expected_outputs/buck_report.json b/infer/tests/build_systems/expected_outputs/buck_report.json index b32274ccb..07f322efa 100644 --- a/infer/tests/build_systems/expected_outputs/buck_report.json +++ b/infer/tests/build_systems/expected_outputs/buck_report.json @@ -342,12 +342,27 @@ { "bug_type": "RESOURCE_LEAK", "file": "infer/tests/codetoanalyze/java/infer/ResourceLeaks.java", - "procedure": "int ResourceLeaks.fileOutputStreamTwoLeaks(boolean)" + "procedure": "void ResourceLeaks.fileOutputStreamOneLeak()" }, { "bug_type": "RESOURCE_LEAK", "file": "infer/tests/codetoanalyze/java/infer/ResourceLeaks.java", - "procedure": "int ResourceLeaks.fileOutputStreamTwoLeaks(boolean)" + "procedure": "int ResourceLeaks.fileOutputStreamTwoLeaks1(boolean)" + }, + { + "bug_type": "RESOURCE_LEAK", + "file": "infer/tests/codetoanalyze/java/infer/ResourceLeaks.java", + "procedure": "int ResourceLeaks.fileOutputStreamTwoLeaks1(boolean)" + }, + { + "bug_type": "RESOURCE_LEAK", + "file": "infer/tests/codetoanalyze/java/infer/ResourceLeaks.java", + "procedure": "void ResourceLeaks.fileOutputStreamTwoLeaks2()" + }, + { + "bug_type": "RESOURCE_LEAK", + "file": "infer/tests/codetoanalyze/java/infer/ResourceLeaks.java", + "procedure": "void ResourceLeaks.fileOutputStreamTwoLeaks2()" }, { "bug_type": "RESOURCE_LEAK", diff --git a/infer/tests/codetoanalyze/c/frontend/arithmetic/unary.c.dot b/infer/tests/codetoanalyze/c/frontend/arithmetic/unary.c.dot index e064751ff..2a3d20e4a 100644 --- a/infer/tests/codetoanalyze/c/frontend/arithmetic/unary.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/arithmetic/unary.c.dot @@ -47,11 +47,11 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n *&return:int =0 [line 32]\n NULLIFY(&a,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] 3 -> 2 ; -2 [label="2: Exit main \n " color=yellow style=filled] +2 [label="2: Exit main \n NULLIFY(&a,false); [line 33]\n " color=yellow style=filled] 1 [label="1: Start main\nFormals: \nLocals: b:int * a:int y:int x:int \n DECLARE_LOCALS(&return,&b,&a,&y,&x); [line 10]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/cond2.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/cond2.c.dot index 6b1344a72..0f117d5cd 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/cond2.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/cond2.c.dot @@ -90,7 +90,7 @@ digraph iCFG { 37 -> 31 ; 37 -> 32 ; -36 [label="36: BinaryOperatorStmt: Assign \n NULLIFY(&x,false); [line 13]\n *&x:int =0 [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +36 [label="36: BinaryOperatorStmt: Assign \n *&x:int =0 [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 36 -> 30 ; @@ -98,7 +98,7 @@ digraph iCFG { 35 -> 30 ; -34 [label="34: Prune (true branch) \n PRUNE(((7 < n$10) != 0), true); [line 12]\n REMOVE_TEMPS(n$10); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"] +34 [label="34: Prune (true branch) \n PRUNE(((7 < n$10) != 0), true); [line 12]\n REMOVE_TEMPS(n$10); [line 12]\n NULLIFY(&x,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"] 34 -> 36 ; @@ -111,7 +111,7 @@ digraph iCFG { 32 -> 33 ; -31 [label="31: Prune (true branch) \n PRUNE(((3 < 4) != 0), true); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"] +31 [label="31: Prune (true branch) \n PRUNE(((3 < 4) != 0), true); [line 12]\n NULLIFY(&x,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"] 31 -> 36 ; @@ -133,7 +133,7 @@ digraph iCFG { 27 -> 20 ; -26 [label="26: ConditinalStmt Branch \n NULLIFY(&x,false); [line 16]\n NULLIFY(&y,false); [line 16]\n *&SIL_temp_conditional___n$6:int =1 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] +26 [label="26: ConditinalStmt Branch \n *&SIL_temp_conditional___n$6:int =1 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 26 -> 20 ; @@ -154,7 +154,7 @@ digraph iCFG { 22 -> 23 ; -21 [label="21: Prune (true branch) \n PRUNE(((3 < 4) != 0), true); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="invhouse"] +21 [label="21: Prune (true branch) \n PRUNE(((3 < 4) != 0), true); [line 16]\n NULLIFY(&x,false); [line 16]\n NULLIFY(&y,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="invhouse"] 21 -> 26 ; diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/conditional_operator.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/conditional_operator.c.dot index ce5af8c6d..85187fd98 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/conditional_operator.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/conditional_operator.c.dot @@ -39,7 +39,7 @@ digraph iCFG { 57 -> 51 ; -56 [label="56: ConditinalStmt Branch \n NULLIFY(&p,false); [line 31]\n *&SIL_temp_conditional___n$1:int =0 [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +56 [label="56: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =0 [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] 56 -> 52 ; @@ -187,7 +187,7 @@ digraph iCFG { 20 -> 14 ; -19 [label="19: ConditinalStmt Branch \n NULLIFY(&b,false); [line 17]\n *&SIL_temp_conditional___n$1:int =1 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +19 [label="19: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =1 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 19 -> 15 ; @@ -195,7 +195,7 @@ digraph iCFG { 18 -> 15 ; -17 [label="17: Prune (false branch) \n n$2=*&b:int [line 17]\n PRUNE((n$2 == 0), false); [line 17]\n REMOVE_TEMPS(n$2); [line 17]\n " shape="invhouse"] +17 [label="17: Prune (false branch) \n n$2=*&b:int [line 17]\n PRUNE((n$2 == 0), false); [line 17]\n REMOVE_TEMPS(n$2); [line 17]\n NULLIFY(&b,false); [line 17]\n " shape="invhouse"] 17 -> 19 ; @@ -223,7 +223,7 @@ digraph iCFG { 11 -> 5 ; -10 [label="10: ConditinalStmt Branch \n NULLIFY(&b,false); [line 14]\n *&SIL_temp_conditional___n$0:int =1 [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +10 [label="10: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 10 -> 6 ; @@ -231,7 +231,7 @@ digraph iCFG { 9 -> 6 ; -8 [label="8: Prune (false branch) \n n$1=*&b:int [line 14]\n PRUNE((n$1 == 0), false); [line 14]\n REMOVE_TEMPS(n$1); [line 14]\n " shape="invhouse"] +8 [label="8: Prune (false branch) \n n$1=*&b:int [line 14]\n PRUNE((n$1 == 0), false); [line 14]\n REMOVE_TEMPS(n$1); [line 14]\n NULLIFY(&b,false); [line 14]\n " shape="invhouse"] 8 -> 10 ; diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/if_short_circuit.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/if_short_circuit.c.dot index b6561fe89..fee314f84 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/if_short_circuit.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/if_short_circuit.c.dot @@ -16,7 +16,7 @@ digraph iCFG { 92 -> 94 ; -91 [label="91: BinaryOperatorStmt: EQ \n NULLIFY(&SIL_temp_conditional___n$3,false); [line 52]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 52]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 52]\n n$11=*&spec:char * [line 52]\n n$12=*n$11:char [line 52]\n NULLIFY(&spec,false); [line 52]\n " shape="box"] +91 [label="91: BinaryOperatorStmt: EQ \n n$11=*&spec:char * [line 52]\n n$12=*n$11:char [line 52]\n NULLIFY(&spec,false); [line 52]\n " shape="box"] 91 -> 92 ; @@ -25,15 +25,15 @@ digraph iCFG { 90 -> 65 ; -89 [label="89: BinaryOperatorStmt: Assign \n NULLIFY(&SIL_temp_conditional___n$7,false); [line 50]\n NULLIFY(&spec,false); [line 50]\n *&block_size:char *=0 [line 50]\n NULLIFY(&block_size,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] +89 [label="89: BinaryOperatorStmt: Assign \n *&block_size:char *=0 [line 50]\n NULLIFY(&block_size,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] 89 -> 65 ; -88 [label="88: Prune (false branch) \n n$10=*&SIL_temp_conditional___n$7:int [line 49]\n PRUNE((n$10 == 0), false); [line 49]\n REMOVE_TEMPS(n$10); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="invhouse"] +88 [label="88: Prune (false branch) \n n$10=*&SIL_temp_conditional___n$7:int [line 49]\n PRUNE((n$10 == 0), false); [line 49]\n REMOVE_TEMPS(n$10); [line 49]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="invhouse"] 88 -> 91 ; -87 [label="87: Prune (true branch) \n n$10=*&SIL_temp_conditional___n$7:int [line 49]\n PRUNE((n$10 != 0), true); [line 49]\n REMOVE_TEMPS(n$10); [line 49]\n " shape="invhouse"] +87 [label="87: Prune (true branch) \n n$10=*&SIL_temp_conditional___n$7:int [line 49]\n PRUNE((n$10 != 0), true); [line 49]\n REMOVE_TEMPS(n$10); [line 49]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 49]\n NULLIFY(&spec,false); [line 49]\n " shape="invhouse"] 87 -> 89 ; @@ -53,7 +53,7 @@ digraph iCFG { 83 -> 85 ; -82 [label="82: BinaryOperatorStmt: Assign \n NULLIFY(&SIL_temp_conditional___n$3,false); [line 49]\n NULLIFY(&spec,false); [line 49]\n n$8=_fun_getenv(\"BLOCKSIZE\":char *) [line 49]\n *&spec:char *=n$8 [line 49]\n n$9=*&spec:char * [line 49]\n " shape="box"] +82 [label="82: BinaryOperatorStmt: Assign \n n$8=_fun_getenv(\"BLOCKSIZE\":char *) [line 49]\n *&spec:char *=n$8 [line 49]\n n$9=*&spec:char * [line 49]\n " shape="box"] 82 -> 83 ; @@ -63,11 +63,11 @@ digraph iCFG { 81 -> 87 ; 81 -> 88 ; -80 [label="80: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 49]\n PRUNE((n$6 == 0), false); [line 49]\n REMOVE_TEMPS(n$6); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="invhouse"] +80 [label="80: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 49]\n PRUNE((n$6 == 0), false); [line 49]\n REMOVE_TEMPS(n$6); [line 49]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="invhouse"] 80 -> 91 ; -79 [label="79: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 49]\n PRUNE((n$6 != 0), true); [line 49]\n REMOVE_TEMPS(n$6); [line 49]\n " shape="invhouse"] +79 [label="79: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 49]\n PRUNE((n$6 != 0), true); [line 49]\n REMOVE_TEMPS(n$6); [line 49]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 49]\n NULLIFY(&spec,false); [line 49]\n " shape="invhouse"] 79 -> 82 ; @@ -87,7 +87,7 @@ digraph iCFG { 75 -> 77 ; -74 [label="74: BinaryOperatorStmt: Assign \n NULLIFY(&SIL_temp_conditional___n$0,false); [line 49]\n NULLIFY(&spec,false); [line 49]\n n$4=_fun_getenv(\"BLOCK_SIZE\":char *) [line 49]\n *&spec:char *=n$4 [line 49]\n n$5=*&spec:char * [line 49]\n " shape="box"] +74 [label="74: BinaryOperatorStmt: Assign \n n$4=_fun_getenv(\"BLOCK_SIZE\":char *) [line 49]\n *&spec:char *=n$4 [line 49]\n n$5=*&spec:char * [line 49]\n " shape="box"] 74 -> 75 ; @@ -97,11 +97,11 @@ digraph iCFG { 73 -> 79 ; 73 -> 80 ; -72 [label="72: Prune (false branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 49]\n PRUNE((n$2 == 0), false); [line 49]\n REMOVE_TEMPS(n$2); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="invhouse"] +72 [label="72: Prune (false branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 49]\n PRUNE((n$2 == 0), false); [line 49]\n REMOVE_TEMPS(n$2); [line 49]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="invhouse"] 72 -> 91 ; -71 [label="71: Prune (true branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 49]\n PRUNE((n$2 != 0), true); [line 49]\n REMOVE_TEMPS(n$2); [line 49]\n " shape="invhouse"] +71 [label="71: Prune (true branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 49]\n PRUNE((n$2 != 0), true); [line 49]\n REMOVE_TEMPS(n$2); [line 49]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 49]\n NULLIFY(&spec,false); [line 49]\n " shape="invhouse"] 71 -> 74 ; @@ -145,7 +145,7 @@ digraph iCFG { 61 -> 36 ; -60 [label="60: BinaryOperatorStmt: Assign \n NULLIFY(&SIL_temp_conditional___n$7,false); [line 38]\n *&block_size:char *=0 [line 38]\n NULLIFY(&block_size,false); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] +60 [label="60: BinaryOperatorStmt: Assign \n *&block_size:char *=0 [line 38]\n NULLIFY(&block_size,false); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] 60 -> 36 ; @@ -153,7 +153,7 @@ digraph iCFG { 59 -> 35 ; -58 [label="58: Prune (true branch) \n n$10=*&SIL_temp_conditional___n$7:int [line 37]\n PRUNE((n$10 != 0), true); [line 37]\n REMOVE_TEMPS(n$10); [line 37]\n " shape="invhouse"] +58 [label="58: Prune (true branch) \n n$10=*&SIL_temp_conditional___n$7:int [line 37]\n PRUNE((n$10 != 0), true); [line 37]\n REMOVE_TEMPS(n$10); [line 37]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 37]\n " shape="invhouse"] 58 -> 60 ; @@ -173,7 +173,7 @@ digraph iCFG { 54 -> 56 ; -53 [label="53: BinaryOperatorStmt: Assign \n NULLIFY(&SIL_temp_conditional___n$3,false); [line 37]\n n$8=_fun_getenv(\"BLOCKSIZE\":char *) [line 37]\n *&spec:char *=n$8 [line 37]\n n$9=*&spec:char * [line 37]\n " shape="box"] +53 [label="53: BinaryOperatorStmt: Assign \n n$8=_fun_getenv(\"BLOCKSIZE\":char *) [line 37]\n *&spec:char *=n$8 [line 37]\n n$9=*&spec:char * [line 37]\n " shape="box"] 53 -> 54 ; @@ -187,7 +187,7 @@ digraph iCFG { 51 -> 35 ; -50 [label="50: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 36]\n PRUNE((n$6 != 0), true); [line 36]\n REMOVE_TEMPS(n$6); [line 36]\n " shape="invhouse"] +50 [label="50: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 36]\n PRUNE((n$6 != 0), true); [line 36]\n REMOVE_TEMPS(n$6); [line 36]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 36]\n " shape="invhouse"] 50 -> 53 ; @@ -207,7 +207,7 @@ digraph iCFG { 46 -> 48 ; -45 [label="45: BinaryOperatorStmt: Assign \n NULLIFY(&SIL_temp_conditional___n$0,false); [line 36]\n n$4=_fun_getenv(\"BLOCK_SIZE\":char *) [line 36]\n *&spec:char *=n$4 [line 36]\n n$5=*&spec:char * [line 36]\n NULLIFY(&spec,false); [line 36]\n " shape="box"] +45 [label="45: BinaryOperatorStmt: Assign \n n$4=_fun_getenv(\"BLOCK_SIZE\":char *) [line 36]\n *&spec:char *=n$4 [line 36]\n n$5=*&spec:char * [line 36]\n NULLIFY(&spec,false); [line 36]\n " shape="box"] 45 -> 46 ; @@ -221,23 +221,23 @@ digraph iCFG { 43 -> 35 ; -42 [label="42: Prune (true branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 36]\n PRUNE((n$2 != 0), true); [line 36]\n REMOVE_TEMPS(n$2); [line 36]\n " shape="invhouse"] +42 [label="42: Prune (true branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 36]\n PRUNE((n$2 != 0), true); [line 36]\n REMOVE_TEMPS(n$2); [line 36]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 36]\n " shape="invhouse"] 42 -> 45 ; -41 [label="41: ConditinalStmt Branch \n NULLIFY(&spec,false); [line 36]\n *&SIL_temp_conditional___n$0:int =1 [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +41 [label="41: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 41 -> 37 ; -40 [label="40: ConditinalStmt Branch \n NULLIFY(&spec,false); [line 36]\n *&SIL_temp_conditional___n$0:int =0 [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +40 [label="40: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 40 -> 37 ; -39 [label="39: Prune (false branch) \n n$1=*&spec:char * [line 36]\n PRUNE((n$1 == 0), false); [line 36]\n REMOVE_TEMPS(n$1); [line 36]\n " shape="invhouse"] +39 [label="39: Prune (false branch) \n n$1=*&spec:char * [line 36]\n PRUNE((n$1 == 0), false); [line 36]\n REMOVE_TEMPS(n$1); [line 36]\n NULLIFY(&spec,false); [line 36]\n " shape="invhouse"] 39 -> 41 ; -38 [label="38: Prune (true branch) \n n$1=*&spec:char * [line 36]\n PRUNE((n$1 != 0), true); [line 36]\n REMOVE_TEMPS(n$1); [line 36]\n " shape="invhouse"] +38 [label="38: Prune (true branch) \n n$1=*&spec:char * [line 36]\n PRUNE((n$1 != 0), true); [line 36]\n REMOVE_TEMPS(n$1); [line 36]\n NULLIFY(&spec,false); [line 36]\n " shape="invhouse"] 38 -> 40 ; @@ -258,19 +258,19 @@ digraph iCFG { 34 -> 61 ; -33 [label="33: BinaryOperatorStmt: Assign \n NULLIFY(&SIL_temp_conditional___n$3,false); [line 25]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 25]\n n$7=*&x:int * [line 25]\n *n$7:int =32 [line 25]\n REMOVE_TEMPS(n$7); [line 25]\n NULLIFY(&x,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +33 [label="33: BinaryOperatorStmt: Assign \n n$7=*&x:int * [line 25]\n *n$7:int =32 [line 25]\n REMOVE_TEMPS(n$7); [line 25]\n NULLIFY(&x,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 33 -> 15 ; -32 [label="32: BinaryOperatorStmt: Assign \n NULLIFY(&SIL_temp_conditional___n$3,false); [line 23]\n NULLIFY(&x,false); [line 23]\n *&x:int *=17 [line 23]\n NULLIFY(&x,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +32 [label="32: BinaryOperatorStmt: Assign \n *&x:int *=17 [line 23]\n NULLIFY(&x,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 32 -> 15 ; -31 [label="31: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 22]\n PRUNE((n$6 == 0), false); [line 22]\n REMOVE_TEMPS(n$6); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="invhouse"] +31 [label="31: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 22]\n PRUNE((n$6 == 0), false); [line 22]\n REMOVE_TEMPS(n$6); [line 22]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="invhouse"] 31 -> 33 ; -30 [label="30: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 22]\n PRUNE((n$6 != 0), true); [line 22]\n REMOVE_TEMPS(n$6); [line 22]\n " shape="invhouse"] +30 [label="30: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 22]\n PRUNE((n$6 != 0), true); [line 22]\n REMOVE_TEMPS(n$6); [line 22]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 22]\n NULLIFY(&x,false); [line 22]\n " shape="invhouse"] 30 -> 32 ; @@ -290,7 +290,7 @@ digraph iCFG { 26 -> 28 ; -25 [label="25: BinaryOperatorStmt: Assign \n NULLIFY(&SIL_temp_conditional___n$0,false); [line 22]\n NULLIFY(&x,false); [line 22]\n n$4=_fun_getenv(\"BLOCK\":char *) [line 22]\n *&x:int *=n$4 [line 22]\n n$5=*&x:int * [line 22]\n " shape="box"] +25 [label="25: BinaryOperatorStmt: Assign \n n$4=_fun_getenv(\"BLOCK\":char *) [line 22]\n *&x:int *=n$4 [line 22]\n n$5=*&x:int * [line 22]\n " shape="box"] 25 -> 26 ; @@ -300,11 +300,11 @@ digraph iCFG { 24 -> 30 ; 24 -> 31 ; -23 [label="23: Prune (false branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 22]\n PRUNE((n$2 == 0), false); [line 22]\n REMOVE_TEMPS(n$2); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="invhouse"] +23 [label="23: Prune (false branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 22]\n PRUNE((n$2 == 0), false); [line 22]\n REMOVE_TEMPS(n$2); [line 22]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="invhouse"] 23 -> 33 ; -22 [label="22: Prune (true branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 22]\n PRUNE((n$2 != 0), true); [line 22]\n REMOVE_TEMPS(n$2); [line 22]\n " shape="invhouse"] +22 [label="22: Prune (true branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 22]\n PRUNE((n$2 != 0), true); [line 22]\n REMOVE_TEMPS(n$2); [line 22]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 22]\n " shape="invhouse"] 22 -> 25 ; @@ -349,7 +349,7 @@ digraph iCFG { 12 -> 3 ; -11 [label="11: BinaryOperatorStmt: Assign \n NULLIFY(&x,false); [line 15]\n *&x:int *=17 [line 15]\n NULLIFY(&x,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +11 [label="11: BinaryOperatorStmt: Assign \n *&x:int *=17 [line 15]\n NULLIFY(&x,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 11 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/int_negation.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/int_negation.c.dot index d8fa9442e..36c883845 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/int_negation.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/int_negation.c.dot @@ -3,19 +3,19 @@ digraph iCFG { 34 -> 28 ; -33 [label="33: ConditinalStmt Branch \n NULLIFY(&x,false); [line 29]\n *&SIL_temp_conditional___n$0:int =1 [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +33 [label="33: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 33 -> 29 ; -32 [label="32: ConditinalStmt Branch \n NULLIFY(&x,false); [line 29]\n *&SIL_temp_conditional___n$0:int =0 [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +32 [label="32: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 32 -> 29 ; -31 [label="31: Prune (false branch) \n n$1=*&x:int [line 29]\n PRUNE((n$1 == 0), false); [line 29]\n REMOVE_TEMPS(n$1); [line 29]\n " shape="invhouse"] +31 [label="31: Prune (false branch) \n n$1=*&x:int [line 29]\n PRUNE((n$1 == 0), false); [line 29]\n REMOVE_TEMPS(n$1); [line 29]\n NULLIFY(&x,false); [line 29]\n " shape="invhouse"] 31 -> 33 ; -30 [label="30: Prune (true branch) \n n$1=*&x:int [line 29]\n PRUNE((n$1 != 0), true); [line 29]\n REMOVE_TEMPS(n$1); [line 29]\n " shape="invhouse"] +30 [label="30: Prune (true branch) \n n$1=*&x:int [line 29]\n PRUNE((n$1 != 0), true); [line 29]\n REMOVE_TEMPS(n$1); [line 29]\n NULLIFY(&x,false); [line 29]\n " shape="invhouse"] 30 -> 32 ; @@ -52,19 +52,19 @@ digraph iCFG { 22 -> 23 ; 22 -> 24 ; -21 [label="21: ConditinalStmt Branch \n NULLIFY(&x,false); [line 22]\n *&SIL_temp_conditional___n$0:int =1 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +21 [label="21: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 21 -> 17 ; -20 [label="20: ConditinalStmt Branch \n NULLIFY(&x,false); [line 22]\n *&SIL_temp_conditional___n$0:int =0 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +20 [label="20: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 20 -> 17 ; -19 [label="19: Prune (false branch) \n n$1=*&x:int [line 22]\n PRUNE((n$1 == 0), false); [line 22]\n REMOVE_TEMPS(n$1); [line 22]\n " shape="invhouse"] +19 [label="19: Prune (false branch) \n n$1=*&x:int [line 22]\n PRUNE((n$1 == 0), false); [line 22]\n REMOVE_TEMPS(n$1); [line 22]\n NULLIFY(&x,false); [line 22]\n " shape="invhouse"] 19 -> 21 ; -18 [label="18: Prune (true branch) \n n$1=*&x:int [line 22]\n PRUNE((n$1 != 0), true); [line 22]\n REMOVE_TEMPS(n$1); [line 22]\n " shape="invhouse"] +18 [label="18: Prune (true branch) \n n$1=*&x:int [line 22]\n PRUNE((n$1 != 0), true); [line 22]\n REMOVE_TEMPS(n$1); [line 22]\n NULLIFY(&x,false); [line 22]\n " shape="invhouse"] 18 -> 20 ; @@ -72,7 +72,7 @@ digraph iCFG { 17 -> 22 ; -16 [label="16: between_join_and_exit \n NULLIFY(&SIL_temp_conditional___n$0,false); [line 22]\n NULLIFY(&x,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +16 [label="16: between_join_and_exit \n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 16 -> 14 ; @@ -109,7 +109,7 @@ digraph iCFG { 8 -> 9 ; 8 -> 10 ; -7 [label="7: between_join_and_exit \n NULLIFY(&x,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +7 [label="7: between_join_and_exit \n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 7 -> 5 ; diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/member_access.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/member_access.c.dot index 8cb7af21a..c86df6854 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/member_access.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/member_access.c.dot @@ -67,11 +67,11 @@ digraph iCFG { 8 -> 2 ; -7 [label="7: ConditinalStmt Branch \n NULLIFY(&p,false); [line 17]\n n$2=*&q:struct s * [line 17]\n *&SIL_temp_conditional___n$0:struct s *=n$2 [line 17]\n REMOVE_TEMPS(n$2); [line 17]\n NULLIFY(&q,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +7 [label="7: ConditinalStmt Branch \n n$2=*&q:struct s * [line 17]\n *&SIL_temp_conditional___n$0:struct s *=n$2 [line 17]\n REMOVE_TEMPS(n$2); [line 17]\n NULLIFY(&q,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 7 -> 3 ; -6 [label="6: ConditinalStmt Branch \n NULLIFY(&q,false); [line 17]\n n$1=*&p:struct s * [line 17]\n *&SIL_temp_conditional___n$0:struct s *=n$1 [line 17]\n REMOVE_TEMPS(n$1); [line 17]\n NULLIFY(&p,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +6 [label="6: ConditinalStmt Branch \n n$1=*&p:struct s * [line 17]\n *&SIL_temp_conditional___n$0:struct s *=n$1 [line 17]\n REMOVE_TEMPS(n$1); [line 17]\n NULLIFY(&p,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 6 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/enumeration/other_enum.c.dot b/infer/tests/codetoanalyze/c/frontend/enumeration/other_enum.c.dot index 8acfcd99a..f3c69bf76 100644 --- a/infer/tests/codetoanalyze/c/frontend/enumeration/other_enum.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/enumeration/other_enum.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 19 -> 14 ; -18 [label="18: Return Stmt \n NULLIFY(&foo_a,false); [line 28]\n NULLIFY(&foo_g,false); [line 28]\n *&return:int =0 [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] +18 [label="18: Return Stmt \n *&return:int =0 [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] 18 -> 11 ; @@ -15,7 +15,7 @@ digraph iCFG { 17 -> 11 ; -16 [label="16: Prune (false branch) \n PRUNE(((n$0 == 12) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n " shape="invhouse"] +16 [label="16: Prune (false branch) \n PRUNE(((n$0 == 12) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&foo_a,false); [line 25]\n NULLIFY(&foo_g,false); [line 25]\n " shape="invhouse"] 16 -> 18 ; @@ -28,7 +28,7 @@ digraph iCFG { 14 -> 15 ; 14 -> 16 ; -13 [label="13: between_join_and_exit \n NULLIFY(&foo_a,false); [line 25]\n NULLIFY(&foo_g,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +13 [label="13: between_join_and_exit \n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 13 -> 11 ; diff --git a/infer/tests/codetoanalyze/c/frontend/gotostmt/goto_ex.c.dot b/infer/tests/codetoanalyze/c/frontend/gotostmt/goto_ex.c.dot index 7e8dde460..1dafc5783 100644 --- a/infer/tests/codetoanalyze/c/frontend/gotostmt/goto_ex.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/gotostmt/goto_ex.c.dot @@ -12,11 +12,11 @@ digraph iCFG { 250 -> 248 ; 250 -> 249 ; -249 [label="249: Prune (false branch) \n n$10=*&q:int [line 171]\n PRUNE((n$10 == 0), false); [line 171]\n REMOVE_TEMPS(n$10); [line 171]\n " shape="invhouse"] +249 [label="249: Prune (false branch) \n n$10=*&q:int [line 171]\n PRUNE((n$10 == 0), false); [line 171]\n REMOVE_TEMPS(n$10); [line 171]\n NULLIFY(&q,false); [line 171]\n " shape="invhouse"] 249 -> 247 ; -248 [label="248: Prune (true branch) \n n$10=*&q:int [line 171]\n PRUNE((n$10 != 0), true); [line 171]\n REMOVE_TEMPS(n$10); [line 171]\n APPLY_ABSTRACTION; [line 171]\n " shape="invhouse"] +248 [label="248: Prune (true branch) \n n$10=*&q:int [line 171]\n PRUNE((n$10 != 0), true); [line 171]\n REMOVE_TEMPS(n$10); [line 171]\n NULLIFY(&q,false); [line 171]\n APPLY_ABSTRACTION; [line 171]\n " shape="invhouse"] 248 -> 245 ; @@ -28,7 +28,7 @@ digraph iCFG { 246 -> 241 ; -245 [label="245: Skip GotoLabel_print \n NULLIFY(&q,false); [line 178]\n " color="gray"] +245 [label="245: Skip GotoLabel_print \n " color="gray"] 245 -> 244 ; @@ -87,7 +87,7 @@ digraph iCFG { 232 -> 233 ; -231 [label="231: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 173]\n REMOVE_TEMPS(n$2); [line 173]\n " shape="invhouse"] +231 [label="231: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 173]\n REMOVE_TEMPS(n$2); [line 173]\n NULLIFY(&i,false); [line 173]\n NULLIFY(&j,false); [line 173]\n NULLIFY(&k,false); [line 173]\n " shape="invhouse"] 231 -> 227 ; @@ -95,7 +95,7 @@ digraph iCFG { 230 -> 232 ; -229 [label="229: BinaryOperatorStmt: LT \n NULLIFY(&q,false); [line 173]\n n$2=*&i:int [line 173]\n " shape="box"] +229 [label="229: BinaryOperatorStmt: LT \n n$2=*&i:int [line 173]\n " shape="box"] 229 -> 230 ; @@ -104,7 +104,7 @@ digraph iCFG { 228 -> 229 ; -227 [label="227: Skip GotoLabel_out \n NULLIFY(&i,false); [line 185]\n NULLIFY(&j,false); [line 185]\n NULLIFY(&k,false); [line 185]\n " color="gray"] +227 [label="227: Skip GotoLabel_out \n " color="gray"] 227 -> 226 ; @@ -155,7 +155,7 @@ digraph iCFG { 215 -> 212 ; -214 [label="214: Prune (true branch) \n PRUNE(((n$5 >= 15) != 0), true); [line 152]\n REMOVE_TEMPS(n$5); [line 152]\n APPLY_ABSTRACTION; [line 152]\n " shape="invhouse"] +214 [label="214: Prune (true branch) \n PRUNE(((n$5 >= 15) != 0), true); [line 152]\n REMOVE_TEMPS(n$5); [line 152]\n NULLIFY(&i,false); [line 152]\n NULLIFY(&j,false); [line 152]\n NULLIFY(&k,false); [line 152]\n APPLY_ABSTRACTION; [line 152]\n " shape="invhouse"] 214 -> 199 ; @@ -202,7 +202,7 @@ digraph iCFG { 204 -> 205 ; -203 [label="203: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 148]\n REMOVE_TEMPS(n$2); [line 148]\n APPLY_ABSTRACTION; [line 148]\n " shape="invhouse"] +203 [label="203: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 148]\n REMOVE_TEMPS(n$2); [line 148]\n NULLIFY(&i,false); [line 148]\n NULLIFY(&j,false); [line 148]\n NULLIFY(&k,false); [line 148]\n APPLY_ABSTRACTION; [line 148]\n " shape="invhouse"] 203 -> 199 ; @@ -219,7 +219,7 @@ digraph iCFG { 200 -> 201 ; -199 [label="199: Skip GotoLabel_out \n NULLIFY(&i,false); [line 161]\n NULLIFY(&j,false); [line 161]\n NULLIFY(&k,false); [line 161]\n " color="gray"] +199 [label="199: Skip GotoLabel_out \n " color="gray"] 199 -> 198 ; @@ -254,11 +254,11 @@ digraph iCFG { 191 -> 184 ; -190 [label="190: Prune (false branch) \n n$8=*&SIL_temp_conditional___n$6:int [line 128]\n PRUNE((n$8 == 0), false); [line 128]\n REMOVE_TEMPS(n$8); [line 128]\n " shape="invhouse"] +190 [label="190: Prune (false branch) \n n$8=*&SIL_temp_conditional___n$6:int [line 128]\n PRUNE((n$8 == 0), false); [line 128]\n REMOVE_TEMPS(n$8); [line 128]\n NULLIFY(&SIL_temp_conditional___n$6,false); [line 128]\n " shape="invhouse"] 190 -> 182 ; -189 [label="189: Prune (true branch) \n n$8=*&SIL_temp_conditional___n$6:int [line 128]\n PRUNE((n$8 != 0), true); [line 128]\n REMOVE_TEMPS(n$8); [line 128]\n APPLY_ABSTRACTION; [line 128]\n " shape="invhouse"] +189 [label="189: Prune (true branch) \n n$8=*&SIL_temp_conditional___n$6:int [line 128]\n PRUNE((n$8 != 0), true); [line 128]\n REMOVE_TEMPS(n$8); [line 128]\n NULLIFY(&SIL_temp_conditional___n$6,false); [line 128]\n APPLY_ABSTRACTION; [line 128]\n " shape="invhouse"] 189 -> 164 ; @@ -292,11 +292,11 @@ digraph iCFG { 182 -> 175 ; -181 [label="181: Prune (false branch) \n n$5=*&SIL_temp_conditional___n$3:int [line 130]\n PRUNE((n$5 == 0), false); [line 130]\n REMOVE_TEMPS(n$5); [line 130]\n " shape="invhouse"] +181 [label="181: Prune (false branch) \n n$5=*&SIL_temp_conditional___n$3:int [line 130]\n PRUNE((n$5 == 0), false); [line 130]\n REMOVE_TEMPS(n$5); [line 130]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 130]\n " shape="invhouse"] 181 -> 173 ; -180 [label="180: Prune (true branch) \n n$5=*&SIL_temp_conditional___n$3:int [line 130]\n PRUNE((n$5 != 0), true); [line 130]\n REMOVE_TEMPS(n$5); [line 130]\n APPLY_ABSTRACTION; [line 130]\n " shape="invhouse"] +180 [label="180: Prune (true branch) \n n$5=*&SIL_temp_conditional___n$3:int [line 130]\n PRUNE((n$5 != 0), true); [line 130]\n REMOVE_TEMPS(n$5); [line 130]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 130]\n APPLY_ABSTRACTION; [line 130]\n " shape="invhouse"] 180 -> 162 ; @@ -316,7 +316,7 @@ digraph iCFG { 176 -> 178 ; -175 [label="175: Call _fun_getValue \n NULLIFY(&SIL_temp_conditional___n$6,false); [line 130]\n n$4=_fun_getValue() [line 130]\n " shape="box"] +175 [label="175: Call _fun_getValue \n n$4=_fun_getValue() [line 130]\n " shape="box"] 175 -> 176 ; @@ -342,7 +342,7 @@ digraph iCFG { 170 -> 172 ; -169 [label="169: BinaryOperatorStmt: GT \n NULLIFY(&SIL_temp_conditional___n$3,false); [line 132]\n n$2=_fun_getValue() [line 132]\n " shape="box"] +169 [label="169: BinaryOperatorStmt: GT \n n$2=_fun_getValue() [line 132]\n " shape="box"] 169 -> 170 ; @@ -363,7 +363,7 @@ digraph iCFG { 165 -> 161 ; -164 [label="164: Skip GotoLabel_exit_step \n NULLIFY(&SIL_temp_conditional___n$6,false); [line 141]\n " color="gray"] +164 [label="164: Skip GotoLabel_exit_step \n " color="gray"] 164 -> 163 ; @@ -371,7 +371,7 @@ digraph iCFG { 163 -> 162 ; -162 [label="162: Skip GotoLabel_stepA \n NULLIFY(&SIL_temp_conditional___n$3,false); [line 143]\n " color="gray"] +162 [label="162: Skip GotoLabel_stepA \n " color="gray"] 162 -> 167 ; @@ -386,11 +386,11 @@ digraph iCFG { 159 -> 152 ; -158 [label="158: Prune (false branch) \n n$8=*&SIL_temp_conditional___n$6:int [line 106]\n PRUNE((n$8 == 0), false); [line 106]\n REMOVE_TEMPS(n$8); [line 106]\n " shape="invhouse"] +158 [label="158: Prune (false branch) \n n$8=*&SIL_temp_conditional___n$6:int [line 106]\n PRUNE((n$8 == 0), false); [line 106]\n REMOVE_TEMPS(n$8); [line 106]\n NULLIFY(&SIL_temp_conditional___n$6,false); [line 106]\n " shape="invhouse"] 158 -> 150 ; -157 [label="157: Prune (true branch) \n n$8=*&SIL_temp_conditional___n$6:int [line 106]\n PRUNE((n$8 != 0), true); [line 106]\n REMOVE_TEMPS(n$8); [line 106]\n APPLY_ABSTRACTION; [line 106]\n " shape="invhouse"] +157 [label="157: Prune (true branch) \n n$8=*&SIL_temp_conditional___n$6:int [line 106]\n PRUNE((n$8 != 0), true); [line 106]\n REMOVE_TEMPS(n$8); [line 106]\n NULLIFY(&SIL_temp_conditional___n$6,false); [line 106]\n APPLY_ABSTRACTION; [line 106]\n " shape="invhouse"] 157 -> 132 ; @@ -424,11 +424,11 @@ digraph iCFG { 150 -> 143 ; -149 [label="149: Prune (false branch) \n n$5=*&SIL_temp_conditional___n$3:int [line 108]\n PRUNE((n$5 == 0), false); [line 108]\n REMOVE_TEMPS(n$5); [line 108]\n " shape="invhouse"] +149 [label="149: Prune (false branch) \n n$5=*&SIL_temp_conditional___n$3:int [line 108]\n PRUNE((n$5 == 0), false); [line 108]\n REMOVE_TEMPS(n$5); [line 108]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 108]\n " shape="invhouse"] 149 -> 141 ; -148 [label="148: Prune (true branch) \n n$5=*&SIL_temp_conditional___n$3:int [line 108]\n PRUNE((n$5 != 0), true); [line 108]\n REMOVE_TEMPS(n$5); [line 108]\n APPLY_ABSTRACTION; [line 108]\n " shape="invhouse"] +148 [label="148: Prune (true branch) \n n$5=*&SIL_temp_conditional___n$3:int [line 108]\n PRUNE((n$5 != 0), true); [line 108]\n REMOVE_TEMPS(n$5); [line 108]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 108]\n APPLY_ABSTRACTION; [line 108]\n " shape="invhouse"] 148 -> 130 ; @@ -448,7 +448,7 @@ digraph iCFG { 144 -> 146 ; -143 [label="143: Call _fun_getValue \n NULLIFY(&SIL_temp_conditional___n$6,false); [line 108]\n n$4=_fun_getValue() [line 108]\n " shape="box"] +143 [label="143: Call _fun_getValue \n n$4=_fun_getValue() [line 108]\n " shape="box"] 143 -> 144 ; @@ -474,7 +474,7 @@ digraph iCFG { 138 -> 140 ; -137 [label="137: BinaryOperatorStmt: GT \n NULLIFY(&SIL_temp_conditional___n$3,false); [line 110]\n n$2=_fun_getValue() [line 110]\n " shape="box"] +137 [label="137: BinaryOperatorStmt: GT \n n$2=_fun_getValue() [line 110]\n " shape="box"] 137 -> 138 ; @@ -495,7 +495,7 @@ digraph iCFG { 133 -> 129 ; -132 [label="132: Skip GotoLabel_exit_step \n NULLIFY(&SIL_temp_conditional___n$6,false); [line 119]\n " color="gray"] +132 [label="132: Skip GotoLabel_exit_step \n " color="gray"] 132 -> 131 ; @@ -503,7 +503,7 @@ digraph iCFG { 131 -> 130 ; -130 [label="130: Skip GotoLabel_stepA \n NULLIFY(&SIL_temp_conditional___n$3,false); [line 121]\n " color="gray"] +130 [label="130: Skip GotoLabel_stepA \n " color="gray"] 130 -> 135 ; @@ -518,11 +518,11 @@ digraph iCFG { 127 -> 120 ; -126 [label="126: Prune (false branch) \n n$9=*&SIL_temp_conditional___n$7:int [line 85]\n PRUNE((n$9 == 0), false); [line 85]\n REMOVE_TEMPS(n$9); [line 85]\n " shape="invhouse"] +126 [label="126: Prune (false branch) \n n$9=*&SIL_temp_conditional___n$7:int [line 85]\n PRUNE((n$9 == 0), false); [line 85]\n REMOVE_TEMPS(n$9); [line 85]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 85]\n " shape="invhouse"] 126 -> 118 ; -125 [label="125: Prune (true branch) \n n$9=*&SIL_temp_conditional___n$7:int [line 85]\n PRUNE((n$9 != 0), true); [line 85]\n REMOVE_TEMPS(n$9); [line 85]\n APPLY_ABSTRACTION; [line 85]\n " shape="invhouse"] +125 [label="125: Prune (true branch) \n n$9=*&SIL_temp_conditional___n$7:int [line 85]\n PRUNE((n$9 != 0), true); [line 85]\n REMOVE_TEMPS(n$9); [line 85]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 85]\n APPLY_ABSTRACTION; [line 85]\n " shape="invhouse"] 125 -> 99 ; @@ -556,11 +556,11 @@ digraph iCFG { 118 -> 111 ; -117 [label="117: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 87]\n PRUNE((n$6 == 0), false); [line 87]\n REMOVE_TEMPS(n$6); [line 87]\n " shape="invhouse"] +117 [label="117: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 87]\n PRUNE((n$6 == 0), false); [line 87]\n REMOVE_TEMPS(n$6); [line 87]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 87]\n " shape="invhouse"] 117 -> 109 ; -116 [label="116: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 87]\n PRUNE((n$6 != 0), true); [line 87]\n REMOVE_TEMPS(n$6); [line 87]\n APPLY_ABSTRACTION; [line 87]\n " shape="invhouse"] +116 [label="116: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 87]\n PRUNE((n$6 != 0), true); [line 87]\n REMOVE_TEMPS(n$6); [line 87]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 87]\n APPLY_ABSTRACTION; [line 87]\n " shape="invhouse"] 116 -> 102 ; @@ -580,7 +580,7 @@ digraph iCFG { 112 -> 114 ; -111 [label="111: Call _fun_getValue \n NULLIFY(&SIL_temp_conditional___n$7,false); [line 87]\n n$5=_fun_getValue() [line 87]\n " shape="box"] +111 [label="111: Call _fun_getValue \n n$5=_fun_getValue() [line 87]\n " shape="box"] 111 -> 112 ; @@ -606,7 +606,7 @@ digraph iCFG { 106 -> 108 ; -105 [label="105: BinaryOperatorStmt: GT \n NULLIFY(&SIL_temp_conditional___n$4,false); [line 89]\n n$3=_fun_getValue() [line 89]\n " shape="box"] +105 [label="105: BinaryOperatorStmt: GT \n n$3=_fun_getValue() [line 89]\n " shape="box"] 105 -> 106 ; @@ -619,7 +619,7 @@ digraph iCFG { 103 -> 102 ; -102 [label="102: Skip GotoLabel_stepA \n NULLIFY(&SIL_temp_conditional___n$4,false); [line 93]\n " color="gray"] +102 [label="102: Skip GotoLabel_stepA \n " color="gray"] 102 -> 101 ; @@ -631,7 +631,7 @@ digraph iCFG { 100 -> 99 ; -99 [label="99: Skip GotoLabel_exit_step \n NULLIFY(&SIL_temp_conditional___n$7,false); [line 97]\n " color="gray"] +99 [label="99: Skip GotoLabel_exit_step \n " color="gray"] 99 -> 98 ; @@ -654,11 +654,11 @@ digraph iCFG { 94 -> 87 ; -93 [label="93: Prune (false branch) \n n$9=*&SIL_temp_conditional___n$7:int [line 63]\n PRUNE((n$9 == 0), false); [line 63]\n REMOVE_TEMPS(n$9); [line 63]\n " shape="invhouse"] +93 [label="93: Prune (false branch) \n n$9=*&SIL_temp_conditional___n$7:int [line 63]\n PRUNE((n$9 == 0), false); [line 63]\n REMOVE_TEMPS(n$9); [line 63]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 63]\n " shape="invhouse"] 93 -> 85 ; -92 [label="92: Prune (true branch) \n n$9=*&SIL_temp_conditional___n$7:int [line 63]\n PRUNE((n$9 != 0), true); [line 63]\n REMOVE_TEMPS(n$9); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="invhouse"] +92 [label="92: Prune (true branch) \n n$9=*&SIL_temp_conditional___n$7:int [line 63]\n PRUNE((n$9 != 0), true); [line 63]\n REMOVE_TEMPS(n$9); [line 63]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="invhouse"] 92 -> 65 ; @@ -692,11 +692,11 @@ digraph iCFG { 85 -> 78 ; -84 [label="84: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 65]\n PRUNE((n$6 == 0), false); [line 65]\n REMOVE_TEMPS(n$6); [line 65]\n " shape="invhouse"] +84 [label="84: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 65]\n PRUNE((n$6 == 0), false); [line 65]\n REMOVE_TEMPS(n$6); [line 65]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 65]\n " shape="invhouse"] 84 -> 76 ; -83 [label="83: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 65]\n PRUNE((n$6 != 0), true); [line 65]\n REMOVE_TEMPS(n$6); [line 65]\n " shape="invhouse"] +83 [label="83: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 65]\n PRUNE((n$6 != 0), true); [line 65]\n REMOVE_TEMPS(n$6); [line 65]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 65]\n " shape="invhouse"] 83 -> 68 ; @@ -716,7 +716,7 @@ digraph iCFG { 79 -> 81 ; -78 [label="78: Call _fun_getValue \n NULLIFY(&SIL_temp_conditional___n$7,false); [line 65]\n n$5=_fun_getValue() [line 65]\n " shape="box"] +78 [label="78: Call _fun_getValue \n n$5=_fun_getValue() [line 65]\n " shape="box"] 78 -> 79 ; @@ -742,7 +742,7 @@ digraph iCFG { 73 -> 75 ; -72 [label="72: BinaryOperatorStmt: GT \n NULLIFY(&SIL_temp_conditional___n$4,false); [line 67]\n n$3=_fun_getValue() [line 67]\n " shape="box"] +72 [label="72: BinaryOperatorStmt: GT \n n$3=_fun_getValue() [line 67]\n " shape="box"] 72 -> 73 ; @@ -759,7 +759,7 @@ digraph iCFG { 69 -> 62 ; -68 [label="68: Skip GotoLabel_stepA \n NULLIFY(&SIL_temp_conditional___n$4,false); [line 72]\n " color="gray"] +68 [label="68: Skip GotoLabel_stepA \n " color="gray"] 68 -> 67 ; @@ -771,7 +771,7 @@ digraph iCFG { 66 -> 65 ; -65 [label="65: Skip GotoLabel_exit_step \n NULLIFY(&SIL_temp_conditional___n$7,false); [line 76]\n " color="gray"] +65 [label="65: Skip GotoLabel_exit_step \n " color="gray"] 65 -> 64 ; @@ -798,11 +798,11 @@ digraph iCFG { 59 -> 52 ; -58 [label="58: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 42]\n PRUNE((n$6 == 0), false); [line 42]\n REMOVE_TEMPS(n$6); [line 42]\n " shape="invhouse"] +58 [label="58: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 42]\n PRUNE((n$6 == 0), false); [line 42]\n REMOVE_TEMPS(n$6); [line 42]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 42]\n " shape="invhouse"] 58 -> 50 ; -57 [label="57: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 42]\n PRUNE((n$6 != 0), true); [line 42]\n REMOVE_TEMPS(n$6); [line 42]\n " shape="invhouse"] +57 [label="57: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 42]\n PRUNE((n$6 != 0), true); [line 42]\n REMOVE_TEMPS(n$6); [line 42]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 42]\n " shape="invhouse"] 57 -> 31 ; @@ -836,11 +836,11 @@ digraph iCFG { 50 -> 43 ; -49 [label="49: Prune (false branch) \n n$3=*&SIL_temp_conditional___n$1:int [line 44]\n PRUNE((n$3 == 0), false); [line 44]\n REMOVE_TEMPS(n$3); [line 44]\n " shape="invhouse"] +49 [label="49: Prune (false branch) \n n$3=*&SIL_temp_conditional___n$1:int [line 44]\n PRUNE((n$3 == 0), false); [line 44]\n REMOVE_TEMPS(n$3); [line 44]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 44]\n " shape="invhouse"] 49 -> 41 ; -48 [label="48: Prune (true branch) \n n$3=*&SIL_temp_conditional___n$1:int [line 44]\n PRUNE((n$3 != 0), true); [line 44]\n REMOVE_TEMPS(n$3); [line 44]\n " shape="invhouse"] +48 [label="48: Prune (true branch) \n n$3=*&SIL_temp_conditional___n$1:int [line 44]\n PRUNE((n$3 != 0), true); [line 44]\n REMOVE_TEMPS(n$3); [line 44]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 44]\n " shape="invhouse"] 48 -> 34 ; @@ -860,7 +860,7 @@ digraph iCFG { 44 -> 46 ; -43 [label="43: Call _fun_getValue \n NULLIFY(&SIL_temp_conditional___n$4,false); [line 44]\n n$2=_fun_getValue() [line 44]\n " shape="box"] +43 [label="43: Call _fun_getValue \n n$2=_fun_getValue() [line 44]\n " shape="box"] 43 -> 44 ; @@ -886,7 +886,7 @@ digraph iCFG { 38 -> 40 ; -37 [label="37: BinaryOperatorStmt: GT \n NULLIFY(&SIL_temp_conditional___n$1,false); [line 46]\n n$0=_fun_getValue() [line 46]\n " shape="box"] +37 [label="37: BinaryOperatorStmt: GT \n n$0=_fun_getValue() [line 46]\n " shape="box"] 37 -> 38 ; @@ -899,7 +899,7 @@ digraph iCFG { 35 -> 28 ; -34 [label="34: Skip GotoLabel_stepA \n NULLIFY(&SIL_temp_conditional___n$1,false); [line 50]\n " color="gray"] +34 [label="34: Skip GotoLabel_stepA \n " color="gray"] 34 -> 33 ; @@ -911,7 +911,7 @@ digraph iCFG { 32 -> 28 ; -31 [label="31: Skip GotoLabel_exit_step \n NULLIFY(&SIL_temp_conditional___n$4,false); [line 54]\n " color="gray"] +31 [label="31: Skip GotoLabel_exit_step \n " color="gray"] 31 -> 30 ; diff --git a/infer/tests/codetoanalyze/c/frontend/initialization/array_initlistexpr.c.dot b/infer/tests/codetoanalyze/c/frontend/initialization/array_initlistexpr.c.dot index d5fa26949..40c0ebb92 100644 --- a/infer/tests/codetoanalyze/c/frontend/initialization/array_initlistexpr.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/initialization/array_initlistexpr.c.dot @@ -1,5 +1,5 @@ digraph iCFG { -3 [label="3: DeclStmt \n n$0=*&z:int [line 12]\n *&a[0][0]:int =(n$0 + 1) [line 12]\n *&a[0][1]:int =2 [line 12]\n *&a[0][2]:int =3 [line 12]\n *&a[1][0]:int =5 [line 12]\n *&a[1][1]:int =6 [line 12]\n *&a[1][2]:int =7 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&z,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=*&z:int [line 12]\n *&a[0][0]:int =(n$0 + 1) [line 12]\n *&a[0][1]:int =2 [line 12]\n *&a[0][2]:int =3 [line 12]\n *&a[1][0]:int =5 [line 12]\n *&a[1][1]:int =6 [line 12]\n *&a[1][2]:int =7 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&a,false); [line 12]\n NULLIFY(&z,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/initialization/struct_initlistexpr.c.dot b/infer/tests/codetoanalyze/c/frontend/initialization/struct_initlistexpr.c.dot index 851a6357f..f03d48fdd 100644 --- a/infer/tests/codetoanalyze/c/frontend/initialization/struct_initlistexpr.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/initialization/struct_initlistexpr.c.dot @@ -44,7 +44,7 @@ digraph iCFG { 7 -> 10 ; -6 [label="6: DeclStmt \n n$0=_fun_foo() [line 17]\n *&p.x:int =1 [line 17]\n *&p.y:int =(n$0 + 3) [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +6 [label="6: DeclStmt \n n$0=_fun_foo() [line 17]\n *&p.x:int =1 [line 17]\n *&p.y:int =(n$0 + 3) [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&p,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 6 -> 5 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/do_while.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/do_while.c.dot index b48bce533..839ac99e2 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/do_while.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/do_while.c.dot @@ -11,7 +11,7 @@ digraph iCFG { 8 -> 5 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 < 20) == 0), false); [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 < 20) == 0), false); [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&b,false); [line 15]\n " shape="invhouse"] 7 -> 3 ; @@ -28,7 +28,7 @@ digraph iCFG { 4 -> 8 ; -3 [label="3: Return Stmt \n NULLIFY(&b,false); [line 17]\n *&return:int =0 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/do_while_nested.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/do_while_nested.c.dot index aa0d830a9..290a322c5 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/do_while_nested.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/do_while_nested.c.dot @@ -32,7 +32,7 @@ digraph iCFG { 8 -> 12 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 < 20) == 0), false); [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 < 20) == 0), false); [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&b,false); [line 18]\n " shape="invhouse"] 7 -> 3 ; @@ -49,7 +49,7 @@ digraph iCFG { 4 -> 13 ; -3 [label="3: Return Stmt \n NULLIFY(&b,false); [line 20]\n *&return:int =0 [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_condition_side_effects.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_condition_side_effects.c.dot index d1773ff83..8b4dddfce 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_condition_side_effects.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_condition_side_effects.c.dot @@ -11,7 +11,7 @@ digraph iCFG { 10 -> 6 ; -9 [label="9: Prune (false branch) \n PRUNE((n$1 == 0), false); [line 13]\n REMOVE_TEMPS(n$1); [line 13]\n " shape="invhouse"] +9 [label="9: Prune (false branch) \n PRUNE((n$1 == 0), false); [line 13]\n REMOVE_TEMPS(n$1); [line 13]\n NULLIFY(&i,false); [line 13]\n NULLIFY(&j,false); [line 13]\n " shape="invhouse"] 9 -> 3 ; @@ -36,7 +36,7 @@ digraph iCFG { 4 -> 7 ; -3 [label="3: Return Stmt \n NULLIFY(&i,false); [line 16]\n NULLIFY(&j,false); [line 16]\n *&return:int =0 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_nested.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_nested.c.dot index 053b8da1e..62befcb25 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_nested.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_nested.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 16 -> 12 ; -15 [label="15: Prune (false branch) \n PRUNE(((n$4 < 10) == 0), false); [line 13]\n REMOVE_TEMPS(n$4); [line 13]\n " shape="invhouse"] +15 [label="15: Prune (false branch) \n PRUNE(((n$4 < 10) == 0), false); [line 13]\n REMOVE_TEMPS(n$4); [line 13]\n NULLIFY(&j,false); [line 13]\n " shape="invhouse"] 15 -> 6 ; @@ -32,7 +32,7 @@ digraph iCFG { 10 -> 13 ; -9 [label="9: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n " shape="invhouse"] +9 [label="9: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n NULLIFY(&i,false); [line 12]\n " shape="invhouse"] 9 -> 3 ; @@ -45,7 +45,7 @@ digraph iCFG { 7 -> 8 ; 7 -> 9 ; -6 [label="6: UnaryOperator \n NULLIFY(&j,false); [line 12]\n n$1=*&i:int [line 12]\n *&i:int =(n$1 + 1) [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +6 [label="6: UnaryOperator \n n$1=*&i:int [line 12]\n *&i:int =(n$1 + 1) [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 6 -> 4 ; @@ -57,7 +57,7 @@ digraph iCFG { 4 -> 7 ; -3 [label="3: Return Stmt \n NULLIFY(&i,false); [line 17]\n n$0=*&k:int [line 17]\n *&return:int =n$0 [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&k,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&k:int [line 17]\n *&return:int =n$0 [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&k,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition.c.dot index 193147a26..76c0b2f62 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 9 -> 6 ; -8 [label="8: Prune (false branch) \n PRUNE((1 == 0), false); [line 12]\n " shape="invhouse"] +8 [label="8: Prune (false branch) \n PRUNE((1 == 0), false); [line 12]\n NULLIFY(&b,false); [line 12]\n NULLIFY(&j,false); [line 12]\n " shape="invhouse"] 8 -> 3 ; @@ -28,7 +28,7 @@ digraph iCFG { 4 -> 7 ; 4 -> 8 ; -3 [label="3: Return Stmt \n NULLIFY(&b,false); [line 15]\n NULLIFY(&j,false); [line 15]\n *&return:int =0 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition_incr.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition_incr.c.dot index 2722f86ac..c36529a9b 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition_incr.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition_incr.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 8 -> 4 ; -7 [label="7: Prune (false branch) \n PRUNE((1 == 0), false); [line 12]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE((1 == 0), false); [line 12]\n NULLIFY(&j,false); [line 12]\n " shape="invhouse"] 7 -> 3 ; @@ -24,7 +24,7 @@ digraph iCFG { 4 -> 6 ; 4 -> 7 ; -3 [label="3: Return Stmt \n NULLIFY(&j,false); [line 15]\n *&return:int =0 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_only_body.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_only_body.c.dot index 0a048a6bd..d09753321 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_only_body.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_only_body.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 7 -> 4 ; -6 [label="6: Prune (false branch) \n PRUNE((1 == 0), false); [line 14]\n " shape="invhouse"] +6 [label="6: Prune (false branch) \n PRUNE((1 == 0), false); [line 14]\n NULLIFY(&i,false); [line 14]\n " shape="invhouse"] 6 -> 3 ; @@ -20,7 +20,7 @@ digraph iCFG { 4 -> 5 ; 4 -> 6 ; -3 [label="3: Return Stmt \n NULLIFY(&i,false); [line 15]\n *&return:int =0 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_simple.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_simple.c.dot index a52f70e20..39a02b231 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_simple.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_simple.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 10 -> 6 ; -9 [label="9: Prune (false branch) \n PRUNE(((n$1 < 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n " shape="invhouse"] +9 [label="9: Prune (false branch) \n PRUNE(((n$1 < 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n NULLIFY(&i,false); [line 12]\n NULLIFY(&j,false); [line 12]\n " shape="invhouse"] 9 -> 3 ; @@ -32,7 +32,7 @@ digraph iCFG { 4 -> 7 ; -3 [label="3: Return Stmt \n NULLIFY(&i,false); [line 15]\n NULLIFY(&j,false); [line 15]\n *&return:int =0 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_while_nested.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_while_nested.c.dot index 5b9951125..6372ec1c8 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_while_nested.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_while_nested.c.dot @@ -24,7 +24,7 @@ digraph iCFG { 10 -> 11 ; -9 [label="9: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n " shape="invhouse"] +9 [label="9: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n NULLIFY(&i,false); [line 12]\n " shape="invhouse"] 9 -> 3 ; @@ -49,7 +49,7 @@ digraph iCFG { 4 -> 7 ; -3 [label="3: Return Stmt \n NULLIFY(&i,false); [line 17]\n n$0=*&k:int [line 17]\n *&return:int =n$0 [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&k,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&k:int [line 17]\n *&return:int =n$0 [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&k,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/while.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/while.c.dot index e486f8b8b..bf1271d5f 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/while.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/while.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 8 -> 4 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 <= 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 <= 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&i,false); [line 12]\n " shape="invhouse"] 7 -> 3 ; @@ -24,7 +24,7 @@ digraph iCFG { 4 -> 5 ; -3 [label="3: Return Stmt \n NULLIFY(&i,false); [line 15]\n *&return:int =0 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/while_condition_side_effects.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/while_condition_side_effects.c.dot index 49088489a..fe41435b8 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/while_condition_side_effects.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/while_condition_side_effects.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 8 -> 4 ; -7 [label="7: Prune (false branch) \n PRUNE((n$0 == 0), false); [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE((n$0 == 0), false); [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&i,false); [line 12]\n " shape="invhouse"] 7 -> 3 ; @@ -24,7 +24,7 @@ digraph iCFG { 4 -> 5 ; -3 [label="3: Return Stmt \n NULLIFY(&i,false); [line 15]\n *&return:int =0 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/while_nested.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/while_nested.c.dot index bac07d54a..033839c3d 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/while_nested.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/while_nested.c.dot @@ -32,7 +32,7 @@ digraph iCFG { 8 -> 4 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 <= 10) == 0), false); [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 <= 10) == 0), false); [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&i,false); [line 13]\n NULLIFY(&k,false); [line 13]\n " shape="invhouse"] 7 -> 3 ; @@ -49,7 +49,7 @@ digraph iCFG { 4 -> 5 ; -3 [label="3: Return Stmt \n NULLIFY(&i,false); [line 19]\n NULLIFY(&k,false); [line 19]\n *&return:int =0 [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/while_with_continue_and_break.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/while_with_continue_and_break.c.dot index 262775520..5311bca45 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/while_with_continue_and_break.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/while_with_continue_and_break.c.dot @@ -54,7 +54,7 @@ digraph iCFG { 7 -> 4 ; -6 [label="6: Prune (false branch) \n PRUNE((1 == 0), false); [line 12]\n " shape="invhouse"] +6 [label="6: Prune (false branch) \n PRUNE((1 == 0), false); [line 12]\n NULLIFY(&x,false); [line 12]\n " shape="invhouse"] 6 -> 3 ; @@ -67,7 +67,7 @@ digraph iCFG { 4 -> 5 ; 4 -> 6 ; -3 [label="3: Return Stmt \n NULLIFY(&x,false); [line 23]\n *&return:int =0 [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/switchstmt/switch.c.dot b/infer/tests/codetoanalyze/c/frontend/switchstmt/switch.c.dot index 22b5bdadc..53d5cbda6 100644 --- a/infer/tests/codetoanalyze/c/frontend/switchstmt/switch.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/switchstmt/switch.c.dot @@ -103,11 +103,11 @@ digraph iCFG { 170 -> 165 ; 170 -> 166 ; -169 [label="169: Prune (true branch) \n PRUNE(((n$3 == 0) != 0), true); [line 161]\n " shape="invhouse"] +169 [label="169: Prune (true branch) \n PRUNE(((n$3 == 0) != 0), true); [line 161]\n NULLIFY(&value,false); [line 161]\n " shape="invhouse"] 169 -> 168 ; -168 [label="168: Call _fun_printf \n NULLIFY(&value,false); [line 162]\n n$5=_fun_printf(\"(0)HELLO WORLD!\":char *) [line 162]\n REMOVE_TEMPS(n$5); [line 162]\n " shape="box"] +168 [label="168: Call _fun_printf \n n$5=_fun_printf(\"(0)HELLO WORLD!\":char *) [line 162]\n REMOVE_TEMPS(n$5); [line 162]\n " shape="box"] 168 -> 167 ; @@ -132,7 +132,7 @@ digraph iCFG { 163 -> 146 ; -162 [label="162: DeclStmt \n *&z:int =9 [line 169]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 169]\n NULLIFY(&a,false); [line 169]\n NULLIFY(&something,false); [line 169]\n NULLIFY(&z,false); [line 169]\n APPLY_ABSTRACTION; [line 169]\n " shape="box"] +162 [label="162: DeclStmt \n *&z:int =9 [line 169]\n APPLY_ABSTRACTION; [line 169]\n " shape="box"] 162 -> 150 ; @@ -187,7 +187,7 @@ digraph iCFG { 150 -> 146 ; -149 [label="149: Prune (false branch) \n PRUNE(((n$0 < 10) == 0), false); [line 159]\n REMOVE_TEMPS(n$0); [line 159]\n " shape="invhouse"] +149 [label="149: Prune (false branch) \n PRUNE(((n$0 < 10) == 0), false); [line 159]\n REMOVE_TEMPS(n$0); [line 159]\n NULLIFY(&value,false); [line 159]\n " shape="invhouse"] 149 -> 145 ; @@ -204,7 +204,7 @@ digraph iCFG { 146 -> 147 ; -145 [label="145: Return Stmt \n NULLIFY(&value,false); [line 176]\n *&return:int =0 [line 176]\n APPLY_ABSTRACTION; [line 176]\n " shape="box"] +145 [label="145: Return Stmt \n *&return:int =0 [line 176]\n APPLY_ABSTRACTION; [line 176]\n " shape="box"] 145 -> 144 ; @@ -249,7 +249,7 @@ digraph iCFG { 135 -> 128 ; -134 [label="134: DeclStmt \n *&z:int =9 [line 149]\n NULLIFY(&something,false); [line 149]\n NULLIFY(&value,false); [line 149]\n NULLIFY(&z,false); [line 149]\n APPLY_ABSTRACTION; [line 149]\n " shape="box"] +134 [label="134: DeclStmt \n *&z:int =9 [line 149]\n APPLY_ABSTRACTION; [line 149]\n " shape="box"] 134 -> 128 ; @@ -331,7 +331,7 @@ digraph iCFG { 115 -> 102 ; -114 [label="114: DeclStmt \n *&z:int =9 [line 129]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 129]\n NULLIFY(&something,false); [line 129]\n NULLIFY(&value,false); [line 129]\n NULLIFY(&z,false); [line 129]\n APPLY_ABSTRACTION; [line 129]\n " shape="box"] +114 [label="114: DeclStmt \n *&z:int =9 [line 129]\n APPLY_ABSTRACTION; [line 129]\n " shape="box"] 114 -> 102 ; @@ -397,7 +397,7 @@ digraph iCFG { 99 -> 88 ; -98 [label="98: DeclStmt \n *&x:int =1 [line 107]\n NULLIFY(&x,false); [line 107]\n " shape="box"] +98 [label="98: DeclStmt \n *&x:int =1 [line 107]\n " shape="box"] 98 -> 97 ; @@ -405,7 +405,7 @@ digraph iCFG { 97 -> 96 ; -96 [label="96: BinaryOperatorStmt: Assign \n n$3=*&value:int [line 109]\n *&x:int =(n$3 + 1) [line 109]\n REMOVE_TEMPS(n$3); [line 109]\n NULLIFY(&x,false); [line 109]\n APPLY_ABSTRACTION; [line 109]\n " shape="box"] +96 [label="96: BinaryOperatorStmt: Assign \n n$3=*&value:int [line 109]\n *&x:int =(n$3 + 1) [line 109]\n REMOVE_TEMPS(n$3); [line 109]\n APPLY_ABSTRACTION; [line 109]\n " shape="box"] 96 -> 88 ; @@ -426,7 +426,7 @@ digraph iCFG { 92 -> 94 ; 92 -> 95 ; -91 [label="91: Prune (false branch) \n PRUNE(((n$0 < 10) == 0), false); [line 105]\n REMOVE_TEMPS(n$0); [line 105]\n " shape="invhouse"] +91 [label="91: Prune (false branch) \n PRUNE(((n$0 < 10) == 0), false); [line 105]\n REMOVE_TEMPS(n$0); [line 105]\n NULLIFY(&value,false); [line 105]\n " shape="invhouse"] 91 -> 87 ; @@ -443,7 +443,7 @@ digraph iCFG { 88 -> 89 ; -87 [label="87: Return Stmt \n NULLIFY(&value,false); [line 116]\n *&return:int =0 [line 116]\n APPLY_ABSTRACTION; [line 116]\n " shape="box"] +87 [label="87: Return Stmt \n *&return:int =0 [line 116]\n APPLY_ABSTRACTION; [line 116]\n " shape="box"] 87 -> 86 ; @@ -458,7 +458,7 @@ digraph iCFG { 84 -> 66 ; -83 [label="83: DeclStmt \n *&x:int =1 [line 81]\n NULLIFY(&something,false); [line 81]\n NULLIFY(&x,false); [line 81]\n NULLIFY(&z,false); [line 81]\n " shape="box"] +83 [label="83: DeclStmt \n *&x:int =1 [line 81]\n " shape="box"] 83 -> 82 ; @@ -466,7 +466,7 @@ digraph iCFG { 82 -> 81 ; -81 [label="81: BinaryOperatorStmt: Assign \n n$3=*&value:int [line 83]\n *&x:int =(n$3 + 1) [line 83]\n REMOVE_TEMPS(n$3); [line 83]\n NULLIFY(&value,false); [line 83]\n NULLIFY(&x,false); [line 83]\n APPLY_ABSTRACTION; [line 83]\n " shape="box"] +81 [label="81: BinaryOperatorStmt: Assign \n n$3=*&value:int [line 83]\n *&x:int =(n$3 + 1) [line 83]\n REMOVE_TEMPS(n$3); [line 83]\n APPLY_ABSTRACTION; [line 83]\n " shape="box"] 81 -> 78 ; @@ -483,7 +483,7 @@ digraph iCFG { 78 -> 65 ; -77 [label="77: DeclStmt \n *&z:int =9 [line 87]\n NULLIFY(&something,false); [line 87]\n NULLIFY(&value,false); [line 87]\n NULLIFY(&x,false); [line 87]\n NULLIFY(&z,false); [line 87]\n APPLY_ABSTRACTION; [line 87]\n " shape="box"] +77 [label="77: DeclStmt \n *&z:int =9 [line 87]\n APPLY_ABSTRACTION; [line 87]\n " shape="box"] 77 -> 74 ; @@ -579,7 +579,7 @@ digraph iCFG { 55 -> 48 ; -54 [label="54: DeclStmt \n *&z:int =9 [line 70]\n NULLIFY(&something,false); [line 70]\n NULLIFY(&value,false); [line 70]\n NULLIFY(&z,false); [line 70]\n APPLY_ABSTRACTION; [line 70]\n " shape="box"] +54 [label="54: DeclStmt \n *&z:int =9 [line 70]\n APPLY_ABSTRACTION; [line 70]\n " shape="box"] 54 -> 48 ; @@ -620,7 +620,7 @@ digraph iCFG { 45 -> 27 ; -44 [label="44: DeclStmt \n *&x:int =1 [line 38]\n NULLIFY(&something,false); [line 38]\n NULLIFY(&x,false); [line 38]\n NULLIFY(&z,false); [line 38]\n " shape="box"] +44 [label="44: DeclStmt \n *&x:int =1 [line 38]\n " shape="box"] 44 -> 43 ; @@ -628,7 +628,7 @@ digraph iCFG { 43 -> 42 ; -42 [label="42: BinaryOperatorStmt: Assign \n n$3=*&value:int [line 40]\n *&x:int =(n$3 + 1) [line 40]\n REMOVE_TEMPS(n$3); [line 40]\n NULLIFY(&value,false); [line 40]\n NULLIFY(&x,false); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"] +42 [label="42: BinaryOperatorStmt: Assign \n n$3=*&value:int [line 40]\n *&x:int =(n$3 + 1) [line 40]\n REMOVE_TEMPS(n$3); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"] 42 -> 39 ; @@ -645,7 +645,7 @@ digraph iCFG { 39 -> 26 ; -38 [label="38: DeclStmt \n *&z:int =9 [line 44]\n NULLIFY(&something,false); [line 44]\n NULLIFY(&value,false); [line 44]\n NULLIFY(&x,false); [line 44]\n NULLIFY(&z,false); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] +38 [label="38: DeclStmt \n *&z:int =9 [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] 38 -> 35 ; @@ -711,7 +711,7 @@ digraph iCFG { 23 -> 4 ; -22 [label="22: DeclStmt \n *&x:int =1 [line 16]\n NULLIFY(&x,false); [line 16]\n " shape="box"] +22 [label="22: DeclStmt \n *&x:int =1 [line 16]\n " shape="box"] 22 -> 21 ; @@ -719,7 +719,7 @@ digraph iCFG { 21 -> 20 ; -20 [label="20: BinaryOperatorStmt: Assign \n n$6=*&value:int [line 18]\n *&x:int =(n$6 + 1) [line 18]\n REMOVE_TEMPS(n$6); [line 18]\n NULLIFY(&x,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +20 [label="20: BinaryOperatorStmt: Assign \n n$6=*&value:int [line 18]\n *&x:int =(n$6 + 1) [line 18]\n REMOVE_TEMPS(n$6); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 20 -> 17 ; @@ -774,7 +774,7 @@ digraph iCFG { 8 -> 4 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 < 10) == 0), false); [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 < 10) == 0), false); [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&value,false); [line 14]\n " shape="invhouse"] 7 -> 3 ; @@ -791,7 +791,7 @@ digraph iCFG { 4 -> 5 ; -3 [label="3: Return Stmt \n NULLIFY(&value,false); [line 32]\n *&return:int =0 [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/types/struct.c.dot b/infer/tests/codetoanalyze/c/frontend/types/struct.c.dot index a8aa39663..5155deaa6 100644 --- a/infer/tests/codetoanalyze/c/frontend/types/struct.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/types/struct.c.dot @@ -3,7 +3,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: BinaryOperatorStmt: Assign \n *&x.b:int =20 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n *&x.b:int =20 [line 18]\n NULLIFY(&x,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/unusual_stmts/asm.c.dot b/infer/tests/codetoanalyze/c/frontend/unusual_stmts/asm.c.dot index 21df99f3a..258fb60c7 100644 --- a/infer/tests/codetoanalyze/c/frontend/unusual_stmts/asm.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/unusual_stmts/asm.c.dot @@ -7,11 +7,11 @@ digraph iCFG { 8 -> 7 ; -7 [label="7: Return Stmt \n *&return:int =0 [line 28]\n NULLIFY(&dst,false); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] +7 [label="7: Return Stmt \n *&return:int =0 [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] 7 -> 6 ; -6 [label="6: Exit main \n " color=yellow style=filled] +6 [label="6: Exit main \n NULLIFY(&dst,false); [line 29]\n " color=yellow style=filled] 5 [label="5: Start main\nFormals: \nLocals: dst:int src:int \n DECLARE_LOCALS(&return,&dst,&src); [line 19]\n " color=yellow style=filled] @@ -22,11 +22,11 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n *&return:int =0 [line 16]\n NULLIFY(&h,false); [line 16]\n NULLIFY(&x,false); [line 16]\n NULLIFY(&y,false); [line 16]\n NULLIFY(&z,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 3 -> 2 ; -2 [label="2: Exit test \n " color=yellow style=filled] +2 [label="2: Exit test \n NULLIFY(&z,false); [line 17]\n NULLIFY(&y,false); [line 17]\n NULLIFY(&x,false); [line 17]\n NULLIFY(&h,false); [line 17]\n " color=yellow style=filled] 1 [label="1: Start test\nFormals: \nLocals: h:int z:int y:int x:int \n DECLARE_LOCALS(&return,&h,&z,&y,&x); [line 10]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp.dot index 04267dcbe..27762ec70 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp.dot @@ -3,7 +3,7 @@ digraph iCFG { 34 -> 28 ; -33 [label="33: DeclStmt \n n$7=*&SIL_temp_conditional___n$1:class X [line 27]\n *&SIL_materialize_temp__n$0:class X =n$7 [line 27]\n _fun_X_X(&x:class X *,&SIL_materialize_temp__n$0:class X &) [line 27]\n REMOVE_TEMPS(n$7); [line 27]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 27]\n NULLIFY(&SIL_materialize_temp__n$0,false); [line 27]\n NULLIFY(&SIL_materialize_temp__n$5,false); [line 27]\n NULLIFY(&__temp_return_n$3,false); [line 27]\n NULLIFY(&a,false); [line 27]\n NULLIFY(&x,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +33 [label="33: DeclStmt \n n$7=*&SIL_temp_conditional___n$1:class X [line 27]\n *&SIL_materialize_temp__n$0:class X =n$7 [line 27]\n _fun_X_X(&x:class X *,&SIL_materialize_temp__n$0:class X &) [line 27]\n REMOVE_TEMPS(n$7); [line 27]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] 33 -> 26 ; @@ -32,7 +32,7 @@ digraph iCFG { 27 -> 33 ; -26 [label="26: Exit conditional \n " color=yellow style=filled] +26 [label="26: Exit conditional \n NULLIFY(&x,false); [line 28]\n NULLIFY(&a,false); [line 28]\n NULLIFY(&__temp_return_n$3,false); [line 28]\n NULLIFY(&SIL_materialize_temp__n$5,false); [line 28]\n NULLIFY(&SIL_materialize_temp__n$0,false); [line 28]\n " color=yellow style=filled] 25 [label="25: Start conditional\nFormals: \nLocals: x:class X SIL_materialize_temp__n$0:class X SIL_temp_conditional___n$1:class X __temp_return_n$3:class X SIL_materialize_temp__n$5:class X a:class X \n DECLARE_LOCALS(&return,&x,&SIL_materialize_temp__n$0,&SIL_temp_conditional___n$1,&__temp_return_n$3,&SIL_materialize_temp__n$5,&a); [line 25]\n " color=yellow style=filled] @@ -43,7 +43,7 @@ digraph iCFG { 24 -> 22 ; -23 [label="23: DeclStmt \n n$5=*&SIL_temp_conditional___n$2:class X [line 22]\n *&SIL_materialize_temp__n$0:class X =n$5 [line 22]\n _fun_X_X(&x:class X *,&SIL_materialize_temp__n$0:class X &) [line 22]\n REMOVE_TEMPS(n$5); [line 22]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 22]\n NULLIFY(&SIL_materialize_temp__n$0,false); [line 22]\n NULLIFY(&SIL_materialize_temp__n$4,false); [line 22]\n NULLIFY(&a,false); [line 22]\n NULLIFY(&x,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +23 [label="23: DeclStmt \n n$5=*&SIL_temp_conditional___n$2:class X [line 22]\n *&SIL_materialize_temp__n$0:class X =n$5 [line 22]\n _fun_X_X(&x:class X *,&SIL_materialize_temp__n$0:class X &) [line 22]\n REMOVE_TEMPS(n$5); [line 22]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 23 -> 15 ; @@ -76,7 +76,7 @@ digraph iCFG { 16 -> 23 ; -15 [label="15: Exit binaryConditional \n " color=yellow style=filled] +15 [label="15: Exit binaryConditional \n NULLIFY(&x,false); [line 23]\n NULLIFY(&a,false); [line 23]\n NULLIFY(&SIL_materialize_temp__n$4,false); [line 23]\n NULLIFY(&SIL_materialize_temp__n$0,false); [line 23]\n " color=yellow style=filled] 14 [label="14: Start binaryConditional\nFormals: \nLocals: x:class X SIL_materialize_temp__n$0:class X SIL_temp_conditional___n$2:class X SIL_materialize_temp__n$4:class X a:class X \n DECLARE_LOCALS(&return,&x,&SIL_materialize_temp__n$0,&SIL_temp_conditional___n$2,&SIL_materialize_temp__n$4,&a); [line 20]\n " color=yellow style=filled] @@ -87,11 +87,11 @@ digraph iCFG { 13 -> 12 ; -12 [label="12: Return Stmt \n n$0=*&__return_param:class X * [line 16]\n _fun_X_X(n$0:class X *,&x:class X &) [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&__return_param,false); [line 16]\n NULLIFY(&x,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] +12 [label="12: Return Stmt \n n$0=*&__return_param:class X * [line 16]\n _fun_X_X(n$0:class X *,&x:class X &) [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&__return_param,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 12 -> 11 ; -11 [label="11: Exit getX \n " color=yellow style=filled] +11 [label="11: Exit getX \n NULLIFY(&x,false); [line 17]\n " color=yellow style=filled] 10 [label="10: Start getX\nFormals: __return_param:class X *\nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 14]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/conditional/lvalue_conditional.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/conditional/lvalue_conditional.cpp.dot index a39a90e69..9a271efc6 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/conditional/lvalue_conditional.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/conditional/lvalue_conditional.cpp.dot @@ -91,19 +91,19 @@ digraph iCFG { 41 -> 35 ; -40 [label="40: ConditinalStmt Branch \n NULLIFY(&a,false); [line 29]\n NULLIFY(&b,false); [line 29]\n *&SIL_temp_conditional___n$3:int =1 [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +40 [label="40: ConditinalStmt Branch \n *&SIL_temp_conditional___n$3:int =1 [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 40 -> 36 ; -39 [label="39: ConditinalStmt Branch \n NULLIFY(&a,false); [line 29]\n n$5=*&b:int [line 29]\n *&SIL_temp_conditional___n$3:int =n$5 [line 29]\n REMOVE_TEMPS(n$5); [line 29]\n NULLIFY(&b,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +39 [label="39: ConditinalStmt Branch \n n$5=*&b:int [line 29]\n *&SIL_temp_conditional___n$3:int =n$5 [line 29]\n REMOVE_TEMPS(n$5); [line 29]\n NULLIFY(&b,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 39 -> 36 ; -38 [label="38: Prune (false branch) \n n$4=*&a:int [line 29]\n PRUNE((n$4 == 0), false); [line 29]\n REMOVE_TEMPS(n$4); [line 29]\n " shape="invhouse"] +38 [label="38: Prune (false branch) \n n$4=*&a:int [line 29]\n PRUNE((n$4 == 0), false); [line 29]\n REMOVE_TEMPS(n$4); [line 29]\n NULLIFY(&a,false); [line 29]\n " shape="invhouse"] 38 -> 40 ; -37 [label="37: Prune (true branch) \n n$4=*&a:int [line 29]\n PRUNE((n$4 != 0), true); [line 29]\n REMOVE_TEMPS(n$4); [line 29]\n " shape="invhouse"] +37 [label="37: Prune (true branch) \n n$4=*&a:int [line 29]\n PRUNE((n$4 != 0), true); [line 29]\n REMOVE_TEMPS(n$4); [line 29]\n NULLIFY(&a,false); [line 29]\n " shape="invhouse"] 37 -> 39 ; @@ -111,11 +111,11 @@ digraph iCFG { 36 -> 41 ; -35 [label="35: Return Stmt \n n$0=*&r:int & [line 30]\n n$1=*n$0:int [line 30]\n *&return:int =(1 / n$1) [line 30]\n REMOVE_TEMPS(n$0,n$1); [line 30]\n NULLIFY(&r,false); [line 30]\n NULLIFY(&SIL_materialize_temp__n$2,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +35 [label="35: Return Stmt \n n$0=*&r:int & [line 30]\n n$1=*n$0:int [line 30]\n *&return:int =(1 / n$1) [line 30]\n REMOVE_TEMPS(n$0,n$1); [line 30]\n NULLIFY(&r,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 35 -> 34 ; -34 [label="34: Exit div_temp_lvalue \n " color=yellow style=filled] +34 [label="34: Exit div_temp_lvalue \n NULLIFY(&SIL_materialize_temp__n$2,false); [line 31]\n " color=yellow style=filled] 33 [label="33: Start div_temp_lvalue\nFormals: a:int b:int \nLocals: r:int & SIL_materialize_temp__n$2:int SIL_temp_conditional___n$3:int \n DECLARE_LOCALS(&return,&r,&SIL_materialize_temp__n$2,&SIL_temp_conditional___n$3); [line 28]\n " color=yellow style=filled] @@ -136,19 +136,19 @@ digraph iCFG { 30 -> 24 ; -29 [label="29: ConditinalStmt Branch \n NULLIFY(&a,false); [line 24]\n *&SIL_temp_conditional___n$1:int &=&v2 [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +29 [label="29: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int &=&v2 [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 29 -> 25 ; -28 [label="28: ConditinalStmt Branch \n NULLIFY(&a,false); [line 24]\n *&SIL_temp_conditional___n$1:int &=&v1 [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +28 [label="28: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int &=&v1 [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 28 -> 25 ; -27 [label="27: Prune (false branch) \n n$2=*&a:int [line 24]\n PRUNE((n$2 == 0), false); [line 24]\n REMOVE_TEMPS(n$2); [line 24]\n " shape="invhouse"] +27 [label="27: Prune (false branch) \n n$2=*&a:int [line 24]\n PRUNE((n$2 == 0), false); [line 24]\n REMOVE_TEMPS(n$2); [line 24]\n NULLIFY(&a,false); [line 24]\n " shape="invhouse"] 27 -> 29 ; -26 [label="26: Prune (true branch) \n n$2=*&a:int [line 24]\n PRUNE((n$2 != 0), true); [line 24]\n REMOVE_TEMPS(n$2); [line 24]\n " shape="invhouse"] +26 [label="26: Prune (true branch) \n n$2=*&a:int [line 24]\n PRUNE((n$2 != 0), true); [line 24]\n REMOVE_TEMPS(n$2); [line 24]\n NULLIFY(&a,false); [line 24]\n " shape="invhouse"] 26 -> 28 ; @@ -156,11 +156,11 @@ digraph iCFG { 25 -> 30 ; -24 [label="24: Return Stmt \n n$0=*&v1:int [line 25]\n *&return:int =n$0 [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&v1,false); [line 25]\n NULLIFY(&v2,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +24 [label="24: Return Stmt \n n$0=*&v1:int [line 25]\n *&return:int =n$0 [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 24 -> 23 ; -23 [label="23: Exit assign_conditional \n " color=yellow style=filled] +23 [label="23: Exit assign_conditional \n NULLIFY(&v2,false); [line 26]\n NULLIFY(&v1,false); [line 26]\n " color=yellow style=filled] 22 [label="22: Start assign_conditional\nFormals: a:int \nLocals: SIL_temp_conditional___n$1:int & v2:int v1:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$1,&v2,&v1); [line 22]\n " color=yellow style=filled] @@ -176,19 +176,19 @@ digraph iCFG { 20 -> 14 ; -19 [label="19: ConditinalStmt Branch \n NULLIFY(&a,false); [line 18]\n NULLIFY(&v1,false); [line 18]\n *&SIL_temp_conditional___n$1:int =1 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +19 [label="19: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =1 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 19 -> 15 ; -18 [label="18: ConditinalStmt Branch \n NULLIFY(&a,false); [line 18]\n n$3=*&v1:int [line 18]\n *&SIL_temp_conditional___n$1:int =n$3 [line 18]\n REMOVE_TEMPS(n$3); [line 18]\n NULLIFY(&v1,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +18 [label="18: ConditinalStmt Branch \n n$3=*&v1:int [line 18]\n *&SIL_temp_conditional___n$1:int =n$3 [line 18]\n REMOVE_TEMPS(n$3); [line 18]\n NULLIFY(&v1,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 18 -> 15 ; -17 [label="17: Prune (false branch) \n n$2=*&a:int [line 18]\n PRUNE((n$2 == 0), false); [line 18]\n REMOVE_TEMPS(n$2); [line 18]\n " shape="invhouse"] +17 [label="17: Prune (false branch) \n n$2=*&a:int [line 18]\n PRUNE((n$2 == 0), false); [line 18]\n REMOVE_TEMPS(n$2); [line 18]\n NULLIFY(&a,false); [line 18]\n NULLIFY(&v1,false); [line 18]\n " shape="invhouse"] 17 -> 19 ; -16 [label="16: Prune (true branch) \n n$2=*&a:int [line 18]\n PRUNE((n$2 != 0), true); [line 18]\n REMOVE_TEMPS(n$2); [line 18]\n " shape="invhouse"] +16 [label="16: Prune (true branch) \n n$2=*&a:int [line 18]\n PRUNE((n$2 != 0), true); [line 18]\n REMOVE_TEMPS(n$2); [line 18]\n NULLIFY(&a,false); [line 18]\n " shape="invhouse"] 16 -> 18 ; @@ -220,19 +220,19 @@ digraph iCFG { 9 -> 3 ; -8 [label="8: ConditinalStmt Branch \n NULLIFY(&a,false); [line 12]\n *&SIL_temp_conditional___n$1:int &=&v2 [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +8 [label="8: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int &=&v2 [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 8 -> 4 ; -7 [label="7: ConditinalStmt Branch \n NULLIFY(&a,false); [line 12]\n *&SIL_temp_conditional___n$1:int &=&v1 [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +7 [label="7: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int &=&v1 [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 7 -> 4 ; -6 [label="6: Prune (false branch) \n n$2=*&a:int [line 12]\n PRUNE((n$2 == 0), false); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n " shape="invhouse"] +6 [label="6: Prune (false branch) \n n$2=*&a:int [line 12]\n PRUNE((n$2 == 0), false); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n NULLIFY(&a,false); [line 12]\n " shape="invhouse"] 6 -> 8 ; -5 [label="5: Prune (true branch) \n n$2=*&a:int [line 12]\n PRUNE((n$2 != 0), true); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n " shape="invhouse"] +5 [label="5: Prune (true branch) \n n$2=*&a:int [line 12]\n PRUNE((n$2 != 0), true); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n NULLIFY(&a,false); [line 12]\n " shape="invhouse"] 5 -> 7 ; @@ -240,11 +240,11 @@ digraph iCFG { 4 -> 9 ; -3 [label="3: Return Stmt \n n$0=*&v3:int [line 13]\n *&return:int =n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&v3,false); [line 13]\n NULLIFY(&v1,false); [line 13]\n NULLIFY(&v2,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&v3:int [line 13]\n *&return:int =n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&v3,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 3 -> 2 ; -2 [label="2: Exit choose_lvalue \n " color=yellow style=filled] +2 [label="2: Exit choose_lvalue \n NULLIFY(&v2,false); [line 14]\n NULLIFY(&v1,false); [line 14]\n " color=yellow style=filled] 1 [label="1: Start choose_lvalue\nFormals: a:int \nLocals: v3:int SIL_temp_conditional___n$1:int & v2:int v1:int \n DECLARE_LOCALS(&return,&v3,&SIL_temp_conditional___n$1,&v2,&v1); [line 10]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_array.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_array.cpp.dot index 78a69f663..75ef67201 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_array.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_array.cpp.dot @@ -7,26 +7,26 @@ digraph iCFG { 30 -> 29 ; -29 [label="29: DeclStmt \n _fun_Z_Z(&z2:class Z *) [line 42]\n NULLIFY(&old,false); [line 42]\n NULLIFY(&z,false); [line 42]\n NULLIFY(&z2,false); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] +29 [label="29: DeclStmt \n _fun_Z_Z(&z2:class Z *) [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] 29 -> 28 ; -28 [label="28: Exit initialization_mixed_styles_not_handled_correctly \n " color=yellow style=filled] +28 [label="28: Exit initialization_mixed_styles_not_handled_correctly \n NULLIFY(&z2,false); [line 43]\n NULLIFY(&z,false); [line 43]\n NULLIFY(&old,false); [line 43]\n " color=yellow style=filled] 27 [label="27: Start initialization_mixed_styles_not_handled_correctly\nFormals: \nLocals: z2:class Z z:class Z [2] old:class Z \n DECLARE_LOCALS(&return,&z2,&z,&old); [line 39]\n " color=yellow style=filled] 27 -> 31 ; -26 [label="26: DeclStmt \n *&z[0].a:int =1 [line 33]\n *&z[0].b:int =2 [line 33]\n *&z[1].a:int =2 [line 33]\n *&z[1].b:int =3 [line 33]\n " shape="box"] +26 [label="26: DeclStmt \n *&z[0].a:int =1 [line 33]\n *&z[0].b:int =2 [line 33]\n *&z[1].a:int =2 [line 33]\n *&z[1].b:int =3 [line 33]\n NULLIFY(&z,false); [line 33]\n " shape="box"] 26 -> 25 ; -25 [label="25: DeclStmt \n _fun_Z_Z(&z2:class Z *) [line 34]\n NULLIFY(&z2,false); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] +25 [label="25: DeclStmt \n _fun_Z_Z(&z2:class Z *) [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] 25 -> 24 ; -24 [label="24: Exit initialization_c_style \n " color=yellow style=filled] +24 [label="24: Exit initialization_c_style \n NULLIFY(&z2,false); [line 35]\n " color=yellow style=filled] 23 [label="23: Start initialization_c_style\nFormals: \nLocals: z2:class Z z:class Z [2] \n DECLARE_LOCALS(&return,&z2,&z); [line 32]\n " color=yellow style=filled] @@ -59,11 +59,11 @@ digraph iCFG { 16 -> 15 ; -15 [label="15: Return Stmt \n n$0=*&arr[0][1].x:int [line 24]\n *&return:int =n$0 [line 24]\n REMOVE_TEMPS(n$0); [line 24]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 24]\n NULLIFY(&SIL_materialize_temp__n$2,false); [line 24]\n NULLIFY(&SIL_materialize_temp__n$3,false); [line 24]\n NULLIFY(&SIL_materialize_temp__n$4,false); [line 24]\n NULLIFY(&arr,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +15 [label="15: Return Stmt \n n$0=*&arr[0][1].x:int [line 24]\n *&return:int =n$0 [line 24]\n REMOVE_TEMPS(n$0); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 15 -> 14 ; -14 [label="14: Exit matrix_of_person \n " color=yellow style=filled] +14 [label="14: Exit matrix_of_person \n NULLIFY(&arr,false); [line 25]\n NULLIFY(&SIL_materialize_temp__n$4,false); [line 25]\n NULLIFY(&SIL_materialize_temp__n$3,false); [line 25]\n NULLIFY(&SIL_materialize_temp__n$2,false); [line 25]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 25]\n " color=yellow style=filled] 13 [label="13: Start matrix_of_person\nFormals: \nLocals: arr:class Person [2][2] SIL_materialize_temp__n$1:class Person SIL_materialize_temp__n$2:class Person SIL_materialize_temp__n$3:class Person SIL_materialize_temp__n$4:class Person \n DECLARE_LOCALS(&return,&arr,&SIL_materialize_temp__n$1,&SIL_materialize_temp__n$2,&SIL_materialize_temp__n$3,&SIL_materialize_temp__n$4); [line 22]\n " color=yellow style=filled] @@ -74,11 +74,11 @@ digraph iCFG { 12 -> 11 ; -11 [label="11: Return Stmt \n n$0=*&arr[0].x:int [line 19]\n *&return:int =n$0 [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 19]\n NULLIFY(&SIL_materialize_temp__n$2,false); [line 19]\n NULLIFY(&SIL_materialize_temp__n$3,false); [line 19]\n NULLIFY(&arr,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +11 [label="11: Return Stmt \n n$0=*&arr[0].x:int [line 19]\n *&return:int =n$0 [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 11 -> 10 ; -10 [label="10: Exit array_of_person \n " color=yellow style=filled] +10 [label="10: Exit array_of_person \n NULLIFY(&arr,false); [line 20]\n NULLIFY(&SIL_materialize_temp__n$3,false); [line 20]\n NULLIFY(&SIL_materialize_temp__n$2,false); [line 20]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 20]\n " color=yellow style=filled] 9 [label="9: Start array_of_person\nFormals: \nLocals: arr:class Person [10] SIL_materialize_temp__n$1:class Person SIL_materialize_temp__n$2:class Person SIL_materialize_temp__n$3:class Person \n DECLARE_LOCALS(&return,&arr,&SIL_materialize_temp__n$1,&SIL_materialize_temp__n$2,&SIL_materialize_temp__n$3); [line 17]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_default_arg.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_default_arg.cpp.dot index 2cd285cee..d501f18e8 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_default_arg.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_default_arg.cpp.dot @@ -7,11 +7,11 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: DeclStmt \n _fun_X_X(&x3:class X *,0:int ,1:int ) [line 23]\n NULLIFY(&x1,false); [line 23]\n NULLIFY(&x2,false); [line 23]\n NULLIFY(&x3,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +9 [label="9: DeclStmt \n _fun_X_X(&x3:class X *,0:int ,1:int ) [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 9 -> 8 ; -8 [label="8: Exit test \n " color=yellow style=filled] +8 [label="8: Exit test \n NULLIFY(&x3,false); [line 24]\n NULLIFY(&x2,false); [line 24]\n NULLIFY(&x1,false); [line 24]\n " color=yellow style=filled] 7 [label="7: Start test\nFormals: \nLocals: x3:class X x2:class X x1:class X \n DECLARE_LOCALS(&return,&x3,&x2,&x1); [line 20]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_init.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_init.cpp.dot index 299be9673..ecb996faf 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_init.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_init.cpp.dot @@ -15,11 +15,11 @@ digraph iCFG { 41 -> 40 ; -40 [label="40: Return Stmt \n n$0=*&v:int [line 59]\n n$1=*&v2:int [line 59]\n *&return:int =(n$0 + n$1) [line 59]\n REMOVE_TEMPS(n$0,n$1); [line 59]\n NULLIFY(&v,false); [line 59]\n NULLIFY(&v2,false); [line 59]\n NULLIFY(&b,false); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] +40 [label="40: Return Stmt \n n$0=*&v:int [line 59]\n n$1=*&v2:int [line 59]\n *&return:int =(n$0 + n$1) [line 59]\n REMOVE_TEMPS(n$0,n$1); [line 59]\n NULLIFY(&v,false); [line 59]\n NULLIFY(&v2,false); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] 40 -> 39 ; -39 [label="39: Exit f_f2_div1 \n " color=yellow style=filled] +39 [label="39: Exit f_f2_div1 \n NULLIFY(&b,false); [line 60]\n " color=yellow style=filled] 38 [label="38: Start f_f2_div1\nFormals: \nLocals: v3:int v2:int v:int b:class B \n DECLARE_LOCALS(&return,&v3,&v2,&v,&b); [line 54]\n " color=yellow style=filled] @@ -34,11 +34,11 @@ digraph iCFG { 36 -> 35 ; -35 [label="35: Return Stmt \n n$0=*&b.f2:int [line 51]\n *&return:int =(1 / n$0) [line 51]\n REMOVE_TEMPS(n$0); [line 51]\n NULLIFY(&b,false); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] +35 [label="35: Return Stmt \n n$0=*&b.f2:int [line 51]\n *&return:int =(1 / n$0) [line 51]\n REMOVE_TEMPS(n$0); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] 35 -> 34 ; -34 [label="34: Exit delegate_constr_f2_div0 \n " color=yellow style=filled] +34 [label="34: Exit delegate_constr_f2_div0 \n NULLIFY(&b,false); [line 52]\n " color=yellow style=filled] 33 [label="33: Start delegate_constr_f2_div0\nFormals: \nLocals: v:int b:class B \n DECLARE_LOCALS(&return,&v,&b); [line 48]\n " color=yellow style=filled] @@ -53,11 +53,11 @@ digraph iCFG { 31 -> 30 ; -30 [label="30: Return Stmt \n n$0=*&b.f:int [line 45]\n *&return:int =(1 / n$0) [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n NULLIFY(&b,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] +30 [label="30: Return Stmt \n n$0=*&b.f:int [line 45]\n *&return:int =(1 / n$0) [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] 30 -> 29 ; -29 [label="29: Exit delegate_constr_f_div0 \n " color=yellow style=filled] +29 [label="29: Exit delegate_constr_f_div0 \n NULLIFY(&b,false); [line 46]\n " color=yellow style=filled] 28 [label="28: Start delegate_constr_f_div0\nFormals: \nLocals: v:int b:class B \n DECLARE_LOCALS(&return,&v,&b); [line 42]\n " color=yellow style=filled] @@ -68,11 +68,11 @@ digraph iCFG { 27 -> 26 ; -26 [label="26: Return Stmt \n n$0=*&b.t.v:int [line 39]\n *&return:int =(1 / n$0) [line 39]\n REMOVE_TEMPS(n$0); [line 39]\n NULLIFY(&b,false); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="box"] +26 [label="26: Return Stmt \n n$0=*&b.t.v:int [line 39]\n *&return:int =(1 / n$0) [line 39]\n REMOVE_TEMPS(n$0); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="box"] 26 -> 25 ; -25 [label="25: Exit t_div0 \n " color=yellow style=filled] +25 [label="25: Exit t_div0 \n NULLIFY(&b,false); [line 40]\n " color=yellow style=filled] 24 [label="24: Start t_div0\nFormals: \nLocals: b:class B \n DECLARE_LOCALS(&return,&b); [line 37]\n " color=yellow style=filled] @@ -83,11 +83,11 @@ digraph iCFG { 23 -> 22 ; -22 [label="22: Return Stmt \n n$0=*&b.f:int [line 34]\n *&return:int =(1 / n$0) [line 34]\n REMOVE_TEMPS(n$0); [line 34]\n NULLIFY(&b,false); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] +22 [label="22: Return Stmt \n n$0=*&b.f:int [line 34]\n *&return:int =(1 / n$0) [line 34]\n REMOVE_TEMPS(n$0); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] 22 -> 21 ; -21 [label="21: Exit f_div0 \n " color=yellow style=filled] +21 [label="21: Exit f_div0 \n NULLIFY(&b,false); [line 35]\n " color=yellow style=filled] 20 [label="20: Start f_div0\nFormals: \nLocals: b:class B \n DECLARE_LOCALS(&return,&b); [line 32]\n " color=yellow style=filled] @@ -98,11 +98,11 @@ digraph iCFG { 19 -> 18 ; -18 [label="18: Return Stmt \n n$0=*&b.f2:int [line 29]\n *&return:int =(1 / n$0) [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&b,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +18 [label="18: Return Stmt \n n$0=*&b.f2:int [line 29]\n *&return:int =(1 / n$0) [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 18 -> 17 ; -17 [label="17: Exit f2_div0 \n " color=yellow style=filled] +17 [label="17: Exit f2_div0 \n NULLIFY(&b,false); [line 30]\n " color=yellow style=filled] 16 [label="16: Start f2_div0\nFormals: \nLocals: b:class B \n DECLARE_LOCALS(&return,&b); [line 27]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_new.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_new.cpp.dot index a3545b18b..cdbed0fc8 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_new.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_new.cpp.dot @@ -136,7 +136,7 @@ digraph iCFG { 63 -> 58 ; -62 [label="62: ConditinalStmt Branch \n NULLIFY(&z,false); [line 71]\n n$5=_fun_getValue(1:int ) [line 71]\n *&SIL_temp_conditional___n$3:int =n$5 [line 71]\n REMOVE_TEMPS(n$5); [line 71]\n APPLY_ABSTRACTION; [line 71]\n " shape="box"] +62 [label="62: ConditinalStmt Branch \n n$5=_fun_getValue(1:int ) [line 71]\n *&SIL_temp_conditional___n$3:int =n$5 [line 71]\n REMOVE_TEMPS(n$5); [line 71]\n APPLY_ABSTRACTION; [line 71]\n " shape="box"] 62 -> 58 ; @@ -144,7 +144,7 @@ digraph iCFG { 61 -> 63 ; -60 [label="60: Prune (true branch) \n PRUNE((n$4 != 0), true); [line 71]\n REMOVE_TEMPS(n$4); [line 71]\n " shape="invhouse"] +60 [label="60: Prune (true branch) \n PRUNE((n$4 != 0), true); [line 71]\n REMOVE_TEMPS(n$4); [line 71]\n NULLIFY(&z,false); [line 71]\n " shape="invhouse"] 60 -> 62 ; @@ -184,7 +184,7 @@ digraph iCFG { 51 -> 46 ; -50 [label="50: ConditinalStmt Branch \n NULLIFY(&y,false); [line 65]\n n$5=_fun_getValue(1:int ) [line 65]\n *&SIL_temp_conditional___n$3:int =n$5 [line 65]\n REMOVE_TEMPS(n$5); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"] +50 [label="50: ConditinalStmt Branch \n n$5=_fun_getValue(1:int ) [line 65]\n *&SIL_temp_conditional___n$3:int =n$5 [line 65]\n REMOVE_TEMPS(n$5); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"] 50 -> 46 ; @@ -192,7 +192,7 @@ digraph iCFG { 49 -> 51 ; -48 [label="48: Prune (true branch) \n PRUNE((n$4 != 0), true); [line 65]\n REMOVE_TEMPS(n$4); [line 65]\n " shape="invhouse"] +48 [label="48: Prune (true branch) \n PRUNE((n$4 != 0), true); [line 65]\n REMOVE_TEMPS(n$4); [line 65]\n NULLIFY(&y,false); [line 65]\n " shape="invhouse"] 48 -> 50 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_struct_init_list.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_struct_init_list.cpp.dot index 490a4d1e2..f0824b697 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_struct_init_list.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_struct_init_list.cpp.dot @@ -1,9 +1,9 @@ digraph iCFG { -6 [label="6: DeclStmt \n *&SIL_init_list__n$0.top:int =0 [line 17]\n *&SIL_init_list__n$0.left:int =0 [line 17]\n *&SIL_init_list__n$0.bottom:int =0 [line 17]\n *&SIL_init_list__n$0.right:int =0 [line 17]\n _fun_Person_Person(&p:class Person *,&SIL_init_list__n$0:class Insets ) [line 17]\n NULLIFY(&SIL_init_list__n$0,false); [line 17]\n NULLIFY(&p,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +6 [label="6: DeclStmt \n *&SIL_init_list__n$0.top:int =0 [line 17]\n *&SIL_init_list__n$0.left:int =0 [line 17]\n *&SIL_init_list__n$0.bottom:int =0 [line 17]\n *&SIL_init_list__n$0.right:int =0 [line 17]\n _fun_Person_Person(&p:class Person *,&SIL_init_list__n$0:class Insets ) [line 17]\n NULLIFY(&SIL_init_list__n$0,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 6 -> 5 ; -5 [label="5: Exit test \n " color=yellow style=filled] +5 [label="5: Exit test \n NULLIFY(&p,false); [line 17]\n " color=yellow style=filled] 4 [label="4: Start test\nFormals: \nLocals: p:class Person SIL_init_list__n$0:class Insets \n DECLARE_LOCALS(&return,&p,&SIL_init_list__n$0); [line 17]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_with_body.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_with_body.cpp.dot index 783942443..27b20822e 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_with_body.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_with_body.cpp.dot @@ -3,11 +3,11 @@ digraph iCFG { 26 -> 25 ; -25 [label="25: Call _fun_X_div \n n$0=*&x:class X [line 40]\n n$1=_fun_X_div(&x:class X &) [line 40]\n REMOVE_TEMPS(n$0,n$1); [line 40]\n NULLIFY(&x,false); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"] +25 [label="25: Call _fun_X_div \n n$0=*&x:class X [line 40]\n n$1=_fun_X_div(&x:class X &) [line 40]\n REMOVE_TEMPS(n$0,n$1); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"] 25 -> 24 ; -24 [label="24: Exit test_div1 \n " color=yellow style=filled] +24 [label="24: Exit test_div1 \n NULLIFY(&x,false); [line 41]\n " color=yellow style=filled] 23 [label="23: Start test_div1\nFormals: \nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 38]\n " color=yellow style=filled] @@ -18,11 +18,11 @@ digraph iCFG { 22 -> 21 ; -21 [label="21: Call _fun_X_div \n n$0=*&x:class X [line 35]\n n$1=_fun_X_div(&x:class X &) [line 35]\n REMOVE_TEMPS(n$0,n$1); [line 35]\n NULLIFY(&x,false); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] +21 [label="21: Call _fun_X_div \n n$0=*&x:class X [line 35]\n n$1=_fun_X_div(&x:class X &) [line 35]\n REMOVE_TEMPS(n$0,n$1); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] 21 -> 20 ; -20 [label="20: Exit test_div0_default_constructor \n " color=yellow style=filled] +20 [label="20: Exit test_div0_default_constructor \n NULLIFY(&x,false); [line 36]\n " color=yellow style=filled] 19 [label="19: Start test_div0_default_constructor\nFormals: \nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 33]\n " color=yellow style=filled] @@ -33,11 +33,11 @@ digraph iCFG { 18 -> 17 ; -17 [label="17: Call _fun_X_div \n n$0=*&x:class X [line 30]\n n$1=_fun_X_div(&x:class X &) [line 30]\n REMOVE_TEMPS(n$0,n$1); [line 30]\n NULLIFY(&x,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +17 [label="17: Call _fun_X_div \n n$0=*&x:class X [line 30]\n n$1=_fun_X_div(&x:class X &) [line 30]\n REMOVE_TEMPS(n$0,n$1); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 17 -> 16 ; -16 [label="16: Exit test_div0 \n " color=yellow style=filled] +16 [label="16: Exit test_div0 \n NULLIFY(&x,false); [line 31]\n " color=yellow style=filled] 15 [label="15: Start test_div0\nFormals: \nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 28]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/copy_move_constructor.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/copy_move_constructor.cpp.dot index fce60e384..3f8fbef8a 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/copy_move_constructor.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/copy_move_constructor.cpp.dot @@ -19,11 +19,11 @@ digraph iCFG { 61 -> 60 ; -60 [label="60: Return Stmt \n n$0=*&d1:int [line 78]\n n$1=*&d2:int [line 78]\n *&return:int =(n$0 + n$1) [line 78]\n REMOVE_TEMPS(n$0,n$1); [line 78]\n NULLIFY(&d1,false); [line 78]\n NULLIFY(&d2,false); [line 78]\n NULLIFY(&__temp_return_n$3,false); [line 78]\n NULLIFY(&y1,false); [line 78]\n NULLIFY(&y2,false); [line 78]\n APPLY_ABSTRACTION; [line 78]\n " shape="box"] +60 [label="60: Return Stmt \n n$0=*&d1:int [line 78]\n n$1=*&d2:int [line 78]\n *&return:int =(n$0 + n$1) [line 78]\n REMOVE_TEMPS(n$0,n$1); [line 78]\n NULLIFY(&d1,false); [line 78]\n NULLIFY(&d2,false); [line 78]\n APPLY_ABSTRACTION; [line 78]\n " shape="box"] 60 -> 59 ; -59 [label="59: Exit copyY_moveY_div1 \n " color=yellow style=filled] +59 [label="59: Exit copyY_moveY_div1 \n NULLIFY(&y2,false); [line 79]\n NULLIFY(&y1,false); [line 79]\n NULLIFY(&__temp_return_n$3,false); [line 79]\n " color=yellow style=filled] 58 [label="58: Start copyY_moveY_div1\nFormals: \nLocals: d2:int __temp_return_n$3:class Y d1:int y2:class Y y1:class Y \n DECLARE_LOCALS(&return,&d2,&__temp_return_n$3,&d1,&y2,&y1); [line 72]\n " color=yellow style=filled] @@ -50,11 +50,11 @@ digraph iCFG { 53 -> 52 ; -52 [label="52: Return Stmt \n n$0=*&d1:int [line 69]\n n$1=*&d2:int [line 69]\n *&return:int =(n$0 + n$1) [line 69]\n REMOVE_TEMPS(n$0,n$1); [line 69]\n NULLIFY(&d1,false); [line 69]\n NULLIFY(&d2,false); [line 69]\n NULLIFY(&__temp_return_n$3,false); [line 69]\n NULLIFY(&x1,false); [line 69]\n NULLIFY(&x2,false); [line 69]\n APPLY_ABSTRACTION; [line 69]\n " shape="box"] +52 [label="52: Return Stmt \n n$0=*&d1:int [line 69]\n n$1=*&d2:int [line 69]\n *&return:int =(n$0 + n$1) [line 69]\n REMOVE_TEMPS(n$0,n$1); [line 69]\n NULLIFY(&d1,false); [line 69]\n NULLIFY(&d2,false); [line 69]\n APPLY_ABSTRACTION; [line 69]\n " shape="box"] 52 -> 51 ; -51 [label="51: Exit copyX_moveX_div1 \n " color=yellow style=filled] +51 [label="51: Exit copyX_moveX_div1 \n NULLIFY(&x2,false); [line 70]\n NULLIFY(&x1,false); [line 70]\n NULLIFY(&__temp_return_n$3,false); [line 70]\n " color=yellow style=filled] 50 [label="50: Start copyX_moveX_div1\nFormals: \nLocals: d2:int __temp_return_n$3:class X d1:int x2:class X x1:class X \n DECLARE_LOCALS(&return,&d2,&__temp_return_n$3,&d1,&x2,&x1); [line 63]\n " color=yellow style=filled] @@ -69,22 +69,22 @@ digraph iCFG { 48 -> 47 ; -47 [label="47: Return Stmt \n n$0=*&y2.f:int [line 60]\n *&return:int =(1 / n$0) [line 60]\n REMOVE_TEMPS(n$0); [line 60]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 60]\n NULLIFY(&y1,false); [line 60]\n NULLIFY(&y2,false); [line 60]\n APPLY_ABSTRACTION; [line 60]\n " shape="box"] +47 [label="47: Return Stmt \n n$0=*&y2.f:int [line 60]\n *&return:int =(1 / n$0) [line 60]\n REMOVE_TEMPS(n$0); [line 60]\n APPLY_ABSTRACTION; [line 60]\n " shape="box"] 47 -> 46 ; -46 [label="46: Exit moveY_moveY_copyY_div0 \n " color=yellow style=filled] +46 [label="46: Exit moveY_moveY_copyY_div0 \n NULLIFY(&y2,false); [line 61]\n NULLIFY(&y1,false); [line 61]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 61]\n " color=yellow style=filled] 45 [label="45: Start moveY_moveY_copyY_div0\nFormals: \nLocals: y2:class Y y1:class Y SIL_materialize_temp__n$1:class Y \n DECLARE_LOCALS(&return,&y2,&y1,&SIL_materialize_temp__n$1); [line 57]\n " color=yellow style=filled] 45 -> 49 ; -44 [label="44: Return Stmt \n _fun_getY(1:int ,&__temp_return_n$1:class Y *) [line 55]\n n$2=*&__temp_return_n$1.f:int [line 55]\n *&return:int =(1 / n$2) [line 55]\n REMOVE_TEMPS(n$2); [line 55]\n NULLIFY(&__temp_return_n$1,false); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="box"] +44 [label="44: Return Stmt \n _fun_getY(1:int ,&__temp_return_n$1:class Y *) [line 55]\n n$2=*&__temp_return_n$1.f:int [line 55]\n *&return:int =(1 / n$2) [line 55]\n REMOVE_TEMPS(n$2); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="box"] 44 -> 43 ; -43 [label="43: Exit moveY_div0 \n " color=yellow style=filled] +43 [label="43: Exit moveY_div0 \n NULLIFY(&__temp_return_n$1,false); [line 55]\n " color=yellow style=filled] 42 [label="42: Start moveY_div0\nFormals: \nLocals: __temp_return_n$1:class Y \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 55]\n " color=yellow style=filled] @@ -103,22 +103,22 @@ digraph iCFG { 39 -> 38 ; -38 [label="38: Return Stmt \n n$0=*&y2.f:int [line 52]\n *&return:int =(1 / n$0) [line 52]\n REMOVE_TEMPS(n$0); [line 52]\n NULLIFY(&y1,false); [line 52]\n NULLIFY(&y2,false); [line 52]\n APPLY_ABSTRACTION; [line 52]\n " shape="box"] +38 [label="38: Return Stmt \n n$0=*&y2.f:int [line 52]\n *&return:int =(1 / n$0) [line 52]\n REMOVE_TEMPS(n$0); [line 52]\n APPLY_ABSTRACTION; [line 52]\n " shape="box"] 38 -> 37 ; -37 [label="37: Exit copyY_div0 \n " color=yellow style=filled] +37 [label="37: Exit copyY_div0 \n NULLIFY(&y2,false); [line 53]\n NULLIFY(&y1,false); [line 53]\n " color=yellow style=filled] 36 [label="36: Start copyY_div0\nFormals: \nLocals: y2:class Y y1:class Y \n DECLARE_LOCALS(&return,&y2,&y1); [line 48]\n " color=yellow style=filled] 36 -> 41 ; -35 [label="35: Return Stmt \n _fun_getX(0:int ,&__temp_return_n$1:class X *) [line 46]\n n$2=*&__temp_return_n$1.f:int [line 46]\n *&return:int =(1 / n$2) [line 46]\n REMOVE_TEMPS(n$2); [line 46]\n NULLIFY(&__temp_return_n$1,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] +35 [label="35: Return Stmt \n _fun_getX(0:int ,&__temp_return_n$1:class X *) [line 46]\n n$2=*&__temp_return_n$1.f:int [line 46]\n *&return:int =(1 / n$2) [line 46]\n REMOVE_TEMPS(n$2); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] 35 -> 34 ; -34 [label="34: Exit moveX_div0 \n " color=yellow style=filled] +34 [label="34: Exit moveX_div0 \n NULLIFY(&__temp_return_n$1,false); [line 46]\n " color=yellow style=filled] 33 [label="33: Start moveX_div0\nFormals: \nLocals: __temp_return_n$1:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 46]\n " color=yellow style=filled] @@ -137,11 +137,11 @@ digraph iCFG { 30 -> 29 ; -29 [label="29: Return Stmt \n n$0=*&x2.f:int [line 43]\n *&return:int =(1 / n$0) [line 43]\n REMOVE_TEMPS(n$0); [line 43]\n NULLIFY(&x1,false); [line 43]\n NULLIFY(&x2,false); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] +29 [label="29: Return Stmt \n n$0=*&x2.f:int [line 43]\n *&return:int =(1 / n$0) [line 43]\n REMOVE_TEMPS(n$0); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] 29 -> 28 ; -28 [label="28: Exit copyX_div0 \n " color=yellow style=filled] +28 [label="28: Exit copyX_div0 \n NULLIFY(&x2,false); [line 44]\n NULLIFY(&x1,false); [line 44]\n " color=yellow style=filled] 27 [label="27: Start copyX_div0\nFormals: \nLocals: x2:class X x1:class X \n DECLARE_LOCALS(&return,&x2,&x1); [line 39]\n " color=yellow style=filled] @@ -156,11 +156,11 @@ digraph iCFG { 25 -> 24 ; -24 [label="24: Return Stmt \n n$0=*&__return_param:class Y * [line 36]\n _fun_Y_Y(n$0:class Y *,&y:class Y &) [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n NULLIFY(&__return_param,false); [line 36]\n NULLIFY(&y,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +24 [label="24: Return Stmt \n n$0=*&__return_param:class Y * [line 36]\n _fun_Y_Y(n$0:class Y *,&y:class Y &) [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n NULLIFY(&__return_param,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 24 -> 23 ; -23 [label="23: Exit getY \n " color=yellow style=filled] +23 [label="23: Exit getY \n NULLIFY(&y,false); [line 37]\n " color=yellow style=filled] 22 [label="22: Start getY\nFormals: f:int __return_param:class Y *\nLocals: y:class Y \n DECLARE_LOCALS(&return,&y); [line 33]\n " color=yellow style=filled] @@ -175,11 +175,11 @@ digraph iCFG { 20 -> 19 ; -19 [label="19: Return Stmt \n n$0=*&__return_param:class X * [line 30]\n _fun_X_X(n$0:class X *,&x:class X &) [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n NULLIFY(&__return_param,false); [line 30]\n NULLIFY(&x,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +19 [label="19: Return Stmt \n n$0=*&__return_param:class X * [line 30]\n _fun_X_X(n$0:class X *,&x:class X &) [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n NULLIFY(&__return_param,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 19 -> 18 ; -18 [label="18: Exit getX \n " color=yellow style=filled] +18 [label="18: Exit getX \n NULLIFY(&x,false); [line 31]\n " color=yellow style=filled] 17 [label="17: Start getX\nFormals: f:int __return_param:class X *\nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 27]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/default_field_init.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/default_field_init.cpp.dot index 00c60a804..ea9e96510 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/default_field_init.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/default_field_init.cpp.dot @@ -1,9 +1,9 @@ digraph iCFG { -18 [label="18: DeclStmt \n _fun_Y_Y(&y:class Y *) [line 25]\n NULLIFY(&y,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +18 [label="18: DeclStmt \n _fun_Y_Y(&y:class Y *) [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 18 -> 17 ; -17 [label="17: Exit test \n " color=yellow style=filled] +17 [label="17: Exit test \n NULLIFY(&y,false); [line 25]\n " color=yellow style=filled] 16 [label="16: Start test\nFormals: \nLocals: y:class Y \n DECLARE_LOCALS(&return,&y); [line 25]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/std_init_list.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/std_init_list.cpp.dot index 5d94b1edb..a5ee4c0e5 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/std_init_list.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/std_init_list.cpp.dot @@ -1,16 +1,16 @@ digraph iCFG { -11 [label="11: DeclStmt \n *&SIL_materialize_temp__n$0[0]:int =1 [line 24]\n *&SIL_materialize_temp__n$0[1]:int =2 [line 24]\n *&SIL_materialize_temp__n$0[2]:int =3 [line 24]\n *&SIL_materialize_temp__n$0[3]:int =4 [line 24]\n *&SIL_materialize_temp__n$0[4]:int =5 [line 24]\n n$1=_fun___infer_skip_function(&SIL_materialize_temp__n$0:int [5]) [line 24]\n _fun_X_X(&x:class X *,n$1:class std::initializer_list ) [line 24]\n REMOVE_TEMPS(n$1); [line 24]\n NULLIFY(&SIL_materialize_temp__n$0,false); [line 24]\n NULLIFY(&x,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +11 [label="11: DeclStmt \n *&SIL_materialize_temp__n$0[0]:int =1 [line 24]\n *&SIL_materialize_temp__n$0[1]:int =2 [line 24]\n *&SIL_materialize_temp__n$0[2]:int =3 [line 24]\n *&SIL_materialize_temp__n$0[3]:int =4 [line 24]\n *&SIL_materialize_temp__n$0[4]:int =5 [line 24]\n n$1=_fun___infer_skip_function(&SIL_materialize_temp__n$0:int [5]) [line 24]\n _fun_X_X(&x:class X *,n$1:class std::initializer_list ) [line 24]\n REMOVE_TEMPS(n$1); [line 24]\n NULLIFY(&SIL_materialize_temp__n$0,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 11 -> 10 ; -10 [label="10: Exit main \n " color=yellow style=filled] +10 [label="10: Exit main \n NULLIFY(&x,false); [line 24]\n " color=yellow style=filled] 9 [label="9: Start main\nFormals: \nLocals: x:class X SIL_materialize_temp__n$0:int [5] \n DECLARE_LOCALS(&return,&x,&SIL_materialize_temp__n$0); [line 24]\n " color=yellow style=filled] 9 -> 11 ; -8 [label="8: Prune (false branch) \n PRUNE(((n$3 != n$5) == 0), false); [line 15]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 15]\n NULLIFY(&i,false); [line 15]\n NULLIFY(&list,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="invhouse"] +8 [label="8: Prune (false branch) \n PRUNE(((n$3 != n$5) == 0), false); [line 15]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 15]\n NULLIFY(&i,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="invhouse"] 8 -> 2 ; @@ -35,7 +35,7 @@ digraph iCFG { 3 -> 6 ; -2 [label="2: Exit X_X \n " color=yellow style=filled] +2 [label="2: Exit X_X \n NULLIFY(&list,false); [line 18]\n " color=yellow style=filled] 1 [label="1: Start X_X\nFormals: this:class X * list:class std::initializer_list \nLocals: i:int * \n DECLARE_LOCALS(&return,&i); [line 14]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/temp_object.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/temp_object.cpp.dot index 08058e77d..6167341f5 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/temp_object.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/temp_object.cpp.dot @@ -1,75 +1,75 @@ digraph iCFG { -43 [label="43: Return Stmt \n _fun_getX(1:int ,0:int ,&__temp_return_n$1:class X *) [line 43]\n n$2=*&__temp_return_n$1.f:int [line 43]\n n$3=_fun_div(n$2:int ) [line 43]\n *&return:int =n$3 [line 43]\n REMOVE_TEMPS(n$2,n$3); [line 43]\n NULLIFY(&__temp_return_n$1,false); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] +43 [label="43: Return Stmt \n _fun_getX(1:int ,0:int ,&__temp_return_n$1:class X *) [line 43]\n n$2=*&__temp_return_n$1.f:int [line 43]\n n$3=_fun_div(n$2:int ) [line 43]\n *&return:int =n$3 [line 43]\n REMOVE_TEMPS(n$2,n$3); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] 43 -> 42 ; -42 [label="42: Exit getX_field_div1 \n " color=yellow style=filled] +42 [label="42: Exit getX_field_div1 \n NULLIFY(&__temp_return_n$1,false); [line 43]\n " color=yellow style=filled] 41 [label="41: Start getX_field_div1\nFormals: \nLocals: __temp_return_n$1:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 43]\n " color=yellow style=filled] 41 -> 43 ; -40 [label="40: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,1:int ,0:int ) [line 41]\n n$1=*&__temp_construct_n$0.f:int [line 41]\n n$2=_fun_div(n$1:int ) [line 41]\n *&return:int =n$2 [line 41]\n REMOVE_TEMPS(n$1,n$2); [line 41]\n NULLIFY(&__temp_construct_n$0,false); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] +40 [label="40: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,1:int ,0:int ) [line 41]\n n$1=*&__temp_construct_n$0.f:int [line 41]\n n$2=_fun_div(n$1:int ) [line 41]\n *&return:int =n$2 [line 41]\n REMOVE_TEMPS(n$1,n$2); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] 40 -> 39 ; -39 [label="39: Exit temp_field_div1 \n " color=yellow style=filled] +39 [label="39: Exit temp_field_div1 \n NULLIFY(&__temp_construct_n$0,false); [line 41]\n " color=yellow style=filled] 38 [label="38: Start temp_field_div1\nFormals: \nLocals: __temp_construct_n$0:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$0); [line 41]\n " color=yellow style=filled] 38 -> 40 ; -37 [label="37: Return Stmt \n _fun_getX(0:int ,1:int ,&__temp_return_n$1:class X *) [line 39]\n n$2=_fun_X_div(&__temp_return_n$1:class X &) [line 39]\n *&return:int =n$2 [line 39]\n REMOVE_TEMPS(n$2); [line 39]\n NULLIFY(&__temp_return_n$1,false); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="box"] +37 [label="37: Return Stmt \n _fun_getX(0:int ,1:int ,&__temp_return_n$1:class X *) [line 39]\n n$2=_fun_X_div(&__temp_return_n$1:class X &) [line 39]\n *&return:int =n$2 [line 39]\n REMOVE_TEMPS(n$2); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="box"] 37 -> 36 ; -36 [label="36: Exit getX_method_div0 \n " color=yellow style=filled] +36 [label="36: Exit getX_method_div0 \n NULLIFY(&__temp_return_n$1,false); [line 39]\n " color=yellow style=filled] 35 [label="35: Start getX_method_div0\nFormals: \nLocals: __temp_return_n$1:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 39]\n " color=yellow style=filled] 35 -> 37 ; -34 [label="34: Return Stmt \n _fun_getX(0:int ,1:int ,&__temp_return_n$1:class X *) [line 37]\n n$2=*&__temp_return_n$1.f:int [line 37]\n n$3=_fun_div(n$2:int ) [line 37]\n *&return:int =n$3 [line 37]\n REMOVE_TEMPS(n$2,n$3); [line 37]\n NULLIFY(&__temp_return_n$1,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] +34 [label="34: Return Stmt \n _fun_getX(0:int ,1:int ,&__temp_return_n$1:class X *) [line 37]\n n$2=*&__temp_return_n$1.f:int [line 37]\n n$3=_fun_div(n$2:int ) [line 37]\n *&return:int =n$3 [line 37]\n REMOVE_TEMPS(n$2,n$3); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] 34 -> 33 ; -33 [label="33: Exit getX_field_div0 \n " color=yellow style=filled] +33 [label="33: Exit getX_field_div0 \n NULLIFY(&__temp_return_n$1,false); [line 37]\n " color=yellow style=filled] 32 [label="32: Start getX_field_div0\nFormals: \nLocals: __temp_return_n$1:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 37]\n " color=yellow style=filled] 32 -> 34 ; -31 [label="31: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,0:int ,1:int ) [line 35]\n n$1=_fun_X_div(&__temp_construct_n$0:class X &) [line 35]\n *&return:int =n$1 [line 35]\n REMOVE_TEMPS(n$1); [line 35]\n NULLIFY(&__temp_construct_n$0,false); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] +31 [label="31: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,0:int ,1:int ) [line 35]\n n$1=_fun_X_div(&__temp_construct_n$0:class X &) [line 35]\n *&return:int =n$1 [line 35]\n REMOVE_TEMPS(n$1); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] 31 -> 30 ; -30 [label="30: Exit temp_method_div0 \n " color=yellow style=filled] +30 [label="30: Exit temp_method_div0 \n NULLIFY(&__temp_construct_n$0,false); [line 35]\n " color=yellow style=filled] 29 [label="29: Start temp_method_div0\nFormals: \nLocals: __temp_construct_n$0:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$0); [line 35]\n " color=yellow style=filled] 29 -> 31 ; -28 [label="28: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,0:int ) [line 33]\n n$1=*&__temp_construct_n$0.f:int [line 33]\n n$2=_fun_div(n$1:int ) [line 33]\n *&return:int =n$2 [line 33]\n REMOVE_TEMPS(n$1,n$2); [line 33]\n NULLIFY(&__temp_construct_n$0,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] +28 [label="28: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,0:int ) [line 33]\n n$1=*&__temp_construct_n$0.f:int [line 33]\n n$2=_fun_div(n$1:int ) [line 33]\n *&return:int =n$2 [line 33]\n REMOVE_TEMPS(n$1,n$2); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] 28 -> 27 ; -27 [label="27: Exit temp_field2_div0 \n " color=yellow style=filled] +27 [label="27: Exit temp_field2_div0 \n NULLIFY(&__temp_construct_n$0,false); [line 33]\n " color=yellow style=filled] 26 [label="26: Start temp_field2_div0\nFormals: \nLocals: __temp_construct_n$0:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$0); [line 33]\n " color=yellow style=filled] 26 -> 28 ; -25 [label="25: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,0:int ,1:int ) [line 31]\n n$1=*&__temp_construct_n$0.f:int [line 31]\n n$2=_fun_div(n$1:int ) [line 31]\n *&return:int =n$2 [line 31]\n REMOVE_TEMPS(n$1,n$2); [line 31]\n NULLIFY(&__temp_construct_n$0,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +25 [label="25: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,0:int ,1:int ) [line 31]\n n$1=*&__temp_construct_n$0.f:int [line 31]\n n$2=_fun_div(n$1:int ) [line 31]\n *&return:int =n$2 [line 31]\n REMOVE_TEMPS(n$1,n$2); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] 25 -> 24 ; -24 [label="24: Exit temp_field_div0 \n " color=yellow style=filled] +24 [label="24: Exit temp_field_div0 \n NULLIFY(&__temp_construct_n$0,false); [line 31]\n " color=yellow style=filled] 23 [label="23: Start temp_field_div0\nFormals: \nLocals: __temp_construct_n$0:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$0); [line 31]\n " color=yellow style=filled] @@ -80,22 +80,22 @@ digraph iCFG { 22 -> 21 ; -21 [label="21: Return Stmt \n n$0=*&x:class X [line 28]\n n$1=_fun_X_div(&x:class X &) [line 28]\n *&return:int =n$1 [line 28]\n REMOVE_TEMPS(n$0,n$1); [line 28]\n NULLIFY(&SIL_materialize_temp__n$2,false); [line 28]\n NULLIFY(&x,false); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] +21 [label="21: Return Stmt \n n$0=*&x:class X [line 28]\n n$1=_fun_X_div(&x:class X &) [line 28]\n *&return:int =n$1 [line 28]\n REMOVE_TEMPS(n$0,n$1); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] 21 -> 20 ; -20 [label="20: Exit assign_temp_div0 \n " color=yellow style=filled] +20 [label="20: Exit assign_temp_div0 \n NULLIFY(&x,false); [line 29]\n NULLIFY(&SIL_materialize_temp__n$2,false); [line 29]\n " color=yellow style=filled] 19 [label="19: Start assign_temp_div0\nFormals: \nLocals: x:class X SIL_materialize_temp__n$2:class X \n DECLARE_LOCALS(&return,&x,&SIL_materialize_temp__n$2); [line 26]\n " color=yellow style=filled] 19 -> 22 ; -18 [label="18: Return Stmt \n n$0=*&__return_param:class X * [line 24]\n n$2=*&a:int [line 24]\n n$3=*&b:int [line 24]\n _fun_X_X(&SIL_materialize_temp__n$1:class X *,n$2:int ,n$3:int ) [line 24]\n _fun_X_X(n$0:class X *,&SIL_materialize_temp__n$1:class X &) [line 24]\n REMOVE_TEMPS(n$0,n$2,n$3); [line 24]\n NULLIFY(&__return_param,false); [line 24]\n NULLIFY(&a,false); [line 24]\n NULLIFY(&b,false); [line 24]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +18 [label="18: Return Stmt \n n$0=*&__return_param:class X * [line 24]\n n$2=*&a:int [line 24]\n n$3=*&b:int [line 24]\n _fun_X_X(&SIL_materialize_temp__n$1:class X *,n$2:int ,n$3:int ) [line 24]\n _fun_X_X(n$0:class X *,&SIL_materialize_temp__n$1:class X &) [line 24]\n REMOVE_TEMPS(n$0,n$2,n$3); [line 24]\n NULLIFY(&__return_param,false); [line 24]\n NULLIFY(&a,false); [line 24]\n NULLIFY(&b,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 18 -> 17 ; -17 [label="17: Exit getX \n " color=yellow style=filled] +17 [label="17: Exit getX \n NULLIFY(&SIL_materialize_temp__n$1,false); [line 24]\n " color=yellow style=filled] 16 [label="16: Start getX\nFormals: a:int b:int __return_param:class X *\nLocals: SIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&SIL_materialize_temp__n$1); [line 24]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/destructors/pseudo_destructor_expr.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/destructors/pseudo_destructor_expr.cpp.dot index ca8408df8..cf8839149 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/destructors/pseudo_destructor_expr.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/destructors/pseudo_destructor_expr.cpp.dot @@ -3,11 +3,11 @@ digraph iCFG { 13 -> 12 ; -12 [label="12: Call _fun_destroy \n n$0=_fun_destroy(&t:int **) [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&t,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +12 [label="12: Call _fun_destroy \n n$0=_fun_destroy(&t:int **) [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 12 -> 11 ; -11 [label="11: Exit test \n " color=yellow style=filled] +11 [label="11: Exit test \n NULLIFY(&t,false); [line 26]\n " color=yellow style=filled] 10 [label="10: Start test\nFormals: \nLocals: t:int * \n DECLARE_LOCALS(&return,&t); [line 23]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/exceptions/Exceptions.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/exceptions/Exceptions.cpp.dot index b651d2350..e5837352b 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/exceptions/Exceptions.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/exceptions/Exceptions.cpp.dot @@ -32,7 +32,7 @@ digraph iCFG { 9 -> 11 ; -8 [label="8: Return Stmt \n NULLIFY(&p,false); [line 12]\n *&return:int =\"Null pointer!\" [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +8 [label="8: Return Stmt \n *&return:int =\"Null pointer!\" [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 8 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/include_header/include_templ.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/include_header/include_templ.cpp.dot index eaeac4691..850117313 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/include_header/include_templ.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/include_header/include_templ.cpp.dot @@ -25,11 +25,11 @@ digraph iCFG { 30 -> 29 ; -29 [label="29: Call _fun_B_div0 \n n$0=*&b:class B [line 20]\n n$1=_fun_B_div0(&b:class B &) [line 20]\n REMOVE_TEMPS(n$0,n$1); [line 20]\n NULLIFY(&b,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] +29 [label="29: Call _fun_B_div0 \n n$0=*&b:class B [line 20]\n n$1=_fun_B_div0(&b:class B &) [line 20]\n REMOVE_TEMPS(n$0,n$1); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] 29 -> 28 ; -28 [label="28: Exit div0_B_A \n " color=yellow style=filled] +28 [label="28: Exit div0_B_A \n NULLIFY(&b,false); [line 21]\n " color=yellow style=filled] 27 [label="27: Start div0_B_A\nFormals: \nLocals: b:class B \n DECLARE_LOCALS(&return,&b); [line 18]\n " color=yellow style=filled] @@ -40,11 +40,11 @@ digraph iCFG { 26 -> 25 ; -25 [label="25: Call _fun_B_div0 \n n$0=*&b:class B [line 15]\n n$1=_fun_B_div0(&b:class B &) [line 15]\n REMOVE_TEMPS(n$0,n$1); [line 15]\n NULLIFY(&b,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +25 [label="25: Call _fun_B_div0 \n n$0=*&b:class B [line 15]\n n$1=_fun_B_div0(&b:class B &) [line 15]\n REMOVE_TEMPS(n$0,n$1); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 25 -> 24 ; -24 [label="24: Exit div0_B_int \n " color=yellow style=filled] +24 [label="24: Exit div0_B_int \n NULLIFY(&b,false); [line 16]\n " color=yellow style=filled] 23 [label="23: Start div0_B_int\nFormals: \nLocals: b:class B \n DECLARE_LOCALS(&return,&b); [line 13]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot index 25d2f1fc7..787dd5e2b 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot @@ -15,7 +15,7 @@ digraph iCFG { 40 -> 36 ; -39 [label="39: Prune (false branch) \n PRUNE((n$12 == 0), false); [line 37]\n REMOVE_TEMPS(n$12); [line 37]\n NULLIFY(&SIL_materialize_temp__n$0,false); [line 37]\n NULLIFY(&SIL_materialize_temp__n$4,false); [line 37]\n NULLIFY(&__begin,false); [line 37]\n NULLIFY(&__end,false); [line 37]\n NULLIFY(&__temp_construct_n$10,false); [line 37]\n NULLIFY(&__temp_construct_n$11,false); [line 37]\n NULLIFY(&__temp_return_n$9,false); [line 37]\n NULLIFY(&vector,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="invhouse"] +39 [label="39: Prune (false branch) \n PRUNE((n$12 == 0), false); [line 37]\n REMOVE_TEMPS(n$12); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="invhouse"] 39 -> 32 ; @@ -44,7 +44,7 @@ digraph iCFG { 33 -> 37 ; -32 [label="32: Exit test \n " color=yellow style=filled] +32 [label="32: Exit test \n NULLIFY(&vector,false); [line 40]\n NULLIFY(&__temp_return_n$9,false); [line 40]\n NULLIFY(&__temp_construct_n$11,false); [line 40]\n NULLIFY(&__temp_construct_n$10,false); [line 40]\n NULLIFY(&__end,false); [line 40]\n NULLIFY(&__begin,false); [line 40]\n NULLIFY(&SIL_materialize_temp__n$4,false); [line 40]\n NULLIFY(&SIL_materialize_temp__n$0,false); [line 40]\n " color=yellow style=filled] 31 [label="31: Start test\nFormals: \nLocals: __end:class iterator SIL_materialize_temp__n$0:class iterator __begin:class iterator SIL_materialize_temp__n$4:class iterator __temp_return_n$9:class iterator __temp_construct_n$10:class iterator __temp_construct_n$11:class iterator temp:int value:int __range:class vec & vector:class vec \n DECLARE_LOCALS(&return,&__end,&SIL_materialize_temp__n$0,&__begin,&SIL_materialize_temp__n$4,&__temp_return_n$9,&__temp_construct_n$10,&__temp_construct_n$11,&temp,&value,&__range,&vector); [line 35]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/conversion_operator.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/methods/conversion_operator.cpp.dot index 5c250156a..b6bfa50a4 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/methods/conversion_operator.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/methods/conversion_operator.cpp.dot @@ -7,7 +7,7 @@ digraph iCFG { 60 -> 59 ; -59 [label="59: Return Stmt \n n$4=*&v:int [line 65]\n *&return:int =(1 / n$4) [line 65]\n REMOVE_TEMPS(n$4); [line 65]\n NULLIFY(&v,false); [line 65]\n NULLIFY(&x,false); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"] +59 [label="59: Return Stmt \n n$4=*&v:int [line 65]\n *&return:int =(1 / n$4) [line 65]\n REMOVE_TEMPS(n$4); [line 65]\n NULLIFY(&v,false); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"] 59 -> 53 ; @@ -28,11 +28,11 @@ digraph iCFG { 55 -> 54 ; -54 [label="54: Return Stmt \n n$0=*&x:class X [line 67]\n n$1=_fun_X_operator int(&x:class X &) [line 67]\n *&return:int =n$1 [line 67]\n REMOVE_TEMPS(n$0,n$1); [line 67]\n NULLIFY(&x,false); [line 67]\n APPLY_ABSTRACTION; [line 67]\n " shape="box"] +54 [label="54: Return Stmt \n n$0=*&x:class X [line 67]\n n$1=_fun_X_operator int(&x:class X &) [line 67]\n *&return:int =n$1 [line 67]\n REMOVE_TEMPS(n$0,n$1); [line 67]\n APPLY_ABSTRACTION; [line 67]\n " shape="box"] 54 -> 53 ; -53 [label="53: Exit branch_div1 \n " color=yellow style=filled] +53 [label="53: Exit branch_div1 \n NULLIFY(&x,false); [line 68]\n " color=yellow style=filled] 52 [label="52: Start branch_div1\nFormals: \nLocals: v:int x:class X \n DECLARE_LOCALS(&return,&v,&x); [line 61]\n " color=yellow style=filled] @@ -47,7 +47,7 @@ digraph iCFG { 50 -> 49 ; -49 [label="49: Return Stmt \n n$4=*&v:int [line 56]\n *&return:int =(1 / n$4) [line 56]\n REMOVE_TEMPS(n$4); [line 56]\n NULLIFY(&v,false); [line 56]\n NULLIFY(&x,false); [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"] +49 [label="49: Return Stmt \n n$4=*&v:int [line 56]\n *&return:int =(1 / n$4) [line 56]\n REMOVE_TEMPS(n$4); [line 56]\n NULLIFY(&v,false); [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"] 49 -> 43 ; @@ -68,11 +68,11 @@ digraph iCFG { 45 -> 44 ; -44 [label="44: Return Stmt \n n$0=*&x:class X [line 58]\n n$1=_fun_X_operator int(&x:class X &) [line 58]\n *&return:int =n$1 [line 58]\n REMOVE_TEMPS(n$0,n$1); [line 58]\n NULLIFY(&x,false); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] +44 [label="44: Return Stmt \n n$0=*&x:class X [line 58]\n n$1=_fun_X_operator int(&x:class X &) [line 58]\n *&return:int =n$1 [line 58]\n REMOVE_TEMPS(n$0,n$1); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] 44 -> 43 ; -43 [label="43: Exit branch_no_div \n " color=yellow style=filled] +43 [label="43: Exit branch_no_div \n NULLIFY(&x,false); [line 59]\n " color=yellow style=filled] 42 [label="42: Start branch_no_div\nFormals: \nLocals: v:int x:class X \n DECLARE_LOCALS(&return,&v,&x); [line 52]\n " color=yellow style=filled] @@ -95,7 +95,7 @@ digraph iCFG { 38 -> 37 ; -37 [label="37: Return Stmt \n n$10=*&v:int [line 47]\n *&return:int =(1 / n$10) [line 47]\n REMOVE_TEMPS(n$10); [line 47]\n NULLIFY(&v,false); [line 47]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 47]\n NULLIFY(&SIL_materialize_temp__n$12,false); [line 47]\n NULLIFY(&SIL_materialize_temp__n$6,false); [line 47]\n NULLIFY(&__temp_construct_n$0,false); [line 47]\n NULLIFY(&__temp_construct_n$11,false); [line 47]\n NULLIFY(&__temp_construct_n$5,false); [line 47]\n NULLIFY(&y,false); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"] +37 [label="37: Return Stmt \n n$10=*&v:int [line 47]\n *&return:int =(1 / n$10) [line 47]\n REMOVE_TEMPS(n$10); [line 47]\n NULLIFY(&v,false); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"] 37 -> 31 ; @@ -116,11 +116,11 @@ digraph iCFG { 33 -> 32 ; -32 [label="32: Return Stmt \n n$2=*&y:class Y [line 49]\n _fun_Y_operator X(&y:class Y &,&SIL_materialize_temp__n$1:class X *) [line 49]\n _fun_X_X(&__temp_construct_n$0:class X *,&SIL_materialize_temp__n$1:class X &) [line 49]\n n$4=_fun_X_operator int(&__temp_construct_n$0:class X &) [line 49]\n *&return:int =n$4 [line 49]\n REMOVE_TEMPS(n$2,n$4); [line 49]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 49]\n NULLIFY(&SIL_materialize_temp__n$12,false); [line 49]\n NULLIFY(&SIL_materialize_temp__n$6,false); [line 49]\n NULLIFY(&__temp_construct_n$0,false); [line 49]\n NULLIFY(&__temp_construct_n$11,false); [line 49]\n NULLIFY(&__temp_construct_n$5,false); [line 49]\n NULLIFY(&y,false); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="box"] +32 [label="32: Return Stmt \n n$2=*&y:class Y [line 49]\n _fun_Y_operator X(&y:class Y &,&SIL_materialize_temp__n$1:class X *) [line 49]\n _fun_X_X(&__temp_construct_n$0:class X *,&SIL_materialize_temp__n$1:class X &) [line 49]\n n$4=_fun_X_operator int(&__temp_construct_n$0:class X &) [line 49]\n *&return:int =n$4 [line 49]\n REMOVE_TEMPS(n$2,n$4); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="box"] 32 -> 31 ; -31 [label="31: Exit y_branch_div0 \n " color=yellow style=filled] +31 [label="31: Exit y_branch_div0 \n NULLIFY(&y,false); [line 50]\n NULLIFY(&__temp_construct_n$5,false); [line 50]\n NULLIFY(&__temp_construct_n$11,false); [line 50]\n NULLIFY(&__temp_construct_n$0,false); [line 50]\n NULLIFY(&SIL_materialize_temp__n$6,false); [line 50]\n NULLIFY(&SIL_materialize_temp__n$12,false); [line 50]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 50]\n " color=yellow style=filled] 30 [label="30: Start y_branch_div0\nFormals: \nLocals: __temp_construct_n$0:class X SIL_materialize_temp__n$1:class X __temp_construct_n$5:class X SIL_materialize_temp__n$6:class X v:int __temp_construct_n$11:class X SIL_materialize_temp__n$12:class X y:class Y \n DECLARE_LOCALS(&return,&__temp_construct_n$0,&SIL_materialize_temp__n$1,&__temp_construct_n$5,&SIL_materialize_temp__n$6,&v,&__temp_construct_n$11,&SIL_materialize_temp__n$12,&y); [line 41]\n " color=yellow style=filled] @@ -135,7 +135,7 @@ digraph iCFG { 28 -> 27 ; -27 [label="27: Return Stmt \n n$4=*&v:int [line 36]\n *&return:int =(1 / n$4) [line 36]\n REMOVE_TEMPS(n$4); [line 36]\n NULLIFY(&v,false); [line 36]\n NULLIFY(&x,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +27 [label="27: Return Stmt \n n$4=*&v:int [line 36]\n *&return:int =(1 / n$4) [line 36]\n REMOVE_TEMPS(n$4); [line 36]\n NULLIFY(&v,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 27 -> 21 ; @@ -156,11 +156,11 @@ digraph iCFG { 23 -> 22 ; -22 [label="22: Return Stmt \n n$0=*&x:class X [line 38]\n n$1=_fun_X_operator int(&x:class X &) [line 38]\n *&return:int =n$1 [line 38]\n REMOVE_TEMPS(n$0,n$1); [line 38]\n NULLIFY(&x,false); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] +22 [label="22: Return Stmt \n n$0=*&x:class X [line 38]\n n$1=_fun_X_operator int(&x:class X &) [line 38]\n *&return:int =n$1 [line 38]\n REMOVE_TEMPS(n$0,n$1); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] 22 -> 21 ; -21 [label="21: Exit branch_div0 \n " color=yellow style=filled] +21 [label="21: Exit branch_div0 \n NULLIFY(&x,false); [line 39]\n " color=yellow style=filled] 20 [label="20: Start branch_div0\nFormals: \nLocals: v:int x:class X \n DECLARE_LOCALS(&return,&v,&x); [line 32]\n " color=yellow style=filled] @@ -174,11 +174,11 @@ digraph iCFG { 18 -> 19 ; -17 [label="17: Return Stmt \n n$0=*&__return_param:class X * [line 27]\n n$2=*&this:class Y * [line 27]\n n$3=*n$2.f:int [line 27]\n n$4=*&this:class Y * [line 27]\n n$5=*n$4.b:int [line 27]\n _fun_X_X(&SIL_materialize_temp__n$1:class X *,n$3:int ,n$5:_Bool ) [line 27]\n _fun_X_X(n$0:class X *,&SIL_materialize_temp__n$1:class X &) [line 27]\n REMOVE_TEMPS(n$0,n$2,n$3,n$4,n$5); [line 27]\n NULLIFY(&__return_param,false); [line 27]\n NULLIFY(&this,false); [line 27]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +17 [label="17: Return Stmt \n n$0=*&__return_param:class X * [line 27]\n n$2=*&this:class Y * [line 27]\n n$3=*n$2.f:int [line 27]\n n$4=*&this:class Y * [line 27]\n n$5=*n$4.b:int [line 27]\n _fun_X_X(&SIL_materialize_temp__n$1:class X *,n$3:int ,n$5:_Bool ) [line 27]\n _fun_X_X(n$0:class X *,&SIL_materialize_temp__n$1:class X &) [line 27]\n REMOVE_TEMPS(n$0,n$2,n$3,n$4,n$5); [line 27]\n NULLIFY(&__return_param,false); [line 27]\n NULLIFY(&this,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] 17 -> 16 ; -16 [label="16: Exit Y_operator X \n " color=yellow style=filled] +16 [label="16: Exit Y_operator X \n NULLIFY(&SIL_materialize_temp__n$1,false); [line 27]\n " color=yellow style=filled] 15 [label="15: Start Y_operator X\nFormals: this:class Y * __return_param:class X *\nLocals: SIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&SIL_materialize_temp__n$1); [line 27]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/return_struct.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/methods/return_struct.cpp.dot index 1e6a67838..57d5adf8d 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/methods/return_struct.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/methods/return_struct.cpp.dot @@ -3,11 +3,11 @@ digraph iCFG { 13 -> 12 ; -12 [label="12: Return Stmt \n n$0=*&x.f:int [line 23]\n *&return:int =(1 / n$0) [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 23]\n NULLIFY(&x,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +12 [label="12: Return Stmt \n n$0=*&x.f:int [line 23]\n *&return:int =(1 / n$0) [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 12 -> 11 ; -11 [label="11: Exit test \n " color=yellow style=filled] +11 [label="11: Exit test \n NULLIFY(&x,false); [line 24]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 24]\n " color=yellow style=filled] 10 [label="10: Start test\nFormals: a:class A *\nLocals: x:class X SIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&x,&SIL_materialize_temp__n$1); [line 21]\n " color=yellow style=filled] @@ -18,11 +18,11 @@ digraph iCFG { 9 -> 8 ; -8 [label="8: Return Stmt \n n$0=*&__return_param:class X * [line 17]\n _fun_X_X(n$0:class X *,&x:class X &) [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&__return_param,false); [line 17]\n NULLIFY(&x,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +8 [label="8: Return Stmt \n n$0=*&__return_param:class X * [line 17]\n _fun_X_X(n$0:class X *,&x:class X &) [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&__return_param,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 8 -> 7 ; -7 [label="7: Exit A_get \n " color=yellow style=filled] +7 [label="7: Exit A_get \n NULLIFY(&x,false); [line 18]\n " color=yellow style=filled] 6 [label="6: Start A_get\nFormals: this:class A * p:int __return_param:class X *\nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 15]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/virtual_methods.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/methods/virtual_methods.cpp.dot index 6dcd4d8b4..8bc267187 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/methods/virtual_methods.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/methods/virtual_methods.cpp.dot @@ -30,11 +30,11 @@ digraph iCFG { 46 -> 45 ; -45 [label="45: Return Stmt \n n$0=*&ppoly2:class Polygon * [line 64]\n n$1=*n$0:class Polygon [line 64]\n n$2=_fun_Polygon_area(n$0:class Polygon *) [line 64]\n *&return:int =(1 / n$2) [line 64]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 64]\n NULLIFY(&ppoly2,false); [line 64]\n NULLIFY(&poly,false); [line 64]\n NULLIFY(&trgl,false); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="box"] +45 [label="45: Return Stmt \n n$0=*&ppoly2:class Polygon * [line 64]\n n$1=*n$0:class Polygon [line 64]\n n$2=_fun_Polygon_area(n$0:class Polygon *) [line 64]\n *&return:int =(1 / n$2) [line 64]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 64]\n NULLIFY(&ppoly2,false); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="box"] 45 -> 44 ; -44 [label="44: Exit tri_not_virtual_area \n " color=yellow style=filled] +44 [label="44: Exit tri_not_virtual_area \n NULLIFY(&trgl,false); [line 65]\n NULLIFY(&poly,false); [line 65]\n " color=yellow style=filled] 43 [label="43: Start tri_not_virtual_area\nFormals: \nLocals: ppoly2:class Polygon * poly:class Polygon trgl:class Triangle \n DECLARE_LOCALS(&return,&ppoly2,&poly,&trgl); [line 59]\n " color=yellow style=filled] @@ -49,11 +49,11 @@ digraph iCFG { 41 -> 40 ; -40 [label="40: Return Stmt \n n$0=*&ppoly3:class Polygon * [line 56]\n n$1=*n$0:class Polygon [line 56]\n n$2=_fun_Polygon_area(n$0:class Polygon *) virtual [line 56]\n *&return:int =(1 / n$2) [line 56]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 56]\n NULLIFY(&ppoly3,false); [line 56]\n NULLIFY(&poly,false); [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"] +40 [label="40: Return Stmt \n n$0=*&ppoly3:class Polygon * [line 56]\n n$1=*n$0:class Polygon [line 56]\n n$2=_fun_Polygon_area(n$0:class Polygon *) virtual [line 56]\n *&return:int =(1 / n$2) [line 56]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 56]\n NULLIFY(&ppoly3,false); [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"] 40 -> 39 ; -39 [label="39: Exit poly_area \n " color=yellow style=filled] +39 [label="39: Exit poly_area \n NULLIFY(&poly,false); [line 57]\n " color=yellow style=filled] 38 [label="38: Start poly_area\nFormals: \nLocals: ppoly3:class Polygon * poly:class Polygon \n DECLARE_LOCALS(&return,&ppoly3,&poly); [line 53]\n " color=yellow style=filled] @@ -76,11 +76,11 @@ digraph iCFG { 34 -> 33 ; -33 [label="33: Return Stmt \n n$0=*&ppoly2:class Polygon * [line 50]\n n$1=*n$0:class Polygon [line 50]\n n$2=_fun_Polygon_area(n$0:class Polygon *) virtual [line 50]\n *&return:int =(1 / (n$2 - 10)) [line 50]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 50]\n NULLIFY(&ppoly2,false); [line 50]\n NULLIFY(&poly,false); [line 50]\n NULLIFY(&trgl,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] +33 [label="33: Return Stmt \n n$0=*&ppoly2:class Polygon * [line 50]\n n$1=*n$0:class Polygon [line 50]\n n$2=_fun_Polygon_area(n$0:class Polygon *) virtual [line 50]\n *&return:int =(1 / (n$2 - 10)) [line 50]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 50]\n NULLIFY(&ppoly2,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] 33 -> 32 ; -32 [label="32: Exit tri_area \n " color=yellow style=filled] +32 [label="32: Exit tri_area \n NULLIFY(&trgl,false); [line 51]\n NULLIFY(&poly,false); [line 51]\n " color=yellow style=filled] 31 [label="31: Start tri_area\nFormals: \nLocals: ppoly2:class Polygon * poly:class Polygon trgl:class Triangle \n DECLARE_LOCALS(&return,&ppoly2,&poly,&trgl); [line 45]\n " color=yellow style=filled] @@ -99,11 +99,11 @@ digraph iCFG { 28 -> 27 ; -27 [label="27: Return Stmt \n n$0=*&ppoly1:class Polygon * [line 42]\n n$1=*n$0:class Polygon [line 42]\n n$2=_fun_Polygon_area(n$0:class Polygon *) virtual [line 42]\n *&return:int =(1 / (n$2 - 20)) [line 42]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 42]\n NULLIFY(&ppoly1,false); [line 42]\n NULLIFY(&rect,false); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] +27 [label="27: Return Stmt \n n$0=*&ppoly1:class Polygon * [line 42]\n n$1=*n$0:class Polygon [line 42]\n n$2=_fun_Polygon_area(n$0:class Polygon *) virtual [line 42]\n *&return:int =(1 / (n$2 - 20)) [line 42]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 42]\n NULLIFY(&ppoly1,false); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] 27 -> 26 ; -26 [label="26: Exit rect_area \n " color=yellow style=filled] +26 [label="26: Exit rect_area \n NULLIFY(&rect,false); [line 43]\n " color=yellow style=filled] 25 [label="25: Start rect_area\nFormals: \nLocals: ppoly1:class Polygon * rect:class Rectangle \n DECLARE_LOCALS(&return,&ppoly1,&rect); [line 38]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/namespace/namespace.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/namespace/namespace.cpp.dot index b9a0f9c86..f0ecc1e7e 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/namespace/namespace.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/namespace/namespace.cpp.dot @@ -35,11 +35,11 @@ digraph iCFG { 16 -> 15 ; -15 [label="15: Return Stmt \n *&return:int =0 [line 58]\n NULLIFY(&rect1,false); [line 58]\n NULLIFY(&rect2,false); [line 58]\n NULLIFY(&x,false); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] +15 [label="15: Return Stmt \n *&return:int =0 [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] 15 -> 14 ; -14 [label="14: Exit main \n " color=yellow style=filled] +14 [label="14: Exit main \n NULLIFY(&x,false); [line 59]\n NULLIFY(&rect2,false); [line 59]\n NULLIFY(&rect1,false); [line 59]\n " color=yellow style=filled] 13 [label="13: Start main\nFormals: \nLocals: rect2:class foo::Rectangle rect1:class bar::Rectangle x:class foo::my_record j:double i:int \n DECLARE_LOCALS(&return,&rect2,&rect1,&x,&j,&i); [line 41]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_if.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_if.cpp.dot index 40a9ea81f..1490d886b 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_if.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_if.cpp.dot @@ -3,7 +3,7 @@ digraph iCFG { 73 -> 66 ; -72 [label="72: Return Stmt \n NULLIFY(&p,false); [line 58]\n *&return:int =1 [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] +72 [label="72: Return Stmt \n *&return:int =1 [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] 72 -> 66 ; @@ -16,11 +16,11 @@ digraph iCFG { 70 -> 73 ; -69 [label="69: Prune (true branch) \n n$0=*&p:int * [line 57]\n PRUNE((n$0 != 0), true); [line 57]\n REMOVE_TEMPS(n$0); [line 57]\n " shape="invhouse"] +69 [label="69: Prune (true branch) \n n$0=*&p:int * [line 57]\n PRUNE((n$0 != 0), true); [line 57]\n REMOVE_TEMPS(n$0); [line 57]\n NULLIFY(&p,false); [line 57]\n " shape="invhouse"] 69 -> 72 ; -68 [label="68: between_join_and_exit \n NULLIFY(&p,false); [line 57]\n APPLY_ABSTRACTION; [line 57]\n " shape="box"] +68 [label="68: between_join_and_exit \n APPLY_ABSTRACTION; [line 57]\n " shape="box"] 68 -> 66 ; @@ -48,7 +48,7 @@ digraph iCFG { 62 -> 60 ; 62 -> 61 ; -61 [label="61: Prune (false branch) \n n$1=*&a:int & [line 50]\n n$2=*n$1:int [line 50]\n PRUNE((n$2 == 0), false); [line 50]\n REMOVE_TEMPS(n$1,n$2); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="invhouse"] +61 [label="61: Prune (false branch) \n n$1=*&a:int & [line 50]\n n$2=*n$1:int [line 50]\n PRUNE((n$2 == 0), false); [line 50]\n REMOVE_TEMPS(n$1,n$2); [line 50]\n NULLIFY(&a,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="invhouse"] 61 -> 59 ; @@ -60,11 +60,11 @@ digraph iCFG { 59 -> 58 ; -58 [label="58: Return Stmt \n NULLIFY(&a,false); [line 53]\n n$0=*&r:int [line 53]\n *&return:int =(1 / n$0) [line 53]\n REMOVE_TEMPS(n$0); [line 53]\n NULLIFY(&r,false); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"] +58 [label="58: Return Stmt \n n$0=*&r:int [line 53]\n *&return:int =(1 / n$0) [line 53]\n REMOVE_TEMPS(n$0); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"] 58 -> 57 ; -57 [label="57: Exit reference_init_div0 \n " color=yellow style=filled] +57 [label="57: Exit reference_init_div0 \n NULLIFY(&r,false); [line 54]\n " color=yellow style=filled] 56 [label="56: Start reference_init_div0\nFormals: \nLocals: a:int & r:int \n DECLARE_LOCALS(&return,&a,&r); [line 48]\n " color=yellow style=filled] @@ -100,7 +100,7 @@ digraph iCFG { 49 -> 54 ; -48 [label="48: Prune (false branch) \n n$0=*&a:int [line 43]\n PRUNE((n$0 == 0), false); [line 43]\n REMOVE_TEMPS(n$0); [line 43]\n " shape="invhouse"] +48 [label="48: Prune (false branch) \n n$0=*&a:int [line 43]\n PRUNE((n$0 == 0), false); [line 43]\n REMOVE_TEMPS(n$0); [line 43]\n NULLIFY(&a,false); [line 43]\n " shape="invhouse"] 48 -> 45 ; @@ -108,7 +108,7 @@ digraph iCFG { 47 -> 55 ; -46 [label="46: between_join_and_exit \n NULLIFY(&a,false); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] +46 [label="46: between_join_and_exit \n APPLY_ABSTRACTION; [line 43]\n " shape="box"] 46 -> 44 ; @@ -133,7 +133,7 @@ digraph iCFG { 41 -> 39 ; 41 -> 40 ; -40 [label="40: Prune (false branch) \n n$0=*&a:int [line 37]\n PRUNE((n$0 == 0), false); [line 37]\n REMOVE_TEMPS(n$0); [line 37]\n " shape="invhouse"] +40 [label="40: Prune (false branch) \n n$0=*&a:int [line 37]\n PRUNE((n$0 == 0), false); [line 37]\n REMOVE_TEMPS(n$0); [line 37]\n NULLIFY(&a,false); [line 37]\n " shape="invhouse"] 40 -> 37 ; @@ -141,7 +141,7 @@ digraph iCFG { 39 -> 42 ; -38 [label="38: between_join_and_exit \n NULLIFY(&a,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] +38 [label="38: between_join_and_exit \n APPLY_ABSTRACTION; [line 37]\n " shape="box"] 38 -> 36 ; @@ -171,7 +171,7 @@ digraph iCFG { 31 -> 19 ; -30 [label="30: Return Stmt \n NULLIFY(&a,false); [line 28]\n NULLIFY(&b,false); [line 28]\n *&return:int =1 [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] +30 [label="30: Return Stmt \n *&return:int =1 [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] 30 -> 19 ; @@ -184,7 +184,7 @@ digraph iCFG { 28 -> 31 ; -27 [label="27: Prune (true branch) \n n$1=*&b:int [line 27]\n PRUNE((n$1 != 0), true); [line 27]\n REMOVE_TEMPS(n$1); [line 27]\n " shape="invhouse"] +27 [label="27: Prune (true branch) \n n$1=*&b:int [line 27]\n PRUNE((n$1 != 0), true); [line 27]\n REMOVE_TEMPS(n$1); [line 27]\n NULLIFY(&a,false); [line 27]\n NULLIFY(&b,false); [line 27]\n " shape="invhouse"] 27 -> 30 ; @@ -192,7 +192,7 @@ digraph iCFG { 26 -> 20 ; -25 [label="25: Return Stmt \n NULLIFY(&a,false); [line 26]\n *&return:int =1 [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +25 [label="25: Return Stmt \n *&return:int =1 [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 25 -> 19 ; @@ -205,11 +205,11 @@ digraph iCFG { 23 -> 29 ; -22 [label="22: Prune (true branch) \n n$0=*&a:int [line 25]\n PRUNE((n$0 != 0), true); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n " shape="invhouse"] +22 [label="22: Prune (true branch) \n n$0=*&a:int [line 25]\n PRUNE((n$0 != 0), true); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&a,false); [line 25]\n " shape="invhouse"] 22 -> 25 ; -21 [label="21: between_join_and_exit \n NULLIFY(&a,false); [line 25]\n NULLIFY(&b,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +21 [label="21: between_join_and_exit \n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 21 -> 19 ; @@ -245,7 +245,7 @@ digraph iCFG { 13 -> 16 ; -12 [label="12: between_join_and_exit \n NULLIFY(&a,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +12 [label="12: between_join_and_exit \n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 12 -> 10 ; @@ -269,7 +269,7 @@ digraph iCFG { 7 -> 5 ; 7 -> 6 ; -6 [label="6: Prune (false branch) \n n$0=*&a:int [line 11]\n PRUNE((n$0 == 0), false); [line 11]\n REMOVE_TEMPS(n$0); [line 11]\n " shape="invhouse"] +6 [label="6: Prune (false branch) \n n$0=*&a:int [line 11]\n PRUNE((n$0 == 0), false); [line 11]\n REMOVE_TEMPS(n$0); [line 11]\n NULLIFY(&a,false); [line 11]\n " shape="invhouse"] 6 -> 3 ; @@ -277,7 +277,7 @@ digraph iCFG { 5 -> 8 ; -4 [label="4: between_join_and_exit \n NULLIFY(&a,false); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] +4 [label="4: between_join_and_exit \n APPLY_ABSTRACTION; [line 11]\n " shape="box"] 4 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_switch.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_switch.cpp.dot index f0bc03081..133ad28e0 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_switch.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_switch.cpp.dot @@ -4,7 +4,7 @@ digraph iCFG { 14 -> 11 ; 14 -> 12 ; -13 [label="13: Prune (true branch) \n PRUNE(((n$0 == 0) != 0), true); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"] +13 [label="13: Prune (true branch) \n PRUNE(((n$0 == 0) != 0), true); [line 12]\n NULLIFY(&x,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"] 13 -> 10 ; @@ -13,11 +13,11 @@ digraph iCFG { 12 -> 8 ; 12 -> 9 ; -11 [label="11: Prune (true branch) \n PRUNE(((n$0 == 1) != 0), true); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="invhouse"] +11 [label="11: Prune (true branch) \n PRUNE(((n$0 == 1) != 0), true); [line 13]\n NULLIFY(&x,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="invhouse"] 11 -> 10 ; -10 [label="10: Return Stmt \n NULLIFY(&x,false); [line 14]\n *&return:int =0 [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +10 [label="10: Return Stmt \n *&return:int =0 [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 10 -> 2 ; @@ -25,11 +25,11 @@ digraph iCFG { 9 -> 5 ; -8 [label="8: Prune (true branch) \n PRUNE(((n$0 == 2) != 0), true); [line 15]\n " shape="invhouse"] +8 [label="8: Prune (true branch) \n PRUNE(((n$0 == 2) != 0), true); [line 15]\n NULLIFY(&x,false); [line 15]\n " shape="invhouse"] 8 -> 7 ; -7 [label="7: Return Stmt \n NULLIFY(&x,false); [line 16]\n *&return:int =1 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] +7 [label="7: Return Stmt \n *&return:int =1 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 7 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_while.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_while.cpp.dot index b6f78b218..ef7b0f172 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_while.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_while.cpp.dot @@ -45,7 +45,7 @@ digraph iCFG { 18 -> 24 ; -17 [label="17: Prune (false branch) \n n$0=*&a:int [line 23]\n PRUNE((n$0 == 0), false); [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n " shape="invhouse"] +17 [label="17: Prune (false branch) \n n$0=*&a:int [line 23]\n PRUNE((n$0 == 0), false); [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&a,false); [line 23]\n NULLIFY(&result,false); [line 23]\n NULLIFY(&x,false); [line 23]\n " shape="invhouse"] 17 -> 14 ; @@ -57,7 +57,7 @@ digraph iCFG { 15 -> 19 ; -14 [label="14: Return Stmt \n NULLIFY(&a,false); [line 27]\n NULLIFY(&result,false); [line 27]\n NULLIFY(&x,false); [line 27]\n *&return:int =0 [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +14 [label="14: Return Stmt \n *&return:int =0 [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] 14 -> 13 ; @@ -89,7 +89,7 @@ digraph iCFG { 7 -> 5 ; 7 -> 6 ; -6 [label="6: Prune (false branch) \n n$0=*&a:int [line 13]\n PRUNE((n$0 == 0), false); [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n " shape="invhouse"] +6 [label="6: Prune (false branch) \n n$0=*&a:int [line 13]\n PRUNE((n$0 == 0), false); [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&a,false); [line 13]\n NULLIFY(&result,false); [line 13]\n NULLIFY(&x,false); [line 13]\n " shape="invhouse"] 6 -> 3 ; @@ -101,7 +101,7 @@ digraph iCFG { 4 -> 7 ; -3 [label="3: Return Stmt \n NULLIFY(&a,false); [line 17]\n NULLIFY(&result,false); [line 17]\n NULLIFY(&x,false); [line 17]\n *&return:int =0 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/box.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/box.cpp.dot index db0ab19cb..dba532297 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/box.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/box.cpp.dot @@ -7,11 +7,11 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: DeclStmt \n *&p:int *=&v [line 13]\n NULLIFY(&p,false); [line 13]\n NULLIFY(&v,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +3 [label="3: DeclStmt \n *&p:int *=&v [line 13]\n NULLIFY(&p,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 3 -> 2 ; -2 [label="2: Exit test \n " color=yellow style=filled] +2 [label="2: Exit test \n NULLIFY(&v,false); [line 14]\n " color=yellow style=filled] 1 [label="1: Start test\nFormals: \nLocals: p:int * r:int & v:int \n DECLARE_LOCALS(&return,&p,&r,&v); [line 10]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/increment.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/increment.cpp.dot index 01a773652..9c863393a 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/increment.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/increment.cpp.dot @@ -11,11 +11,11 @@ digraph iCFG { 9 -> 8 ; -8 [label="8: DeclStmt \n n$0=*&vr:int & [line 20]\n n$1=*n$0:int [line 20]\n *n$0:int =(n$1 - 1) [line 20]\n *&q:int &=n$0 [line 20]\n REMOVE_TEMPS(n$0,n$1); [line 20]\n NULLIFY(&q,false); [line 20]\n NULLIFY(&vr,false); [line 20]\n NULLIFY(&v,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] +8 [label="8: DeclStmt \n n$0=*&vr:int & [line 20]\n n$1=*n$0:int [line 20]\n *n$0:int =(n$1 - 1) [line 20]\n *&q:int &=n$0 [line 20]\n REMOVE_TEMPS(n$0,n$1); [line 20]\n NULLIFY(&q,false); [line 20]\n NULLIFY(&vr,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] 8 -> 7 ; -7 [label="7: Exit using_ref \n " color=yellow style=filled] +7 [label="7: Exit using_ref \n NULLIFY(&v,false); [line 21]\n " color=yellow style=filled] 6 [label="6: Start using_ref\nFormals: \nLocals: q:int & r:int & vr:int & v:int \n DECLARE_LOCALS(&return,&q,&r,&vr,&v); [line 16]\n " color=yellow style=filled] @@ -30,11 +30,11 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: DeclStmt \n n$0=*&v:int [line 13]\n *&v:int =(n$0 - 1) [line 13]\n *&q:int &=&v [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&q,false); [line 13]\n NULLIFY(&v,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=*&v:int [line 13]\n *&v:int =(n$0 - 1) [line 13]\n *&q:int &=&v [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&q,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 3 -> 2 ; -2 [label="2: Exit using_value \n " color=yellow style=filled] +2 [label="2: Exit using_value \n NULLIFY(&v,false); [line 14]\n " color=yellow style=filled] 1 [label="1: Start using_value\nFormals: \nLocals: q:int & r:int & v:int \n DECLARE_LOCALS(&return,&q,&r,&v); [line 10]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/init.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/init.cpp.dot index 953001293..438a47736 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/init.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/init.cpp.dot @@ -26,11 +26,11 @@ digraph iCFG { 9 -> 8 ; -8 [label="8: DeclStmt \n *&p:int *=&par [line 19]\n NULLIFY(&p,false); [line 19]\n NULLIFY(&par,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +8 [label="8: DeclStmt \n *&p:int *=&par [line 19]\n NULLIFY(&p,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 8 -> 7 ; -7 [label="7: Exit init_from_val \n " color=yellow style=filled] +7 [label="7: Exit init_from_val \n NULLIFY(&par,false); [line 20]\n " color=yellow style=filled] 6 [label="6: Start init_from_val\nFormals: par:int \nLocals: p:int * d:int & v:int \n DECLARE_LOCALS(&return,&p,&d,&v); [line 16]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/nested_assignment.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/nested_assignment.cpp.dot index 6db45fad0..c3b1f7aff 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/nested_assignment.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/nested_assignment.cpp.dot @@ -11,11 +11,11 @@ digraph iCFG { 14 -> 13 ; -13 [label="13: DeclStmt \n n$0=*&ref_from_val:int & [line 29]\n *&b:int =5 [line 29]\n n$1=*&b:int [line 29]\n *n$0:int =n$1 [line 29]\n *&ref_from_ref:int &=n$0 [line 29]\n REMOVE_TEMPS(n$0,n$1); [line 29]\n NULLIFY(&b,false); [line 29]\n NULLIFY(&ref_from_ref,false); [line 29]\n NULLIFY(&ref_from_val,false); [line 29]\n NULLIFY(&a,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +13 [label="13: DeclStmt \n n$0=*&ref_from_val:int & [line 29]\n *&b:int =5 [line 29]\n n$1=*&b:int [line 29]\n *n$0:int =n$1 [line 29]\n *&ref_from_ref:int &=n$0 [line 29]\n REMOVE_TEMPS(n$0,n$1); [line 29]\n NULLIFY(&b,false); [line 29]\n NULLIFY(&ref_from_ref,false); [line 29]\n NULLIFY(&ref_from_val,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 13 -> 12 ; -12 [label="12: Exit crazy_nested \n " color=yellow style=filled] +12 [label="12: Exit crazy_nested \n NULLIFY(&a,false); [line 30]\n " color=yellow style=filled] 11 [label="11: Start crazy_nested\nFormals: \nLocals: ref_from_ref:int & ref_from_val:int & b:int a:int \n DECLARE_LOCALS(&return,&ref_from_ref,&ref_from_val,&b,&a); [line 22]\n " color=yellow style=filled] @@ -30,11 +30,11 @@ digraph iCFG { 9 -> 8 ; -8 [label="8: DeclStmt \n n$0=*&ref_from_val:int & [line 19]\n *n$0:int =6 [line 19]\n *&ref_from_ref:int &=n$0 [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&ref_from_ref,false); [line 19]\n NULLIFY(&ref_from_val,false); [line 19]\n NULLIFY(&a,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +8 [label="8: DeclStmt \n n$0=*&ref_from_val:int & [line 19]\n *n$0:int =6 [line 19]\n *&ref_from_ref:int &=n$0 [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&ref_from_ref,false); [line 19]\n NULLIFY(&ref_from_val,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 8 -> 7 ; -7 [label="7: Exit nested \n " color=yellow style=filled] +7 [label="7: Exit nested \n NULLIFY(&a,false); [line 20]\n " color=yellow style=filled] 6 [label="6: Start nested\nFormals: \nLocals: ref_from_ref:int & ref_from_val:int & a:int \n DECLARE_LOCALS(&return,&ref_from_ref,&ref_from_val,&a); [line 16]\n " color=yellow style=filled] @@ -49,11 +49,11 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: DeclStmt \n n$0=*&ref_from_val:int & [line 13]\n *&ref_from_ref:int &=n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&ref_from_ref,false); [line 13]\n NULLIFY(&ref_from_val,false); [line 13]\n NULLIFY(&a,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=*&ref_from_val:int & [line 13]\n *&ref_from_ref:int &=n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&ref_from_ref,false); [line 13]\n NULLIFY(&ref_from_val,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 3 -> 2 ; -2 [label="2: Exit normal \n " color=yellow style=filled] +2 [label="2: Exit normal \n NULLIFY(&a,false); [line 14]\n " color=yellow style=filled] 1 [label="1: Start normal\nFormals: \nLocals: ref_from_ref:int & ref_from_val:int & a:int \n DECLARE_LOCALS(&return,&ref_from_ref,&ref_from_val,&a); [line 10]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_field.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/reference_field.cpp.dot index 5adb4a80c..d9cc868dc 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_field.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/reference_field.cpp.dot @@ -15,11 +15,11 @@ digraph iCFG { 116 -> 115 ; -115 [label="115: Return Stmt \n n$0=*&r:class Val [line 141]\n n$1=_fun_Val_getI(&r:class Val &) [line 141]\n *&return:int =(1 / n$1) [line 141]\n REMOVE_TEMPS(n$0,n$1); [line 141]\n NULLIFY(&r,false); [line 141]\n NULLIFY(&x,false); [line 141]\n APPLY_ABSTRACTION; [line 141]\n " shape="box"] +115 [label="115: Return Stmt \n n$0=*&r:class Val [line 141]\n n$1=_fun_Val_getI(&r:class Val &) [line 141]\n *&return:int =(1 / n$1) [line 141]\n REMOVE_TEMPS(n$0,n$1); [line 141]\n APPLY_ABSTRACTION; [line 141]\n " shape="box"] 115 -> 114 ; -114 [label="114: Exit val_getI_div0 \n " color=yellow style=filled] +114 [label="114: Exit val_getI_div0 \n NULLIFY(&x,false); [line 142]\n NULLIFY(&r,false); [line 142]\n " color=yellow style=filled] 113 [label="113: Start val_getI_div0\nFormals: \nLocals: r:class Val x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 136]\n " color=yellow style=filled] @@ -42,11 +42,11 @@ digraph iCFG { 109 -> 108 ; -108 [label="108: Return Stmt \n n$0=*&r:class Val [line 133]\n n$1=_fun_Val_getF(&r:class Val &) [line 133]\n *&return:int =(1 / n$1) [line 133]\n REMOVE_TEMPS(n$0,n$1); [line 133]\n NULLIFY(&r,false); [line 133]\n NULLIFY(&x,false); [line 133]\n APPLY_ABSTRACTION; [line 133]\n " shape="box"] +108 [label="108: Return Stmt \n n$0=*&r:class Val [line 133]\n n$1=_fun_Val_getF(&r:class Val &) [line 133]\n *&return:int =(1 / n$1) [line 133]\n REMOVE_TEMPS(n$0,n$1); [line 133]\n APPLY_ABSTRACTION; [line 133]\n " shape="box"] 108 -> 107 ; -107 [label="107: Exit val_getF_div0 \n " color=yellow style=filled] +107 [label="107: Exit val_getF_div0 \n NULLIFY(&x,false); [line 134]\n NULLIFY(&r,false); [line 134]\n " color=yellow style=filled] 106 [label="106: Start val_getF_div0\nFormals: \nLocals: r:class Val x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 128]\n " color=yellow style=filled] @@ -69,11 +69,11 @@ digraph iCFG { 102 -> 101 ; -101 [label="101: Return Stmt \n n$0=*&r.i:int [line 125]\n *&return:int =(1 / n$0) [line 125]\n REMOVE_TEMPS(n$0); [line 125]\n NULLIFY(&r,false); [line 125]\n NULLIFY(&x,false); [line 125]\n APPLY_ABSTRACTION; [line 125]\n " shape="box"] +101 [label="101: Return Stmt \n n$0=*&r.i:int [line 125]\n *&return:int =(1 / n$0) [line 125]\n REMOVE_TEMPS(n$0); [line 125]\n APPLY_ABSTRACTION; [line 125]\n " shape="box"] 101 -> 100 ; -100 [label="100: Exit val_I_div0 \n " color=yellow style=filled] +100 [label="100: Exit val_I_div0 \n NULLIFY(&x,false); [line 126]\n NULLIFY(&r,false); [line 126]\n " color=yellow style=filled] 99 [label="99: Start val_I_div0\nFormals: \nLocals: r:class Val x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 120]\n " color=yellow style=filled] @@ -96,11 +96,11 @@ digraph iCFG { 95 -> 94 ; -94 [label="94: Return Stmt \n n$0=*&r.x.f:int [line 117]\n *&return:int =(1 / n$0) [line 117]\n REMOVE_TEMPS(n$0); [line 117]\n NULLIFY(&r,false); [line 117]\n NULLIFY(&x,false); [line 117]\n APPLY_ABSTRACTION; [line 117]\n " shape="box"] +94 [label="94: Return Stmt \n n$0=*&r.x.f:int [line 117]\n *&return:int =(1 / n$0) [line 117]\n REMOVE_TEMPS(n$0); [line 117]\n APPLY_ABSTRACTION; [line 117]\n " shape="box"] 94 -> 93 ; -93 [label="93: Exit val_F_div0 \n " color=yellow style=filled] +93 [label="93: Exit val_F_div0 \n NULLIFY(&x,false); [line 118]\n NULLIFY(&r,false); [line 118]\n " color=yellow style=filled] 92 [label="92: Start val_F_div0\nFormals: \nLocals: r:class Val x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 112]\n " color=yellow style=filled] @@ -123,11 +123,11 @@ digraph iCFG { 88 -> 87 ; -87 [label="87: Return Stmt \n n$0=*&r:class Ptr [line 108]\n n$1=_fun_Ptr_getI(&r:class Ptr &) [line 108]\n *&return:int =(1 / n$1) [line 108]\n REMOVE_TEMPS(n$0,n$1); [line 108]\n NULLIFY(&r,false); [line 108]\n NULLIFY(&x,false); [line 108]\n APPLY_ABSTRACTION; [line 108]\n " shape="box"] +87 [label="87: Return Stmt \n n$0=*&r:class Ptr [line 108]\n n$1=_fun_Ptr_getI(&r:class Ptr &) [line 108]\n *&return:int =(1 / n$1) [line 108]\n REMOVE_TEMPS(n$0,n$1); [line 108]\n APPLY_ABSTRACTION; [line 108]\n " shape="box"] 87 -> 86 ; -86 [label="86: Exit ptr_getI_div0 \n " color=yellow style=filled] +86 [label="86: Exit ptr_getI_div0 \n NULLIFY(&x,false); [line 109]\n NULLIFY(&r,false); [line 109]\n " color=yellow style=filled] 85 [label="85: Start ptr_getI_div0\nFormals: \nLocals: r:class Ptr x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 103]\n " color=yellow style=filled] @@ -150,11 +150,11 @@ digraph iCFG { 81 -> 80 ; -80 [label="80: Return Stmt \n n$0=*&r:class Ptr [line 100]\n n$1=_fun_Ptr_getF(&r:class Ptr &) [line 100]\n *&return:int =(1 / n$1) [line 100]\n REMOVE_TEMPS(n$0,n$1); [line 100]\n NULLIFY(&r,false); [line 100]\n NULLIFY(&x,false); [line 100]\n APPLY_ABSTRACTION; [line 100]\n " shape="box"] +80 [label="80: Return Stmt \n n$0=*&r:class Ptr [line 100]\n n$1=_fun_Ptr_getF(&r:class Ptr &) [line 100]\n *&return:int =(1 / n$1) [line 100]\n REMOVE_TEMPS(n$0,n$1); [line 100]\n APPLY_ABSTRACTION; [line 100]\n " shape="box"] 80 -> 79 ; -79 [label="79: Exit ptr_getF_div0 \n " color=yellow style=filled] +79 [label="79: Exit ptr_getF_div0 \n NULLIFY(&x,false); [line 101]\n NULLIFY(&r,false); [line 101]\n " color=yellow style=filled] 78 [label="78: Start ptr_getF_div0\nFormals: \nLocals: r:class Ptr x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 95]\n " color=yellow style=filled] @@ -177,11 +177,11 @@ digraph iCFG { 74 -> 73 ; -73 [label="73: Return Stmt \n n$0=*&r.i:int * [line 92]\n n$1=*n$0:int [line 92]\n *&return:int =(1 / n$1) [line 92]\n REMOVE_TEMPS(n$0,n$1); [line 92]\n NULLIFY(&r,false); [line 92]\n NULLIFY(&x,false); [line 92]\n APPLY_ABSTRACTION; [line 92]\n " shape="box"] +73 [label="73: Return Stmt \n n$0=*&r.i:int * [line 92]\n n$1=*n$0:int [line 92]\n *&return:int =(1 / n$1) [line 92]\n REMOVE_TEMPS(n$0,n$1); [line 92]\n APPLY_ABSTRACTION; [line 92]\n " shape="box"] 73 -> 72 ; -72 [label="72: Exit ptr_I_div0 \n " color=yellow style=filled] +72 [label="72: Exit ptr_I_div0 \n NULLIFY(&x,false); [line 93]\n NULLIFY(&r,false); [line 93]\n " color=yellow style=filled] 71 [label="71: Start ptr_I_div0\nFormals: \nLocals: r:class Ptr x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 87]\n " color=yellow style=filled] @@ -204,11 +204,11 @@ digraph iCFG { 67 -> 66 ; -66 [label="66: Return Stmt \n n$0=*&r.x:class X * [line 84]\n n$1=*n$0.f:int [line 84]\n *&return:int =(1 / n$1) [line 84]\n REMOVE_TEMPS(n$0,n$1); [line 84]\n NULLIFY(&r,false); [line 84]\n NULLIFY(&x,false); [line 84]\n APPLY_ABSTRACTION; [line 84]\n " shape="box"] +66 [label="66: Return Stmt \n n$0=*&r.x:class X * [line 84]\n n$1=*n$0.f:int [line 84]\n *&return:int =(1 / n$1) [line 84]\n REMOVE_TEMPS(n$0,n$1); [line 84]\n APPLY_ABSTRACTION; [line 84]\n " shape="box"] 66 -> 65 ; -65 [label="65: Exit ptr_F_div0 \n " color=yellow style=filled] +65 [label="65: Exit ptr_F_div0 \n NULLIFY(&x,false); [line 85]\n NULLIFY(&r,false); [line 85]\n " color=yellow style=filled] 64 [label="64: Start ptr_F_div0\nFormals: \nLocals: r:class Ptr x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 79]\n " color=yellow style=filled] @@ -231,11 +231,11 @@ digraph iCFG { 60 -> 59 ; -59 [label="59: Return Stmt \n n$0=*&r:class Ref [line 75]\n n$1=_fun_Ref_getI(&r:class Ref &) [line 75]\n *&return:int =(1 / n$1) [line 75]\n REMOVE_TEMPS(n$0,n$1); [line 75]\n NULLIFY(&r,false); [line 75]\n NULLIFY(&x,false); [line 75]\n APPLY_ABSTRACTION; [line 75]\n " shape="box"] +59 [label="59: Return Stmt \n n$0=*&r:class Ref [line 75]\n n$1=_fun_Ref_getI(&r:class Ref &) [line 75]\n *&return:int =(1 / n$1) [line 75]\n REMOVE_TEMPS(n$0,n$1); [line 75]\n APPLY_ABSTRACTION; [line 75]\n " shape="box"] 59 -> 58 ; -58 [label="58: Exit ref_getI_div0 \n " color=yellow style=filled] +58 [label="58: Exit ref_getI_div0 \n NULLIFY(&x,false); [line 76]\n NULLIFY(&r,false); [line 76]\n " color=yellow style=filled] 57 [label="57: Start ref_getI_div0\nFormals: \nLocals: r:class Ref x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 70]\n " color=yellow style=filled] @@ -258,11 +258,11 @@ digraph iCFG { 53 -> 52 ; -52 [label="52: Return Stmt \n n$0=*&r:class Ref [line 67]\n n$1=_fun_Ref_getF(&r:class Ref &) [line 67]\n *&return:int =(1 / n$1) [line 67]\n REMOVE_TEMPS(n$0,n$1); [line 67]\n NULLIFY(&r,false); [line 67]\n NULLIFY(&x,false); [line 67]\n APPLY_ABSTRACTION; [line 67]\n " shape="box"] +52 [label="52: Return Stmt \n n$0=*&r:class Ref [line 67]\n n$1=_fun_Ref_getF(&r:class Ref &) [line 67]\n *&return:int =(1 / n$1) [line 67]\n REMOVE_TEMPS(n$0,n$1); [line 67]\n APPLY_ABSTRACTION; [line 67]\n " shape="box"] 52 -> 51 ; -51 [label="51: Exit ref_getF_div0 \n " color=yellow style=filled] +51 [label="51: Exit ref_getF_div0 \n NULLIFY(&x,false); [line 68]\n NULLIFY(&r,false); [line 68]\n " color=yellow style=filled] 50 [label="50: Start ref_getF_div0\nFormals: \nLocals: r:class Ref x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 62]\n " color=yellow style=filled] @@ -285,11 +285,11 @@ digraph iCFG { 46 -> 45 ; -45 [label="45: Return Stmt \n n$0=*&r.i:int & [line 59]\n n$1=*n$0:int & [line 59]\n *&return:int =(1 / n$1) [line 59]\n REMOVE_TEMPS(n$0,n$1); [line 59]\n NULLIFY(&r,false); [line 59]\n NULLIFY(&x,false); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] +45 [label="45: Return Stmt \n n$0=*&r.i:int & [line 59]\n n$1=*n$0:int & [line 59]\n *&return:int =(1 / n$1) [line 59]\n REMOVE_TEMPS(n$0,n$1); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] 45 -> 44 ; -44 [label="44: Exit ref_I_div0 \n " color=yellow style=filled] +44 [label="44: Exit ref_I_div0 \n NULLIFY(&x,false); [line 60]\n NULLIFY(&r,false); [line 60]\n " color=yellow style=filled] 43 [label="43: Start ref_I_div0\nFormals: \nLocals: r:class Ref x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 54]\n " color=yellow style=filled] @@ -312,11 +312,11 @@ digraph iCFG { 39 -> 38 ; -38 [label="38: Return Stmt \n n$0=*&r.x:class X & [line 51]\n n$1=*n$0.f:int [line 51]\n *&return:int =(1 / n$1) [line 51]\n REMOVE_TEMPS(n$0,n$1); [line 51]\n NULLIFY(&r,false); [line 51]\n NULLIFY(&x,false); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] +38 [label="38: Return Stmt \n n$0=*&r.x:class X & [line 51]\n n$1=*n$0.f:int [line 51]\n *&return:int =(1 / n$1) [line 51]\n REMOVE_TEMPS(n$0,n$1); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] 38 -> 37 ; -37 [label="37: Exit ref_F_div0 \n " color=yellow style=filled] +37 [label="37: Exit ref_F_div0 \n NULLIFY(&x,false); [line 52]\n NULLIFY(&r,false); [line 52]\n " color=yellow style=filled] 36 [label="36: Start ref_F_div0\nFormals: \nLocals: r:class Ref x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 46]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_struct_e2e.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/reference_struct_e2e.cpp.dot index 53a32d40e..8cfd7148d 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_struct_e2e.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/reference_struct_e2e.cpp.dot @@ -219,7 +219,7 @@ digraph iCFG { 66 -> 61 ; -65 [label="65: Prune (false branch) \n n$0=*&x:class X * [line 55]\n PRUNE((n$0 == 0), false); [line 55]\n REMOVE_TEMPS(n$0); [line 55]\n " shape="invhouse"] +65 [label="65: Prune (false branch) \n n$0=*&x:class X * [line 55]\n PRUNE((n$0 == 0), false); [line 55]\n REMOVE_TEMPS(n$0); [line 55]\n NULLIFY(&x,false); [line 55]\n " shape="invhouse"] 65 -> 62 ; @@ -227,7 +227,7 @@ digraph iCFG { 64 -> 67 ; -63 [label="63: between_join_and_exit \n NULLIFY(&x,false); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="box"] +63 [label="63: between_join_and_exit \n APPLY_ABSTRACTION; [line 55]\n " shape="box"] 63 -> 61 ; @@ -251,7 +251,7 @@ digraph iCFG { 58 -> 53 ; -57 [label="57: Prune (false branch) \n n$0=*&x:class X * [line 48]\n PRUNE((n$0 == 0), false); [line 48]\n REMOVE_TEMPS(n$0); [line 48]\n " shape="invhouse"] +57 [label="57: Prune (false branch) \n n$0=*&x:class X * [line 48]\n PRUNE((n$0 == 0), false); [line 48]\n REMOVE_TEMPS(n$0); [line 48]\n NULLIFY(&x,false); [line 48]\n " shape="invhouse"] 57 -> 54 ; @@ -259,7 +259,7 @@ digraph iCFG { 56 -> 59 ; -55 [label="55: between_join_and_exit \n NULLIFY(&x,false); [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] +55 [label="55: between_join_and_exit \n APPLY_ABSTRACTION; [line 48]\n " shape="box"] 55 -> 53 ; @@ -283,7 +283,7 @@ digraph iCFG { 50 -> 45 ; -49 [label="49: Prune (false branch) \n n$0=*&x:class X * [line 41]\n PRUNE((n$0 == 0), false); [line 41]\n REMOVE_TEMPS(n$0); [line 41]\n " shape="invhouse"] +49 [label="49: Prune (false branch) \n n$0=*&x:class X * [line 41]\n PRUNE((n$0 == 0), false); [line 41]\n REMOVE_TEMPS(n$0); [line 41]\n NULLIFY(&x,false); [line 41]\n " shape="invhouse"] 49 -> 46 ; @@ -291,7 +291,7 @@ digraph iCFG { 48 -> 51 ; -47 [label="47: between_join_and_exit \n NULLIFY(&x,false); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] +47 [label="47: between_join_and_exit \n APPLY_ABSTRACTION; [line 41]\n " shape="box"] 47 -> 45 ; @@ -315,7 +315,7 @@ digraph iCFG { 42 -> 37 ; -41 [label="41: Prune (false branch) \n n$0=*&x:class X * [line 34]\n PRUNE((n$0 == 0), false); [line 34]\n REMOVE_TEMPS(n$0); [line 34]\n " shape="invhouse"] +41 [label="41: Prune (false branch) \n n$0=*&x:class X * [line 34]\n PRUNE((n$0 == 0), false); [line 34]\n REMOVE_TEMPS(n$0); [line 34]\n NULLIFY(&x,false); [line 34]\n " shape="invhouse"] 41 -> 38 ; @@ -323,7 +323,7 @@ digraph iCFG { 40 -> 43 ; -39 [label="39: between_join_and_exit \n NULLIFY(&x,false); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] +39 [label="39: between_join_and_exit \n APPLY_ABSTRACTION; [line 34]\n " shape="box"] 39 -> 37 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_type_e2e.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/reference_type_e2e.cpp.dot index 10ab6228f..d991b4271 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_type_e2e.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/reference_type_e2e.cpp.dot @@ -19,11 +19,11 @@ digraph iCFG { 52 -> 51 ; -51 [label="51: Return Stmt \n n$0=*&b:int [line 68]\n *&return:int =(1 / n$0) [line 68]\n REMOVE_TEMPS(n$0); [line 68]\n NULLIFY(&b,false); [line 68]\n NULLIFY(&a,false); [line 68]\n APPLY_ABSTRACTION; [line 68]\n " shape="box"] +51 [label="51: Return Stmt \n n$0=*&b:int [line 68]\n *&return:int =(1 / n$0) [line 68]\n REMOVE_TEMPS(n$0); [line 68]\n NULLIFY(&b,false); [line 68]\n APPLY_ABSTRACTION; [line 68]\n " shape="box"] 51 -> 50 ; -50 [label="50: Exit ref_div1_nested_assignment \n " color=yellow style=filled] +50 [label="50: Exit ref_div1_nested_assignment \n NULLIFY(&a,false); [line 69]\n " color=yellow style=filled] 49 [label="49: Start ref_div1_nested_assignment\nFormals: \nLocals: r2:int & r1:int & b:int a:int \n DECLARE_LOCALS(&return,&r2,&r1,&b,&a); [line 62]\n " color=yellow style=filled] @@ -50,11 +50,11 @@ digraph iCFG { 44 -> 43 ; -43 [label="43: Return Stmt \n n$0=*&a:int [line 59]\n *&return:int =(1 / n$0) [line 59]\n REMOVE_TEMPS(n$0); [line 59]\n NULLIFY(&a,false); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] +43 [label="43: Return Stmt \n n$0=*&a:int [line 59]\n *&return:int =(1 / n$0) [line 59]\n REMOVE_TEMPS(n$0); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] 43 -> 42 ; -42 [label="42: Exit ref_div0_nested_assignment \n " color=yellow style=filled] +42 [label="42: Exit ref_div0_nested_assignment \n NULLIFY(&a,false); [line 60]\n " color=yellow style=filled] 41 [label="41: Start ref_div0_nested_assignment\nFormals: \nLocals: r2:int & r1:int & b:int a:int \n DECLARE_LOCALS(&return,&r2,&r1,&b,&a); [line 53]\n " color=yellow style=filled] @@ -73,11 +73,11 @@ digraph iCFG { 38 -> 37 ; -37 [label="37: Return Stmt \n n$0=*&a:int [line 50]\n *&return:int =(1 / n$0) [line 50]\n REMOVE_TEMPS(n$0); [line 50]\n NULLIFY(&a,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] +37 [label="37: Return Stmt \n n$0=*&a:int [line 50]\n *&return:int =(1 / n$0) [line 50]\n REMOVE_TEMPS(n$0); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] 37 -> 36 ; -36 [label="36: Exit ref_div0_function_temp_var \n " color=yellow style=filled] +36 [label="36: Exit ref_div0_function_temp_var \n NULLIFY(&a,false); [line 51]\n " color=yellow style=filled] 35 [label="35: Start ref_div0_function_temp_var\nFormals: \nLocals: r:int & a:int \n DECLARE_LOCALS(&return,&r,&a); [line 46]\n " color=yellow style=filled] @@ -92,11 +92,11 @@ digraph iCFG { 33 -> 32 ; -32 [label="32: Return Stmt \n n$0=*&a:int [line 43]\n *&return:int =(1 / n$0) [line 43]\n REMOVE_TEMPS(n$0); [line 43]\n NULLIFY(&a,false); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] +32 [label="32: Return Stmt \n n$0=*&a:int [line 43]\n *&return:int =(1 / n$0) [line 43]\n REMOVE_TEMPS(n$0); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] 32 -> 31 ; -31 [label="31: Exit ref_div0_function \n " color=yellow style=filled] +31 [label="31: Exit ref_div0_function \n NULLIFY(&a,false); [line 44]\n " color=yellow style=filled] 30 [label="30: Start ref_div0_function\nFormals: \nLocals: a:int \n DECLARE_LOCALS(&return,&a); [line 40]\n " color=yellow style=filled] @@ -115,11 +115,11 @@ digraph iCFG { 27 -> 26 ; -26 [label="26: Return Stmt \n n$0=*&a:int [line 37]\n *&return:int =(1 / n$0) [line 37]\n REMOVE_TEMPS(n$0); [line 37]\n NULLIFY(&a,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] +26 [label="26: Return Stmt \n n$0=*&a:int [line 37]\n *&return:int =(1 / n$0) [line 37]\n REMOVE_TEMPS(n$0); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] 26 -> 25 ; -25 [label="25: Exit ref_div0 \n " color=yellow style=filled] +25 [label="25: Exit ref_div0 \n NULLIFY(&a,false); [line 38]\n " color=yellow style=filled] 24 [label="24: Start ref_div0\nFormals: \nLocals: r:int & a:int \n DECLARE_LOCALS(&return,&r,&a); [line 33]\n " color=yellow style=filled] @@ -138,11 +138,11 @@ digraph iCFG { 21 -> 20 ; -20 [label="20: Return Stmt \n n$0=*&a:int [line 30]\n *&return:int =(1 / n$0) [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n NULLIFY(&a,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +20 [label="20: Return Stmt \n n$0=*&a:int [line 30]\n *&return:int =(1 / n$0) [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 20 -> 19 ; -19 [label="19: Exit ptr_div0_function_temp_var \n " color=yellow style=filled] +19 [label="19: Exit ptr_div0_function_temp_var \n NULLIFY(&a,false); [line 31]\n " color=yellow style=filled] 18 [label="18: Start ptr_div0_function_temp_var\nFormals: \nLocals: r:int * a:int \n DECLARE_LOCALS(&return,&r,&a); [line 26]\n " color=yellow style=filled] @@ -157,11 +157,11 @@ digraph iCFG { 16 -> 15 ; -15 [label="15: Return Stmt \n n$0=*&a:int [line 23]\n *&return:int =(1 / n$0) [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&a,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +15 [label="15: Return Stmt \n n$0=*&a:int [line 23]\n *&return:int =(1 / n$0) [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 15 -> 14 ; -14 [label="14: Exit ptr_div0_function \n " color=yellow style=filled] +14 [label="14: Exit ptr_div0_function \n NULLIFY(&a,false); [line 24]\n " color=yellow style=filled] 13 [label="13: Start ptr_div0_function\nFormals: \nLocals: a:int \n DECLARE_LOCALS(&return,&a); [line 20]\n " color=yellow style=filled] @@ -180,11 +180,11 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: Return Stmt \n n$0=*&a:int [line 17]\n *&return:int =(1 / n$0) [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&a,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +9 [label="9: Return Stmt \n n$0=*&a:int [line 17]\n *&return:int =(1 / n$0) [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 9 -> 8 ; -8 [label="8: Exit ptr_div0 \n " color=yellow style=filled] +8 [label="8: Exit ptr_div0 \n NULLIFY(&a,false); [line 18]\n " color=yellow style=filled] 7 [label="7: Start ptr_div0\nFormals: \nLocals: p:int * a:int \n DECLARE_LOCALS(&return,&p,&a); [line 13]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/temporary_lvalue.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/temporary_lvalue.cpp.dot index dbd99b349..f4b418f9e 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/temporary_lvalue.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/temporary_lvalue.cpp.dot @@ -3,22 +3,22 @@ digraph iCFG { 14 -> 13 ; -13 [label="13: Return Stmt \n n$0=_fun_div(&a:int &) [line 22]\n *&return:int =n$0 [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&a,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +13 [label="13: Return Stmt \n n$0=_fun_div(&a:int &) [line 22]\n *&return:int =n$0 [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 13 -> 12 ; -12 [label="12: Exit div0_no_const_ref \n " color=yellow style=filled] +12 [label="12: Exit div0_no_const_ref \n NULLIFY(&a,false); [line 23]\n " color=yellow style=filled] 11 [label="11: Start div0_no_const_ref\nFormals: \nLocals: a:int \n DECLARE_LOCALS(&return,&a); [line 20]\n " color=yellow style=filled] 11 -> 14 ; -10 [label="10: Return Stmt \n *&SIL_materialize_temp__n$0:int =0 [line 17]\n n$1=_fun_div(&SIL_materialize_temp__n$0:int &) [line 17]\n *&return:int =n$1 [line 17]\n REMOVE_TEMPS(n$1); [line 17]\n NULLIFY(&SIL_materialize_temp__n$0,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +10 [label="10: Return Stmt \n *&SIL_materialize_temp__n$0:int =0 [line 17]\n n$1=_fun_div(&SIL_materialize_temp__n$0:int &) [line 17]\n *&return:int =n$1 [line 17]\n REMOVE_TEMPS(n$1); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 10 -> 9 ; -9 [label="9: Exit div0_function_param_cast \n " color=yellow style=filled] +9 [label="9: Exit div0_function_param_cast \n NULLIFY(&SIL_materialize_temp__n$0,false); [line 17]\n " color=yellow style=filled] 8 [label="8: Start div0_function_param_cast\nFormals: \nLocals: SIL_materialize_temp__n$0:int \n DECLARE_LOCALS(&return,&SIL_materialize_temp__n$0); [line 17]\n " color=yellow style=filled] @@ -29,11 +29,11 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: Return Stmt \n n$0=*&a:int & [line 14]\n n$1=_fun_div(n$0:int &) [line 14]\n *&return:int =n$1 [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&a,false); [line 14]\n NULLIFY(&SIL_materialize_temp__n$2,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&a:int & [line 14]\n n$1=_fun_div(n$0:int &) [line 14]\n *&return:int =n$1 [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&a,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 6 -> 5 ; -5 [label="5: Exit div0_init_expr \n " color=yellow style=filled] +5 [label="5: Exit div0_init_expr \n NULLIFY(&SIL_materialize_temp__n$2,false); [line 15]\n " color=yellow style=filled] 4 [label="4: Start div0_init_expr\nFormals: \nLocals: a:int & SIL_materialize_temp__n$2:int \n DECLARE_LOCALS(&return,&a,&SIL_materialize_temp__n$2); [line 12]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/unbox.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/unbox.cpp.dot index dc2c69edf..028c01a62 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/unbox.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/unbox.cpp.dot @@ -15,11 +15,11 @@ digraph iCFG { 20 -> 19 ; -19 [label="19: Call _fun_fun_r \n n$0=*&p:int * [line 33]\n n$1=_fun_fun_r(n$0:int &) [line 33]\n REMOVE_TEMPS(n$0,n$1); [line 33]\n NULLIFY(&p,false); [line 33]\n NULLIFY(&a,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] +19 [label="19: Call _fun_fun_r \n n$0=*&p:int * [line 33]\n n$1=_fun_fun_r(n$0:int &) [line 33]\n REMOVE_TEMPS(n$0,n$1); [line 33]\n NULLIFY(&p,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] 19 -> 18 ; -18 [label="18: Exit unbox_ptr \n " color=yellow style=filled] +18 [label="18: Exit unbox_ptr \n NULLIFY(&a,false); [line 34]\n " color=yellow style=filled] 17 [label="17: Start unbox_ptr\nFormals: \nLocals: p:int * a:int \n DECLARE_LOCALS(&return,&p,&a); [line 27]\n " color=yellow style=filled] @@ -42,11 +42,11 @@ digraph iCFG { 13 -> 12 ; -12 [label="12: Call _fun_fun_r \n n$0=*&r:int & [line 23]\n n$1=_fun_fun_r(n$0:int &) [line 23]\n REMOVE_TEMPS(n$0,n$1); [line 23]\n NULLIFY(&r,false); [line 23]\n NULLIFY(&a,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +12 [label="12: Call _fun_fun_r \n n$0=*&r:int & [line 23]\n n$1=_fun_fun_r(n$0:int &) [line 23]\n REMOVE_TEMPS(n$0,n$1); [line 23]\n NULLIFY(&r,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 12 -> 11 ; -11 [label="11: Exit unbox_ref \n " color=yellow style=filled] +11 [label="11: Exit unbox_ref \n NULLIFY(&a,false); [line 24]\n " color=yellow style=filled] 10 [label="10: Start unbox_ref\nFormals: \nLocals: r:int & a:int \n DECLARE_LOCALS(&return,&r,&a); [line 17]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/function.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/templates/function.cpp.dot index 42e2ec9da..af60919cf 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/templates/function.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/templates/function.cpp.dot @@ -29,11 +29,11 @@ digraph iCFG { 42 -> 41 ; -41 [label="41: Return Stmt \n n$0=_fun_getVal(&x3:class X3 &) [line 64]\n n$1=_fun_getVal(&x1:class X1 &) [line 64]\n *&return:int =(n$0 / n$1) [line 64]\n REMOVE_TEMPS(n$0,n$1); [line 64]\n NULLIFY(&x1,false); [line 64]\n NULLIFY(&x3,false); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="box"] +41 [label="41: Return Stmt \n n$0=_fun_getVal(&x3:class X3 &) [line 64]\n n$1=_fun_getVal(&x1:class X1 &) [line 64]\n *&return:int =(n$0 / n$1) [line 64]\n REMOVE_TEMPS(n$0,n$1); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="box"] 41 -> 40 ; -40 [label="40: Exit div1_get_val \n " color=yellow style=filled] +40 [label="40: Exit div1_get_val \n NULLIFY(&x3,false); [line 65]\n NULLIFY(&x1,false); [line 65]\n " color=yellow style=filled] 39 [label="39: Start div1_get_val\nFormals: \nLocals: x3:class X3 x1:class X1 \n DECLARE_LOCALS(&return,&x3,&x1); [line 61]\n " color=yellow style=filled] @@ -48,11 +48,11 @@ digraph iCFG { 37 -> 36 ; -36 [label="36: Return Stmt \n n$0=_fun_getVal(&x1:class X1 &) [line 58]\n n$1=_fun_getVal(&x3:class X3 &) [line 58]\n *&return:int =(n$0 / n$1) [line 58]\n REMOVE_TEMPS(n$0,n$1); [line 58]\n NULLIFY(&x1,false); [line 58]\n NULLIFY(&x3,false); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] +36 [label="36: Return Stmt \n n$0=_fun_getVal(&x1:class X1 &) [line 58]\n n$1=_fun_getVal(&x3:class X3 &) [line 58]\n *&return:int =(n$0 / n$1) [line 58]\n REMOVE_TEMPS(n$0,n$1); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] 36 -> 35 ; -35 [label="35: Exit div0_get_val \n " color=yellow style=filled] +35 [label="35: Exit div0_get_val \n NULLIFY(&x3,false); [line 59]\n NULLIFY(&x1,false); [line 59]\n " color=yellow style=filled] 34 [label="34: Start div0_get_val\nFormals: \nLocals: x3:class X3 x1:class X1 \n DECLARE_LOCALS(&return,&x3,&x1); [line 55]\n " color=yellow style=filled] @@ -85,11 +85,11 @@ digraph iCFG { 27 -> 26 ; -26 [label="26: Return Stmt \n n$0=_fun_getVal(&x:class X1 &) [line 36]\n *&return:int =n$0 [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n NULLIFY(&x,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +26 [label="26: Return Stmt \n n$0=_fun_getVal(&x:class X1 &) [line 36]\n *&return:int =n$0 [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 26 -> 25 ; -25 [label="25: Exit createAndGetVal \n " color=yellow style=filled] +25 [label="25: Exit createAndGetVal \n NULLIFY(&x,false); [line 37]\n " color=yellow style=filled] 24 [label="24: Start createAndGetVal\nFormals: \nLocals: x:class X1 \n DECLARE_LOCALS(&return,&x); [line 34]\n " color=yellow style=filled] @@ -100,11 +100,11 @@ digraph iCFG { 23 -> 22 ; -22 [label="22: Return Stmt \n n$0=_fun_getVal(&x:class X3 &) [line 36]\n *&return:int =n$0 [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n NULLIFY(&x,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +22 [label="22: Return Stmt \n n$0=_fun_getVal(&x:class X3 &) [line 36]\n *&return:int =n$0 [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 22 -> 21 ; -21 [label="21: Exit createAndGetVal \n " color=yellow style=filled] +21 [label="21: Exit createAndGetVal \n NULLIFY(&x,false); [line 37]\n " color=yellow style=filled] 20 [label="20: Start createAndGetVal\nFormals: \nLocals: x:class X3 \n DECLARE_LOCALS(&return,&x); [line 34]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/method.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/templates/method.cpp.dot index aca0595c8..9e100890f 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/templates/method.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/templates/method.cpp.dot @@ -11,11 +11,11 @@ digraph iCFG { 73 -> 72 ; -72 [label="72: Return Stmt \n n$0=*&g:class GetterTempl [line 74]\n n$1=_fun_GetterTempl_get(&g:class GetterTempl &,&x1_1:class X1 &,&x1_2:class X1 &) [line 74]\n *&return:int =(1 / n$1) [line 74]\n REMOVE_TEMPS(n$0,n$1); [line 74]\n NULLIFY(&g,false); [line 74]\n NULLIFY(&x1_1,false); [line 74]\n NULLIFY(&x1_2,false); [line 74]\n APPLY_ABSTRACTION; [line 74]\n " shape="box"] +72 [label="72: Return Stmt \n n$0=*&g:class GetterTempl [line 74]\n n$1=_fun_GetterTempl_get(&g:class GetterTempl &,&x1_1:class X1 &,&x1_2:class X1 &) [line 74]\n *&return:int =(1 / n$1) [line 74]\n REMOVE_TEMPS(n$0,n$1); [line 74]\n APPLY_ABSTRACTION; [line 74]\n " shape="box"] 72 -> 71 ; -71 [label="71: Exit div1_getter_templ2 \n " color=yellow style=filled] +71 [label="71: Exit div1_getter_templ2 \n NULLIFY(&x1_2,false); [line 75]\n NULLIFY(&x1_1,false); [line 75]\n NULLIFY(&g,false); [line 75]\n " color=yellow style=filled] 70 [label="70: Start div1_getter_templ2\nFormals: \nLocals: g:class GetterTempl x1_2:class X1 x1_1:class X1 \n DECLARE_LOCALS(&return,&g,&x1_2,&x1_1); [line 70]\n " color=yellow style=filled] @@ -34,11 +34,11 @@ digraph iCFG { 67 -> 66 ; -66 [label="66: Return Stmt \n n$0=*&g:class GetterTempl [line 67]\n n$1=_fun_GetterTempl_get(&g:class GetterTempl &,&x2:class X2 &,&x1:class X1 &) [line 67]\n *&return:int =(1 / n$1) [line 67]\n REMOVE_TEMPS(n$0,n$1); [line 67]\n NULLIFY(&g,false); [line 67]\n NULLIFY(&x1,false); [line 67]\n NULLIFY(&x2,false); [line 67]\n APPLY_ABSTRACTION; [line 67]\n " shape="box"] +66 [label="66: Return Stmt \n n$0=*&g:class GetterTempl [line 67]\n n$1=_fun_GetterTempl_get(&g:class GetterTempl &,&x2:class X2 &,&x1:class X1 &) [line 67]\n *&return:int =(1 / n$1) [line 67]\n REMOVE_TEMPS(n$0,n$1); [line 67]\n APPLY_ABSTRACTION; [line 67]\n " shape="box"] 66 -> 65 ; -65 [label="65: Exit div1_getter_templ \n " color=yellow style=filled] +65 [label="65: Exit div1_getter_templ \n NULLIFY(&x2,false); [line 68]\n NULLIFY(&x1,false); [line 68]\n NULLIFY(&g,false); [line 68]\n " color=yellow style=filled] 64 [label="64: Start div1_getter_templ\nFormals: \nLocals: g:class GetterTempl x2:class X2 x1:class X1 \n DECLARE_LOCALS(&return,&g,&x2,&x1); [line 63]\n " color=yellow style=filled] @@ -57,11 +57,11 @@ digraph iCFG { 61 -> 60 ; -60 [label="60: Return Stmt \n n$0=*&g:class GetterTempl [line 60]\n n$1=_fun_GetterTempl_get(&g:class GetterTempl &,&x2_1:class X2 &,&x2_2:class X2 &) [line 60]\n *&return:int =(1 / n$1) [line 60]\n REMOVE_TEMPS(n$0,n$1); [line 60]\n NULLIFY(&g,false); [line 60]\n NULLIFY(&x2_1,false); [line 60]\n NULLIFY(&x2_2,false); [line 60]\n APPLY_ABSTRACTION; [line 60]\n " shape="box"] +60 [label="60: Return Stmt \n n$0=*&g:class GetterTempl [line 60]\n n$1=_fun_GetterTempl_get(&g:class GetterTempl &,&x2_1:class X2 &,&x2_2:class X2 &) [line 60]\n *&return:int =(1 / n$1) [line 60]\n REMOVE_TEMPS(n$0,n$1); [line 60]\n APPLY_ABSTRACTION; [line 60]\n " shape="box"] 60 -> 59 ; -59 [label="59: Exit div0_getter_templ2 \n " color=yellow style=filled] +59 [label="59: Exit div0_getter_templ2 \n NULLIFY(&x2_2,false); [line 61]\n NULLIFY(&x2_1,false); [line 61]\n NULLIFY(&g,false); [line 61]\n " color=yellow style=filled] 58 [label="58: Start div0_getter_templ2\nFormals: \nLocals: g:class GetterTempl x2_2:class X2 x2_1:class X2 \n DECLARE_LOCALS(&return,&g,&x2_2,&x2_1); [line 56]\n " color=yellow style=filled] @@ -80,11 +80,11 @@ digraph iCFG { 55 -> 54 ; -54 [label="54: Return Stmt \n n$0=*&g:class GetterTempl [line 53]\n n$1=_fun_GetterTempl_get(&g:class GetterTempl &,&x3:class X3 &,&x2:class X2 &) [line 53]\n *&return:int =(1 / n$1) [line 53]\n REMOVE_TEMPS(n$0,n$1); [line 53]\n NULLIFY(&g,false); [line 53]\n NULLIFY(&x2,false); [line 53]\n NULLIFY(&x3,false); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"] +54 [label="54: Return Stmt \n n$0=*&g:class GetterTempl [line 53]\n n$1=_fun_GetterTempl_get(&g:class GetterTempl &,&x3:class X3 &,&x2:class X2 &) [line 53]\n *&return:int =(1 / n$1) [line 53]\n REMOVE_TEMPS(n$0,n$1); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"] 54 -> 53 ; -53 [label="53: Exit div0_getter_templ \n " color=yellow style=filled] +53 [label="53: Exit div0_getter_templ \n NULLIFY(&x3,false); [line 54]\n NULLIFY(&x2,false); [line 54]\n NULLIFY(&g,false); [line 54]\n " color=yellow style=filled] 52 [label="52: Start div0_getter_templ\nFormals: \nLocals: g:class GetterTempl x3:class X3 x2:class X2 \n DECLARE_LOCALS(&return,&g,&x3,&x2); [line 49]\n " color=yellow style=filled] @@ -99,11 +99,11 @@ digraph iCFG { 50 -> 49 ; -49 [label="49: Return Stmt \n n$0=*&g:class Getter [line 46]\n n$1=_fun_Getter_get(&g:class Getter &,&x1:class X1 &) [line 46]\n *&return:int =(1 / n$1) [line 46]\n REMOVE_TEMPS(n$0,n$1); [line 46]\n NULLIFY(&g,false); [line 46]\n NULLIFY(&x1,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] +49 [label="49: Return Stmt \n n$0=*&g:class Getter [line 46]\n n$1=_fun_Getter_get(&g:class Getter &,&x1:class X1 &) [line 46]\n *&return:int =(1 / n$1) [line 46]\n REMOVE_TEMPS(n$0,n$1); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] 49 -> 48 ; -48 [label="48: Exit div1_getter \n " color=yellow style=filled] +48 [label="48: Exit div1_getter \n NULLIFY(&x1,false); [line 47]\n NULLIFY(&g,false); [line 47]\n " color=yellow style=filled] 47 [label="47: Start div1_getter\nFormals: \nLocals: g:class Getter x1:class X1 \n DECLARE_LOCALS(&return,&g,&x1); [line 43]\n " color=yellow style=filled] @@ -118,11 +118,11 @@ digraph iCFG { 45 -> 44 ; -44 [label="44: Return Stmt \n n$0=*&g:class Getter [line 40]\n n$1=_fun_Getter_get(&g:class Getter &,&x2:class X2 &) [line 40]\n *&return:int =(1 / n$1) [line 40]\n REMOVE_TEMPS(n$0,n$1); [line 40]\n NULLIFY(&g,false); [line 40]\n NULLIFY(&x2,false); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"] +44 [label="44: Return Stmt \n n$0=*&g:class Getter [line 40]\n n$1=_fun_Getter_get(&g:class Getter &,&x2:class X2 &) [line 40]\n *&return:int =(1 / n$1) [line 40]\n REMOVE_TEMPS(n$0,n$1); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"] 44 -> 43 ; -43 [label="43: Exit div0_getter \n " color=yellow style=filled] +43 [label="43: Exit div0_getter \n NULLIFY(&x2,false); [line 41]\n NULLIFY(&g,false); [line 41]\n " color=yellow style=filled] 42 [label="42: Start div0_getter\nFormals: \nLocals: g:class Getter x2:class X2 \n DECLARE_LOCALS(&return,&g,&x2); [line 37]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/sizeof_pack.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/templates/sizeof_pack.cpp.dot index 6ac74b156..d0d2f0a00 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/templates/sizeof_pack.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/templates/sizeof_pack.cpp.dot @@ -8,7 +8,7 @@ digraph iCFG { 10 -> 5 ; -9 [label="9: Prune (false branch) \n PRUNE(((_t$0 == 0) == 0), false); [line 17]\n " shape="invhouse"] +9 [label="9: Prune (false branch) \n PRUNE(((_t$0 == 0) == 0), false); [line 17]\n NULLIFY(&seed,false); [line 17]\n " shape="invhouse"] 9 -> 7 ; @@ -20,7 +20,7 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: Return Stmt \n NULLIFY(&seed,false); [line 20]\n *&return:int =0 [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] +6 [label="6: Return Stmt \n *&return:int =0 [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] 6 -> 5 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/inheritance_field.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/types/inheritance_field.cpp.dot index fd4f8a8ee..4f85f5280 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/inheritance_field.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/inheritance_field.cpp.dot @@ -79,11 +79,11 @@ digraph iCFG { 21 -> 20 ; -20 [label="20: Return Stmt \n n$0=*&b:class Base1 & [line 46]\n n$1=*n$0.b1:int [line 46]\n *&return:int =(1 / n$1) [line 46]\n REMOVE_TEMPS(n$0,n$1); [line 46]\n NULLIFY(&b,false); [line 46]\n NULLIFY(&s,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] +20 [label="20: Return Stmt \n n$0=*&b:class Base1 & [line 46]\n n$1=*n$0.b1:int [line 46]\n *&return:int =(1 / n$1) [line 46]\n REMOVE_TEMPS(n$0,n$1); [line 46]\n NULLIFY(&b,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] 20 -> 19 ; -19 [label="19: Exit div0_cast_ref \n " color=yellow style=filled] +19 [label="19: Exit div0_cast_ref \n NULLIFY(&s,false); [line 47]\n " color=yellow style=filled] 18 [label="18: Start div0_cast_ref\nFormals: s:class Sub \nLocals: b:class Base1 & \n DECLARE_LOCALS(&return,&b); [line 43]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/return_struct.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/types/return_struct.cpp.dot index b3a9dc46a..cb7b2cf57 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/return_struct.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/return_struct.cpp.dot @@ -1,20 +1,20 @@ digraph iCFG { -35 [label="35: Return Stmt \n _fun_get(1:int ,&__temp_return_n$1:class X *) [line 44]\n n$2=_fun_X_div(&__temp_return_n$1:class X &) [line 44]\n *&return:int =n$2 [line 44]\n REMOVE_TEMPS(n$2); [line 44]\n NULLIFY(&__temp_return_n$1,false); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] +35 [label="35: Return Stmt \n _fun_get(1:int ,&__temp_return_n$1:class X *) [line 44]\n n$2=_fun_X_div(&__temp_return_n$1:class X &) [line 44]\n *&return:int =n$2 [line 44]\n REMOVE_TEMPS(n$2); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] 35 -> 34 ; -34 [label="34: Exit get_method_div1 \n " color=yellow style=filled] +34 [label="34: Exit get_method_div1 \n NULLIFY(&__temp_return_n$1,false); [line 44]\n " color=yellow style=filled] 33 [label="33: Start get_method_div1\nFormals: \nLocals: __temp_return_n$1:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 44]\n " color=yellow style=filled] 33 -> 35 ; -32 [label="32: Return Stmt \n _fun_get(1:int ,&__temp_return_n$1:class X *) [line 42]\n n$2=*&__temp_return_n$1.f:int [line 42]\n *&return:int =(1 / n$2) [line 42]\n REMOVE_TEMPS(n$2); [line 42]\n NULLIFY(&__temp_return_n$1,false); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] +32 [label="32: Return Stmt \n _fun_get(1:int ,&__temp_return_n$1:class X *) [line 42]\n n$2=*&__temp_return_n$1.f:int [line 42]\n *&return:int =(1 / n$2) [line 42]\n REMOVE_TEMPS(n$2); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] 32 -> 31 ; -31 [label="31: Exit get_field_div1 \n " color=yellow style=filled] +31 [label="31: Exit get_field_div1 \n NULLIFY(&__temp_return_n$1,false); [line 42]\n " color=yellow style=filled] 30 [label="30: Start get_field_div1\nFormals: \nLocals: __temp_return_n$1:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 42]\n " color=yellow style=filled] @@ -25,22 +25,22 @@ digraph iCFG { 29 -> 28 ; -28 [label="28: Return Stmt \n n$0=*&x.f:int [line 39]\n *&return:int =(1 / n$0) [line 39]\n REMOVE_TEMPS(n$0); [line 39]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 39]\n NULLIFY(&x,false); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="box"] +28 [label="28: Return Stmt \n n$0=*&x.f:int [line 39]\n *&return:int =(1 / n$0) [line 39]\n REMOVE_TEMPS(n$0); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="box"] 28 -> 27 ; -27 [label="27: Exit get_div1 \n " color=yellow style=filled] +27 [label="27: Exit get_div1 \n NULLIFY(&x,false); [line 40]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 40]\n " color=yellow style=filled] 26 [label="26: Start get_div1\nFormals: \nLocals: x:class X SIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&x,&SIL_materialize_temp__n$1); [line 37]\n " color=yellow style=filled] 26 -> 29 ; -25 [label="25: Return Stmt \n _fun_get(0:int ,&__temp_return_n$1:class X *) [line 35]\n n$2=_fun_X_div(&__temp_return_n$1:class X &) [line 35]\n *&return:int =n$2 [line 35]\n REMOVE_TEMPS(n$2); [line 35]\n NULLIFY(&__temp_return_n$1,false); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] +25 [label="25: Return Stmt \n _fun_get(0:int ,&__temp_return_n$1:class X *) [line 35]\n n$2=_fun_X_div(&__temp_return_n$1:class X &) [line 35]\n *&return:int =n$2 [line 35]\n REMOVE_TEMPS(n$2); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] 25 -> 24 ; -24 [label="24: Exit get_method_div0 \n " color=yellow style=filled] +24 [label="24: Exit get_method_div0 \n NULLIFY(&__temp_return_n$1,false); [line 35]\n " color=yellow style=filled] 23 [label="23: Start get_method_div0\nFormals: \nLocals: __temp_return_n$1:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 35]\n " color=yellow style=filled] @@ -51,11 +51,11 @@ digraph iCFG { 22 -> 21 ; -21 [label="21: Return Stmt \n _fun_get(0:int ,&__temp_return_n$1:class X *) [line 32]\n n$2=*&__temp_return_n$1.f:int [line 32]\n *&return:int =(1 / n$2) [line 32]\n REMOVE_TEMPS(n$2); [line 32]\n NULLIFY(&__temp_return_n$1,false); [line 32]\n NULLIFY(&__temp_return_n$4,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] +21 [label="21: Return Stmt \n _fun_get(0:int ,&__temp_return_n$1:class X *) [line 32]\n n$2=*&__temp_return_n$1.f:int [line 32]\n *&return:int =(1 / n$2) [line 32]\n REMOVE_TEMPS(n$2); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] 21 -> 20 ; -20 [label="20: Exit get_field_div0 \n " color=yellow style=filled] +20 [label="20: Exit get_field_div0 \n NULLIFY(&__temp_return_n$4,false); [line 33]\n NULLIFY(&__temp_return_n$1,false); [line 33]\n " color=yellow style=filled] 19 [label="19: Start get_field_div0\nFormals: \nLocals: __temp_return_n$1:class X __temp_return_n$4:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1,&__temp_return_n$4); [line 30]\n " color=yellow style=filled] @@ -66,11 +66,11 @@ digraph iCFG { 18 -> 17 ; -17 [label="17: Return Stmt \n n$0=*&x.f:int [line 27]\n *&return:int =(1 / n$0) [line 27]\n REMOVE_TEMPS(n$0); [line 27]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 27]\n NULLIFY(&x,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +17 [label="17: Return Stmt \n n$0=*&x.f:int [line 27]\n *&return:int =(1 / n$0) [line 27]\n REMOVE_TEMPS(n$0); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] 17 -> 16 ; -16 [label="16: Exit get_div0 \n " color=yellow style=filled] +16 [label="16: Exit get_div0 \n NULLIFY(&x,false); [line 28]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 28]\n " color=yellow style=filled] 15 [label="15: Start get_div0\nFormals: \nLocals: x:class X SIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&x,&SIL_materialize_temp__n$1); [line 25]\n " color=yellow style=filled] @@ -85,11 +85,11 @@ digraph iCFG { 13 -> 12 ; -12 [label="12: Return Stmt \n n$0=*&__return_param:class X * [line 22]\n _fun_X_X(n$0:class X *,&x:class X &) [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&__return_param,false); [line 22]\n NULLIFY(&x,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +12 [label="12: Return Stmt \n n$0=*&__return_param:class X * [line 22]\n _fun_X_X(n$0:class X *,&x:class X &) [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&__return_param,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 12 -> 11 ; -11 [label="11: Exit get \n " color=yellow style=filled] +11 [label="11: Exit get \n NULLIFY(&x,false); [line 23]\n " color=yellow style=filled] 10 [label="10: Start get\nFormals: a:int __return_param:class X *\nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 19]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/struct_forward_declare.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/types/struct_forward_declare.cpp.dot index 23ed03a6d..aee855f20 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/struct_forward_declare.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/struct_forward_declare.cpp.dot @@ -22,11 +22,11 @@ digraph iCFG { 36 -> 35 ; -35 [label="35: Return Stmt \n n$0=*&z:class Z [line 58]\n n$1=_fun_Z_getF(&z:class Z &) [line 58]\n *&return:int =(1 / n$1) [line 58]\n REMOVE_TEMPS(n$0,n$1); [line 58]\n NULLIFY(&z,false); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] +35 [label="35: Return Stmt \n n$0=*&z:class Z [line 58]\n n$1=_fun_Z_getF(&z:class Z &) [line 58]\n *&return:int =(1 / n$1) [line 58]\n REMOVE_TEMPS(n$0,n$1); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] 35 -> 34 ; -34 [label="34: Exit Z_div0 \n " color=yellow style=filled] +34 [label="34: Exit Z_div0 \n NULLIFY(&z,false); [line 59]\n " color=yellow style=filled] 33 [label="33: Start Z_div0\nFormals: \nLocals: z:class Z \n DECLARE_LOCALS(&return,&z); [line 55]\n " color=yellow style=filled] @@ -46,7 +46,7 @@ digraph iCFG { 30 -> 27 ; 30 -> 28 ; -29 [label="29: Return Stmt \n *&return:int =1 [line 50]\n NULLIFY(&x,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] +29 [label="29: Return Stmt \n *&return:int =1 [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] 29 -> 24 ; @@ -62,11 +62,11 @@ digraph iCFG { 26 -> 25 ; -25 [label="25: Return Stmt \n n$0=*&x:class X [line 52]\n n$1=_fun_X_getF(&x:class X &) [line 52]\n *&return:int =(1 / n$1) [line 52]\n REMOVE_TEMPS(n$0,n$1); [line 52]\n NULLIFY(&x,false); [line 52]\n APPLY_ABSTRACTION; [line 52]\n " shape="box"] +25 [label="25: Return Stmt \n n$0=*&x:class X [line 52]\n n$1=_fun_X_getF(&x:class X &) [line 52]\n *&return:int =(1 / n$1) [line 52]\n REMOVE_TEMPS(n$0,n$1); [line 52]\n APPLY_ABSTRACTION; [line 52]\n " shape="box"] 25 -> 24 ; -24 [label="24: Exit X_Y_div0 \n " color=yellow style=filled] +24 [label="24: Exit X_Y_div0 \n NULLIFY(&x,false); [line 53]\n " color=yellow style=filled] 23 [label="23: Start X_Y_div0\nFormals: \nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 45]\n " color=yellow style=filled] @@ -96,11 +96,11 @@ digraph iCFG { 17 -> 16 ; -16 [label="16: Return Stmt \n n$0=*&x:class X [line 37]\n n$1=_fun_X_getF(&x:class X &) [line 37]\n *&return:int =(1 / n$1) [line 37]\n REMOVE_TEMPS(n$0,n$1); [line 37]\n NULLIFY(&x,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] +16 [label="16: Return Stmt \n n$0=*&x:class X [line 37]\n n$1=_fun_X_getF(&x:class X &) [line 37]\n *&return:int =(1 / n$1) [line 37]\n REMOVE_TEMPS(n$0,n$1); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] 16 -> 15 ; -15 [label="15: Exit X_div0 \n " color=yellow style=filled] +15 [label="15: Exit X_div0 \n NULLIFY(&x,false); [line 38]\n " color=yellow style=filled] 14 [label="14: Start X_div0\nFormals: \nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 34]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/typeid_expr.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/types/typeid_expr.cpp.dot index 82e10cc9a..c3222bd79 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/typeid_expr.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/typeid_expr.cpp.dot @@ -3,11 +3,11 @@ digraph iCFG { 70 -> 65 ; -69 [label="69: Return Stmt \n *&return:int =(1 / 0) [line 67]\n NULLIFY(&person,false); [line 67]\n APPLY_ABSTRACTION; [line 67]\n " shape="box"] +69 [label="69: Return Stmt \n *&return:int =(1 / 0) [line 67]\n APPLY_ABSTRACTION; [line 67]\n " shape="box"] 69 -> 62 ; -68 [label="68: Return Stmt \n *&return:int =1 [line 65]\n NULLIFY(&person,false); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"] +68 [label="68: Return Stmt \n *&return:int =1 [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"] 68 -> 62 ; @@ -24,7 +24,7 @@ digraph iCFG { 65 -> 66 ; 65 -> 67 ; -64 [label="64: between_join_and_exit \n NULLIFY(&person,false); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="box"] +64 [label="64: between_join_and_exit \n APPLY_ABSTRACTION; [line 64]\n " shape="box"] 64 -> 62 ; @@ -32,7 +32,7 @@ digraph iCFG { 63 -> 64 ; -62 [label="62: Exit template_type_id_person \n " color=yellow style=filled] +62 [label="62: Exit template_type_id_person \n NULLIFY(&person,false); [line 68]\n " color=yellow style=filled] 61 [label="61: Start template_type_id_person\nFormals: \nLocals: person:class Person \n DECLARE_LOCALS(&return,&person); [line 62]\n " color=yellow style=filled] @@ -43,11 +43,11 @@ digraph iCFG { 60 -> 59 ; -59 [label="59: Return Stmt \n n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ) [line 59]\n n$1=*n$0:class std::type_info [line 59]\n n$2=_fun_std::type_info_name(n$0:class std::type_info &) [line 59]\n *&return:char *=n$2 [line 59]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 59]\n NULLIFY(&SIL_materialize_temp__n$3,false); [line 59]\n NULLIFY(&result,false); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] +59 [label="59: Return Stmt \n n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ) [line 59]\n n$1=*n$0:class std::type_info [line 59]\n n$2=_fun_std::type_info_name(n$0:class std::type_info &) [line 59]\n *&return:char *=n$2 [line 59]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] 59 -> 58 ; -58 [label="58: Exit template_typeid \n " color=yellow style=filled] +58 [label="58: Exit template_typeid \n NULLIFY(&result,false); [line 60]\n NULLIFY(&SIL_materialize_temp__n$3,false); [line 60]\n " color=yellow style=filled] 57 [label="57: Start template_typeid\nFormals: value:class Person &\nLocals: result:class Person SIL_materialize_temp__n$3:class Person \n DECLARE_LOCALS(&return,&result,&SIL_materialize_temp__n$3); [line 57]\n " color=yellow style=filled] @@ -58,11 +58,11 @@ digraph iCFG { 56 -> 51 ; -55 [label="55: Return Stmt \n *&return:int =0 [line 53]\n NULLIFY(&person,false); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"] +55 [label="55: Return Stmt \n *&return:int =0 [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"] 55 -> 48 ; -54 [label="54: Return Stmt \n *&return:int =(1 / 0) [line 51]\n NULLIFY(&person,false); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] +54 [label="54: Return Stmt \n *&return:int =(1 / 0) [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] 54 -> 48 ; @@ -79,7 +79,7 @@ digraph iCFG { 51 -> 52 ; 51 -> 53 ; -50 [label="50: between_join_and_exit \n NULLIFY(&ptr,false); [line 50]\n NULLIFY(&person,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] +50 [label="50: between_join_and_exit \n APPLY_ABSTRACTION; [line 50]\n " shape="box"] 50 -> 48 ; @@ -87,7 +87,7 @@ digraph iCFG { 49 -> 50 ; -48 [label="48: Exit person_ptr_typeid \n " color=yellow style=filled] +48 [label="48: Exit person_ptr_typeid \n NULLIFY(&person,false); [line 54]\n " color=yellow style=filled] 47 [label="47: Start person_ptr_typeid\nFormals: ptr:class Person *\nLocals: person:class Person \n DECLARE_LOCALS(&return,&person); [line 48]\n " color=yellow style=filled] @@ -102,11 +102,11 @@ digraph iCFG { 45 -> 40 ; -44 [label="44: Return Stmt \n *&return:int =0 [line 45]\n NULLIFY(&employee,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] +44 [label="44: Return Stmt \n *&return:int =0 [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] 44 -> 37 ; -43 [label="43: Return Stmt \n *&return:int =(1 / 0) [line 43]\n NULLIFY(&employee,false); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] +43 [label="43: Return Stmt \n *&return:int =(1 / 0) [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] 43 -> 37 ; @@ -123,7 +123,7 @@ digraph iCFG { 40 -> 41 ; 40 -> 42 ; -39 [label="39: between_join_and_exit \n NULLIFY(&ptr,false); [line 42]\n NULLIFY(&employee,false); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] +39 [label="39: between_join_and_exit \n APPLY_ABSTRACTION; [line 42]\n " shape="box"] 39 -> 37 ; @@ -131,7 +131,7 @@ digraph iCFG { 38 -> 39 ; -37 [label="37: Exit employee_typeid \n " color=yellow style=filled] +37 [label="37: Exit employee_typeid \n NULLIFY(&employee,false); [line 46]\n " color=yellow style=filled] 36 [label="36: Start employee_typeid\nFormals: \nLocals: ptr:class Person * employee:class Employee \n DECLARE_LOCALS(&return,&ptr,&employee); [line 39]\n " color=yellow style=filled] @@ -154,11 +154,11 @@ digraph iCFG { 32 -> 27 ; -31 [label="31: Return Stmt \n *&return:int =(1 / 0) [line 36]\n NULLIFY(&person,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +31 [label="31: Return Stmt \n *&return:int =(1 / 0) [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 31 -> 24 ; -30 [label="30: Return Stmt \n *&return:int =0 [line 34]\n NULLIFY(&person,false); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] +30 [label="30: Return Stmt \n *&return:int =0 [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] 30 -> 24 ; @@ -175,7 +175,7 @@ digraph iCFG { 27 -> 28 ; 27 -> 29 ; -26 [label="26: between_join_and_exit \n NULLIFY(&person_type_info,false); [line 33]\n NULLIFY(&t,false); [line 33]\n NULLIFY(&t_type_info,false); [line 33]\n NULLIFY(&person,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] +26 [label="26: between_join_and_exit \n APPLY_ABSTRACTION; [line 33]\n " shape="box"] 26 -> 24 ; @@ -183,7 +183,7 @@ digraph iCFG { 25 -> 26 ; -24 [label="24: Exit person_typeid_name \n " color=yellow style=filled] +24 [label="24: Exit person_typeid_name \n NULLIFY(&person,false); [line 37]\n " color=yellow style=filled] 23 [label="23: Start person_typeid_name\nFormals: \nLocals: person_type_info:char * t_type_info:char * t:int person:class Person \n DECLARE_LOCALS(&return,&person_type_info,&t_type_info,&t,&person); [line 28]\n " color=yellow style=filled] @@ -198,11 +198,11 @@ digraph iCFG { 21 -> 16 ; -20 [label="20: Return Stmt \n *&return:int =(1 / 0) [line 25]\n NULLIFY(&person,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +20 [label="20: Return Stmt \n *&return:int =(1 / 0) [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 20 -> 13 ; -19 [label="19: Return Stmt \n *&return:int =1 [line 23]\n NULLIFY(&person,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +19 [label="19: Return Stmt \n *&return:int =1 [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 19 -> 13 ; @@ -219,7 +219,7 @@ digraph iCFG { 16 -> 17 ; 16 -> 18 ; -15 [label="15: between_join_and_exit \n NULLIFY(&t,false); [line 22]\n NULLIFY(&person,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +15 [label="15: between_join_and_exit \n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 15 -> 13 ; @@ -227,7 +227,7 @@ digraph iCFG { 14 -> 15 ; -13 [label="13: Exit person_typeid \n " color=yellow style=filled] +13 [label="13: Exit person_typeid \n NULLIFY(&person,false); [line 26]\n " color=yellow style=filled] 12 [label="12: Start person_typeid\nFormals: \nLocals: t:int person:class Person \n DECLARE_LOCALS(&return,&t,&person); [line 19]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/java/infer/ResourceLeaks.java b/infer/tests/codetoanalyze/java/infer/ResourceLeaks.java index 33dd7b410..e1db9eb47 100644 --- a/infer/tests/codetoanalyze/java/infer/ResourceLeaks.java +++ b/infer/tests/codetoanalyze/java/infer/ResourceLeaks.java @@ -80,8 +80,14 @@ public class ResourceLeaks { fis.close(); } + public void fileOutputStreamOneLeak() throws IOException { + FileOutputStream fis = new FileOutputStream("file.txt"); + if (fis != null) { + } else { + } + } - public int fileOutputStreamTwoLeaks(boolean ok) throws IOException { + public int fileOutputStreamTwoLeaks1(boolean ok) throws IOException { FileOutputStream fis = new FileOutputStream("file.txt"); if (ok) { fis.write(1); @@ -92,6 +98,14 @@ public class ResourceLeaks { } } + public void fileOutputStreamTwoLeaks2() throws IOException { + FileOutputStream fis = new FileOutputStream("file.txt"); + if (fis != null) { + } else { + } + fis = new FileOutputStream("x"); + } + //TwoResources tests public static void twoResources() throws IOException { diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.dot index d41d67038..d7d7757f7 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.dot @@ -50,11 +50,11 @@ digraph iCFG { 25 -> 24 ; -24 [label="24: Return Stmt \n *&return:int =0 [line 56]\n NULLIFY(&s1,false); [line 56]\n NULLIFY(&s2,false); [line 56]\n NULLIFY(&s3,false); [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"] +24 [label="24: Return Stmt \n *&return:int =0 [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"] 24 -> 23 ; -23 [label="23: Exit test2 \n " color=yellow style=filled] +23 [label="23: Exit test2 \n NULLIFY(&s3,false); [line 57]\n NULLIFY(&s2,false); [line 57]\n NULLIFY(&s1,false); [line 57]\n " color=yellow style=filled] 22 [label="22: Start test2\nFormals: \nLocals: s3:class A * s2:class A * s1:class A * \n DECLARE_LOCALS(&return,&s3,&s2,&s1); [line 47]\n " color=yellow style=filled] @@ -93,11 +93,11 @@ digraph iCFG { 14 -> 13 ; -13 [label="13: Return Stmt \n *&return:int =0 [line 44]\n NULLIFY(&s1,false); [line 44]\n NULLIFY(&s2,false); [line 44]\n NULLIFY(&s3,false); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] +13 [label="13: Return Stmt \n *&return:int =0 [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] 13 -> 12 ; -12 [label="12: Exit test1 \n " color=yellow style=filled] +12 [label="12: Exit test1 \n NULLIFY(&s3,false); [line 45]\n NULLIFY(&s2,false); [line 45]\n NULLIFY(&s1,false); [line 45]\n " color=yellow style=filled] 11 [label="11: Start test1\nFormals: \nLocals: s3:class A * s2:class A * s1:class A * \n DECLARE_LOCALS(&return,&s3,&s2,&s1); [line 34]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.dot index 487dbe7e9..fb674a5d0 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.dot @@ -7,7 +7,7 @@ digraph iCFG { 72 -> 71 ; -71 [label="71: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2); [line 105]\n n$56=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2 ):unsigned long ) [line 105]\n *&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2:class __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2 =n$56 [line 105]\n n$57=*&x:int * [line 105]\n *n$56.x:int *=n$57 [line 105]\n n$51=*&x:int * [line 105]\n *&blk:_fn_ (*)=(_fun___objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2,n$51) [line 105]\n REMOVE_TEMPS(n$56,n$57,n$51); [line 105]\n NULLIFY(&x,false); [line 105]\n " shape="box"] +71 [label="71: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2); [line 105]\n n$56=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2 ):unsigned long ) [line 105]\n *&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2:class __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2 =n$56 [line 105]\n n$57=*&x:int * [line 105]\n *n$56.x:int *=n$57 [line 105]\n n$51=*&x:int * [line 105]\n *&blk:_fn_ (*)=(_fun___objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2,n$51) [line 105]\n REMOVE_TEMPS(n$56,n$57,n$51); [line 105]\n NULLIFY(&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2,false); [line 105]\n NULLIFY(&x,false); [line 105]\n " shape="box"] 71 -> 65 ; @@ -30,7 +30,7 @@ digraph iCFG { 66 -> 70 ; -65 [label="65: Return Stmt \n n$49=*&blk:_fn_ (*) [line 110]\n n$50=n$49() [line 110]\n *&return:int =n$50 [line 110]\n REMOVE_TEMPS(n$49,n$50); [line 110]\n NULLIFY(&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2,true); [line 110]\n NULLIFY(&blk,false); [line 110]\n APPLY_ABSTRACTION; [line 110]\n " shape="box"] +65 [label="65: Return Stmt \n n$49=*&blk:_fn_ (*) [line 110]\n n$50=n$49() [line 110]\n *&return:int =n$50 [line 110]\n REMOVE_TEMPS(n$49,n$50); [line 110]\n NULLIFY(&blk,false); [line 110]\n APPLY_ABSTRACTION; [line 110]\n " shape="box"] 65 -> 64 ; @@ -49,7 +49,7 @@ digraph iCFG { 61 -> 60 ; -60 [label="60: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1); [line 96]\n n$45=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1 ):unsigned long ) [line 96]\n *&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1:class __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1 =n$45 [line 96]\n n$46=*&x:int * [line 96]\n *n$45.x:int *=n$46 [line 96]\n n$42=*&x:int * [line 96]\n *&blk:_fn_ (*)=(_fun___objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1,n$42) [line 96]\n REMOVE_TEMPS(n$45,n$46,n$42); [line 96]\n NULLIFY(&x,false); [line 96]\n " shape="box"] +60 [label="60: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1); [line 96]\n n$45=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1 ):unsigned long ) [line 96]\n *&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1:class __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1 =n$45 [line 96]\n n$46=*&x:int * [line 96]\n *n$45.x:int *=n$46 [line 96]\n n$42=*&x:int * [line 96]\n *&blk:_fn_ (*)=(_fun___objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1,n$42) [line 96]\n REMOVE_TEMPS(n$45,n$46,n$42); [line 96]\n NULLIFY(&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1,false); [line 96]\n NULLIFY(&x,false); [line 96]\n " shape="box"] 60 -> 56 ; @@ -64,7 +64,7 @@ digraph iCFG { 57 -> 59 ; -56 [label="56: Return Stmt \n n$40=*&blk:_fn_ (*) [line 99]\n n$41=n$40() [line 99]\n *&return:int =n$41 [line 99]\n REMOVE_TEMPS(n$40,n$41); [line 99]\n NULLIFY(&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1,true); [line 99]\n NULLIFY(&blk,false); [line 99]\n APPLY_ABSTRACTION; [line 99]\n " shape="box"] +56 [label="56: Return Stmt \n n$40=*&blk:_fn_ (*) [line 99]\n n$41=n$40() [line 99]\n *&return:int =n$41 [line 99]\n REMOVE_TEMPS(n$40,n$41); [line 99]\n NULLIFY(&blk,false); [line 99]\n APPLY_ABSTRACTION; [line 99]\n " shape="box"] 56 -> 55 ; @@ -150,7 +150,7 @@ digraph iCFG { 34 -> 36 ; -33 [label="33: DeclStmt \n n$26=*&rect:struct CGRect [line 59]\n n$27=_fun_CGRectGetHeight(n$26:struct CGRect ) [line 59]\n *&lineThickness:double =(0.200000 * n$27) [line 59]\n REMOVE_TEMPS(n$26,n$27); [line 59]\n NULLIFY(&rect,false); [line 59]\n NULLIFY(&lineThickness,false); [line 59]\n " shape="box"] +33 [label="33: DeclStmt \n n$26=*&rect:struct CGRect [line 59]\n n$27=_fun_CGRectGetHeight(n$26:struct CGRect ) [line 59]\n *&lineThickness:double =(0.200000 * n$27) [line 59]\n REMOVE_TEMPS(n$26,n$27); [line 59]\n NULLIFY(&lineThickness,false); [line 59]\n NULLIFY(&rect,false); [line 59]\n " shape="box"] 33 -> 32 ; diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.dot index 3252e18b8..cb382194f 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.dot @@ -3,7 +3,7 @@ digraph iCFG { 33 -> 29 ; -32 [label="32: Prune (false branch) \n n$0=*&a:class A * [line 64]\n PRUNE((n$0 == 0), false); [line 64]\n REMOVE_TEMPS(n$0); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="invhouse"] +32 [label="32: Prune (false branch) \n n$0=*&a:class A * [line 64]\n PRUNE((n$0 == 0), false); [line 64]\n REMOVE_TEMPS(n$0); [line 64]\n NULLIFY(&a,false); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="invhouse"] 32 -> 29 ; @@ -11,7 +11,7 @@ digraph iCFG { 31 -> 33 ; -30 [label="30: between_join_and_exit \n NULLIFY(&a,false); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="box"] +30 [label="30: between_join_and_exit \n APPLY_ABSTRACTION; [line 64]\n " shape="box"] 30 -> 28 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot b/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot index 17796a5c3..9820e94eb 100644 --- a/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot +++ b/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot @@ -1,5 +1,5 @@ digraph iCFG { -105 [label="105: DeclStmt \n NULLIFY(&SIL_temp_conditional___n$2,false); [line 36]\n NULLIFY(&target,false); [line 36]\n n$23=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 36]\n _fun___objc_retain(n$23:class NSString *) [line 36]\n *&__assert_fn__:class NSString *=n$23 [line 36]\n REMOVE_TEMPS(n$23); [line 36]\n " shape="box"] +105 [label="105: DeclStmt \n n$23=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 36]\n _fun___objc_retain(n$23:class NSString *) [line 36]\n *&__assert_fn__:class NSString *=n$23 [line 36]\n REMOVE_TEMPS(n$23); [line 36]\n " shape="box"] 105 -> 100 ; @@ -61,19 +61,19 @@ digraph iCFG { 91 -> 78 ; -90 [label="90: Prune (false branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 36]\n PRUNE((n$4 == 0), false); [line 36]\n REMOVE_TEMPS(n$4); [line 36]\n " shape="invhouse"] +90 [label="90: Prune (false branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 36]\n PRUNE((n$4 == 0), false); [line 36]\n REMOVE_TEMPS(n$4); [line 36]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 36]\n " shape="invhouse"] 90 -> 83 ; -89 [label="89: Prune (true branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 36]\n PRUNE((n$4 != 0), true); [line 36]\n REMOVE_TEMPS(n$4); [line 36]\n " shape="invhouse"] +89 [label="89: Prune (true branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 36]\n PRUNE((n$4 != 0), true); [line 36]\n REMOVE_TEMPS(n$4); [line 36]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 36]\n " shape="invhouse"] 89 -> 105 ; -88 [label="88: ConditinalStmt Branch \n NULLIFY(&SIL_temp_conditional___n$2,false); [line 36]\n *&SIL_temp_conditional___n$2:int =1 [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +88 [label="88: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =1 [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 88 -> 84 ; -87 [label="87: ConditinalStmt Branch \n NULLIFY(&SIL_temp_conditional___n$2,false); [line 36]\n *&SIL_temp_conditional___n$2:int =0 [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +87 [label="87: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =0 [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 87 -> 84 ; @@ -108,7 +108,7 @@ digraph iCFG { 80 -> 85 ; 80 -> 86 ; -79 [label="79: Return Stmt \n NULLIFY(&SIL_temp_conditional___n$2,false); [line 37]\n n$0=*&target:class A * [line 37]\n n$1=_fun_A_x(n$0:class A *) [line 37]\n *&return:int =n$1 [line 37]\n REMOVE_TEMPS(n$0,n$1); [line 37]\n NULLIFY(&target,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] +79 [label="79: Return Stmt \n n$0=*&target:class A * [line 37]\n n$1=_fun_A_x(n$0:class A *) [line 37]\n *&return:int =n$1 [line 37]\n REMOVE_TEMPS(n$0,n$1); [line 37]\n NULLIFY(&target,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] 79 -> 78 ; @@ -119,7 +119,7 @@ digraph iCFG { 77 -> 80 ; -76 [label="76: DeclStmt \n NULLIFY(&SIL_temp_conditional___n$2,false); [line 31]\n NULLIFY(&target,false); [line 31]\n n$22=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 31]\n _fun___objc_retain(n$22:class NSString *) [line 31]\n *&__assert_fn__:class NSString *=n$22 [line 31]\n REMOVE_TEMPS(n$22); [line 31]\n " shape="box"] +76 [label="76: DeclStmt \n n$22=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 31]\n _fun___objc_retain(n$22:class NSString *) [line 31]\n *&__assert_fn__:class NSString *=n$22 [line 31]\n REMOVE_TEMPS(n$22); [line 31]\n " shape="box"] 76 -> 71 ; @@ -181,11 +181,11 @@ digraph iCFG { 62 -> 48 ; -61 [label="61: Prune (false branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 31]\n PRUNE((n$4 == 0), false); [line 31]\n REMOVE_TEMPS(n$4); [line 31]\n " shape="invhouse"] +61 [label="61: Prune (false branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 31]\n PRUNE((n$4 == 0), false); [line 31]\n REMOVE_TEMPS(n$4); [line 31]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 31]\n " shape="invhouse"] 61 -> 53 ; -60 [label="60: Prune (true branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 31]\n PRUNE((n$4 != 0), true); [line 31]\n REMOVE_TEMPS(n$4); [line 31]\n " shape="invhouse"] +60 [label="60: Prune (true branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 31]\n PRUNE((n$4 != 0), true); [line 31]\n REMOVE_TEMPS(n$4); [line 31]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 31]\n " shape="invhouse"] 60 -> 76 ; @@ -205,7 +205,7 @@ digraph iCFG { 56 -> 58 ; -55 [label="55: BinaryOperatorStmt: NE \n NULLIFY(&SIL_temp_conditional___n$2,false); [line 31]\n n$3=*&target:class A * [line 31]\n " shape="box"] +55 [label="55: BinaryOperatorStmt: NE \n n$3=*&target:class A * [line 31]\n " shape="box"] 55 -> 56 ; @@ -232,7 +232,7 @@ digraph iCFG { 50 -> 55 ; -49 [label="49: Return Stmt \n NULLIFY(&SIL_temp_conditional___n$2,false); [line 32]\n n$0=*&target:class A * [line 32]\n n$1=_fun_A_x(n$0:class A *) [line 32]\n *&return:int =n$1 [line 32]\n REMOVE_TEMPS(n$0,n$1); [line 32]\n NULLIFY(&target,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] +49 [label="49: Return Stmt \n n$0=*&target:class A * [line 32]\n n$1=_fun_A_x(n$0:class A *) [line 32]\n *&return:int =n$1 [line 32]\n REMOVE_TEMPS(n$0,n$1); [line 32]\n NULLIFY(&target,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] 49 -> 48 ; @@ -243,7 +243,7 @@ digraph iCFG { 47 -> 50 ; -46 [label="46: DeclStmt \n NULLIFY(&SIL_temp_conditional___n$19,false); [line 24]\n NULLIFY(&a,false); [line 24]\n n$33=_fun_NSString_stringWithUTF8String:(\"infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m\":char *) [line 24]\n _fun___objc_retain(n$33:class NSString *) [line 24]\n *&__assert_file__:class NSString *=n$33 [line 24]\n REMOVE_TEMPS(n$33); [line 24]\n " shape="box"] +46 [label="46: DeclStmt \n n$33=_fun_NSString_stringWithUTF8String:(\"infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m\":char *) [line 24]\n _fun___objc_retain(n$33:class NSString *) [line 24]\n *&__assert_file__:class NSString *=n$33 [line 24]\n REMOVE_TEMPS(n$33); [line 24]\n " shape="box"] 46 -> 41 ; @@ -276,11 +276,11 @@ digraph iCFG { 39 -> 25 ; -38 [label="38: Prune (false branch) \n n$21=*&SIL_temp_conditional___n$19:int [line 24]\n PRUNE((n$21 == 0), false); [line 24]\n REMOVE_TEMPS(n$21); [line 24]\n " shape="invhouse"] +38 [label="38: Prune (false branch) \n n$21=*&SIL_temp_conditional___n$19:int [line 24]\n PRUNE((n$21 == 0), false); [line 24]\n REMOVE_TEMPS(n$21); [line 24]\n NULLIFY(&SIL_temp_conditional___n$19,false); [line 24]\n " shape="invhouse"] 38 -> 30 ; -37 [label="37: Prune (true branch) \n n$21=*&SIL_temp_conditional___n$19:int [line 24]\n PRUNE((n$21 != 0), true); [line 24]\n REMOVE_TEMPS(n$21); [line 24]\n " shape="invhouse"] +37 [label="37: Prune (true branch) \n n$21=*&SIL_temp_conditional___n$19:int [line 24]\n PRUNE((n$21 != 0), true); [line 24]\n REMOVE_TEMPS(n$21); [line 24]\n NULLIFY(&SIL_temp_conditional___n$19,false); [line 24]\n " shape="invhouse"] 37 -> 46 ; @@ -300,7 +300,7 @@ digraph iCFG { 33 -> 35 ; -32 [label="32: BinaryOperatorStmt: NE \n NULLIFY(&SIL_temp_conditional___n$19,false); [line 24]\n n$20=*&a:class A * [line 24]\n " shape="box"] +32 [label="32: BinaryOperatorStmt: NE \n n$20=*&a:class A * [line 24]\n " shape="box"] 32 -> 33 ; @@ -327,7 +327,7 @@ digraph iCFG { 27 -> 32 ; -26 [label="26: Return Stmt \n NULLIFY(&SIL_temp_conditional___n$19,false); [line 25]\n n$17=*&a:class A * [line 25]\n n$18=_fun_A_x(n$17:class A *) [line 25]\n *&return:int =n$18 [line 25]\n REMOVE_TEMPS(n$17,n$18); [line 25]\n NULLIFY(&a,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +26 [label="26: Return Stmt \n n$17=*&a:class A * [line 25]\n n$18=_fun_A_x(n$17:class A *) [line 25]\n *&return:int =n$18 [line 25]\n REMOVE_TEMPS(n$17,n$18); [line 25]\n NULLIFY(&a,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 26 -> 25 ; @@ -338,7 +338,7 @@ digraph iCFG { 24 -> 27 ; -23 [label="23: DeclStmt \n NULLIFY(&SIL_temp_conditional___n$2,false); [line 19]\n NULLIFY(&target,false); [line 19]\n n$16=_fun_NSString_stringWithUTF8String:(\"infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m\":char *) [line 19]\n _fun___objc_retain(n$16:class NSString *) [line 19]\n *&__assert_file__:class NSString *=n$16 [line 19]\n REMOVE_TEMPS(n$16); [line 19]\n " shape="box"] +23 [label="23: DeclStmt \n n$16=_fun_NSString_stringWithUTF8String:(\"infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m\":char *) [line 19]\n _fun___objc_retain(n$16:class NSString *) [line 19]\n *&__assert_file__:class NSString *=n$16 [line 19]\n REMOVE_TEMPS(n$16); [line 19]\n " shape="box"] 23 -> 18 ; @@ -371,11 +371,11 @@ digraph iCFG { 16 -> 2 ; -15 [label="15: Prune (false branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 19]\n PRUNE((n$4 == 0), false); [line 19]\n REMOVE_TEMPS(n$4); [line 19]\n " shape="invhouse"] +15 [label="15: Prune (false branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 19]\n PRUNE((n$4 == 0), false); [line 19]\n REMOVE_TEMPS(n$4); [line 19]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 19]\n " shape="invhouse"] 15 -> 7 ; -14 [label="14: Prune (true branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 19]\n PRUNE((n$4 != 0), true); [line 19]\n REMOVE_TEMPS(n$4); [line 19]\n " shape="invhouse"] +14 [label="14: Prune (true branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 19]\n PRUNE((n$4 != 0), true); [line 19]\n REMOVE_TEMPS(n$4); [line 19]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 19]\n " shape="invhouse"] 14 -> 23 ; @@ -395,7 +395,7 @@ digraph iCFG { 10 -> 12 ; -9 [label="9: BinaryOperatorStmt: NE \n NULLIFY(&SIL_temp_conditional___n$2,false); [line 19]\n n$3=*&target:class A * [line 19]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: NE \n n$3=*&target:class A * [line 19]\n " shape="box"] 9 -> 10 ; @@ -422,7 +422,7 @@ digraph iCFG { 4 -> 9 ; -3 [label="3: Return Stmt \n NULLIFY(&SIL_temp_conditional___n$2,false); [line 20]\n n$0=*&target:class A * [line 20]\n n$1=_fun_A_x(n$0:class A *) [line 20]\n *&return:int =n$1 [line 20]\n REMOVE_TEMPS(n$0,n$1); [line 20]\n NULLIFY(&target,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&target:class A * [line 20]\n n$1=_fun_A_x(n$0:class A *) [line 20]\n *&return:int =n$1 [line 20]\n REMOVE_TEMPS(n$0,n$1); [line 20]\n NULLIFY(&target,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.dot b/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.dot index 35f5c11b3..2cdbd41af 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.dot @@ -7,7 +7,7 @@ digraph iCFG { 53 -> 52 ; -52 [label="52: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5); [line 59]\n n$37=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_capturedNoNullDeref______5 ):unsigned long ) [line 59]\n *&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5:class __objc_anonymous_block_BlockVar_capturedNoNullDeref______5 =n$37 [line 59]\n n$38=*&x:int * [line 59]\n *n$37.x:int *=n$38 [line 59]\n n$34=*&x:int * [line 59]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_capturedNoNullDeref______5,n$34) [line 59]\n REMOVE_TEMPS(n$37,n$38,n$34); [line 59]\n NULLIFY(&x,false); [line 59]\n " shape="box"] +52 [label="52: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5); [line 59]\n n$37=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_capturedNoNullDeref______5 ):unsigned long ) [line 59]\n *&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5:class __objc_anonymous_block_BlockVar_capturedNoNullDeref______5 =n$37 [line 59]\n n$38=*&x:int * [line 59]\n *n$37.x:int *=n$38 [line 59]\n n$34=*&x:int * [line 59]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_capturedNoNullDeref______5,n$34) [line 59]\n REMOVE_TEMPS(n$37,n$38,n$34); [line 59]\n NULLIFY(&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5,false); [line 59]\n NULLIFY(&x,false); [line 59]\n " shape="box"] 52 -> 48 ; @@ -26,11 +26,11 @@ digraph iCFG { 48 -> 47 ; -47 [label="47: Return Stmt \n n$32=*&my_block:_fn_ (*) [line 63]\n n$33=n$32() [line 63]\n *&return:int =n$33 [line 63]\n REMOVE_TEMPS(n$32,n$33); [line 63]\n NULLIFY(&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5,true); [line 63]\n NULLIFY(&my_block,false); [line 63]\n NULLIFY(&i,false); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"] +47 [label="47: Return Stmt \n n$32=*&my_block:_fn_ (*) [line 63]\n n$33=n$32() [line 63]\n *&return:int =n$33 [line 63]\n REMOVE_TEMPS(n$32,n$33); [line 63]\n NULLIFY(&my_block,false); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"] 47 -> 46 ; -46 [label="46: Exit BlockVar_capturedNoNullDeref \n " color=yellow style=filled] +46 [label="46: Exit BlockVar_capturedNoNullDeref \n NULLIFY(&i,false); [line 64]\n " color=yellow style=filled] 45 [label="45: Start BlockVar_capturedNoNullDeref\nFormals: self:class BlockVar *\nLocals: my_block:_fn_ (*) x:int * i:int \n DECLARE_LOCALS(&return,&my_block,&x,&i); [line 56]\n " color=yellow style=filled] @@ -41,7 +41,7 @@ digraph iCFG { 44 -> 43 ; -43 [label="43: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_capturedNullDeref______4); [line 50]\n n$30=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_capturedNullDeref______4 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_BlockVar_capturedNullDeref______4:class __objc_anonymous_block_BlockVar_capturedNullDeref______4 =n$30 [line 50]\n n$31=*&x:int * [line 50]\n *n$30.x:int *=n$31 [line 50]\n n$27=*&x:int * [line 50]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_capturedNullDeref______4,n$27) [line 50]\n REMOVE_TEMPS(n$30,n$31,n$27); [line 50]\n NULLIFY(&x,false); [line 50]\n " shape="box"] +43 [label="43: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_capturedNullDeref______4); [line 50]\n n$30=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_capturedNullDeref______4 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_BlockVar_capturedNullDeref______4:class __objc_anonymous_block_BlockVar_capturedNullDeref______4 =n$30 [line 50]\n n$31=*&x:int * [line 50]\n *n$30.x:int *=n$31 [line 50]\n n$27=*&x:int * [line 50]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_capturedNullDeref______4,n$27) [line 50]\n REMOVE_TEMPS(n$30,n$31,n$27); [line 50]\n NULLIFY(&__objc_anonymous_block_BlockVar_capturedNullDeref______4,false); [line 50]\n NULLIFY(&x,false); [line 50]\n " shape="box"] 43 -> 39 ; @@ -56,7 +56,7 @@ digraph iCFG { 40 -> 42 ; -39 [label="39: Return Stmt \n n$25=*&my_block:_fn_ (*) [line 53]\n n$26=n$25() [line 53]\n *&return:int =n$26 [line 53]\n REMOVE_TEMPS(n$25,n$26); [line 53]\n NULLIFY(&__objc_anonymous_block_BlockVar_capturedNullDeref______4,true); [line 53]\n NULLIFY(&my_block,false); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"] +39 [label="39: Return Stmt \n n$25=*&my_block:_fn_ (*) [line 53]\n n$26=n$25() [line 53]\n *&return:int =n$26 [line 53]\n REMOVE_TEMPS(n$25,n$26); [line 53]\n NULLIFY(&my_block,false); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"] 39 -> 38 ; @@ -75,7 +75,7 @@ digraph iCFG { 35 -> 34 ; -34 [label="34: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_blockPostOk______3); [line 42]\n n$23=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_blockPostOk______3 ):unsigned long ) [line 42]\n *&__objc_anonymous_block_BlockVar_blockPostOk______3:class __objc_anonymous_block_BlockVar_blockPostOk______3 =n$23 [line 42]\n n$24=*&x:int * [line 42]\n *n$23.x:int *=n$24 [line 42]\n n$21=*&x:int * [line 42]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_blockPostOk______3,n$21) [line 42]\n REMOVE_TEMPS(n$23,n$24,n$21); [line 42]\n NULLIFY(&x,false); [line 42]\n " shape="box"] +34 [label="34: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_blockPostOk______3); [line 42]\n n$23=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_blockPostOk______3 ):unsigned long ) [line 42]\n *&__objc_anonymous_block_BlockVar_blockPostOk______3:class __objc_anonymous_block_BlockVar_blockPostOk______3 =n$23 [line 42]\n n$24=*&x:int * [line 42]\n *n$23.x:int *=n$24 [line 42]\n n$21=*&x:int * [line 42]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_blockPostOk______3,n$21) [line 42]\n REMOVE_TEMPS(n$23,n$24,n$21); [line 42]\n NULLIFY(&__objc_anonymous_block_BlockVar_blockPostOk______3,false); [line 42]\n NULLIFY(&x,false); [line 42]\n " shape="box"] 34 -> 30 ; @@ -90,11 +90,11 @@ digraph iCFG { 31 -> 33 ; -30 [label="30: Return Stmt \n n$18=*&my_block:_fn_ (*) [line 45]\n n$19=n$18() [line 45]\n n$20=*n$19:int [line 45]\n *&return:int =n$20 [line 45]\n REMOVE_TEMPS(n$18,n$19,n$20); [line 45]\n NULLIFY(&__objc_anonymous_block_BlockVar_blockPostOk______3,true); [line 45]\n NULLIFY(&my_block,false); [line 45]\n NULLIFY(&i,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] +30 [label="30: Return Stmt \n n$18=*&my_block:_fn_ (*) [line 45]\n n$19=n$18() [line 45]\n n$20=*n$19:int [line 45]\n *&return:int =n$20 [line 45]\n REMOVE_TEMPS(n$18,n$19,n$20); [line 45]\n NULLIFY(&my_block,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] 30 -> 29 ; -29 [label="29: Exit BlockVar_blockPostOk \n " color=yellow style=filled] +29 [label="29: Exit BlockVar_blockPostOk \n NULLIFY(&i,false); [line 46]\n " color=yellow style=filled] 28 [label="28: Start BlockVar_blockPostOk\nFormals: self:class BlockVar *\nLocals: my_block:_fn_ (*) x:int * i:int \n DECLARE_LOCALS(&return,&my_block,&x,&i); [line 39]\n " color=yellow style=filled] @@ -105,7 +105,7 @@ digraph iCFG { 27 -> 26 ; -26 [label="26: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_blockPostBad______2); [line 33]\n n$16=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_blockPostBad______2 ):unsigned long ) [line 33]\n *&__objc_anonymous_block_BlockVar_blockPostBad______2:class __objc_anonymous_block_BlockVar_blockPostBad______2 =n$16 [line 33]\n n$17=*&x:int * [line 33]\n *n$16.x:int *=n$17 [line 33]\n n$14=*&x:int * [line 33]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_blockPostBad______2,n$14) [line 33]\n REMOVE_TEMPS(n$16,n$17,n$14); [line 33]\n NULLIFY(&x,false); [line 33]\n " shape="box"] +26 [label="26: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_blockPostBad______2); [line 33]\n n$16=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_blockPostBad______2 ):unsigned long ) [line 33]\n *&__objc_anonymous_block_BlockVar_blockPostBad______2:class __objc_anonymous_block_BlockVar_blockPostBad______2 =n$16 [line 33]\n n$17=*&x:int * [line 33]\n *n$16.x:int *=n$17 [line 33]\n n$14=*&x:int * [line 33]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_blockPostBad______2,n$14) [line 33]\n REMOVE_TEMPS(n$16,n$17,n$14); [line 33]\n NULLIFY(&__objc_anonymous_block_BlockVar_blockPostBad______2,false); [line 33]\n NULLIFY(&x,false); [line 33]\n " shape="box"] 26 -> 22 ; @@ -120,7 +120,7 @@ digraph iCFG { 23 -> 25 ; -22 [label="22: Return Stmt \n n$11=*&my_block:_fn_ (*) [line 36]\n n$12=n$11() [line 36]\n n$13=*n$12:int [line 36]\n *&return:int =n$13 [line 36]\n REMOVE_TEMPS(n$11,n$12,n$13); [line 36]\n NULLIFY(&__objc_anonymous_block_BlockVar_blockPostBad______2,true); [line 36]\n NULLIFY(&my_block,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +22 [label="22: Return Stmt \n n$11=*&my_block:_fn_ (*) [line 36]\n n$12=n$11() [line 36]\n n$13=*n$12:int [line 36]\n *&return:int =n$13 [line 36]\n REMOVE_TEMPS(n$11,n$12,n$13); [line 36]\n NULLIFY(&my_block,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 22 -> 21 ; @@ -131,7 +131,7 @@ digraph iCFG { 20 -> 27 ; -19 [label="19: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1); [line 19]\n n$10=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_navigateToURLInBackground______1 ):unsigned long ) [line 19]\n *&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1:class __objc_anonymous_block_BlockVar_navigateToURLInBackground______1 =n$10 [line 19]\n *&addBlock:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_navigateToURLInBackground______1) [line 19]\n REMOVE_TEMPS(n$10); [line 19]\n " shape="box"] +19 [label="19: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1); [line 19]\n n$10=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_navigateToURLInBackground______1 ):unsigned long ) [line 19]\n *&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1:class __objc_anonymous_block_BlockVar_navigateToURLInBackground______1 =n$10 [line 19]\n *&addBlock:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_navigateToURLInBackground______1) [line 19]\n REMOVE_TEMPS(n$10); [line 19]\n NULLIFY(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1,false); [line 19]\n " shape="box"] 19 -> 14 ; @@ -158,19 +158,19 @@ digraph iCFG { 13 -> 8 ; -12 [label="12: Return Stmt \n NULLIFY(&p,false); [line 28]\n n$3=*&x:int [line 28]\n *&return:int =n$3 [line 28]\n REMOVE_TEMPS(n$3); [line 28]\n NULLIFY(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1,true); [line 28]\n NULLIFY(&x,false); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] +12 [label="12: Return Stmt \n n$3=*&x:int [line 28]\n *&return:int =n$3 [line 28]\n REMOVE_TEMPS(n$3); [line 28]\n NULLIFY(&x,false); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] 12 -> 5 ; -11 [label="11: Return Stmt \n NULLIFY(&x,false); [line 26]\n n$1=*&p:int * [line 26]\n n$2=*n$1:int [line 26]\n *&return:int =n$2 [line 26]\n REMOVE_TEMPS(n$1,n$2); [line 26]\n NULLIFY(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1,true); [line 26]\n NULLIFY(&p,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +11 [label="11: Return Stmt \n n$1=*&p:int * [line 26]\n n$2=*n$1:int [line 26]\n *&return:int =n$2 [line 26]\n REMOVE_TEMPS(n$1,n$2); [line 26]\n NULLIFY(&p,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 11 -> 5 ; -10 [label="10: Prune (false branch) \n PRUNE(((n$0 == 8) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n " shape="invhouse"] +10 [label="10: Prune (false branch) \n PRUNE(((n$0 == 8) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&p,false); [line 25]\n " shape="invhouse"] 10 -> 12 ; -9 [label="9: Prune (true branch) \n PRUNE(((n$0 == 8) != 0), true); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n " shape="invhouse"] +9 [label="9: Prune (true branch) \n PRUNE(((n$0 == 8) != 0), true); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&x,false); [line 25]\n " shape="invhouse"] 9 -> 11 ; @@ -179,7 +179,7 @@ digraph iCFG { 8 -> 9 ; 8 -> 10 ; -7 [label="7: between_join_and_exit \n NULLIFY(&addBlock,false); [line 25]\n NULLIFY(&p,false); [line 25]\n NULLIFY(&x,false); [line 25]\n NULLIFY(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1,true); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +7 [label="7: between_join_and_exit \n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 7 -> 5 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot b/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot index 83709ca93..8bb4cf285 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot @@ -7,23 +7,23 @@ digraph iCFG { 53 -> 52 ; -52 [label="52: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array_trans______2); [line 40]\n n$42=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array_trans______2 ):unsigned long ) [line 40]\n *&__objc_anonymous_block_MyBlock_array_trans______2:class __objc_anonymous_block_MyBlock_array_trans______2 =n$42 [line 40]\n *&enumerateObjectsUsingBlock:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array_trans______2) [line 39]\n REMOVE_TEMPS(n$42); [line 39]\n " shape="box"] +52 [label="52: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array_trans______2); [line 40]\n n$42=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array_trans______2 ):unsigned long ) [line 40]\n *&__objc_anonymous_block_MyBlock_array_trans______2:class __objc_anonymous_block_MyBlock_array_trans______2 =n$42 [line 40]\n *&enumerateObjectsUsingBlock:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array_trans______2) [line 39]\n REMOVE_TEMPS(n$42); [line 39]\n NULLIFY(&__objc_anonymous_block_MyBlock_array_trans______2,false); [line 39]\n " shape="box"] 52 -> 44 ; -51 [label="51: BinaryOperatorStmt: Assign \n NULLIFY(&ShouldStop,false); [line 45]\n n$41=*&stop:_Bool * [line 45]\n *n$41:_Bool =1 [line 45]\n REMOVE_TEMPS(n$41); [line 45]\n NULLIFY(&stop,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] +51 [label="51: BinaryOperatorStmt: Assign \n n$41=*&stop:_Bool * [line 45]\n *n$41:_Bool =1 [line 45]\n REMOVE_TEMPS(n$41); [line 45]\n NULLIFY(&stop,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] 51 -> 47 ; -50 [label="50: Prune (false branch) \n n$40=*&ShouldStop:int [line 44]\n PRUNE((n$40 == 0), false); [line 44]\n REMOVE_TEMPS(n$40); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="invhouse"] +50 [label="50: Prune (false branch) \n n$40=*&ShouldStop:int [line 44]\n PRUNE((n$40 == 0), false); [line 44]\n REMOVE_TEMPS(n$40); [line 44]\n NULLIFY(&ShouldStop,false); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="invhouse"] 50 -> 47 ; -49 [label="49: Prune (true branch) \n n$40=*&ShouldStop:int [line 44]\n PRUNE((n$40 != 0), true); [line 44]\n REMOVE_TEMPS(n$40); [line 44]\n " shape="invhouse"] +49 [label="49: Prune (true branch) \n n$40=*&ShouldStop:int [line 44]\n PRUNE((n$40 != 0), true); [line 44]\n REMOVE_TEMPS(n$40); [line 44]\n NULLIFY(&ShouldStop,false); [line 44]\n " shape="invhouse"] 49 -> 51 ; -48 [label="48: between_join_and_exit \n NULLIFY(&ShouldStop,false); [line 44]\n NULLIFY(&stop,false); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] +48 [label="48: between_join_and_exit \n APPLY_ABSTRACTION; [line 44]\n " shape="box"] 48 -> 46 ; @@ -59,7 +59,7 @@ digraph iCFG { 40 -> 37 ; -39 [label="39: Prune (true branch) \n PRUNE(((n$30 == 1) != 0), true); [line 55]\n REMOVE_TEMPS(n$29,n$30); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="invhouse"] +39 [label="39: Prune (true branch) \n PRUNE(((n$30 == 1) != 0), true); [line 55]\n REMOVE_TEMPS(n$29,n$30); [line 55]\n NULLIFY(&enumerateObjectsUsingBlock,false); [line 55]\n NULLIFY(&idx,false); [line 55]\n NULLIFY(&objects,false); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="invhouse"] 39 -> 30 ; @@ -72,7 +72,7 @@ digraph iCFG { 37 -> 33 ; -36 [label="36: Prune (false branch) \n PRUNE(((n$26 < n$28) == 0), false); [line 51]\n REMOVE_TEMPS(n$26,n$27,n$28); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="invhouse"] +36 [label="36: Prune (false branch) \n PRUNE(((n$26 < n$28) == 0), false); [line 51]\n REMOVE_TEMPS(n$26,n$27,n$28); [line 51]\n NULLIFY(&enumerateObjectsUsingBlock,false); [line 51]\n NULLIFY(&idx,false); [line 51]\n NULLIFY(&objects,false); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="invhouse"] 36 -> 30 ; @@ -97,7 +97,7 @@ digraph iCFG { 31 -> 34 ; -30 [label="30: Call _fun_free \n NULLIFY(&enumerateObjectsUsingBlock,false); [line 58]\n NULLIFY(&idx,false); [line 58]\n NULLIFY(&objects,false); [line 58]\n n$24=*&stop:_Bool * [line 58]\n _fun_free(n$24:void *) [line 58]\n REMOVE_TEMPS(n$24); [line 58]\n NULLIFY(&__objc_anonymous_block_MyBlock_array_trans______2,true); [line 58]\n NULLIFY(&stop,false); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] +30 [label="30: Call _fun_free \n n$24=*&stop:_Bool * [line 58]\n _fun_free(n$24:void *) [line 58]\n REMOVE_TEMPS(n$24); [line 58]\n NULLIFY(&stop,false); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] 30 -> 29 ; @@ -116,23 +116,23 @@ digraph iCFG { 26 -> 25 ; -25 [label="25: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array______1); [line 21]\n n$20=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array______1 ):unsigned long ) [line 21]\n *&__objc_anonymous_block_MyBlock_array______1:class __objc_anonymous_block_MyBlock_array______1 =n$20 [line 21]\n *&infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array______1) [line 21]\n REMOVE_TEMPS(n$20); [line 21]\n " shape="box"] +25 [label="25: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array______1); [line 21]\n n$20=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array______1 ):unsigned long ) [line 21]\n *&__objc_anonymous_block_MyBlock_array______1:class __objc_anonymous_block_MyBlock_array______1 =n$20 [line 21]\n *&infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array______1) [line 21]\n REMOVE_TEMPS(n$20); [line 21]\n NULLIFY(&__objc_anonymous_block_MyBlock_array______1,false); [line 21]\n " shape="box"] 25 -> 17 ; -24 [label="24: BinaryOperatorStmt: Assign \n NULLIFY(&ShouldStop,false); [line 27]\n n$19=*&stop:_Bool * [line 27]\n *n$19:_Bool =1 [line 27]\n REMOVE_TEMPS(n$19); [line 27]\n NULLIFY(&stop,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +24 [label="24: BinaryOperatorStmt: Assign \n n$19=*&stop:_Bool * [line 27]\n *n$19:_Bool =1 [line 27]\n REMOVE_TEMPS(n$19); [line 27]\n NULLIFY(&stop,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] 24 -> 20 ; -23 [label="23: Prune (false branch) \n n$18=*&ShouldStop:int [line 26]\n PRUNE((n$18 == 0), false); [line 26]\n REMOVE_TEMPS(n$18); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="invhouse"] +23 [label="23: Prune (false branch) \n n$18=*&ShouldStop:int [line 26]\n PRUNE((n$18 == 0), false); [line 26]\n REMOVE_TEMPS(n$18); [line 26]\n NULLIFY(&ShouldStop,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="invhouse"] 23 -> 20 ; -22 [label="22: Prune (true branch) \n n$18=*&ShouldStop:int [line 26]\n PRUNE((n$18 != 0), true); [line 26]\n REMOVE_TEMPS(n$18); [line 26]\n " shape="invhouse"] +22 [label="22: Prune (true branch) \n n$18=*&ShouldStop:int [line 26]\n PRUNE((n$18 != 0), true); [line 26]\n REMOVE_TEMPS(n$18); [line 26]\n NULLIFY(&ShouldStop,false); [line 26]\n " shape="invhouse"] 22 -> 24 ; -21 [label="21: between_join_and_exit \n NULLIFY(&ShouldStop,false); [line 26]\n NULLIFY(&stop,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +21 [label="21: between_join_and_exit \n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 21 -> 19 ; @@ -168,7 +168,7 @@ digraph iCFG { 13 -> 10 ; -12 [label="12: Prune (true branch) \n n$7=*n$6:signed char [line 21]\n PRUNE((n$7 != 0), true); [line 21]\n REMOVE_TEMPS(n$6,n$7); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="invhouse"] +12 [label="12: Prune (true branch) \n n$7=*n$6:signed char [line 21]\n PRUNE((n$7 != 0), true); [line 21]\n REMOVE_TEMPS(n$6,n$7); [line 21]\n NULLIFY(&idx,false); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,false); [line 21]\n NULLIFY(&objects,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="invhouse"] 12 -> 3 ; @@ -181,7 +181,7 @@ digraph iCFG { 10 -> 6 ; -9 [label="9: Prune (false branch) \n PRUNE(((n$3 < n$5) == 0), false); [line 21]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="invhouse"] +9 [label="9: Prune (false branch) \n PRUNE(((n$3 < n$5) == 0), false); [line 21]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 21]\n NULLIFY(&idx,false); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,false); [line 21]\n NULLIFY(&objects,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="invhouse"] 9 -> 3 ; @@ -206,7 +206,7 @@ digraph iCFG { 4 -> 7 ; -3 [label="3: Call _fun_free \n NULLIFY(&idx,false); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,false); [line 21]\n NULLIFY(&objects,false); [line 21]\n n$0=*&stop:_Bool * [line 21]\n n$1=_fun_free(n$0:void *) [line 21]\n NULLIFY(&object,true); [line 21]\n NULLIFY(&idx,true); [line 21]\n NULLIFY(&stop,true); [line 21]\n NULLIFY(&objects,true); [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&__objc_anonymous_block_MyBlock_array______1,true); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,true); [line 21]\n NULLIFY(&idx,false); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,false); [line 21]\n NULLIFY(&objects,false); [line 21]\n NULLIFY(&stop,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +3 [label="3: Call _fun_free \n n$0=*&stop:_Bool * [line 21]\n n$1=_fun_free(n$0:void *) [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&stop,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block.dot b/infer/tests/codetoanalyze/objc/frontend/block/block.dot index 2cb239437..adf987e32 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/block.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/block.dot @@ -18,7 +18,7 @@ digraph iCFG { 21 -> 20 ; -20 [label="20: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_main1______2); [line 18]\n n$27=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_main1______2 ):unsigned long ) [line 18]\n *&__objc_anonymous_block_main1______2:class __objc_anonymous_block_main1______2 =n$27 [line 18]\n n$28=*&x:int [line 18]\n *n$27.x:int =n$28 [line 18]\n n$11=*&x:int [line 18]\n *&addblock:_fn_ (*)=(_fun___objc_anonymous_block_main1______2,n$11) [line 18]\n REMOVE_TEMPS(n$27,n$28,n$11); [line 18]\n NULLIFY(&x,false); [line 18]\n " shape="box"] +20 [label="20: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_main1______2); [line 18]\n n$27=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_main1______2 ):unsigned long ) [line 18]\n *&__objc_anonymous_block_main1______2:class __objc_anonymous_block_main1______2 =n$27 [line 18]\n n$28=*&x:int [line 18]\n *n$27.x:int =n$28 [line 18]\n n$11=*&x:int [line 18]\n *&addblock:_fn_ (*)=(_fun___objc_anonymous_block_main1______2,n$11) [line 18]\n REMOVE_TEMPS(n$27,n$28,n$11); [line 18]\n NULLIFY(&__objc_anonymous_block_main1______2,false); [line 18]\n NULLIFY(&x,false); [line 18]\n " shape="box"] 20 -> 10 ; @@ -26,7 +26,7 @@ digraph iCFG { 19 -> 18 ; -18 [label="18: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block___objc_anonymous_block_main1______2______3); [line 24]\n n$23=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block___objc_anonymous_block_main1______2______3 ):unsigned long ) [line 24]\n *&__objc_anonymous_block___objc_anonymous_block_main1______2______3:class __objc_anonymous_block___objc_anonymous_block_main1______2______3 =n$23 [line 24]\n n$24=*&x:int [line 24]\n n$25=*&bla:int [line 24]\n n$26=*&#GB$main1_s:int [line 24]\n *n$23.x:int =n$24 [line 24]\n *n$23.bla:int =n$25 [line 24]\n *n$23.main1_s:int =n$26 [line 24]\n n$17=*&x:int [line 24]\n n$18=*&bla:int [line 24]\n *&addblock2:_fn_ (*)=(_fun___objc_anonymous_block___objc_anonymous_block_main1______2______3,n$17,n$18) [line 24]\n REMOVE_TEMPS(n$23,n$24,n$25,n$26,n$17,n$18); [line 24]\n NULLIFY(&x,false); [line 24]\n " shape="box"] +18 [label="18: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block___objc_anonymous_block_main1______2______3); [line 24]\n n$23=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block___objc_anonymous_block_main1______2______3 ):unsigned long ) [line 24]\n *&__objc_anonymous_block___objc_anonymous_block_main1______2______3:class __objc_anonymous_block___objc_anonymous_block_main1______2______3 =n$23 [line 24]\n n$24=*&x:int [line 24]\n n$25=*&bla:int [line 24]\n n$26=*&#GB$main1_s:int [line 24]\n *n$23.x:int =n$24 [line 24]\n *n$23.bla:int =n$25 [line 24]\n *n$23.main1_s:int =n$26 [line 24]\n n$17=*&x:int [line 24]\n n$18=*&bla:int [line 24]\n *&addblock2:_fn_ (*)=(_fun___objc_anonymous_block___objc_anonymous_block_main1______2______3,n$17,n$18) [line 24]\n REMOVE_TEMPS(n$23,n$24,n$25,n$26,n$17,n$18); [line 24]\n NULLIFY(&__objc_anonymous_block___objc_anonymous_block_main1______2______3,false); [line 24]\n NULLIFY(&x,false); [line 24]\n " shape="box"] 18 -> 14 ; @@ -45,7 +45,7 @@ digraph iCFG { 14 -> 13 ; -13 [label="13: Return Stmt \n n$12=*&c:int [line 29]\n n$13=*&add2:int [line 29]\n n$14=*&bla:int [line 29]\n *&return:int =((n$12 + n$13) + n$14) [line 29]\n REMOVE_TEMPS(n$12,n$13,n$14); [line 29]\n NULLIFY(&__objc_anonymous_block___objc_anonymous_block_main1______2______3,true); [line 29]\n NULLIFY(&add2,false); [line 29]\n NULLIFY(&bla,false); [line 29]\n NULLIFY(&c,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +13 [label="13: Return Stmt \n n$12=*&c:int [line 29]\n n$13=*&add2:int [line 29]\n n$14=*&bla:int [line 29]\n *&return:int =((n$12 + n$13) + n$14) [line 29]\n REMOVE_TEMPS(n$12,n$13,n$14); [line 29]\n NULLIFY(&add2,false); [line 29]\n NULLIFY(&bla,false); [line 29]\n NULLIFY(&c,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 13 -> 12 ; @@ -60,7 +60,7 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_main1______1); [line 34]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_main1______1 ):unsigned long ) [line 34]\n *&__objc_anonymous_block_main1______1:class __objc_anonymous_block_main1______1 =n$7 [line 34]\n n$8=*&#GB$main1_s:int [line 34]\n *n$7.main1_s:int =n$8 [line 34]\n *&addblock:_fn_ (*)=(_fun___objc_anonymous_block_main1______1) [line 34]\n REMOVE_TEMPS(n$7,n$8); [line 34]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_main1______1); [line 34]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_main1______1 ):unsigned long ) [line 34]\n *&__objc_anonymous_block_main1______1:class __objc_anonymous_block_main1______1 =n$7 [line 34]\n n$8=*&#GB$main1_s:int [line 34]\n *n$7.main1_s:int =n$8 [line 34]\n *&addblock:_fn_ (*)=(_fun___objc_anonymous_block_main1______1) [line 34]\n REMOVE_TEMPS(n$7,n$8); [line 34]\n NULLIFY(&__objc_anonymous_block_main1______1,false); [line 34]\n " shape="box"] 9 -> 5 ; @@ -83,7 +83,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&y:int [line 43]\n *&return:int =n$0 [line 43]\n REMOVE_TEMPS(n$0); [line 43]\n NULLIFY(&__objc_anonymous_block_main1______1,true); [line 43]\n NULLIFY(&__objc_anonymous_block_main1______2,true); [line 43]\n NULLIFY(&y,false); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&y:int [line 43]\n *&return:int =n$0 [line 43]\n REMOVE_TEMPS(n$0); [line 43]\n NULLIFY(&y,false); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block_no_args.dot b/infer/tests/codetoanalyze/objc/frontend/block/block_no_args.dot index 694f7eb2d..f6bc37220 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/block_no_args.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/block_no_args.dot @@ -7,7 +7,7 @@ digraph iCFG { 16 -> 15 ; -15 [label="15: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_My_manager_m______1); [line 25]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_My_manager_m______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_My_manager_m______1:class __objc_anonymous_block_My_manager_m______1 =n$7 [line 25]\n n$8=*&z:int [line 25]\n n$9=*&#GB$g:int [line 25]\n *n$7.z:int =n$8 [line 25]\n *n$7.g:int =n$9 [line 25]\n n$5=*&z:int [line 25]\n *&b:_fn_ (*)=(_fun___objc_anonymous_block_My_manager_m______1,n$5) [line 25]\n REMOVE_TEMPS(n$7,n$8,n$9,n$5); [line 25]\n " shape="box"] +15 [label="15: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_My_manager_m______1); [line 25]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_My_manager_m______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_My_manager_m______1:class __objc_anonymous_block_My_manager_m______1 =n$7 [line 25]\n n$8=*&z:int [line 25]\n n$9=*&#GB$g:int [line 25]\n *n$7.z:int =n$8 [line 25]\n *n$7.g:int =n$9 [line 25]\n n$5=*&z:int [line 25]\n *&b:_fn_ (*)=(_fun___objc_anonymous_block_My_manager_m______1,n$5) [line 25]\n REMOVE_TEMPS(n$7,n$8,n$9,n$5); [line 25]\n NULLIFY(&__objc_anonymous_block_My_manager_m______1,false); [line 25]\n " shape="box"] 15 -> 11 ; @@ -30,19 +30,19 @@ digraph iCFG { 10 -> 5 ; -9 [label="9: Return Stmt \n NULLIFY(&p,false); [line 33]\n n$3=*&z:int [line 33]\n *&return:int =n$3 [line 33]\n REMOVE_TEMPS(n$3); [line 33]\n NULLIFY(&__objc_anonymous_block_My_manager_m______1,true); [line 33]\n NULLIFY(&z,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] +9 [label="9: Return Stmt \n n$3=*&z:int [line 33]\n *&return:int =n$3 [line 33]\n REMOVE_TEMPS(n$3); [line 33]\n NULLIFY(&z,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] 9 -> 2 ; -8 [label="8: Return Stmt \n NULLIFY(&z,false); [line 31]\n n$1=*&p:int * [line 31]\n n$2=*n$1:int [line 31]\n *&return:int =n$2 [line 31]\n REMOVE_TEMPS(n$1,n$2); [line 31]\n NULLIFY(&__objc_anonymous_block_My_manager_m______1,true); [line 31]\n NULLIFY(&p,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +8 [label="8: Return Stmt \n n$1=*&p:int * [line 31]\n n$2=*n$1:int [line 31]\n *&return:int =n$2 [line 31]\n REMOVE_TEMPS(n$1,n$2); [line 31]\n NULLIFY(&p,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] 8 -> 2 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 == 6) == 0), false); [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 == 6) == 0), false); [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n NULLIFY(&p,false); [line 30]\n " shape="invhouse"] 7 -> 9 ; -6 [label="6: Prune (true branch) \n PRUNE(((n$0 == 6) != 0), true); [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n " shape="invhouse"] +6 [label="6: Prune (true branch) \n PRUNE(((n$0 == 6) != 0), true); [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n NULLIFY(&z,false); [line 30]\n " shape="invhouse"] 6 -> 8 ; @@ -51,7 +51,7 @@ digraph iCFG { 5 -> 6 ; 5 -> 7 ; -4 [label="4: between_join_and_exit \n NULLIFY(&b,false); [line 30]\n NULLIFY(&p,false); [line 30]\n NULLIFY(&self,false); [line 30]\n NULLIFY(&z,false); [line 30]\n NULLIFY(&__objc_anonymous_block_My_manager_m______1,true); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +4 [label="4: between_join_and_exit \n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 4 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block_release.dot b/infer/tests/codetoanalyze/objc/frontend/block/block_release.dot index a82696252..afeed8803 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/block_release.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/block_release.dot @@ -11,7 +11,7 @@ digraph iCFG { 17 -> 16 ; -16 [label="16: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_My_manager_blockReleaseTODO______1); [line 25]\n n$8=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_My_manager_blockReleaseTODO______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_My_manager_blockReleaseTODO______1:class __objc_anonymous_block_My_manager_blockReleaseTODO______1 =n$8 [line 25]\n n$9=*&newImage:struct CGImage * [line 25]\n *n$8.newImage:struct CGImage *=n$9 [line 25]\n n$5=*&newImage:struct CGImage * [line 25]\n *&b:_fn_ (*)=(_fun___objc_anonymous_block_My_manager_blockReleaseTODO______1,n$5) [line 25]\n REMOVE_TEMPS(n$8,n$9,n$5); [line 25]\n NULLIFY(&newImage,false); [line 25]\n " shape="box"] +16 [label="16: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_My_manager_blockReleaseTODO______1); [line 25]\n n$8=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_My_manager_blockReleaseTODO______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_My_manager_blockReleaseTODO______1:class __objc_anonymous_block_My_manager_blockReleaseTODO______1 =n$8 [line 25]\n n$9=*&newImage:struct CGImage * [line 25]\n *n$8.newImage:struct CGImage *=n$9 [line 25]\n n$5=*&newImage:struct CGImage * [line 25]\n *&b:_fn_ (*)=(_fun___objc_anonymous_block_My_manager_blockReleaseTODO______1,n$5) [line 25]\n REMOVE_TEMPS(n$8,n$9,n$5); [line 25]\n NULLIFY(&__objc_anonymous_block_My_manager_blockReleaseTODO______1,false); [line 25]\n NULLIFY(&newImage,false); [line 25]\n " shape="box"] 16 -> 8 ; @@ -19,7 +19,7 @@ digraph iCFG { 15 -> 11 ; -14 [label="14: Prune (false branch) \n n$6=*&newImage:struct CGImage * [line 26]\n PRUNE((n$6 == 0), false); [line 26]\n REMOVE_TEMPS(n$6); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="invhouse"] +14 [label="14: Prune (false branch) \n n$6=*&newImage:struct CGImage * [line 26]\n PRUNE((n$6 == 0), false); [line 26]\n REMOVE_TEMPS(n$6); [line 26]\n NULLIFY(&newImage,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="invhouse"] 14 -> 11 ; @@ -27,7 +27,7 @@ digraph iCFG { 13 -> 15 ; -12 [label="12: between_join_and_exit \n NULLIFY(&newImage,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +12 [label="12: between_join_and_exit \n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 12 -> 10 ; @@ -52,7 +52,7 @@ digraph iCFG { 7 -> 4 ; -6 [label="6: Prune (false branch) \n n$1=*&context:struct CGContext * [line 30]\n PRUNE((n$1 == 0), false); [line 30]\n REMOVE_TEMPS(n$1); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="invhouse"] +6 [label="6: Prune (false branch) \n n$1=*&context:struct CGContext * [line 30]\n PRUNE((n$1 == 0), false); [line 30]\n REMOVE_TEMPS(n$1); [line 30]\n NULLIFY(&context,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="invhouse"] 6 -> 4 ; @@ -64,7 +64,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n NULLIFY(&context,false); [line 32]\n n$0=*&z:int [line 32]\n *&return:int =n$0 [line 32]\n REMOVE_TEMPS(n$0); [line 32]\n NULLIFY(&__objc_anonymous_block_My_manager_blockReleaseTODO______1,true); [line 32]\n NULLIFY(&z,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&z:int [line 32]\n *&return:int =n$0 [line 32]\n REMOVE_TEMPS(n$0); [line 32]\n NULLIFY(&z,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/dispatch.dot b/infer/tests/codetoanalyze/objc/frontend/block/dispatch.dot index f183dcab7..0c82eee11 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/dispatch.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/dispatch.dot @@ -7,7 +7,7 @@ digraph iCFG { 26 -> 21 ; -25 [label="25: Return Stmt \n NULLIFY(&p,false); [line 48]\n *&return:int =0 [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] +25 [label="25: Return Stmt \n *&return:int =0 [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] 25 -> 18 ; @@ -15,7 +15,7 @@ digraph iCFG { 24 -> 18 ; -23 [label="23: Prune (false branch) \n PRUNE(((n$0 == 0) == 0), false); [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n " shape="invhouse"] +23 [label="23: Prune (false branch) \n PRUNE(((n$0 == 0) == 0), false); [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n NULLIFY(&p,false); [line 45]\n " shape="invhouse"] 23 -> 25 ; @@ -28,7 +28,7 @@ digraph iCFG { 21 -> 22 ; 21 -> 23 ; -20 [label="20: between_join_and_exit \n NULLIFY(&b,false); [line 45]\n NULLIFY(&p,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] +20 [label="20: between_join_and_exit \n APPLY_ABSTRACTION; [line 45]\n " shape="box"] 20 -> 18 ; @@ -43,7 +43,7 @@ digraph iCFG { 17 -> 27 ; -16 [label="16: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_trans______2); [line 34]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_trans______2 ):unsigned long ) [line 34]\n *&__objc_anonymous_block_A_trans______2:class __objc_anonymous_block_A_trans______2 =n$11 [line 34]\n n$12=*&#GB$A_trans_sharedInstance:struct objc_object * [line 34]\n *n$11.A_trans_sharedInstance:struct objc_object *=n$12 [line 34]\n *&dummy_block:_fn_ (*)=(_fun___objc_anonymous_block_A_trans______2) [line 34]\n REMOVE_TEMPS(n$11,n$12); [line 34]\n " shape="box"] +16 [label="16: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_trans______2); [line 34]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_trans______2 ):unsigned long ) [line 34]\n *&__objc_anonymous_block_A_trans______2:class __objc_anonymous_block_A_trans______2 =n$11 [line 34]\n n$12=*&#GB$A_trans_sharedInstance:struct objc_object * [line 34]\n *n$11.A_trans_sharedInstance:struct objc_object *=n$12 [line 34]\n *&dummy_block:_fn_ (*)=(_fun___objc_anonymous_block_A_trans______2) [line 34]\n REMOVE_TEMPS(n$11,n$12); [line 34]\n NULLIFY(&__objc_anonymous_block_A_trans______2,false); [line 34]\n " shape="box"] 16 -> 12 ; @@ -62,7 +62,7 @@ digraph iCFG { 12 -> 11 ; -11 [label="11: Return Stmt \n n$7=*&#GB$A_trans_sharedInstance:struct objc_object * [line 38]\n *&return:struct objc_object *=n$7 [line 38]\n REMOVE_TEMPS(n$7); [line 38]\n NULLIFY(&__objc_anonymous_block_A_trans______2,true); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] +11 [label="11: Return Stmt \n n$7=*&#GB$A_trans_sharedInstance:struct objc_object * [line 38]\n *&return:struct objc_object *=n$7 [line 38]\n REMOVE_TEMPS(n$7); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] 11 -> 10 ; @@ -73,7 +73,7 @@ digraph iCFG { 9 -> 16 ; -8 [label="8: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_sharedInstance______1); [line 26]\n n$5=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_sharedInstance______1 ):unsigned long ) [line 26]\n *&__objc_anonymous_block_A_sharedInstance______1:class __objc_anonymous_block_A_sharedInstance______1 =n$5 [line 26]\n n$6=*&#GB$A_sharedInstance_sharedInstance:struct objc_object * [line 26]\n *n$5.A_sharedInstance_sharedInstance:struct objc_object *=n$6 [line 26]\n *&infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*)=(_fun___objc_anonymous_block_A_sharedInstance______1) [line 26]\n REMOVE_TEMPS(n$5,n$6); [line 26]\n " shape="box"] +8 [label="8: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_sharedInstance______1); [line 26]\n n$5=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_sharedInstance______1 ):unsigned long ) [line 26]\n *&__objc_anonymous_block_A_sharedInstance______1:class __objc_anonymous_block_A_sharedInstance______1 =n$5 [line 26]\n n$6=*&#GB$A_sharedInstance_sharedInstance:struct objc_object * [line 26]\n *n$5.A_sharedInstance_sharedInstance:struct objc_object *=n$6 [line 26]\n *&infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*)=(_fun___objc_anonymous_block_A_sharedInstance______1) [line 26]\n REMOVE_TEMPS(n$5,n$6); [line 26]\n NULLIFY(&__objc_anonymous_block_A_sharedInstance______1,false); [line 26]\n " shape="box"] 8 -> 4 ; @@ -92,7 +92,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&#GB$A_sharedInstance_sharedInstance:struct objc_object * [line 29]\n *&return:struct objc_object *=n$0 [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&__objc_anonymous_block_A_sharedInstance______1,true); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&#GB$A_sharedInstance_sharedInstance:struct objc_object * [line 29]\n *&return:struct objc_object *=n$0 [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.dot b/infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.dot index b992862b3..d4ba574ef 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.dot @@ -3,7 +3,7 @@ digraph iCFG { 60 -> 59 ; -59 [label="59: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_barrier_example______6); [line 73]\n n$52=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_barrier_example______6 ):unsigned long ) [line 73]\n *&__objc_anonymous_block_A_dispatch_barrier_example______6:class __objc_anonymous_block_A_dispatch_barrier_example______6 =n$52 [line 73]\n n$53=*&#GB$A_dispatch_barrier_example_a:class A * [line 73]\n *n$52.A_dispatch_barrier_example_a:class A *=n$53 [line 73]\n *&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_barrier_example______6) [line 73]\n REMOVE_TEMPS(n$52,n$53); [line 73]\n " shape="box"] +59 [label="59: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_barrier_example______6); [line 73]\n n$52=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_barrier_example______6 ):unsigned long ) [line 73]\n *&__objc_anonymous_block_A_dispatch_barrier_example______6:class __objc_anonymous_block_A_dispatch_barrier_example______6 =n$52 [line 73]\n n$53=*&#GB$A_dispatch_barrier_example_a:class A * [line 73]\n *n$52.A_dispatch_barrier_example_a:class A *=n$53 [line 73]\n *&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_barrier_example______6) [line 73]\n REMOVE_TEMPS(n$52,n$53); [line 73]\n NULLIFY(&__objc_anonymous_block_A_dispatch_barrier_example______6,false); [line 73]\n " shape="box"] 59 -> 54 ; @@ -26,7 +26,7 @@ digraph iCFG { 54 -> 53 ; -53 [label="53: Return Stmt \n n$45=*&#GB$A_dispatch_barrier_example_a:class A * [line 77]\n n$46=*n$45.x:int [line 77]\n *&return:int =n$46 [line 77]\n REMOVE_TEMPS(n$45,n$46); [line 77]\n NULLIFY(&__objc_anonymous_block_A_dispatch_barrier_example______6,true); [line 77]\n APPLY_ABSTRACTION; [line 77]\n " shape="box"] +53 [label="53: Return Stmt \n n$45=*&#GB$A_dispatch_barrier_example_a:class A * [line 77]\n n$46=*n$45.x:int [line 77]\n *&return:int =n$46 [line 77]\n REMOVE_TEMPS(n$45,n$46); [line 77]\n APPLY_ABSTRACTION; [line 77]\n " shape="box"] 53 -> 52 ; @@ -41,7 +41,7 @@ digraph iCFG { 50 -> 49 ; -49 [label="49: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_notify_example______5); [line 64]\n n$43=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_notify_example______5 ):unsigned long ) [line 64]\n *&__objc_anonymous_block_A_dispatch_group_notify_example______5:class __objc_anonymous_block_A_dispatch_group_notify_example______5 =n$43 [line 64]\n n$44=*&#GB$A_dispatch_group_notify_example_a:class A * [line 64]\n *n$43.A_dispatch_group_notify_example_a:class A *=n$44 [line 64]\n *&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_notify_example______5) [line 64]\n REMOVE_TEMPS(n$43,n$44); [line 64]\n " shape="box"] +49 [label="49: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_notify_example______5); [line 64]\n n$43=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_notify_example______5 ):unsigned long ) [line 64]\n *&__objc_anonymous_block_A_dispatch_group_notify_example______5:class __objc_anonymous_block_A_dispatch_group_notify_example______5 =n$43 [line 64]\n n$44=*&#GB$A_dispatch_group_notify_example_a:class A * [line 64]\n *n$43.A_dispatch_group_notify_example_a:class A *=n$44 [line 64]\n *&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_notify_example______5) [line 64]\n REMOVE_TEMPS(n$43,n$44); [line 64]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_notify_example______5,false); [line 64]\n " shape="box"] 49 -> 44 ; @@ -64,7 +64,7 @@ digraph iCFG { 44 -> 43 ; -43 [label="43: Return Stmt \n n$36=*&#GB$A_dispatch_group_notify_example_a:class A * [line 68]\n n$37=*n$36.x:int [line 68]\n *&return:int =n$37 [line 68]\n REMOVE_TEMPS(n$36,n$37); [line 68]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_notify_example______5,true); [line 68]\n APPLY_ABSTRACTION; [line 68]\n " shape="box"] +43 [label="43: Return Stmt \n n$36=*&#GB$A_dispatch_group_notify_example_a:class A * [line 68]\n n$37=*n$36.x:int [line 68]\n *&return:int =n$37 [line 68]\n REMOVE_TEMPS(n$36,n$37); [line 68]\n APPLY_ABSTRACTION; [line 68]\n " shape="box"] 43 -> 42 ; @@ -79,7 +79,7 @@ digraph iCFG { 40 -> 39 ; -39 [label="39: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_example______4); [line 55]\n n$34=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_example______4 ):unsigned long ) [line 55]\n *&__objc_anonymous_block_A_dispatch_group_example______4:class __objc_anonymous_block_A_dispatch_group_example______4 =n$34 [line 55]\n n$35=*&#GB$A_dispatch_group_example_a:class A * [line 55]\n *n$34.A_dispatch_group_example_a:class A *=n$35 [line 55]\n *&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_example______4) [line 55]\n REMOVE_TEMPS(n$34,n$35); [line 55]\n " shape="box"] +39 [label="39: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_example______4); [line 55]\n n$34=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_example______4 ):unsigned long ) [line 55]\n *&__objc_anonymous_block_A_dispatch_group_example______4:class __objc_anonymous_block_A_dispatch_group_example______4 =n$34 [line 55]\n n$35=*&#GB$A_dispatch_group_example_a:class A * [line 55]\n *n$34.A_dispatch_group_example_a:class A *=n$35 [line 55]\n *&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_example______4) [line 55]\n REMOVE_TEMPS(n$34,n$35); [line 55]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_example______4,false); [line 55]\n " shape="box"] 39 -> 34 ; @@ -102,7 +102,7 @@ digraph iCFG { 34 -> 33 ; -33 [label="33: Return Stmt \n n$27=*&#GB$A_dispatch_group_example_a:class A * [line 59]\n n$28=*n$27.x:int [line 59]\n *&return:int =n$28 [line 59]\n REMOVE_TEMPS(n$27,n$28); [line 59]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_example______4,true); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] +33 [label="33: Return Stmt \n n$27=*&#GB$A_dispatch_group_example_a:class A * [line 59]\n n$28=*n$27.x:int [line 59]\n *&return:int =n$28 [line 59]\n REMOVE_TEMPS(n$27,n$28); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] 33 -> 32 ; @@ -117,7 +117,7 @@ digraph iCFG { 30 -> 29 ; -29 [label="29: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_after_example______3); [line 46]\n n$25=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_after_example______3 ):unsigned long ) [line 46]\n *&__objc_anonymous_block_A_dispatch_after_example______3:class __objc_anonymous_block_A_dispatch_after_example______3 =n$25 [line 46]\n n$26=*&#GB$A_dispatch_after_example_a:class A * [line 46]\n *n$25.A_dispatch_after_example_a:class A *=n$26 [line 46]\n *&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_after_example______3) [line 44]\n REMOVE_TEMPS(n$25,n$26); [line 44]\n " shape="box"] +29 [label="29: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_after_example______3); [line 46]\n n$25=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_after_example______3 ):unsigned long ) [line 46]\n *&__objc_anonymous_block_A_dispatch_after_example______3:class __objc_anonymous_block_A_dispatch_after_example______3 =n$25 [line 46]\n n$26=*&#GB$A_dispatch_after_example_a:class A * [line 46]\n *n$25.A_dispatch_after_example_a:class A *=n$26 [line 46]\n *&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_after_example______3) [line 44]\n REMOVE_TEMPS(n$25,n$26); [line 44]\n NULLIFY(&__objc_anonymous_block_A_dispatch_after_example______3,false); [line 44]\n " shape="box"] 29 -> 24 ; @@ -140,7 +140,7 @@ digraph iCFG { 24 -> 23 ; -23 [label="23: Return Stmt \n n$18=*&#GB$A_dispatch_after_example_a:class A * [line 50]\n n$19=*n$18.x:int [line 50]\n *&return:int =n$19 [line 50]\n REMOVE_TEMPS(n$18,n$19); [line 50]\n NULLIFY(&__objc_anonymous_block_A_dispatch_after_example______3,true); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] +23 [label="23: Return Stmt \n n$18=*&#GB$A_dispatch_after_example_a:class A * [line 50]\n n$19=*n$18.x:int [line 50]\n *&return:int =n$19 [line 50]\n REMOVE_TEMPS(n$18,n$19); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] 23 -> 22 ; @@ -155,7 +155,7 @@ digraph iCFG { 20 -> 19 ; -19 [label="19: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_async_example______2); [line 35]\n n$16=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_async_example______2 ):unsigned long ) [line 35]\n *&__objc_anonymous_block_A_dispatch_async_example______2:class __objc_anonymous_block_A_dispatch_async_example______2 =n$16 [line 35]\n n$17=*&#GB$A_dispatch_async_example_a:class A * [line 35]\n *n$16.A_dispatch_async_example_a:class A *=n$17 [line 35]\n *&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_async_example______2) [line 34]\n REMOVE_TEMPS(n$16,n$17); [line 34]\n " shape="box"] +19 [label="19: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_async_example______2); [line 35]\n n$16=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_async_example______2 ):unsigned long ) [line 35]\n *&__objc_anonymous_block_A_dispatch_async_example______2:class __objc_anonymous_block_A_dispatch_async_example______2 =n$16 [line 35]\n n$17=*&#GB$A_dispatch_async_example_a:class A * [line 35]\n *n$16.A_dispatch_async_example_a:class A *=n$17 [line 35]\n *&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_async_example______2) [line 34]\n REMOVE_TEMPS(n$16,n$17); [line 34]\n NULLIFY(&__objc_anonymous_block_A_dispatch_async_example______2,false); [line 34]\n " shape="box"] 19 -> 14 ; @@ -178,7 +178,7 @@ digraph iCFG { 14 -> 13 ; -13 [label="13: Return Stmt \n n$9=*&#GB$A_dispatch_async_example_a:class A * [line 39]\n n$10=*n$9.x:int [line 39]\n *&return:int =n$10 [line 39]\n REMOVE_TEMPS(n$9,n$10); [line 39]\n NULLIFY(&__objc_anonymous_block_A_dispatch_async_example______2,true); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="box"] +13 [label="13: Return Stmt \n n$9=*&#GB$A_dispatch_async_example_a:class A * [line 39]\n n$10=*n$9.x:int [line 39]\n *&return:int =n$10 [line 39]\n REMOVE_TEMPS(n$9,n$10); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="box"] 13 -> 12 ; @@ -193,7 +193,7 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_once_example______1); [line 25]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_once_example______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_A_dispatch_once_example______1:class __objc_anonymous_block_A_dispatch_once_example______1 =n$7 [line 25]\n n$8=*&#GB$A_dispatch_once_example_a:class A * [line 25]\n *n$7.A_dispatch_once_example_a:class A *=n$8 [line 25]\n *&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_once_example______1) [line 25]\n REMOVE_TEMPS(n$7,n$8); [line 25]\n " shape="box"] +9 [label="9: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_once_example______1); [line 25]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_once_example______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_A_dispatch_once_example______1:class __objc_anonymous_block_A_dispatch_once_example______1 =n$7 [line 25]\n n$8=*&#GB$A_dispatch_once_example_a:class A * [line 25]\n *n$7.A_dispatch_once_example_a:class A *=n$8 [line 25]\n *&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_once_example______1) [line 25]\n REMOVE_TEMPS(n$7,n$8); [line 25]\n NULLIFY(&__objc_anonymous_block_A_dispatch_once_example______1,false); [line 25]\n " shape="box"] 9 -> 4 ; @@ -216,7 +216,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&#GB$A_dispatch_once_example_a:class A * [line 29]\n n$1=*n$0.x:int [line 29]\n *&return:int =n$1 [line 29]\n REMOVE_TEMPS(n$0,n$1); [line 29]\n NULLIFY(&__objc_anonymous_block_A_dispatch_once_example______1,true); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&#GB$A_dispatch_once_example_a:class A * [line 29]\n n$1=*n$0.x:int [line 29]\n *&return:int =n$1 [line 29]\n REMOVE_TEMPS(n$0,n$1); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.dot b/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.dot index b018408f7..6b015b0de 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.dot @@ -37,7 +37,7 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: Message Call: sHandler: \n n$0=*&self:class A * [line 47]\n n$1=*n$0._b:class B * [line 47]\n DECLARE_LOCALS(&__objc_anonymous_block_A_capture______1); [line 47]\n n$5=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_capture______1 ):unsigned long ) [line 47]\n *&__objc_anonymous_block_A_capture______1:class __objc_anonymous_block_A_capture______1 =n$5 [line 47]\n n$6=*&self:class A * [line 47]\n *n$5.self:class A *=n$6 [line 47]\n n$2=*&self:class A * [line 47]\n n$7=*&__objc_anonymous_block_A_capture______1:_fn_ (*) [line 47]\n _fun_B_sHandler:(n$1:class B *,n$7:_fn_ (*),n$2:_fn_ (*)) virtual [line 47]\n REMOVE_TEMPS(n$0,n$1,n$5,n$6,n$2,n$7); [line 47]\n NULLIFY(&__objc_anonymous_block_A_capture______1,true); [line 47]\n NULLIFY(&self,false); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"] +9 [label="9: Message Call: sHandler: \n n$0=*&self:class A * [line 47]\n n$1=*n$0._b:class B * [line 47]\n DECLARE_LOCALS(&__objc_anonymous_block_A_capture______1); [line 47]\n n$5=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_capture______1 ):unsigned long ) [line 47]\n *&__objc_anonymous_block_A_capture______1:class __objc_anonymous_block_A_capture______1 =n$5 [line 47]\n n$6=*&self:class A * [line 47]\n *n$5.self:class A *=n$6 [line 47]\n n$2=*&self:class A * [line 47]\n n$7=*&__objc_anonymous_block_A_capture______1:_fn_ (*) [line 47]\n _fun_B_sHandler:(n$1:class B *,n$7:_fn_ (*),n$2:_fn_ (*)) virtual [line 47]\n REMOVE_TEMPS(n$0,n$1,n$5,n$6,n$2,n$7); [line 47]\n NULLIFY(&__objc_anonymous_block_A_capture______1,false); [line 47]\n NULLIFY(&self,false); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"] 9 -> 5 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/static.dot b/infer/tests/codetoanalyze/objc/frontend/block/static.dot index 3691ec597..4e630d35a 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/static.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/static.dot @@ -10,7 +10,7 @@ digraph iCFG { 29 -> 31 ; -28 [label="28: Call (_fun___objc_anonymous_block_A_test3______4) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test3______4); [line 50]\n n$17=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test3______4 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_A_test3______4:class __objc_anonymous_block_A_test3______4 =n$17 [line 50]\n n$18=*&#GB$A_test3_i:int [line 50]\n *n$17.A_test3_i:int =n$18 [line 50]\n (_fun___objc_anonymous_block_A_test3______4)() [line 50]\n REMOVE_TEMPS(n$17,n$18); [line 50]\n " shape="box"] +28 [label="28: Call (_fun___objc_anonymous_block_A_test3______4) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test3______4); [line 50]\n n$17=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test3______4 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_A_test3______4:class __objc_anonymous_block_A_test3______4 =n$17 [line 50]\n n$18=*&#GB$A_test3_i:int [line 50]\n *n$17.A_test3_i:int =n$18 [line 50]\n (_fun___objc_anonymous_block_A_test3______4)() [line 50]\n REMOVE_TEMPS(n$17,n$18); [line 50]\n NULLIFY(&__objc_anonymous_block_A_test3______4,false); [line 50]\n " shape="box"] 28 -> 24 ; @@ -25,7 +25,7 @@ digraph iCFG { 25 -> 27 ; -24 [label="24: Return Stmt \n n$15=*&#GB$A_test3_i:int [line 55]\n *&return:int =n$15 [line 55]\n REMOVE_TEMPS(n$15); [line 55]\n NULLIFY(&__objc_anonymous_block_A_test3______4,true); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="box"] +24 [label="24: Return Stmt \n n$15=*&#GB$A_test3_i:int [line 55]\n *&return:int =n$15 [line 55]\n REMOVE_TEMPS(n$15); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="box"] 24 -> 23 ; @@ -40,7 +40,7 @@ digraph iCFG { 21 -> 20 ; -20 [label="20: Call (_fun___objc_anonymous_block_A_test2______3) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test2______3); [line 39]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test2______3 ):unsigned long ) [line 39]\n *&__objc_anonymous_block_A_test2______3:class __objc_anonymous_block_A_test2______3 =n$11 [line 39]\n n$12=*&#GB$A_test2_sharedInstance:struct objc_object * [line 39]\n *n$11.A_test2_sharedInstance:struct objc_object *=n$12 [line 39]\n (_fun___objc_anonymous_block_A_test2______3)() [line 39]\n REMOVE_TEMPS(n$11,n$12); [line 39]\n " shape="box"] +20 [label="20: Call (_fun___objc_anonymous_block_A_test2______3) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test2______3); [line 39]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test2______3 ):unsigned long ) [line 39]\n *&__objc_anonymous_block_A_test2______3:class __objc_anonymous_block_A_test2______3 =n$11 [line 39]\n n$12=*&#GB$A_test2_sharedInstance:struct objc_object * [line 39]\n *n$11.A_test2_sharedInstance:struct objc_object *=n$12 [line 39]\n (_fun___objc_anonymous_block_A_test2______3)() [line 39]\n REMOVE_TEMPS(n$11,n$12); [line 39]\n NULLIFY(&__objc_anonymous_block_A_test2______3,false); [line 39]\n " shape="box"] 20 -> 16 ; @@ -55,7 +55,7 @@ digraph iCFG { 17 -> 19 ; -16 [label="16: Return Stmt \n n$9=*&#GB$A_test2_sharedInstance:struct objc_object * [line 44]\n *&return:struct objc_object *=n$9 [line 44]\n REMOVE_TEMPS(n$9); [line 44]\n NULLIFY(&__objc_anonymous_block_A_test2______3,true); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] +16 [label="16: Return Stmt \n n$9=*&#GB$A_test2_sharedInstance:struct objc_object * [line 44]\n *&return:struct objc_object *=n$9 [line 44]\n REMOVE_TEMPS(n$9); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] 16 -> 15 ; @@ -66,7 +66,7 @@ digraph iCFG { 14 -> 21 ; -13 [label="13: Call (_fun___objc_anonymous_block_A_test_leak______2) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test_leak______2); [line 30]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test_leak______2 ):unsigned long ) [line 30]\n *&__objc_anonymous_block_A_test_leak______2:class __objc_anonymous_block_A_test_leak______2 =n$7 [line 30]\n n$8=*&#GB$A_test_leak_sharedInstance:struct objc_object * [line 30]\n *n$7.A_test_leak_sharedInstance:struct objc_object *=n$8 [line 30]\n (_fun___objc_anonymous_block_A_test_leak______2)() [line 30]\n REMOVE_TEMPS(n$7,n$8); [line 30]\n NULLIFY(&__objc_anonymous_block_A_test_leak______2,true); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +13 [label="13: Call (_fun___objc_anonymous_block_A_test_leak______2) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test_leak______2); [line 30]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test_leak______2 ):unsigned long ) [line 30]\n *&__objc_anonymous_block_A_test_leak______2:class __objc_anonymous_block_A_test_leak______2 =n$7 [line 30]\n n$8=*&#GB$A_test_leak_sharedInstance:struct objc_object * [line 30]\n *n$7.A_test_leak_sharedInstance:struct objc_object *=n$8 [line 30]\n (_fun___objc_anonymous_block_A_test_leak______2)() [line 30]\n REMOVE_TEMPS(n$7,n$8); [line 30]\n NULLIFY(&__objc_anonymous_block_A_test_leak______2,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 13 -> 9 ; @@ -88,7 +88,7 @@ digraph iCFG { 8 -> 13 ; -7 [label="7: Call (_fun___objc_anonymous_block_A_test______1) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test______1); [line 20]\n n$3=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test______1 ):unsigned long ) [line 20]\n *&__objc_anonymous_block_A_test______1:class __objc_anonymous_block_A_test______1 =n$3 [line 20]\n n$4=*&#GB$A_test_sharedInstance:struct objc_object * [line 20]\n *n$3.A_test_sharedInstance:struct objc_object *=n$4 [line 20]\n (_fun___objc_anonymous_block_A_test______1)() [line 20]\n REMOVE_TEMPS(n$3,n$4); [line 20]\n " shape="box"] +7 [label="7: Call (_fun___objc_anonymous_block_A_test______1) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test______1); [line 20]\n n$3=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test______1 ):unsigned long ) [line 20]\n *&__objc_anonymous_block_A_test______1:class __objc_anonymous_block_A_test______1 =n$3 [line 20]\n n$4=*&#GB$A_test_sharedInstance:struct objc_object * [line 20]\n *n$3.A_test_sharedInstance:struct objc_object *=n$4 [line 20]\n (_fun___objc_anonymous_block_A_test______1)() [line 20]\n REMOVE_TEMPS(n$3,n$4); [line 20]\n NULLIFY(&__objc_anonymous_block_A_test______1,false); [line 20]\n " shape="box"] 7 -> 3 ; @@ -103,7 +103,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: Return Stmt \n n$0=*&#GB$A_test_sharedInstance:struct objc_object * [line 25]\n *&return:struct objc_object *=n$0 [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&__objc_anonymous_block_A_test______1,true); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&#GB$A_test_sharedInstance:struct objc_object * [line 25]\n *&return:struct objc_object *=n$0 [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/boxing/array.dot b/infer/tests/codetoanalyze/objc/frontend/boxing/array.dot index d2148a2ab..735a4b25f 100644 --- a/infer/tests/codetoanalyze/objc/frontend/boxing/array.dot +++ b/infer/tests/codetoanalyze/objc/frontend/boxing/array.dot @@ -19,7 +19,7 @@ digraph iCFG { 8 -> 4 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 != 0) == 0), false); [line 26]\n REMOVE_TEMPS(n$0); [line 26]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 != 0) == 0), false); [line 26]\n REMOVE_TEMPS(n$0); [line 26]\n NULLIFY(&germanCars,false); [line 26]\n NULLIFY(&item,false); [line 26]\n " shape="invhouse"] 7 -> 3 ; @@ -36,7 +36,7 @@ digraph iCFG { 4 -> 5 ; -3 [label="3: Return Stmt \n NULLIFY(&germanCars,false); [line 30]\n NULLIFY(&item,false); [line 30]\n *&return:int =0 [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =0 [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot b/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot index 819acb64b..ec935fe18 100644 --- a/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot +++ b/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot @@ -3,7 +3,7 @@ digraph iCFG { 11 -> 5 ; -10 [label="10: ConditinalStmt Branch \n NULLIFY(&b,false); [line 24]\n *&SIL_temp_conditional___n$2:int =1 [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +10 [label="10: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =1 [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 10 -> 6 ; @@ -11,7 +11,7 @@ digraph iCFG { 9 -> 6 ; -8 [label="8: Prune (false branch) \n n$3=*&b:_Bool [line 24]\n PRUNE((n$3 == 0), false); [line 24]\n REMOVE_TEMPS(n$3); [line 24]\n " shape="invhouse"] +8 [label="8: Prune (false branch) \n n$3=*&b:_Bool [line 24]\n PRUNE((n$3 == 0), false); [line 24]\n REMOVE_TEMPS(n$3); [line 24]\n NULLIFY(&b,false); [line 24]\n " shape="invhouse"] 8 -> 10 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.dot b/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.dot index 1f1312702..51747c3f0 100644 --- a/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.dot +++ b/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.dot @@ -4,19 +4,19 @@ digraph iCFG { 12 -> 9 ; 12 -> 10 ; -11 [label="11: Return Stmt \n NULLIFY(&s,false); [line 30]\n n$4=_fun_NSString_stringWithUTF8String:(\"Something is not right exception\":char *) [line 31]\n n$5=_fun_NSString_stringWithUTF8String:(\"Can't perform this operation because of this or that\":char *) [line 33]\n n$6=_fun_NSException_exceptionWithName:reason:userInfo:(n$4:class NSString *,n$5:class NSString *,0:class NSDictionary *) [line 30]\n *&return:void =n$6 [line 30]\n REMOVE_TEMPS(n$4,n$5,n$6); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +11 [label="11: Return Stmt \n n$4=_fun_NSString_stringWithUTF8String:(\"Something is not right exception\":char *) [line 31]\n n$5=_fun_NSString_stringWithUTF8String:(\"Can't perform this operation because of this or that\":char *) [line 33]\n n$6=_fun_NSException_exceptionWithName:reason:userInfo:(n$4:class NSString *,n$5:class NSString *,0:class NSDictionary *) [line 30]\n *&return:void =n$6 [line 30]\n REMOVE_TEMPS(n$4,n$5,n$6); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 11 -> 6 ; -10 [label="10: Prune (false branch) \n n$3=*&s:class NSString * [line 29]\n PRUNE((n$3 == 0), false); [line 29]\n REMOVE_TEMPS(n$3); [line 29]\n " shape="invhouse"] +10 [label="10: Prune (false branch) \n n$3=*&s:class NSString * [line 29]\n PRUNE((n$3 == 0), false); [line 29]\n REMOVE_TEMPS(n$3); [line 29]\n NULLIFY(&s,false); [line 29]\n " shape="invhouse"] 10 -> 7 ; -9 [label="9: Prune (true branch) \n n$3=*&s:class NSString * [line 29]\n PRUNE((n$3 != 0), true); [line 29]\n REMOVE_TEMPS(n$3); [line 29]\n " shape="invhouse"] +9 [label="9: Prune (true branch) \n n$3=*&s:class NSString * [line 29]\n PRUNE((n$3 != 0), true); [line 29]\n REMOVE_TEMPS(n$3); [line 29]\n NULLIFY(&s,false); [line 29]\n " shape="invhouse"] 9 -> 11 ; -8 [label="8: between_join_and_exit \n NULLIFY(&s,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +8 [label="8: between_join_and_exit \n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 8 -> 6 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.dot b/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.dot index afd12a6c7..2814a9dcb 100644 --- a/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.dot +++ b/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.dot @@ -11,7 +11,7 @@ digraph iCFG { 19 -> 15 ; -18 [label="18: Prune (false branch) \n PRUNE((n$12 == 0), false); [line 28]\n REMOVE_TEMPS(n$10,n$11,n$12); [line 28]\n " shape="invhouse"] +18 [label="18: Prune (false branch) \n PRUNE((n$12 == 0), false); [line 28]\n REMOVE_TEMPS(n$10,n$11,n$12); [line 28]\n NULLIFY(&item,false); [line 28]\n " shape="invhouse"] 18 -> 14 ; @@ -28,7 +28,7 @@ digraph iCFG { 15 -> 16 ; -14 [label="14: Return Stmt \n NULLIFY(&item,false); [line 31]\n NULLIFY(&items,false); [line 31]\n n$9=*&size:int [line 31]\n *&return:int =n$9 [line 31]\n REMOVE_TEMPS(n$9); [line 31]\n NULLIFY(&size,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +14 [label="14: Return Stmt \n n$9=*&size:int [line 31]\n *&return:int =n$9 [line 31]\n REMOVE_TEMPS(n$9); [line 31]\n NULLIFY(&size,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] 14 -> 13 ; @@ -55,7 +55,7 @@ digraph iCFG { 8 -> 4 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$1 != 0) == 0), false); [line 19]\n REMOVE_TEMPS(n$1); [line 19]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$1 != 0) == 0), false); [line 19]\n REMOVE_TEMPS(n$1); [line 19]\n NULLIFY(&item,false); [line 19]\n " shape="invhouse"] 7 -> 3 ; @@ -72,7 +72,7 @@ digraph iCFG { 4 -> 5 ; -3 [label="3: Return Stmt \n NULLIFY(&item,false); [line 22]\n NULLIFY(&items,false); [line 22]\n n$0=*&size:int [line 22]\n *&return:int =n$0 [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&size,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&size:int [line 22]\n *&return:int =n$0 [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&size,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.dot b/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.dot index 19343c3a6..2a7bc1abd 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.dot @@ -51,7 +51,7 @@ digraph iCFG { 6 -> 5 ; -5 [label="5: Return Stmt \n NULLIFY(&self,false); [line 33]\n n$0=*&other:class A * [line 33]\n *&return:class A *=n$0 [line 33]\n REMOVE_TEMPS(n$0); [line 33]\n NULLIFY(&other,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] +5 [label="5: Return Stmt \n n$0=*&other:class A * [line 33]\n *&return:class A *=n$0 [line 33]\n REMOVE_TEMPS(n$0); [line 33]\n NULLIFY(&other,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] 5 -> 4 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/returnstmt/void_return.dot b/infer/tests/codetoanalyze/objc/frontend/returnstmt/void_return.dot index cd42d0304..3bf157f98 100644 --- a/infer/tests/codetoanalyze/objc/frontend/returnstmt/void_return.dot +++ b/infer/tests/codetoanalyze/objc/frontend/returnstmt/void_return.dot @@ -7,7 +7,7 @@ digraph iCFG { 14 -> 10 ; -13 [label="13: Return Stmt \n NULLIFY(&i,false); [line 22]\n NULLIFY(&j,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +13 [label="13: Return Stmt \n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 13 -> 2 ; @@ -15,7 +15,7 @@ digraph iCFG { 12 -> 9 ; -11 [label="11: Prune (true branch) \n PRUNE(((n$2 == 0) != 0), true); [line 21]\n REMOVE_TEMPS(n$2); [line 21]\n " shape="invhouse"] +11 [label="11: Prune (true branch) \n PRUNE(((n$2 == 0) != 0), true); [line 21]\n REMOVE_TEMPS(n$2); [line 21]\n NULLIFY(&i,false); [line 21]\n NULLIFY(&j,false); [line 21]\n " shape="invhouse"] 11 -> 13 ; @@ -32,7 +32,7 @@ digraph iCFG { 8 -> 3 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 == 0) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 == 0) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&i,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="invhouse"] 7 -> 3 ; @@ -45,7 +45,7 @@ digraph iCFG { 5 -> 6 ; 5 -> 7 ; -4 [label="4: between_join_and_exit \n NULLIFY(&i,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +4 [label="4: between_join_and_exit \n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 4 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/self_static/Self.dot b/infer/tests/codetoanalyze/objc/frontend/self_static/Self.dot index 4d5f5fcc6..790dd9219 100644 --- a/infer/tests/codetoanalyze/objc/frontend/self_static/Self.dot +++ b/infer/tests/codetoanalyze/objc/frontend/self_static/Self.dot @@ -20,7 +20,7 @@ digraph iCFG { 48 -> 49 ; 48 -> 50 ; -47 [label="47: between_join_and_exit \n NULLIFY(&c,false); [line 95]\n APPLY_ABSTRACTION; [line 95]\n " shape="box"] +47 [label="47: between_join_and_exit \n APPLY_ABSTRACTION; [line 95]\n " shape="box"] 47 -> 45 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/types/void_call.dot b/infer/tests/codetoanalyze/objc/frontend/types/void_call.dot index e8af2b917..615286d34 100644 --- a/infer/tests/codetoanalyze/objc/frontend/types/void_call.dot +++ b/infer/tests/codetoanalyze/objc/frontend/types/void_call.dot @@ -24,7 +24,7 @@ digraph iCFG { 19 -> 16 ; -18 [label="18: Prune (false branch) \n n$0=*&o:class AClass * [line 42]\n PRUNE((n$0 == 0), false); [line 42]\n REMOVE_TEMPS(n$0); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="invhouse"] +18 [label="18: Prune (false branch) \n n$0=*&o:class AClass * [line 42]\n PRUNE((n$0 == 0), false); [line 42]\n REMOVE_TEMPS(n$0); [line 42]\n NULLIFY(&o,false); [line 42]\n NULLIFY(&x,false); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="invhouse"] 18 -> 16 ; @@ -36,7 +36,7 @@ digraph iCFG { 16 -> 15 ; -15 [label="15: Return Stmt \n NULLIFY(&o,false); [line 48]\n NULLIFY(&x,false); [line 48]\n *&return:int =0 [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] +15 [label="15: Return Stmt \n *&return:int =0 [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] 15 -> 14 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/vardecl/initlist.dot b/infer/tests/codetoanalyze/objc/frontend/vardecl/initlist.dot index 770393b31..2ee512d55 100644 --- a/infer/tests/codetoanalyze/objc/frontend/vardecl/initlist.dot +++ b/infer/tests/codetoanalyze/objc/frontend/vardecl/initlist.dot @@ -7,7 +7,7 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: DeclStmt \n n$2=*&c1:class C * [line 24]\n n$3=_fun_NSObject_init(n$2:class C *) virtual [line 24]\n n$1=*&c1:class C * [line 24]\n n$0=*&c2:class C * [line 24]\n *&a[0]:class C *=n$3 [line 24]\n *&a[1]:class C *=n$1 [line 24]\n *&a[2]:class C *=n$0 [line 24]\n REMOVE_TEMPS(n$2,n$3,n$1,n$0); [line 24]\n NULLIFY(&c1,false); [line 24]\n NULLIFY(&c2,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +6 [label="6: DeclStmt \n n$2=*&c1:class C * [line 24]\n n$3=_fun_NSObject_init(n$2:class C *) virtual [line 24]\n n$1=*&c1:class C * [line 24]\n n$0=*&c2:class C * [line 24]\n *&a[0]:class C *=n$3 [line 24]\n *&a[1]:class C *=n$1 [line 24]\n *&a[2]:class C *=n$0 [line 24]\n REMOVE_TEMPS(n$2,n$3,n$1,n$0); [line 24]\n NULLIFY(&a,false); [line 24]\n NULLIFY(&c1,false); [line 24]\n NULLIFY(&c2,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 6 -> 5 ; @@ -18,7 +18,7 @@ digraph iCFG { 4 -> 8 ; -3 [label="3: DeclStmt \n n$0=*&z:int [line 14]\n *&a[0][0]:int =(n$0 + 1) [line 14]\n *&a[0][1]:int =2 [line 14]\n *&a[0][2]:int =3 [line 14]\n *&a[1][0]:int =5 [line 14]\n *&a[1][1]:int =6 [line 14]\n *&a[1][2]:int =7 [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&z,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=*&z:int [line 14]\n *&a[0][0]:int =(n$0 + 1) [line 14]\n *&a[0][1]:int =2 [line 14]\n *&a[0][2]:int =3 [line 14]\n *&a[1][0]:int =5 [line 14]\n *&a[1][1]:int =6 [line 14]\n *&a[1][2]:int =7 [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&a,false); [line 14]\n NULLIFY(&z,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/endtoend/java/infer/ResourceLeaksTest.java b/infer/tests/endtoend/java/infer/ResourceLeaksTest.java index f7eb05a51..49327e709 100644 --- a/infer/tests/endtoend/java/infer/ResourceLeaksTest.java +++ b/infer/tests/endtoend/java/infer/ResourceLeaksTest.java @@ -42,7 +42,9 @@ public class ResourceLeaksTest { String[] methods = { "fileOutputStreamNotClosed", "fileOutputStreamNotClosedAfterWrite", - "fileOutputStreamTwoLeaks", + "fileOutputStreamOneLeak", + "fileOutputStreamTwoLeaks1", + "fileOutputStreamTwoLeaks2", "twoResources", "twoResourcesServerSocket", "twoResourcesRandomAccessFile", @@ -88,17 +90,46 @@ public class ResourceLeaksTest { ); } + @Test + public void whenInferRunsOnFileOutputStreamOneLeakThenOneLeaksIsFound() + throws InterruptedException, IOException, InferException { + assertThat( + "Results should contain 1 resource leak error", + inferResults, + containsNumberOfErrors( + RESOURCE_LEAK, + SOURCE_FILE, + "fileOutputStreamOneLeak", + 1 + ) + ); + } + + @Test + public void whenInferRunsOnFileOutputStreamTwoLeaks1ThenTwoLeaksAreFound() + throws InterruptedException, IOException, InferException { + assertThat( + "Results should contain 2 resource leak errors", + inferResults, + containsNumberOfErrors( + RESOURCE_LEAK, + SOURCE_FILE, + "fileOutputStreamTwoLeaks1", + 2 + ) + ); + } @Test - public void whenInferRunsOnFileOutputStreamTwoLeaksThenTwoLeaksAreFound() + public void whenInferRunsOnFileOutputStreamTwoLeaks2ThenTwoLeaksAreFound() throws InterruptedException, IOException, InferException { assertThat( - "Results should contain 2 resource leak error", + "Results should contain 2 resource leak errors", inferResults, containsNumberOfErrors( RESOURCE_LEAK, SOURCE_FILE, - "fileOutputStreamTwoLeaks", + "fileOutputStreamTwoLeaks2", 2 ) ); diff --git a/infer/tests/endtoend/objc/RetainCycleStaticVarTest.java b/infer/tests/endtoend/objc/RetainCycleStaticVarTest.java index 99d82456e..93914085b 100644 --- a/infer/tests/endtoend/objc/RetainCycleStaticVarTest.java +++ b/infer/tests/endtoend/objc/RetainCycleStaticVarTest.java @@ -50,7 +50,7 @@ public class RetainCycleStaticVarTest { throws InterruptedException, IOException, InferException { InferResults inferResults = InferRunner.runInferObjC(inferCmd); String[] procedures = { - "main", + "main", }; assertThat( "Results should contain the expected retain cycles",