From 662b6fa2ce85aed55f8e1bda1a29b7968be4eb65 Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Tue, 11 Oct 2022 17:33:37 -0400 Subject: [PATCH] Remove pts_ prefix from signature relations It's redundant - cclyzer++ is a pointer analysis, the signatures are *all* about pointers. --- FactGenerator/include/predicates.inc | 34 +++---- FactGenerator/src/Signatures.cpp | 34 +++---- datalog/export/debug-output-extended.dl | 38 +++---- datalog/export/debug-output.dl | 38 +++---- datalog/points-to/signatures.dl | 128 ++++++++++++------------ 5 files changed, 136 insertions(+), 136 deletions(-) diff --git a/FactGenerator/include/predicates.inc b/FactGenerator/include/predicates.inc index 5e2655f..fd61460 100644 --- a/FactGenerator/include/predicates.inc +++ b/FactGenerator/include/predicates.inc @@ -642,23 +642,23 @@ GROUP_END(attr) // Signatures GROUP_BEGIN(signature) -PREDICATE(signature, pts_none, pts_signature_none) -PREDICATE(signature, pts_return_alloc, pts_signature_return_alloc) -PREDICATE(signature, pts_return_alloc_once, pts_signature_return_alloc_once) -PREDICATE(signature, pts_return_aliases_arg, pts_signature_return_aliases_arg) -PREDICATE(signature, pts_return_aliases_arg_reachable, pts_signature_return_aliases_arg_reachable) -PREDICATE(signature, pts_return_points_to_global, pts_signature_return_points_to_global) -PREDICATE(signature, pts_return_aliases_global, pts_signature_return_aliases_global) -PREDICATE(signature, pts_return_aliases_global_reachable, pts_signature_return_aliases_global_reachable) -PREDICATE(signature, pts_arg_alloc, pts_signature_arg_alloc) -PREDICATE(signature, pts_arg_alloc_once, pts_signature_arg_alloc_once) -PREDICATE(signature, pts_arg_memcpy_arg, pts_signature_arg_memcpy_arg) -PREDICATE(signature, pts_arg_memcpy_arg_reachable, pts_signature_arg_memcpy_arg_reachable) -PREDICATE(signature, pts_arg_points_to_global, pts_signature_arg_points_to_global) -PREDICATE(signature, pts_arg_memcpy_global, pts_signature_arg_memcpy_global) -PREDICATE(signature, pts_arg_memcpy_global_reachable, pts_signature_arg_memcpy_global_reachable) -PREDICATE(signature, pts_global_memcpy_arg, pts_signature_global_memcpy_arg) -PREDICATE(signature, pts_global_memcpy_arg_reachable, pts_signature_global_memcpy_arg_reachable) +PREDICATE2(signature, none) +PREDICATE2(signature, return_alloc) +PREDICATE2(signature, return_alloc_once) +PREDICATE2(signature, return_aliases_arg) +PREDICATE2(signature, return_aliases_arg_reachable) +PREDICATE2(signature, return_points_to_global) +PREDICATE2(signature, return_aliases_global) +PREDICATE2(signature, return_aliases_global_reachable) +PREDICATE2(signature, arg_alloc) +PREDICATE2(signature, arg_alloc_once) +PREDICATE2(signature, arg_memcpy_arg) +PREDICATE2(signature, arg_memcpy_arg_reachable) +PREDICATE2(signature, arg_points_to_global) +PREDICATE2(signature, arg_memcpy_global) +PREDICATE2(signature, arg_memcpy_global_reachable) +PREDICATE2(signature, global_memcpy_arg) +PREDICATE2(signature, global_memcpy_arg_reachable) GROUP_END(signature) // User options diff --git a/FactGenerator/src/Signatures.cpp b/FactGenerator/src/Signatures.cpp index 70976d3..9f8e271 100644 --- a/FactGenerator/src/Signatures.cpp +++ b/FactGenerator/src/Signatures.cpp @@ -142,49 +142,49 @@ void emit_signatures( } if (signature_component_type == "pts_none") { write_pts_signature<>( - cclyzer::predicates::signature::pts_none, + cclyzer::predicates::signature::none, "pts_none", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_return_alloc") { write_pts_signature<>( - cclyzer::predicates::signature::pts_return_alloc, + cclyzer::predicates::signature::return_alloc, "pts_return_alloc", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_return_alloc_once") { write_pts_signature<>( - cclyzer::predicates::signature::pts_return_alloc_once, + cclyzer::predicates::signature::return_alloc_once, "pts_return_alloc_once", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_return_aliases_arg") { write_pts_signature( - cclyzer::predicates::signature::pts_return_aliases_arg, + cclyzer::predicates::signature::return_aliases_arg, "pts_return_aliases_arg", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_return_aliases_arg_reachable") { write_pts_signature( - cclyzer::predicates::signature::pts_return_aliases_arg_reachable, + cclyzer::predicates::signature::return_aliases_arg_reachable, "pts_return_aliases_arg_reachable", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_return_points_to_global") { write_pts_signature( - cclyzer::predicates::signature::pts_return_points_to_global, + cclyzer::predicates::signature::return_points_to_global, "pts_return_points_to_global", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_return_aliases_global") { write_pts_signature( - cclyzer::predicates::signature::pts_return_aliases_global, + cclyzer::predicates::signature::return_aliases_global, "pts_return_aliases_global", function_name, writer, @@ -192,70 +192,70 @@ void emit_signatures( } else if ( signature_component_type == "pts_return_aliases_global_reachable") { write_pts_signature( - cclyzer::predicates::signature::pts_return_aliases_global_reachable, + cclyzer::predicates::signature::return_aliases_global_reachable, "pts_return_aliases_global_reachable", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_arg_alloc") { write_pts_signature( - cclyzer::predicates::signature::pts_arg_alloc, + cclyzer::predicates::signature::arg_alloc, "pts_arg_alloc", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_arg_alloc_once") { write_pts_signature( - cclyzer::predicates::signature::pts_arg_alloc_once, + cclyzer::predicates::signature::arg_alloc_once, "pts_arg_alloc_once", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_arg_memcpy_arg") { write_pts_signature( - cclyzer::predicates::signature::pts_arg_memcpy_arg, + cclyzer::predicates::signature::arg_memcpy_arg, "pts_arg_memcpy_arg", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_arg_memcpy_arg_reachable") { write_pts_signature( - cclyzer::predicates::signature::pts_arg_memcpy_arg_reachable, + cclyzer::predicates::signature::arg_memcpy_arg_reachable, "pts_arg_memcpy_arg_reachable", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_arg_points_to_global") { write_pts_signature( - cclyzer::predicates::signature::pts_arg_points_to_global, + cclyzer::predicates::signature::arg_points_to_global, "pts_arg_points_to_global", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_arg_memcpy_global") { write_pts_signature( - cclyzer::predicates::signature::pts_arg_memcpy_global, + cclyzer::predicates::signature::arg_memcpy_global, "pts_arg_memcpy_global", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_arg_memcpy_global_reachable") { write_pts_signature( - cclyzer::predicates::signature::pts_arg_memcpy_global_reachable, + cclyzer::predicates::signature::arg_memcpy_global_reachable, "pts_arg_memcpy_global_reachable", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_global_memcpy_arg") { write_pts_signature( - cclyzer::predicates::signature::pts_global_memcpy_arg, + cclyzer::predicates::signature::global_memcpy_arg, "pts_global_memcpy_arg", function_name, writer, signature_component_inner_value); } else if (signature_component_type == "pts_global_memcpy_arg_reachable") { write_pts_signature( - cclyzer::predicates::signature::pts_global_memcpy_arg_reachable, + cclyzer::predicates::signature::global_memcpy_arg_reachable, "pts_global_memcpy_arg_reachable", function_name, writer, diff --git a/datalog/export/debug-output-extended.dl b/datalog/export/debug-output-extended.dl index 309f784..3cd0cec 100644 --- a/datalog/export/debug-output-extended.dl +++ b/datalog/export/debug-output-extended.dl @@ -372,9 +372,9 @@ .output func_is_illformed (compress=true) .output func_is_wellformed (compress=true) .output func_linkage (compress=true) -.output func_missing_pts_signature (compress=true) +.output func_missing_signature (compress=true) .output func_name (compress=true) -.output func_needs_pts_signature (compress=true) +.output func_needs_signature (compress=true) .output func_nparams (compress=true) .output func_out_degree (compress=true) .output func_param (compress=true) @@ -645,23 +645,23 @@ .output ptrtoint_instr_from_operand (compress=true) .output ptrtoint_instr_from_type (compress=true) .output ptrtoint_instr_to_type (compress=true) -.output pts_signature_arg_alloc (compress=true) -.output pts_signature_arg_alloc_once (compress=true) -.output pts_signature_arg_memcpy_arg (compress=true) -.output pts_signature_arg_memcpy_arg_reachable (compress=true) -.output pts_signature_arg_memcpy_global (compress=true) -.output pts_signature_arg_memcpy_global_reachable (compress=true) -.output pts_signature_arg_points_to_global (compress=true) -.output pts_signature_global_memcpy_arg (compress=true) -.output pts_signature_global_memcpy_arg_reachable (compress=true) -.output pts_signature_none (compress=true) -.output pts_signature_return_aliases_arg (compress=true) -.output pts_signature_return_aliases_arg_reachable (compress=true) -.output pts_signature_return_aliases_global (compress=true) -.output pts_signature_return_aliases_global_reachable (compress=true) -.output pts_signature_return_alloc (compress=true) -.output pts_signature_return_alloc_once (compress=true) -.output pts_signature_return_points_to_global (compress=true) +.output signature_arg_alloc (compress=true) +.output signature_arg_alloc_once (compress=true) +.output signature_arg_memcpy_arg (compress=true) +.output signature_arg_memcpy_arg_reachable (compress=true) +.output signature_arg_memcpy_global (compress=true) +.output signature_arg_memcpy_global_reachable (compress=true) +.output signature_arg_points_to_global (compress=true) +.output signature_global_memcpy_arg (compress=true) +.output signature_global_memcpy_arg_reachable (compress=true) +.output signature_none (compress=true) +.output signature_return_aliases_arg (compress=true) +.output signature_return_aliases_arg_reachable (compress=true) +.output signature_return_aliases_global (compress=true) +.output signature_return_aliases_global_reachable (compress=true) +.output signature_return_alloc (compress=true) +.output signature_return_alloc_once (compress=true) +.output signature_return_points_to_global (compress=true) .output ptx_device_calling_convention (compress=true) .output ptx_kernel_calling_convention (compress=true) .output reachable_var (compress=true) diff --git a/datalog/export/debug-output.dl b/datalog/export/debug-output.dl index 309f784..3cd0cec 100644 --- a/datalog/export/debug-output.dl +++ b/datalog/export/debug-output.dl @@ -372,9 +372,9 @@ .output func_is_illformed (compress=true) .output func_is_wellformed (compress=true) .output func_linkage (compress=true) -.output func_missing_pts_signature (compress=true) +.output func_missing_signature (compress=true) .output func_name (compress=true) -.output func_needs_pts_signature (compress=true) +.output func_needs_signature (compress=true) .output func_nparams (compress=true) .output func_out_degree (compress=true) .output func_param (compress=true) @@ -645,23 +645,23 @@ .output ptrtoint_instr_from_operand (compress=true) .output ptrtoint_instr_from_type (compress=true) .output ptrtoint_instr_to_type (compress=true) -.output pts_signature_arg_alloc (compress=true) -.output pts_signature_arg_alloc_once (compress=true) -.output pts_signature_arg_memcpy_arg (compress=true) -.output pts_signature_arg_memcpy_arg_reachable (compress=true) -.output pts_signature_arg_memcpy_global (compress=true) -.output pts_signature_arg_memcpy_global_reachable (compress=true) -.output pts_signature_arg_points_to_global (compress=true) -.output pts_signature_global_memcpy_arg (compress=true) -.output pts_signature_global_memcpy_arg_reachable (compress=true) -.output pts_signature_none (compress=true) -.output pts_signature_return_aliases_arg (compress=true) -.output pts_signature_return_aliases_arg_reachable (compress=true) -.output pts_signature_return_aliases_global (compress=true) -.output pts_signature_return_aliases_global_reachable (compress=true) -.output pts_signature_return_alloc (compress=true) -.output pts_signature_return_alloc_once (compress=true) -.output pts_signature_return_points_to_global (compress=true) +.output signature_arg_alloc (compress=true) +.output signature_arg_alloc_once (compress=true) +.output signature_arg_memcpy_arg (compress=true) +.output signature_arg_memcpy_arg_reachable (compress=true) +.output signature_arg_memcpy_global (compress=true) +.output signature_arg_memcpy_global_reachable (compress=true) +.output signature_arg_points_to_global (compress=true) +.output signature_global_memcpy_arg (compress=true) +.output signature_global_memcpy_arg_reachable (compress=true) +.output signature_none (compress=true) +.output signature_return_aliases_arg (compress=true) +.output signature_return_aliases_arg_reachable (compress=true) +.output signature_return_aliases_global (compress=true) +.output signature_return_aliases_global_reachable (compress=true) +.output signature_return_alloc (compress=true) +.output signature_return_alloc_once (compress=true) +.output signature_return_points_to_global (compress=true) .output ptx_device_calling_convention (compress=true) .output ptx_kernel_calling_convention (compress=true) .output reachable_var (compress=true) diff --git a/datalog/points-to/signatures.dl b/datalog/points-to/signatures.dl index 80a9f21..a3809b5 100644 --- a/datalog/points-to/signatures.dl +++ b/datalog/points-to/signatures.dl @@ -1,25 +1,25 @@ -// See doc/signatures.rst for documentation on pts_signature_* -.decl pts_signature_return_alloc(?func : FunctionName) -.decl pts_signature_return_alloc_once(?func : FunctionName) -.decl pts_signature_return_aliases_arg(?func : FunctionName, ?index : ArgumentIndex) -.decl pts_signature_return_aliases_arg_reachable(?func : FunctionName, ?index : ArgumentIndex) -.decl pts_signature_return_points_to_global(?func : FunctionName, ?global : GlobalVarName) -.decl pts_signature_return_aliases_global(?func : FunctionName, ?global : GlobalVarName) -.decl pts_signature_return_aliases_global_reachable(?func : FunctionName, ?global : GlobalVarName) -.decl pts_signature_arg_alloc(?func : FunctionName, ?index : ArgumentIndex) -.decl pts_signature_arg_alloc_once(?func : FunctionName, ?index : ArgumentIndex) -.decl pts_signature_arg_memcpy_arg(?func : FunctionName, ?index1 : ArgumentIndex, ?index2 : ArgumentIndex) -.decl pts_signature_arg_memcpy_arg_reachable(?func : FunctionName, ?index1 : ArgumentIndex, ?index2 : ArgumentIndex) -.decl pts_signature_arg_points_to_global(?func : FunctionName, ?index : ArgumentIndex, ?global : GlobalVarName) -.decl pts_signature_arg_memcpy_global(?func : FunctionName, ?index : ArgumentIndex, ?global : GlobalVarName) -.decl pts_signature_arg_memcpy_global_reachable(?func : FunctionName, ?index : ArgumentIndex, ?global : GlobalVarName) -.decl pts_signature_global_memcpy_arg(?func : FunctionName, ?global : GlobalVarName, ?index : ArgumentIndex) -.decl pts_signature_global_memcpy_arg_reachable(?func : FunctionName, ?global : GlobalVarName, ?index : ArgumentIndex) -.decl pts_signature_none(?func : FunctionName) - -.decl func_needs_pts_signature(?func : FunctionDecl) +// See doc/signatures.rst for documentation on signature_* +.decl signature_return_alloc(?func : FunctionName) +.decl signature_return_alloc_once(?func : FunctionName) +.decl signature_return_aliases_arg(?func : FunctionName, ?index : ArgumentIndex) +.decl signature_return_aliases_arg_reachable(?func : FunctionName, ?index : ArgumentIndex) +.decl signature_return_points_to_global(?func : FunctionName, ?global : GlobalVarName) +.decl signature_return_aliases_global(?func : FunctionName, ?global : GlobalVarName) +.decl signature_return_aliases_global_reachable(?func : FunctionName, ?global : GlobalVarName) +.decl signature_arg_alloc(?func : FunctionName, ?index : ArgumentIndex) +.decl signature_arg_alloc_once(?func : FunctionName, ?index : ArgumentIndex) +.decl signature_arg_memcpy_arg(?func : FunctionName, ?index1 : ArgumentIndex, ?index2 : ArgumentIndex) +.decl signature_arg_memcpy_arg_reachable(?func : FunctionName, ?index1 : ArgumentIndex, ?index2 : ArgumentIndex) +.decl signature_arg_points_to_global(?func : FunctionName, ?index : ArgumentIndex, ?global : GlobalVarName) +.decl signature_arg_memcpy_global(?func : FunctionName, ?index : ArgumentIndex, ?global : GlobalVarName) +.decl signature_arg_memcpy_global_reachable(?func : FunctionName, ?index : ArgumentIndex, ?global : GlobalVarName) +.decl signature_global_memcpy_arg(?func : FunctionName, ?global : GlobalVarName, ?index : ArgumentIndex) +.decl signature_global_memcpy_arg_reachable(?func : FunctionName, ?global : GlobalVarName, ?index : ArgumentIndex) +.decl signature_none(?func : FunctionName) + +.decl func_needs_signature(?func : FunctionDecl) .decl func_pts_signature(?func : FunctionDecl) -.decl func_missing_pts_signature(?func : FunctionDecl) +.decl func_missing_signature(?func : FunctionDecl) .decl type_has_subelement(?type : Type, ?elem : Type) @@ -38,7 +38,7 @@ type_has_subelement(?type, ?elem) :- type_has_subelement(?type, ?type) :- type(?type). -func_needs_pts_signature(?func) :- +func_needs_signature(?func) :- func_decl(?func), func_name(?func, ?name), !(func_decl_to_defn(?func,_); @@ -49,7 +49,7 @@ func_needs_pts_signature(?func) :- func_type_return(?type, ?rtype), pointer_type(?rtype). -func_needs_pts_signature(?func) :- +func_needs_signature(?func) :- func_decl(?func), func_name(?func, ?name), !(func_decl_to_defn(?func,_); @@ -64,26 +64,26 @@ func_needs_pts_signature(?func) :- func_pts_signature(?func) :- func_name(?func, ?name), - (pts_signature_none(?name); - pts_signature_return_alloc(?name); - pts_signature_return_alloc_once(?name); - pts_signature_return_aliases_arg(?name, _); - pts_signature_return_aliases_arg_reachable(?name, _); - pts_signature_return_points_to_global(?name, _); - pts_signature_return_aliases_global(?name, _); - pts_signature_return_aliases_global_reachable(?name, _); - pts_signature_arg_alloc(?name, _); - pts_signature_arg_alloc_once(?name, _); - pts_signature_arg_memcpy_arg(?name, _, _); - pts_signature_arg_memcpy_arg_reachable(?name, _, _); - pts_signature_arg_points_to_global(?name, _, _); - pts_signature_arg_memcpy_global(?name, _, _); - pts_signature_arg_memcpy_global_reachable(?name, _, _); - pts_signature_global_memcpy_arg(?name, _, _); - pts_signature_global_memcpy_arg_reachable(?name, _, _)). - -func_missing_pts_signature(?func) :- - func_needs_pts_signature(?func), + (signature_none(?name); + signature_return_alloc(?name); + signature_return_alloc_once(?name); + signature_return_aliases_arg(?name, _); + signature_return_aliases_arg_reachable(?name, _); + signature_return_points_to_global(?name, _); + signature_return_aliases_global(?name, _); + signature_return_aliases_global_reachable(?name, _); + signature_arg_alloc(?name, _); + signature_arg_alloc_once(?name, _); + signature_arg_memcpy_arg(?name, _, _); + signature_arg_memcpy_arg_reachable(?name, _, _); + signature_arg_points_to_global(?name, _, _); + signature_arg_memcpy_global(?name, _, _); + signature_arg_memcpy_global_reachable(?name, _, _); + signature_global_memcpy_arg(?name, _, _); + signature_global_memcpy_arg_reachable(?name, _, _)). + +func_missing_signature(?func) :- + func_needs_signature(?func), !func_pts_signature(?func). //------------------------------------------------------------------------------ @@ -159,7 +159,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _sig_var_alloc(?newCtx, ?sigAlloc, ?ctx, ?var, ?type) :- func_name(?func, ?sname), - pts_signature_return_alloc(?sname), + signature_return_alloc(?sname), ( call_instr_fn_target(?instr, ?func) ; invoke_instr_fn_target(?instr, ?func)), instr_assigns_to(?instr, ?var), @@ -174,7 +174,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _sig_var_alloc(?newCtx, ?sigAlloc, ?ctx, ?var, ?type) :- func_name(?func, ?sname), - pts_signature_return_alloc_once(?sname), + signature_return_alloc_once(?sname), ( call_instr_fn_target(?instr, ?func) ; invoke_instr_fn_target(?instr, ?func)), instr_assigns_to(?instr, ?var), @@ -189,7 +189,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _sig_ptr_alloc(?newCtx, ?sigAlloc, ?ptrCtx, ?ptr, ?type) :- func_name(?func, ?sname), - pts_signature_arg_alloc(?sname, ?index), + signature_arg_alloc(?sname, ?index), ( call_instr_fn_target(?instr, ?func) ; invoke_instr_fn_target(?instr, ?func)), instr_func(?instr, ?instrFunc), @@ -207,7 +207,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _sig_ptr_alloc(?newCtx, ?sigAlloc, ?ptrCtx, ?ptr, ?type) :- func_name(?func, ?sname), - pts_signature_arg_alloc_once(?sname, ?index), + signature_arg_alloc_once(?sname, ?index), ( call_instr_fn_target(?instr, ?func) ; invoke_instr_fn_target(?instr, ?func)), instr_func(?instr, ?instrFunc), @@ -251,7 +251,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- signature_var_points_to_base(?aCtx, ?alloc, ?callerCtx, ?toVar) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_return_aliases_arg(?name, ?index), + signature_return_aliases_arg(?name, ?index), instr_assigns_to(?callerInstr, ?toVar), actual_arg(?callerInstr, ?index, ?fromValue), operand_points_to(?aCtx, ?alloc, ?callerCtx, ?fromValue). @@ -259,14 +259,14 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _ptr_reaches_to_request(?ptrACtx, ?ptrAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_return_aliases_arg_reachable(?name, ?index), + signature_return_aliases_arg_reachable(?name, ?index), actual_arg(?callerInstr, ?index, ?fromValue), operand_points_to(?ptrACtx, ?ptrAlloc, ?callerCtx, ?fromValue). signature_var_points_to_base(?aCtx, ?alloc, ?callerCtx, ?toVar) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_return_aliases_arg_reachable(?name, ?index), + signature_return_aliases_arg_reachable(?name, ?index), instr_assigns_to(?callerInstr, ?toVar), actual_arg(?callerInstr, ?index, ?fromValue), operand_points_to(?ptrACtx, ?ptrAlloc, ?callerCtx, ?fromValue), @@ -275,7 +275,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- signature_var_points_to_base(?aCtx, ?alloc, ?callerCtx, ?toVar) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_return_points_to_global(?name, ?globalName), + signature_return_points_to_global(?name, ?globalName), global_allocation_by_name(?globalName, ?alloc), empty_context(?aCtx), instr_assigns_to(?callerInstr, ?toVar). @@ -283,7 +283,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- signature_var_points_to_base(?aCtx, ?alloc, ?callerCtx, ?toVar) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_return_aliases_global(?name, ?globalName), + signature_return_aliases_global(?name, ?globalName), global_allocation_by_name(?globalName, ?globalAlloc), empty_context(?globalCtx), instr_assigns_to(?callerInstr, ?toVar), @@ -292,7 +292,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _ptr_reaches_to_request(?globalCtx, ?globalAlloc) :- callgraph_edge(_, ?callee, _, ?callerInstr), func_name(?callee, ?name), - pts_signature_return_aliases_global_reachable(?name, ?globalName), + signature_return_aliases_global_reachable(?name, ?globalName), global_allocation_by_name(?globalName, ?globalAlloc), empty_context(?globalCtx), instr_assigns_to(?callerInstr, _). @@ -300,7 +300,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- signature_var_points_to_base(?aCtx, ?alloc, ?callerCtx, ?toVar) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_return_aliases_global_reachable(?name, ?globalName), + signature_return_aliases_global_reachable(?name, ?globalName), global_allocation_by_name(?globalName, ?globalAlloc), empty_context(?globalCtx), instr_assigns_to(?callerInstr, ?toVar), @@ -309,7 +309,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- memcpy_sig(?toACtx, ?toAlloc, ?fromACtx, ?fromAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_arg_memcpy_arg(?name, ?toIndex, ?fromIndex), + signature_arg_memcpy_arg(?name, ?toIndex, ?fromIndex), actual_arg(?callerInstr, ?toIndex, ?toValue), actual_arg(?callerInstr, ?fromIndex, ?fromValue), operand_points_to(?toACtx, ?toAlloc, ?callerCtx, ?toValue), @@ -318,7 +318,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _ptr_reaches_to_request(?fromPtrACtx, ?fromPtrAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_arg_memcpy_arg_reachable(?name, ?toIndex, ?fromIndex), + signature_arg_memcpy_arg_reachable(?name, ?toIndex, ?fromIndex), actual_arg(?callerInstr, ?toIndex, ?toValue), actual_arg(?callerInstr, ?fromIndex, ?fromValue), operand_points_to(_, _, ?callerCtx, ?toValue), @@ -327,7 +327,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- memcpy_sig(?toACtx, ?toAlloc, ?fromACtx, ?fromAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_arg_memcpy_arg_reachable(?name, ?toIndex, ?fromIndex), + signature_arg_memcpy_arg_reachable(?name, ?toIndex, ?fromIndex), actual_arg(?callerInstr, ?toIndex, ?toValue), actual_arg(?callerInstr, ?fromIndex, ?fromValue), operand_points_to(?toACtx, ?toAlloc, ?callerCtx, ?toValue), @@ -337,7 +337,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- signature_ptr_points_to_base(?gACtx, ?gAlloc, ?ptrACtx, ?ptrAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_arg_points_to_global(?name, ?index, ?globalName), + signature_arg_points_to_global(?name, ?index, ?globalName), actual_arg(?callerInstr, ?index, ?toValue), operand_points_to(?ptrACtx, ?ptrAlloc, ?callerCtx, ?toValue), global_allocation_by_name(?globalName, ?gAlloc), @@ -346,7 +346,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- memcpy_sig(?toACtx, ?toAlloc, ?fromACtx, ?fromAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_arg_memcpy_global(?name, ?index, ?globalName), + signature_arg_memcpy_global(?name, ?index, ?globalName), actual_arg(?callerInstr, ?index, ?toValue), operand_points_to(?toACtx, ?toAlloc, ?callerCtx, ?toValue), global_allocation_by_name(?globalName, ?fromAlloc), @@ -355,7 +355,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _ptr_reaches_to_request(?gACtx, ?gAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_arg_memcpy_global_reachable(?name, ?index, ?globalName), + signature_arg_memcpy_global_reachable(?name, ?index, ?globalName), actual_arg(?callerInstr, ?index, ?toValue), operand_points_to(_, _, ?callerCtx, ?toValue), global_allocation_by_name(?globalName, ?gAlloc), @@ -364,7 +364,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- memcpy_sig(?toACtx, ?toAlloc, ?fromACtx, ?fromAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_arg_memcpy_global_reachable(?name, ?index, ?globalName), + signature_arg_memcpy_global_reachable(?name, ?index, ?globalName), actual_arg(?callerInstr, ?index, ?toValue), operand_points_to(?toACtx, ?toAlloc, ?callerCtx, ?toValue), global_allocation_by_name(?globalName, ?gAlloc), @@ -374,7 +374,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- memcpy_sig(?toACtx, ?toAlloc, ?fromACtx, ?fromAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_global_memcpy_arg(?name, ?globalName, ?index), + signature_global_memcpy_arg(?name, ?globalName, ?index), actual_arg(?callerInstr, ?index, ?toValue), operand_points_to(?fromACtx, ?fromAlloc, ?callerCtx, ?toValue), global_allocation_by_name(?globalName, ?toAlloc), @@ -383,14 +383,14 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _ptr_reaches_to_request(?ptrACtx, ?ptrAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_global_memcpy_arg_reachable(?name, _, ?index), + signature_global_memcpy_arg_reachable(?name, _, ?index), actual_arg(?callerInstr, ?index, ?toValue), operand_points_to(?ptrACtx, ?ptrAlloc, ?callerCtx, ?toValue). memcpy_sig(?toACtx, ?toAlloc, ?fromACtx, ?fromAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), - pts_signature_global_memcpy_arg_reachable(?name, ?globalName, ?index), + signature_global_memcpy_arg_reachable(?name, ?globalName, ?index), actual_arg(?callerInstr, ?index, ?toValue), operand_points_to(?ptrACtx, ?ptrAlloc, ?callerCtx, ?toValue), global_allocation_by_name(?globalName, ?toAlloc),