PIPS
points_to_private.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "genC.h"
#include "points_to_private.h"
+ Include dependency graph for points_to_private.c:

Go to the source code of this file.

Functions

points_to_graph copy_points_to_graph (points_to_graph p)
 POINTS_TO_GRAPH. More...
 
void free_points_to_graph (points_to_graph p)
 
points_to_graph check_points_to_graph (points_to_graph p)
 
bool points_to_graph_consistent_p (points_to_graph p)
 
bool points_to_graph_defined_p (points_to_graph p)
 
list gen_points_to_graph_cons (points_to_graph p, list l)
 
void points_to_graph_assign_contents (points_to_graph r, points_to_graph v)
 
void points_to_graph_non_recursive_free (points_to_graph p)
 
void write_points_to_graph (FILE *f, points_to_graph p)
 
points_to_graph read_points_to_graph (FILE *f)
 
points_to_graph make_points_to_graph (bool a1, set a2)
 
points_to_list copy_points_to_list (points_to_list p)
 POINTS_TO_LIST. More...
 
void free_points_to_list (points_to_list p)
 
points_to_list check_points_to_list (points_to_list p)
 
bool points_to_list_consistent_p (points_to_list p)
 
bool points_to_list_defined_p (points_to_list p)
 
list gen_points_to_list_cons (points_to_list p, list l)
 
void points_to_list_assign_contents (points_to_list r, points_to_list v)
 
void points_to_list_non_recursive_free (points_to_list p)
 
void write_points_to_list (FILE *f, points_to_list p)
 
points_to_list read_points_to_list (FILE *f)
 
points_to_list make_points_to_list (bool a1, list a2)
 
points_to copy_points_to (points_to p)
 POINTS_TO. More...
 
void free_points_to (points_to p)
 
points_to check_points_to (points_to p)
 
bool points_to_consistent_p (points_to p)
 
bool points_to_defined_p (points_to p)
 
list gen_points_to_cons (points_to p, list l)
 
void points_to_assign_contents (points_to r, points_to v)
 
void points_to_non_recursive_free (points_to p)
 
void write_points_to (FILE *f, points_to p)
 
points_to read_points_to (FILE *f)
 
points_to make_points_to (cell a1, cell a2, approximation a3, descriptor a4)
 
statement_points_to copy_statement_points_to (statement_points_to p)
 STATEMENT_POINTS_TO. More...
 
void free_statement_points_to (statement_points_to p)
 
statement_points_to check_statement_points_to (statement_points_to p)
 
bool statement_points_to_consistent_p (statement_points_to p)
 
bool statement_points_to_defined_p (statement_points_to p)
 
list gen_statement_points_to_cons (statement_points_to p, list l)
 
void statement_points_to_assign_contents (statement_points_to r, statement_points_to v)
 
void statement_points_to_non_recursive_free (statement_points_to p)
 
void write_statement_points_to (FILE *f, statement_points_to p)
 
statement_points_to read_statement_points_to (FILE *f)
 
statement_points_to make_statement_points_to (void)
 
points_to_list apply_statement_points_to (statement_points_to f, statement k)
 
void update_statement_points_to (statement_points_to f, statement k, points_to_list v)
 
void extend_statement_points_to (statement_points_to f, statement k, points_to_list v)
 
points_to_list delete_statement_points_to (statement_points_to f, statement k)
 
bool bound_statement_points_to_p (statement_points_to f, statement k)
 

Function Documentation

◆ apply_statement_points_to()

points_to_list apply_statement_points_to ( statement_points_to  f,
statement  k 
)

Definition at line 181 of file points_to_private.c.

181  {
183 }
#define HASH_GET(start, image, h, k)
Definition: newgen_map.h:30
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15
#define statement_points_to_hash_table(x)
#define intptr_t
Definition: stdint.in.h:294

References f(), HASH_GET, intptr_t, and statement_points_to_hash_table.

+ Here is the call graph for this function:

◆ bound_statement_points_to_p()

bool bound_statement_points_to_p ( statement_points_to  f,
statement  k 
)

Definition at line 193 of file points_to_private.c.

193  {
195 }
#define HASH_BOUND_P(start, image, h, k)
Definition: newgen_map.h:32

References f(), HASH_BOUND_P, intptr_t, and statement_points_to_hash_table.

+ Here is the call graph for this function:

◆ check_points_to()

points_to check_points_to ( points_to  p)

Definition at line 106 of file points_to_private.c.

106  {
108 }
gen_chunk * gen_check(gen_chunk *obj, int t)
GEN_CHECK checks that the gen_chunk received OBJ is of the appropriate TYPE.
Definition: genClib.c:2356
#define points_to_domain
Definition: print.c:367
A gen_chunk is used to store every object.
Definition: genC.h:58

References gen_check(), and points_to_domain.

Referenced by points_to_assign_contents(), and points_to_consistent_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ check_points_to_graph()

points_to_graph check_points_to_graph ( points_to_graph  p)

Definition at line 22 of file points_to_private.c.

22  {
24 }
#define points_to_graph_domain
Definition: print.c:373

References gen_check(), and points_to_graph_domain.

Referenced by points_to_graph_assign_contents(), and points_to_graph_consistent_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ check_points_to_list()

points_to_list check_points_to_list ( points_to_list  p)

Definition at line 64 of file points_to_private.c.

64  {
66 }
#define points_to_list_domain
Definition: print.c:370

References gen_check(), and points_to_list_domain.

Referenced by points_to_list_assign_contents(), and points_to_list_consistent_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ check_statement_points_to()

statement_points_to check_statement_points_to ( statement_points_to  p)

Definition at line 148 of file points_to_private.c.

148  {
150 }
#define statement_points_to_domain
newgen_points_to_domain_defined

References gen_check(), and statement_points_to_domain.

Referenced by statement_points_to_assign_contents(), and statement_points_to_consistent_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copy_points_to()

◆ copy_points_to_graph()

points_to_graph copy_points_to_graph ( points_to_graph  p)

POINTS_TO_GRAPH.

Definition at line 16 of file points_to_private.c.

16  {
18 }

References gen_copy_tree().

Referenced by intrinsic_call_to_points_to().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copy_points_to_list()

points_to_list copy_points_to_list ( points_to_list  p)

POINTS_TO_LIST.

Definition at line 58 of file points_to_private.c.

58  {
59  return (points_to_list) gen_copy_tree((gen_chunk*) p);
60 }

References gen_copy_tree().

Referenced by initial_points_to(), and program_points_to().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copy_statement_points_to()

statement_points_to copy_statement_points_to ( statement_points_to  p)

STATEMENT_POINTS_TO.

Definition at line 142 of file points_to_private.c.

142  {
144 }

References gen_copy_tree().

+ Here is the call graph for this function:

◆ delete_statement_points_to()

points_to_list delete_statement_points_to ( statement_points_to  f,
statement  k 
)

Definition at line 190 of file points_to_private.c.

190  {
192 }
#define HASH_DELETE(start, image, h, k)
Definition: newgen_map.h:38

References f(), HASH_DELETE, intptr_t, and statement_points_to_hash_table.

+ Here is the call graph for this function:

◆ extend_statement_points_to()

void extend_statement_points_to ( statement_points_to  f,
statement  k,
points_to_list  v 
)

Definition at line 187 of file points_to_private.c.

187  {
189 }
#define HASH_EXTEND(start, image, h, k, v)
Definition: newgen_map.h:36

References f(), HASH_EXTEND, intptr_t, and statement_points_to_hash_table.

+ Here is the call graph for this function:

◆ free_points_to()

void free_points_to ( points_to  p)

Definition at line 103 of file points_to_private.c.

103  {
104  gen_free((gen_chunk*) p);
105 }
void gen_free(gen_chunk *obj)
version without shared_pointers.
Definition: genClib.c:992

References gen_free().

Referenced by reference_condition_to_points_to(), and remove_points_to_arcs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ free_points_to_graph()

void free_points_to_graph ( points_to_graph  p)

Definition at line 19 of file points_to_private.c.

19  {
20  gen_free((gen_chunk*) p);
21 }

References gen_free().

Referenced by free_points_to_graph_sets(), new_substitute_stubs_in_transformer(), and points_to_set_block_projection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ free_points_to_list()

void free_points_to_list ( points_to_list  p)

Definition at line 61 of file points_to_private.c.

61  {
62  gen_free((gen_chunk*) p);
63 }

References gen_free().

+ Here is the call graph for this function:

◆ free_statement_points_to()

void free_statement_points_to ( statement_points_to  p)

Definition at line 145 of file points_to_private.c.

145  {
146  gen_free((gen_chunk*) p);
147 }

References gen_free().

+ Here is the call graph for this function:

◆ gen_points_to_cons()

list gen_points_to_cons ( points_to  p,
list  l 
)

Definition at line 116 of file points_to_private.c.

116  {
118 }
list gen_typed_cons(_int type, const void *item, const list next)
CONS a list with minimal type checking this cannot be done within the CONS macro because possible fun...
Definition: list.c:900
#define POINTS_TO_NEWGEN_DOMAIN

References gen_typed_cons(), and POINTS_TO_NEWGEN_DOMAIN.

+ Here is the call graph for this function:

◆ gen_points_to_graph_cons()

list gen_points_to_graph_cons ( points_to_graph  p,
list  l 
)

Definition at line 32 of file points_to_private.c.

32  {
34 }
#define POINTS_TO_GRAPH_NEWGEN_DOMAIN

References gen_typed_cons(), and POINTS_TO_GRAPH_NEWGEN_DOMAIN.

+ Here is the call graph for this function:

◆ gen_points_to_list_cons()

list gen_points_to_list_cons ( points_to_list  p,
list  l 
)

Definition at line 74 of file points_to_private.c.

74  {
76 }
#define POINTS_TO_LIST_NEWGEN_DOMAIN

References gen_typed_cons(), and POINTS_TO_LIST_NEWGEN_DOMAIN.

+ Here is the call graph for this function:

◆ gen_statement_points_to_cons()

list gen_statement_points_to_cons ( statement_points_to  p,
list  l 
)

Definition at line 158 of file points_to_private.c.

158  {
160 }
#define STATEMENT_POINTS_TO_NEWGEN_DOMAIN

References gen_typed_cons(), and STATEMENT_POINTS_TO_NEWGEN_DOMAIN.

+ Here is the call graph for this function:

◆ make_points_to()

points_to make_points_to ( cell  a1,
cell  a2,
approximation  a3,
descriptor  a4 
)

Definition at line 136 of file points_to_private.c.

136  {
137  return (points_to) gen_alloc(5*sizeof(gen_chunk), GEN_CHECK_ALLOC, points_to_domain, a1, a2, a3, a4);
138 }
#define GEN_CHECK_ALLOC
Definition: genC.h:307
gen_chunk * gen_alloc(int size, int gen_check_p, int dom,...)
allocates something in newgen.
Definition: genClib.c:298

References gen_alloc(), GEN_CHECK_ALLOC, and points_to_domain.

Referenced by anywhere_source_to_sinks(), assignment_to_points_to(), compute_points_to_binded_set(), compute_points_to_gen_set(), create_pointer_to_array_stub_points_to(), create_stub_points_to(), declaration_statement_to_points_to(), dereferencing_subscript_to_points_to(), equal_condition_to_points_to(), filter_formal_context_according_to_actual_context(), filter_formal_out_context_according_to_formal_in_context(), freed_list_to_points_to(), fuse_points_to_sink_cells(), gen_may_constant_paths(), gen_may_set(), gen_must_constant_paths(), gen_must_set(), global_source_to_sinks(), k_limit_points_to(), kill_may_set(), list_assignment_to_points_to(), lower_points_to_approximations_according_to_write_effects(), malloc_to_points_to_sinks(), merge_points_to_set(), new_filter_formal_context_according_to_actual_context(), new_recursive_filter_formal_context_according_to_actual_context(), new_recursive_filter_formal_context_according_to_actual_context_for_pointer_pair(), non_equal_condition_to_points_to(), null_equal_condition_to_points_to(), null_to_sinks(), offset_cells(), opgen_null_location(), pointer_formal_parameter_to_stub_points_to(), points_to_anywhere(), points_to_anywhere_typed(), points_to_binding_arguments(), points_to_independent_store(), points_to_nowhere(), points_to_path_to_k_limited_points_to_path(), points_to_set_block_projection(), points_to_translation_of_formal_parameters(), points_to_translation_of_struct_formal_parameter(), points_to_with_stripped_sink(), recursive_filter_formal_context_according_to_actual_context(), reference_condition_to_points_to(), remove_arcs_from_pt_map(), remove_points_to_arcs(), remove_points_to_cell(), source_to_sinks(), struct_assignment_to_points_to(), struct_initialization_to_points_to(), upgrade_approximations_in_points_to_set(), and user_call_to_points_to_fast_interprocedural().

+ Here is the call graph for this function:

◆ make_points_to_graph()

◆ make_points_to_list()

points_to_list make_points_to_list ( bool  a1,
list  a2 
)

Definition at line 94 of file points_to_private.c.

94  {
96 }

References gen_alloc(), GEN_CHECK_ALLOC, and points_to_list_domain.

Referenced by fi_points_to_storage(), generic_points_to_analysis(), init_points_to_analysis(), initial_points_to(), points_to_storage(), and program_points_to().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_statement_points_to()

statement_points_to make_statement_points_to ( void  )

Definition at line 178 of file points_to_private.c.

References gen_alloc(), GEN_CHECK_ALLOC, and statement_points_to_domain.

+ Here is the call graph for this function:

◆ points_to_assign_contents()

void points_to_assign_contents ( points_to  r,
points_to  v 
)

Definition at line 119 of file points_to_private.c.

119  {
120  check_points_to(r);
121  check_points_to(v);
122  message_assert("defined references to domain points_to",
124  memcpy(r, v, sizeof(struct _newgen_struct_points_to_));
125 }
bool points_to_defined_p(points_to p)
points_to check_points_to(points_to p)
#define message_assert(msg, ex)
Definition: newgen_assert.h:47

References check_points_to(), message_assert, and points_to_defined_p().

+ Here is the call graph for this function:

◆ points_to_consistent_p()

bool points_to_consistent_p ( points_to  p)

Definition at line 109 of file points_to_private.c.

109  {
110  check_points_to(p);
111  return gen_consistent_p((gen_chunk*) p);
112 }
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition: genClib.c:2398

References check_points_to(), and gen_consistent_p().

Referenced by consistent_points_to_arc_p(), and word_points_to().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ points_to_defined_p()

bool points_to_defined_p ( points_to  p)

Definition at line 113 of file points_to_private.c.

113  {
114  return gen_defined_p((gen_chunk*) p);
115 }
int gen_defined_p(gen_chunk *obj)
Definition: genClib.c:2438

References gen_defined_p().

Referenced by points_to_assign_contents().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ points_to_graph_assign_contents()

void points_to_graph_assign_contents ( points_to_graph  r,
points_to_graph  v 
)

Definition at line 35 of file points_to_private.c.

35  {
38  message_assert("defined references to domain points_to_graph",
40  memcpy(r, v, sizeof(struct _newgen_struct_points_to_graph_));
41 }
bool points_to_graph_defined_p(points_to_graph p)
points_to_graph check_points_to_graph(points_to_graph p)

References check_points_to_graph(), message_assert, and points_to_graph_defined_p().

+ Here is the call graph for this function:

◆ points_to_graph_consistent_p()

◆ points_to_graph_defined_p()

bool points_to_graph_defined_p ( points_to_graph  p)

Definition at line 29 of file points_to_private.c.

29  {
30  return gen_defined_p((gen_chunk*) p);
31 }

References gen_defined_p().

Referenced by points_to_graph_assign_contents().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ points_to_graph_non_recursive_free()

void points_to_graph_non_recursive_free ( points_to_graph  p)

Definition at line 42 of file points_to_private.c.

42  {
43  // should clear up contents...
44  free(p);
45 }
void free(void *)

References free().

+ Here is the call graph for this function:

◆ points_to_list_assign_contents()

void points_to_list_assign_contents ( points_to_list  r,
points_to_list  v 
)

Definition at line 77 of file points_to_private.c.

77  {
80  message_assert("defined references to domain points_to_list",
82  memcpy(r, v, sizeof(struct _newgen_struct_points_to_list_));
83 }
points_to_list check_points_to_list(points_to_list p)
bool points_to_list_defined_p(points_to_list p)

References check_points_to_list(), message_assert, and points_to_list_defined_p().

+ Here is the call graph for this function:

◆ points_to_list_consistent_p()

bool points_to_list_consistent_p ( points_to_list  p)

Definition at line 67 of file points_to_private.c.

67  {
69  return gen_consistent_p((gen_chunk*) p);
70 }

References check_points_to_list(), and gen_consistent_p().

Referenced by fi_points_to_storage(), init_points_to_analysis(), and points_to_storage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ points_to_list_defined_p()

bool points_to_list_defined_p ( points_to_list  p)

Definition at line 71 of file points_to_private.c.

71  {
72  return gen_defined_p((gen_chunk*) p);
73 }

References gen_defined_p().

Referenced by points_to_list_assign_contents().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ points_to_list_non_recursive_free()

void points_to_list_non_recursive_free ( points_to_list  p)

Definition at line 84 of file points_to_private.c.

84  {
85  // should clear up contents...
86  free(p);
87 }

References free().

+ Here is the call graph for this function:

◆ points_to_non_recursive_free()

void points_to_non_recursive_free ( points_to  p)

Definition at line 126 of file points_to_private.c.

126  {
127  // should clear up contents...
128  free(p);
129 }

References free().

+ Here is the call graph for this function:

◆ read_points_to()

points_to read_points_to ( FILE *  f)

Definition at line 133 of file points_to_private.c.

133  {
134  return (points_to) gen_read(f);
135 }
gen_chunk * gen_read(FILE *file)
GEN_READ reads any object from the FILE stream.
Definition: genClib.c:2323

References f(), and gen_read().

+ Here is the call graph for this function:

◆ read_points_to_graph()

points_to_graph read_points_to_graph ( FILE *  f)

Definition at line 49 of file points_to_private.c.

49  {
50  return (points_to_graph) gen_read(f);
51 }

References f(), and gen_read().

+ Here is the call graph for this function:

◆ read_points_to_list()

points_to_list read_points_to_list ( FILE *  f)

Definition at line 91 of file points_to_private.c.

91  {
92  return (points_to_list) gen_read(f);
93 }

References f(), and gen_read().

+ Here is the call graph for this function:

◆ read_statement_points_to()

statement_points_to read_statement_points_to ( FILE *  f)

Definition at line 175 of file points_to_private.c.

175  {
176  return (statement_points_to) gen_read(f);
177 }

References f(), and gen_read().

+ Here is the call graph for this function:

◆ statement_points_to_assign_contents()

void statement_points_to_assign_contents ( statement_points_to  r,
statement_points_to  v 
)

Definition at line 161 of file points_to_private.c.

161  {
164  message_assert("defined references to domain statement_points_to",
166  memcpy(r, v, sizeof(struct _newgen_struct_statement_points_to_));
167 }
bool statement_points_to_defined_p(statement_points_to p)
statement_points_to check_statement_points_to(statement_points_to p)

References check_statement_points_to(), message_assert, and statement_points_to_defined_p().

+ Here is the call graph for this function:

◆ statement_points_to_consistent_p()

bool statement_points_to_consistent_p ( statement_points_to  p)

Definition at line 151 of file points_to_private.c.

151  {
153  return gen_consistent_p((gen_chunk*) p);
154 }

References check_statement_points_to(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ statement_points_to_defined_p()

bool statement_points_to_defined_p ( statement_points_to  p)

Definition at line 155 of file points_to_private.c.

155  {
156  return gen_defined_p((gen_chunk*) p);
157 }

References gen_defined_p().

Referenced by statement_points_to_assign_contents().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ statement_points_to_non_recursive_free()

void statement_points_to_non_recursive_free ( statement_points_to  p)

Definition at line 168 of file points_to_private.c.

168  {
169  // should clear up contents...
170  free(p);
171 }

References free().

+ Here is the call graph for this function:

◆ update_statement_points_to()

void update_statement_points_to ( statement_points_to  f,
statement  k,
points_to_list  v 
)

Definition at line 184 of file points_to_private.c.

184  {
186 }
#define HASH_UPDATE(start, image, h, k, v)
Definition: newgen_map.h:34

References f(), HASH_UPDATE, intptr_t, and statement_points_to_hash_table.

+ Here is the call graph for this function:

◆ write_points_to()

void write_points_to ( FILE *  f,
points_to  p 
)

Definition at line 130 of file points_to_private.c.

130  {
131  gen_write(f, (gen_chunk*) p);
132 }
void gen_write(FILE *fd, gen_chunk *obj)
GEN_WRITE writes the OBJect on the stream FD.
Definition: genClib.c:1745

References f(), and gen_write().

+ Here is the call graph for this function:

◆ write_points_to_graph()

void write_points_to_graph ( FILE *  f,
points_to_graph  p 
)

Definition at line 46 of file points_to_private.c.

46  {
47  gen_write(f, (gen_chunk*) p);
48 }

References f(), and gen_write().

+ Here is the call graph for this function:

◆ write_points_to_list()

void write_points_to_list ( FILE *  f,
points_to_list  p 
)

Definition at line 88 of file points_to_private.c.

88  {
89  gen_write(f, (gen_chunk*) p);
90 }

References f(), and gen_write().

+ Here is the call graph for this function:

◆ write_statement_points_to()

void write_statement_points_to ( FILE *  f,
statement_points_to  p 
)

Definition at line 172 of file points_to_private.c.

172  {
173  gen_write(f, (gen_chunk*) p);
174 }

References f(), and gen_write().

+ Here is the call graph for this function: