PIPS
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "ri-util.h"
#include "effects-util.h"
#include "misc.h"
#include "properties.h"
Go to the source code of this file.
Functions | |
entity | entity_all_locations () |
eturn ANY_MODULE:ANYWHERE (the top of the lattice) More... | |
entity | entity_anywhere_locations () |
bool | entity_all_locations_p (entity e) |
test if an entity is the top of the lattice More... | |
entity | entity_typed_anywhere_locations (type t) |
entity | generic_entity_typed_anywhere_locations (type t) |
bool | entity_anywhere_locations_p (entity e) |
test if an entity is the bottom of the lattice More... | |
bool | cell_typed_anywhere_locations_p (cell c) |
test if a cell is the bottom of the lattice More... | |
bool | reference_typed_anywhere_locations_p (reference r) |
test if a reference is the bottom of the lattice More... | |
bool | entity_typed_anywhere_locations_p (entity e) |
Test if an entity is the bottom of the lattice. More... | |
entity | entity_nowhere_locations () |
return ANY_MODULE:NOWHERE More... | |
entity | entity_typed_nowhere_locations (type t) |
bool | entity_nowhere_locations_p (entity e) |
test if an entity is the bottom of the lattice More... | |
bool | entity_typed_nowhere_locations_p (entity e) |
test if an entity is the bottom of the lattice More... | |
entity | entity_null_locations () |
return TOP-LEVEL:NULL_POINTER The NULL pointer should be a global variable, unique for all modules FI: why isn't it called entity_null_location()? More... | |
bool | entity_null_locations_p (entity e) |
test if an entity is the NULL POINTER More... | |
entity | entity_all_module_locations (entity m) |
return m:ANYWHERE Set of all memory locations related to one module. More... | |
bool | entity_all_module_locations_p (entity e) |
test if an entity is the set of locations defined in a module More... | |
entity | entity_all_module_xxx_locations (entity m, const char *xxx) |
return m:xxx*ANYWHERE* Generic set of functions for all kinds of areas More... | |
entity | entity_all_module_xxx_locations_typed (const char *mn, const char *xxx, type t) |
bool | entity_all_module_xxx_locations_p (entity e, string xxx) |
test if an entity is the set of all memory locations in the xxx area of a module. More... | |
entity | entity_all_xxx_locations (string xxx) |
return ANY_MODULE:xxx More... | |
entity | entity_all_xxx_locations_typed (string xxx, type t) |
FI->AM: the predicate entity_all_xxx_locations_typed_p() is missing... More... | |
bool | entity_all_xxx_locations_p (entity e, string xxx) |
test if an entity is the set of all memory locations in the xxx area of any module. More... | |
entity | entity_all_module_heap_locations (entity m) |
return m:*HEAP**ANYWHERE More... | |
entity | entity_all_module_heap_locations_typed (entity m, type t) |
bool | entity_all_module_heap_locations_p (entity e) |
test if an entity is the a heap area More... | |
entity | entity_all_heap_locations () |
return ANY_MODULE:HEAP More... | |
bool | entity_all_heap_locations_p (entity e) |
test if an entity is the set of all heap locations More... | |
entity | entity_all_heap_locations_typed (type t) |
entity | entity_all_module_stack_locations (entity m) |
return m:*STACK**ANYWHERE More... | |
bool | entity_all_module_stack_locations_p (entity e) |
test if an entity is the a stack area More... | |
entity | entity_all_stack_locations () |
return ANY_MODULE:STACK More... | |
bool | entity_all_stack_locations_p (entity e) |
test if an entity is the set of all stack locations More... | |
entity | entity_all_module_static_locations (entity m) |
return m:*DYNAMIC**ANYWHERE More... | |
bool | entity_all_module_static_locations_p (entity e) |
test if an entity is the a static area More... | |
entity | entity_all_static_locations () |
return ANY_MODULE:STATIC More... | |
bool | entity_all_static_locations_p (entity e) |
test if an entity is the set of all static locations More... | |
entity | entity_all_module_dynamic_locations (entity m) |
return m:*DYNAMIC**ANYWHERE More... | |
bool | entity_all_module_dynamic_locations_p (entity e) |
test if an entity is the a dynamic area More... | |
entity | entity_all_dynamic_locations () |
return ANY_MODULE:DYNAMIC More... | |
bool | entity_all_dynamic_locations_p (entity e) |
test if an entity is the set of all dynamic locations More... | |
bool | entity_stub_sink_p (entity e) |
test if an entity is a stub sink for a formal parameter e.g. More... | |
bool | stub_entity_of_module_p (entity s, entity m) |
bool | entity_abstract_location_p (entity al) |
entity | variable_to_abstract_location (entity v) |
returns the smallest abstract locations containing the location of variable v. More... | |
entity | abstract_locations_max (entity al1, entity al2) |
eturns the smallest abstract location set greater than or equalt to al1 and al2. More... | |
entity | entity_locations_max (entity al1, entity al2) |
Here, entity al1 and entity al2 can be program variables. More... | |
entity | entity_locations_dereference (entity al __attribute__((__unused__))) |
in case we need to evaluate sigma(al), i.e. More... | |
void | check_abstract_locations () |
For debugging the API. More... | |
bool | abstract_locations_may_conflict_p (entity al1, entity al2) |
Do these two abstract locations MAY share some real memory locations ? More... | |
bool | abstract_locations_must_conflict_p (entity al1 __attribute__((__unused__)), entity al2 __attribute__((__unused__))) |
Do these two abstract locations MUST share some real memory locations ? Never ! DO NOT USE THIS FUNCTION UNLESS... More... | |
reference | make_anywhere_reference (type t) |
This function should be located somewhere in effect-util in or near abstract locations. More... | |
cell | make_anywhere_cell (type t) |
eturns the smallest abstract location set greater than or equalt to al1 and al2.
If al1 or al2 is nowhere, then return al2 or al1.
If al1 and al2 are related to the same module, the module can be preserved. Else the anywhere module must be used.
If al1 and al2 are related to the same area, then the area is preserved. Else, the anywhere area is used.
FI: The type part of the abstract location lattice is not implemented... Since the abstract locations are somewhere defined as area, they cannot carry a type. Types are taken care of for heap modelization but not more the abstract locations.
FI: we are in trouble with the NULL pointer... here al1 and al2 must be abstract locations
avoid costly string operations in trivial case
al1 | l1 |
al2 | l2 |
Definition at line 766 of file anywhere_abstract_locations.c.
References ANY_MODULE_NAME, ANYWHERE_LOCATION, entity_anywhere_locations(), entity_basic_concrete_type(), entity_local_name(), entity_module_name(), entity_type, entity_typed_anywhere_locations(), entity_undefined, entity_undefined_p, FindEntity(), free(), get_bool_property(), pips_user_warning, same_entity_p(), strdup(), and type_equal_p().
Referenced by abstract_locations_may_conflict_p(), convex_cells_inclusion_p(), entity_locations_max(), and simple_cells_inclusion_p().
Do these two abstract locations MAY share some real memory locations ?
al1 | l1 |
al2 | l2 |
Definition at line 989 of file anywhere_abstract_locations.c.
References abstract_locations_max().
Referenced by add_conflicts(), and entities_maymust_conflict_p().
bool abstract_locations_must_conflict_p | ( | entity al1 | __attribute__(__unused__), |
entity al2 | __attribute__(__unused__) | ||
) |
Do these two abstract locations MUST share some real memory locations ? Never ! DO NOT USE THIS FUNCTION UNLESS...
The function is useful in functional drivers to avoid dealing with specific cases
Definition at line 1001 of file anywhere_abstract_locations.c.
Referenced by entities_maymust_conflict_p().
test if a cell is the bottom of the lattice
Definition at line 133 of file anywhere_abstract_locations.c.
References cell_any_reference(), and reference_typed_anywhere_locations_p().
Referenced by binary_intrinsic_call_to_points_to_sinks(), check_type_of_points_to_cells(), compute_points_to_binded_set(), compute_points_to_gen_set(), dereferencing_subscript_to_points_to(), freeable_points_to_cells(), freed_pointer_to_points_to(), null_equal_condition_to_points_to(), offset_cells(), offset_points_to_cell(), points_to_with_stripped_sink(), print_or_dump_points_to(), source_to_sinks(), and unique_location_cell_p().
void check_abstract_locations | ( | void | ) |
For debugging the API.
top
bottom
null pointer
all locations for a given module
all heap locations for a given module
all stack locations for a given module
all static locations for a given module
all dynamic locations for a given module
all heap locations for an application
all stack locations for an application
all static locations for an application
all dynamic locations for an application
Should/could be extended to check the max computation...
Definition at line 906 of file anywhere_abstract_locations.c.
References entity_all_dynamic_locations(), entity_all_dynamic_locations_p(), entity_all_heap_locations(), entity_all_heap_locations_p(), entity_all_locations(), entity_all_locations_p(), entity_all_module_dynamic_locations(), entity_all_module_dynamic_locations_p(), entity_all_module_heap_locations(), entity_all_module_heap_locations_p(), entity_all_module_locations(), entity_all_module_locations_p(), entity_all_module_stack_locations(), entity_all_module_stack_locations_p(), entity_all_module_static_locations(), entity_all_module_static_locations_p(), entity_all_stack_locations(), entity_all_stack_locations_p(), entity_all_static_locations(), entity_all_static_locations_p(), entity_name, entity_nowhere_locations(), entity_nowhere_locations_p(), entity_null_locations(), entity_null_locations_p(), entity_undefined, fprintf(), and get_current_module_entity().
al | l |
Definition at line 641 of file anywhere_abstract_locations.c.
References ABSTRACT_LOCATION, ANY_MODULE_NAME, ANYWHERE_LOCATION, DYNAMIC_AREA_LOCAL_NAME, entity_kind, entity_name, FORMAL_AREA_LOCAL_NAME, HEAP_AREA_LOCAL_NAME, MODULE_SEP_CHAR, pips_assert, STACK_AREA_LOCAL_NAME, STATIC_AREA_LOCAL_NAME, and true.
Referenced by add_conflicts(), add_implicit_interprocedural_write_effects(), atomic_constant_path_p(), cell_abstract_location_p(), convex_effect_to_constant_path_effects_with_pointer_values(), create_values_for_simple_effect(), effect_reference_dereferencing_p(), effects_to_dma(), entities_maymust_conflict_p(), entity_locations_max(), generic_apply_effect_to_transformer(), generic_apply_effects_to_transformer(), generic_effects_entities_which_may_conflict_with_scalar_entity(), generic_effects_maymust_read_or_write_scalar_entity_p(), generic_eval_cell_with_points_to(), generic_transform_sink_cells_from_matching_list(), memory_dereferencing_p(), module_to_value_mappings(), opgen_may_name(), opgen_must_name(), opkill_may_name(), opkill_must_name(), points_to_cell_to_upper_bound_points_to_cells(), points_to_compare_cells(), points_to_compare_ptr_cell(), references_may_conflict_p(), simple_effect_to_constant_path_effects_with_pointer_values(), strict_constant_path_p(), struct_assignment_to_points_to(), and variable_to_abstract_location().
entity entity_all_dynamic_locations | ( | void | ) |
return ANY_MODULE:DYNAMIC
Definition at line 585 of file anywhere_abstract_locations.c.
References DYNAMIC_AREA_LOCAL_NAME, and entity_all_xxx_locations().
Referenced by check_abstract_locations().
test if an entity is the set of all dynamic locations
Definition at line 591 of file anywhere_abstract_locations.c.
References DYNAMIC_AREA_LOCAL_NAME, and entity_all_xxx_locations_p().
Referenced by check_abstract_locations(), and strict_constant_path_p().
entity entity_all_heap_locations | ( | void | ) |
return ANY_MODULE:HEAP
FI->AM: I move it to ANY_MODULE:HEAP**ANYWHERE
Not compatible with entity_all_locations_p()...
Definition at line 494 of file anywhere_abstract_locations.c.
References ANYWHERE_LOCATION, entity_all_xxx_locations(), and HEAP_AREA_LOCAL_NAME.
Referenced by check_abstract_locations(), and malloc_type_to_abstract_location().
test if an entity is the set of all heap locations
We look for "*ANY_MODULE*:*HEAP**ANYWHERE*"... unless it is "foo:*HEAP**ANYWHERE*"
FI->AM: this is not compatible with the entity name ANY-MODULE:HEAP
Definition at line 505 of file anywhere_abstract_locations.c.
References entity_all_xxx_locations_p(), and HEAP_AREA_LOCAL_NAME.
Referenced by all_heap_locations_cell_p(), check_abstract_locations(), entity_heap_location_p(), heap_intrinsic_to_post_pv(), reference_add_field_dimension(), and strict_constant_path_p().
Definition at line 510 of file anywhere_abstract_locations.c.
References entity_all_xxx_locations_typed(), and HEAP_AREA_LOCAL_NAME.
Referenced by malloc_type_to_abstract_location(), and reference_add_field_dimension().
entity entity_all_locations | ( | void | ) |
eturn ANY_MODULE:ANYWHERE (the top of the lattice)
FI->aM: it was first decided to make this entity an area, but areas cannot be typed. So the internal representation must be changed to carry a type usable according to ALIAS_ACROSS_TYPES. The top of the location lattice should use overloaded as type, that is the top of the type lattice.
Size and layout are unknown
Definition at line 68 of file anywhere_abstract_locations.c.
References ABSTRACT_LOCATION, ANY_MODULE_NAME, ANYWHERE_LOCATION, entity_domain, entity_kind, entity_undefined, entity_undefined_p, gen_find_tabulated(), make_area(), make_entity, make_storage_rom(), make_type_area(), make_value_unknown(), MODULE_SEP_STRING, NIL, and strdup().
Referenced by anywhere_effect(), check_abstract_locations(), entity_anywhere_locations(), entity_anywhere_locations_p(), entity_locations_dereference(), generic_entity_typed_anywhere_locations(), make_anywhere_anywhere_pvs(), make_anywhere_points_to_cell(), max_module(), module_initial_parameter_pv(), and points_to_anywhere_sinks().
test if an entity is the top of the lattice
This test does not take typed anywhere into account. This is consistent with the function name, but may be not with its uses.
It is not consistent with hiding the impact of ALIASING_ACROSS_TYPES from callers.
Definition at line 100 of file anywhere_abstract_locations.c.
References ANY_MODULE_NAME, ANYWHERE_LOCATION, entity_local_name(), entity_module_name(), and same_string_p.
Referenced by anywhere_cell_p(), anywhere_reference_p(), c_convex_effects_on_formal_parameter_backward_translation(), check_abstract_locations(), effect_reference_dereferencing_p(), entities_maymust_conflict_p(), generic_anywhere_effect_p(), interference_on(), loop_variant_list(), opkill_may_name(), opkill_must_name(), pvs_union_combinable_p(), references_may_conflict_p(), simple_pv_may_union(), simple_pv_must_union(), simple_pv_translate(), strict_constant_path_p(), and TestCoupleOfReferences().
return m:*DYNAMIC**ANYWHERE
Definition at line 573 of file anywhere_abstract_locations.c.
References DYNAMIC_AREA_LOCAL_NAME, and entity_all_module_xxx_locations().
Referenced by check_abstract_locations().
test if an entity is the a dynamic area
Definition at line 579 of file anywhere_abstract_locations.c.
References DYNAMIC_AREA_LOCAL_NAME, and entity_all_module_xxx_locations_p().
Referenced by check_abstract_locations(), and strict_constant_path_p().
return m:*HEAP**ANYWHERE
Definition at line 471 of file anywhere_abstract_locations.c.
References entity_all_module_xxx_locations(), and HEAP_AREA_LOCAL_NAME.
Referenced by check_abstract_locations(), and malloc_type_to_abstract_location().
test if an entity is the a heap area
Definition at line 483 of file anywhere_abstract_locations.c.
References entity_all_module_xxx_locations_p(), and HEAP_AREA_LOCAL_NAME.
Referenced by check_abstract_locations(), entity_heap_location_p(), heap_intrinsic_to_post_pv(), reference_add_field_dimension(), and strict_constant_path_p().
Definition at line 476 of file anywhere_abstract_locations.c.
References entity_all_module_xxx_locations_typed(), entity_local_name(), and HEAP_AREA_LOCAL_NAME.
Referenced by malloc_type_to_abstract_location().
return m:ANYWHERE Set of all memory locations related to one module.
FI: This may prove useless unless the compilation unit is taken into account.
Size and layout are unknown
FI: any_name?
Definition at line 265 of file anywhere_abstract_locations.c.
References ABSTRACT_LOCATION, ANYWHERE_LOCATION, CreateEntity(), entity_initial, entity_kind, entity_local_name(), entity_storage, entity_type, entity_undefined, entity_undefined_p, FindEntity(), make_area(), make_storage_rom(), make_type_area(), make_value_unknown(), and NIL.
Referenced by check_abstract_locations().
test if an entity is the set of locations defined in a module
Definition at line 286 of file anywhere_abstract_locations.c.
References ANYWHERE_LOCATION, entity_local_name(), and same_string_p.
Referenced by apply_abstract_effect_to_transformer(), check_abstract_locations(), and strict_constant_path_p().
return m:*STACK**ANYWHERE
Definition at line 523 of file anywhere_abstract_locations.c.
References entity_all_module_xxx_locations(), and STACK_AREA_LOCAL_NAME.
Referenced by check_abstract_locations().
test if an entity is the a stack area
Definition at line 529 of file anywhere_abstract_locations.c.
References entity_all_module_xxx_locations_p(), and STACK_AREA_LOCAL_NAME.
Referenced by check_abstract_locations(), and strict_constant_path_p().
return m:*DYNAMIC**ANYWHERE
Definition at line 548 of file anywhere_abstract_locations.c.
References entity_all_module_xxx_locations(), and STATIC_AREA_LOCAL_NAME.
Referenced by check_abstract_locations().
test if an entity is the a static area
Definition at line 554 of file anywhere_abstract_locations.c.
References entity_all_module_xxx_locations_p(), and STATIC_AREA_LOCAL_NAME.
Referenced by check_abstract_locations(), and strict_constant_path_p().
return m:xxx*ANYWHERE* Generic set of functions for all kinds of areas
Size and layout are unknown
I: more work to be done here...
xxx | xx |
Definition at line 299 of file anywhere_abstract_locations.c.
References ABSTRACT_LOCATION, ANYWHERE_LOCATION, asprintf, entity_initial, entity_kind, entity_local_name(), entity_storage, entity_type, entity_undefined, FindOrCreateEntity(), free(), make_area(), make_storage_rom(), make_type_area(), make_value_unknown(), NIL, and storage_undefined_p.
Referenced by entity_all_module_dynamic_locations(), entity_all_module_heap_locations(), entity_all_module_stack_locations(), entity_all_module_static_locations(), and variable_to_abstract_location().
test if an entity is the set of all memory locations in the xxx area of a module.
The module is not checked, so it can be the set of all modules...
xxx | xx |
Definition at line 366 of file anywhere_abstract_locations.c.
References ANYWHERE_LOCATION, concatenate(), entity_local_name(), entity_undefined_p, pips_assert, and same_string_p.
Referenced by entity_all_module_dynamic_locations_p(), entity_all_module_heap_locations_p(), entity_all_module_stack_locations_p(), and entity_all_module_static_locations_p().
A new entity has been created
I: more work to be done here...
no aliasing
mn | n |
xxx | xx |
Definition at line 321 of file anywhere_abstract_locations.c.
References asprintf, copy_type(), count, entity_initial, entity_name, entity_storage, entity_type, entity_undefined, FindOrCreateEntity(), free(), local_name(), make_storage_rom(), make_value_unknown(), pips_assert, pips_debug, type_equal_p(), type_to_string(), type_undefined, and type_undefined_p.
Referenced by entity_all_module_heap_locations_typed(), and variable_to_abstract_location().
entity entity_all_stack_locations | ( | void | ) |
return ANY_MODULE:STACK
Definition at line 535 of file anywhere_abstract_locations.c.
References entity_all_xxx_locations(), and STACK_AREA_LOCAL_NAME.
Referenced by check_abstract_locations().
test if an entity is the set of all stack locations
Definition at line 541 of file anywhere_abstract_locations.c.
References entity_all_xxx_locations_p(), and STACK_AREA_LOCAL_NAME.
Referenced by check_abstract_locations(), and strict_constant_path_p().
entity entity_all_static_locations | ( | void | ) |
return ANY_MODULE:STATIC
Definition at line 560 of file anywhere_abstract_locations.c.
References entity_all_xxx_locations(), and STATIC_AREA_LOCAL_NAME.
Referenced by check_abstract_locations().
test if an entity is the set of all static locations
Definition at line 566 of file anywhere_abstract_locations.c.
References entity_all_xxx_locations_p(), and STATIC_AREA_LOCAL_NAME.
Referenced by check_abstract_locations(), and strict_constant_path_p().
return ANY_MODULE:xxx
I: more work to be done here...
FI: I'd like to make the type variable, overloaded,...
xxx | xx |
Definition at line 379 of file anywhere_abstract_locations.c.
References ABSTRACT_LOCATION, ANY_MODULE_NAME, DYNAMIC_AREA_LOCAL_NAME, ENTITY_DYNAMIC_AREA, ENTITY_HEAP_AREA, entity_initial, entity_kind, ENTITY_STACK_AREA, ENTITY_STATIC_AREA, entity_storage, entity_type, entity_undefined, FindOrCreateEntity(), HEAP_AREA_LOCAL_NAME, make_basic_overloaded(), make_storage_rom(), make_type_variable(), make_value_unknown(), make_variable(), NIL, same_string_p, STACK_AREA_LOCAL_NAME, STATIC_AREA_LOCAL_NAME, and type_undefined_p.
Referenced by application_to_points_to_sinks(), entity_all_dynamic_locations(), entity_all_heap_locations(), entity_all_stack_locations(), entity_all_static_locations(), make_anywhere_reference(), make_nowhere_cell(), points_to_anywhere(), and user_call_to_points_to_sinks().
test if an entity is the set of all memory locations in the xxx area of any module.
FI->AM: how come w generate HEAP and we check HEAP**ANYWHERE?
xxx | xx |
Definition at line 456 of file anywhere_abstract_locations.c.
References ANY_MODULE_NAME, ANYWHERE_LOCATION, concatenate(), entity_local_name(), entity_module_name(), and same_string_p.
Referenced by entity_all_dynamic_locations_p(), entity_all_heap_locations_p(), entity_all_stack_locations_p(), and entity_all_static_locations_p().
FI->AM: the predicate entity_all_xxx_locations_typed_p() is missing...
A new entity has been created
I: more work to be done here...
xxx | xx |
Definition at line 406 of file anywhere_abstract_locations.c.
References ABSTRACT_LOCATION, ANY_MODULE_NAME, asprintf, copy_type(), count, entity_initial, entity_kind, entity_name, entity_storage, entity_type, entity_undefined, FindOrCreateEntity(), fprintf(), free(), ifdebug, make_storage_rom(), make_value_unknown(), pips_assert, pips_debug, print_type(), string_undefined, type_equal_p(), type_functional_p, type_undefined, and type_undefined_p.
Referenced by application_to_points_to_sinks(), entity_all_heap_locations_typed(), entity_typed_anywhere_locations(), entity_typed_nowhere_locations(), generic_entity_typed_anywhere_locations(), make_anywhere_points_to_cell(), make_anywhere_reference(), make_typed_nowhere_cell(), points_to_anywhere_typed(), and user_call_to_points_to_sinks().
entity entity_anywhere_locations | ( | void | ) |
Definition at line 87 of file anywhere_abstract_locations.c.
References entity_all_locations().
Referenced by abstract_locations_max(), anywhere_source_to_sinks(), remove_arcs_from_pt_map(), and source_to_sinks().
test if an entity is the bottom of the lattice
Definition at line 127 of file anywhere_abstract_locations.c.
References entity_all_locations(), and same_entity_p().
Referenced by entities_maymust_conflict_p(), generic_atomic_points_to_reference_p(), module_to_value_mappings(), points_to_cell_translation(), reference_add_field_dimension(), semantics_usable_points_to_reference_p(), and strict_constant_path_p().
in case we need to evaluate sigma(al), i.e.
the locations pointed by al, return the top of the lattice. Of course, this function should be avoided as much as possible.
Definition at line 898 of file anywhere_abstract_locations.c.
References entity_all_locations(), and entity_undefined.
Here, entity al1 and entity al2 can be program variables.
Both al1 and al2 are abstract locations and they are different
al1 and al2 are assumed to be variables
al1 | l1 |
al2 | l2 |
Definition at line 829 of file anywhere_abstract_locations.c.
References abstract_locations_max(), ANY_MODULE_NAME, ANYWHERE_LOCATION, DYNAMIC_AREA_LOCAL_NAME, dynamic_area_p(), entity_abstract_location_p(), entity_local_name(), entity_storage, entity_undefined, f2(), FindEntity(), HEAP_AREA_LOCAL_NAME, heap_area_p(), pips_internal_error, ram_function, ram_section, s1, STACK_AREA_LOCAL_NAME, stack_area_p(), STATIC_AREA_LOCAL_NAME, static_area_p(), storage_ram, storage_ram_p, and variable_to_abstract_location().
Referenced by effect_may_union(), effect_must_union(), and region_union().
entity entity_nowhere_locations | ( | void | ) |
return ANY_MODULE:NOWHERE
Size and layout are unknown
Definition at line 174 of file anywhere_abstract_locations.c.
References ABSTRACT_LOCATION, ANY_MODULE_NAME, entity_domain, entity_kind, entity_undefined, entity_undefined_p, gen_find_tabulated(), make_area(), make_entity, make_storage_rom(), make_type_area(), make_value_unknown(), MODULE_SEP_STRING, NIL, NOWHERE_LOCATION, register_static_entity(), and strdup().
Referenced by check_abstract_locations(), and entity_nowhere_locations_p().
test if an entity is the bottom of the lattice
Should we care for the typed nowhere too?
Definition at line 200 of file anywhere_abstract_locations.c.
References entity_nowhere_locations(), and same_entity_p().
Referenced by check_abstract_locations(), gen_may_set(), gen_must_set(), opkill_may_name(), opkill_must_name(), reference_add_field_dimension(), and strict_constant_path_p().
entity entity_null_locations | ( | void | ) |
return TOP-LEVEL:NULL_POINTER The NULL pointer should be a global variable, unique for all modules FI: why isn't it called entity_null_location()?
Since NULL is a constant, it should be declared as a function. But then it cold not be used in a reference for the points-to analysis. Too bad for the semantics analysis of pointers were a constant 0-ary function would make more sense.
Size and layout are unknown
Definition at line 223 of file anywhere_abstract_locations.c.
References copy_type(), DEFAULT_ENTITY_KIND, entity_initial, entity_kind, entity_storage, entity_type, entity_undefined, entity_undefined_p, FindOrCreateEntity(), make_area(), make_constant_int(), make_entity, make_functional(), make_storage_rom(), make_type_area(), make_type_functional(), make_type_void(), make_value_constant(), make_value_unknown(), MODULE_SEP_STRING, NIL, NULL_POINTER_NAME, register_static_entity(), strdup(), TOP_LEVEL_MODULE_NAME, and type_to_pointer_type().
Referenced by check_abstract_locations(), entity_null_locations_p(), make_null_cell(), null_pointer_value_entity(), and points_to_null_sinks().
test if an entity is the NULL POINTER
Definition at line 254 of file anywhere_abstract_locations.c.
References entity_null_locations(), and same_entity_p().
Referenced by any_basic_update_to_transformer(), any_update_to_transformer(), atomic_constant_path_p(), check_abstract_locations(), entities_maymust_conflict_p(), gen_may_set(), gen_must_set(), generic_atomic_points_to_reference_p(), generic_transform_sink_cells_from_matching_list(), null_cell_p(), null_pointer_value_entity_p(), opkill_may_name(), opkill_must_name(), points_to_unary_operation_to_transformer(), reference_add_field_dimension(), references_may_conflict_p(), semantics_usable_points_to_reference_p(), strict_constant_path_p(), transformer_internal_consistency_p(), and variable_to_abstract_location().
test if an entity is a stub sink for a formal parameter e.g.
f->_f_1, EXACT
Definition at line 599 of file anywhere_abstract_locations.c.
References entity_local_name(), entity_storage, formal_area_p(), ram_section, storage_ram, and storage_ram_p.
Referenced by cell_out_of_scope_p(), create_stub_entity(), expand_points_to_domain(), generic_atomic_points_to_reference_p(), generic_points_to_set_to_stub_cell_list(), generic_remove_unreachable_vertices_in_points_to_graph(), generic_transformer_to_analyzed_locations(), reference_to_points_to(), source_to_sinks(), strict_constant_path_p(), stub_entity_of_module_p(), stub_points_to_cell_p(), subscript_to_points_to_sinks(), and transformer_general_consistency_p().
Definition at line 111 of file anywhere_abstract_locations.c.
References ANYWHERE_LOCATION, and entity_all_xxx_locations_typed().
Referenced by abstract_locations_max(), binary_intrinsic_call_to_points_to_sinks(), cells_to_read_or_write_effects(), points_to_anywhere_sinks(), and reference_add_field_dimension().
Test if an entity is the bottom of the lattice.
Not really since it is typed...
The typed anywhere locations have names like ANYWHERE_LOCATION_bxxx
Beware, because the string ANYWHERE_LOCATION is also used for the heap, HEAP**ANYWHERE.
Also, this does not check for the module: is it ANYMODULE or a specific module?
Definition at line 160 of file anywhere_abstract_locations.c.
References ANYWHERE_LOCATION, and entity_local_name().
Referenced by analyzable_scalar_entity_p(), cells_to_read_or_write_effects(), effect_reference_dereferencing_p(), generic_anywhere_effect_p(), generic_atomic_points_to_reference_p(), module_to_value_mappings(), points_to_cell_translation(), reference_add_field_dimension(), reference_typed_anywhere_locations_p(), semantics_usable_points_to_reference_p(), source_to_sinks(), and strict_constant_path_p().
Definition at line 191 of file anywhere_abstract_locations.c.
References entity_all_xxx_locations_typed(), and NOWHERE_LOCATION.
test if an entity is the bottom of the lattice
Definition at line 206 of file anywhere_abstract_locations.c.
References entity_local_name(), and NOWHERE_LOCATION.
Referenced by any_basic_update_to_transformer(), any_update_to_transformer(), gen_may_set(), gen_must_set(), generic_atomic_points_to_reference_p(), nowhere_cell_p(), points_to_unary_operation_to_transformer(), reference_add_field_dimension(), semantics_usable_points_to_reference_p(), strict_constant_path_p(), and text_points_to_relation().
Definition at line 116 of file anywhere_abstract_locations.c.
References ANYWHERE_LOCATION, entity_all_locations(), entity_all_xxx_locations_typed(), entity_undefined, and get_bool_property().
Definition at line 1028 of file anywhere_abstract_locations.c.
References make_anywhere_reference(), and make_cell_reference().
Referenced by binary_intrinsic_call_to_points_to_sinks(), generic_transform_sink_cells_from_matching_list(), k_limit_points_to(), sizeofexpression_to_points_to_sinks(), source_to_sinks(), struct_assignment_to_points_to(), struct_initialization_to_points_to(), unary_intrinsic_call_to_points_to_sinks(), and use_default_sink_cell().
This function should be located somewhere in effect-util in or near abstract locations.
Definition at line 1016 of file anywhere_abstract_locations.c.
References ANYWHERE_LOCATION, entity_all_xxx_locations(), entity_all_xxx_locations_typed(), get_bool_property(), make_reference(), and NIL.
Referenced by binary_intrinsic_call_to_points_to_sinks(), generic_eval_cell_with_points_to(), and make_anywhere_cell().
test if a reference is the bottom of the lattice
Definition at line 141 of file anywhere_abstract_locations.c.
References entity_typed_anywhere_locations_p(), and reference_variable.
Referenced by any_assign_to_transformer(), and cell_typed_anywhere_locations_p().
There are several ways to decide if entity "s" is local to "m": its module name, its belonging to the declarations of m, its storage,... Let's avoir string comparisons and list scans...
Definition at line 624 of file anywhere_abstract_locations.c.
References entity_storage, entity_stub_sink_p(), f(), ram_function, storage_ram, and storage_ram_p.
Referenced by clean_up_points_to_stubs(), compute_points_to_binded_set(), and generic_points_to_set_to_stub_cell_list().
returns the smallest abstract locations containing the location of variable v.
This does not work for formal parameters or, if it works, the caller module is not known and the resulting abstract location is very large. A large abstract location is returned.
No idea to model return values... even though they are located in the stack in real world.
If v cannot be converted into an abstract location, either the function aborts or an undefined entity is returned.
NULL is an abstract location
Definition at line 675 of file anywhere_abstract_locations.c.
References ABSTRACT_LOCATION, dummy_parameter_entity_p(), DYNAMIC_AREA_LOCAL_NAME, dynamic_area_p(), entity_abstract_location_p(), entity_all_module_xxx_locations(), entity_all_module_xxx_locations_typed(), entity_basic_concrete_type(), entity_kind, entity_local_name(), entity_null_locations_p(), entity_storage, entity_undefined, entity_variable_p, f(), FORMAL_AREA_LOCAL_NAME, formal_area_p(), formal_function, formal_parameter_p(), get_bool_property(), HEAP_AREA_LOCAL_NAME, heap_area_p(), pips_assert, pips_internal_error, ram_function, ram_section, STACK_AREA_LOCAL_NAME, stack_area_p(), STATIC_AREA_LOCAL_NAME, static_area_p(), storage_formal, storage_ram, string_undefined, and variable_return_p().
Referenced by add_conflicts(), entities_maymust_conflict_p(), entity_locations_max(), opkill_may_name(), and opkill_must_name().