25 #include "pips_config.h"
65 return is_inegalite? (a_la_fortran?
".LE.":
"<="):
66 (a_la_fortran?
".EQ.":
"==");
189 short int debut =
true;
190 int positive_terms = 0;
191 int negative_terms = 0;
192 Value const_coeff = 0;
193 bool const_coeff_p =
false;
201 positive_terms++ : negative_terms++;
204 if(negative_terms > positive_terms)
228 else positive_terms--;
232 if(positive_terms == 0)
244 if(
term_cst(coord) && !is_inegalite) {
246 const_coeff_p =
true;
268 if(negative_terms == 0)
271 else if(const_coeff_p)
305 switch(heuristique) {
308 a_la_fortran, first_line);
312 a_la_fortran, first_line);
362 bool invert_put_first,
368 for (; cs; cs=cs->
succ)
370 if (put_first? (invert_put_first ^ put_first(cs->
vecteur)):
true)
373 else some_previous =
true;
385 return some_previous;
400 bool invert, stop, some_previous =
false;
407 else if (SC_UNDEFINED_P(ps))
426 for(invert =
false, stop =
false; !stop; )
433 some_previous,
false, a_la_fortran);
440 some_previous,
true, a_la_fortran);
442 if (invert || !put_first) stop =
true;
473 const char* (*var_name)(
entity))
478 const char ** provi = (
const char **)
malloc(
sizeof(
char *) * len);
479 bool some_previous =
false;
489 else some_previous =
true;
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
#define value_notzero_p(val)
#define value_uminus(val)
unary operators on values
#define value_notone_p(val)
#define ABS(x)
was: #define value_mult(v,w) value_direct_multiply(v,w) #define value_product(v,w) value_direct_produ...
#define value_addto(ref, val)
char * Value_to_string(Value)
static void signed_operation_to_textline(string buffer, string signe, Value coeff, Variable var, char *(*variable_name)(Variable), string continuation, text t)
static string the_operator(bool is_inegalite, bool a_la_fortran)
static string contrainte_to_text_2(string buffer, string continuation, text txt, Pvecteur v, bool is_inegalite, string(*variable_name)(Variable), bool a_la_fortran, bool __attribute__((unused)) first_line)
FI: does not take into account constant floating point terms.
static void constante_to_textline(string buffer, Value constante, bool is_inegalite, bool a_la_fortran, string continuation, text t)
void inegalite_debug(Pcontrainte c)
string inegalite_text_format(string aux_line, string continuation, text txt, Pcontrainte ineg, string(*variable_name)(), bool a_la_fortran, bool first_line)
void system_sorted_text_format(string line, string prefix, text txt, Psysteme ps, string(*variable_name)(Variable), bool(*put_first)(Pvecteur), bool a_la_fortran)
lower level hook for regions.
string egalite_text_format(string aux_line, string continuation, text txt, Pcontrainte eg, string(*variable_name)(Variable), bool a_la_fortran, bool first_line)
static void unsigned_operation_to_textline(string buffer, Value coeff, Variable var, char *(*variable_name)(Variable), string continuation, text t)
static bool contraintes_text_format(string line, string prefix, text txt, Pcontrainte cs, string(*variable_name)(Variable), bool invert_put_first, bool(*put_first)(Pvecteur), bool some_previous, bool is_inegalites, bool a_la_fortran)
void entity_list_text_format(string line, string continuation, text t, list le, const char *(*var_name)(entity))
appends the list of entity...
void system_text_format(string line, string prefix, text txt, Psysteme ps, string(*variable_name)(Variable), bool a_la_fortran)
appends ps to line/txt with prefix continuations.
void sc_syst_debug(Psysteme s)
constraint_to_text.c
void egalite_debug(Pcontrainte c)
string contrainte_text_format(string aux_line, string continuation, text txt, Pcontrainte c, bool is_inegalite, string(*variable_name)(Variable), bool a_la_fortran, bool first_line)
static char * contrainte_to_text_1(string buffer, string continuation, text txt, Pvecteur v, bool is_inegalite, char *(*variable_name)(Variable), bool a_la_fortran, bool __attribute__((unused)) first_line)
static void add_separation(string line, string prefix, text txt, bool a_la_fortran)
static void add_Value_to_current_line(string buffer, Value v, string continuation, text t)
#define CONTRAINTE_UNDEFINED_P(c)
#define contrainte_vecteur(c)
passage au champ vecteur d'une contrainte "a la Newgen"
void egalite_fprint(FILE *, Pcontrainte, char *(*)(Variable))
void contrainte_error(char *, char *,...)
error.c
void inegalite_fprint(FILE *, Pcontrainte, char *(*)(Variable))
char * get_string_property(const char *)
size_t gen_length(const list l)
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
bool vect_check(Pvecteur cv)
bool vect_check(Pvecteur v): renvoie true si le vecteur v est coherent avec les specifications du pac...
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
int gen_qsort_string_cmp(const void *, const void *)
Callback for sorting string with qsort.
static const char * prefix
#define entity_constant_p(e)
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...
#define entity_undefined_p(x)
bool sc_empty_p(Psysteme sc)
bool sc_empty_p(Psysteme sc): check if the set associated to sc is the constant sc_empty or not.
void sc_fprint(FILE *fp, Psysteme ps, get_variable_name_t nom_var)
void sc_fprint(FILE * f, Psysteme ps, char * (*nom_var)()): cette fonction imprime dans le fichier po...
char * variable_name(Variable v)
polynome_ri.c
void vect_chg_sgn(Pvecteur v)
void vect_chg_sgn(Pvecteur v): multiplie v par -1
static int line
FLEX_SCANNER.
struct Scontrainte * succ
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
void add_to_current_line(string, const char *, string, text)
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define VECTEUR_NUL
DEFINITION DU VECTEUR NUL.
char *(* get_variable_name_t)(Variable)
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....