25 #include "pips_config.h"
119 debug(8,
"block_to_postcondition",
"begin pre=%x\n", b_pre);
151 # define DEBUG_TEST_TO_POSTCONDITION 7
567 pips_debug(9,
"begin pre=%p tf=%p\n", pre, tf);
645 pips_assert(
"Reference dimension = array dimension",
729 pips_assert(
"The statement precondition is defined",
734 (void)
fprintf(stderr,
"statement %03td (%d,%d), precondition %p:\n",
740 pips_assert(
"The statement transformer is defined",
744 (void)
fprintf(stderr,
"statement %03td (%d,%d), transformer %p:\n",
765 list non_initial_values =
879 fprintf(stderr,
"statement %03td (%d,%d), precondition %p end:\n",
910 pips_debug(8,
"precondition already available\n");
920 fprintf(stderr,
"statement %03td (%d,%d), precondition %p end:\n",
928 fprintf(stderr,
"statement %03td (%d,%d), postcondition %p:\n",
1005 (*process_initial_expression)(ie, pre);
1017 (*process_initial_expression)(ie, post);
1034 pips_assert(
"post is a consistent transformer if pre is defined",
int get_int_property(const string)
void free_transformer(transformer p)
expression make_expression(syntax a1, normalized a2)
void free_expression(expression p)
syntax make_syntax(enum syntax_utype tag, void *val)
transformer copy_transformer(transformer p)
TRANSFORMER.
cons * arguments_difference(cons *a1, cons *a2)
set difference: a1 - a2 ; similar to set intersection
#define int_to_value(i)
end LINEAR_VALUE_IS_INT
transformer transformer_dup(transformer t_in)
transformer package - basic routines
transformer transformer_inequality_add(transformer tf, Pvecteur i)
transformer transformer_equality_add(transformer tf, Pvecteur i)
transformer empty_transformer(transformer t)
Do not allocate an empty transformer, but transform an allocated transformer into an empty_transforme...
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.
bool vect_constant_p(Pvecteur)
bool vect_constant_p(Pvecteur v): v contains only a constant term, may be zero
bool statement_reachable_p(statement)
Test if the given statement is reachable from some statements given at init_reachable(start)
list load_module_intraprocedural_effects(entity e)
list load_proper_rw_effects_list(statement)
list expression_to_proper_constant_path_effects(expression)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
entity get_current_module_entity(void)
Get the entity of the current module.
#define ENDP(l)
Test if a list is empty.
list gen_nreverse(list cp)
reverse a list in place
#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)
#define CAR(pcons)
Get the value of the first element of a list.
void gen_free_list(list l)
free the spine of the list
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define MAPL(_map_list_cp, _code, _l)
Apply some code on the addresses of all the elements of a list.
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
loop statement_loop(statement)
Get the loop of a statement.
bool empty_statement_p(statement)
Test if a statement is empty.
bool statement_loop_p(statement)
bool declaration_statement_p(statement)
Had to be optimized according to Beatrice Creusillet.
bool linear_hashtable_isin(linear_hashtable_pt h, void *k)
void linear_hashtable_put_once(linear_hashtable_pt h, void *k, void *v)
linear_hashtable_pt linear_hashtable_make(void)
constructor.
void linear_hashtable_free(linear_hashtable_pt h)
destructor
string instruction_identification(instruction i)
Return a constant string representing symbolically the instruction type.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_user_warning
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
#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 SEMANTICS_INTERPROCEDURAL
#define ENTITY_ASSIGN_P(e)
#define ORDERING_NUMBER(o)
#define ORDERING_STATEMENT(o)
#define NORMALIZE_EXPRESSION(e)
#define statement_block_p(stat)
#define is_instruction_block
soft block->sequence transition
#define instruction_block(i)
bool c_module_p(entity m)
Test if a module "m" is written in C.
const char * module_local_name(entity e)
Returns the module local user name.
bool c_language_module_p(entity m)
bool fortran95_language_module_p(entity m)
bool fortran_language_module_p(entity m)
statement pop_statement_global_stack(void)
expression variable_initial_expression(entity)
Returns a copy of the initial (i.e.
void push_statement_on_statement_global_stack(statement)
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 normalized_undefined
#define transformer_undefined
#define functional_result(x)
#define transformer_undefined_p(x)
#define value_constant(x)
#define normalized_linear_p(x)
#define reference_variable(x)
#define instruction_loop(x)
#define statement_ordering(x)
#define type_functional(x)
#define dimension_lower(x)
#define whileloop_evaluation(x)
#define basic_pointer_p(x)
#define value_constant_p(x)
#define EXPRESSION(x)
EXPRESSION.
#define constant_int_p(x)
@ is_instruction_unstructured
@ is_instruction_whileloop
@ is_instruction_expression
@ is_instruction_multitest
#define instruction_tag(x)
#define transformer_arguments(x)
#define dimension_upper(x)
#define reference_indices(x)
#define constant_call_p(x)
#define instruction_forloop(x)
#define instruction_expression(x)
#define expression_undefined_p(x)
#define test_condition(x)
#define instruction_whileloop(x)
#define variable_dimensions(x)
#define statement_declarations(x)
#define statement_instruction(x)
#define instruction_call(x)
#define call_arguments(x)
#define instruction_test(x)
#define basic_string_p(x)
#define statement_number(x)
#define value_expression_p(x)
#define normalized_linear(x)
#define expression_syntax(x)
#define evaluation_before_p(x)
#define type_variable_p(x)
#define value_expression(x)
#define instruction_unstructured(x)
#define variable_basic(x)
#define basic_logical_p(x)
#define STATEMENT(x)
STATEMENT.
#define entity_initial(x)
static transformer block_to_postcondition(transformer b_pre, list b)
void precondition_add_reference_information(transformer pre, statement s)
static transformer expression_to_postcondition(transformer pre, expression exp, transformer tf)
static void add_reference_information(transformer pre, statement s, bool renaming)
Assume that all references are legal.
transformer data_to_precondition(entity m)
restricted to variables with effects.
static list module_global_arguments
semantical analysis
static transformer c_data_to_prec_for_variables(entity m, list le)
void precondition_add_type_information(transformer pre)
void transformer_add_reference_information(transformer tf, statement s)
list effects_to_entity_list(list lef)
returns an allocated list of entities that appear in lef.
void set_module_global_arguments(list args)
static transformer test_to_postcondition(transformer pre, test t, transformer tf)
static transformer call_to_postcondition(transformer pre, call c, transformer tf)
static transformer fortran_data_to_prec_for_variables(entity m, list le)
a remake that works in all cases.
static transformer data_to_prec_for_variables(entity m, list le)
transformer statement_to_postcondition(transformer, statement)
end of the non recursive section
transformer all_data_to_precondition(entity m)
any variable is included.
#define DEBUG_TEST_TO_POSTCONDITION
static transformer instruction_to_postcondition(transformer pre, instruction i, transformer tf)
list get_module_global_arguments()
ri_to_preconditions.c
transformer propagate_preconditions_in_declarations(list dl, transformer pre, void(*process_initial_expression)(expression, transformer))
This function is mostly copied from declarations_to_transformer().
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
transformer safe_any_expression_to_transformer(entity v, expression expr, transformer pre, bool is_internal)
Always return a usable transformer.
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 expression_to_transformer(expression exp, transformer pre, list el)
Just to capture side effects as the returned value is ignored.
transformer condition_to_transformer(expression cond, transformer pre, bool veracity)
To capture side effects and to add C twist for numerical conditions.
transformer whileloop_to_postcondition(transformer pre, whileloop l, transformer tf)
transformer repeatloop_to_postcondition(transformer pre, whileloop wl, transformer t_body_star)
transformer forloop_to_postcondition(transformer pre, forloop fl, transformer t_body_star)
transformer loop_to_postcondition(transformer pre, loop l, transformer tf)
transformer tf_equivalence_equalities_add(transformer tf)
mappings.c
bool value_mappings_compatible_vector_p(Pvecteur iv)
transform a vector based on variable entities into a vector based on new value entities when possible...
list variables_to_values(list list_mod)
void upwards_vect_rename(Pvecteur v, transformer post)
Renaming of variables in v according to transformations occuring later.
list variable_to_values(entity e)
void transformer_add_type_information(transformer)
type.c
transformer load_statement_precondition(statement)
transformer unstructured_to_postcondition(transformer, unstructured, transformer)
transformer load_statement_transformer(statement)
void store_statement_precondition(statement, transformer)
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
hidden structure to store the hashtable.
#define exp
Avoid some warnings from "gcc -Wshadow".
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define VECTEUR_NUL
DEFINITION DU VECTEUR NUL.
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Pvecteur vect_make(Pvecteur v, Variable var, Value val,...)
Pvecteur vect_make(v, [var, val,]* 0, val) Pvecteur v; // may be NULL, use assigne anyway Variable va...
void vect_rm(Pvecteur v)
void vect_rm(Pvecteur v): desallocation des couples de v;
Pvecteur vect_substract(Pvecteur v1, Pvecteur v2)
Pvecteur vect_substract(Pvecteur v1, Pvecteur v2): allocation d'un vecteur v dont la valeur est la di...
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...
list module_to_all_declarations(entity m)