PIPS
|
#include "linear.h"
#include "newgen.h"
#include "ri.h"
#include "effects.h"
#include "points_to_private.h"
Go to the source code of this file.
Data Structures | |
struct | sensitivity_information |
#define ANY_MODULE_NAME "*ANY_MODULE*" |
Warning! Do not modify this file that is automatically generated!
Modify src/Libs/effects-util/effects-util-local.h instead, to add your own modifications. header file built by cproto effects_util-local.h
Definition at line 39 of file effects-util.h.
#define ANYWHERE_LOCATION "*ANYWHERE*" |
Definition at line 40 of file effects-util.h.
#define BETA_PREFIX "BETA" |
Definition at line 52 of file effects-util.h.
#define cell_relation_approximation_tag | ( | cr | ) | approximation_tag(cell_relation_approximation(cr)) |
Definition at line 188 of file effects-util.h.
#define cell_relation_exact_p | ( | cr | ) | approximation_tag(cell_relation_approximation(cr))==is_approximation_exact |
Definition at line 194 of file effects-util.h.
#define cell_relation_first_address_of_p | ( | cr | ) | cell_interpretation_address_of_p(interpreted_cell_cell_interpretation(cell_relation_first(cr))) |
Definition at line 173 of file effects-util.h.
#define cell_relation_first_cell | ( | cr | ) | interpreted_cell_cell(cell_relation_first(cr)) |
Definition at line 164 of file effects-util.h.
#define cell_relation_first_interpretation_tag | ( | cr | ) | cell_interpretation_tag(interpreted_cell_cell_interpretation(cell_relation_first(cr))) |
Definition at line 167 of file effects-util.h.
#define cell_relation_first_value_of_p | ( | cr | ) | cell_interpretation_value_of_p(interpreted_cell_cell_interpretation(cell_relation_first(cr))) |
Definition at line 170 of file effects-util.h.
#define cell_relation_may_p | ( | cr | ) | approximation_tag(cell_relation_approximation(cr))==is_approximation_may |
Definition at line 191 of file effects-util.h.
#define cell_relation_second_address_of_p | ( | cr | ) | cell_interpretation_address_of_p(interpreted_cell_cell_interpretation(cell_relation_second(cr))) |
Definition at line 185 of file effects-util.h.
#define cell_relation_second_cell | ( | cr | ) | interpreted_cell_cell(cell_relation_second(cr)) |
Definition at line 176 of file effects-util.h.
#define cell_relation_second_interpretation_tag | ( | cr | ) | cell_interpretation_tag(interpreted_cell_cell_interpretation(cell_relation_second(cr))) |
Definition at line 179 of file effects-util.h.
#define cell_relation_second_value_of_p | ( | cr | ) | cell_interpretation_value_of_p(interpreted_cell_cell_interpretation(cell_relation_second(cr))) |
Definition at line 182 of file effects-util.h.
#define effect_action_tag | ( | eff | ) | action_tag(effect_action(eff)) |
Definition at line 60 of file effects-util.h.
#define effect_any_entity | ( | e | ) | effect_to_entity(e) |
some useful SHORTHANDS for EFFECT:
FI: Let's hope this one is not used as lhs!
Definition at line 59 of file effects-util.h.
#define effect_any_reference | ( | e | ) | (cell_preference_p(effect_cell(e))? preference_reference(cell_preference(effect_cell(e))) : cell_reference(effect_cell(e))) |
FI: cannot be used as a left hand side.
Definition at line 139 of file effects-util.h.
#define effect_approximation_tag | ( | eff | ) | approximation_tag(effect_approximation(eff)) |
Definition at line 61 of file effects-util.h.
#define effect_exact_p | ( | eff | ) | (approximation_tag(effect_approximation(eff)) ==is_approximation_exact) |
Definition at line 86 of file effects-util.h.
#define effect_may_p | ( | eff | ) | (approximation_tag(effect_approximation(eff)) == is_approximation_may) |
Definition at line 82 of file effects-util.h.
#define effect_must_p | ( | eff | ) | (approximation_tag(effect_approximation(eff)) == is_approximation_must) |
Definition at line 84 of file effects-util.h.
#define effect_read_p | ( | eff | ) | (action_tag(effect_action(eff))==is_action_read) |
#define effect_scalar_p(eff) entity_scalar_p(effect_entity(eff))
The semantics of effects_scalar_p() must be refined. If all the indices are constant expressions, we still have a scalar effect, unless they are later replaced by "*", as is the case currently for summary effects.
Potential bug: eff is evaluated twice. Should be copied in a local variable and braces be used.
Definition at line 80 of file effects-util.h.
#define effect_reference | ( | e | ) |
FI: it would be useful to assert cell_preference_p(effect_cell(e)), but I do not know how to do it in such a way that it works both for left hand sides and right hand sides using commas.
I definitely remove this one : it is too dangerous. #define effect_reference(e) \ preference_reference(cell_preference(effect_cell(e)))
Definition at line 134 of file effects-util.h.
#define effect_system | ( | e | ) |
Definition at line 123 of file effects-util.h.
#define effect_variable | ( | e | ) | reference_variable(effect_any_reference(e)) |
For COMPATIBILITY purpose only - DO NOT USE anymore.
Definition at line 94 of file effects-util.h.
#define effect_write_p | ( | eff | ) | (action_tag(effect_action(eff))==is_action_write) |
Definition at line 81 of file effects-util.h.
#define make_convex_effect | ( | reference, | |
action, | |||
approximation, | |||
system | |||
) |
Definition at line 156 of file effects-util.h.
#define make_preference_simple_effect | ( | reference, | |
action, | |||
approximation | |||
) |
Definition at line 141 of file effects-util.h.
#define make_reference_simple_effect | ( | reference, | |
action, | |||
approximation | |||
) |
Definition at line 146 of file effects-util.h.
#define make_simple_effect | ( | reference, | |
action, | |||
approximation | |||
) |
Definition at line 151 of file effects-util.h.
#define NOWHERE_LOCATION "*NOWHERE*" |
Definition at line 41 of file effects-util.h.
#define NULL_POINTER_NAME "*NULL*" |
Definition at line 43 of file effects-util.h.
#define NULL_POINTER_VALUE_NAME "*NULL*" |
Definition at line 47 of file effects-util.h.
#define PHI_PREFIX "PHI" |
Definition at line 49 of file effects-util.h.
Definition at line 197 of file effects-util.h.
Definition at line 201 of file effects-util.h.
#define PROPER true |
Definition at line 53 of file effects-util.h.
#define PSI_PREFIX "PSI" |
Definition at line 50 of file effects-util.h.
#define RHO_PREFIX "RHO" |
Definition at line 51 of file effects-util.h.
#define SUMMARY false |
Definition at line 54 of file effects-util.h.
#define UNDEFINED_LOCATION "*UNDEFINED*" |
Definition at line 44 of file effects-util.h.
#define UNDEFINED_POINTER_VALUE_NAME "*UNDEFINED*" |
Definition at line 46 of file effects-util.h.
#define variable_beta_p | ( | e | ) |
Definition at line 118 of file effects-util.h.
#define variable_phi_p | ( | e | ) |
true if e is a phi variable PHI entities have a name like: REGIONS:PHI#, where # is a number.
takes care if TCST and undefined entities, just in case. FC, 09/12/94
Definition at line 103 of file effects-util.h.
#define variable_psi_p | ( | e | ) |
Definition at line 108 of file effects-util.h.
#define variable_rho_p | ( | e | ) |
Definition at line 113 of file effects-util.h.
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().
Definition at line 121 of file pointer_values.c.
References abstract_pointer_value_entity_p(), and cell_entity().
Referenced by kill_pointer_value().
Definition at line 115 of file pointer_values.c.
References null_pointer_value_entity_p(), and undefined_pointer_value_entity_p().
Referenced by abstract_pointer_value_cell_p().
a1 | 1 |
a2 | 2 |
Definition at line 1023 of file effects.c.
References action_kind_tag, action_read, action_read_p, action_tag, and action_write.
Referenced by combinable_regions_p(), and effect_comparable_p().
string action_kind_to_string | ( | action_kind | ak | ) |
ak | k |
Definition at line 995 of file effects.c.
References action_kind_environment_p, action_kind_store_p, action_kind_type_declaration_p, pips_internal_error, and string_undefined.
action_kind action_to_action_kind | ( | action | a | ) |
Without the consistency test, this function would certainly be inlined.
Macros are avoided to simplify debugging and maintenance.
Definition at line 1048 of file effects.c.
References action_read, action_read_p, action_write, action_write_p, and pips_assert.
Referenced by effect_action_kind(), effects_might_conflict_even_read_only_p(), region_sup_difference(), regions_may_convex_hull(), and union_compatible_effects_p().
Functions dealing with actions.
This is correct, but imprecise when action_kinds are taken into account
ac | c |
Definition at line 936 of file effects.c.
References action_read_p.
FI: a really stupid function...
Why do we add zero subscript right away when building the sink cell to remove them later? Let's now remove the excessive subscripts of "r" with respect to type "at"...
et | t |
Definition at line 1327 of file type.c.
References array_pointer_string_type_equal_p(), array_pointer_type_equal_p(), CAR, compute_basic_concrete_type(), ENDP, EXPRESSION, expression_field_p(), free_type(), gen_last(), gen_length(), gen_remove_once(), int, pips_internal_error, pips_user_warning, points_to_reference_to_type(), reference_indices, reference_to_string(), and type_to_full_string_definition().
Referenced by dereferencing_subscript_to_points_to(), expression_to_points_to_cells(), filter_formal_context_according_to_actual_context(), new_filter_formal_context_according_to_actual_context(), points_to_with_stripped_sink(), process_casted_sinks(), process_casted_sources(), subscript_to_points_to_sinks(), and subscripted_reference_to_points_to().
Definition at line 432 of file effects.c.
References cell_any_reference(), entity_all_heap_locations_p(), and reference_variable.
Referenced by points_to_cell_types_compatibility(), points_to_function_projection(), and subscript_to_points_to_sinks().
Is it a typed or untyped anywhere effect?
Definition at line 358 of file effects.c.
References generic_anywhere_effect_p().
Is it an anywhere cell?
Are typed anywhere celles taken into account?
Definition at line 367 of file effects.c.
References cell_any_reference(), entity_all_locations_p(), and reference_variable.
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(), freed_list_to_points_to(), freed_pointer_to_points_to(), null_equal_condition_to_points_to(), offset_cell(), offset_cells(), offset_points_to_cell(), points_to_cell_types_compatibility(), points_to_source_to_translations(), points_to_with_stripped_sink(), print_or_dump_points_to(), process_casted_sinks(), process_casted_sources(), source_to_sinks(), subscript_to_points_to_sinks(), and unique_location_cell_p().
Anywhere effect: an effect which can be related to any location of any areas.
Allocate a new anywhere effect, and the anywhere entity on demand which may not be best if we want to express it's aliasing with all module areas. In the later case, the anywhere entity should be generated by bootstrap and be updated each time new areas are declared by the parsers. I do not use a persistant anywhere reference to avoid trouble with convex-effect nypassing of the persistant pointer.
Action a is integrated in the new effect (aliasing). NOT GENERIC AT ALL. USE make_anywhere_effect INSTEAD (BC).
ac | c |
Definition at line 317 of file effects.c.
References effect_undefined, entity_all_locations(), make_approximation_may(), make_cell_reference(), make_descriptor_none(), make_effect(), make_reference(), and NIL.
Referenced by effect_to_pointer_store_independent_effect(), and effect_to_store_independent().
Is it an anywhere effect? ANYMMODULE:ANYWHERE
Definition at line 346 of file effects.c.
References generic_anywhere_effect_p().
Referenced by anymodule_anywhere_region_p(), binary_arithmetic_operator_to_post_pv(), c_convex_effects_on_formal_parameter_backward_translation(), effect_interference(), effects_interfere_p(), generic_effect_find_aliases_with_simple_pointer_values(), guess_potential_reduction(), kill_pointer_value(), multiple_pointer_assignment_to_post_pv(), old_effects_conflict_p(), potential_out_effects_p(), region_entities_intersection(), region_inf_difference(), region_intersection(), region_sup_difference(), regions_dynamic_elim(), single_pointer_assignment_to_post_pv(), step_translate_and_map(), store_independent_effect_p(), and update_operator_to_post_pv().
Definition at line 378 of file effects.c.
References entity_all_locations_p(), and reference_variable.
Referenced by any_assign_to_transformer().
tag approximation_and(tag t1, tag t2) input : two approximation tags.
output : the tag representing their "logical and", assuming that must = true and may = false. modifies : nothing
t1 | 1 |
t2 | 2 |
Definition at line 1198 of file effects.c.
References is_approximation_exact, and is_approximation_may.
Referenced by effect_may_union(), effect_must_union(), make_simple_pv_from_simple_effects(), region_intersection(), region_union(), and regions_may_convex_hull().
tag approximation_or(tag t1, tag t2) input : two approximation tags.
output : the tag representing their "logical or", assuming that must = true and may = false. modifies : nothing
t1 | 1 |
t2 | 2 |
Definition at line 1213 of file effects.c.
References is_approximation_exact, and is_approximation_may.
Referenced by effect_must_union(), region_union(), and regions_must_convex_hull().
string approximation_to_string | ( | approximation | a | ) |
Definition at line 458 of file prettyprint.c.
References approximation_exact_p, approximation_may_p, approximation_must_p, pips_internal_error, and string_undefined.
Referenced by print_or_dump_points_to().
Expanded version of location_entity_of_module_p()
le | e |
Definition at line 374 of file locations.c.
References array_type_p(), entity_basic_concrete_type(), entity_initial, entity_module_name(), entity_undefined_p, entity_user_name(), reference_variable, value_reference, value_reference_p, and value_undefined_p.
Referenced by module_to_analyzed_array_locations().
Maybe it is an effect on a structure field
Definition at line 1668 of file effects.c.
References atomic_points_to_cell_p(), effect_cell, and effect_scalar_p().
Is it a unique concrete memory location?
Plus NULL? No doubt about the value of the pointer...
Plus undefined? No doubt about the indeterminate value of the pointer according to C standard...
Definition at line 423 of file points_to.c.
References atomic_points_to_reference_p(), cell_any_reference(), nowhere_cell_p(), and null_cell_p().
Referenced by atomic_effect_p(), compute_points_to_gen_set(), compute_points_to_kill_set(), equal_condition_to_points_to(), freed_list_to_points_to(), non_equal_condition_to_points_to(), null_equal_condition_to_points_to(), and points_to_function_projection().
Definition at line 519 of file points_to.c.
References generic_atomic_points_to_reference_p().
Referenced by atomic_points_to_cell_p(), and substitute_stubs_in_transformer().
bool basic_concrete_types_compatible_for_effects_interprocedural_translation_p | ( | type | real_ct, |
type | formal_ct | ||
) |
tests if the actual argument type and the formal argument type are compatible with the current state of the interprocedural translation algorithms.
Input types are
safe default result
easiest case
we do not take care of array dimension sizes
well, basic_equal_strict_p is at the same time too restrictive for derived and too optimistic for pointers and arrays because dimensions are skipped
skip same number of array and pointer dimensions until we reach the ultimate basic or there are no more corresponding dimensions
we have a void * as actual argument
translation cannot be accurate
we are sure here that gen_length(formal_dims) != 0
we have a void * as actual argument
translation cannot be accurate
we are sure here that gen_length(real_dims) != 0
store types and not bct becasue bct cannot be equal, since a new type is generated each time. We really need a global table for bcts
It should be a strict type equality here, but I don't think type_equal_p is very robust when types are declared in headers
real_ct | eal_ct |
formal_ct | ormal_ct |
Definition at line 699 of file type.c.
References basic_concrete_types_compatible_for_effects_interprocedural_translation_p(), basic_derived, basic_derived_p, basic_equal_p(), basic_pointer, basic_pointer_p, CAR, CDR, ENDP, ENTITY, entity_basic_concrete_type(), entity_name, entity_type, gen_chunk_undefined_p, gen_find_eq(), gen_free_list(), gen_length(), gen_position(), gen_type_cons(), is_type_enum, is_type_functional, is_type_struct, is_type_union, is_type_variable, is_type_void, NIL, pips_debug, pips_internal_error, POP, same_entity_p(), string_of_type(), type_fields(), type_tag, type_to_string(), type_variable, type_variable_p, type_void_p, variable_basic, and variable_dimensions.
Referenced by basic_concrete_types_compatible_for_effects_interprocedural_translation_p(), c_convex_effects_on_actual_parameter_forward_translation(), and types_compatible_for_effects_interprocedural_translation_p().
entity calloc_to_abstract_location | ( | expression | n, |
expression | size, | ||
sensitivity_information * | psi | ||
) |
generate an abstract heap location entity
n | is the first argument expression of the call to calloc |
size | is the second argument expression of the call to calloc |
psi | is a pointer towards a structure which contains context and/or flow sensitivity information |
size | ize |
psi | si |
Definition at line 414 of file abstract_location.c.
References copy_expression(), free_expression(), make_op_exp(), and malloc_to_abstract_location().
TODO most of the time return same result that !effect_reference_dereferencing_p for the moment want to test if r can be a constant path for instance a[i] have to return false (something else?) a[0], a[1], i, j, a[*], var points by formal parameter (_p_0, ...), element of strut (s.id, ...), heap element have to return true.
This function is not used by the points-to analysis, but by semantics
Definition at line 1492 of file type.c.
References effect_reference_dereferencing_p(), and strict_constant_path_p().
Referenced by update_reflhs_with_rhs_to_transformer().
Definition at line 273 of file effects.c.
References cell_any_reference(), cell_gap_p, entity_abstract_location_p(), pips_assert, and reference_variable.
Referenced by cells_to_read_or_write_effects(), convex_cells_inclusion_p(), convex_cells_intersection_p(), effect_abstract_location_p(), simple_cells_inclusion_p(), simple_cells_intersection_p(), and upgrade_approximations_in_points_to_set().
API for reference.
Definition at line 77 of file effects.c.
References cell_gap_p, cell_preference, cell_reference, cell_reference_p, preference_reference, and reference_undefined.
Referenced by aliased_translation_p(), all_heap_locations_cell_p(), any_assign_to_transformer(), anywhere_cell_p(), anywhere_source_to_sinks(), array_formal_parameter_to_stub_points_to(), atomic_constant_path_p(), atomic_points_to_cell_p(), binary_intrinsic_call_to_points_to_sinks(), cell_abstract_location_p(), cell_entity(), cell_equivalent_p(), cell_included_p(), cell_indices(), cell_is_xxx_p(), cell_to_pointer_cells(), cell_typed_anywhere_locations_p(), cells_to_read_or_write_effects(), check_type_of_points_to_cells(), compute_points_to_binded_set(), compute_points_to_gen_set(), compute_points_to_kill_set(), consistent_points_to_arc_p(), convex_cell_preceding_p(), create_pointer_to_array_stub_points_to(), create_stub_points_to(), dereferencing_subscript_to_points_to(), dereferencing_to_sinks(), derived_formal_parameter_to_stub_points_to(), equal_must_vreference(), expand_points_to_domain(), expression_to_points_to_cells(), extended_source_to_sinks(), filter_formal_context_according_to_actual_context(), filter_formal_out_context_according_to_formal_in_context(), find_points_to_subscript_for_type(), formal_parameter_points_to_cell_p(), formal_source_to_sinks(), fprint_points_to_cell(), freeable_points_to_cells(), freed_list_to_points_to(), gen_may_constant_paths(), gen_may_set(), gen_must_constant_paths(), gen_must_set(), generic_apply_effects_to_transformer(), generic_atomic_points_to_cell_p(), generic_points_to_cells_translation(), generic_points_to_set_to_stub_cell_list(), generic_remove_unreachable_vertices_in_points_to_graph(), generic_stub_source_to_sinks(), generic_transform_sink_cells_from_matching_list(), generic_unary_operation_to_transformer(), global_source_to_sinks(), heap_cell_p(), io_cell_p(), k_limit_points_to(), lhs_expression_to_transformer(), list_assignment_to_points_to(), malloc_to_points_to_sinks(), max_module(), module_to_value_mappings(), new_array_elements_backward_substitution_in_transformer(), new_array_elements_forward_substitution_in_transformer(), new_filter_formal_context_according_to_actual_context(), nowhere_cell_p(), nowhere_source_to_sinks(), null_cell_p(), null_source_to_sinks(), offset_cell(), offset_points_to_cell(), opkill_may_constant_path(), opkill_may_module(), opkill_may_name(), opkill_may_vreference(), opkill_must_constant_path(), opkill_must_module(), opkill_must_name(), opkill_must_reference(), opkill_must_vreference(), pointer_arithmetic_to_points_to(), pointer_source_to_sinks(), pointer_subscript_to_expression(), points_to_anywhere_typed(), points_to_binding(), points_to_cell_add_fixed_subscripts(), points_to_cell_add_zero_subscript(), points_to_cell_complete_with_zero_subscripts(), points_to_cell_equal_p(), points_to_cell_to_number_of_unbounded_dimensions(), points_to_cell_to_string(), points_to_cell_to_type(), points_to_cell_to_upper_bound_points_to_cells(), points_to_cell_translation(), points_to_cell_types_compatibility(), points_to_cell_update_last_subscript(), points_to_cells_intersect_p(), points_to_function_projection(), points_to_reference_to_translation(), points_to_set_block_projection(), points_to_set_sharing_p(), points_to_source_projection(), points_to_source_to_translations(), points_to_translation_mapping_is_typed_p(), points_to_translation_of_formal_parameters(), points_to_with_stripped_sink(), potential_to_effective_memory_leaks(), print_points_to_cells(), process_casted_sinks(), process_casted_sources(), pv_cells_mergeable_p(), reduce_cell_to_pointer_type(), reference_to_points_to_translations(), refine_points_to_cell_subscripts(), related_points_to_cell_in_list_p(), related_points_to_cells_p(), relevant_translation_pair_p(), simple_cell_preceding_p(), simple_cell_to_convex_cell_conversion(), simple_pv_may_union(), simple_pv_must_union(), sinks_fully_matches_source_p(), source_to_sinks(), struct_assignment_to_points_to(), struct_initialization_to_points_to(), struct_reference_assignment_or_equality_to_transformer(), struct_variable_to_pointer_subscripts(), stub_points_to_cell_p(), stub_source_to_sinks(), subscript_to_points_to_sinks(), subscripted_reference_to_points_to(), substitute_stubs_in_transformer(), substitute_stubs_in_transformer_with_translation_binding(), type_compatible_super_cell(), type_compatible_with_points_to_cell_p(), typedef_formal_parameter_to_stub_points_to(), unique_location_cell_p(), user_call_to_points_to_sinks(), and variable_to_sinks().
c1 | 1 |
c2 | 2 |
Definition at line 168 of file compare.c.
References cell_gap_p, cell_reference, cell_reference_compare(), and pips_assert.
Referenced by effect_compare(), pointer_value_compare(), pv_cells_mergeable_p(), pv_cells_syntactically_equal_p(), pvs_union_combinable_p(), simple_pv_may_union(), and simple_pv_must_union().
Definition at line 57 of file effects.c.
References cell_any_reference(), cell_gap_p, entity_undefined, and reference_variable.
Referenced by abstract_pointer_value_cell_p(), convex_cells_inclusion_p(), convex_cells_intersection_p(), effect_entity(), generic_effect_find_aliases_with_simple_pointer_values(), malloc_cell_p(), pv_cells_mergeable_p(), pvs_union_combinable_p(), simple_cells_inclusion_p(), simple_cells_intersection_p(), simple_pv_may_union(), simple_pv_must_union(), and std_file_cell_p().
Has to be extended for GAPs
c1 | 1 |
c2 | 2 |
Definition at line 1234 of file effects.c.
References cell_to_reference(), and reference_variable.
Referenced by points_to_binding().
CELLS.
test if two cells are equal; cells are supposed to be references.
Has to be extended for GAPs
c1 | 1 |
c2 | 2 |
Definition at line 1226 of file effects.c.
References cell_to_reference(), and reference_equal_p().
Referenced by cell_must_point_to_nowhere_sink_in_set_p(), cell_points_to_non_null_sink_in_set_p(), cell_points_to_nowhere_sink_in_set_p(), cell_points_to_null_sink_in_set_p(), find_arc_in_points_to_set(), generic_points_to_source_to_sinks(), locations_equal_p(), node_in_points_to_path_p(), points_to_binding(), points_to_cell_in_list_p(), points_to_cell_source_projection(), points_to_cells_intersect_p(), points_to_sink_to_points_to(), points_to_sink_to_sources(), points_to_source_alias(), points_to_source_to_arcs(), remove_arcs_from_pt_map(), sink_in_set_p(), source_in_set_p(), source_subset_in_set_p(), and user_call_to_points_to_intraprocedural().
Check that memory locations denoted by cell "c1" can be reached by knowing cell "c2" and by using pointer arithmetic or subscripting.
In other words, the two cells only differ by their subscripts... Which might be reducible to "based on the same entity".
FI: experimental...
Has to be extended for GAPs
c1 | 1 |
c2 | 2 |
Definition at line 1311 of file effects.c.
References cell_any_reference(), and reference_variable.
Referenced by points_to_sink_to_sources().
Check that all memory locations denoted by cell "c1" are included in cell "c2".
Has to be extended for GAPs
c1 | 1 |
c2 | 2 |
Definition at line 1294 of file effects.c.
References cell_any_reference(), and points_to_reference_included_p().
Referenced by generic_points_to_source_to_sinks(), points_to_sink_to_sources(), and source_subset_in_set_p().
Definition at line 64 of file effects.c.
References cell_any_reference(), cell_gap_p, NIL, pips_internal_error, and reference_indices.
Referenced by c_convex_effects_on_actual_parameter_forward_translation(), generic_effect_find_aliases_with_simple_pointer_values(), simple_cells_inclusion_p(), and simple_cells_intersection_p().
How are array handled in pts? do we have arcs "a->a"?
source | ource |
pts | ts |
Definition at line 870 of file points_to.c.
References approximation_exact_p, approximation_must_p, array_type_p(), cell_equal_p(), nowhere_cell_p(), null_cell_p(), pips_assert, pointer_type_p(), points_to_approximation, points_to_cell_to_concrete_type(), points_to_sink, points_to_source, and SET_FOREACH.
Referenced by recursive_filter_formal_context_according_to_actual_context().
A set of functions called cell_points_to_xxxx(cell s, set pts) where set pts is a points-to relation set.
The definition domain of these functions is key to their use:
If both conditions are selected, the resulting definition domain is the definition domain of the mapping pts.
If a more relaxed definition domain is sometimes useful, then strict and non-strict versions of these functions should be provided, with a clear semantics for their true and false results.
Because cell s may point to one or many cells in pts, which is a relation and not a mapping, the caller may be interested in a may or must point. The information may be convened directly by using distinct function names, cell_must_points_to_xxxx or cell_may_points_to_xxxx, or by adding a pointer to a boolean, exact_p, in the function profiles, which may save time by not looping twice on pts arcs.
This can be implemented using the approximation information of the arcs in pts... if it is trusted. Or recomputed from the arcs in pts.
Flexibility is also introduced by the use of cell_equivalent_p() instead of cell_equal_p(). If the former is used, cells derived from cell s are considered when s if not a pointer. This leads to weird behaviors. For instance, if the source s is a struct, s.f1 and s.f2 will be considered. If s.f1 points to some concrete location and s.f2 points to nowhere (undefined pointer), what result should be returned? The advantage is that the caller does not have to generate s.f1 and s.f2 which are simply found in set pts. Does cell "source" points toward a non null fully defined cell in points-to set pts?
The function name is not well chosen. Something like cell_points_to_defined_cell_p()/
source | ource |
pts | ts |
Definition at line 822 of file points_to.c.
References array_type_p(), cell_equal_p(), nowhere_cell_p(), null_cell_p(), pips_assert, pointer_type_p(), points_to_cell_to_concrete_type(), points_to_sink, points_to_source, and SET_FOREACH.
Referenced by filter_formal_context_according_to_actual_context(), new_filter_formal_context_according_to_actual_context(), and recursive_filter_formal_context_according_to_actual_context().
source | ource |
pts | ts |
Definition at line 845 of file points_to.c.
References array_type_p(), cell_equal_p(), nowhere_cell_p(), null_cell_p(), pips_assert, pointer_type_p(), points_to_cell_to_concrete_type(), points_to_sink, points_to_source, and SET_FOREACH.
Referenced by recursive_filter_formal_context_according_to_actual_context().
source | ource |
pts | ts |
Definition at line 898 of file points_to.c.
References array_type_p(), cell_equal_p(), null_cell_p(), pips_assert, pointer_type_p(), points_to_cell_to_concrete_type(), points_to_sink, points_to_source, and SET_FOREACH.
Referenced by recursive_filter_formal_context_according_to_actual_context().
result
same entity, sort on indices values
not same entity, sort on entity name
sort on module name
if same module name: sort on entity local name
else: current module and top_level come first, then others in lexicographic order
pr1 | r1 |
pr2 | r2 |
Definition at line 54 of file compare.c.
References CAR, current_mod, ENDP, entity_module_name(), entity_name, entity_user_name(), EXPRESSION, expression_integer_value(), expression_syntax, expression_to_string(), free(), gen_length(), get_current_module_entity(), intptr_t, module, module_local_name(), POP, reference_indices, reference_variable, s1, same_entity_p(), strdup(), syntax_reference, syntax_reference_p, top_level_entity_p(), and unbounded_expression_p().
Referenced by cell_compare(), and compare_effect_reference().
computes the type of a cell reference representing a memory access path.
Cell references are not compatible with entity typing: spurious dimensions are added to handle struct fields and the dereferencing operator. BEWARE : does not work if field entity indices have been converted to ranks.
ref | is a reference from a cell. |
in particular, gets rid of non-store effect references
A reference to a function returns a pointer to a function of the very same time
FI: for some abstract locations that have type unknown instead of type variable, with basic overloaded
ref | ef |
to_be_freed | o_be_freed |
Definition at line 466 of file type.c.
References copy_type(), debug_off, debug_on, ENDP, entity_basic_concrete_type(), entity_name, is_basic_pointer, is_type_variable, make_basic(), make_type(), make_variable(), NIL, pips_debug, pips_internal_error, r_cell_reference_to_type(), ref, reference_indices, reference_to_string(), reference_variable, type_functional_p, type_tag, type_to_string(), type_undefined, type_unknown_p, and type_variable_p.
Referenced by cell_to_type(), formal_points_to_parameter(), multiple_pointer_assignment_to_post_pv(), points_to_reference_to_type(), and references_may_conflict_p().
list cell_relations_generic_binary_op | ( | list | l1, |
list | l2, | ||
bool(*)(cell_relation, cell_relation) | cr1_cr2_combinable_p, | ||
list(*)(cell_relation, cell_relation) | cr1_cr2_binary_op, | ||
list(*)(cell_relation) | cr1_unary_op, | ||
list(*)(cell_relation) | cr2_unary_op, | ||
list(*)(list, list) | union_op | ||
) |
beware : modifies l1, l2 and their effects
l1 | and l2 are two lists of cell_relations. |
cr1_cr2_combinable_p | is a bool function that takes two individual cell_relations as arguments and renders true when they are considered as combinable ; |
cr1_cr2_binary_op | is a binary operator that combines two individual cell_relations; |
cr1_unary_op | is a unary operators that deal with the remnants of l1, that is those cell_relations that are not combinable with any effect of l2; |
cr2_unary_op | is a unary operators that deal with the remnants of l2, that is those cell_relations that are not combinable with any effect of l1; |
we first deal with the elements of l1 : those that are combinable with the elements of l2, and the others, which we call the remnants of l1
gen_remove(&l2, EFFECT(CAR(l_cr2)));
cr1 belongs to the remnants of l1 : it is combinable with no effects of l2
we must then deal with the remnants of l2
no memory leaks: l1 and l2 won't be used anymore
l1 | 1 |
l2 | 2 |
Definition at line 59 of file cell_relations.c.
References CAR, CDR, CELL_RELATION, cell_relation_undefined, debug_off, debug_on, ENDP, free(), free_cell_relation(), gen_free_list(), gen_nconc(), list_undefined, NIL, pips_debug, pips_debug_pv, pips_debug_pvs, and POP.
Referenced by simple_pvs_may_union(), and simple_pvs_must_union().
If the reference in "c" is not a pointer, see if it can be transformed into a pointer reference by adding subscripts, field subscripts or a combination of both...
The "children" list is built with new cells. No sharing is created between "c" and "children".
Definition at line 1739 of file effects.c.
References cell_any_reference(), ENDP, NIL, pips_assert, recursive_cell_to_pointer_cells(), and reference_indices.
FI: probably to be moved elsewhere in ri-util.
Here, we only know how to cope (for the time being) with cell_reference and cell_preference, not with cell_gap and other future fields. A bit safer than macro cell_any_reference().
Definition at line 1326 of file effects.c.
References cell_preference, cell_preference_p, cell_reference, cell_reference_p, pips_internal_error, preference_reference, and reference_undefined.
Referenced by cell_entity_equal_p(), cell_equal_p(), cell_out_of_scope_p(), compute_points_to_kill_set(), first_cell_certainly_includes_second_cell_p(), formal_points_to_parameter(), generic_eval_cell_with_points_to(), generic_reference_to_points_to_matching_list(), generic_transform_sink_cells_from_matching_list(), location_entity(), points_to_cell_name(), points_to_cell_translation(), points_to_compare_cell(), points_to_compare_cells(), points_to_compare_location(), points_to_compare_ptr_cell(), points_to_name(), points_to_rank(), points_to_set_block_projection(), points_to_source_projection(), print_or_dump_points_to(), and word_points_to().
to_be_freed | o_be_freed |
Definition at line 513 of file type.c.
References cell_gap_p, cell_preference, cell_reference, cell_reference_p, cell_reference_to_type(), pips_assert, preference_reference, and ref.
Referenced by cell_to_nowhere_sink(), external_call_to_post_pv(), generic_stub_source_to_sinks(), k_limit_points_to(), module_initial_parameter_pv(), safe_intrinsic_to_post_pv(), struct_assignment_to_points_to(), type_compatible_super_cell(), and type_compatible_with_points_to_cell_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().
cl | l |
Definition at line 763 of file points_to.c.
References CELL, ENDP, FOREACH, nowhere_cell_p(), null_cell_p(), and pips_assert.
Referenced by intrinsic_call_condition_to_points_to().
cl | l |
Definition at line 750 of file points_to.c.
References CELL, ENDP, FOREACH, null_cell_p(), and pips_assert.
Referenced by intrinsic_call_condition_to_points_to().
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().
void close_pt_to_list | ( | void | ) |
int compare_effect_reference(e1, e2):
returns -1 if "e1" is before "e2" in the alphabetic order, else +1. "e1" and "e2" are pointers to effect, we compare the names of their reference's entity.
e1 | 1 |
e2 | 2 |
Definition at line 210 of file compare.c.
References cell_reference_compare(), and effect_any_reference.
Referenced by create_step_regions(), and internal_compute_distribution_context().
int compare_effect_reference_in_common(e1, e2):
returns -1 if "e1" is before "e2" in the alphabetic order, else +1. "e1" and "e2" are pointers to effect, we compare the names of their reference's entity with the common name in first if the entity belongs to a common
e1 | 1 |
e2 | 2 |
Definition at line 224 of file compare.c.
References effect_any_reference, entity_and_common_name(), entity_in_common_p(), entity_name, free(), reference_variable, and strdup().
bool compatible_points_to_subscripts_p | ( | expression | s1, |
expression | s2 | ||
) |
Two subscript are compatible if they are equal or if one of them is unbounded.
In the ponts-to context s1 and s2 should be either integer constants or field references.
s1 | 1 |
s2 | 2 |
Definition at line 1041 of file points_to.c.
References expression_equal_p(), s1, and unbounded_expression_p().
Referenced by points_to_cell_translation().
Add a set of zero subscripts to a constant memory path reference "r" by side effect.
Used when a partial array reference must be converted into a reference to the first array element (zero_p==true) or to any element (zero_p==false).
The difficulty lies with field subscripts...
Find the current number of effective subscripts: is there a field subscript somewhere?
FI: this may happen when reference "r" is not a constant memory path
zero_p | ero_p |
Definition at line 696 of file points_to.c.
References CONS, entity_basic_concrete_type(), EXPRESSION, expression_reference(), f(), field_expression_p(), FOREACH, gen_length(), gen_nconc(), gen_nreverse(), int, int_to_expression(), make_unbounded_expression(), NIL, pips_assert, reference_indices, reference_variable, type_undefined, type_variable, and variable_dimensions.
Referenced by complete_points_to_reference_with_zero_subscripts().
void complete_points_to_reference_with_zero_subscripts | ( | reference | r | ) |
Definition at line 745 of file points_to.c.
References complete_points_to_reference_with_fixed_subscripts().
Referenced by dereferencing_subscript_to_points_to(), process_casted_sinks(), process_casted_sources(), and subscript_to_points_to_sinks().
A constant memory access path may not be considered.
An undefined entity is returned and the caller must handle the issue.
This occurs, for instance, in the semantics analysis when a wider memory effect contain this constant path. E.g. an untyped anwyhere effect.
It also happens when the caller consider a[*] as a constant reference. It is a constant set of references and no entity is returned.
cp | p |
Definition at line 329 of file locations.c.
References constant_memory_access_path_to_location_name(), constant_reference_to_normalized_constant_reference(), cp, entity_undefined, entity_undefined_p, free(), free_reference(), gen_find_entity(), and reference_undefined_p.
Referenced by apply_concrete_effect_to_transformer(), assign_rhs_to_cp_to_transformer(), forward_substitute_array_location_in_transformer(), generic_apply_effect_to_transformer(), generic_effects_maymust_read_or_write_scalar_entity_p(), generic_reference_to_transformer(), generic_unary_operation_to_transformer(), lhs_expression_to_transformer(), new_array_element_backward_substitution_in_transformer(), perform_array_element_substitutions_in_transformer(), pointer_unary_operation_to_transformer(), substitute_struct_stub_in_transformer(), substitute_stubs_in_transformer(), substitute_stubs_in_transformer_with_translation_binding(), transformer_apply_field_assignments_or_equalities(), transformer_apply_unknown_field_assignments_or_equalities(), and update_cp_with_rhs_to_transformer().
check that the subscript list il is either empty or made of integers or fields.
sl | l |
Definition at line 1272 of file points_to.c.
References constant_p(), entity_field_p(), EXPRESSION, expression_syntax, extended_integer_constant_expression_p(), f(), FOREACH, reference_variable, syntax_reference, and syntax_reference_p.
points_to_list delete_pt_to_list | ( | statement | ) |
eff | ff |
Definition at line 280 of file effects.c.
References cell_abstract_location_p(), and effect_cell.
Referenced by effect_may_union(), effect_must_union(), effects_abstract_location_p(), and region_union().
action_kind effect_action_kind | ( | effect | eff | ) |
eff | ff |
Definition at line 1055 of file effects.c.
References action_to_action_kind(), and effect_action.
Referenced by entity_written_p(), functionnal_on_effects(), no_write_effects_on_var(), and some_conflicts_between().
Can we merge these two effects because they are equal or because they only differ by their approximations and their descriptors?
Check the subscript lists because p and p[0] do not refer the same memory locations at all
e1 | 1 |
e2 | 2 |
Definition at line 587 of file effects.c.
References action_equal_p(), CAR, effect_action, effect_any_reference, ENDP, EXPRESSION, expression_equal_p(), gen_length(), list_undefined, POP, reference_indices, and reference_variable.
Referenced by concerned_entity_p(), and step_get_comparable_effects().
Compares two effects for sorting.
The first criterion is based on names. Local entities come first; then they are sorted according to the lexicographic order of the module name, and inside each module name class, according to the local name lexicographic order. Then for a given entity name, a read effect comes before a write effect. It is assumed that there is only one effect of each type per entity. bc.
same paths, sort on action, reads first
peff1 | eff1 |
peff2 | eff2 |
Definition at line 187 of file compare.c.
References cell_compare(), effect_cell, and effect_read_p.
cproto-generated files
effects.c
cproto-generated files
Apvrille, april 11th, 1994 functions related to types effects and effect, cell, reference and gap include"mapping.h" functions for entity
Definition at line 52 of file effects.c.
References cell_entity(), and effect_cell.
Referenced by add_conflicts(), check_loop_distribution_feasability(), code_has_write_eff_ref_p(), convex_effect_to_constant_path_effects_with_pointer_values(), effect_may_union(), effect_must_union(), effects_read_variable_p(), effects_write_variable_p(), expr_has_write_eff_ref_p(), free_to_post_pv(), generic_effect_find_aliases_with_simple_pointer_values(), guard_expanded_statement_if_needed(), interference_on(), loop_variant_list(), malloc_effect_p(), pushnew_conflict(), region_union(), same_reg(), same_reg_ignore_action(), simple_effect_to_constant_path_effects_with_pointer_values(), stat_has_write_eff_ref_p(), std_file_effect_p(), step_get_comparable_effects(), text_comp_regions(), true_dependence_with_entity_p(), and update_sesam_tasks_buffers().
entity effect_field_dimension_entity | ( | expression | exp, |
list | l_fields | ||
) |
type.c
exp | is an effect index expression which is either the rank or an entity corresponding to a struct, union or enum field |
l_fields | is the list of fields of the corresponding struct, union or enum |
exp | xp |
l_fields | _fields |
Definition at line 51 of file type.c.
References ENTITY, exp, expression_constant_p(), expression_to_entity(), expression_to_int(), gen_nth(), and rank.
Referenced by effect_indices_first_pointer_dimension_rank().
Modifies effect eff1 to make sure that any memory state modification abstracted by eff2 preserves the correctness of eff1: all memory locations included in eff1 at input are included in the memory locations abstracted by the new eff1 after the abstract state transition.
FI: seems to extend naturally to new kinds of effects...
default value
nothing to worry about
pointer-dependence write, indexed or not
The base address for the write is constant, the indices should be be checked
The write effect is a direct effet, the other effect may be direct or indirect, indexed or not.
FI: should be very similar to reference_with_store_independent_indices()?
Does the write impact some indices of the read?
May be shared because of persistant references
eff1 | ff1 |
eff2 | ff2 |
Definition at line 863 of file effects.c.
References action_write_p, anywhere_effect_p(), CAR, effect_action, effect_any_reference, effect_consistent_p(), effect_to_pointer_store_independent_effect(), effect_to_store_independent(), ENDP, entity_type, EXPRESSION, EXPRESSION_, expression_to_reference_list(), ifdebug, list_undefined, make_unbounded_expression(), NIL, pips_assert, pips_debug, pointer_type_p(), POP, REFERENCE, reference_indices, reference_variable, store_independent_effect_p(), and ultimate_type().
Check if some references might be freed with the effects.
This may lead to disaster if the references are part of another PIPS data structure. This information is not fully accurate, but conservative.
The free is very likely to be unsafe
Is it a possible C reference or is it a synthetic reference generated by the effect analysis? Hard to decide...
el | l |
Definition at line 1159 of file effects.c.
References cell_reference, cell_reference_p, EFFECT, effect_cell, ENDP, FOREACH, and reference_indices.
Referenced by safe_any_expression_to_transformer().
Debugging.
el | l |
Definition at line 1340 of file effects.c.
References EFFECT, effect_consistent_p(), and FOREACH.
Test if an effect has a non local effect.
[in] | eff | is the effect to analyse |
eff | ff |
Definition at line 674 of file effects.c.
References effect_any_reference, entity_module_name(), get_current_module_name(), reference_variable, and same_string_p.
Referenced by effects_on_non_local_variable_p().
ref | is an effect reference |
exact_p | is a pointer to a bool, which is set to true if the result is not an approximation. |
ref | ef |
exact_p | xact_p |
Definition at line 219 of file type.c.
References effect_reference_first_pointer_dimension_rank(), and ref.
ref | is an effect reference |
exact_p | is a pointer to a bool, which is set to true if the result is not an approximation. |
FI: ANY_MODULE:ANYWHERE should not be indexed because any indexing can be eliminated as it results in ANY_MODULE:ANYWHERE
FI: ANY_MODULE:ANYWHERE_b0, 1, 2 should not be indexed because any indexing can be eliminated and the reference replaced by a non-indexed reference to ANY_MODULE:ANYWHERE_bi , j, k depending on the type of the reference.
no dereferencement if scalar reference, in particular, gets rid of non store effect references
ref | ef |
exact_p | xact_p |
Definition at line 233 of file type.c.
References effect_reference_first_pointer_dimension_rank(), ENDP, entity_abstract_location_p(), entity_all_locations_p(), entity_typed_anywhere_locations_p(), gen_length(), int, pips_internal_error, ref, reference_indices, and reference_variable.
Referenced by can_be_constant_path_p(), convex_effect_to_constant_path_effects_with_pointer_values(), convex_effect_to_constant_path_effects_with_points_to(), effect_to_constant_path_effects_with_points_to(), generic_eval_cell_with_points_to(), references_may_conflict_p(), and simple_effect_to_constant_path_effects_with_pointer_values().
ref | ef |
Definition at line 155 of file prettyprint.c.
References effect_words_reference(), ref, and words_to_string().
Referenced by check_type_of_points_to_cells(), generic_eval_cell_with_points_to(), generic_transform_sink_cells_from_matching_list(), list_assignment_to_points_to(), offset_cell(), points_to_cell_to_string(), reference_dereferencing_to_points_to(), reference_to_points_to_sinks(), references_may_conflict_p(), and references_must_conflict_p().
eff | ff |
Definition at line 567 of file effects.c.
References effect_any_reference, ENDP, entity_type, pointer_type_p(), reference_indices, reference_variable, and type_depth().
Referenced by atomic_effect_p(), effect_may_union(), effect_must_union(), first_effect_certainly_includes_second_effect_p(), first_exact_scalar_effect_certainly_includes_second_effect_p(), kill_effects(), and proper_to_summary_simple_effect().
Returns the entity corresponding to the mutation.
It could be called effect_to_variable(), but effects are sometimes summarized with abstract locations, i.e. sets of locations.
FI unlikely to work with GAPs
ef | f |
Definition at line 1413 of file effects.c.
References effect_any_reference, and reference_variable.
Referenced by add_conflicts().
Modify eff so that the set of memory locations decribed after a write to some non pointer variable is still in the abstract location set of eff.
\n_eff i = ...; \ eff of stmt s: p[j], q[i],.. s;
eff | ff |
Definition at line 844 of file effects.c.
References effect_any_reference, and reference_with_store_independent_indices().
Modify eff so that the set of memory locations decribed after a write to some pointer p is still in the abstract location set of eff.
\n_eff p = ...; \ eff of stmt s s;
If p is undefined, assumed that any pointer may have been updated.
As a pointer could be used in indexing, the current implementation is not correct/sufficient
p[i][j] cannot be preserved
No problem: direct scalar reference
eff | ff |
Definition at line 815 of file effects.c.
References anywhere_effect(), copy_action(), effect_action, effect_any_reference, ENDP, entity_undefined_p, free_effect(), reference_indices, and reference_variable.
Referenced by effect_interference().
eff | ff |
Definition at line 772 of file effects.c.
References anywhere_effect(), CAR, copy_action(), effect_action, effect_any_reference, ENDP, entity_type, EXPRESSION, EXPRESSION_, extended_integer_constant_expression_p(), free_effect(), free_expression(), list_undefined, make_unbounded_expression(), pointer_type_p(), POP, reference_indices, reference_variable, ultimate_type(), and unbounded_expression_p().
Referenced by effect_interference().
prettyprint.c
prettyprint.c
of string
obj | bj |
Definition at line 68 of file prettyprint.c.
References attach_reference_to_word_list(), CAR, CDR, CHAIN_SWORD, ENDP, entity_and_common_name(), entity_field_p(), entity_in_common_p(), entity_minimal_name(), entity_name, EXPRESSION, expression_syntax, gen_last(), gen_nconc(), get_bool_property(), get_prettyprint_language_tag(), is_language_c, is_language_fortran, is_language_fortran95, NIL, pips_internal_error, POP, reference_indices, reference_variable, STRING, string_undefined, syntax_reference, syntax_reference_p, and Words_Expression().
Referenced by conflicts_sort_callback(), effect_reference_first_pointer_dimension_rank(), effect_reference_to_string(), make_filtered_dg_or_dvdg(), prettyprint_dependence_graph(), prettyprint_dot_dependence_graph(), text_pointer_value(), text_points_to_relation(), text_region_no_action(), words_pointer_value(), and words_points_to().
Returns true if at least one effect of effect list el is related to an abstract location.
el | l |
Definition at line 288 of file effects.c.
References EFFECT, effect_abstract_location_p(), and FOREACH.
Referenced by statement_to_transformer().
Check that all effects in el are read effects.
el | l |
Definition at line 1141 of file effects.c.
References action_write_p, EFFECT, effect_action, and FOREACH.
Referenced by regenerate_call().
Two effects interfere if one of them modify the set of locations defined by the other one.
For instance, an index or a pointer may be used by one effect and changed by the other one.
If a subscript expression is changed, the corresponding subscript must be replaced by an unbounded expression.
If a pointer is written, any indirect effect thru this pointer must be changed into a read or write anywhere.
This function is conservative: it is always correct to declare an interference.
FI: I'm not sure what you can do when you know two effects interfere...
dealing with standard effects
start with complex cases
The write effect is a direct effet, the other effect may be direct or indirect, indexed or not.
Does the write impact the indices of the read?
eff1 | ff1 |
eff2 | ff2 |
Definition at line 714 of file effects.c.
References action_write_p, anywhere_effect_p(), effect_action, effect_any_reference, entity_undefined, EXPRESSION, expression_to_reference_list(), list_undefined, MAP, NIL, REFERENCE, reference_indices, reference_undefined, reference_variable, and store_independent_effect_p().
Test if a list of effects concerns non local variables.
[in] | effects | is the effect list to scan |
Definition at line 687 of file effects.c.
References EFFECT, effect_on_non_local_variable_p(), and FOREACH.
el | l |
Definition at line 1123 of file effects.c.
References action_read_p, EFFECT, effect_action, effect_entity(), entities_may_conflict_p(), FOREACH, and store_effect_p().
Referenced by entity_used_somewhere_walker(), graph_to_live_writes(), loop_annotate(), and vertex_to_chains().
efs | fs |
Definition at line 209 of file effects.c.
References effects_effects.
Referenced by add_classes_for_this_callee(), add_common_variables_to_hash_table(), check_call_mode_consistency(), do_check_isolate_statement_preconditions_on_call(), effectsmap_to_listmap(), generic_module_name_to_transformers(), in_alias_pairs(), in_regions_of_external(), load_summary_effects(), module_name_to_total_preconditions(), out_alias_pairs(), print_crough(), program_precondition(), regions_of_external(), regions_to_loops(), and remove_common_variables_from_hash_table().
el | l |
Definition at line 1108 of file effects.c.
References action_write_p, EFFECT, effect_action, FOREACH, and store_effect_p().
el | l |
Definition at line 1091 of file effects.c.
References action_write_p, EFFECT, effect_action, effect_entity(), entities_may_conflict_p(), FOREACH, and store_effect_p().
Referenced by block_to_complexity(), graph_to_live_writes(), prune_non_constant(), and vertex_to_chains().
statement_mapping effectsmap_to_listmap | ( | statement_mapping | efs_map | ) |
efs_map | fs_map |
Definition at line 228 of file effects.c.
References effects_to_list(), hash_put(), MAKE_STATEMENT_MAPPING, and STATEMENT_MAPPING_MAP.
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 | ) |
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().
FI: Beware, the symbol table is updated but this is not reflected in pipsmake.rc
We need to keep track of these pseudo-variables to destroy them before a module is reanalyzed after a code transformation, for instance a constant propagation that changed dependent types into cosntant types.
We might be in trouble, unless a piece of code is reanalyzed. Let's assume the type is unchanged
stmt_number | tmt_number |
Definition at line 78 of file abstract_location.c.
References ABSTRACT_LOCATION, add_C_variable_to_area(), AddEntityToDeclarations(), array_type_p(), asprintf, basic_equal_p(), compute_basic_concrete_type(), copy_type(), DYNAMIC_RAM_OFFSET, entity_initial, entity_kind, entity_storage, entity_type, f(), FindOrCreateEntity(), free(), free_type(), gen_length(), get_current_module_entity(), get_current_module_name(), HEAP_AREA_LOCAL_NAME, int, make_ram(), make_storage_ram(), make_value_unknown(), module_to_heap_area(), NIL, pips_assert, pointer_type_p(), type_equal_p(), type_to_pointed_type(), type_undefined_p, type_variable, variable_basic, and variable_dimensions.
Referenced by malloc_type_to_abstract_location().
Definition at line 147 of file abstract_location.c.
References ANYWHERE_LOCATION, entity_local_name(), HEAP_AREA_LOCAL_NAME, and pips_debug.
Referenced by convex_cells_inclusion_p(), convex_cells_intersection_p(), free_to_post_pv(), generic_transform_sink_cells_from_matching_list(), references_may_conflict_p(), simple_cells_inclusion_p(), and simple_cells_intersection_p().
Amira Mensi 2010
File: abstract_location.c
This file contains various useful functions to modelize a heap. check if an entity b may represent a bucket or a set of buckets in the heap.
Definition at line 64 of file abstract_location.c.
References entity_all_heap_locations_p(), entity_all_module_heap_locations_p(), entity_local_name(), HEAP_AREA_LOCAL_NAME, and heap_area_p().
Referenced by analyzable_scalar_entity_p(), cell_out_of_scope_p(), cells_to_read_or_write_effects(), clean_up_points_to_stubs(), generic_atomic_points_to_reference_p(), generic_eval_cell_with_points_to(), generic_remove_unreachable_vertices_in_points_to_graph(), module_to_value_mappings(), points_to_reference_to_typed_index(), and semantics_usable_points_to_reference_p().
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 1071 of file effects.c.
References action_kind_environment_p, action_read, action_read_p, action_write, and effect_action.
Referenced by find_effect_actions_for_entity().
void error_reset_pt_to_list | ( | void | ) |
See if the subscript list sl is precise, i.e.
if is does not contain any unbounded expression.
It is assumed that it is a points-to subscript list. Each subscript is either an integer constant, or a field reference or an unbounded expression.
This function may have been defined several times...
sl | l |
Definition at line 1027 of file points_to.c.
References EXPRESSION, FOREACH, and unbounded_expression_p().
bool field_reference_expression_p | ( | expression | e | ) |
Check if expression "e" is a reference to a struct field.
Definition at line 224 of file points_to.c.
References entity_field_p(), expression_syntax, f(), reference_variable, syntax_reference, and syntax_reference_p.
Referenced by points_to_array_reference_p(), points_to_array_reference_to_type(), points_to_reference_to_final_dimension(), points_to_reference_update_final_subscripts(), and reduce_cell_to_pointer_type().
ref | ef |
Definition at line 536 of file effects.c.
References basic_derived, basic_derived_p, basic_pointer, basic_pointer_p, entity_basic_concrete_type(), entity_user_name(), pips_debug, ref, reference_variable, same_string_p, string_of_type(), type_variable, type_variable_p, and variable_basic.
Referenced by create_step_regions().
Find the subscript in the reference of cell "c" that would make the reference type be "t" if the subscript list were truncated just after it.
Select the longest possible subscript list.
Core dump if it is not possible.
No smart implementation: trial and error (probably already implemented somewhere else.
Let's try to add a zero subscript instead...
For the time being, no need to restore the reference in case of failure.
Definition at line 1274 of file type.c.
References array_pointer_type_equal_p(), cell_any_reference(), CONS, ENDP, EXPRESSION, free_reference(), gen_copy_seq(), gen_nconc(), gen_nreverse(), list_undefined, make_reference(), make_zero_expression(), NIL, pips_internal_error, points_to_reference_to_concrete_type(), POP, reference_indices, and reference_variable.
Referenced by offset_points_to_cell().
Definition at line 99 of file points_to.c.
References cell_any_reference(), formal_parameter_p(), and reference_variable.
Referenced by points_to_to_context_points_to().
void fprint_points_to_cell | ( | FILE * | , |
cell | |||
) |
ac | c |
Definition at line 969 of file effects.c.
References action_kind_environment_p, action_kind_store_p, action_kind_type_declaration_p, action_read, action_read_p, action_write, and string_undefined.
Referenced by conflicts_sort_callback(), prettyprint_dependence_graph(), and prettyprint_dot_dependence_graph().
ac | c |
Definition at line 943 of file effects.c.
References action_kind_environment_p, action_kind_store_p, action_kind_type_declaration_p, action_read, action_read_p, action_write, and string_undefined.
Is it a unique concrete memory location?
If strict_p, stubs are not considered atomic, as is the case in an interprocedural setting since they can be associated to several cells in the caller frame.
Else, stubs are not considered non atomic per se.
strict_p | trict_p |
Definition at line 452 of file points_to.c.
References cell_any_reference(), generic_atomic_points_to_reference_p(), and null_cell_p().
Referenced by add_implicitly_killed_arcs_to_kill_set(), freed_list_to_points_to(), list_assignment_to_points_to(), and upgrade_approximations_in_points_to_set().
Is it a unique concrete memory location?
No, if it is a reference to an abstract location.
No, if the subscripts include an unbounded expression.
Very preliminary version. One of the keys to Amira Mensi's work.
More about stubs: a stub is not NULL but there is no information to know if they represent one address or a set of addresses. Unless the intraprocedural points-to analysis is performed for each combination of atomic/non-atomic stub, safety implies that stub-based references are not atomic (strict_p=true). In some other cases, you know that a stub does represent a unique location (strict_p=false).
Note: it is assumed that the reference is a points-to reference. All subscripts are constants, field references or unbounded expressions.
Note: FI, I have a probleme when calling this function from a proper effects environment. In that case, stubs might be assumed to be unique memory locations. The exactness information can be derived from the numer of targets in the matching list.
Note 2: FI, I do not understand why the type of the reference is not taken into account.
strict_p | trict_p |
Definition at line 489 of file points_to.c.
References entity_anywhere_locations_p(), entity_heap_location_p(), entity_null_locations_p(), entity_stub_sink_p(), entity_typed_anywhere_locations_p(), entity_typed_nowhere_locations_p(), EXPRESSION, expression_range_p(), FOREACH, reference_indices, reference_variable, and unbounded_expression_p().
Referenced by analyzed_reference_p(), atomic_points_to_reference_p(), create_values_for_simple_effect(), generic_atomic_points_to_cell_p(), generic_transform_sink_cells_from_matching_list(), and substitute_stubs_in_transformer_with_translation_binding().
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().
statement_points_to get_pt_to_list | ( | void | ) |
Any heap cell, more or less abstract or typed.
Definition at line 420 of file effects.c.
References cell_any_reference(), entity_local_name(), HEAP_AREA_LOCAL_NAME, and reference_variable.
Referenced by binary_intrinsic_call_to_points_to_sinks(), compute_points_to_binded_set(), compute_points_to_gen_set(), compute_points_to_kill_set(), freeable_points_to_cells(), freed_list_to_points_to(), freed_pointer_to_points_to(), list_assignment_to_points_to(), memory_leak_to_more_memory_leaks(), points_to_cell_translation(), points_to_cell_types_compatibility(), points_to_function_projection(), points_to_set_block_projection(), points_to_source_projection(), points_to_with_stripped_sink(), remove_points_to_cell(), and unique_location_cell_p().
ac | c |
Definition at line 391 of file effects.c.
References effect_undefined, entity_local_name(), entity_name, entity_undefined_p, FindEntity(), HEAP_AREA_LOCAL_NAME, make_approximation_may(), make_cell_reference(), make_descriptor_none(), make_effect(), make_reference(), NIL, and pips_internal_error.
Definition at line 408 of file effects.c.
References effect_any_reference, entity_local_name(), HEAP_AREA_LOCAL_NAME, reference_variable, and same_string_p.
void init_pt_to_list | ( | void | ) |
Definition at line 506 of file effects.c.
References cell_any_reference(), io_effect_entity_p(), and reference_variable.
Definition at line 496 of file effects.c.
References io_luns_entity_p().
Referenced by io_cell_p(), io_effect_p(), io_efficient_compile(), pure_function_p(), and safe_effects_for_reductions().
Definition at line 501 of file effects.c.
References effect_any_reference, io_effect_entity_p(), and reference_variable.
Referenced by create_step_regions(), do_check_isolate_statement_preconditions_on_call(), effects_to_dma(), guard_expanded_statement_if_needed(), io_effects_p(), and potential_out_effects_p().
Definition at line 512 of file effects.c.
References EFFECT, FOREACH, and io_effect_p().
weight function for Pvecteur passed as argument to sc_lexicographic_sort in prettyprint functions involving cell descriptors.
The strange argument type is required by qsort(), deep down in the calls. This function is an adaptation of is_inferior_pvarval in semantics
The constant term is given the highest weight to push constant terms at the end of the constraints and to make those easy to compare. If not, constant 0 will be handled differently from other constants. However, it would be nice to give constant terms the lowest weight to print simple constraints first...
Either I define two comparison functions, or I cheat somewhere else. Let's cheat?
pvarval1 | varval1 |
pvarval2 | varval2 |
Definition at line 305 of file compare.c.
References entity_name, term_cst, variable_phi_p, and vecteur_var.
Referenced by text_pointer_value(), and text_points_to_relation().
Future API for GAP, Generic Access Path.
list-effects conversion functions
l_eff | _eff |
Definition at line 202 of file effects.c.
References make_effects().
Referenced by listmap_to_effectsmap().
statement_mapping listmap_to_effectsmap | ( | statement_mapping | l_map | ) |
l_map | _map |
Definition at line 216 of file effects.c.
References hash_put(), list_to_effects(), MAKE_STATEMENT_MAPPING, and STATEMENT_MAPPING_MAP.
points_to_list load_pt_to_list | ( | statement | ) |
Referenced by convex_effect_to_constant_path_effects_with_points_to(), effect_to_constant_path_effects_with_points_to(), get_points_to_graph_from_statement(), and statement_to_points_to().
le | e |
Definition at line 360 of file locations.c.
References entity_initial, entity_module_name(), entity_undefined_p, entity_user_name(), value_reference_p, and value_undefined_p.
Referenced by clean_up_points_to_stubs().
le | e |
Definition at line 349 of file locations.c.
References entity_initial, entity_undefined_p, value_reference_p, and value_undefined_p.
Referenced by entities_maymust_conflict_p(), generic_effects_maymust_read_or_write_scalar_entity_p(), generic_reference_to_transformer(), module_to_value_mappings(), points_to_cells_parameters(), transformer_formal_parameter_projection(), and value_passing_summary_transformer().
action make_action_read_memory | ( | void | ) |
Definition at line 1017 of file effects.c.
References make_action_kind_store(), and make_action_read().
Referenced by c_convex_effects_on_formal_parameter_backward_translation(), call_to_post_pv(), cells_to_read_or_write_effects(), check_for_effected_statement(), create_step_regions(), expression_to_post_pv(), live_out_paths_from_loop_to_body(), and real_regions_forward_translation().
action make_action_write_memory | ( | void | ) |
To ease the extension of action with action_kind.
Definition at line 1011 of file effects.c.
References make_action_kind_store(), and make_action_write().
Referenced by array_must_fully_written_by_regions_p(), c_convex_effects_on_actual_parameter_forward_translation(), c_convex_effects_on_formal_parameter_backward_translation(), cells_to_read_or_write_effects(), check_for_effected_statement(), convex_cell_reference_preceding_p(), create_step_regions(), expression_to_post_pv(), external_call_to_post_pv(), forloop_to_post_pv(), free_to_post_pv(), generic_effect_find_aliases_with_simple_pointer_values(), generic_eval_cell_with_points_to(), generic_transform_sink_cells_from_matching_list(), heap_intrinsic_to_post_pv(), loop_initialization_to_transformer(), loop_to_post_pv(), module_initial_parameter_pv(), multiple_pointer_assignment_to_post_pv(), safe_intrinsic_to_post_pv(), simple_reference_to_convex_reference_conversion(), single_pointer_assignment_to_post_pv(), summary_to_proper_reference(), use_default_sink_cell(), and whileloop_to_post_pv().
cell_relation make_address_of_pointer_value | ( | cell | c1, |
cell | c2, | ||
tag | app_tag, | ||
descriptor | d | ||
) |
c1 | 1 |
c2 | 2 |
app_tag | pp_tag |
Definition at line 142 of file pointer_values.c.
References make_approximation(), make_cell_interpretation_address_of(), make_cell_interpretation_value_of(), make_cell_relation(), make_interpreted_cell(), and UU.
Referenced by make_anywhere_anywhere_pvs(), make_simple_pv_from_simple_effects(), module_initial_parameter_pv(), simple_pv_may_union(), simple_pv_must_union(), and simple_pv_translate().
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().
Function storing points to information attached to a statement.
Generate a global variable holding a statement_points_to, a mapping from statements to lists of points-to arcs. The variable is called "pt_to_list_object".
The macro also generates a set of functions used to deal with this global variables.
The functions are defined in newgen_generic_function.h:
set_pt_to_list(o)
store_pt_to_list(k, v)
update_pt_to_list(k, v)
load_pt_to_list(k)
delete_pt_to_list(k)
bound_pt_to_list_p(k)
store_or_update_pt_to_list(k, v) Functions specific to points-to analysis
Definition at line 87 of file points_to.c.
References ANYWHERE_LOCATION, entity_all_locations(), entity_all_xxx_locations_typed(), entity_undefined, get_bool_property(), make_cell_reference(), make_reference(), and NIL.
Referenced by anywhere_source_to_sinks(), assignment_to_points_to(), gen_may_set(), gen_must_set(), list_assignment_to_points_to(), points_to_cells_minimal_upper_bound(), process_casted_sinks(), process_casted_sources(), semantics_expression_to_points_to_sinks(), and source_to_sinks().
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().
Add the new entity to the module declarations
cp | p |
Definition at line 274 of file locations.c.
References code_declarations, CONS, constant_memory_access_path_to_location_name(), constant_reference_to_normalized_constant_reference(), copy_storage(), copy_type(), cp, ENTITY, entity_initial, entity_module_name(), entity_name, entity_storage, entity_undefined_p, free_reference(), gen_find_entity(), make_entity, make_value_reference(), module_name_to_entity(), pips_internal_error, points_to_reference_to_concrete_type(), reference_variable, strdup(), value_code, and value_code_p.
Referenced by add_inter_or_intraprocedural_field_entities(), add_reference_values(), and module_to_value_mappings().
cell make_null_pointer_value_cell | ( | void | ) |
Definition at line 93 of file pointer_values.c.
References make_cell_reference(), make_reference(), NIL, and null_pointer_value_entity().
Referenced by call_to_post_pv(), expression_to_post_pv(), null_to_sinks(), pointer_formal_parameter_to_stub_points_to(), and reference_condition_to_points_to().
sensitivity_information make_sensitivity_information | ( | statement | current_stmt, |
entity | current_module, | ||
list | enclosing_flow | ||
) |
current_stmt | urrent_stmt |
current_module | urrent_module |
enclosing_flow | nclosing_flow |
Definition at line 522 of file abstract_location.c.
References sensitivity_information::current_module, current_module, current_stmt, sensitivity_information::current_stmt, and sensitivity_information::enclosing_flow.
Referenced by flow_sensitive_malloc_to_points_to_sinks(), heap_intrinsic_to_post_pv(), and original_malloc_to_abstract_location().
cell make_undefined_pointer_value_cell | ( | void | ) |
Definition at line 62 of file pointer_values.c.
References make_cell_reference(), make_reference(), NIL, and undefined_pointer_value_entity().
Referenced by expression_to_post_pv(), free_to_post_pv(), make_simple_pv_from_simple_effects(), and pointer_values_remove_var().
cell_relation make_value_of_pointer_value | ( | cell | c1, |
cell | c2, | ||
tag | app_tag, | ||
descriptor | d | ||
) |
c1 | 1 |
c2 | 2 |
app_tag | pp_tag |
Definition at line 129 of file pointer_values.c.
References cell_relation_undefined, make_approximation(), make_cell_interpretation_value_of(), make_cell_relation(), make_interpreted_cell(), null_pointer_value_cell_p(), undefined_pointer_value_cell_p(), and UU.
Referenced by kill_pointer_value(), make_simple_pv_from_simple_effects(), and simple_pv_translate().
type malloc_arg_to_type | ( | expression | e | ) |
generate the type of the allocated area from the malloc argument
e | is the malloc argument expression |
Store dependent types are not generated. It means that whenever the size of the allocated space is store dependent, the returned type is an array of unbounded_dimension.
which one is the sizeof operator ? try the second one first
sizeofexpression is an expression
Definition at line 187 of file abstract_location.c.
References call_arguments, call_function, CAR, cast_expression, CDR, CONS, copy_basic(), copy_expression(), DEFAULT_CHARACTER_TYPE_SIZE, DIMENSION, entity_local_name(), EXPRESSION, expression_constant_p(), expression_syntax, expression_to_string(), expression_to_type(), expression_undefined, expression_undefined_p, free_expression(), free_type(), gen_full_copy_list(), int_to_expression(), make_basic_int(), make_dimension(), make_op_exp(), make_type_variable(), make_unbounded_expression(), make_variable(), MULTIPLY_OPERATOR_NAME, NIL, pips_assert, pips_debug, same_string_p, sizeofexpression_expression, sizeofexpression_type, sizeofexpression_type_p, sizeofexpression_undefined, sizeofexpression_undefined_p, string_of_type(), syntax_call, syntax_call_p, syntax_cast, syntax_cast_p, syntax_sizeofexpression, syntax_sizeofexpression_p, type_undefined, type_variable, type_variable_p, unbounded_expression_p(), variable_basic, variable_dimensions, variable_undefined, and variable_undefined_p.
Referenced by malloc_to_abstract_location().
Definition at line 483 of file effects.c.
References cell_entity(), and malloc_effect_entity_p().
Definition at line 478 of file effects.c.
References effect_entity(), and malloc_effect_entity_p().
Referenced by set_add_scalars().
Definition at line 488 of file effects.c.
References malloc_effect_entity_p(), and reference_variable.
entity malloc_to_abstract_location | ( | expression | malloc_exp, |
sensitivity_information * | psi | ||
) |
generate an abstract heap location entity
malloc_exp | is the argument expression of the call to malloc |
psi | is a pointer towards a structure which contains context and/or flow sensitivity information |
free_type(ct)
malloc_exp | alloc_exp |
psi | si |
Definition at line 389 of file abstract_location.c.
References entity_name, entity_type, entity_undefined, expression_to_string(), free_type(), malloc_arg_to_type(), malloc_type_to_abstract_location(), pips_debug, and string_of_type().
Referenced by calloc_to_abstract_location(), flow_sensitive_malloc_to_points_to_sinks(), heap_intrinsic_to_post_pv(), and original_malloc_to_abstract_location().
entity malloc_type_to_abstract_location | ( | type | t, |
sensitivity_information * | psi | ||
) |
generate an abstract heap location entity
t | is type of the allocated space |
psi | is a pointer towards a structure which contains context and/or flow sensitivity information |
in case we want an anywhere abstract heap location : the property ABSTRACT_HEAP_LOCATIONS is set to "unique" and a unique abstract location is used for all heap buckets.
in case the property ABSTRACT_HEAP_LOCATIONS is set to "insensitive": an abstract location is used for each function.
in case the property ABSTRACT_HEAP_LOCATIONS is set to "flow-sensitive" or "context-sensitive".
No difference here between the two values. The diffferent behavior will show when points-to and effects are translated at call sites
At this level, we want to use the statement number or the statement ordering. The statement ordering is safer because two statements or more can be put on the same line. The statement number is more user-friendly.
There is no need to distinguish between types since the statement ordering is at least as effective.
psi | si |
Definition at line 324 of file abstract_location.c.
References copy_type(), sensitivity_information::current_module, sensitivity_information::current_stmt, entity_all_heap_locations(), entity_all_heap_locations_typed(), entity_all_module_heap_locations(), entity_all_module_heap_locations_typed(), entity_flow_or_context_sentitive_heap_location(), entity_name, entity_type, entity_undefined, get_bool_property(), get_string_property(), pips_debug, pips_user_error, statement_number, and string_of_type().
Referenced by malloc_to_abstract_location().
Does the set of locations referenced by r depend on a pointer dereferencing?
Let's hope that all Fortran 77 references will return false...
See effect_reference_dereferencing_p()
Get rid of simple Fortran-like array accesses
This is a simple array access
cycle with alias-classes library: import explictly
entity_heap_variable_p(v)
Heap modelization is behind
Let's walk the subscript list and see if the type associated to the nth subscript is a pointer type and if the (n+1)th subscript is a zero.
Since it is subscripted, there is dereferencing
No dereferencing
Definition at line 92 of file effects.c.
References array_type_dimension(), array_type_p(), array_type_to_element_type(), CAR, CDR, ENDP, entity_abstract_location_p(), entity_basic_concrete_type(), entity_name, entity_type, entity_variable_p, EXPRESSION, gen_length(), int, NIL, pips_internal_error, pointer_type_p(), points_to_expression_to_concrete_type(), POP, reference_indices, reference_variable, struct_type_p(), subscripted_type_to_type(), type_functional_p, type_variable, ultimate_type(), and variable_dimensions.
Referenced by consistent_points_to_arc_p().
Add in "l1" elements of "l2" that are not yet in "l1".
List "l2" is then destroyed.
This is a set union.
l1 | 1 |
l2 | 2 |
Definition at line 134 of file points_to.c.
References CELL, CONS, FOREACH, gen_free_list(), gen_nconc(), gen_nreverse(), NIL, and points_to_cell_in_list_p().
Referenced by dereferencing_to_sinks().
m is supposed to be a module entity
Definition at line 393 of file locations.c.
References array_location_entity_of_module_p(), code_declarations, CONS, ENTITY, entity_initial, FOREACH, NIL, and value_code.
Referenced by apply_array_effect_to_transformer().
Target of an undefined pointer.
Definition at line 455 of file effects.c.
References cell_any_reference(), entity_typed_nowhere_locations_p(), and reference_variable.
Referenced by atomic_points_to_cell_p(), binary_intrinsic_call_to_points_to_sinks(), cell_must_point_to_nowhere_sink_in_set_p(), cell_points_to_non_null_sink_in_set_p(), cell_points_to_nowhere_sink_in_set_p(), cells_may_not_point_to_null_p(), cells_to_read_or_write_effects(), check_type_of_points_to_cells(), compute_points_to_gen_set(), dereferencing_to_sinks(), equal_condition_to_points_to(), extended_source_to_sinks(), 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(), generic_points_to_source_to_sinks(), generic_reference_to_points_to_matching_list(), internal_pointer_assignment_to_points_to(), intrinsic_call_to_points_to(), list_assignment_to_points_to(), merge_actual_and_formal_sinks(), new_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(), offset_cell(), offset_points_to_cell(), pointer_arithmetic_to_points_to(), points_to_binding_arguments(), points_to_cell_types_compatibility(), points_to_function_projection(), points_to_reference_to_translation(), points_to_source_cell_compatible_p(), points_to_source_to_translations(), points_to_with_stripped_sink(), print_or_dump_points_to(), process_casted_sinks(), process_casted_sources(), recursive_filter_formal_context_according_to_actual_context(), reference_dereferencing_to_points_to(), reference_to_points_to_translations(), remove_impossible_arcs_to_null(), source_to_sinks(), subscript_to_points_to_sinks(), and words_points_to().
Definition at line 466 of file effects.c.
References cell_any_reference(), entity_null_locations_p(), and reference_variable.
Referenced by atomic_points_to_cell_p(), binary_intrinsic_call_to_points_to_sinks(), cell_must_point_to_nowhere_sink_in_set_p(), cell_points_to_non_null_sink_in_set_p(), cell_points_to_nowhere_sink_in_set_p(), cell_points_to_null_sink_in_set_p(), cells_may_not_point_to_null_p(), cells_must_point_to_null_p(), cells_to_read_or_write_effects(), check_type_of_points_to_cells(), compute_points_to_gen_set(), dereferencing_subscript_to_points_to(), dereferencing_to_sinks(), expression_to_points_to_cells(), expression_to_points_to_sources(), extended_source_to_sinks(), filter_formal_context_according_to_actual_context(), freed_list_to_points_to(), freed_pointer_to_points_to(), fuse_points_to_sink_cells(), generic_atomic_points_to_cell_p(), generic_points_to_source_to_sinks(), generic_reference_to_points_to_matching_list(), list_assignment_to_points_to(), merge_actual_and_formal_sinks(), new_filter_formal_context_according_to_actual_context(), new_recursive_filter_formal_context_according_to_actual_context(), null_equal_condition_to_points_to(), null_non_equal_condition_to_points_to(), offset_cell(), offset_cells(), offset_points_to_cell(), pointer_arithmetic_to_points_to(), points_to_binding_arguments(), points_to_cell_types_compatibility(), points_to_reference_to_translation(), points_to_source_cell_compatible_p(), points_to_source_to_translations(), points_to_with_stripped_sink(), print_or_dump_points_to(), process_casted_sinks(), process_casted_sources(), recursive_filter_formal_context_according_to_actual_context(), reduce_cells_to_pointer_type(), reference_dereferencing_to_points_to(), reference_may_points_to_null_p(), reference_must_points_to_null_p(), reference_to_points_to_translations(), remove_impossible_arcs_to_null(), source_to_sinks(), and subscript_to_points_to_sinks().
Definition at line 104 of file pointer_values.c.
References cell_gap_p, cell_preference, cell_reference, cell_reference_p, null_pointer_value_entity_p(), preference_reference, and reference_variable.
Referenced by generic_effect_find_aliases_with_simple_pointer_values(), generic_effect_find_equivalent_simple_pointer_values(), make_value_of_pointer_value(), multiple_pointer_assignment_to_post_pv(), single_pointer_assignment_to_post_pv(), and source_to_sinks().
entity null_pointer_value_entity | ( | void | ) |
Definition at line 87 of file pointer_values.c.
References entity_null_locations().
Referenced by declaration_to_post_pv(), make_null_pointer_value_cell(), and pointer_expression_to_transformer().
Definition at line 99 of file pointer_values.c.
References entity_null_locations_p().
Referenced by abstract_pointer_value_entity_p(), convex_effect_to_constant_path_effects_with_pointer_values(), external_value_name(), have_null_value_in_pointer_expression_p(), null_pointer_value_cell_p(), pips_user_value_name(), and simple_effect_to_constant_path_effects_with_pointer_values().
reference original_malloc_to_abstract_location | ( | expression | , |
type | , | ||
type | , | ||
expression | , | ||
entity | , | ||
statement | |||
) |
const char* pips_region_user_name | ( | entity | ent | ) |
char * pips_region_user_name(entity ent) output : the name of entity.
modifies : nothing. comment : allows to "catch" the PHIs entities, else, it works like pips_user_value_name() (see semantics.c).
external_value_name cannot be used because there is no need for the #new suffix, but the #old one is necessary
take care of the constant term TCST
ent is a PHI entity from the regions module
if (!hash_entity_to_values_undefined_p() && !entity_has_values_p(ent))
name = external_value_name(ent);
else
ent | nt |
Definition at line 169 of file prettyprint.c.
References entity_local_name(), entity_minimal_name(), entity_name, and REGIONS_MODULE_NAME.
Referenced by copy_write_statement_with_cumulated_regions(), reg_sc_debug(), reg_v_debug(), text_pointer_value(), text_points_to_relation(), and text_region_no_action().
int pointer_value_compare | ( | cell_relation * | ppv1, |
cell_relation * | ppv2 | ||
) |
Compares two pointer values for sorting.
The first criterion is based on names. Local entities come first; then they are sorted according to the lexicographic order of the module name, and inside each module name class, according to the local name lexicographic order. Then for a given entity name, a read effect comes before a write effect. It is assumed that there is only one effect of each type per entity. bc.
result
compare first references of *ppv1 and *ppv2
same first cells
put second cells value_of before address_of
both are value_of or address_of
compare second cells
ppv1 | pv1 |
ppv2 | pv2 |
Definition at line 255 of file compare.c.
References cell_compare(), cell_preference_p, cell_relation_first_cell, cell_relation_first_value_of_p, cell_relation_second_cell, cell_relation_second_value_of_p, and pips_assert.
Referenced by simple_pvs_syntactically_equal_p(), and text_pointer_values().
Is this a reference to an array or a reference to a pointer? This is not linked to the type of the reference, as a reference may be a pointer, such as "a[10]" when "a" is declared int "a[10][20]".
Look for the last field among the subscript
Definition at line 599 of file points_to.c.
References array_type_p(), ENDP, entity_basic_concrete_type(), EXPRESSION, expression_reference(), f(), field_reference_expression_p(), FOREACH, gen_length(), gen_nreverse(), int, reference_indices, reference_variable, type_undefined, type_undefined_p, type_variable, and variable_dimensions.
Referenced by points_to_cell_add_fixed_subscripts(), and subscript_to_points_to_sinks().
If this is an array reference, what is the type of the underlying array type?
This information cannot be obtained by direct type information because subarrays are typed as pointers to even smaller arrays.
If it is not an array reference, the returned type is undefined.
No new type is allocated.
Look for the last field among the subscript
Definition at line 657 of file points_to.c.
References ENDP, entity_basic_concrete_type(), EXPRESSION, expression_reference(), f(), field_reference_expression_p(), FOREACH, gen_nreverse(), reference_indices, reference_variable, type_undefined, and type_undefined_p.
Referenced by points_to_cell_add_fixed_subscripts().
Functions about points-to cells - There is no cell.c file.
add a field to a cell if it is meaningful
FI: should we also add the necessary zero subscripts when the field is an array?
Definition at line 1444 of file effects.c.
References cell_gap_p, cell_preference, cell_preference_p, cell_reference, cell_reference_p, f(), pips_internal_error, preference_reference, and reference_add_field_dimension().
Referenced by any_source_to_sinks(), anywhere_source_to_sinks(), binary_intrinsic_call_to_points_to_sinks(), generic_points_to_cell_to_useful_pointer_cells(), new_recursive_filter_formal_context_according_to_actual_context(), points_to_translation_of_struct_formal_parameter(), and recursive_cell_to_pointer_cells().
Convert a reference to an array into a reference to its first element.
Note: is this unconditional? Do you add the right number of subscripts according to the type?
zero_p | ero_p |
Definition at line 1594 of file effects.c.
References cell_any_reference(), free_type(), points_to_array_reference_p(), points_to_array_reference_to_type(), points_to_cell_to_type(), reference_add_unbounded_subscripts(), reference_add_zero_subscripts(), and type_undefined.
Referenced by points_to_cell_add_unbounded_subscripts(), and points_to_cell_add_zero_subscripts().
void points_to_cell_add_unbounded_subscripts | ( | cell | c | ) |
Definition at line 1632 of file effects.c.
References points_to_cell_add_fixed_subscripts().
Referenced by any_source_to_sinks(), assignment_to_points_to(), generic_points_to_cell_to_useful_pointer_cells(), generic_stub_source_to_sinks(), internal_pointer_assignment_to_points_to(), new_recursive_filter_formal_context_according_to_actual_context(), points_to_translation_of_struct_formal_parameter(), recursive_cell_to_pointer_cells(), and variable_to_pointer_locations().
void points_to_cell_add_zero_subscript | ( | cell | c | ) |
Definition at line 1620 of file effects.c.
References cell_any_reference(), and reference_add_zero_subscript().
Referenced by filter_formal_context_according_to_actual_context(), new_filter_formal_context_according_to_actual_context(), points_to_translation_of_formal_parameters(), and recursive_filter_formal_context_according_to_actual_context().
void points_to_cell_add_zero_subscripts | ( | cell | c | ) |
Definition at line 1615 of file effects.c.
References points_to_cell_add_fixed_subscripts().
Referenced by binary_intrinsic_call_to_points_to_sinks(), generic_stub_source_to_sinks(), internal_pointer_assignment_to_points_to(), points_to_cell_types_compatibility(), and reference_to_points_to_sinks().
void points_to_cell_complete_with_zero_subscripts | ( | cell | c | ) |
Definition at line 1626 of file effects.c.
References cell_any_reference(), and reference_complete_with_zero_subscripts().
Referenced by filter_formal_context_according_to_actual_context(), and new_filter_formal_context_according_to_actual_context().
c1 | 1 |
c2 | 2 |
Definition at line 916 of file points_to.c.
References cell_any_reference(), and reference_equal_p().
Referenced by add_implicitly_killed_arcs_to_kill_set(), compute_points_to_kill_set(), dereferencing_subscript_to_points_to(), expand_points_to_domain(), freed_list_to_points_to(), fuse_points_to_sink_cells(), memory_leak_to_more_memory_leaks(), non_equal_condition_to_points_to(), potential_to_effective_memory_leaks(), remove_points_to_cell(), similar_arc_in_points_to_set_p(), update_points_to_graph_with_arc(), and user_call_to_points_to_fast_interprocedural().
Definition at line 117 of file points_to.c.
References CELL, cell_equal_p(), and FOREACH.
Referenced by add_implicitly_killed_arcs_to_kill_set(), compute_points_to_gen_set(), filter_formal_out_context_according_to_formal_in_context(), freed_list_to_points_to(), generic_points_to_set_to_stub_cell_list(), generic_points_to_source_to_sinks(), lower_points_to_approximations_according_to_write_effects(), merge_points_to_cell_lists(), points_to_cell_list_and(), recursive_filter_formal_context_according_to_actual_context(), reference_to_points_to_translations(), and translation_transitive_closure().
Definition at line 676 of file type.c.
References compute_basic_concrete_type(), free_type(), and points_to_cell_to_type().
Referenced by cell_must_point_to_nowhere_sink_in_set_p(), cell_points_to_non_null_sink_in_set_p(), cell_points_to_nowhere_sink_in_set_p(), cell_points_to_null_sink_in_set_p(), cells_to_read_or_write_effects(), create_scalar_stub_sink_cell(), create_stub_points_to(), expression_to_points_to_cells(), filter_formal_context_according_to_actual_context(), formal_source_to_sinks(), freed_list_to_points_to(), generic_points_to_cell_to_useful_pointer_cells(), list_assignment_to_points_to(), new_filter_formal_context_according_to_actual_context(), new_recursive_filter_formal_context_according_to_actual_context(), points_to_translation_mapping_is_typed_p(), points_to_translation_of_formal_parameters(), points_to_with_stripped_sink(), process_casted_sinks(), process_casted_sources(), recursive_filter_formal_context_according_to_actual_context(), remove_points_to_cell(), and source_to_sinks().
FI: I need more generality than is offered by cell_to_type()
to_be_freed | o_be_freed |
Definition at line 665 of file type.c.
References cell_any_reference(), cell_gap_p, pips_assert, points_to_reference_to_type(), ref, and type_undefined.
Referenced by any_source_to_sinks(), anywhere_source_to_sinks(), check_type_of_points_to_cells(), dereferencing_to_sinks(), expression_to_points_to_sources(), internal_pointer_assignment_to_points_to(), offset_cell(), points_to_cell_add_fixed_subscripts(), points_to_cell_to_concrete_type(), points_to_cell_types_compatibility(), points_to_set_block_projection(), points_to_source_to_translations(), recursive_cell_to_pointer_cells(), reduce_cell_to_pointer_type(), struct_initialization_to_points_to(), and subscript_to_points_to_sinks().
Return a list of cells that are larger than cell "c" in the points-to cell lattice.
This goal is quite open because a[1][2] is dominated by both a[*][2] and a[1][*], then by a[*][*]. Assuming "a" is variable of function "foo", then we have "foo:*STACK*_b0", "*ANYMODULE*:*STACK*_b0", "foo:*ANYWHERE*_b0", "*ANYMODULE*:*ANYWHERE*_b0", "*ANYMODULE*:*ANYWHERE*".
They would all be useful to guarantee the consistency of the points-to information wrt the points-to cell lattice, but we'd rather maintain a partially consistent points-to graph and rely on functions using it to add the necessary points-to arcs.
A lattice-consistent points-to graph would contain too many arcs as x->y implies x'->y' for all x' bigger than x and y' bigger then y...
For the time being, we only need to convert a[i][j][k] into a[*][*][*] when i, j and k are real subscript expressions, not fields.
We return an empty list when cell "c" does not need any upper bound, as is the case with a, a[f] where f is a field, a[*] and all the abstract locations.
So, for the time being, this function returns a list with one or zero elements.
Definition at line 973 of file points_to.c.
References CELL, cell_any_reference(), CONS, copy_expression(), entity_abstract_location_p(), EXPRESSION, expression_undefined, FOREACH, gen_full_free_list(), gen_nreverse(), integer_expression_p(), make_cell_reference(), make_reference(), make_unbounded_expression(), NIL, reference_indices, and reference_variable.
Referenced by points_to_cells_to_upper_bound_points_to_cells().
Make sure that cell l can points towards cell r.
FI-AM/FC: Unfortunately, a lot of specification work is missing to develop this function while taking care of abstract locations and their lattice.
Restrictions on cell "l"
1.1 "l" cannot be the abstract nowhere/undefined cell
...
Note: this should be part of points_to_set_consistent_p(), which is called consistent_points_to_set(), but this function goes beyond checking the compatibility. It enforces it when legal and possible.
Maybe this function should be relocated in alias-classes
Beware of possible side-effects on l
FI, 10 August 2012: this function is a mess. No side effect should be applied. it should be redesigned to check compatibility cases one after the other and it should be renamed points_to_cell_types_compatibility_p()
FI, 14 August 2012: the dimension of the sink entity and sink reference must be greater than the dimension of the source reference. This is not checked yet.
FI, 19 August 2012: all cells used in a points-to arc must be scalar, either pointers or basic types
&& overloaded_type_p(urt)
The source points towards an array and the cell is an element of this array.
Formal parameters and potentially stubs can be assumed to points towards an array although they are declared as pointers to a scalar.
This should never be a problem when sink cells are always array elements and not arrays.
Here we may be in trouble because of the heap modeling malloc() returns by default a "void *", or sometimes a "char *" which may be casted into anything...
The dimension of the allocated array should be given by the size of the pointed type and by the size of the right type.
Also, we have different heap modelling, with different flexibilities
& !all_heap_locations_typed_cell_p(r)
all_heap_locations_typed_cell_p(r)
There must be a typing issue.
This may happen with the heap model
Is it an (implicit) array of pointers
This may happen with the heap model
Definition at line 985 of file type.c.
References all_heap_locations_cell_p(), anywhere_cell_p(), array_pointer_type_equal_p(), array_type_p(), array_type_to_element_type(), basic_equal_p(), basic_int, basic_int_p, basic_pointer, basic_pointer_p, C_pointer_type_p(), cell_any_reference(), compute_basic_concrete_type(), CONS, copy_type(), DIMENSION, entity_name, entity_type, fprintf(), free_type(), functional_result, get_bool_property(), heap_cell_p(), int_to_expression(), make_dimension(), make_unbounded_expression(), NIL, nowhere_cell_p(), null_cell_p(), overloaded_type_p(), pips_internal_error, pointer_type_p(), points_to_cell_add_zero_subscripts(), points_to_cell_to_type(), points_to_sink_cell_compatible_p(), points_to_source_cell_compatible_p(), print_points_to_cell, print_type(), reference_add_zero_subscripts(), reference_variable, scalar_type_p(), string_type_p(), type_equal_up_to_typedefs_and_qualifiers_p(), type_functional, type_functional_p, type_to_pointed_type(), type_variable, type_variable_p, type_void_p, variable_basic, and variable_dimensions.
Referenced by create_stub_points_to(), and gen_may_constant_paths().
void points_to_cell_update_last_subscript | ( | cell | c, |
expression | s | ||
) |
Transform reference a[i]...[j] and expression s into reference a[i]..[j+s] if j and s are constant integer expressions, and into reference a[i]..[*] otherwise.
Cell c is updated by side effect.
This has been implemented in several places...
Definition at line 1643 of file effects.c.
References CAR, cell_any_reference(), ENDP, EXPRESSION, EXPRESSION_, expression_integer_value(), expression_undefined, gen_last(), int_to_expression(), intptr_t, make_unbounded_expression(), pips_internal_error, and reference_indices.
Referenced by subscripted_reference_to_points_to().
points-to cells use abstract addresses, hence the proper comparison is an intersection.
simple references are considered to be singleton.
Assume no aliasing between variables and within data structures.
It is safe to assume intersection...
lc | c |
rc | c |
Definition at line 532 of file points_to.c.
References cell_any_reference(), cell_equal_p(), entities_may_conflict_p(), and reference_variable.
Referenced by equal_condition_to_points_to().
Add to list "l" cells that are upper bound cells of the cells already in list "l" and return list "l".
cl | l |
Definition at line 1007 of file points_to.c.
References CELL, FOREACH, gen_nconc(), NIL, and points_to_cell_to_upper_bound_points_to_cells().
int points_to_compare_cells | ( | const void * | vpt1, |
const void * | vpt2 | ||
) |
Comparison of two points-to arcs based on their source and sink nodes.
This comparison function is used to sort a list of points-to before storage and print-out.
It must return -1, 0 or 1 like strcmp(). It should avoid 0 because we want a total order to avoid validation problems. Hence the exploitation of the references, number of indices, subscript expressions, etc. if the entity names are not sufficient to disambiguate the references.
When subscript expressions are used, fields are replaced by the corresponding field number. So the sort is based on the field ranks in the data structure and not on the the field names.
For abstract locations, the local name is used for the sort and the global names is sometimes used in the prettyprint. Hence, the alphabetical order is not obvious in the print-out.
vpt1 | pt1 |
vpt2 | pt2 |
Definition at line 295 of file prettyprint.c.
References CAR, cell_to_reference(), ENDP, entity_abstract_location_p(), entity_local_name(), entity_minimal_user_name(), EXPRESSION, expression_constant_p(), expression_to_int(), expression_to_string(), gen_length(), NIL, points_to_sink, points_to_source, POP, reference_indices, reference_variable, and s1.
Referenced by fi_points_to_storage(), init_points_to_analysis(), points_to_list_sort(), and points_to_storage().
type points_to_expression_to_concrete_type | ( | expression | e | ) |
The type returned is stored in a hash-table.
It should not be freed. See compute_basic_concrete_type().
This function is useful to avoid the conditional free.
Definition at line 617 of file type.c.
References compute_basic_concrete_type(), free_type(), and points_to_expression_to_type().
Referenced by binary_intrinsic_call_to_points_to_sinks(), expression_to_points_to_cells(), freed_list_to_points_to(), intrinsic_call_condition_to_points_to(), intrinsic_call_to_points_to(), memory_dereferencing_p(), semantics_expression_to_points_to_sinks(), and unary_intrinsic_call_to_points_to_sinks().
type points_to_expression_to_pointed_type | ( | expression | e | ) |
Return a new allocated type "t" of the address pointed by expression "e", if expression "e" denotes an address.
"t" should not be freed.
We should return a pointer towards an array of dimension n-1. The first dimension is lost.
Build the pointed type, copy of cet except for its first dimension
Build the poiinter type
Definition at line 631 of file type.c.
References array_type_p(), CDR, compute_basic_concrete_type(), copy_basic(), copy_type(), free_type(), gen_full_copy_list(), make_basic_pointer(), make_type_variable(), make_variable(), NIL, pips_internal_error, pointer_type_p(), points_to_expression_to_type(), type_to_pointed_type(), type_undefined, type_variable, variable_basic, and variable_dimensions.
Referenced by expression_to_points_to_sinks_with_offset(), and unary_intrinsic_call_to_points_to_sinks().
type points_to_expression_to_type | ( | expression | e, |
bool * | to_be_freed | ||
) |
FI: I need more generality than is offered by expression_to_type() because fields are assimilated to subscripts.
In order to type t[*] as well as t[0]...
to_be_freed | o_be_freed |
Definition at line 592 of file type.c.
References copy_expression(), eliminate_calls_to_unbounded(), expression_syntax, expression_to_type(), free_expression(), points_to_reference_to_type(), syntax_reference, syntax_reference_p, and type_undefined.
Referenced by assignment_to_points_to(), check_rhs_value_types(), expression_to_points_to_sources(), pointer_arithmetic_to_points_to(), points_to_expression_to_concrete_type(), points_to_expression_to_pointed_type(), and subscript_to_points_to_sinks().
Allocate a copy of ptl and sort it.
It might be better to admit a side effect on ptl and to let the caller copy the liste before sorting.
(gen_cmp_func_t)
ptl | tl |
Definition at line 389 of file prettyprint.c.
References gen_full_copy_list(), gen_sort_list(), and points_to_compare_cells().
Referenced by text_points_to_relations(), and words_points_to_list().
FI->FC/AM: some elements of the lattice must be exploited here...
r1 | 1 |
r2 | 2 |
Definition at line 1243 of file effects.c.
References CAR, CDR, EXPRESSION, expression_equal_p(), FOREACH, gen_length(), reference_indices, reference_variable, s1, and unbounded_expression_p().
Referenced by cell_included_p().
Definition at line 685 of file type.c.
References compute_basic_concrete_type(), free_type(), and points_to_reference_to_type().
Referenced by analyzed_reference_p(), assign_rhs_to_reflhs_to_transformer(), cells_to_read_or_write_effects(), consistent_points_to_arc_p(), create_values_for_simple_effect(), filter_formal_context_according_to_actual_context(), find_points_to_subscript_for_type(), generic_eval_cell_with_points_to(), generic_reference_to_transformer(), generic_transform_sink_cells_from_matching_list(), make_location_entity(), module_to_value_mappings(), new_filter_formal_context_according_to_actual_context(), perform_array_element_substitutions_in_transformer(), points_to_with_stripped_sink(), reference_to_address_entity(), reference_to_points_to_sinks(), semantics_usable_points_to_reference_p(), subscripted_reference_to_points_to(), substitute_stubs_in_transformer_with_translation_binding(), and use_default_sink_cell().
Compute the number of array subscript at the end of a points_to_reference.
Look for the last field subscript and count the number of subscripts after it. If no field susbcript is found, then all subscripts are final array subscripts.
To make thinks easier, the subscript list is reversed.
Definition at line 244 of file points_to.c.
References EXPRESSION, field_reference_expression_p(), FOREACH, gen_nreverse(), and reference_indices.
FI: I need more generality than is offered by cell_to_type()
Maybe because of fields.
Surely because of implicit arrays linked to scalar pointers
ref | ef |
to_be_freed | o_be_freed |
Definition at line 527 of file type.c.
References CAR, cell_reference_to_type(), ENDP, entity_field_p(), entity_scalar_p(), entity_type, EXPRESSION, expression_integer_constant_p(), expression_syntax, f(), gen_last(), gen_length(), int, ref, reference_indices, reference_variable, syntax_reference, syntax_reference_p, type_undefined, and type_undefined_p.
Referenced by adapt_reference_to_type(), create_scalar_stub_sink_cell(), gen_may_constant_paths(), gen_must_constant_paths(), opkill_may_constant_path(), opkill_must_constant_path(), points_to_cell_to_type(), points_to_expression_to_type(), points_to_reference_to_concrete_type(), points_to_reference_to_typed_index(), and reference_add_field_dimension().
Look for the index in "r" that corresponds to a pointer of type "t" and return the corresponding element list.
In other words, the type of "&r" is "t".
It is done in a very inefficient way
Definition at line 361 of file points_to.c.
References array_pointer_type_equal_p(), C_pointer_type_p(), C_type_to_pointed_type(), CONS, copy_expression(), entity_heap_location_p(), entity_local_name(), EXPRESSION, free_reference(), free_type(), gen_last(), gen_length(), gen_nconc(), gen_nth(), gen_nthcdr(), int, list_undefined, make_reference(), NIL, pips_assert, pips_internal_error, pips_user_error, points_to_reference_to_type(), reference_indices, and reference_variable.
Referenced by offset_array_reference().
Substitute the subscripts "sl" in points-to reference "r" just after the last field subscript by "nsl".
"sl" must be broken into three parts, possibly empty:
Issue: how do you know that the initial array subscript must be preserved because it is an implicit dimension added for pointer arithmetics?
build sl1
nsl | sl |
Definition at line 278 of file points_to.c.
References CONS, ENDP, EXPRESSION, expression_to_type(), field_reference_expression_p(), FOREACH, free_expression(), free_type(), gen_free_list(), gen_length(), gen_nconc(), gen_nreverse(), int, NIL, pips_internal_error, pointer_type_p(), and reference_indices.
Referenced by subscript_to_points_to_sinks().
Definition at line 1241 of file type.c.
References nowhere_cell_p(), and null_cell_p().
Referenced by points_to_cell_types_compatibility().
The value of the source can often be expressed with different subscript lists.
For instance, a, a[0], a[0][0] have different types but the same value if a is a 2-D array.
This function allocated a new points-to object whose sink has a minimal number of indices.
FI: I have added this function to deal with pointers to arrays. It is called from generic_reference_to_points_to_matching_list() to try to adapt the points-to information to the undefined requirements of Beatrice's functions for regions_with_points_to. I do not think the function below is correct when structs are involved... The stripping may be useful, but it should be much more careful.
adapt_reference_to_type() might be better here to adjust the subscripts in sink.
Add the implicit dimension
Dealing with the special case of a constant p -> "foo"
The other option would be to accept "foo"[0] as a valid reference... Extending references to constant functions is a first step...
pt | t |
Definition at line 1074 of file points_to.c.
References adapt_reference_to_type(), anywhere_cell_p(), CAR, cell_any_reference(), cell_typed_anywhere_locations_p(), cell_undefined, char_star_constant_function_type_p(), char_type_p(), CONS, copy_approximation(), copy_cell(), copy_expression(), ENDP, EXPRESSION, gen_nreverse(), get_bool_property(), heap_cell_p(), list_undefined, make_cell_reference(), make_descriptor_none(), make_points_to(), make_reference(), NIL, nowhere_cell_p(), null_cell_p(), pips_internal_error, pointer_type_p(), points_to_approximation, points_to_cell_to_concrete_type(), points_to_reference_to_concrete_type(), points_to_sink, points_to_source, POP, reference_indices, reference_variable, safe_type_to_string(), and type_to_pointed_type().
Referenced by generic_reference_to_points_to_matching_list().
Specific handling of references appearing in points_to.
Definition at line 232 of file prettyprint.c.
References entity_minimal_user_name(), NIL, and Words_Any_Reference().
Referenced by word_points_to().
void print_pointer_value | ( | cell_relation | pv | ) |
pv | v |
Definition at line 615 of file prettyprint.c.
References free_text(), print_text(), and text_pointer_value().
Referenced by print_pointer_values().
void print_pointer_values | ( | list | lpv | ) |
lpv | pv |
Definition at line 622 of file prettyprint.c.
References CELL_RELATION, ENDP, FOREACH, fprintf(), and print_pointer_value().
Referenced by print_pv_results().
void print_points_to_cell | ( | cell | c | ) |
Debug: use stderr.
Definition at line 196 of file points_to.c.
References fprint_points_to_cell().
Referenced by print_points_to_cells().
void print_points_to_cells | ( | list | cl | ) |
Debug.
cl | l |
Definition at line 202 of file points_to.c.
References CDR, CELL, cell_any_reference(), ENDP, entity_local_name(), entity_module_name(), entity_undefined_p, FOREACH, fprintf(), get_current_module_entity(), module_name_to_entity(), MODULE_SEP_STRING, print_points_to_cell(), and reference_variable.
bool pt_to_list_undefined_p | ( | void | ) |
points_to.c
Referenced by add_values_for_simple_effects_of_statement(), any_assign_to_transformer(), any_basic_update_to_transformer(), any_update_to_transformer(), c_user_call_to_transformer(), lhs_expression_to_transformer(), new_substitute_stubs_in_transformer(), points_to_unary_operation_to_transformer(), semantics_expression_to_points_to_sinks(), semantics_expression_to_points_to_sources(), and substitute_stubs_in_transformer().
bool pv_cells_mergeable_p | ( | cell_relation | pv1, |
cell_relation | pv2 | ||
) |
value_of pvs, try to see if their cells are inverted
pv1 | v1 |
pv2 | v2 |
Definition at line 230 of file pointer_values.c.
References cell_any_reference(), cell_compare(), cell_entity(), cell_relation_descriptor, cell_relation_first_cell, cell_relation_second_cell, cell_relation_second_value_of_p, descriptor_none_p, gen_length(), pips_internal_error, and reference_indices.
Referenced by pvs_union_combinable_p().
bool pv_cells_syntactically_equal_p | ( | cell_relation | pv1, |
cell_relation | pv2 | ||
) |
value_of pvs, try to see if their cells are inverted
pv1 | v1 |
pv2 | v2 |
Definition at line 162 of file pointer_values.c.
References cell_compare(), cell_relation_descriptor, cell_relation_first_cell, cell_relation_second_cell, cell_relation_second_value_of_p, descriptor_none_p, and pips_internal_error.
Referenced by simple_pvs_syntactically_equal_p().
Go down if it is an array of pointers or an array of struct
add indices to cell c
Add subscripts to reach array elements
Look for fields that are either pointers, or arrays or structs
Add field subscript to reference
Definition at line 1680 of file effects.c.
References array_of_pointers_type_p(), array_of_struct_type_p(), array_type_p(), basic_derived, CELL, CONS, copy_cell(), ENTITY, entity_basic_concrete_type(), entity_type, f(), FOREACH, free_cell(), NIL, pointer_type_p(), points_to_cell_add_field_dimension(), points_to_cell_add_unbounded_subscripts(), points_to_cell_to_type(), recursive_cell_to_pointer_cells(), struct_type_p(), type_struct, type_variable, and variable_basic.
Referenced by cell_to_pointer_cells(), points_to_binding_arguments(), and recursive_cell_to_pointer_cells().
t | any type, but here initial reference type |
sl | remaining subscript list, all subscripts are supposed to be store independent |
Reduce the length of the subscript list
There are indices because of the first test on the number of subscripts
sl | l |
Definition at line 1169 of file points_to.c.
References array_type_dimension(), array_type_p(), array_type_to_element_type(), CAR, CDR, ENDP, entity_basic_concrete_type(), EXPRESSION, expression_reference(), f(), gen_length(), pips_internal_error, pointer_type_p(), recursive_store_independent_points_to_reference_p(), reference_variable, and struct_type_p().
Referenced by recursive_store_independent_points_to_reference_p(), and store_independent_points_to_reference_p().
add a field f as a subscript to a reference r if it is meaningful.
Leave r unchanged if not.
This function cannot be located in ri-util because it does need to know about abstract locations.
This does not build a standard reference, but a reference used within effects computation. Field accesses are replaced by subscripts.
Note that the reference generated may contain extra 0 subscripts to make it scalar...
No fields can be added to some special abstract locations.
FI: a problem due to typedefs apparently
Take care of special cases
Nothing done when the heap is modeled by a unique entity
This kind of entity cannot support a concrete access path but the type must be updated according to the field "f"
FI: This piece of code should be useless because the all_heap_locations entity is used only when ALIASING_ACROSS_TYPES is true.
Definition at line 1475 of file effects.c.
References array_of_struct_type_p(), basic_derived, compute_basic_concrete_type(), CONS, ENDP, entity_all_heap_locations_p(), entity_all_heap_locations_typed(), entity_all_module_heap_locations_p(), entity_anywhere_locations_p(), entity_basic_concrete_type(), entity_name, entity_nowhere_locations_p(), entity_null_locations_p(), entity_to_expression(), entity_type, entity_typed_anywhere_locations(), entity_typed_anywhere_locations_p(), entity_typed_nowhere_locations_p(), entity_undefined_p, entity_user_name(), EXPRESSION, f(), find_field_in_field_list(), free_type(), gen_nconc(), get_bool_property(), get_int_property(), int_to_expression(), list_undefined, NIL, overloaded_type_p(), pips_assert, pips_internal_error, points_to_reference_to_type(), reference_add_zero_subscripts(), reference_indices, reference_variable, struct_type_p(), type_struct, type_struct_p, type_variable, ultimate_type(), and variable_basic.
Referenced by points_to_cell_add_field_dimension(), and struct_assignment_to_points_to().
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().
This function should be at expression.c.
It already exist and is called reference_with_unbounded_indices_p() but includes two cases that should be disjoint: constant indices and unbounded ones.
Definition at line 1373 of file type.c.
References EXPRESSION, FOREACH, reference_indices, and unbounded_expression_p().
Referenced by strict_constant_path_p().
Two cells are related if they are based on the same entity.
Definition at line 149 of file points_to.c.
References CELL, cell_any_reference(), FOREACH, and reference_variable.
Referenced by filter_formal_context_according_to_actual_context(), freed_list_to_points_to(), new_filter_formal_context_according_to_actual_context(), and recursive_filter_formal_context_according_to_actual_context().
c1 | 1 |
c2 | 2 |
Definition at line 165 of file points_to.c.
References cell_any_reference(), and reference_variable.
Referenced by sink_to_sources(), and unreachable_points_to_cell_p().
void reset_pt_to_list | ( | void | ) |
Referenced by generic_points_to_analysis(), preconditions_inter_full_with_points_to(), print_xml_application_main_with_points_to(), print_xml_application_with_points_to(), refine_transformers_with_points_to(), transformers_inter_full_with_points_to(), and update_precondition_with_call_site_preconditions().
void set_pt_to_list | ( | statement_points_to | ) |
Referenced by preconditions_inter_full_with_points_to(), print_xml_application_main_with_points_to(), print_xml_application_with_points_to(), refine_transformers_with_points_to(), transformers_inter_full_with_points_to(), and update_precondition_with_call_site_preconditions().
bool similar_arc_in_points_to_set_p | ( | points_to | spt, |
set | in, | ||
approximation * | pa | ||
) |
See if an arc like "spt" exists in set "in", regardless of its approximation.
If yes, returns the approximation of the arc found in "in".
See also arc_in_points_to_set_p(), which requires full identity
spt | pt |
in | n |
pa | a |
Definition at line 929 of file points_to.c.
References points_to_approximation, points_to_cell_equal_p(), points_to_sink, points_to_source, and SET_FOREACH.
Referenced by filter_formal_out_context_according_to_formal_in_context().
Do not check anything, just add f as a last subscript.
See above
Definition at line 1581 of file effects.c.
References CONS, entity_to_expression(), EXPRESSION, f(), gen_nconc(), NIL, and reference_indices.
Referenced by add_inter_or_intraprocedural_field_entities(), and struct_assignment_to_points_to().
bool statement_has_a_module_formal_argument_write_effect_p | ( | statement | s, |
entity | module, | ||
statement_mapping | effects_list_map | ||
) |
Return true if the statement has a write effect on at least one of the argument (formal parameter) of the module.
Note that the return variable of a function is also considered here as a formal parameter.
module | odule |
effects_list_map | ffects_list_map |
Definition at line 247 of file effects.c.
References a_variable, action_write_p, EFFECT, effect_action, effect_any_reference, FOREACH, GET_STATEMENT_MAPPING, module, reference_variable, variable_is_a_module_formal_parameter_p(), and variable_return_p().
Definition at line 524 of file effects.c.
References cell_entity(), and std_file_entity_p().
Definition at line 519 of file effects.c.
References effect_entity(), and std_file_entity_p().
Referenced by create_step_regions(), do_check_isolate_statement_preconditions_on_call(), effects_to_dma(), and std_file_effects_p().
Definition at line 529 of file effects.c.
References EFFECT, FOREACH, and std_file_effect_p().
Definition at line 1062 of file effects.c.
References action_kind_store_p, action_read, action_read_p, action_write, and effect_action.
Referenced by add_conflicts(), add_values_for_simple_effects_of_statement(), array_must_fully_written_by_regions_p(), c_convex_effects_on_formal_parameter_backward_translation(), create_values_for_simple_effect(), cumul_and_update_effects_of_statement(), DistArraysEffects(), effect_may_read_or_write_memory_paths_from_entity_p(), effects_read_variable_p(), effects_write_p(), effects_write_variable_p(), find_effect_actions_for_entity(), generic_apply_effects_to_transformer(), generic_effects_maymust_read_or_write_scalar_entity_p(), get_written_entities(), invariant_expression_p(), kill_effects(), loop_flt(), loop_regions_normalize(), module_to_value_mappings(), no_other_effects_on_references(), prettyprint_dependence_graph(), project_regions_along_loop_index(), project_regions_along_parameters(), pure_function_p(), region_exact_projection_along_variable(), region_intersection(), region_sup_difference(), region_union(), regions_dynamic_elim(), regions_may_convex_hull(), regions_must_convex_hull(), regions_transformer_apply(), safe_effects_for_reductions(), simple_switch_old_to_new(), update_compatible_reduction(), update_reduction_under_effect(), vars_read_and_written(), written_effect_p(), written_effects_to_dist_arrays_p(), xml_Chain_Graph(), xml_Compute_and_Need(), xml_Region_Parameter(), xml_TaskParameter(), and xml_TaskParameters().
Does this effect define the same set of memory locations regardless of the current (environment and) memory state?
This function works only for standard references, not for points-to references, but is partially extended to cope with one anywhere...
FI: I do not understand why pointers could be indexed in standard references.
eff | ff |
Definition at line 636 of file effects.c.
References anywhere_effect_p(), effect_any_reference, effect_consistent_p(), ENDP, entity_basic_concrete_type(), ifdebug, pips_assert, pointer_type_p(), reference_consistent_p(), reference_indices, reference_variable, and reference_with_constant_indices_p().
Referenced by add_values_for_simple_effects_of_statement(), effect_interference(), and effects_interfere_p().
check that the subscript list il is either empty or made of integers or fields or unbounded entity "*".
What would you do with a constant range ?
sl | l |
Definition at line 1301 of file points_to.c.
References call_function, constant_p(), entity_field_p(), EXPRESSION, expression_syntax, extended_integer_constant_expression_p(), f(), FOREACH, reference_variable, syntax_call, syntax_call_p, syntax_reference, syntax_reference_p, and unbounded_entity_p().
Referenced by store_independent_points_to_reference_p().
Functions for points-to references, the kind of references used in points-to cells.
Does this points-to reference define the same set of memory locations regardless of the current (environment and) memory state?
The reference indices can be used to encode fields in data structures and can be applied to pointers as offset.
The types associated to the reference and to prefixes of the index list change. So a pointer dereferencing can be hidden anywhere. For instance, a[i][2] can be:
Remember that *p is equivalent and encoded as p[0].
To guarantee store independence, either
or
Beware of named types...
Definition at line 1247 of file points_to.c.
References ENDP, entity_basic_concrete_type(), recursive_store_independent_points_to_reference_p(), reference_indices, reference_variable, store_independent_points_to_indices_p(), and type_functional_p.
Referenced by analyzed_reference_p(), assign_rhs_to_reflhs_to_transformer(), consistent_points_to_arc_p(), and reference_to_address_entity().
void store_or_update_pt_to_list | ( | statement | , |
points_to_list | |||
) |
Referenced by fi_points_to_storage(), and points_to_storage().
void store_pt_to_list | ( | statement | , |
points_to_list | |||
) |
Definition at line 1407 of file type.c.
References ENDP, entity_abstract_location_p(), entity_all_dynamic_locations_p(), entity_all_heap_locations_p(), entity_all_locations_p(), entity_all_module_dynamic_locations_p(), entity_all_module_heap_locations_p(), entity_all_module_locations_p(), entity_all_module_stack_locations_p(), entity_all_module_static_locations_p(), entity_all_stack_locations_p(), entity_all_static_locations_p(), entity_anywhere_locations_p(), entity_nowhere_locations_p(), entity_null_locations_p(), entity_stub_sink_p(), entity_type, entity_typed_anywhere_locations_p(), entity_typed_nowhere_locations_p(), heap_area_p(), reference_indices, reference_unbounded_indices_p(), reference_variable, and struct_type_p().
Referenced by can_be_constant_path_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().
Definition at line 108 of file points_to.c.
References cell_any_reference(), entity_stub_sink_p(), and reference_variable.
Referenced by freeable_points_to_cells(), freed_list_to_points_to(), freed_pointer_to_points_to(), null_equal_condition_to_points_to(), and points_to_to_context_points_to().
text text_pointer_value | ( | cell_relation | pv | ) |
text text_region(effect reg) input : a region output : a text consisting of several lines of commentaries, representing the region modifies : nothing
of string
PREFIX
REFERENCES
DESCRIPTOR
sorts in such a way that constraints with phi variables come first.
APPROXIMATION
CLOSE
pv | v |
Definition at line 480 of file prettyprint.c.
References append, approximation_may_p, cell_gap_p, cell_preference_p, cell_reference, cell_relation_approximation, cell_relation_descriptor, cell_relation_first_cell, cell_relation_first_value_of_p, cell_relation_second_address_of_p, cell_relation_second_cell, cell_relation_undefined_p, close_current_line(), concatenate(), CONS, descriptor_convex, descriptor_none_p, effect_words_reference(), FOREACH, gen_free_string_list(), get_comment_continuation(), get_comment_sentinel(), ifdebug, is_inferior_cell_descriptor_pvarval(), is_sentence_formatted, line_buffer, make_sentence(), make_text(), MAX_LINE_LENGTH, NIL, pips_assert, pips_region_user_name(), pips_user_warning, sc_copy(), sc_lexicographic_sort(), sc_rm(), SENTENCE, strdup(), STRING, system_sorted_text_format(), text_undefined, and vect_contains_phi_p().
Referenced by print_pointer_value(), and text_pointer_values().
in case of loose_prettyprint, at least one region to print?
GO: No redundant test anymore, see text_statement_array_regions
header first
lpv | pv |
header | eader |
Definition at line 571 of file prettyprint.c.
References ADD_SENTENCE_TO_TEXT, append, CELL_RELATION, ENDP, FOREACH, gen_sort_list(), get_bool_property(), get_comment_continuation(), get_comment_sentinel(), HASH_UNDEFINED_VALUE, is_sentence_formatted, line_buffer, list_undefined, make_sentence(), make_text(), MAX_LINE_LENGTH, MERGE_TEXTS, NIL, pointer_value_compare(), strdup(), and text_pointer_value().
Referenced by generic_print_code_pv(), and text_pv().
Definition at line 1080 of file effects.c.
References action_kind_type_declaration_p, action_read, action_read_p, action_write, and effect_action.
Is it a typed anywhere effect? ANYMMODULE:ANYWHERE_b0, 1, 2.
Definition at line 352 of file effects.c.
References generic_anywhere_effect_p().
bool types_compatible_for_effects_interprocedural_translation_p | ( | type | real_arg_t, |
type | formal_arg_t | ||
) |
tests if the actual argument type and the formal argument type are compatible with the current state of the interprocedural translation algorithms.
safe default result
real_arg_t | eal_arg_t |
formal_arg_t | ormal_arg_t |
Definition at line 932 of file type.c.
References basic_concrete_types_compatible_for_effects_interprocedural_translation_p(), compute_basic_concrete_type(), and free_type().
Referenced by c_convex_effects_on_formal_parameter_backward_translation().
Definition at line 76 of file pointer_values.c.
References cell_gap_p, cell_preference, cell_reference, cell_reference_p, preference_reference, reference_variable, and undefined_pointer_value_entity_p().
Referenced by generic_effect_find_aliases_with_simple_pointer_values(), generic_effect_find_equivalent_simple_pointer_values(), make_simple_pv_from_simple_effects(), make_value_of_pointer_value(), multiple_pointer_assignment_to_post_pv(), pointer_values_remove_var(), and single_pointer_assignment_to_post_pv().
entity undefined_pointer_value_entity | ( | void | ) |
Definition at line 42 of file pointer_values.c.
References ABSTRACT_LOCATION, ANY_MODULE_NAME, concatenate(), entity_domain, entity_kind, entity_undefined, entity_undefined_p, gen_find_tabulated(), make_basic_pointer(), make_entity, make_storage_rom(), make_type_variable(), make_type_void(), make_value_unknown(), make_variable(), MODULE_SEP_STRING, NIL, strdup(), and UNDEFINED_POINTER_VALUE_NAME.
Referenced by declaration_to_post_pv(), make_undefined_pointer_value_cell(), and sequence_to_post_pv().
Definition at line 68 of file pointer_values.c.
References ANY_MODULE_NAME, entity_local_name(), entity_module_name(), same_string_p, and UNDEFINED_POINTER_VALUE_NAME.
Referenced by abstract_pointer_value_entity_p(), convex_effect_to_constant_path_effects_with_pointer_values(), simple_effect_to_constant_path_effects_with_pointer_values(), and undefined_pointer_value_cell_p().
DO NOT USE ANYMORE: NOT COMPATIBLE WITH ABSTRACT LOCATIONS.
besides, I do not see the interest after having called effects_compatible_p. BC Check compatibility conditions for effect union
In general, you do not want to union a read and a write, but you might want to do so to generate the set of referenced elements, for instance to generate communications or to allocate memory
You do not want to union an effect on store with an effect on environment or type declaration
Here we know: at1==at2 and akt1==akt2
The code below could be further unified, but it would not make it easier to understand
Beware: that's not true anymore because of abstract locations
For environment and type declaration, the descriptor is useless for the time being
ef1 | f1 |
ef2 | f2 |
Definition at line 1354 of file effects.c.
References action_kind_tag, action_tag, action_to_action_kind(), descriptor_tag, effect_action, effect_consistent_p(), effect_descriptor, effect_variable, is_action_kind_store, and pips_assert.
void update_pt_to_list | ( | statement | , |
points_to_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().
bool vect_contains_phi_p(Pvecteur v) input : a vector output : true if v contains a PHI variable, false otherwise modifies : nothing
Definition at line 1427 of file effects.c.
References Svecteur::succ, var_of, variable_phi_p, and VECTEUR_NUL_P.
Referenced by constraints_nb_phi_eq(), eq_var_nophi_min_coeff(), eq_var_phi(), some_phi_variable(), text_pointer_value(), text_points_to_relation(), and text_region_no_action().
pt | t |
Definition at line 242 of file prettyprint.c.
References approximation_exact_p, cell_to_reference(), CONS, gen_nconc(), NIL, pips_assert, points_to_approximation, points_to_consistent_p(), points_to_sink, points_to_source, points_to_undefined_p, points_to_words_reference(), reference_variable, strdup(), STRING, variable_p(), and words_fictious_reference().
Referenced by generic_reference_to_points_to_matching_list(), generic_transform_sink_cells_from_matching_list(), and words_points_to_list().
To modelize the heap locations we manufacture fictious reference, that triggered a bug when it appears as an argument of entity_user_name().
obj | bj |
Definition at line 215 of file prettyprint.c.
References CHAIN_SWORD, entity_name, NIL, and reference_variable.
Referenced by word_points_to().
list words_pointer_value | ( | cell_relation | pv | ) |
pv | v |
Definition at line 428 of file prettyprint.c.
References approximation_exact_p, approximation_may_p, cell_gap_p, cell_preference_p, cell_reference, cell_relation_approximation, cell_relation_first_cell, cell_relation_first_value_of_p, cell_relation_second_cell, CHAIN_SWORD, effect_words_reference(), gen_nconc(), NIL, and pips_assert.
list words_points_to_list | ( | string | , |
points_to_list | |||
) |