PIPS
points-to.h
Go to the documentation of this file.
1 /* Warning! Do not modify this file that is automatically generated! */
2 /* Modify src/Libs/points-to/points-to-local.h instead, to add your own modifications. */
3 
4 /* header file built by cproto */
5 
6 #ifndef points_to_header_included
7 #define points_to_header_included
8 /* points_to-local.h */
9 /*
10 
11  $Id: points-to-local.h 23412 2017-08-09 15:07:09Z irigoin $
12 
13  Copyright 1989-2016 MINES ParisTech
14 
15  This file is part of PIPS.
16 
17  PIPS is free software: you can redistribute it and/or modify it
18  under the terms of the GNU General Public License as published by
19  the Free Software Foundation, either version 3 of the License, or
20  any later version.
21 
22  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
23  WARRANTY; without even the implied warranty of MERCHANTABILITY or
24  FITNESS FOR A PARTICULAR PURPOSE.
25 
26  See the GNU General Public License for more details.
27 
28  You should have received a copy of the GNU General Public License
29  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
30 
31 */
32 #include "points_to_private.h"
33 #include "effects.h"
34 #define SEQUENTIAL_POINTS_TO_SETS_SUFFIX ".pt"
35 #define USER_POINTS_TO_SETS_SUFFIX ".upt"
36 
37 // FI: just in case another data structure would be more suitable or
38 // more efficient
39 // For instance, set of points-to could be a type declared in
40 // points_to_private.tex
41 
42 #if 0
43 
44 typedef set pt_map;
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);
52 // FI: varargs; probably OK with gcc preprocessor
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)
56 
57 #define empty_pt_map_p(s) set_empty_p(s)
58 #define consistent_pt_map_p(s) consistent_points_to_set(s)
59 // FI: Not so sure we do not need a new name
60 #define source_in_pt_map_p(cell,set) source_in_set_p(cell,set)
61 // FI: replaced by a function
62 //#define add_arc_to_pt_map(a, s) set_add_element((set) s, (set) s, (void *) a)
63 
64 // FI: useful to have a function for debugging
65 //#define remove_arc_from_pt_map(a, s) set_del_element((set) s, (set) s, (void *) a)
66 
67 // A reminder:
68 // full_copy_pt_map(pt_map m)
69 
70 #else
71 
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))
79 // FI: free_set() is a shallow free, free_points_to_graph() is a deep free
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));
82 // FI: varargs; probably OK with gcc preprocessor
83 #define free_pt_maps free_points_to_graph_sets
84 
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))
92 
93 #define empty_pt_map_p(s) set_empty_p(points_to_graph_set(s))
94 //#define consistent_pt_map_p(s) consistent_points_to_set(points_to_graph_set(s))
95 #define consistent_pt_map_p(s) consistent_points_to_graph_p(s)
96 // FI: Not so sure we do not need a new name
97 #define source_in_pt_map_p(cell,set) source_in_set_p(cell,points_to_graph_set(set))
98 // Returns pt_map s after update via side-effect
99 // FI: replaced by a function to add check on arc before insertion
100 // #define add_arc_to_pt_map(a, s) (set_add_element((set) points_to_graph_set(s), (set) points_to_graph_set(s), (void *) a))
101 //#define add_arc_to_pt_map_(a, s) (add_arc_to_pt_map(a, s), (s))
102 //#define add_arc_to_simple_pt_map(a, s) set_add_element((set) s, (set) s, (void *) a)
103 
104 // FI: useful to have a function for debugging
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))
107 //#define remove_arc_from_simple_pt_map(a, s) set_del_element((set) s, (set) s, (void *) a)
108 
109 // A reminder:
110 // full_copy_pt_map(pt_map m)
111 #endif
112 /* cproto-generated files */
113 /* points_to_set.c */
114 extern int compare_entities_without_scope(const entity */*pe1*/, const entity */*pe2*/);
115 extern entity location_entity(cell /*c*/);
116 extern bool locations_equal_p(cell /*acc1*/, cell /*acc2*/);
117 extern int points_to_equal_p(const void */*vpt1*/, const void */*vpt2*/);
118 extern _uint points_to_rank(const void */*vpt*/, size_t /*size*/);
119 extern string points_to_name(const points_to /*pt*/);
120 extern string points_to_cell_name(cell /*source*/);
121 extern set points_to_set_block_projection(set /*pts*/, list /*l*/, bool /*main_p*/, bool /*body_p*/);
122 extern set points_to_source_projection(set /*pts*/, entity /*e*/);
124 extern set remove_points_to_cell(cell /*c*/, set /*g*/);
125 extern set remove_points_to_cells(list /*cl*/, set /*g*/);
126 extern list potential_to_effective_memory_leaks(list /*pmll*/, set /*res*/);
127 extern set points_to_function_projection(set /*pts*/);
128 extern bool cell_out_of_scope_p(cell /*c*/);
129 extern void print_or_dump_points_to(const points_to /*pt*/, bool /*print_p*/);
130 extern void print_points_to(const points_to /*pt*/);
131 extern void dump_points_to(const points_to /*pt*/);
132 extern void print_or_dump_points_to_set(string /*what*/, set /*s*/, bool /*print_p*/);
133 extern void print_points_to_set(string /*what*/, set /*s*/);
134 extern void dump_points_to_set(string /*what*/, set /*s*/);
135 extern bool source_in_set_p(cell /*source*/, set /*s*/);
136 extern bool source_subset_in_set_p(cell /*source*/, set /*s*/);
137 extern bool source_in_graph_p(cell /*source*/, points_to_graph /*s*/);
138 extern bool sink_in_set_p(cell /*sink*/, set /*s*/);
139 extern points_to find_arc_in_points_to_set(cell /*source*/, cell /*sink*/, pt_map /*ptm*/);
140 extern list anywhere_source_to_sinks(cell /*source*/, pt_map /*pts*/);
141 extern void print_points_to_path(list /*p*/);
142 extern bool type_compatible_with_points_to_cell_p(type /*t*/, cell /*c*/);
143 extern cell type_compatible_super_cell(type /*t*/, cell /*c*/);
144 extern cell find_kth_points_to_node_in_points_to_path(list /*p*/, type /*t*/, int /*k*/);
145 extern bool node_in_points_to_path_p(cell /*n*/, list /*p*/);
146 extern points_to points_to_path_to_k_limited_points_to_path(list /*p*/, int /*k*/, type /*t*/, bool /*array_p*/, pt_map /*in*/);
147 extern points_to create_k_limited_stub_points_to(cell /*source*/, type /*t*/, bool /*array_p*/, pt_map /*in*/);
148 extern list sink_to_sources(cell /*sink*/, set /*pts*/, bool /*fresh_p*/);
149 extern list stub_source_to_sinks(cell /*source*/, pt_map /*pts*/, bool /*fresh_p*/);
150 extern list scalar_stub_source_to_sinks(cell /*source*/, pt_map /*pts*/, bool /*fresh_p*/);
151 extern list array_stub_source_to_sinks(cell /*source*/, pt_map /*pts*/, bool /*fresh_p*/);
152 extern list generic_stub_source_to_sinks(cell /*source*/, pt_map /*pts*/, bool /*array_p*/, bool /*fresh_p*/);
153 extern list points_to_cell_null_initialization(cell /*c*/, pt_map /*pts*/);
154 extern list nowhere_source_to_sinks(cell /*source*/, pt_map /*pts*/);
155 extern list null_source_to_sinks(cell /*source*/, pt_map /*pts*/);
156 extern list formal_source_to_sinks(cell /*source*/, pt_map /*pts*/, bool /*fresh_p*/);
157 extern list global_source_to_sinks(cell /*source*/, pt_map /*pts*/, bool /*fresh_p*/);
158 extern list reference_to_points_to_translations(entity /*v*/, list /*sl*/, pt_map /*ptm*/);
159 extern list points_to_reference_to_translation(reference /*n_r*/, list /*sl*/, pt_map /*ptm*/, bool /*fresh_p*/);
160 extern list points_to_source_to_translations(cell /*source*/, pt_map /*ptm*/, bool /*fresh_p*/);
161 extern list generic_points_to_source_to_sinks(cell /*source*/, pt_map /*ptm*/, bool /*fresh_p*/, bool /*strict_p*/, bool /*all_p*/, bool /*effective_p*/);
162 extern list points_to_source_to_sinks(cell /*source*/, pt_map /*ptm*/, bool /*fresh_p*/);
163 extern list points_to_source_to_effective_sinks(cell /*source*/, pt_map /*ptm*/, bool /*fresh_p*/);
164 extern list points_to_source_to_some_sinks(cell /*source*/, pt_map /*ptm*/, bool /*fresh_p*/);
165 extern list points_to_source_to_any_sinks(cell /*source*/, pt_map /*ptm*/, bool /*fresh_p*/);
166 extern list points_to_sink_to_sources(cell /*sink*/, pt_map /*ptm*/, bool /*fresh_p*/);
167 extern points_to points_to_sink_to_points_to(cell /*sink*/, pt_map /*ptm*/);
168 extern list points_to_source_name_to_sinks(string /*sn*/, pt_map /*ptm*/, bool /*fresh_p*/);
169 extern cell points_to_source_name_to_source_cell(string /*sn*/, pt_map /*ptm*/, bool /*fresh_p*/);
170 extern list generic_points_to_sources_to_sinks(list /*sources*/, pt_map /*ptm*/, bool /*fresh_p*/, bool /*effective_p*/);
171 extern list points_to_sources_to_sinks(list /*sources*/, pt_map /*ptm*/, bool /*fresh_p*/);
172 extern list points_to_sources_to_effective_sinks(list /*sources*/, pt_map /*ptm*/, bool /*fresh_p*/);
173 extern list points_to_source_to_arcs(cell /*source*/, pt_map /*ptm*/, bool /*fresh_p*/);
177 extern bool sinks_fully_matches_source_p(cell /*source*/, list /*sinks*/);
178 extern list source_to_sinks(cell /*source*/, pt_map /*pts*/, bool /*fresh_p*/);
179 extern list extended_source_to_sinks(cell /*sc*/, pt_map /*in*/);
180 extern list extended_sources_to_sinks(list /*pointed*/, pt_map /*in*/);
181 extern list any_source_to_sinks(cell /*source*/, pt_map /*pts*/, bool /*fresh_p*/);
182 extern list pointer_source_to_sinks(cell /*sc*/, pt_map /*in*/);
183 extern list variable_to_sinks(entity /*e*/, pt_map /*ptm*/, bool /*fresh_p*/);
184 extern list null_to_sinks(cell /*source*/, pt_map /*ptm*/);
185 extern list sources_to_sinks(list /*sources*/, pt_map /*ptm*/, bool /*fresh_p*/);
186 extern list reference_to_sinks(reference /*r*/, pt_map /*in*/, bool /*fresh_p*/);
187 extern set merge_points_to_set(set /*s1*/, set /*s2*/);
188 extern set exact_to_may_points_to_set(set /*s*/);
189 extern bool cell_in_list_p(cell /*c*/, const list /*lx*/);
190 extern bool cell_in_points_to_set_p(cell /*c*/, set /*pts*/);
191 extern bool points_to_in_list_p(points_to /*pt*/, const list /*lx*/);
192 extern bool points_to_compare_cell(cell /*c1*/, cell /*c2*/);
193 extern bool points_to_compare_ptr_cell(const void */*vcel1*/, const void */*vcel2*/);
194 extern int points_to_compare_location(void */*vpt1*/, void */*vpt2*/);
195 extern bool consistent_points_to_arc_p(points_to /*a*/, bool /*constant_subscript_p*/);
198 extern bool consistent_points_to_set(set /*s*/);
199 extern bool points_to_set_sharing_p(set /*s*/);
201 extern void remove_points_to_arcs(cell /*source*/, cell /*sink*/, pt_map /*pt*/);
202 extern void points_to_cell_list_and(list */*a*/, const list /*b*/);
203 extern void free_points_to_graph_sets(points_to_graph /*s*/, ...);
204 extern pt_map graph_assign_list(pt_map /*ptm*/, list /*l*/);
205 extern pt_map merge_points_to_graphs(pt_map /*s1*/, pt_map /*s2*/);
206 extern pt_map points_to_graph_assign(pt_map /*out*/, pt_map /*in*/);
207 extern points_to fuse_points_to_sink_cells(cell /*source*/, list /*sink_l*/, pt_map /*in*/);
208 extern int maximal_out_degree_of_points_to_graph(string */*mod_cell*/, pt_map /*in*/);
209 extern pt_map normalize_points_to_graph(pt_map /*ptg*/);
210 extern string points_to_cell_to_string(cell /*c*/);
211 extern bool unreachable_points_to_cell_p(cell /*c*/, pt_map /*ptg*/);
212 extern pt_map generic_remove_unreachable_vertices_in_points_to_graph(pt_map /*ptg*/, int code, bool /*verbose_p*/);
214 extern pt_map remove_unreachable_heap_vertices_in_points_to_graph(pt_map /*in*/, bool /*verbose_p*/);
216 extern bool consistent_points_to_graph_p(points_to_graph /*ptg*/);
217 extern void remove_impossible_arcs_to_null(list */*pL*/, pt_map /*in*/);
218 extern bool arc_in_points_to_set_p(points_to /*spt*/, set /*pts*/);
220 extern void add_arc_to_pt_map(points_to /*a*/, pt_map /*s*/);
221 extern pt_map add_arc_to_pt_map_(points_to /*a*/, pt_map /*s*/);
222 extern set add_arc_to_simple_pt_map(points_to /*a*/, set /*s*/);
223 extern set remove_arc_from_simple_pt_map(points_to /*a*/, set /*s*/);
225 /* points_to_prettyprint.c */
231 extern void init_printed_points_to_list(void);
239 extern text text_points_to(entity /*module*/, int /*margin*/, statement /*s*/);
240 extern text text_code_points_to(statement /*s*/);
241 extern bool print_code_points_to(const char */*module_name*/, string /*resource_name*/, string /*file_suffix*/);
242 extern void print_points_to_list(points_to_list /*ptl*/);
243 extern void print_points_to_graph(points_to_graph /*ptg*/);
244 extern bool print_code_points_to_list(const char */*module_name*/);
245 extern list words_points_to(points_to /*pt*/);
246 extern text text_points_to_relation(points_to /*pt_to*/);
247 extern text text_points_to_relations(points_to_list /*ptl*/, string /*header*/);
248 extern void print_points_to_relation(points_to /*pt_to*/);
249 extern void print_points_to_relations(list /*l_pt_to*/);
250 extern text text_pt_to(entity /*module_name*/, int /*margin*/, statement /*s*/);
251 /* points_to_init_analysis.c */
252 extern void points_to_forward_translation(void);
253 extern void points_to_backward_translation(void);
254 extern set formal_points_to_parameter(cell /*c*/);
255 extern entity create_stub_entity(entity /*e*/, string /*fs*/, type /*t*/);
256 extern cell create_scalar_stub_sink_cell(entity /*v*/, type /*st*/, type /*pt*/, int /*d*/, list /*sl*/, string /*fs*/);
258 extern void points_to_indices_to_unbounded_indices(list /*sl*/);
260 extern string reference_to_field_disambiguator(reference /*r*/);
261 extern points_to create_stub_points_to(cell /*c*/, type /*unused_st*/, bool /*exact_p*/);
262 extern points_to create_advanced_stub_points_to(cell /*c*/, type /*t*/, bool /*exact_p*/);
263 extern points_to create_pointer_to_array_stub_points_to(cell /*c*/, type /*t*/, bool /*exact_p*/);
268 /* statement.c */
269 extern set full_copy_simple_pt_map(set /*m*/);
270 extern pt_map full_copy_pt_map(pt_map /*in*/);
271 extern void init_statement_points_to_context(void);
272 extern void push_statement_points_to_context(statement /*s*/, pt_map /*in*/);
278 extern void reset_statement_points_to_context(void);
279 extern bool statement_points_to_context_defined_p(void);
280 extern pt_map statement_to_points_to(statement /*s*/, pt_map /*pt_in*/);
282 extern pt_map instruction_to_points_to(instruction /*i*/, pt_map /*pt_in*/);
283 extern pt_map sequence_to_points_to(sequence /*seq*/, pt_map /*pt_in*/);
284 extern void equalize_points_to_domains(points_to_graph /*pt_t*/, points_to_graph /*pt_f*/);
285 extern pt_map test_to_points_to(test /*t*/, pt_map /*pt_in*/);
286 extern pt_map loop_to_points_to(loop /*l*/, pt_map /*pt_in*/);
287 extern pt_map whileloop_to_points_to(whileloop /*wl*/, pt_map /*pt_in*/);
288 extern pt_map any_loop_to_points_to(statement /*b*/, expression /*init*/, expression /*c*/, expression /*inc*/, pt_map /*pt_in*/);
289 extern pt_map new_any_loop_to_points_to(statement /*b*/, expression /*init*/, expression /*c*/, expression /*inc*/, pt_map /*pt_in*/);
290 extern pt_map k_limit_points_to(pt_map /*pt_out*/, int /*k*/);
291 extern pt_map unstructured_to_points_to(unstructured /*u*/, pt_map /*pt_in*/);
292 extern pt_map multitest_to_points_to(multitest /*mt*/, pt_map /*pt_in*/);
293 extern pt_map forloop_to_points_to(forloop /*fl*/, pt_map /*pt_in*/);
294 /* expression.c */
295 extern void subscripted_reference_to_points_to(reference /*r*/, list /*sl*/, pt_map /*pt_in*/);
296 extern pt_map expression_to_points_to(expression /*e*/, pt_map /*pt_in*/, bool /*side_effect_p*/);
297 extern pt_map expressions_to_points_to(list /*el*/, pt_map /*pt_in*/, bool /*side_effect_p*/);
298 extern pt_map reference_to_points_to(reference /*r*/, pt_map /*pt_in*/, bool /*side_effect_p*/);
299 extern pt_map range_to_points_to(range /*r*/, pt_map /*pt_in*/, bool /*side_effect_p*/);
300 extern pt_map call_to_points_to(call /*c*/, pt_map /*pt_in*/, list /*el*/, bool /*side_effect_p*/);
301 extern pt_map constant_call_to_points_to(call /*c*/, pt_map /*pt_in*/);
302 extern pt_map intrinsic_call_to_points_to(call /*c*/, pt_map /*pt_in*/, bool /*side_effect_p*/);
303 extern pt_map pointer_arithmetic_to_points_to(expression /*lhs*/, expression /*delta*/, pt_map /*pt_in*/);
304 extern void offset_array_reference(reference /*r*/, expression /*delta*/, type /*et*/);
305 extern void offset_cells(cell /*source*/, list /*sinks*/, expression /*delta*/, type /*et*/, pt_map /*in*/);
306 extern points_to offset_cell(points_to /*pt*/, expression /*delta*/, type /*et*/);
307 extern void offset_points_to_cells(list /*sinks*/, expression /*delta*/, type /*t*/);
308 extern void offset_points_to_cell(cell /*sink*/, expression /*delta*/, type /*t*/, bool /*unique_p*/);
309 extern pt_map assignment_to_points_to(expression /*lhs*/, expression /*rhs*/, pt_map /*pt_in*/);
310 extern void check_type_of_points_to_cells(list /*sinks*/, type /*ct*/, bool /*eval_p*/);
311 extern void check_rhs_value_types(expression /*lhs*/, expression /*rhs*/, list /*sinks*/);
313 extern pt_map pointer_assignment_to_points_to(expression /*lhs*/, expression /*rhs*/, pt_map /*pt_in*/);
314 extern list freeable_points_to_cells(list /*R*/);
315 extern pt_map freed_list_to_points_to(expression /*lhs*/, list /*L*/, list /*R*/, pt_map /*pt_in*/);
316 extern pt_map freed_pointer_to_points_to(expression /*lhs*/, pt_map /*pt_in*/, bool /*side_effect_p*/);
318 extern list reduce_cells_to_pointer_type(list /*cl*/);
320 extern list points_to_cell_to_useful_pointer_cells(cell /*c*/, set /*pts*/);
322 extern pt_map memory_leak_to_more_memory_leaks(cell /*l*/, pt_map /*in*/);
323 extern pt_map list_assignment_to_points_to(list /*L*/, list /*R*/, pt_map /*pt_out*/);
324 extern pt_map struct_initialization_to_points_to(expression /*lhs*/, expression /*rhs*/, pt_map /*in*/);
325 extern pt_map struct_assignment_to_points_to(expression /*lhs*/, expression /*rhs*/, pt_map /*pt_in*/);
326 extern pt_map application_to_points_to(application /*a*/, pt_map /*pt_in*/, bool /*side_effect_p*/);
327 extern pt_map condition_to_points_to(expression /*c*/, pt_map /*in*/, bool /*true_p*/);
328 extern pt_map reference_condition_to_points_to(reference /*r*/, pt_map /*in*/, bool /*true_p*/);
329 extern pt_map call_condition_to_points_to(call /*c*/, pt_map /*in*/, list /*el*/, bool /*true_p*/);
330 extern pt_map intrinsic_call_condition_to_points_to(call /*c*/, pt_map /*in*/, bool /*true_p*/);
331 extern pt_map user_call_condition_to_points_to(call /*c*/, pt_map /*in*/, list /*el*/, bool /*true_p*/);
332 extern pt_map boolean_intrinsic_call_condition_to_points_to(call /*c*/, pt_map /*in*/, bool /*true_p*/);
333 extern bool cell_is_less_than_or_equal_to_p(cell /*c1*/, cell /*c2*/);
334 extern bool cell_is_less_than_p(cell /*c1*/, cell /*c2*/);
335 extern bool cell_is_greater_than_or_equal_to_p(cell /*c1*/, cell /*c2*/);
336 extern bool cell_is_greater_than_p(cell /*c1*/, cell /*c2*/);
339 extern pt_map equal_condition_to_points_to(list /*al*/, pt_map /*in*/);
340 extern pt_map non_equal_condition_to_points_to(list /*al*/, pt_map /*in*/);
341 extern pt_map order_condition_to_points_to(entity /*f*/, list /*al*/, bool /*true_p*/, pt_map /*in*/);
342 extern pt_map relational_intrinsic_call_condition_to_points_to(call /*c*/, pt_map /*in*/, bool /*true_p*/);
343 /* passes.c */
344 extern void points_to_storage(set /*pts_to_set*/, statement /*s*/, bool /*store*/);
345 extern void fi_points_to_storage(pt_map /*ptm*/, statement /*s*/, bool /*store*/);
347 extern void init_points_to_context(pt_map /*init*/);
348 extern void reset_points_to_context(void);
350 extern void add_arc_to_points_to_context(points_to /*pt*/);
351 extern void update_points_to_context_with_arc(points_to /*pt*/);
352 extern pt_map get_points_to_context(void);
353 extern void clean_up_points_to_stubs(entity /*module*/);
354 extern bool init_points_to_analysis(char */*module_name*/);
355 extern bool interprocedural_points_to_analysis_p(void);
357 extern bool intraprocedural_points_to_analysis(char */*module_name*/);
358 extern bool interprocedural_points_to_analysis(char */*module_name*/);
359 extern bool fast_interprocedural_points_to_analysis(char */*module_name*/);
360 extern bool initial_points_to(char */*name*/);
361 extern bool program_points_to(char */*name*/);
362 /* sinks.c */
363 extern list entity_to_sinks(entity /*e*/);
364 extern cell entity_to_cell(entity /*e*/);
365 extern list points_to_null_sinks(void);
366 extern cell make_null_cell(void);
367 extern list points_to_anywhere_sinks(type /*t*/);
368 extern list call_to_points_to_sinks(call /*c*/, type /*et*/, pt_map /*in*/, bool /*eval_p*/, bool /*constant_p*/);
369 extern list intrinsic_call_to_points_to_sinks(call /*c*/, pt_map /*in*/, bool /*eval_p*/, bool /*constant_p*/);
370 extern list unary_intrinsic_call_to_points_to_sinks(call /*c*/, pt_map /*in*/, bool /*eval_p*/, bool /*constant_p*/);
371 extern list binary_intrinsic_call_to_points_to_sinks(call /*c*/, pt_map /*in*/, bool /*eval_p*/);
373 extern list ternary_intrinsic_call_to_points_to_sinks(call /*c*/, pt_map /*in*/, bool /*eval_p*/, bool /*constant_p*/);
376 extern list pointer_reference_to_points_to_sinks(reference /*r*/, pt_map /*in*/, bool /*eval_p*/);
377 extern list reference_to_points_to_sinks(reference /*r*/, type /*et*/, pt_map /*in*/, bool /*eval_p*/, bool /*constant_p*/);
378 extern list cast_to_points_to_sinks(cast /*ce*/, type /*et*/, pt_map /*in*/, bool /*eval_p*/);
380 extern void init_heap_model(statement /*s*/);
381 extern void reset_heap_model(void);
382 extern statement get_heap_statement(void);
383 extern int get_heap_counter(void);
384 extern list malloc_to_points_to_sinks(expression /*e*/, pt_map /*in*/);
389 extern expression pointer_subscript_to_expression(cell /*c*/, list /*csl*/);
390 extern list subscript_to_points_to_sinks(subscript /*s*/, type /*et*/, pt_map /*in*/, bool /*eval_p*/);
391 extern list range_to_points_to_sinks(range /*r*/, pt_map /*in*/);
392 extern list expression_to_points_to_cells(expression /*e*/, pt_map /*in*/, bool /*eval_p*/, bool /*constant_p*/);
395 extern bool reference_must_points_to_null_p(reference /*r*/, pt_map /*in*/);
396 extern bool reference_may_points_to_null_p(reference /*r*/, pt_map /*in*/);
397 /* unstructured.c */
398 extern bool control_in_set_p(control /*c*/, set /*s*/);
399 extern bool control_equal_p(const void */*vc1*/, const void */*vc2*/);
400 extern _uint control_rank(const void */*vc*/, size_t /*size*/);
401 extern bool Ready_p(control /*c*/, set /*Processed*/, set /*Reachable*/);
402 extern set ready_to_be_processed_set(control /*n*/, set /*Processed*/, set /*Reachable*/);
403 extern pt_map new_points_to_unstructured(unstructured /*uns*/, pt_map /*pt_in_g*/, bool /*store*/);
404 /* variable.c */
408 /* interprocedural.c */
409 extern list points_to_cells_parameters(list /*dl*/);
411 extern points_to_graph user_call_to_points_to(call /*c*/, points_to_graph /*pt_in*/, list /*el*/);
412 extern list user_call_to_points_to_sinks(call /*c*/, type /*et*/, pt_map /*in*/, bool /*eval_p*/);
413 extern void remove_arcs_from_pt_map(points_to /*pts*/, set /*pt_out*/);
415 extern bool recursive_filter_formal_context_according_to_actual_context(list /*fcl*/, set /*pt_in*/, set /*pt_binded*/, set /*binding*/, set /*filtered*/);
416 extern set filter_formal_context_according_to_actual_context(list /*fpcl*/, set /*pt_in*/, set /*pt_binded*/, set /*binding*/);
417 extern set new_filter_formal_context_according_to_actual_context(list /*fpcl*/, set /*pt_in*/, set /*pt_binded*/, set /*binding*/);
418 extern set filter_formal_out_context_according_to_formal_in_context(set /*out*/, set /*in*/, list /*wpl*/, entity /*f*/);
419 extern void points_to_translation_of_struct_formal_parameter(cell /*fc*/, cell /*ac*/, approximation /*a*/, type /*st*/, set /*translation*/);
420 extern bool points_to_translation_mapping_is_typed_p(set /*translation*/);
421 extern void points_to_translation_of_formal_parameters(list /*fpcl*/, list /*al*/, pt_map /*pt_in*/, set /*translation*/);
422 extern void add_implicitly_killed_arcs_to_kill_set(set /*pt_kill*/, list /*wpl*/, set /*pt_caller*/, set /*pt_out_callee_filtered*/, set /*binding*/, entity /*f*/);
423 extern list translation_transitive_closure(cell /*c*/, set /*translation*/);
424 extern bool aliased_translation_p(list /*fpcl*/, set /*translation*/);
426 extern pt_map user_call_to_points_to_interprocedural(call /*c*/, pt_map /*pt_caller*/);
428 extern set compute_points_to_kill_set(list /*written_must_translated*/, set /*pt_caller*/, set /*binding*/);
429 extern list points_to_cell_translation(cell /*sr1*/, set /*binding*/, entity /*f*/);
430 extern list generic_points_to_cells_translation(list /*cl*/, set /*binding*/, entity /*f*/, bool /*exact_p*/);
431 extern list points_to_cells_translation(list /*cl*/, set /*binding*/, entity /*f*/);
432 extern list points_to_cells_exact_translation(list /*cl*/, set /*binding*/, entity /*f*/);
433 extern set compute_points_to_gen_set(set /*pt_out*/, list /*Written*/, set /*binding*/, entity /*f*/);
434 extern set points_to_binding_arguments(cell /*c1*/, cell /*c2*/, set /*in*/, set /*pt_binded*/);
435 extern list written_pointers_set(list /*eff*/);
437 extern set compute_points_to_binded_set(entity /*called_func*/, list /*real_args*/, set /*pt_caller*/, bool */*success_p*/);
438 extern set points_to_binding(list /*args*/, set /*in*/, set /*pt_binded*/);
439 extern list generic_points_to_set_to_stub_cell_list(entity /*f*/, set /*s*/, list /*osl*/);
440 extern list points_to_set_to_stub_cell_list(set /*s*/, list /*osl*/);
441 extern list points_to_set_to_module_stub_cell_list(entity /*m*/, set /*s*/, list /*osl*/);
442 extern cell points_to_source_alias(points_to /*pt*/, set /*pt_binded*/);
443 /* dereferencing.c */
445 extern pt_map dereferencing_to_points_to(expression /*p*/, pt_map /*in*/);
448 extern pt_map reference_dereferencing_to_points_to(reference /*r*/, pt_map /*in*/, bool /*nowhere_dereferencing_p*/, bool /*null_dereferencing_p*/);
449 extern bool expression_to_points_to_cell_p(expression /*e*/);
450 extern list dereferencing_to_sinks(expression /*a*/, pt_map /*in*/, bool /*eval_p*/);
451 /* constant-path-utils.c */
452 extern cell make_nowhere_cell(void);
453 extern cell make_typed_nowhere_cell(type /*t*/);
454 extern cell cell_to_nowhere_sink(cell /*source*/);
455 extern set points_to_anywhere_typed(list /*lhs_list*/, set /*input*/);
456 extern set points_to_anywhere(list /*lhs_list*/, set /*input*/);
458 extern cell max_module(cell /*m1*/, cell /*m2*/);
459 extern bool entity_any_module_p(entity /*e*/);
460 extern bool opkill_may_module(cell /*m1*/, cell /*m2*/);
461 extern bool opkill_must_module(cell /*m1*/, cell /*m2*/);
462 extern cell op_gen_module(cell /*m1*/, cell /*m2*/);
463 extern bool opkill_may_name(cell /*n1*/, cell /*n2*/);
464 extern bool opkill_must_name(cell /*n1*/, cell /*n2*/);
465 extern type max_type(type /*t1*/, type /*t2*/);
466 extern bool opkill_may_type(type /*t1*/, type /*t2*/);
467 extern bool opkill_must_type(type /*t1*/, type /*t2*/);
468 extern type opgen_may_type(type /*t1*/, type /*t2*/);
469 extern type opgen_must_type(type /*t1*/, type /*t2*/);
470 extern bool opkill_may_reference(cell /*c1*/, cell /*c2*/);
471 extern bool opkill_must_reference(cell /*c1*/, cell /*c2*/);
472 extern bool opkill_may_vreference(cell /*c1*/, cell /*c2*/);
473 extern bool opkill_must_vreference(cell /*c1*/, cell /*c2*/);
474 extern bool opkill_may_constant_path(cell /*c1*/, cell /*c2*/);
475 extern bool opkill_must_constant_path(cell /*c1*/, cell /*c2*/);
476 extern set kill_may_set(list /*L*/, set /*in_may*/);
477 extern set kill_must_set(list /*L*/, set /*in*/);
478 extern set points_to_may_filter(set /*in*/);
479 extern set points_to_must_filter(set /*in*/);
480 extern bool address_of_expression_p(expression /*e*/);
481 extern bool subscript_expression_p(expression /*e*/);
482 extern set gen_may_set(list /*L*/, list /*R*/, set /*in_may*/, bool */*address_of_p*/);
483 extern set gen_must_set(list /*L*/, list /*R*/, set /*in_must*/, bool */*address_of_p*/);
484 extern bool unique_location_cell_p(cell /*c*/);
485 extern set gen_may_constant_paths(cell /*l*/, list /*R*/, set /*in_may*/, bool */*address_of_p*/, int /*Lc*/);
486 extern set gen_must_constant_paths(cell /*l*/, list /*R*/, set /*in_must*/, bool */*address_of_p*/, int /*Lc*/);
489 extern bool opgen_may_module(entity /*e1*/, entity /*e2*/);
490 extern bool opgen_must_module(entity /*e1*/, entity /*e2*/);
491 extern bool opgen_may_name(entity /*e1*/, entity /*e2*/);
492 extern bool opgen_must_name(entity /*e1*/, entity /*e2*/);
493 extern bool opgen_may_vreference(list /*vr1*/, list /*vr2*/);
494 extern bool atomic_constant_path_p(cell /*cp*/);
495 extern set opgen_null_location(set /*L*/, cell /*r*/);
496 extern set points_to_independent_store(set /*s*/);
497 extern bool equal_must_vreference(cell /*c1*/, cell /*c2*/);
498 extern set points_to_nowhere(list /*lhs_list*/, set /*input*/);
499 #endif /* points_to_header_included */
uintptr_t _uint
Definition: newgen_types.h:54
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 *)
Definition: passes.c:574
reference simplified_reference(reference)
Return NULL as sink.
Definition: sinks.c:670
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".
Definition: sinks.c:1795
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)
Definition: expression.c:2490
bool unreachable_points_to_cell_p(cell, pt_map)
Can cell c be accessed via another cell?
entity location_entity(cell)
Definition: points_to_set.c:78
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.
Definition: expression.c:1020
void pointer_reference_dereferencing_to_points_to(reference, pt_map)
void add_arc_to_statement_points_to_context(points_to)
Definition: statement.c:104
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.
Definition: expression.c:2695
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.
Definition: expression.c:3176
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".
Definition: expression.c:2986
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.
Definition: expression.c:869
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?
Definition: sinks.c:1292
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...
Definition: variable.c:115
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".
Definition: sinks.c:755
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.
Definition: expression.c:115
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)
Definition: sinks.c:1859
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.
Definition: passes.c:285
void print_points_to(const points_to)
bool cell_is_less_than_p(cell, cell)
Definition: expression.c:2825
list points_to_null_sinks(void)
Definition: sinks.c:87
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.
Definition: expression.c:3086
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)
Definition: statement.c:436
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...
Definition: sinks.c:1805
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.
Definition: expression.c:2029
bool cell_out_of_scope_p(cell)
Return true if a cell is out of scope.
int get_heap_counter(void)
Definition: sinks.c:1197
list written_pointers_set(list)
Filter out written effects on pointers.
cell entity_to_cell(entity)
Definition: sinks.c:80
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)
Definition: sinks.c:594
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)
Definition: sinks.c:1185
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.
Definition: unstructured.c:97
list expression_to_points_to_sinks_with_offset(expression, expression, pt_map)
Definition: sinks.c:546
pt_map get_points_to_context(void)
Definition: passes.c:298
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.
Definition: passes.c:582
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)
Definition: sinks.c:1191
void reset_statement_points_to_context(void)
Definition: statement.c:139
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".
Definition: sinks.c:1430
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)
Definition: passes.c:151
bool program_points_to(char *)
Definition: passes.c:613
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,...
Definition: statement.c:573
_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".
Definition: expression.c:1929
points_to_graph pt_map
Definition: points-to.h:72
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.
Definition: statement.c:792
pt_map struct_assignment_to_points_to(expression, expression, pt_map)
pt_in is modified by side-effects and returned as pt_out
Definition: expression.c:2319
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
Definition: unstructured.c:61
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)
Definition: statement.c:145
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)
Definition: statement.c:112
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)
Definition: expression.c:2830
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)
Definition: sinks.c:327
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
Definition: expression.c:57
void print_points_to_list(points_to_list)
bool reference_may_points_to_null_p(reference, pt_map)
Definition: sinks.c:1873
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.
Definition: sinks.c:1231
list points_to_anywhere_sinks(type)
Definition: sinks.c:102
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 *)
Definition: passes.c:567
void points_to_backward_translation(void)
void remove_points_to_arcs(cell, cell, pt_map)
void reset_points_to_context(void)
Definition: passes.c:158
bool print_code_points_to_list(const char *)
void clean_up_points_to_stubs(entity)
Definition: passes.c:303
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)
Definition: sinks.c:95
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)
Definition: statement.c:604
list array_to_constant_paths(expression, set)
bool control_equal_p(const void *, const void *)
Definition: unstructured.c:71
void init_statement_points_to_context(void)
Definition: statement.c:90
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)
Definition: expression.c:2679
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...
Definition: expression.c:760
list range_to_points_to_sinks(range, pt_map)
Definition: sinks.c:1626
pt_map forloop_to_points_to(forloop, pt_map)
Definition: statement.c:974
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)
Definition: passes.c:550
bool equal_must_vreference(cell, cell)
list flow_sensitive_malloc_to_points_to_sinks(expression)
Definition: sinks.c:1321
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.
Definition: passes.c:127
pt_map unstructured_to_points_to(unstructured, pt_map)
Definition: statement.c:958
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.
Definition: expression.c:3274
set ready_to_be_processed_set(control, set, set)
A set containing all the successors of n that are ready to be processed.
Definition: unstructured.c:114
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...
Definition: expression.c:243
set add_arc_to_simple_pt_map(points_to, set)
pt_map k_limit_points_to(pt_map, int)
Definition: statement.c:912
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 ...
Definition: passes.c:268
list struct_variable_to_pointer_subscripts(cell, entity)
returns a list of cells to reach pointers depending on field f.
Definition: variable.c:183
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).
Definition: sinks.c:1451
set points_to_anywhere(list, set)
pt_map full_copy_pt_map(pt_map)
Definition: statement.c:67
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.
Definition: expression.c:1741
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
Definition: sinks.c:72
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.
Definition: passes.c:183
bool points_to_set_sharing_p(set)
void fi_points_to_storage(pt_map, statement, bool)
Definition: passes.c:97
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)".
Definition: expression.c:2538
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)
Definition: expression.c:2262
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()
Definition: statement.c:262
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)
Definition: statement.c:133
list points_to_cells_to_pointer_cells(list)
Convert cells in l into derived pointer cells when possible.
Definition: expression.c:1917
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 "...
Definition: sinks.c:1650
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.
Definition: expression.c:1489
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.
Definition: statement.c:653
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".
Definition: sinks.c:709
_uint control_rank(const void *, size_t)
create a key which is the statement number
Definition: unstructured.c:83
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
Definition: variable.c:66
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
Definition: points_to_set.c:89
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.
Definition: statement.c:496
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)
Definition: expression.c:1905
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....
Definition: expression.c:2618
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)
Definition: expression.c:2835
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)
Definition: sinks.c:112
pt_map pointer_assignment_to_points_to(expression, expression, pt_map)
Definition: expression.c:1437
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)
Definition: expression.c:1163
void print_points_to_path(list)
For debugging.
int points_to_context_statement_line_number(void)
Definition: statement.c:120
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)
Definition: sinks.c:640
bool opkill_must_name(cell, cell)
void points_to_storage(set, statement, bool)
passes.c
Definition: passes.c:67
void offset_array_reference(reference, expression, type)
Side effect on reference "r".
Definition: expression.c:802
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()
Definition: statement.c:154
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
Definition: statement.c:50
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.
Definition: expression.c:2927
cell reduce_cell_to_pointer_type(cell)
Remove last subscripts of cell c till its type becomes a scalar pointer.
Definition: expression.c:1809
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.
Definition: statement.c:479
points_to opgen_may_constant_path(cell, cell)
pt_map dereferencing_subscript_to_points_to(subscript, pt_map)
dereferencing.c
Definition: dereferencing.c:71
bool init_points_to_analysis(char *)
Definition: passes.c:483
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.
Definition: expression.c:2512
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.
Definition: points_to_set.c:98
pt_map reference_to_points_to(reference, pt_map, bool)
The subscript expressions may impact the points-to information.
Definition: expression.c:262
list insensitive_malloc_to_points_to_sinks(expression)
FI->AM: what's the difference with the previous option? Reference to your dissertation?
Definition: sinks.c:1312
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.
Definition: expression.c:2820
bool fast_interprocedural_points_to_analysis_p(void)
Definition: passes.c:555
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)
Definition: expression.c:284
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,...
Definition: expression.c:1214
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.
Definition: expression.c:937
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...
Definition: expression.c:1844
list freeable_points_to_cells(list)
Remove from points-to cell list R cells that certainly cannot be freed.
Definition: expression.c:1457
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)
Definition: sinks.c:216
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 *)
Definition: passes.c:560
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))".....
Definition: expression.c:2595
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)
Definition: sinks.c:1179
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)
Definition: sinks.c:172
int compare_entities_without_scope(const entity *, const entity *)
cproto-generated files
Definition: points_to_set.c:60
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)
Definition: expression.c:411
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...
Definition: expression.c:1315
pt_map null_equal_condition_to_points_to(expression, pt_map)
The condition is e==NULL.
Definition: expression.c:2849
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)
Definition: expression.c:1900
pt_map user_call_to_points_to_fast_interprocedural(call, pt_map, list)
void push_statement_points_to_context(statement, pt_map)
Definition: statement.c:98
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)
Definition: statement.c:967
bool points_to_translation_mapping_is_typed_p(set)
pt_map points_to_context_statement_in(void)
Definition: statement.c:127
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:
Definition: expression.c:306
pt_map instruction_to_points_to(instruction, pt_map)
See points_to_statement()
Definition: statement.c:370
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.
Definition: set.c:59
The structure used to build lists in NewGen.
Definition: newgen_list.h:41