25 #include "pips_config.h"
129 fprintf(stderr,
" %s running between ",
167 fprintf(stderr,
"complexity_var_subst, variable name=%s\n",
184 fprintf(stderr,
"complexity_var_subst, comp is ");
186 fprintf(stderr,
"complexity_var_subst, compsubst is ");
188 fprintf(stderr,
"complexity_var_subst, cresult is ");
540 fprintf(stderr,
"in REPLACE, entity name is %s\n",
552 fprintf(stderr,
"formal offset=%d, formal name=%s\n",
553 param_rank, param_name);
583 for( ; --ith > 0; thelist =
CDR(thelist) ) {
rangecount make_rangecount(intptr_t a1, intptr_t a2, intptr_t a3, intptr_t a4)
varcount make_varcount(intptr_t a1, intptr_t a2, intptr_t a3, intptr_t a4)
ifcount make_ifcount(intptr_t a1, intptr_t a2, intptr_t a3)
complexity make_complexity(Ppolynome a1, varcount a2, rangecount a3, ifcount a4)
bool complexity_consistent_p(complexity p)
complexity expression_to_complexity_polynome(expression expr, transformer precond, list effects_list, bool keep_symbols, int maximize)
Entry point routine of this file:
void complexity_add(complexity *pcomp1, complexity comp2)
void complexity_add(complexity *pcomp1, comp2) performs *pcomp1 = *pcomp1 + comp2; !...
void complexity_scalar_mult(complexity *pcomp, float f)
multiply a complexity by a floating-point number.
void complexity_polynome_add(complexity *pcomp, Ppolynome pp)
Ppolynome complexity_polynome(complexity comp)
Because complexity is composed of two elements, we use this function to get the first element : polyn...
float complexity_TCST(complexity comp)
return the constant term of comp.
void complexity_div(complexity *pcomp1, complexity comp2)
void complexity_div(complexity *pcomp1, comp2) performs *pcomp1 = *pcomp1 / comp2; !...
void complexity_float_add(complexity *pcomp, float f)
Add a floating point digit to the complexity May 3, 91.
complexity replace_formal_parameters_by_real_ones(complexity comp, entity mod, list args, transformer precond, list effects_list)
transform formal params into real ones (args) in complexity comp
bool complexity_constant_p(complexity comp)
true if comp is constant.
list list_ith_element(list thelist, int ith)
return a pointer to the (i)th element of the list if i = 1, the pointer doesn't change at all.
complexity make_zero_complexity()
make a zero complexity "0.0000 * TCST" with null statistics
complexity complexity_var_subst(complexity comp, Variable var, complexity compsubst)
complexity complexity_var_subst(comp, var, compsubst) replaces every occurrence of variable var in co...
complexity make_constant_complexity(float f)
make a constant complexity "f * TCST" with null statistics
complexity complexity_sigma(complexity comp, Variable index, complexity clower, complexity cupper)
comp_math.c
void complexity_stats_add(complexity *pcomp1, complexity comp2)
Add comp2's statistics to *pcomp1's comp2 keeps unchanged.
void complexity_mult(complexity *pcomp1, complexity comp2)
void complexity_mult(complexity *pcomp1, comp2) performs *pcomp1 = *pcomp1 * comp2; !...
bool complexity_zero_p(complexity comp)
zero complexity check.
void complexity_sub(complexity *pcomp1, complexity comp2)
void complexity_sub(complexity *pcomp1, comp2) performs *pcomp1 = *pcomp1 - comp2; !...
complexity polynome_to_new_complexity(Ppolynome pp)
Create a complexity equal to Ppolynome pp with null statistics.
bool complexity_unknown_p(complexity comp)
true if comp is unknown.
complexity make_single_var_complexity(float f, Variable var)
make a complexity "f * var" with null statistics
void complexity_rm(complexity *pcomp)
remove complexity comp
void complexity_fprint(FILE *fd, complexity comp, bool print_stats_p, bool print_local_names_p)
complexity complexity_dup(complexity comp)
duplicates complexity comp
#define KEEP_SYMBOLS
defines for "expression_to_polynome" parameters
#define COMPLEXITY_UNDEFINED_P(c)
#define UNKNOWN_RANGE_NAME
pseudo-variable for default iteration number of a loop
#define ifcount_computed(x)
#define complexity_eval(x)
#define rangecount_unknown(x)
#define varcount_guessed(x)
#define complexity_eval_(x)
#define complexity_ifcount(x)
#define ifcount_profiled(x)
#define newgen_Ppolynome(p)
#define complexity_varcount(x)
#define complexity_rangecount(x)
#define rangecount_guessed(x)
#define varcount_symbolic(x)
#define varcount_unknown(x)
#define varcount_bounded(x)
#define rangecount_profiled(x)
#define ifcount_halfhalf(x)
#define rangecount_bounded(x)
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 NIL
The empty list (nil in Lisp)
#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.
list gen_nthcdr(int n, const list lx)
caution: the first item is 0! was: return( (n<=0) ? l : gen_nthcdr( n-1, CDR( l ))) ; if n>gen_length...
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Ppolynome make_polynome(float coeff, Variable var, Value expo)
Ppolynome make_polynome(float coeff, Variable var, Value expo) PRIVATE allocates space for,...
Ppolynome polynome_dup(Ppolynome pp)
Ppolynome polynome_dup(Ppolynome pp) creates and returns a copy of pp.
void polynome_rm(Ppolynome *ppp)
void polynome_rm(Ppolynome* ppp) frees space occupied by polynomial *ppp returns *ppp pointing to POL...
Ppolynome polynome_free(Ppolynome pp)
Ppolynome polynome_free(Ppolynome pp) frees space occupied by polynomial pp returns pp == POLYNOME_NU...
Ppolynome polynome_addition(Ppolynome pp, Ppolynome pp2)
Ppolynome polynome_addition(Ppolynome pp, Ppolynome pp2) pp = pp + pp2.
Ppolynome polynome_div(Ppolynome pp1, Ppolynome pp2)
Ppolynome polynome_div(Ppolynome pp1, Ppolynome pp2) returns p = pp1 / pp2.
Ppolynome polynome_mult(Ppolynome pp1, Ppolynome pp2)
Ppolynome polynome_mult(Ppolynome pp1, Ppolynome pp2) returns pp1 * pp2.
float polynome_TCST(Ppolynome pp)
float polynome_TCST(Ppolynome pp) returns the constant term of polynomial pp.
Ppolynome polynome_var_subst(Ppolynome pp, Variable var, Ppolynome ppsubst)
Ppolynome polynome_var_subst(Ppolynome pp, Variable var, Ppolynome ppsubst) creates and returns a Ppo...
bool polynome_constant_p(Ppolynome pp)
bool polynome_constant_p(Ppolynome pp) return true if pp is a constant polynomial (including null pol...
bool polynome_contains_var(Ppolynome pp, Variable var)
bool polynome_contains_var(Ppolynome pp, Variable var) PRIVATE returns true if variable var is in pol...
Ppolynome polynome_scalar_addition(Ppolynome pp, float term)
Ppolynome polynome_scalar_addition(Ppolynome pp, float term) pp = pp + term !usage: pp = polynome_sca...
Ppolynome polynome_scalar_multiply(Ppolynome pp, float factor)
Ppolynome polynome_scalar_multiply(Ppolynome pp, float factor) pp = factor * (pp) !...
Ppolynome polynome_sigma(Ppolynome pp, Variable var, Ppolynome ppinf, Ppolynome ppsup)
Ppolynome polynome_sigma(Ppolynome pp, Variable var, Ppolynome ppinf, ppsup) returns the sum of pp wh...
Ppolynome polynome_opposed(Ppolynome pp)
Ppolynome polynome_opposed(Ppolynome pp); changes sign of polynomial pp.
#define POLYNOME_UNDEFINED_P(pp)
#define POLYNOME_NUL_P(pp)
const char * module_local_name(entity e)
Returns the module local user name.
bool entity_module_p(entity e)
basic MakeBasic(int)
END_EOLE.
void AddEntityToCurrentModule(entity)
Add a variable entity to the current module declarations.
entity make_new_scalar_variable_with_prefix(const char *, entity, basic)
Create a new scalar variable of type b in the given module.
#define storage_formal_p(x)
#define entity_storage(x)
#define code_declarations(x)
#define storage_formal(x)
#define EXPRESSION(x)
EXPRESSION.
#define entity_initial(x)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
char * variable_name(Variable v)
polynome_ri.c
The structure used to build lists in NewGen.
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....