46 #include "pips_config.h"
73 #include "constants.h"
253 pips_assert(
"post is a consistent transformer if pre is defined",
319 pips_assert(
"One postcondition for each transformer",
344 pips_assert(
"post_r is a consistent transformer if pre is defined",
420 pips_debug(8,
"tftwc before transformer_temporary_value_projection %p:\n", tftwc);
426 pips_debug(8,
"tftwc before transformer_apply %p:\n", tftwc);
433 pips_debug(8,
"tftwc after transformer_apply %p:\n", tftwc);
435 pips_debug(8,
"post_tftwc after transformer_apply %p:\n", post_tftwc);
448 pips_debug(8,
"post_tftwc before transformer_convex_hull %p:\n", post_tftwc);
450 pips_debug(8,
"post_tffwc after transformer_apply %p:\n", post_tffwc);
703 pips_debug(6,
"return tl=%lx\n", (
unsigned long)tl);
728 pips_debug(9,
"A transformer has been obtained:\n");
752 pips_debug(9,
"After substitution v_new=%s -> v_old=%s\n",
757 pips_debug(9,
"After substitution tmp=%s -> v_new=%s\n",
765 pips_debug(9,
"After temporary value projection, tf=%p:\n", tf);
969 (
void)
fprintf(stderr,
"undefined list\n");
991 pips_debug(8,
"begin for statement %03td (%td,%td) with precondition %p:\n",
995 pips_assert(
"The statement and its substatements are fully defined",
1076 (void)
fprintf(stderr,
"statement %03td (%td,%td):\n",
1085 pips_assert(
"Transformer is internally consistent",
1106 pips_assert(
"transformers are computed in context",
1108 pips_debug(1,
"Convex hull for transformer of statement %03td (%td,%td)\n",
1151 pips_assert(
"The statement and its substatements are still fully defined",
int get_int_property(const string)
void free_transformer(transformer p)
expression copy_expression(expression p)
EXPRESSION.
bool transformer_consistent_p(transformer p)
void free_expression(expression p)
transformer copy_transformer(transformer p)
TRANSFORMER.
struct _newgen_struct_entity_ * entity
void free_arguments(cons *args)
bool entity_is_argument_p(entity e, cons *args)
transformer transformer_add_modified_variable(transformer tf, entity var)
FI: this function does not end up with a consistent transformer because the old value is not added to...
transformer transformer_dup(transformer t_in)
transformer package - basic routines
transformer transformer_add_value_update(transformer t, entity v)
Add an update of variable v to t (a value cannot be updated)
transformer precondition_to_abstract_store(transformer pre)
Get rid of all old values and arguments.
void transformer_free(transformer t)
transformer transformer_add_modified_variable_entity(transformer tf, entity var)
FI: like the previous function, but supposed to end up with a consistent transformer.
bool transformers_consistency_p(list tl)
transformer transformer_identity()
Allocate an identity transformer.
bool transformer_consistency_p(transformer t)
FI: I do not know if this procedure should always return or fail when an inconsistency is found.
transformer transformer_empty()
Allocate an empty transformer.
bool transformer_internal_consistency_p(transformer t)
Same as above but equivalenced variables should not appear in the argument list or in the predicate b...
bool refine_transformers_p
Transformer recomputation cannot be of real use unless an interprocedural analysis is performed.
list load_cumulated_rw_effects_list(statement)
bool some_integer_scalar_read_or_write_effects_p(cons *)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
void gen_full_free_list(list l)
#define ENDP(l)
Test if a list is empty.
#define list_undefined_p(c)
Return if a list is undefined.
#define POP(l)
Modify a list pointer to point on the next element of the list.
#define NIL
The empty list (nil in Lisp)
size_t gen_length(const list l)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
#define CAR(pcons)
Get the value of the first element of a list.
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define CDR(pcons)
Get the list less its first element.
#define list_undefined
Undefined list definition :-)
bool all_statements_defined_p(statement)
bool declaration_statement_p(statement)
Had to be optimized according to Beatrice Creusillet.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
string expression_to_string(expression e)
#define print_transformer(t)
#define dump_transformer(t)
#define pips_flag_p(p)
for upwards compatibility with Francois's modified version
#define SEMANTICS_FLOW_SENSITIVE
#define ENTITY_PLUS_UPDATE_P(e)
#define ENTITY_MODULO_UPDATE_P(e)
#define ENTITY_BITWISE_AND_UPDATE_P(e)
#define ENTITY_ASSIGN_P(e)
#define ENTITY_COMMA_P(e)
#define ENTITY_ASSERT_SYSTEM_P(e)
include <assert.h>
#define ORDERING_NUMBER(o)
#define ORDERING_STATEMENT(o)
#define NORMALIZE_EXPRESSION(e)
#define statement_block_p(stat)
#define ENTITY_PRE_DECREMENT_P(e)
#define ENTITY_POST_DECREMENT_P(e)
#define ENTITY_POST_INCREMENT_P(e)
#define ENTITY_EXIT_SYSTEM_P(e)
#define ENTITY_CONDITIONAL_P(e)
#define ENTITY_RIGHT_SHIFT_UPDATE_P(e)
#define ENTITY_PRE_INCREMENT_P(e)
#define ENTITY_BITWISE_OR_UPDATE_P(e)
#define is_instruction_block
soft block->sequence transition
#define ENTITY_ABORT_SYSTEM_P(e)
#define ENTITY_MULTIPLY_UPDATE_P(e)
#define ENTITY_DIVIDE_UPDATE_P(e)
#define ENTITY_C_RETURN_P(e)
#define ENTITY_BITWISE_XOR_UPDATE_P(e)
#define instruction_block(i)
#define ENTITY_MINUS_UPDATE_P(e)
#define ENTITY_LEFT_SHIFT_UPDATE_P(e)
#define ENTITY_ASSERT_FAIL_SYSTEM_P(e)
#define PLUS_C_OPERATOR_NAME
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
entity update_operator_to_regular_operator(entity op)
Returns the binary operator associated to a C update operator such as +=.
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
expression variable_initial_expression(entity)
Returns a copy of the initial (i.e.
bool variable_static_p(entity)
true if v appears in a SAVE statement, or in a DATA statement, or is declared static i C.
#define syntax_reference_p(x)
#define transformer_undefined
#define transformer_undefined_p(x)
#define syntax_reference(x)
#define normalized_linear_p(x)
#define reference_variable(x)
#define TRANSFORMER(x)
TRANSFORMER.
#define instruction_loop(x)
#define statement_ordering(x)
#define EXPRESSION(x)
EXPRESSION.
#define expression_undefined
@ is_instruction_unstructured
@ is_instruction_whileloop
@ is_instruction_expression
#define instruction_tag(x)
#define transformer_arguments(x)
#define reference_indices(x)
#define instruction_forloop(x)
#define expression_undefined_p(x)
#define test_condition(x)
#define instruction_whileloop(x)
#define statement_declarations(x)
#define statement_instruction(x)
#define instruction_call(x)
#define instruction_test(x)
#define statement_number(x)
#define normalized_linear(x)
#define expression_syntax(x)
#define STATEMENT(x)
STATEMENT.
void transformer_add_reference_information(transformer tf, statement s)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
#define semantics_user_warning
transformer any_expression_to_transformer(entity v, expression expr, transformer pre, bool is_internal)
A set of functions to compute the transformer associated to an expression evaluated in a given contex...
transformer expressions_to_transformer(list expl, transformer pre)
Compute the transformer associated to a list of expressions such as "i=0, j = 1;".
transformer conditional_to_transformer(expression cond, expression te, expression fe, transformer pre, list ef)
FI: not too smart to start with the special case with no value returned, just side-effects....
transformer condition_to_transformer(expression cond, transformer pre, bool veracity)
To capture side effects and to add C twist for numerical conditions.
list complete_loop_transformer_list(transformer ltf, transformer pre, loop l)
list complete_forloop_transformer_list(transformer t_body_star, transformer pre, forloop fl)
list complete_whileloop_transformer_list(transformer ltf, transformer pre, whileloop wl)
list dynamic_variables_to_values(list list_mod)
Build the list of values to be projected when the declaration list list_mod is no longer valid becaus...
transformer load_statement_precondition(statement)
void store_statement_transformer(statement, transformer)
transformer load_statement_transformer(statement)
void update_statement_transformer(statement, transformer)
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
struct Svecteur * Pvecteur