sc_list.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <time.h>
#include <sys/time.h>
#include "boolean.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
#include "sc.h"
#include "sommet.h"
#include "polyedre.h"
#include "union.h"
Include dependency graph for sc_list.c:

Go to the source code of this file.

Functions

Psysteme sc_full ()
 Psysteme sc_full() similar to sc_new.
boolean sc_full_p (Psysteme in_ps)
 Psysteme sc_full_p( in_ps ) similar to sc_new.
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 the base).
Psysteme sc_free (Psysteme in_ps)
 Psysteme sc_free( in_ps ) AL 30/05/94 Free of in_ps.
Psysteme sc_free1 (Psysteme in_ps)
 Psysteme sc_free1( in_ps ) AL 30/05/94 Only pcontrainte of in_ps are freed.
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_s1.
boolean sl_length (Psyslist in_sl)
 int sl_length( (Psyslist) in_sl ) AL 26/04/95 Returns length of in_sl.
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.
boolean sl_is_system_p (Psyslist in_sl)
 boolean sl_is_system_p( (Psyslist) in_sl ) AL 16/11/93 Returns True if syslist in_sl has only one Psysteme in it.
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_ps will be added.
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 in_sl (sharing).
Psyslist sl_new ()
 Psyslist sl_new() AL 26/10/93 Input : Nothing.
Psyslist sl_dup (Psyslist in_sl)
 Psyslist sl_dup( (Psyslist) in_sl ) AL 15/11/93 w - 1 duplication : everything is duplicated, except entities.
Psyslist sl_dup1 (Psyslist in_sl)
 Psyslist sl_dup1( (Psyslist) in_sl ) AL 15/11/93 Duplicates input syslist.
Psyslist sl_free (Psyslist psl)
 Psyslist sl_free(Psyslist psl) BA, AL 30/05/94 w - 1 depth free.
Psyslist sl_free1 (Psyslist psl)
 Psyslist sl_free1(Psyslist psl) AL 30/05/94 1 depth free.
void sl_set_variable_name (char *(*in_fu)())
 char* sl_set_variable_name( in_fu ) give the function to read variables
char * sl_get_tab_string (int in_tab)
 char* sl_get_tab_string( in_tab ) returns a string of in_tab
void sl_fprint_tab (FILE *in_fi, Psyslist in_sl, char *(*in_fu)(), int in_tab)
void sl_fprint (in_fi, in_sl, char *(*in_fu)())
Psyslist sl_read (char *nomfic)
 fichier lu par sl_lex.l
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

Variables

char *(* union_variable_name )(Variable) = variable_default_name
 Package : C3/union Author : Arnauld LESERVOT (leservot(a)limeil.cea.fr) Date : Modified : 04 04 95 Documents: UNION.tex : ``Extension de C3 aux unions de polyedres'' Comments :.
Psyslist sl_yacc
FILE * slx_in
 Psysteme construit par sl_gram.y.

Function Documentation

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_s1.

Freeable with sc_free1(). Sharing.

Memory management and returns

Parameters:
in_s1 n_s1
in_s2 n_s2

Definition at line 154 of file sc_list.c.

References eq, free(), NULL, s1, sc_creer_base(), sc_dup1(), sc_free1(), SC_UNDEFINED_P, and vect_rm().

00156 {
00157   Pcontrainte  eq;
00158   Psysteme  s1, s2;
00159 
00160   s1 = sc_dup1( in_s1 );      s2 = sc_dup1( in_s2 );
00161   if (SC_UNDEFINED_P(in_s1))  {s1 = sc_free1(s1); return(s2);}
00162   if (SC_UNDEFINED_P(in_s2))  {s2 = sc_free1(s2); return(s1);}
00163 
00164   if (s1->nb_eq != 0) {
00165     for (eq = s1->egalites; eq->succ != (Pcontrainte)NULL; eq = eq->succ) ;
00166     eq->succ = s2->egalites; s1->nb_eq += s2->nb_eq;
00167   } 
00168   else { s1->egalites = s2->egalites; s1->nb_eq = s2->nb_eq; }
00169   
00170   if (s1->nb_ineq != 0) {
00171     for (eq = s1->inegalites;eq->succ != (Pcontrainte)NULL;eq = eq->succ) ;
00172     eq->succ = s2->inegalites;  s1->nb_ineq += s2->nb_ineq;
00173   } 
00174   else { s1->inegalites = s2->inegalites; s1->nb_ineq = s2->nb_ineq; }
00175   
00176   /* Memory management and returns */
00177   vect_rm( s1->base ); vect_rm( s2->base ); free( s2 ); s2 = NULL;
00178   s1->base = NULL; sc_creer_base( s1 );
00179   return(s1);
00180 }

Here is the call graph for this function:

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 the base).

Sharing !

Parameters:
in_ps n_ps

Definition at line 69 of file sc_list.c.

References assert, contrainte_new(), cp, eq, NULL, sc_add_egalite(), sc_add_inegalite(), sc_new(), SC_UNDEFINED, SC_UNDEFINED_P, vect_dup(), vect_size(), VECTEUR_UNDEFINED, and VECTEUR_UNDEFINED_P.

Referenced by sc_concatenate().

00071 {
00072   Psysteme cp = SC_UNDEFINED;
00073   Pcontrainte eq, eq_cp;
00074   
00075   if (!SC_UNDEFINED_P(in_ps)) {
00076     cp = sc_new();
00077     
00078     for (eq = in_ps->egalites; eq != NULL; eq = eq->succ) {
00079       eq_cp = contrainte_new();
00080       contrainte_vecteur(eq_cp) = contrainte_vecteur(eq);
00081       sc_add_egalite(cp, eq_cp);
00082     }
00083     
00084     for(eq=in_ps->inegalites;eq!=NULL;eq=eq->succ) {
00085       eq_cp = contrainte_new();
00086       contrainte_vecteur(eq_cp) = contrainte_vecteur(eq);
00087       sc_add_inegalite(cp, eq_cp);
00088     }
00089 
00090     if(in_ps->dimension==0) {
00091       assert(VECTEUR_UNDEFINED_P(in_ps->base));
00092       cp->dimension = 0;
00093       cp->base = VECTEUR_UNDEFINED;
00094     }
00095     else {
00096       assert(in_ps->dimension==vect_size(in_ps->base));
00097       cp->dimension = in_ps->dimension;
00098       cp->base = vect_dup(in_ps->base);    
00099     }
00100   }
00101   return(cp);
00102 }

Here is the call graph for this function:

Here is the caller graph for this function:

Psysteme sc_free ( Psysteme  in_ps  ) 

Psysteme sc_free( in_ps ) AL 30/05/94 Free of in_ps.

Returns NULL to be used as in_ps = sc_free( in_ps );

Parameters:
in_ps n_ps

Definition at line 109 of file sc_list.c.

References NULL, and sc_rm().

Referenced by c_convex_effects_on_actual_parameter_forward_translation(), dj_intersection_ofl_ctrl(), pa_free(), pa_intersect_system(), pa_path_to_disjunct_rule4_ofl_ctrl(), pa_path_to_few_disjunct_ofl_ctrl(), sc_elim_redund_with_first_ofl_ctrl(), sc_minmax_of_pvector(), sc_supress_parallel_redund_constraints(), sl_free(), xml_Application(), xml_Boxes(), xml_Call(), xml_Loop(), and xml_Pattern_Paving().

00111 {  sc_rm( in_ps ); return( (Psysteme) NULL ); }

Here is the call graph for this function:

Here is the caller graph for this function:

Psysteme sc_free1 ( Psysteme  in_ps  ) 

Psysteme sc_free1( in_ps ) AL 30/05/94 Only pcontrainte of in_ps are freed.

Parameters:
in_ps n_ps

Definition at line 118 of file sc_list.c.

References free(), NULL, and vect_rm().

Referenced by sc_concatenate().

00120 {
00121   Pcontrainte pc, pc2;
00122 
00123   if (in_ps != NULL) {
00124     for(pc = in_ps->inegalites; pc != NULL; ) {
00125       pc2 = pc;
00126       pc = pc->succ;
00127       free(pc2);
00128       pc2 = NULL;
00129     }
00130     for(pc = in_ps->egalites; pc != NULL; ) {
00131       pc2 = pc;
00132       pc = pc->succ;
00133       free(pc2);
00134       pc2 = NULL;
00135     }
00136     in_ps->nb_eq = 0;
00137     in_ps->nb_ineq = 0;
00138     in_ps->dimension = 0;
00139     vect_rm( in_ps->base );
00140     in_ps->base = NULL;
00141     
00142     free((char *) in_ps);
00143     in_ps = (Psysteme) NULL;
00144   }
00145   return( (Psysteme) NULL );
00146 }

Here is the call graph for this function:

Here is the caller graph for this function:

Psysteme sc_full ( void   ) 

Psysteme sc_full() similar to sc_new.

Definition at line 55 of file sc_list.c.

References sc_new().

Referenced by pa_intersect_complement(), and sc_elim_redund_with_first_ofl_ctrl().

00055 { return sc_new(); }

Here is the call graph for this function:

Here is the caller graph for this function:

boolean sc_full_p ( Psysteme  in_ps  ) 

Psysteme sc_full_p( in_ps ) similar to sc_new.

Parameters:
in_ps n_ps

Definition at line 58 of file sc_list.c.

References NULL.

Referenced by dj_simple_inegs_to_eg(), pa_path_to_disjunct_rule4_ofl_ctrl(), sc_elim_redund_with_first_ofl_ctrl(), and sl_fprint_tab().

00060 { return( (in_ps->nb_eq == 0) && (in_ps->nb_ineq == 0) && 
00061           (in_ps->egalites == NULL) && (in_ps->inegalites == NULL) ); }

Here is the caller graph for this function:

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_ps will be added.

Output : Disjunct in_sl with in_ps. => ! Sharing. Comment: Nothing is checked on result in_sl. AL 10/11/93

Parameters:
in_sl n_sl
in_ps n_ps

Definition at line 237 of file sc_list.c.

References NULL, Ssyslist::psys, sl_new(), and Ssyslist::succ.

Referenced by dj_append_system(), dj_empty(), dj_intersect_system_ofl_ctrl(), dj_intersection_ofl_ctrl(), dj_simple_inegs_to_eg(), dj_system_complement(), pa_convex_hull_equals_union_p_ofl_ctrl(), pa_inclusion_p_ofl_ctrl(), pa_intersect_complement(), pa_path_to_disjunct_ofl_ctrl(), pa_path_to_disjunct_rule4_ofl_ctrl(), pa_path_to_few_disjunct_ofl_ctrl(), pa_reduce_simple_complement(), pa_supress_same_constraints(), pa_system_difference_ofl_ctrl(), sl_append_system_first(), sl_dup(), and sl_dup1().

00240 {
00241   Psyslist ret_sl;
00242   
00243   if (in_ps == NULL) return( in_sl );
00244   ret_sl = sl_new(); ret_sl->psys = in_ps; ret_sl->succ = in_sl;
00245   return( ret_sl );
00246 }

Here is the call graph for this function:

Here is the caller graph for this function:

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 in_sl (sharing).

Parameters:
in_sl n_sl
in_ps n_ps

Definition at line 253 of file sc_list.c.

References NULL, sl_append_system(), SL_NULL, and Ssyslist::succ.

Referenced by slx_parse().

00256 {
00257   Psyslist new_sl = SL_NULL, sl = SL_NULL;
00258   
00259   if (in_ps == NULL) return( in_sl );
00260   new_sl = sl_append_system(NULL, in_ps);
00261   if (in_sl == SL_NULL) return new_sl; 
00262   if (in_sl->succ == NULL) { in_sl->succ = new_sl ; return in_sl; }
00263   for(sl = in_sl; (sl->succ != NULL); sl = sl->succ) {}
00264   sl->succ = new_sl;
00265   return( in_sl );
00266 }

Here is the call graph for this function:

Here is the caller graph for this function:

Psyslist sl_dup ( Psyslist  in_sl  ) 

Psyslist sl_dup( (Psyslist) in_sl ) AL 15/11/93 w - 1 duplication : everything is duplicated, except entities.

Duplicates input syslist.

Parameters:
in_sl n_sl

Definition at line 293 of file sc_list.c.

References NULL, Ssyslist::psys, sc_dup(), sl_append_system(), SL_NULL, and Ssyslist::succ.

Referenced by dj_dup(), pa_dup(), pa_intersect_complement(), pa_intersect_system(), and pa_path_to_few_disjunct_ofl_ctrl().

00295 {
00296   Psyslist  sl, ret_sl = SL_NULL;
00297   for( sl = in_sl; sl != NULL; sl = sl->succ ) {
00298     ret_sl = sl_append_system( ret_sl, sc_dup( sl->psys ) );
00299   }
00300   return ret_sl;
00301 }

Here is the call graph for this function:

Here is the caller graph for this function:

Psyslist sl_dup1 ( Psyslist  in_sl  ) 

Psyslist sl_dup1( (Psyslist) in_sl ) AL 15/11/93 Duplicates input syslist.

Sharing.

Parameters:
in_sl n_sl

Definition at line 308 of file sc_list.c.

References NULL, Ssyslist::psys, SC_UNDEFINED, sl_append_system(), and Ssyslist::succ.

Referenced by dj_dup1(), and pa_dup1().

00310 {
00311   Psyslist  sl, ret_sl = NULL;
00312   for( sl = in_sl; sl != NULL; sl = sl->succ ) {
00313     if ( sl->psys == SC_UNDEFINED ) continue;
00314     ret_sl = sl_append_system( ret_sl, sl->psys );
00315   }
00316   return ret_sl;
00317 }

Here is the call graph for this function:

Here is the caller graph for this function:

void sl_fprint ( in_fi  ,
in_sl  ,
char *(*)()  in_fu 
)

Definition at line 444 of file sc_list.c.

References sl_fprint_tab().

Referenced by build_list_of_min(), prepare_reindexing(), separate_variables(), and separate_variables_2().

00448 { sl_fprint_tab( in_fi, in_sl, in_fu, 0 );  }

Here is the call graph for this function:

Here is the caller graph for this function:

void sl_fprint_tab ( FILE*  in_fi,
Psyslist  in_sl,
char *(*)()  in_fu,
int  in_tab 
)

Prints the VAR part

Prints Psysteme list

Special cases

General Cases

Definition at line 380 of file sc_list.c.

References b, b1, base_union(), egalite_fprint(), fprintf(), free(), inegalite_fprint(), NULL, Ssyslist::psys, sc_empty_p(), sc_full_p(), SC_UNDEFINED_P, sl_get_tab_string(), SL_NULL, Svecteur::succ, Ssyslist::succ, vect_rm(), vect_size(), VECTEUR_NUL_P, and vecteur_var.

Referenced by dj_fprint_tab(), pa_fprint_tab(), sl_fprint(), and un_fprint_tab().

00385 {
00386   Pcontrainte   peq  = NULL;
00387   Psyslist      sl   = NULL;
00388   Pbase         b    = NULL, b1;
00389   char*         tabs = sl_get_tab_string( in_tab );
00390 
00391   if (in_sl == SL_NULL) {
00392     fprintf( in_fi, "\n%sSL_NULL\n", tabs ); 
00393     free(tabs); return; 
00394   }
00395   
00396   /* Prints the VAR part */
00397   for(sl = in_sl; sl != NULL; sl = sl->succ) {
00398     if (sl->psys == NULL) continue;
00399     b1 = b;
00400     b  = base_union( b, (sl->psys)->base );
00401     if ( b != b1 ) { vect_rm( b1 ); b1 = (Pvecteur) NULL; } 
00402   }
00403   
00404   if (vect_size( b ) >= 1 ) {
00405     fprintf( in_fi,"%s", tabs);
00406     fprintf( in_fi,"VAR %s", (*in_fu)(vecteur_var(b)));
00407     for (b1=b->succ; !VECTEUR_NUL_P(b1); b1 = b1->succ)
00408       fprintf(in_fi,", %s",(*in_fu)(vecteur_var(b1)));
00409   }
00410   
00411   vect_rm( (Pvecteur) b ); b = (Pvecteur) NULL;
00412 
00413   /* Prints Psysteme list */
00414   for(sl = in_sl ; sl != NULL; sl = sl->succ) {
00415     Psysteme    ps = NULL;
00416     
00417     ps = sl->psys;
00418     
00419     /* Special cases */
00420     if ( SC_UNDEFINED_P(ps) ) 
00421       {fprintf( in_fi, "\n%sSC_UNDEFINED\n", tabs); continue; }
00422     if ( sc_full_p(ps) ) 
00423       {fprintf( in_fi, "\n%sSC_FULL\n", tabs); continue; }
00424     if ( sc_empty_p(ps) ) 
00425       {fprintf( in_fi, "\n%sSC_EMPTY\n", tabs); continue; }
00426 
00427 
00428     /* General Cases */
00429     fprintf(in_fi,"\n%s { \n", tabs);
00430     
00431     for (peq = ps->inegalites;peq!=NULL;
00432     fprintf(in_fi,"%s", tabs),
00433          inegalite_fprint(in_fi,peq,in_fu),peq=peq->succ);
00434     
00435     for (peq = ps->egalites;peq!=NULL;
00436     fprintf(in_fi,"%s", tabs),
00437          egalite_fprint(in_fi,peq,in_fu),peq=peq->succ);
00438     
00439     fprintf(in_fi,"%s } \n", tabs);
00440   }
00441   free( tabs );
00442 }

Here is the call graph for this function:

Here is the caller graph for this function:

Psyslist sl_free ( Psyslist  psl  ) 

Psyslist sl_free(Psyslist psl) BA, AL 30/05/94 w - 1 depth free.

Parameters:
psl sl

Definition at line 324 of file sc_list.c.

References free(), NULL, Ssyslist::psys, sc_free(), sl_free(), and SL_NULL.

Referenced by dj_free(), pa_free(), pa_path_to_disjunct_rule4_ofl_ctrl(), pa_reduce_simple_complement(), pa_supress_same_constraints(), and sl_free().

00326 {
00327   if( psl != SL_NULL ) {
00328     psl->psys = sc_free( psl->psys );
00329     psl->succ = sl_free(psl->succ);
00330     free( psl ); psl = NULL;
00331   }
00332   return SL_NULL;
00333 }

Here is the call graph for this function:

Here is the caller graph for this function:

Psyslist sl_free1 ( Psyslist  psl  ) 

Psyslist sl_free1(Psyslist psl) AL 30/05/94 1 depth free.

Parameters:
psl sl

Definition at line 340 of file sc_list.c.

References free(), NULL, Ssyslist::psys, sl_free1(), and SL_NULL.

Referenced by dj_free1(), pa_free1(), pa_reduce_simple_complement(), and sl_free1().

00342 {
00343   if( psl != SL_NULL ) {
00344     psl->psys = (Psysteme) NULL;
00345     psl->succ = sl_free1(psl->succ);
00346     free( psl );
00347   }
00348   return SL_NULL;
00349 }

Here is the call graph for this function:

Here is the caller graph for this function:

char* sl_get_tab_string ( int  in_tab  ) 

char* sl_get_tab_string( in_tab ) returns a string of in_tab

Parameters:
in_tab n_tab

Definition at line 363 of file sc_list.c.

References assert, name, and strdup().

Referenced by dj_fprint_tab(), pa_fprint_tab(), sl_fprint_tab(), and un_fprint_tab().

00365 {
00366   int            d;
00367   static  char   name[20];
00368 #ifndef strdup
00369   extern  char*  strdup();
00370 #endif
00371 
00372   if (in_tab == 0) return strdup("");
00373   assert( (in_tab > 0) && (in_tab < 20) );
00374   for(d = 0; d < in_tab; d++){ sprintf(&name[d],"\t"); }
00375   return strdup(name);
00376 }

Here is the call graph for this function:

Here is the caller graph for this function:

boolean sl_is_system_p ( Psyslist  in_sl  ) 

boolean sl_is_system_p( (Psyslist) in_sl ) AL 16/11/93 Returns True if syslist in_sl has only one Psysteme in it.

Parameters:
in_sl n_sl

Definition at line 227 of file sc_list.c.

References sl_length().

Referenced by dj_is_system_p().

00229 { return ( sl_length(in_sl) == 1 ); } 

Here is the call graph for this function:

Here is the caller graph for this function:

boolean sl_length ( Psyslist  in_sl  ) 

int sl_length( (Psyslist) in_sl ) AL 26/04/95 Returns length of in_sl.

Parameters:
in_sl n_sl

Definition at line 190 of file sc_list.c.

References NULL, and Ssyslist::succ.

Referenced by pa_feasibility_ofl_ctrl(), pa_path_to_disjunct_ofl_ctrl(), pa_path_to_disjunct_rule4_ofl_ctrl(), and sl_is_system_p().

00192 {
00193   int length; Psyslist sl = in_sl;  
00194   if (in_sl == NULL) return 0;
00195   for(length = 0; sl != NULL; sl = sl->succ, length++);
00196   return length; 
00197 }

Here is the caller graph for this function:

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.

Parameters:
in_sl n_sl

Definition at line 204 of file sc_list.c.

References if(), NULL, and sc_empty_p().

Referenced by pa_feasibility_ofl_ctrl(), and pa_max_constraints_nb().

00206 { 
00207   Psysteme   ps;
00208   int        ret_int = 0;
00209   
00210   if (in_sl == NULL) return 0;
00211   
00212   for(; in_sl != NULL; in_sl = in_sl->succ) {
00213     int loc;
00214     ps  = in_sl->psys; 
00215     if (sc_empty_p(ps)) continue;
00216     loc = 2*(ps->nb_eq) + ps->nb_ineq;
00217     if (loc > ret_int) ret_int = loc;
00218   }
00219   return ret_int; 
00220 }

Here is the call graph for this function:

Here is the caller graph for this function:

Psyslist sl_new ( void   ) 

Psyslist sl_new() AL 26/10/93 Input : Nothing.

Output : An empty syslist.

Definition at line 274 of file sc_list.c.

References exit(), fprintf(), malloc(), NULL, Ssyslist::psys, and Ssyslist::succ.

Referenced by build_third_comb(), dj_new(), pa_fprint_tab(), prepare_array_bounds(), and sl_append_system().

00275 {
00276   Psyslist p;
00277   
00278   p = (Psyslist) malloc(sizeof(Ssyslist));
00279   if (p == NULL) {
00280     (void) fprintf(stderr,"sl_new: Out of memory space\n");
00281     exit(-1);
00282   }
00283   p->psys = (Psysteme ) NULL; p->succ = (Psyslist) NULL;
00284   return(p);
00285 }

Here is the call graph for this function:

Here is the caller graph for this function:

Psyslist sl_read ( char*  nomfic  ) 

fichier lu par sl_lex.l

void sl_read(FILE*) reads a Psyslist

Parameters:
nomfic omfic

Definition at line 456 of file sc_list.c.

References exit(), fprintf(), NULL, sl_init_lex(), slx_in, and slx_parse().

Referenced by dj_read(), and pa_read().

00458 {
00459   if ((slx_in = fopen(nomfic, "r")) == NULL) {
00460     (void) fprintf(stderr, "Ouverture du fichier %s impossible\n",nomfic);
00461     exit(4);
00462   }
00463   sl_init_lex(); slx_parse(); fclose( slx_in );
00464   return( sl_yacc );
00465 }

Here is the call graph for this function:

Here is the caller graph for this function:

void sl_set_variable_name ( char* (*)()  in_fu  ) 

char* sl_set_variable_name( in_fu ) give the function to read variables

Definition at line 354 of file sc_list.c.

References union_variable_name.

00356 {
00357   union_variable_name = in_fu;
00358 }

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

Definition at line 470 of file sc_list.c.

References dj_fprint, fprintf(), IS_DJ, IS_PA, IS_SC, IS_SL, pa_fprint, sc_fprint(), sl_fprint_tab(), and sl_get_tab_string().

00476 { 
00477   switch( in_ty ) {
00478   
00479   case IS_SC: 
00480     fprintf  ( in_fi, "Systeme:\n");
00481     sc_fprint( in_fi, (Psysteme) in_un, in_fu );
00482     break;
00483    
00484   case IS_SL: 
00485     fprintf      ( in_fi, "%sSyslist:\n", sl_get_tab_string( in_tab ));
00486     sl_fprint_tab( in_fi, (Psyslist) in_un, in_fu, in_tab );
00487     break;
00488    
00489   case IS_DJ:
00490     dj_fprint( in_fi, (Pdisjunct) in_un, in_fu );
00491     break;
00492     
00493   case IS_PA:
00494     pa_fprint( in_fi, (Ppath) in_un, in_fu );
00495     break;
00496  
00497   default: {}
00498   }
00499 }

Here is the call graph for this function:


Variable Documentation

Definition at line 106 of file sl_gram.c.

FILE * slx_in

Psysteme construit par sl_gram.y.

Definition at line 345 of file sl_lex.c.

Referenced by sl_read(), slx__init_globals(), slx_get_in(), and slx_set_in().

char*(* union_variable_name)(Variable) = variable_default_name

Package : C3/union Author : Arnauld LESERVOT (leservot(a)limeil.cea.fr) Date : Modified : 04 04 95 Documents: UNION.tex : ``Extension de C3 aux unions de polyedres'' Comments :.

sc_list.c

WARNING THOSE FUNCTIONS ARE AUTOMATICALLY DERIVED

FROM THE WEB SOURCES !Ansi includesLinear includes

Referenced by contrainte_parallel_in_liste(), dj_disjunct_complement(), dj_intersect_djcomp_ofl_ctrl(), dj_system_complement(), dj_variable_substitution_with_eqs_ofl_ctrl(), pa_feasibility_ofl_ctrl(), pa_path_to_disjunct_rule4_ofl_ctrl(), pa_path_to_few_disjunct_ofl_ctrl(), pa_reduce_simple_complement(), pa_supress_same_constraints(), sc_elim_redund_with_first_ofl_ctrl(), sc_supress_parallel_redund_constraints(), sc_supress_same_constraints(), and sl_set_variable_name().

Generated by  doxygen 1.6.2-20100208