6 #ifndef points_to_header_included
7 #define points_to_header_included
34 #define SEQUENTIAL_POINTS_TO_SETS_SUFFIX ".pt"
35 #define USER_POINTS_TO_SETS_SUFFIX ".upt"
45 #define pt_map_undefined set_undefined
46 #define pt_map_undefined_p(pt) ((pt)==set_undefined)
47 #define new_pt_map() set_generic_make(set_private, points_to_equal_p, points_to_rank)
48 #define assign_pt_map(x,y) set_assign(x, y)
49 #define clear_pt_map(pt) set_clear(pt)
50 #define free_pt_map(pt) set_free(pt)
51 #define print_pt_map(pt) print_points_to_set("",pt);
53 #define free_pt_maps sets_free
54 #define union_of_pt_maps(pt1, pt2, pt3) set_union(pt1, pt2, pt3)
55 #define difference_of_pt_maps(pt1, pt2, pt3) set_difference(pt1, pt2, pt3)
57 #define empty_pt_map_p(s) set_empty_p(s)
58 #define consistent_pt_map_p(s) consistent_points_to_set(s)
60 #define source_in_pt_map_p(cell,set) source_in_set_p(cell,set)
73 #define pt_map_undefined points_to_graph_undefined
74 #define pt_map_undefined_p(pt) ((pt)==points_to_graph_undefined)
75 #define new_pt_map() make_points_to_graph(false, set_generic_make(set_private, points_to_equal_p, points_to_rank))
76 #define new_simple_pt_map() set_generic_make(set_private, points_to_equal_p, points_to_rank)
77 #define assign_pt_map(x,y) ((void) set_assign(points_to_graph_set(x), points_to_graph_set(y)), (x))
78 #define clear_pt_map(pt) set_clear(points_to_graph_set(pt))
80 #define free_pt_map(pt) free_points_to_graph(pt)
81 #define print_pt_map(pt) print_points_to_set("", points_to_graph_set(pt));
83 #define free_pt_maps free_points_to_graph_sets
85 #define union_of_pt_maps(pt1, pt2, pt3) set_union(points_to_graph_set(pt1), \
86 points_to_graph_set(pt2), \
87 points_to_graph_set(pt3))
88 #define difference_of_pt_maps(pt1, pt2, pt3) \
89 set_difference(points_to_graph_set(pt1), \
90 points_to_graph_set(pt2), \
91 points_to_graph_set(pt3))
93 #define empty_pt_map_p(s) set_empty_p(points_to_graph_set(s))
95 #define consistent_pt_map_p(s) consistent_points_to_graph_p(s)
97 #define source_in_pt_map_p(cell,set) source_in_set_p(cell,points_to_graph_set(set))
105 #define remove_arc_from_pt_map(a, s) (set_del_element((set) points_to_graph_set(s), (set) points_to_graph_set(s), (void *) a))
106 #define remove_arc_from_pt_map_(a, s) (remove_arc_from_pt_map(a, s), (s))
list scalar_stub_source_to_sinks(cell, pt_map, bool)
list pointer_source_to_sinks(cell, pt_map)
Returns the sinks for a source cell "sc" of type pointer according to the points-to relation "in".
void add_arc_to_pt_map(points_to, pt_map)
Add a store independent points-to arc: source and destination references include no dereferencing nor...
bool fast_interprocedural_points_to_analysis(char *)
reference simplified_reference(reference)
Return NULL as sink.
set typedef_formal_parameter_to_stub_points_to(type, cell)
Input : a formal parameter which is a typedef.
list expression_to_points_to_sinks(expression, pt_map)
The returned list contains cells used in "in".
bool cell_in_list_p(cell, const list)
bool opkill_must_vreference(cell, cell)
returns true if c2 must kills c1 because of the subscript expressions
bool opkill_must_constant_path(cell, cell)
returns true if c2 kills c1
pt_map application_to_points_to(application, pt_map, bool)
bool unreachable_points_to_cell_p(cell, pt_map)
Can cell c be accessed via another cell?
entity location_entity(cell)
void offset_points_to_cells(list, expression, type)
Each cell in sinks is replaced by a cell located "delta" elements further up in the memory.
void pointer_reference_dereferencing_to_points_to(reference, pt_map)
void add_arc_to_statement_points_to_context(points_to)
bool atomic_constant_path_p(cell)
Could be replaced by abstract_location_p() but this later don't take into account the null location.
pt_map boolean_intrinsic_call_condition_to_points_to(call, pt_map, bool)
Deal with "!", "&&", "||" etc.
list generic_points_to_set_to_stub_cell_list(entity, set, list)
Add cells referencing a points-to stub found in parameter "s" are copied and added to list "osl".
pt_map order_condition_to_points_to(entity, list, bool, pt_map)
The expression list "al" contains exactly two arguments.
pt_map constant_call_to_points_to(call, pt_map)
points_to create_stub_points_to(cell, type, bool)
list formal_source_to_sinks(cell, pt_map, bool)
Creation of a stub for a formal parameter or for a reference based on a formal parameter.
pt_map equal_condition_to_points_to(list, pt_map)
The expression list "al" contains exactly two arguments, "lhs" and "rhs".
void offset_cells(cell, list, expression, type, pt_map)
Each cell in sinks is replaced by a cell located "delta" elements further up in the memory.
void store_or_update_printed_points_to_list(statement, points_to_list)
list unique_malloc_to_points_to_sinks(expression)
FI->AM: is "unique" multiple when ALIASING_ACROSS_TYPE is set to false?
list struct_variable_to_pointer_locations(entity, entity)
return list of cells for pointers declared directly or indirecltly in variable "e" of type struct def...
void points_to_indices_to_unbounded_indices(list)
FI: probably a duplicate...
bool print_code_points_to(const char *, string, string)
list stub_source_to_sinks(cell, pt_map, bool)
list reference_to_points_to_sinks(reference, type, pt_map, bool, bool)
Returns a list of memory cells "sinks" possibly accessed by the evaluation of reference "r".
bool opkill_may_constant_path(cell, cell)
pt_map expression_to_points_to(expression, pt_map, bool)
Update pt_in and pt_out according to expression e.
bool source_subset_in_set_p(cell, set)
test if a cell "source" appears as a source in a set of points-to
bool reference_must_points_to_null_p(reference, pt_map)
bool source_in_graph_p(cell, points_to_graph)
text text_pt_to(entity, int, statement)
set exact_to_may_points_to_set(set)
Change the all the exact points-to relations to may relations.
list anywhere_source_to_sinks(cell, pt_map)
source is assumed to be either nowhere/undefined or anywhere, it may be typed or not.
list points_to_sources_to_effective_sinks(list, pt_map, bool)
list extended_source_to_sinks(cell, pt_map)
bool bound_printed_points_to_list_p(statement)
void update_points_to_context_with_arc(points_to)
Same as , but be careful about the arc before adding it to the points-to context.
void print_points_to(const points_to)
bool cell_is_less_than_p(cell, cell)
list points_to_null_sinks(void)
set compute_points_to_kill_set(list, set, set)
pt_map non_equal_condition_to_points_to(list, pt_map)
The expression list "al" contains exactly two arguments.
statement_points_to get_printed_points_to_list(void)
bool cell_in_points_to_set_p(cell, set)
Check if a cell c appears as source or sink in points-to set pts.
pt_map sequence_to_points_to(sequence, pt_map)
void print_or_dump_points_to_set(string, set, bool)
Print a set of points-to for debug.
list potential_to_effective_memory_leaks(list, set)
A new list, "emll", is allocated.
list points_to_source_to_arcs(cell, pt_map, bool)
Build the list of arcs whose source is "source" according to the points-to graphs "ptm".
list expression_to_points_to_sources(expression, pt_map)
expression_to_points_to_sources() does not always work, especially with pointer arithmetic or subscri...
pt_map list_assignment_to_points_to(list, list, pt_map)
Update "pt_out" when any element of L can be assigned any element of R.
bool cell_out_of_scope_p(cell)
Return true if a cell is out of scope.
int get_heap_counter(void)
list written_pointers_set(list)
Filter out written effects on pointers.
cell entity_to_cell(entity)
string reference_to_field_disambiguator(reference)
Build an ASCII string to disambiguate the different field paths that may exist in similar references.
set points_to_independent_store(set)
list ternary_intrinsic_call_to_points_to_sinks(call, pt_map, bool, bool)
points_to find_arc_in_points_to_set(cell, cell, pt_map)
The approximation is not taken into account.
set gen_must_set(list, list, set, bool *)
pt_map get_points_to_graph_from_statement(statement)
set formal_points_to_parameter(cell)
We want a recursive descent on the type of the formal parameter, once we found a pointer type we begu...
bool address_of_expression_p(expression)
shoud be moved to expression.c
list translation_transitive_closure(cell, set)
void reset_heap_model(void)
pt_map add_arc_to_pt_map_(points_to, pt_map)
bool Ready_p(control, set, set)
A node is ready to be processed if its predecessors are not reachable or processed.
list expression_to_points_to_sinks_with_offset(expression, expression, pt_map)
pt_map get_points_to_context(void)
void upgrade_approximations_in_points_to_set(pt_map)
When arcs have been removed from a points-to relation, the approximations of remaining arcs may not c...
set gen_must_constant_paths(cell, list, set, bool *, int)
Build a set of arcs from cell l towards cells in list R if *address_p is true, or towards cells point...
void print_or_dump_points_to(const points_to, bool)
print a points-to arc for debug
bool initial_points_to(char *)
Retrieve points-to that are statically initialized, especially in compilation units.
points_to create_pointer_to_array_stub_points_to(cell, type, bool)
To create the points-to stub associated to the formal parameter, the sink name is a concatenation of ...
list words_points_to(points_to)
statement get_heap_statement(void)
void reset_statement_points_to_context(void)
list null_to_sinks(cell, pt_map)
Create a list of null sinks and add a new null points-to relation to pts.
expression pointer_subscript_to_expression(cell, list)
Allocate a new expression based on the reference in "c" and the subscript list "csl".
type opgen_may_type(type, type)
list points_to_cells_exact_translation(list, set, entity)
Allocate a new list with the translations of the cells in cl, when their translation make sense and i...
set new_filter_formal_context_according_to_actual_context(list, set, set, set)
cell create_scalar_stub_sink_cell(entity, type, type, int, list, string)
Create a stub entity "se" for entity "v" with type "t" and return a cell based on a reference to the ...
list points_to_source_to_some_sinks(cell, pt_map, bool)
May not retrieve all sinks of the source.
list sources_to_sinks(list, pt_map, bool)
Same as source_to_sinks, but for a list of cells.
bool opkill_may_module(cell, cell)
list null_source_to_sinks(cell, pt_map)
void set_printed_points_to_list(statement_points_to)
bool opgen_must_module(entity, entity)
void init_points_to_context(pt_map)
bool program_points_to(char *)
bool opkill_must_reference(cell, cell)
pt_map loop_to_points_to(loop, pt_map)
FI: I assume that pointers and pointer arithmetic cannot appear in a do loop, "do p=q,...
_uint points_to_rank(const void *, size_t)
create a key which is a concatenation of the source's name, the sink's name and the approximation of ...
pt_map memory_leak_to_more_memory_leaks(cell, pt_map)
Cell "l" has been memory leaked for sure and is not referenced any more in "in".
pt_map new_any_loop_to_points_to(statement, expression, expression, expression, pt_map)
Perform the same k-limiting scheme for all kinds of loops.
pt_map struct_assignment_to_points_to(expression, expression, pt_map)
pt_in is modified by side-effects and returned as pt_out
points_to opgen_must_constant_path(cell, cell)
int maximal_out_degree_of_points_to_graph(string *, pt_map)
returns the cell vertex "mod_cell" with the maximal out_degree in graph "in", and its out-degree.
void print_points_to_relations(list)
print a list of points-to arcs
bool control_in_set_p(control, set)
unstructured.c
bool pointer_points_to_reference_p(reference)
cell make_typed_nowhere_cell(type)
bool store_independent_points_to_arc_p(points_to)
bool statement_points_to_context_defined_p(void)
bool aliased_translation_p(list, set)
See if two cells in "fpcl" point toward the same location via the transitive closure of "translation"...
void update_statement_points_to_context_with_arc(points_to)
list points_to_cells_parameters(list)
interprocedural.c
pt_map generic_remove_unreachable_vertices_in_points_to_graph(pt_map, int code, bool)
Remove arcs in points-to graph "ptg" when they start from a stub cell that is not reachable.
void dump_points_to(const points_to)
bool cell_is_greater_than_or_equal_to_p(cell, cell)
list dereferencing_to_sinks(expression, pt_map, bool)
Returns "sinks", the list of cells pointed to by expression "a" according to points-to graph "in".
list points_to_source_to_sinks(cell, pt_map, bool)
Build the sinks of source "source" according to the points-to graphs.
points_to create_k_limited_stub_points_to(cell, type, bool, pt_map)
Create a new node "sink" of type "t" and a new arc "pt" starting from node "source",...
bool printed_points_to_list_undefined_p(void)
points_to_prettyprint.c
bool node_in_points_to_path_p(cell, list)
list binary_intrinsic_call_to_points_to_sinks(call, pt_map, bool)
int points_to_cell_to_number_of_unbounded_dimensions(cell)
cell points_to_source_name_to_source_cell(string, pt_map, bool)
void error_reset_printed_points_to_list(void)
void subscripted_reference_to_points_to(reference, list, pt_map)
expression.c
void print_points_to_list(points_to_list)
bool reference_may_points_to_null_p(reference, pt_map)
void print_points_to_relation(points_to)
print a points-to arc, print_points_to() or print_points_to_arc()
set points_to_may_filter(set)
returns a set which contains all the MAY points to
list malloc_to_points_to_sinks(expression, pt_map)
Heap modelling.
list points_to_anywhere_sinks(type)
type opgen_must_type(type, type)
the same as opgen_may_type
bool source_in_set_p(cell, set)
test if a cell appear as a source in a set of points-to
bool sinks_fully_matches_source_p(cell, list)
Is there at least one cell "sink" in list "sinks" whose subscripts fully match the subscripts in cell...
bool interprocedural_points_to_analysis(char *)
void points_to_backward_translation(void)
void remove_points_to_arcs(cell, cell, pt_map)
void reset_points_to_context(void)
bool print_code_points_to_list(const char *)
void clean_up_points_to_stubs(entity)
list generic_stub_source_to_sinks(cell, pt_map, bool, bool)
set filter_formal_out_context_according_to_formal_in_context(set, set, list, entity)
If an address has not been written, i.e.
list application_to_points_to_sinks(application, type, pt_map)
pt_map graph_assign_list(pt_map, list)
FI: I add functions dealing with points_to_graph variable, i.e.
list reference_to_sinks(reference, pt_map, bool)
list certainly_written_pointers_set(list)
Filter out certainly written effects on pointers.
cell make_null_cell(void)
list points_to_source_to_any_sinks(cell, pt_map, bool)
Retrieve all possible sinks of the source.
bool points_to_compare_ptr_cell(const void *, const void *)
pt_map whileloop_to_points_to(whileloop, pt_map)
list array_to_constant_paths(expression, set)
bool control_equal_p(const void *, const void *)
void init_statement_points_to_context(void)
text text_points_to_relations(points_to_list, string)
pt_map normalize_points_to_graph(pt_map)
For the time being, control the out-degree of the vertices in points-to graph "ptg" and fuse the vert...
points_to_graph points_to_cell_source_projection(points_to_graph, cell)
Remove all arcs in "ptg" starting from "c".
set remove_points_to_cell(cell, set)
All arcs in relation "g" must be removed or updated if they use the node "c".
bool recursive_filter_formal_context_according_to_actual_context(list, set, set, set, set)
This function looks for successors of elements of list "fcl" both in points-to relations "pt_in" and ...
bool sink_in_set_p(cell, set)
test if a cell appear as a sink in a set of points-to
set compute_points_to_binded_set(entity, list, set, bool *)
For each actual argument "r" and its corresponding formal one "f", create the assignment "f = r;" and...
pt_map user_call_condition_to_points_to(call, pt_map, list, bool)
list points_to_cell_translation(cell, set, entity)
Compute the list of cells that correspond to cell "sr1" according to the translation mapping "bm" whe...
pt_map pointer_arithmetic_to_points_to(expression, expression, pt_map)
Update the sink locations associated to the source "lhs" under points-to information pt_map by "delta...
list range_to_points_to_sinks(range, pt_map)
pt_map forloop_to_points_to(forloop, pt_map)
text text_points_to_relation(points_to)
text text_region(effect reg) input : a region output : a text consisting of several lines of commenta...
set pointer_formal_parameter_to_stub_points_to(type, cell)
Input : a formal parameter which is a pointer and its type.
set add_subscript_dependent_arc_to_simple_pt_map(points_to, set)
The source and destination references imply no dereferencing but the subscripts may be any kind of ex...
bool interprocedural_points_to_analysis_p(void)
bool equal_must_vreference(cell, cell)
list flow_sensitive_malloc_to_points_to_sinks(expression)
cell type_compatible_super_cell(type, cell)
See if a super-cell of "c" exists witf type "t".
pt_map points_to_to_context_points_to(pt_map)
Return the subset of "in" that is related to formal parameters and stubs.
pt_map unstructured_to_points_to(unstructured, pt_map)
set remove_arc_from_simple_pt_map(points_to, set)
pt_map relational_intrinsic_call_condition_to_points_to(call, pt_map, bool)
Update the points-to information "in" according to the validity of the condition.
set ready_to_be_processed_set(control, set, set)
A set containing all the successors of n that are ready to be processed.
list generic_points_to_cells_translation(list, set, entity, bool)
Allocate a new list with the translations of the cells in cl, when their translation make sense.
pt_map expressions_to_points_to(list, pt_map, bool)
Compute the points-to information pt_out that results from the evaluation of a possibly empty list of...
set add_arc_to_simple_pt_map(points_to, set)
pt_map k_limit_points_to(pt_map, int)
void add_arc_to_points_to_context(points_to)
FI: it should rather work the other way round, with add_arc_to_statement_points_to_context() calling ...
list struct_variable_to_pointer_subscripts(cell, entity)
returns a list of cells to reach pointers depending on field f.
bool opkill_must_type(type, type)
opkill_must_type is the same as op_kill_may_type...
set filter_formal_context_according_to_actual_context(list, set, set, set)
Filter "pt_in" according to "pt_binded".
list subscript_to_points_to_sinks(subscript, type, pt_map, bool)
Generate the corresponding points-to reference(s).
set points_to_anywhere(list, set)
pt_map full_copy_pt_map(pt_map)
set points_to_set_block_projection(set, list, bool, bool)
Remove from "pts" arcs based on at least one local entity in list "l" and preserve those based on sta...
pt_map dereferencing_to_points_to(expression, pt_map)
Make sure that expression p can be dereferenced in points-to graph "in".
pt_map freed_pointer_to_points_to(expression, pt_map, bool)
Any abstract location of the lhs in L is going to point to nowhere, maybe.
list user_call_to_points_to_sinks(call, type, pt_map, bool)
set points_to_nowhere(list, set)
arg1: list of cells arg2: set of points-to Create a points-to set with elements of lhs_list as source...
list entity_to_sinks(entity)
sinks.c
set gen_may_constant_paths(cell, list, set, bool *, int)
pt_map update_points_to_graph_with_arc(points_to, pt_map)
Instead of simply adding the new arc, make sure the consistency is not broken.
bool points_to_set_sharing_p(set)
void fi_points_to_storage(pt_map, statement, bool)
set merge_points_to_set(set, set)
Merge two points-to sets.
cell max_module(cell, cell)
we define operator max fot the lattice Module which has any_module as top and a bottom which is not y...
pt_map reference_dereferencing_to_points_to(reference, pt_map, bool, bool)
Can we execute the reference r in points-to context "in" without segfaulting?
bool opkill_must_module(cell, cell)
set points_to_anywhere_typed(list, set)
Already exists in points_to_general_algorithm.c, to be removed later...
pt_map reference_condition_to_points_to(reference, pt_map, bool)
Handle conditions such as "if(p)".
set remove_points_to_cells(list, set)
All nodes, i.e.
pt_map remove_unreachable_vertices_in_points_to_graph(pt_map)
This function looks pretty dangerous as variables can be reached by their names.
list any_source_to_sinks(cell, pt_map, bool)
Generalization of source_to_sinks().
pt_map struct_initialization_to_points_to(expression, expression, pt_map)
set points_to_source_projection(set, entity)
Remove all arcs starting from e because e has been assigned a new value.
points_to fuse_points_to_sink_cells(cell, list, pt_map)
All vertices in "sink_l" are assumed to be sinks of vertex "source" in points-to graph "in".
pt_map declaration_statement_to_points_to(statement, pt_map)
See points_to_init()
void print_points_to_set(string, set)
list points_to_source_name_to_sinks(string, pt_map, bool)
Use "sn" as a source name to derive a list of sink cells according to the points-to graph ptm.
list sizeofexpression_to_points_to_sinks(sizeofexpression, type, pt_map)
pt_map points_to_graph_assign(pt_map, pt_map)
string points_to_cell_name(cell)
Create a string which is the cell reference in C syntax.
bool consistent_points_to_set(set)
make sure that set "s" does not contain redundant or contradictory elements
cell cell_to_nowhere_sink(cell)
assuming source is a reference to a pointer, build the corresponding sink when the pointer is not ini...
list nowhere_source_to_sinks(cell, pt_map)
pt_map pop_statement_points_to_context(void)
list points_to_cells_to_pointer_cells(list)
Convert cells in l into derived pointer cells when possible.
text text_points_to(entity, int, statement)
pt_map remove_unreachable_heap_vertices_in_points_to_graph(pt_map, bool)
list expression_to_points_to_cells(expression, pt_map, bool, bool)
Return a possibly empty list of abstract locations whose addresses are possible value of expression "...
int points_to_compare_location(void *, void *)
Order the two points-to relations according to the alphabetical order of the underlying variables.
pt_map freed_list_to_points_to(expression, list, list, pt_map)
Error detections on "L" and "R" have already been performed.
void points_to_translation_of_formal_parameters(list, list, pt_map, set)
List al and fpcl are assumed consistent, and consistent with the formal parameter ranks.
pt_map any_loop_to_points_to(statement, expression, expression, expression, pt_map)
Perform the same k-limiting scheme for all kinds of loops.
list points_to_reference_to_translation(reference, list, pt_map, bool)
FI: easier it fresh_p is true...
list points_to_cells_translation(list, set, entity)
Allocate a new list with the translations of the cells in cl, when their translation make sense.
bool consistent_points_to_arc_p(points_to, bool)
bool points_to_in_list_p(points_to, const list)
list points_to_source_to_translations(cell, pt_map, bool)
Use "ptm" as a translation map.
list pointer_reference_to_points_to_sinks(reference, pt_map, bool)
What to do when a pointer "p" is dereferenced within a reference "r".
_uint control_rank(const void *, size_t)
create a key which is the statement number
list generic_points_to_sources_to_sinks(list, pt_map, bool, bool)
Build the union of the sinks of cells in "sources" according to the points-to graphs "ptm".
void remove_arcs_from_pt_map(points_to, set)
list sink_to_sources(cell, set, bool)
Build a list of possible cell sources for cell "sink" in points-to graph "pts".
list array_stub_source_to_sinks(cell, pt_map, bool)
list points_to_source_to_effective_sinks(cell, pt_map, bool)
void check_rhs_value_types(expression, expression, list)
bool unique_location_cell_p(cell)
Does cell "c" represent a unique memory location or a set of memory locations?
cell make_nowhere_cell(void)
constant-path-utils.c
list points_to_indices_to_subscript_indices(list)
Generate a new subscript list.
bool opgen_may_module(entity, entity)
bool arc_in_points_to_set_p(points_to, set)
Check if points-to arc "spt" belongs to points-to set "pts".
string points_to_name(const points_to)
create a string which is a concatenation of the source's name, the sink's name and the approximation ...
list points_to_sources_to_sinks(list, pt_map, bool)
bool opkill_may_type(type, type)
void add_implicitly_killed_arcs_to_kill_set(set, list, set, set, set, entity)
Initial comments: add arcs of set "pt_caller" to set "pt_kill" if their origin cells are not in the l...
void reset_printed_points_to_list(void)
bool subscript_expression_p(expression)
list variable_to_pointer_locations(entity)
variable.c
int points_to_indices_to_array_index_number(list)
Count the number of array indices and ignore the field subscripts.
set array_formal_parameter_to_stub_points_to(type, cell)
Type "t" is supposed to be a concrete type.
cell find_kth_points_to_node_in_points_to_path(list, type, int)
Find the "k"-th node of type "t" in list "p".
bool locations_equal_p(cell, cell)
eturn true if two acces_path are equals
pt_map user_call_to_points_to_interprocedural(call, pt_map)
Compute the points-to relations in a complete interprocedural way: be as accurate as possible.
points_to create_advanced_stub_points_to(cell, type, bool)
Take into account the POINTS_TO_STRICT_POINTER_TYPE to allocate a sink cell of type "t" if the strict...
list cast_to_points_to_sinks(cast, type, pt_map, bool)
pt_map test_to_points_to(test, pt_map)
Computing the points-to information after a test.
points_to points_to_sink_to_points_to(cell, pt_map)
Return the points-to "fpt" ending in cell "sink" if it exists.
list points_to_cell_to_useful_pointer_cells(cell, set)
pt_map intrinsic_call_condition_to_points_to(call, pt_map, bool)
We can break down the intrinsics according to their arity or according to their kinds....
bool opkill_may_name(cell, cell)
We define operators for the lattice Name which can be a: -variable of a the program -malloc -NULL /0 ...
void offset_points_to_cell(cell, expression, type, bool)
void store_printed_points_to_list(statement, points_to_list)
void init_printed_points_to_list(void)
set opgen_null_location(set, cell)
bool cell_is_greater_than_p(cell, cell)
cell op_gen_module(cell, cell)
void remove_impossible_arcs_to_null(list *, pt_map)
You know that null and undefined cells in "*pL" are impossible because of the operation that is going...
list call_to_points_to_sinks(call, type, pt_map, bool, bool)
pt_map pointer_assignment_to_points_to(expression, expression, pt_map)
void points_to_cell_list_and(list *, const list)
Compute A = A inter B: complexity in O(n2)
pt_map assignment_to_points_to(expression, expression, pt_map)
void print_points_to_path(list)
For debugging.
int points_to_context_statement_line_number(void)
set points_to_must_filter(set)
returns a set which contains all the EXACT points to
bool type_compatible_with_points_to_cell_p(type, cell)
A type "t" is compatible with a cell "c" if any of the enclosing cell "c'" of "c",...
bool opgen_may_name(entity, entity)
list nary_intrinsic_call_to_points_to_sinks(call, pt_map)
bool opkill_must_name(cell, cell)
void points_to_storage(set, statement, bool)
passes.c
void offset_array_reference(reference, expression, type)
Side effect on reference "r".
set kill_must_set(list, set)
Generate the subset of arcs that must be removed from the points-to graph "in".
pt_map statement_to_points_to(statement, pt_map)
See points_to_statement()
void free_points_to_graph_sets(points_to_graph,...)
Free several sets in one call.
bool entity_any_module_p(entity)
operator kill for the dimension Module:
string points_to_cell_to_string(cell)
type max_type(type, type)
pt_map remove_unreachable_stub_vertices_in_points_to_graph(pt_map)
set kill_may_set(list, set)
Compute the set of arcs in the input points-to relation "in" whose approximation must be changed from...
int points_to_reference_to_number_of_unbounded_dimensions(reference)
set full_copy_simple_pt_map(set)
statement.c
list points_to_cell_null_initialization(cell, pt_map)
If required according to the property, create a new arc from cell "c" to "null".
points_to_list load_printed_points_to_list(statement)
pt_map null_non_equal_condition_to_points_to(expression, pt_map)
The condition is e!=NULL.
cell reduce_cell_to_pointer_type(cell)
Remove last subscripts of cell c till its type becomes a scalar pointer.
void equalize_points_to_domains(points_to_graph, points_to_graph)
Make sure that pt_t and pt_f have the same definition domain except if one of them is bottom.
points_to opgen_may_constant_path(cell, cell)
pt_map dereferencing_subscript_to_points_to(subscript, pt_map)
dereferencing.c
bool init_points_to_analysis(char *)
pt_map condition_to_points_to(expression, pt_map, bool)
Update points-to set "in" according to the content of the expression using side effects.
bool points_to_compare_cell(cell, cell)
int points_to_equal_p(const void *, const void *)
returns true if two points-to arcs "vpt1" and "vpt2" are equal.
pt_map reference_to_points_to(reference, pt_map, bool)
The subscript expressions may impact the points-to information.
list insensitive_malloc_to_points_to_sinks(expression)
FI->AM: what's the difference with the previous option? Reference to your dissertation?
void close_printed_points_to_list(void)
points_to points_to_path_to_k_limited_points_to_path(list, int, type, bool, pt_map)
"p" is a points-to path ending with a cell that points towards a new cell ot type "t".
bool cell_is_less_than_or_equal_to_p(cell, cell)
See if you can decide that the addresses linked to c1 are smaller than the addresses linked to c2.
bool fast_interprocedural_points_to_analysis_p(void)
int points_to_subscripts_to_number_of_unbounded_dimensions(list)
bool expression_to_points_to_cell_p(expression)
Can expression e be reduced to a reference, without requiring an evaluation?
points_to_list delete_printed_points_to_list(statement)
pt_map range_to_points_to(range, pt_map, bool)
points_to_graph user_call_to_points_to(call, points_to_graph, list)
FI: limited to the interprocedural option.
void check_type_of_points_to_cells(list, type, bool)
Check that all cells in list "sinks" are compatible with type "ct" if "eval_p" is false,...
void dump_points_to_set(string, set)
void points_to_translation_of_struct_formal_parameter(cell, cell, approximation, type, set)
bool opgen_may_vreference(list, list)
list generic_points_to_source_to_sinks(cell, pt_map, bool, bool, bool, bool)
Build the sinks of source "source" according to the points-to graphs.
list points_to_cells_pointer_arguments(list)
Transform a list of arguments of type "expression" to a list of cells.
pt_map new_points_to_unstructured(unstructured, pt_map, bool)
text text_code_points_to(statement)
points_to offset_cell(points_to, expression, type)
Allocate and return a new points-to "npt", copy of "pt", with an offset of "delta" on the sink.
list points_to_set_to_stub_cell_list(set, list)
list variable_to_sinks(entity, pt_map, bool)
Return all cells in points-to set "pts" who source is based on entity "e".
list reduce_cells_to_pointer_type(list)
Undo the extra eval performed when stubs are generated: 0 subscripts are added when arrays are involv...
list freeable_points_to_cells(list)
Remove from points-to cell list R cells that certainly cannot be freed.
cell points_to_source_alias(points_to, set)
Let "pt_binded" be the results of assignments of actual arguments to formal arguments (see compute_po...
list unary_intrinsic_call_to_points_to_sinks(call, pt_map, bool, bool)
list source_to_sinks(cell, pt_map, bool)
Return a list of cells, "sinks", that are sink for some arc whose source is "source" or related to "s...
void points_to_forward_translation(void)
points_to_init_analysis.c
bool intraprocedural_points_to_analysis(char *)
pt_map call_condition_to_points_to(call, pt_map, list, bool)
Handle any condition that is a call such as "if(p!=q)", "if(*p)", "if(foo(p=q))".....
list points_to_sink_to_sources(cell, pt_map, bool)
Build the sources of sink "sink" according to the points-to graphs.
void init_heap_model(statement)
bool opkill_may_vreference(cell, cell)
FI: really weird and unefficient.
bool dereferencing_free_points_to_arc_p(points_to)
bool opgen_must_name(entity, entity)
list intrinsic_call_to_points_to_sinks(call, pt_map, bool, bool)
int compare_entities_without_scope(const entity *, const entity *)
cproto-generated files
list extended_sources_to_sinks(list, pt_map)
Same as extended_source_to_sinks, but for a set of cells, "pointed".
entity create_stub_entity(entity, string, type)
Allocate a stub entity "stub" for entity "e" and with type "t".
bool opkill_may_reference(cell, cell)
pt_map intrinsic_call_to_points_to(call, pt_map, bool)
bool consistent_points_to_graph_p(points_to_graph)
set gen_may_set(list, list, set, bool *)
Should be moved to anywhere_abstract_locations.c.
list global_source_to_sinks(cell, pt_map, bool)
set points_to_function_projection(set)
"pts" is the points-to relation existing at the return point of a function.
set compute_points_to_gen_set(set, list, set, entity)
Translate the out set in the scope of the caller using the binding information, but eliminate irrelev...
set user_call_to_points_to_interprocedural_binding_set(call, pt_map)
Compute the binding relations in a complete interprocedural way: be as accurate as possible.
pt_map internal_pointer_assignment_to_points_to(expression, expression, pt_map)
Any abstract location of the lhs in L is going to point to any sink of any abstract location of the r...
pt_map null_equal_condition_to_points_to(expression, pt_map)
The condition is e==NULL.
set derived_formal_parameter_to_stub_points_to(type, cell)
Input : a formal parameter which has a derived type (FI, I guess).
set points_to_binding_arguments(cell, cell, set, set)
Recursively find all the arcs, "ai", starting from the argument "c1" using "in", find all the arcs,...
list points_to_cell_to_pointer_cells(cell)
pt_map user_call_to_points_to_fast_interprocedural(call, pt_map, list)
void push_statement_points_to_context(statement, pt_map)
void print_points_to_graph(points_to_graph)
list reference_to_points_to_translations(entity, list, pt_map)
This function is designed to work properly for the translation of effects at call sites.
void update_printed_points_to_list(statement, points_to_list)
pt_map merge_points_to_graphs(pt_map, pt_map)
pt_map multitest_to_points_to(multitest, pt_map)
bool points_to_translation_mapping_is_typed_p(set)
pt_map points_to_context_statement_in(void)
set points_to_binding(list, set, set)
Apply points_to_binding_arguments() to each pair (, complete the process of binding each element of "...
pt_map call_to_points_to(call, pt_map, list, bool)
Three different kinds of calls are distinguished:
pt_map instruction_to_points_to(instruction, pt_map)
See points_to_statement()
list points_to_set_to_module_stub_cell_list(entity, set, list)
pt_map user_call_to_points_to_intraprocedural(call, pt_map, list)
FI: I do not understand why the type is duplicated at the set level.
The structure used to build lists in NewGen.