335 pips_assert(
"in is consistent on entry or undefined",
540 pips_assert(
"in is consistent or undefined when returning",
939 "that is not a pointer.\n Could be a "
940 "function assigned to a functional pointer.\n");
949 pips_user_warning(
"Some kind of execution error has been encountered at line %d.\n",
964 pips_assert(
"The expected type and the reference type are compatible",
1252 pips_user_error(
"Unexpected value \"%s\" for Property ABSTRACT_HEAP_LOCATION."
1253 "Possible values are \"unique\", \"insensitive\","
1254 "\"flow-sensitive\", \"context-sensitive\".\n", opt);
1401 if(type_sensitive_p)
1472 bool eval_performed_p =
false;
1534 i_sources =
CONS(
CELL, c, i_sources);
1548 i_sources =
CONS(
CELL, c, i_sources);
1556 eval_performed_p =
true;
1557 i_sources =
CONS(
CELL, c, i_sources);
1578 i_sources =
CONS(
CELL, c, i_sources);
1585 if(eval_p && !eval_performed_p) {
1720 bool free_f_e_t =
false;
1862 bool must_p =
false;
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
cell make_cell_reference(reference _field_)
approximation make_approximation_exact(void)
approximation make_approximation_may(void)
descriptor make_descriptor_none(void)
cell copy_cell(cell p)
CELL.
points_to make_points_to(cell a1, cell a2, approximation a3, descriptor a4)
void free_reference(reference p)
expression copy_expression(expression p)
EXPRESSION.
reference make_reference(entity a1, list a2)
void free_expression(expression p)
reference copy_reference(reference p)
REFERENCE.
sensitivity_information make_sensitivity_information(statement current_stmt, entity current_module, list enclosing_flow)
entity malloc_to_abstract_location(expression malloc_exp, sensitivity_information *psi)
generate an abstract heap location entity
#define add_arc_to_pt_map(a, s)
#define pt_map_undefined_p(pt)
#define consistent_pt_map_p(s)
entity entity_null_locations()
return TOP-LEVEL:NULL_POINTER The NULL pointer should be a global variable, unique for all modules FI...
entity entity_typed_anywhere_locations(type t)
bool entity_stub_sink_p(entity e)
test if an entity is a stub sink for a formal parameter e.g.
bool cell_typed_anywhere_locations_p(cell c)
test if a cell is the bottom of the lattice
reference make_anywhere_reference(type t)
This function should be located somewhere in effect-util in or near abstract locations.
entity entity_all_xxx_locations(string xxx)
return ANY_MODULE:xxx
entity entity_all_xxx_locations_typed(string xxx, type t)
FI->AM: the predicate entity_all_xxx_locations_typed_p() is missing...
entity entity_all_locations()
eturn ANY_MODULE:ANYWHERE (the top of the lattice)
cell make_anywhere_cell(type t)
void const char const char const int
entity MakeIoFileArray(entity f)
This array is pointed by FILE * pointers returned or used by fopen, fclose,...
cell make_nowhere_cell()
This file contains all the operators defining constant paths :
cell cell_to_nowhere_sink(cell source)
assuming source is a reference to a pointer, build the corresponding sink when the pointer is not ini...
bool expression_to_points_to_cell_p(expression e)
Can expression e be reduced to a reference, without requiring an evaluation?
list dereferencing_to_sinks(expression a, pt_map in, bool eval_p)
Returns "sinks", the list of cells pointed to by expression "a" according to points-to graph "in".
#define ANYWHERE_LOCATION
type points_to_reference_to_concrete_type(reference)
cell make_anywhere_points_to_cell(type)
Function storing points to information attached to a statement.
type points_to_cell_to_type(cell, bool *)
FI: I need more generality than is offered by cell_to_type()
reference cell_any_reference(cell)
API for reference.
cell points_to_cell_add_field_dimension(cell, entity)
Functions about points-to cells - There is no cell.c file.
type points_to_cell_to_concrete_type(cell)
type points_to_expression_to_pointed_type(expression)
Return a new allocated type "t" of the address pointed by expression "e", if expression "e" denotes a...
type points_to_expression_to_type(expression, bool *)
FI: I need more generality than is offered by expression_to_type() because fields are assimilated to ...
bool anywhere_cell_p(cell)
Is it an anywhere cell?
bool all_heap_locations_cell_p(cell)
type points_to_expression_to_concrete_type(expression)
The type returned is stored in a hash-table.
bool nowhere_cell_p(cell)
Target of an undefined pointer.
bool points_to_array_reference_p(reference)
Is this a reference to an array or a reference to a pointer? This is not linked to the type of the re...
bool adapt_reference_to_type(reference, type, int(*)(void))
FI: a really stupid function...
void complete_points_to_reference_with_zero_subscripts(reference)
string effect_reference_to_string(reference)
void points_to_reference_update_final_subscripts(reference, list)
Substitute the subscripts "sl" in points-to reference "r" just after the last field subscript by "nsl...
void points_to_cell_add_zero_subscripts(cell)
bool heap_cell_p(cell)
Any heap cell, more or less abstract or typed.
#define cell_reference(x)
#define cell_reference_p(x)
#define cell_preference_p(x)
char * get_string_property(const char *)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
void gen_full_free_list(list l)
entity get_current_module_entity(void)
Get the entity of the current module.
#define ENDP(l)
Test if a list is empty.
#define NIL
The empty list (nil in Lisp)
size_t gen_length(const list l)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
#define CAR(pcons)
Get the value of the first element of a list.
void gen_free_list(list l)
free the spine of the list
list gen_last(list l)
Return the last element of a list.
bool gen_in_list_p(const void *vo, const list lx)
tell whether vo belongs to lx
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define CDR(pcons)
Get the list less its first element.
#define list_undefined
Undefined list definition :-)
list gen_full_copy_list(list l)
Copy a list structure with element copy.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_user_warning
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
#define same_string_p(s1, s2)
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
void check_type_of_points_to_cells(list sinks, type ct, bool eval_p)
Check that all cells in list "sinks" are compatible with type "ct" if "eval_p" is false,...
pt_map condition_to_points_to(expression c, pt_map in, bool true_p)
Update points-to set "in" according to the content of the expression using side effects.
void offset_points_to_cells(list sinks, expression delta, type t)
Each cell in sinks is replaced by a cell located "delta" elements further up in the memory.
list user_call_to_points_to_sinks(call c, type et __attribute__((unused)), pt_map in __attribute__((unused)), bool eval_p)
FI: I assume we do not need the eval_p parameter here.
bool statement_points_to_context_defined_p(void)
list points_to_source_to_sinks(cell, pt_map, bool)
Build the sinks of source "source" according to the points-to graphs.
list reference_to_sinks(reference, pt_map, bool)
pt_map full_copy_pt_map(pt_map)
set merge_points_to_set(set, set)
Merge two points-to sets.
list variable_to_pointer_locations(entity)
variable.c
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...
int points_to_context_statement_line_number(void)
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...
bool consistent_points_to_graph_p(points_to_graph)
#define points_to_undefined
#define points_to_graph_undefined_p(x)
#define points_to_graph_bottom(x)
#define points_to_graph_set(x)
void print_expression(expression e)
no file descriptor is passed to make is easier to use in a debugging stage.
void print_reference(reference r)
#define print_points_to_cells(x)
#define print_points_to_cell(x)
void print_type(type)
For debugging.
static bool constant_p(entity e)
This function return a bool indicating if related entity e represents a constant.
#define ENTITY_PLUS_UPDATE_P(e)
#define ENTITY_CALLOC_SYSTEM_P(e)
#define ENTITY_FREE_SYSTEM_P(e)
#define ENTITY_ASSIGN_P(e)
#define ENTITY_MINUS_P(e)
#define ENTITY_COMMA_P(e)
#define ENTITY_DEREFERENCING_P(e)
#define ENTITY_POINT_TO_P(e)
#define ENTITY_PRE_DECREMENT_P(e)
#define ENTITY_POST_DECREMENT_P(e)
#define DEREFERENCING_OPERATOR_NAME
#define ENTITY_FOPEN_P(e)
#define ENTITY_POST_INCREMENT_P(e)
#define ENTITY_REALLOC_SYSTEM_P(e)
#define ENTITY_CONDITIONAL_P(e)
#define unary_intrinsic_expression(name, e)
Building quickly bool expressions, FC.
#define ENTITY_PRE_INCREMENT_P(e)
#define binary_intrinsic_expression(name, e1, e2)
#define ENTITY_PLUS_C_P(e)
#define ENTITY_FIELD_P(e)
C data structure and pointer management.
#define ENTITY_MINUS_C_P(e)
#define UNARY_MINUS_OPERATOR_NAME
#define ENTITY_MALLOC_SYSTEM_P(e)
#define ENTITY_ADDRESS_OF_P(e)
#define ENTITY_MINUS_UPDATE_P(e)
#define MULTIPLY_OPERATOR_NAME
#define PLUS_C_OPERATOR_NAME
bool entity_array_p(entity e)
Is e a variable with an array type?
entity FindOrCreateTopLevelEntity(const char *name)
Return a top-level entity.
value EvalExpression(expression e)
Evaluate statically an expression.
expression reference_to_expression(reference r)
bool zero_expression_p(expression e)
expression make_unbounded_expression()
expression make_zero_expression(void)
Make a zero expression.
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
bool unbounded_dimension_p(dimension dim)
bool unbounded_dimension_p(dim) input : a dimension of an array entity.
expression MakeUnaryCall(entity f, expression a)
Creates a call expression to a function with one argument.
bool unbounded_expression_p(expression e)
reference reference_with_store_independent_indices(reference r)
Return by side effect a reference whose memory locations includes the memory locations of r in case t...
expression pointer_reference_to_expression(reference r)
Assume p is a pointer.
list subscript_expressions_to_constant_subscript_expressions(list sl)
make a full copy of the subscript expression list, preserve constant subscripts, replace non-constant...
bool char_star_constant_function_type_p(type)
Beware of typedefs.
type expression_to_type(expression)
For an array declared as int a[10][20], the type returned for a[i] is int [20].
type make_scalar_overloaded_type(void)
bool array_element_type_p(type, type)
is "et" the type of an element of an array of type "at"?
bool array_of_pointers_type_p(type)
bool scalar_integer_type_p(type)
int variable_dimension_number(variable)
type type_to_pointed_type(type)
returns t if t is not a pointer type, and the pointed type if t is a pointer type.
type entity_basic_concrete_type(entity)
retrieves or computes and then returns the basic concrete type of an entity
bool pointer_type_p(type)
Check for scalar pointers.
bool type_structurally_equal_p(type, type)
Type t1 and t2 are equal if their basic concrete components are equal.
bool array_pointer_type_equal_p(type, type)
assume that a pointer to type x is equal to a 1-D array of x
bool array_pointer_string_type_equal_p(type, type)
Assume that a pointer to type x is equal to a 1-D array of x.
bool struct_type_p(type)
Returns true if t is of type derived and if the derived type is a struct.
type array_type_to_element_type(type)
returns the type of the elements of an array type, as a newly allocated type.
int NumberOfDimension(entity)
type compute_basic_concrete_type(type)
computes a new type which is the basic concrete type of the input type (this new type is not stored i...
bool overloaded_type_p(type)
Returns true if t is a variable type with a basic overloaded.
bool char_star_type_p(type)
Beware of typedefs.
type type_to_returned_type(type)
returns t if t is not a functoional type, and the returned type if t is a functional type.
#define value_constant(x)
#define syntax_reference(x)
#define reference_undefined
#define reference_variable(x)
#define SIZEOFEXPRESSION(x)
SIZEOFEXPRESSION.
#define sizeofexpression_type(x)
#define sizeofexpression_expression(x)
#define syntax_application(x)
@ is_syntax_sizeofexpression
#define value_constant_p(x)
#define EXPRESSION(x)
EXPRESSION.
#define cast_expression(x)
#define subscript_indices(x)
#define type_undefined_p(x)
#define constant_int_p(x)
#define expression_undefined
#define dimension_upper(x)
#define reference_indices(x)
#define sizeofexpression_expression_p(x)
#define sizeofexpression_type_p(x)
#define subscript_array(x)
#define application_function(x)
#define variable_dimensions(x)
#define syntax_subscript(x)
#define call_arguments(x)
#define expression_syntax(x)
#define statement_undefined
#define entity_initial(x)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
static int malloc_counter
list reference_to_points_to_sinks(reference r, type et, pt_map in, bool eval_p, bool constant_p)
Returns a list of memory cells "sinks" possibly accessed by the evaluation of reference "r".
list entity_to_sinks(entity e)
allocate a new list of sinks with one element, abstract or concrete, e.
list range_to_points_to_sinks(range r, pt_map in)
expression pointer_subscript_to_expression(cell c, list csl)
Allocate a new expression based on the reference in "c" and the subscript list "csl".
list expression_to_points_to_cells(expression e, pt_map in, bool eval_p, bool constant_p)
Return a possibly empty list of abstract locations whose addresses are possible value of expression "...
static list process_casted_sinks(list sinks, type t)
list subscript_to_points_to_sinks(subscript s, type et, pt_map in, bool eval_p)
Generate the corresponding points-to reference(s).
list pointer_reference_to_points_to_sinks(reference r, pt_map in, bool eval_p)
What to do when a pointer "p" is dereferenced within a reference "r".
statement get_heap_statement()
static statement malloc_statement
Heap modelling.
list unique_malloc_to_points_to_sinks(expression e)
FI->AM: is "unique" multiple when ALIASING_ACROSS_TYPE is set to false?
list cast_to_points_to_sinks(cast ce, type et __attribute__((unused)), pt_map in, bool eval_p)
Handling of cast: play it safe! Either the cast is partly redundant and can be ignored or anywhere is...
list sizeofexpression_to_points_to_sinks(sizeofexpression soe, type et __attribute__((unused)), pt_map in)
list malloc_to_points_to_sinks(expression e, pt_map in)
Heap modelling.
cell entity_to_cell(entity e)
reference simplified_reference(reference r)
Return NULL as sink.
list insensitive_malloc_to_points_to_sinks(expression e)
FI->AM: what's the difference with the previous option? Reference to your dissertation?
cell make_null_cell(void)
list points_to_null_sinks()
list points_to_anywhere_sinks(type t)
bool reference_must_points_to_null_p(reference r, pt_map in)
static list process_casted_sources(list sinks, type t)
FI: I am not sure that process_casted_sources() is nor should be different from process_casted_sinks(...
bool reference_may_points_to_null_p(reference r, pt_map in)
list unary_intrinsic_call_to_points_to_sinks(call c, pt_map in, bool eval_p, bool constant_p)
void init_heap_model(statement s)
list nary_intrinsic_call_to_points_to_sinks(call c, pt_map in)
list expression_to_points_to_sources(expression e, pt_map in)
expression_to_points_to_sources() does not always work, especially with pointer arithmetic or subscri...
list flow_sensitive_malloc_to_points_to_sinks(expression e)
list binary_intrinsic_call_to_points_to_sinks(call c, pt_map in, bool eval_p)
list intrinsic_call_to_points_to_sinks(call c, pt_map in, bool eval_p, bool constant_p)
list ternary_intrinsic_call_to_points_to_sinks(call c, pt_map in, bool eval_p, bool constant_p)
list expression_to_points_to_sinks_with_offset(expression a1, expression a2, pt_map in)
list application_to_points_to_sinks(application a, type et __attribute__((unused)), pt_map in)
list call_to_points_to_sinks(call c, type et, pt_map in, bool eval_p, bool constant_p)
list expression_to_points_to_sinks(expression e, pt_map in)
The returned list contains cells used in "in".
The structure used to build lists in NewGen.