47 #ifdef DEBUG_UNION_LINEAR
63 {
return( (in_ps->
nb_eq == 0) && (in_ps->
nb_ineq == 0) &&
78 if (!SC_UNDEFINED_P(in_ps)) {
107 #line 106 "sc_list.w"
116 #line 117 "sc_list.w"
133 for(pc = in_ps->
egalites; pc != NULL; ) {
145 free((
char *) in_ps);
151 #line 155 "sc_list.w"
164 if (SC_UNDEFINED_P(in_s1)) {
s1 =
sc_free1(
s1);
return(s2);}
165 if (SC_UNDEFINED_P(in_s2)) {s2 =
sc_free1(s2);
return(
s1);}
167 if (
s1->nb_eq != 0) {
173 if (
s1->nb_ineq != 0) {
188 #line 202 "sc_list.w"
197 if (in_sl == NULL)
return 0;
198 for(length = 0; sl != NULL; sl = sl->
succ, length++);
202 #line 220 "sc_list.w"
213 if (in_sl == NULL)
return 0;
215 for(; in_sl != NULL; in_sl = in_sl->
succ) {
220 if (loc > ret_int) ret_int = loc;
225 #line 246 "sc_list.w"
233 #line 256 "sc_list.w"
246 if (in_ps == NULL)
return( in_sl );
251 #line 277 "sc_list.w"
262 if (in_ps == NULL)
return( in_sl );
264 if (in_sl ==
SL_NULL)
return new_sl;
265 if (in_sl->
succ == NULL) { in_sl->
succ = new_sl ;
return in_sl; }
266 for(sl = in_sl; (sl->succ != NULL); sl = sl->
succ) {}
271 #line 298 "sc_list.w"
283 (void)
fprintf(stderr,
"sl_new: Out of memory space\n");
290 #line 318 "sc_list.w"
300 for( sl = in_sl; sl != NULL; sl = sl->
succ ) {
306 #line 336 "sc_list.w"
315 for( sl = in_sl; sl != NULL; sl = sl->
succ ) {
316 if ( sl->
psys == SC_UNDEFINED )
continue;
322 #line 354 "sc_list.w"
332 psl->succ =
sl_free(psl->succ);
333 free( psl ); psl = NULL;
338 #line 373 "sc_list.w"
370 static char name[20];
375 if (in_tab == 0)
return strdup(
"");
376 assert( (in_tab > 0) && (in_tab < 20) );
377 for(d = 0; d < in_tab; d++){ sprintf(&name[d],
"\t"); }
395 fprintf( in_fi,
"\n%sSL_NULL\n", tabs );
400 for(sl = in_sl; sl != NULL; sl = sl->
succ) {
401 if (sl->
psys == NULL)
continue;
417 for(sl = in_sl ; sl != NULL; sl = sl->
succ) {
423 if ( SC_UNDEFINED_P(ps) )
424 {
fprintf( in_fi,
"\n%sSC_UNDEFINED\n", tabs);
continue; }
426 {
fprintf( in_fi,
"\n%sSC_FULL\n", tabs);
continue; }
428 {
fprintf( in_fi,
"\n%sSC_EMPTY\n", tabs);
continue; }
432 fprintf(in_fi,
"\n%s { \n", tabs);
442 fprintf(in_fi,
"%s } \n", tabs);
464 if ((
slx_in = fopen(nomfic,
"r")) == NULL) {
465 (void)
fprintf(stderr,
"Ouverture du fichier %s impossible\n",nomfic);
485 fprintf ( in_fi,
"Systeme:\n");
Pbase base_union(Pbase b1, Pbase b2)
Pbase base_union(Pbase b1, Pbase b2): compute a new basis containing all elements of b1 and all eleme...
#define contrainte_vecteur(c)
passage au champ vecteur d'une contrainte "a la Newgen"
Pcontrainte contrainte_new(void)
package contrainte - allocations et desallocations
void egalite_fprint(FILE *, Pcontrainte, char *(*)(Variable))
void inegalite_fprint(FILE *, Pcontrainte, char *(*)(Variable))
int vect_size(Pvecteur v)
package vecteur - reductions
char * variable_default_name(Variable v)
char * variable_default_name(Variable v): returns the name of variable v
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...
struct Ssysteme * Psysteme
void sc_creer_base(Psysteme ps)
void sc_creer_base(Psysteme ps): initialisation des parametres dimension et base d'un systeme lineair...
void sc_rm(Psysteme ps)
void sc_rm(Psysteme ps): liberation de l'espace memoire occupe par le systeme de contraintes ps;
void sc_add_egalite(Psysteme p, Pcontrainte e)
void sc_add_egalite(Psysteme p, Pcontrainte e): macro ajoutant une egalite e a un systeme p; la base ...
Psysteme sc_new(void)
Psysteme sc_new(): alloue un systeme vide, initialise tous les champs avec des valeurs nulles,...
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_add_inegalite(Psysteme p, Pcontrainte i)
void sc_add_inegalite(Psysteme p, Pcontrainte i): macro ajoutant une inegalite i a un systeme p; la b...
Psysteme sc_dup(Psysteme ps)
Psysteme sc_dup(Psysteme ps): should becomes a link.
Value b1
booleen indiquant quel membre est en cours d'analyse
Pcontrainte eq
element du vecteur colonne du systeme donne par l'analyse
Pvecteur cp
pointeur sur l'egalite ou l'inegalite courante
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...
Psyslist sl_append_system_first(Psyslist in_sl, Psysteme in_ps)
Psyslist sl_append_system_first( in_sl, in_ps ) AL 23/03/95 A new Psyslist with in_ps at the end of i...
void sl_fprint(in_fi, in_sl, char *(*in_fu)())
void sl_set_variable_name(char *(*in_fu)())
char* sl_set_variable_name( in_fu ) give the function to read variables
Psysteme sc_dup1(Psysteme in_ps)
Psysteme sc_dup1( in_ps ) AL 30/05/94 1 depth copy of in_ps: no duplication of vectors (except for th...
Psysteme sc_free(Psysteme in_ps)
Psysteme sc_free( in_ps ) AL 30/05/94 Free of in_ps.
Psyslist sl_free1(Psyslist psl)
Psyslist sl_free1(Psyslist psl) AL 30/05/94 1 depth free.
Psysteme sc_full()
Psysteme sc_full() similar to sc_new.
Psyslist sl_free(Psyslist psl)
Psyslist sl_free(Psyslist psl) BA, AL 30/05/94 w - 1 depth free.
bool sl_is_system_p(Psyslist in_sl)
bool sl_is_system_p( (Psyslist) in_sl ) AL 16/11/93 Returns True if syslist in_sl has only one Psyste...
char *(* union_variable_name)(Variable)
Package : C3/union Author : Arnauld LESERVOT (leservot(a)limeil.cea.fr) Date : Modified : 04 04 95 ...
Psyslist sl_append_system(Psyslist in_sl, Psysteme in_ps)
Psyslist sl_append_system( (Psyslist) in_sl, (Psysteme) in_ps ) Input : A disjunct in_sl to wich in_p...
Psyslist sl_dup1(Psyslist in_sl)
Psyslist sl_dup1( (Psyslist) in_sl ) AL 15/11/93 Duplicates input syslist.
Psysteme sc_concatenate(Psysteme in_s1, Psysteme in_s2)
Psysteme sc_concatenate( in_s1, in_s2 ) AL 30/05/94 Append in_s2 to the end of in_s1 and returns in_s...
Psysteme sc_free1(Psysteme in_ps)
Psysteme sc_free1( in_ps ) AL 30/05/94 Only pcontrainte of in_ps are freed.
int sl_max_constraints_nb(Psyslist in_sl)
int sl_max_constraints_nb( (Psyslist) in_sl ) Give the maximum constraints nb among systems of in_sl.
char * sl_get_tab_string(int in_tab)
char* sl_get_tab_string( in_tab ) returns a string of in_tab \t
Psyslist sl_read(char *nomfic)
void sl_read(FILE*) reads a Psyslist
void un_fprint_tab(FILE *in_fi, char *in_un, char *(*in_fu)(), int in_ty, int in_tab)
void un_fprint_tab(FILE*, Pdisjunct, function, type, tab) prints a union
bool sc_full_p(Psysteme in_ps)
Psysteme sc_full_p( in_ps ) similar to sc_new.
Psyslist sl_dup(Psyslist in_sl)
Psyslist sl_dup( (Psyslist) in_sl ) AL 15/11/93 w - 1 duplication : everything is duplicated,...
FILE * slx_in
Psysteme construit par sl_gram.y.
int slx_parse(void)
fichier lu par sl_lex.l
Psyslist sl_new()
Psyslist sl_new() AL 26/10/93 Input : Nothing.
bool sl_length(Psyslist in_sl)
int sl_length( (Psyslist) in_sl ) AL 26/04/95 Returns length of in_sl.
void sl_fprint_tab(FILE *in_fi, Psyslist in_sl, char *(*in_fu)(), int in_tab)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
struct Scontrainte * succ
Warning! Do not modify this file that is automatically generated!
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
#define pa_fprint(fi, pa, fu)
#define dj_fprint(fi, dj, fu)
struct Ssyslist * Psyslist
#define VECTEUR_UNDEFINED
struct Svecteur * Pvecteur
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
#define VECTEUR_UNDEFINED_P(v)
Pvecteur vect_dup(Pvecteur v_in)
Pvecteur vect_dup(Pvecteur v_in): duplication du vecteur v_in; allocation de et copie dans v_out;.
void vect_rm(Pvecteur v)
void vect_rm(Pvecteur v): desallocation des couples de v;