PIPS
union.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Ssyslist
 Warning! Do not modify this file that is automatically generated! More...
 
struct  Spath
 
struct  Sunion
 

Macros

#define SL_NULL   (Psyslist) NULL
 
#define DJ_UNDEFINED   (Pdisjunct) NULL
 
#define CO_UNDEFINED   (Pcomplement) NULL
 
#define PA_UNDEFINED   (Ppath) NULL
 
#define UN_UNDEFINED   (Punion) NULL
 
#define UN_FULL_SPACE   (Punion) NULL
 
#define UN_EMPTY_SPACE   (Punion) NULL
 
#define my_sc_full()   sc_full()
 FOR BACKWARD COMPATIBILITY. More...
 
#define my_sc_empty()   sc_empty((Pbase) NULL)
 
#define is_sc_my_empty_p(ps)   sc_empty_p((ps))
 
#define is_dj_full_p(dj)   dj_full_p((dj))
 
#define is_dj_empty_p(dj)   dj_empty_p((dj))
 
#define is_pa_full_p(pa)   pa_full_p((pa))
 
#define is_pa_empty_p(pa)   pa_empty_p((pa))
 
#define sc_difference(ps1, ps2)   pa_system_difference_ofl_ctrl((ps1),(ps2),FWD_OFL_CTRL)
 FOR BACKWARD COMPATIBILITY. More...
 
#define sc_inclusion_p(ps1, ps2)   pa_inclusion_p_ofl_ctrl((ps1), (ps2), NO_OFL_CTRL)
 
#define sc_inclusion_p_ofl(ps1, ps2)   pa_inclusion_p_ofl_ctrl((ps1), (ps2), FWD_OFL_CTRL)
 
#define sc_inclusion_p_ofl_ctrl(ps1, ps2, ofl)   pa_inclusion_p_ofl_ctrl((ps1), (ps2), (ofl))
 
#define sc_equal_p(ps1, ps2)   pa_system_equal_p_ofl_ctrl((ps1), (ps2), NO_OFL_CTRL)
 
#define sc_equal_p_ofl(ps1, ps2)   pa_system_equal_p_ofl_ctrl((ps1), (ps2), FWD_OFL_CTRL)
 
#define sc_equal_p_ofl_ctrl(ps1, ps2, ofl)   pa_system_equal_p_ofl_ctrl((ps1), (ps2), (ofl))
 
#define sc_convex_hull_equals_union_p(conv_hull, ps1, ps2)    pa_convex_hull_equals_union_p_ofl_ctrl((conv_hull), (ps1), (ps2),NO_OFL_CTRL, false)
 
#define sc_convex_hull_equals_union_p_ofl(conv_hull, ps1, ps2)    pa_convex_hull_equals_union_p_ofl_ctrl((conv_hull), (ps1), (ps2), OFL_CTRL, false)
 
#define sc_convex_hull_equals_union_p_ofl_ctrl(conv_hull, ps1, ps2, ofl, bo)    pa_convex_hull_equals_union_p_ofl_ctrl((conv_hull), (ps1), (ps2), (ofl), (bo))
 
#define sc_elim_redund_with_first(ps1, ps2)   sc_elim_redund_with_first_ofl_ctrl((ps1), (ps2), NO_OFL_CTRL)
 OTHERS. More...
 
#define dj_fprint(fi, dj, fu)   dj_fprint_tab((fi), (dj), (fu), 0)
 
#define DJ_UNDEFINED_P(dj)   ((dj) == DJ_UNDEFINED)
 
#define dj_faisabilite(dj)   dj_feasibility_ofl_ctrl((dj), NO_OFL_CTRL)
 
#define dj_feasibility(dj)   dj_feasibility_ofl_ctrl((dj), NO_OFL_CTRL)
 
#define dj_faisabilite_ofl(dj)   dj_feasibility_ofl_ctrl((dj), FWD_OFL_CTRL)
 
#define dj_intersection(dj1, dj2)   dj_intersection_ofl_ctrl((dj1), (dj2), NO_OFL_CTRL)
 
#define dj_intersect_system(dj, ps)   dj_intersect_system_ofl_ctrl((dj), (ps), NO_OFL_CTRL )
 
#define dj_intersect_djcomp(dj1, dj2)   dj_intersect_djcomp_ofl_ctrl( (dj1), (dj2), NO_OFL_CTRL )
 
#define dj_projection_along_variables(dj, pv)    dj_projection_along_variables_ofl_ctrl((dj),(pv),NO_OFL_CTRL)
 
#define dj_variable_substitution_with_eqs(dj, co, pv)    dj_variable_substitution_with_eqs_ofl_ctrl( (dj), (co), (pv), NO_OFL_CTRL )
 
#define pa_fprint(fi, pa, fu)   pa_fprint_tab((fi), (pa), (fu), 0)
 
#define PA_UNDEFINED_P(pa)   ((pa) == PA_UNDEFINED)
 
#define pa_new()   pa_make(NULL, NULL)
 
#define pa_faisabilite(pa)   pa_feasibility_ofl_ctrl((pa), NO_OFL_CTRL)
 
#define pa_feasibility(pa)   pa_feasibility_ofl_ctrl((pa), NO_OFL_CTRL)
 
#define pa_faisabilite_ofl(pa)   pa_feasibility_ofl_ctrl((pa), FWD_OFL_CTRL)
 
#define pa_path_to_disjunct(pa)   pa_path_to_disjunct_ofl_ctrl((pa), NO_OFL_CTRL )
 
#define pa_path_dup_to_disjunct(pa)   pa_path_to_disjunct_ofl_ctrl((pa), NO_OFL_CTRL )
 
#define pa_system_difference(ps1, ps2)   pa_system_difference_ofl_ctrl((ps1),(ps2),NO_OFL_CTRL)
 
#define pa_system_equal_p(ps1, ps2)   pa_system_equal_p_ofl_ctrl((ps1),(ps2),NO_OFL_CTRL)
 
#define pa_inclusion_p(ps1, ps2)   pa_inclusion_p_ofl_ctrl((ps1),(ps2),NO_OFL_CTRL)
 
#define pa_path_to_disjunct_ofl(pa)   pa_path_to_disjunct_ofl_ctrl((pa), FWD_OFL_CTRL )
 
#define pa_path_to_disjunct_rule4(pa)   pa_path_to_disjunct_rule4_ofl_ctrl((pa), FWD_OFL_CTRL )
 
#define pa_path_to_few_disjunct(pa)   pa_path_to_few_disjunct_ofl_ctrl((pa), NO_OFL_CTRL)
 
#define pa_system_difference(ps1, ps2)   pa_system_difference_ofl_ctrl((ps1),(ps2),NO_OFL_CTRL)
 
#define pa_convex_hull_equals_union_p(conv_hull, ps1, ps2)    pa_convex_hull_equals_union_p_ofl_ctrl((conv_hull), (ps1), (ps2), NO_OFL_CTRL, false)
 
#define un_fprint(fi, un, fu, ty)   un_fprint_tab((fi), (un), (fu), (ty), 0)
 
#define PATH_MAX_CONSTRAINTS   12
 Misceleanous (debuging...) More...
 
#define IS_SC   1
 
#define IS_SL   2
 
#define IS_DJ   3
 
#define IS_PA   4
 
#define C3_DEBUG(fun, code)
 
#define C3_RETURN(type, val)   {return val;}
 

Typedefs

typedef struct SsyslistPsyslist
 Warning! Do not modify this file that is automatically generated! More...
 
typedef struct Ssyslist Ssyslist
 
typedef SsyslistPdisjunct
 
typedef Ssyslist Sdisjunct
 
typedef SsystemePcomplement
 
typedef Ssysteme Scomplement
 
typedef SsyslistPcomplist
 
typedef Ssyslist Scomplist
 
typedef struct SpathPpath
 
typedef struct Spath Spath
 
typedef struct SunionPunion
 
typedef struct Sunion Sunion
 

Enumerations

enum  hspara_elem {
  unpara = 0 , sszero = 1 , ssplus = 2 , ssminus = 3 ,
  opzero = 4 , opplus = 5 , keep = 6 , opminus = 7 ,
  empty = 8 , full = 9 , unpara = 0 , sszero = 1 ,
  ssplus = 2 , ssminus = 3 , opzero = 4 , opplus = 5 ,
  keep = 6 , opminus = 7 , empty = 8 , full = 9
}
 Implementation of the finite parallel half space lattice hspara. More...
 

Functions

Pdisjunct dj_new (void)
 cproto-generated files More...
 
Pdisjunct dj_dup (Pdisjunct)
 Pdisjunct dj_dup( (Pdisjunct) in_dj ) AL 15/11/93 Duplicates input disjunction. More...
 
Pdisjunct dj_free (Pdisjunct)
 Pdisjunct dj_free( (Pdisjunct) in_dj ) AL 31/05/94 w - 1 depth free of input disjunction. More...
 
Pdisjunct dj_dup1 (Pdisjunct)
 Pdisjunct dj_dup1( (Pdisjunct) in_dj ) AL 31/05/94 1st depth duplication of input disjunction. More...
 
Pdisjunct dj_free1 (Pdisjunct)
 Pdisjunct dj_free1( (Pdisjunct) in_dj ) AL 31/05/94 1st depth free of input disjunction. More...
 
Pdisjunct dj_full (void)
 Pdisjunct dj_full() AL 18/11/93 Return full space disjunction = dj_new() More...
 
bool dj_full_p (Pdisjunct)
 dj_full_p( (Pdisjunct) in_dj ) AL 30/05/94 Returns True if in_dj = (NIL) ^ (NIL) More...
 
Pdisjunct dj_empty (void)
 Pdisjunct dj_empty() AL 18/11/93 Returns a disjunction with sc_empty() element. More...
 
bool dj_empty_p (Pdisjunct)
 dj_empty_p( (Ppath) in_pa ) AL 30/05/94 Returns True if in_dj = (1*TCST = 0) ^ (NIL) More...
 
Pdisjunct dj_intersection_ofl_ctrl (Pdisjunct, Pdisjunct, int)
 Pdisjunct dj_intersection_ofl_ctrl( in_dj1, in_dj2, ofl_ctrl ) Computes intersection of two disjunctions. More...
 
Pdisjunct dj_intersect_system_ofl_ctrl (Pdisjunct, Psysteme, int)
 
Pdisjunct dj_intersect_djcomp_ofl_ctrl (Pdisjunct, Pdisjunct, int)
 Pdisjunct dj_intersect_djcomp_ofl_ctrl( ) No sharing. More...
 
Pdisjunct dj_union (Pdisjunct, Pdisjunct)
 Pdisjunct dj_union( (Pdisjunct) in_dj1, (Pdisjunct) in_dj2 ) Give the union of the two disjunctions. More...
 
bool dj_feasibility_ofl_ctrl (Pdisjunct, int)
 bool dj_feasibility_ofl_ctrl( (Pdisjunct) in_dj, (int) ofl_ctrl ) Returns true if in_dj is a feasible disjunction. More...
 
Pdisjunct dj_system_complement (Psysteme)
 Pdisjunct dj_system_complement( (Psystem) in_ps ) AL 26/10/93 Input : A Psysteme. More...
 
Pdisjunct dj_disjunct_complement (Pdisjunct)
 Returns complement of in_dj. More...
 
Pdisjunct dj_projection_along_variables_ofl_ctrl (Pdisjunct, Pvecteur, int)
 Returns projection of in_dj along vars of in_pv. More...
 
Pdisjunct dj_simple_inegs_to_eg (Pdisjunct)
 Pdisjunct dj_simple_inegs_to_eg( in_dj ) transforms two opposite inequalities in a simple equality in each system of the input disjunction. More...
 
bool dj_is_system_p (Pdisjunct)
 bool dj_is_system_p( (Pdisjunct) in_dj ) AL 16/11/93 Returns True if disjunction in_dj has only one Psysteme in it. More...
 
Pdisjunct dj_append_system (Pdisjunct, Psysteme)
 Pdisjunct dj_append_system( (Pdisjunct) in_dj, (Psysteme) in_ps ) Input : A disjunct in_dj to wich in_ps will be added. More...
 
Pdisjunct dj_variable_rename (Pdisjunct, Variable, Variable)
 dj_variable_rename replaces in_vold with in_vnew : in_dj is modified More...
 
Pdisjunct dj_variable_substitution_with_eqs_ofl_ctrl (Pdisjunct, Pcontrainte, Pvecteur, int)
 
void dj_fprint_tab (FILE *, Pdisjunct, char *(*)(void), int)
 
Pdisjunct dj_read (char *)
 void dj_read(FILE*) reads a Pdisjunct More...
 
Ppath pa_make (Psysteme, Pcomplist)
 path.c More...
 
Ppath pa_dup (Ppath)
 void pa_dup(Ppath pa) AL 30/05/94 More...
 
Ppath pa_free (Ppath)
 Ppath pa_free(Ppath pa) BA, AL 30/05/94. More...
 
Ppath pa_dup1 (Ppath)
 void pa_dup1(Ppath pa) AL 30/05/94 1 depth duplication: system and complements are shared. More...
 
Ppath pa_free1 (Ppath)
 Ppath pa_free1(Ppath pa) BA, AL 30/05/94 1 depth free. More...
 
Ppath pa_full (void)
 Ppath pa_full() AL 18/11/93 Returns full space path : pa_full = pa_new() More...
 
bool pa_full_p (Ppath)
 pa_full_p( (Ppath) in_pa ) AL 18/11/93 Returns True if in_pa = (NIL) ^ (NIL) More...
 
Ppath pa_empty (void)
 Ppath pa_empty() AL 18/11/93 Returns empty path : pa_empty = sc_empty(NULL) ^ (NIL) More...
 
bool pa_empty_p (Ppath)
 pa_empty_p( (Ppath) in_pa ) AL 18/11/93 Returns True if in_pa = (1*TCST = 0) ^ (NIL) More...
 
int pa_max_constraints_nb (Ppath)
 int pa_max_constraints_nb( (Ppath) in_pa ) Give the maximum constraints nb among systems of in_pa. More...
 
Ppath pa_intersect_system (Ppath, Psysteme)
 Ppath pa_intersect_system( (Ppath) in_pa, (Psysteme) in_ps ) Computes the intersection between in_pa and in_ps. More...
 
Ppath pa_intersect_complement (Ppath, Pcomplement)
 Ppath pa_intersect_complement( (Ppath) in_pa, (Pcomplement) in_pc ) Computes the intersection between in_pa and in_ps. More...
 
Ppath pa_reduce_simple_complement (Ppath)
 Ppath pa_reduce_simple_complement( (Ppath) in_pa ) AL 16/11/93 Scan all the complement. More...
 
Ppath pa_transform_eg_in_ineg (Ppath)
 Ppath pa_transform_eg_in_ineg( in_pa ) Transforms all equalities of all systems composing in_pa in inequalities and returns in_pa. More...
 
bool pa_feasibility_ofl_ctrl (Ppath, int)
 bool pa_feasibility_ofl_ctrl( (Ppath) in_pa, int ofl_ctrl)
Returns true if the input path is possible and false if it is not possible or undefined. More...
 
Pdisjunct pa_path_to_disjunct_ofl_ctrl (Ppath, int)
 Pdisjunct pa_path_to_disjunct_ofl_ctrl ( (Ppath) in_pa, (int) ofl_ctrl)
Produces a Pdisjunct corresponding to the path Ppath. More...
 
void pa_fprint_tab (FILE *, Ppath, char *(*)(void), int)
 
Ppath pa_read (char *)
 void pa_read(FILE*) reads a Ppath More...
 
enum hspara_elem vect_parallel (Pvecteur, Pvecteur)
 reduc.c More...
 
enum hspara_elem contrainte_parallel_in_liste (Pcontrainte, Pcontrainte)
 enum enum hspara_elem contrainte_parallel_in_liste( in_co, in_lc ) AL950711 input: 1 constraint in_co and a list of constraints in_lc output: hspara_elem (element of the parallel half space lattice) memory: Inspector (nothing is shared, nor modified, output allocated). More...
 
Psysteme sc_supress_parallel_redund_constraints (Psysteme, Psysteme)
 Psysteme sc_supress_parallel_redund_constraints( in_ps1, in_ps2 ) input: 2 Psystemes in_ps1 and in_ps2 output: in_ps1 / in_ps2 (cut operation on polyhedrons) memory: Inspector (nothing is shared, nor modified, output allocated). More...
 
Psysteme sc_supress_same_constraints (Psysteme, Psysteme)
 Psysteme sc_supress_same_constraints( in_ps1, in_ps2 ) supress in in_ps2 constraints that are in in_ps1. More...
 
Psysteme sc_elim_redund_with_first_ofl_ctrl (Psysteme, Psysteme, int)
 Psysteme sc_elim_redund_with_first_ofl_ctrl( in_ps1, in_ps2, ofl_ctrl ) Returns constraints of in_ps2 which cut in_ps1. More...
 
Ppath pa_supress_same_constraints (Ppath)
 Ppath pa_supress_same_constraints( (Ppath) in_pa )
Supress from complements of in_pa same constraints than those in positif Psystem in_pa->psys. More...
 
Pdisjunct pa_path_to_disjunct_rule4_ofl_ctrl (Ppath, int)
 Pdisjunct pa_path_to_disjunct_rule4_ofl_ctrl( (Ppath) in_pa, int ofl_ctrl)
Returns the corresponding disjunction according rule 4. More...
 
Pdisjunct pa_path_to_few_disjunct_ofl_ctrl (Ppath, int)
 line 1197 "reduc.w" More...
 
bool pa_inclusion_p_ofl_ctrl (Psysteme, Psysteme, int)
 bool pa_inclusion_p(Psysteme ps1, Psysteme ps2) BA, AL 31/05/94 returns true if ps1 represents a subset of ps2, false otherwise Inspector (no sharing on memory). More...
 
bool pa_system_equal_p_ofl_ctrl (Psysteme, Psysteme, int)
 bool pa_system_equal_p(Psysteme ps1, Psysteme ps2) BA More...
 
Pdisjunct pa_system_difference_ofl_ctrl (Psysteme, Psysteme, int)
 Pdisjunct pa_system_difference_ofl_ctrl(ps1, ps2) input : two Psystemes output : a disjunction representing ps1 - ps2 modifies : nothing comment : algorihtm : chemin = ps1 inter complement of (ps2) ret_dj = dj_simple_inegs_to_eg( pa_path_to_few_disjunct(chemin) ) More...
 
bool pa_convex_hull_equals_union_p_ofl_ctrl (Psysteme, Psysteme, Psysteme, int, volatile bool)
 bool pa_convex_hull_equals_union_p(conv_hull, ps1, ps2) input : two Psystems and their convex hull AL,BC 23/03/95 output : true if ps1 U ps2 = convex_hull, false otherwise modifies : nothing comment : complexity = nb_constraints(ps1) * nb_constraints(ps2) if ofl_ctrl = OFL_CTRL, conservatively returns ofl_ctrl when an overflow error occurs More...
 
Psysteme sc_full (void)
 Psysteme sc_full() similar to sc_new. More...
 
bool sc_full_p (Psysteme)
 Psysteme sc_full_p( in_ps ) similar to sc_new. More...
 
Psysteme sc_dup1 (Psysteme)
 Psysteme sc_dup1( in_ps ) AL 30/05/94 1 depth copy of in_ps: no duplication of vectors (except for the base). More...
 
Psysteme sc_free (Psysteme)
 Psysteme sc_free( in_ps ) AL 30/05/94 Free of in_ps. More...
 
Psysteme sc_free1 (Psysteme)
 Psysteme sc_free1( in_ps ) AL 30/05/94 Only pcontrainte of in_ps are freed. More...
 
Psysteme sc_concatenate (Psysteme, Psysteme)
 Psysteme sc_concatenate( in_s1, in_s2 ) AL 30/05/94 Append in_s2 to the end of in_s1 and returns in_s1. More...
 
bool sl_length (Psyslist)
 int sl_length( (Psyslist) in_sl ) AL 26/04/95 Returns length of in_sl. More...
 
int sl_max_constraints_nb (Psyslist)
 int sl_max_constraints_nb( (Psyslist) in_sl ) Give the maximum constraints nb among systems of in_sl. More...
 
bool sl_is_system_p (Psyslist)
 bool sl_is_system_p( (Psyslist) in_sl ) AL 16/11/93 Returns True if syslist in_sl has only one Psysteme in it. More...
 
Psyslist sl_append_system (Psyslist, Psysteme)
 Psyslist sl_append_system( (Psyslist) in_sl, (Psysteme) in_ps ) Input : A disjunct in_sl to wich in_ps will be added. More...
 
Psyslist sl_append_system_first (Psyslist, Psysteme)
 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). More...
 
Psyslist sl_new (void)
 Psyslist sl_new() AL 26/10/93 Input : Nothing. More...
 
Psyslist sl_dup (Psyslist)
 Psyslist sl_dup( (Psyslist) in_sl ) AL 15/11/93 w - 1 duplication : everything is duplicated, except entities. More...
 
Psyslist sl_dup1 (Psyslist)
 Psyslist sl_dup1( (Psyslist) in_sl ) AL 15/11/93 Duplicates input syslist. More...
 
Psyslist sl_free (Psyslist)
 Psyslist sl_free(Psyslist psl) BA, AL 30/05/94 w - 1 depth free. More...
 
Psyslist sl_free1 (Psyslist)
 Psyslist sl_free1(Psyslist psl) AL 30/05/94 1 depth free. More...
 
void sl_set_variable_name (char *(*)(void))
 
char * sl_get_tab_string (int)
 char* sl_get_tab_string( in_tab ) returns a string of in_tab \t More...
 
void sl_fprint_tab (FILE *, Psyslist, char *(*)(void), int)
 
void sl_fprint (FILE *, Psyslist, char *(*)(void))
 
Psyslist sl_read (char *)
 void sl_read(FILE*) reads a Psyslist More...
 
void un_fprint_tab (FILE *, char *, char *(*)(void), int, int)
 
int slx_parse (void)
 
int slx_error (char *)
 
int slx_lex (void)
 
void slx_restart (FILE *)
 
void slx_pop_buffer_state (void)
 
int slx_get_lineno (void)
 
FILE * slx_get_in (void)
 
FILE * slx_get_out (void)
 
int slx_get_leng (void)
 
char * slx_get_text (void)
 
void slx_set_lineno (int)
 
void slx_set_in (FILE *)
 
void slx_set_out (FILE *)
 
int slx_get_debug (void)
 
void slx_set_debug (int)
 
int slx_lex_destroy (void)
 
void * slx_alloc (yy_size_t)
 
void * slx_realloc (void *, yy_size_t)
 
void slx_free (void *)
 
int slx_wrap (void)
 
void sl_init_lex (void)
 

Variables

char *(* union_variable_name )(Variable)
 sc_list.c More...
 
bool syntax_error
 sl_gram.c More...
 
Value valcst
 
Psyslist sl_yacc
 
Pbase ba_yacc
 
Variable va_yacc
 
int slx_char
 
int slx_nerrs
 
int slx_leng
 sl_lex.c More...
 
FILE * slx_in
 
FILE * slx_out
 
int slx_lineno
 
int slx__flex_debug
 
char * slx_text
 

Macro Definition Documentation

◆ C3_DEBUG

#define C3_DEBUG (   fun,
  code 
)

Definition at line 158 of file union.h.

◆ C3_RETURN

#define C3_RETURN (   type,
  val 
)    {return val;}

Definition at line 159 of file union.h.

◆ CO_UNDEFINED

#define CO_UNDEFINED   (Pcomplement) NULL

Definition at line 24 of file union.h.

◆ dj_faisabilite

#define dj_faisabilite (   dj)    dj_feasibility_ofl_ctrl((dj), NO_OFL_CTRL)

Definition at line 106 of file union.h.

◆ dj_faisabilite_ofl

#define dj_faisabilite_ofl (   dj)    dj_feasibility_ofl_ctrl((dj), FWD_OFL_CTRL)

Definition at line 108 of file union.h.

◆ dj_feasibility

#define dj_feasibility (   dj)    dj_feasibility_ofl_ctrl((dj), NO_OFL_CTRL)

Definition at line 107 of file union.h.

◆ dj_fprint

#define dj_fprint (   fi,
  dj,
  fu 
)    dj_fprint_tab((fi), (dj), (fu), 0)

Definition at line 104 of file union.h.

◆ dj_intersect_djcomp

#define dj_intersect_djcomp (   dj1,
  dj2 
)    dj_intersect_djcomp_ofl_ctrl( (dj1), (dj2), NO_OFL_CTRL )

Definition at line 111 of file union.h.

◆ dj_intersect_system

#define dj_intersect_system (   dj,
  ps 
)    dj_intersect_system_ofl_ctrl((dj), (ps), NO_OFL_CTRL )

Definition at line 110 of file union.h.

◆ dj_intersection

#define dj_intersection (   dj1,
  dj2 
)    dj_intersection_ofl_ctrl((dj1), (dj2), NO_OFL_CTRL)

Definition at line 109 of file union.h.

◆ dj_projection_along_variables

#define dj_projection_along_variables (   dj,
  pv 
)     dj_projection_along_variables_ofl_ctrl((dj),(pv),NO_OFL_CTRL)

Definition at line 112 of file union.h.

◆ DJ_UNDEFINED

#define DJ_UNDEFINED   (Pdisjunct) NULL

Definition at line 20 of file union.h.

◆ DJ_UNDEFINED_P

#define DJ_UNDEFINED_P (   dj)    ((dj) == DJ_UNDEFINED)

Definition at line 105 of file union.h.

◆ dj_variable_substitution_with_eqs

#define dj_variable_substitution_with_eqs (   dj,
  co,
  pv 
)     dj_variable_substitution_with_eqs_ofl_ctrl( (dj), (co), (pv), NO_OFL_CTRL )

Definition at line 114 of file union.h.

◆ IS_DJ

#define IS_DJ   3

Definition at line 143 of file union.h.

◆ is_dj_empty_p

#define is_dj_empty_p (   dj)    dj_empty_p((dj))

Definition at line 81 of file union.h.

◆ is_dj_full_p

#define is_dj_full_p (   dj)    dj_full_p((dj))

Definition at line 80 of file union.h.

◆ IS_PA

#define IS_PA   4

Definition at line 144 of file union.h.

◆ is_pa_empty_p

#define is_pa_empty_p (   pa)    pa_empty_p((pa))

Definition at line 83 of file union.h.

◆ is_pa_full_p

#define is_pa_full_p (   pa)    pa_full_p((pa))

Definition at line 82 of file union.h.

◆ IS_SC

#define IS_SC   1

Definition at line 141 of file union.h.

◆ is_sc_my_empty_p

#define is_sc_my_empty_p (   ps)    sc_empty_p((ps))

Definition at line 79 of file union.h.

◆ IS_SL

#define IS_SL   2

Definition at line 142 of file union.h.

◆ my_sc_empty

#define my_sc_empty ( )    sc_empty((Pbase) NULL)

Definition at line 78 of file union.h.

◆ my_sc_full

#define my_sc_full ( )    sc_full()

FOR BACKWARD COMPATIBILITY.

Definition at line 77 of file union.h.

◆ pa_convex_hull_equals_union_p

#define pa_convex_hull_equals_union_p (   conv_hull,
  ps1,
  ps2 
)     pa_convex_hull_equals_union_p_ofl_ctrl((conv_hull), (ps1), (ps2), NO_OFL_CTRL, false)

Definition at line 132 of file union.h.

◆ pa_faisabilite

#define pa_faisabilite (   pa)    pa_feasibility_ofl_ctrl((pa), NO_OFL_CTRL)

Definition at line 120 of file union.h.

◆ pa_faisabilite_ofl

#define pa_faisabilite_ofl (   pa)    pa_feasibility_ofl_ctrl((pa), FWD_OFL_CTRL)

Definition at line 122 of file union.h.

◆ pa_feasibility

#define pa_feasibility (   pa)    pa_feasibility_ofl_ctrl((pa), NO_OFL_CTRL)

Definition at line 121 of file union.h.

◆ pa_fprint

#define pa_fprint (   fi,
  pa,
  fu 
)    pa_fprint_tab((fi), (pa), (fu), 0)

Definition at line 117 of file union.h.

◆ pa_inclusion_p

#define pa_inclusion_p (   ps1,
  ps2 
)    pa_inclusion_p_ofl_ctrl((ps1),(ps2),NO_OFL_CTRL)

Definition at line 127 of file union.h.

◆ pa_new

#define pa_new ( )    pa_make(NULL, NULL)

Definition at line 119 of file union.h.

◆ pa_path_dup_to_disjunct

#define pa_path_dup_to_disjunct (   pa)    pa_path_to_disjunct_ofl_ctrl((pa), NO_OFL_CTRL )

Definition at line 124 of file union.h.

◆ pa_path_to_disjunct

#define pa_path_to_disjunct (   pa)    pa_path_to_disjunct_ofl_ctrl((pa), NO_OFL_CTRL )

Definition at line 123 of file union.h.

◆ pa_path_to_disjunct_ofl

#define pa_path_to_disjunct_ofl (   pa)    pa_path_to_disjunct_ofl_ctrl((pa), FWD_OFL_CTRL )

Definition at line 128 of file union.h.

◆ pa_path_to_disjunct_rule4

#define pa_path_to_disjunct_rule4 (   pa)    pa_path_to_disjunct_rule4_ofl_ctrl((pa), FWD_OFL_CTRL )

Definition at line 129 of file union.h.

◆ pa_path_to_few_disjunct

#define pa_path_to_few_disjunct (   pa)    pa_path_to_few_disjunct_ofl_ctrl((pa), NO_OFL_CTRL)

Definition at line 130 of file union.h.

◆ pa_system_difference [1/2]

#define pa_system_difference (   ps1,
  ps2 
)    pa_system_difference_ofl_ctrl((ps1),(ps2),NO_OFL_CTRL)

Definition at line 131 of file union.h.

◆ pa_system_difference [2/2]

#define pa_system_difference (   ps1,
  ps2 
)    pa_system_difference_ofl_ctrl((ps1),(ps2),NO_OFL_CTRL)

Definition at line 131 of file union.h.

◆ pa_system_equal_p

#define pa_system_equal_p (   ps1,
  ps2 
)    pa_system_equal_p_ofl_ctrl((ps1),(ps2),NO_OFL_CTRL)

Definition at line 126 of file union.h.

◆ PA_UNDEFINED

#define PA_UNDEFINED   (Ppath) NULL

Definition at line 31 of file union.h.

◆ PA_UNDEFINED_P

#define PA_UNDEFINED_P (   pa)    ((pa) == PA_UNDEFINED)

Definition at line 118 of file union.h.

◆ PATH_MAX_CONSTRAINTS

#define PATH_MAX_CONSTRAINTS   12

Misceleanous (debuging...)

Definition at line 139 of file union.h.

◆ sc_convex_hull_equals_union_p

#define sc_convex_hull_equals_union_p (   conv_hull,
  ps1,
  ps2 
)     pa_convex_hull_equals_union_p_ofl_ctrl((conv_hull), (ps1), (ps2),NO_OFL_CTRL, false)

Definition at line 94 of file union.h.

◆ sc_convex_hull_equals_union_p_ofl

#define sc_convex_hull_equals_union_p_ofl (   conv_hull,
  ps1,
  ps2 
)     pa_convex_hull_equals_union_p_ofl_ctrl((conv_hull), (ps1), (ps2), OFL_CTRL, false)

Definition at line 96 of file union.h.

◆ sc_convex_hull_equals_union_p_ofl_ctrl

#define sc_convex_hull_equals_union_p_ofl_ctrl (   conv_hull,
  ps1,
  ps2,
  ofl,
  bo 
)     pa_convex_hull_equals_union_p_ofl_ctrl((conv_hull), (ps1), (ps2), (ofl), (bo))

Definition at line 98 of file union.h.

◆ sc_difference

#define sc_difference (   ps1,
  ps2 
)    pa_system_difference_ofl_ctrl((ps1),(ps2),FWD_OFL_CTRL)

FOR BACKWARD COMPATIBILITY.

Definition at line 87 of file union.h.

◆ sc_elim_redund_with_first

#define sc_elim_redund_with_first (   ps1,
  ps2 
)    sc_elim_redund_with_first_ofl_ctrl((ps1), (ps2), NO_OFL_CTRL)

OTHERS.

Definition at line 102 of file union.h.

◆ sc_equal_p

#define sc_equal_p (   ps1,
  ps2 
)    pa_system_equal_p_ofl_ctrl((ps1), (ps2), NO_OFL_CTRL)

Definition at line 91 of file union.h.

◆ sc_equal_p_ofl

#define sc_equal_p_ofl (   ps1,
  ps2 
)    pa_system_equal_p_ofl_ctrl((ps1), (ps2), FWD_OFL_CTRL)

Definition at line 92 of file union.h.

◆ sc_equal_p_ofl_ctrl

#define sc_equal_p_ofl_ctrl (   ps1,
  ps2,
  ofl 
)    pa_system_equal_p_ofl_ctrl((ps1), (ps2), (ofl))

Definition at line 93 of file union.h.

◆ sc_inclusion_p

#define sc_inclusion_p (   ps1,
  ps2 
)    pa_inclusion_p_ofl_ctrl((ps1), (ps2), NO_OFL_CTRL)

Definition at line 88 of file union.h.

◆ sc_inclusion_p_ofl

#define sc_inclusion_p_ofl (   ps1,
  ps2 
)    pa_inclusion_p_ofl_ctrl((ps1), (ps2), FWD_OFL_CTRL)

Definition at line 89 of file union.h.

◆ sc_inclusion_p_ofl_ctrl

#define sc_inclusion_p_ofl_ctrl (   ps1,
  ps2,
  ofl 
)    pa_inclusion_p_ofl_ctrl((ps1), (ps2), (ofl))

Definition at line 90 of file union.h.

◆ SL_NULL

#define SL_NULL   (Psyslist) NULL

Definition at line 16 of file union.h.

◆ UN_EMPTY_SPACE

#define UN_EMPTY_SPACE   (Punion) NULL

Definition at line 40 of file union.h.

◆ un_fprint

#define un_fprint (   fi,
  un,
  fu,
  ty 
)    un_fprint_tab((fi), (un), (fu), (ty), 0)

Definition at line 135 of file union.h.

◆ UN_FULL_SPACE

#define UN_FULL_SPACE   (Punion) NULL

Definition at line 39 of file union.h.

◆ UN_UNDEFINED

#define UN_UNDEFINED   (Punion) NULL

Definition at line 38 of file union.h.

Typedef Documentation

◆ Pcomplement

Definition at line 22 of file union.h.

◆ Pcomplist

typedef Ssyslist* Pcomplist

Definition at line 25 of file union.h.

◆ Pdisjunct

typedef Ssyslist* Pdisjunct

Definition at line 18 of file union.h.

◆ Ppath

typedef struct Spath * Ppath

◆ Psyslist

typedef struct Ssyslist * Psyslist

Warning! Do not modify this file that is automatically generated!

Modify src/Libs/union/union-local.h instead, to add your own modifications. header file built by cproto union-local.h

◆ Punion

typedef struct Sunion * Punion

◆ Scomplement

Definition at line 22 of file union.h.

◆ Scomplist

Definition at line 25 of file union.h.

◆ Sdisjunct

Definition at line 18 of file union.h.

◆ Spath

typedef struct Spath Spath

◆ Ssyslist

typedef struct Ssyslist Ssyslist

◆ Sunion

typedef struct Sunion Sunion

Enumeration Type Documentation

◆ hspara_elem

Implementation of the finite parallel half space lattice hspara.

                 ________ full 
                /          |
               /          empty ___
              /            |       \
             /           keep       \
            /           /    \       \
         ssplus        /    opplus    \
            |      ssminus    |     opminus
          sszero        \   opzero    /
             \           \   /       /
              \________ unpara _____/
Enumerator
unpara 

compare {h1: a1 X + b1 <= 0} with {hj: aj X + bj <= 0}

sszero 

unparallel -> h1/hj = h1

a1 == aj for same sign (ss) part lattice

ssplus 

b1 == bj -> h1/hj = full

ssminus 

bj > b1 -> h1/hj = full

keep part

opzero 

bj < b1 -> h1/hj = h1

-a1 == aj for opposite sign (op) part lattice

opplus 

b1 == bj -> h1/hj = h1

keep 

bj > b1 -> h1/hj = h1

opminus 

empty part

empty 

b1 < bj -> h1/hj = empty

full 
unpara 

compare {h1: a1 X + b1 <= 0} with {hj: aj X + bj <= 0}

sszero 

unparallel -> h1/hj = h1

a1 == aj for same sign (ss) part lattice

ssplus 

b1 == bj -> h1/hj = full

ssminus 

bj > b1 -> h1/hj = full

keep part

opzero 

bj < b1 -> h1/hj = h1

-a1 == aj for opposite sign (op) part lattice

opplus 

b1 == bj -> h1/hj = h1

keep 

bj > b1 -> h1/hj = h1

opminus 

empty part

empty 

b1 < bj -> h1/hj = empty

full 

Definition at line 56 of file union.h.

57 { /* compare {h1: a1 X + b1 <= 0} with {hj: aj X + bj <= 0} */
58  unpara = 0, /* unparallel -> h1/hj = h1 */
59  /**/ /* a1 == aj for same sign (ss) part lattice */
60  sszero = 1, /* b1 == bj -> h1/hj = full */
61  ssplus = 2, /* bj > b1 -> h1/hj = full */
62  /**/
63  /**/ /* keep part */
64  /**/
65  ssminus = 3, /* bj < b1 -> h1/hj = h1 */
66  /**/ /* -a1 == aj for opposite sign (op) part lattice */
67  opzero = 4, /* b1 == bj -> h1/hj = h1 */
68  opplus = 5, /* bj > b1 -> h1/hj = h1 */
69  keep = 6,
70  /**/ /* empty part */
71  opminus = 7, /* b1 < bj -> h1/hj = empty */
72  empty = 8,
73  full = 9
74 };
@ full
Definition: union.h:73
@ keep
bj > b1 -> h1/hj = h1
Definition: union.h:69
@ ssplus
b1 == bj -> h1/hj = full
Definition: union.h:61
@ opzero
bj < b1 -> h1/hj = h1
Definition: union.h:67
@ opplus
b1 == bj -> h1/hj = h1
Definition: union.h:68
@ ssminus
bj > b1 -> h1/hj = full
Definition: union.h:65
@ unpara
compare {h1: a1 X + b1 <= 0} with {hj: aj X + bj <= 0}
Definition: union.h:58
@ sszero
unparallel -> h1/hj = h1
Definition: union.h:60
@ opminus
empty part
Definition: union.h:71
@ empty
b1 < bj -> h1/hj = empty
Definition: union.h:72

Function Documentation

◆ contrainte_parallel_in_liste()

enum hspara_elem contrainte_parallel_in_liste ( Pcontrainte  in_co,
Pcontrainte  in_lc 
)

enum enum hspara_elem contrainte_parallel_in_liste( in_co, in_lc ) AL950711 input: 1 constraint in_co and a list of constraints in_lc output: hspara_elem (element of the parallel half space lattice) memory: Inspector (nothing is shared, nor modified, output allocated).

complexity: length(in_lc) * comp(vect_parallel()) comment: in_co represents a1 X+b1 <= 0 and in_lc aj X + bj <=0. Returns in_co/in_lc = join_j( vect_parallel( in_co, in_lc_j ) ) between keep, empty and full.

debuging

debuging

Parameters
in_con_co
in_lcn_lc

Definition at line 49 of file reduc.c.

206 {
207  Pcontrainte c;
208  Pvecteur vpos;
209  enum hspara_elem ret_sle = keep;
210 
212  if (CONTRAINTE_NULLE_P(in_co)) return keep;
213 
214  /* debuging */
215  C3_DEBUG("contrainte_parallel_in_list", {
216  fprintf(stderr, "Input in_co:");
217  inegalite_fprint( stderr, in_co, union_variable_name );
218  fprintf(stderr, "Input in_lc:\n");
219  inegalites_fprint( stderr, in_lc, union_variable_name );
220  });
221 
222  vpos = in_co->vecteur;
223 
224  for (c = in_lc; !CONTRAINTE_UNDEFINED_P(c) && (ret_sle != full); c=c->succ) {
225  Pvecteur cv = c->vecteur;
226  enum hspara_elem hs = vect_parallel(vpos, cv);
227 
228  C3_DEBUG("contrainte_parallel_in_list", {
229  fprintf(stderr, "ret_sle: %s , hs: %s\n",
230  hspara_to_string(ret_sle),
231  hspara_to_string( hs ) );
232  });
233 
234  ret_sle = hspara_join( ret_sle, hs);
235  }
236 
237 
238  /* debuging */
239  C3_DEBUG("contrainte_parallel_in_list",
240  { fprintf(stderr, "Output hspara: %s\n", hspara_to_string(ret_sle)); });
241 
242  return ret_sle;
243 }
#define CONTRAINTE_UNDEFINED_P(c)
#define CONTRAINTE_NULLE_P(c)
contrainte nulle (non contrainte 0 == 0 ou 0 <= 0)
void inegalites_fprint(FILE *, Pcontrainte, char *(*)(Variable))
void inegalite_fprint(FILE *, Pcontrainte, char *(*)(Variable))
#define assert(ex)
Definition: newgen_assert.h:41
#define hspara_to_string(se)
Definition: reduc.c:87
#define hspara_join(se1, se2)
Definition: reduc.c:85
enum hspara_elem vect_parallel(Pvecteur in_v1, Pvecteur in_v2)
enum hspara_elem vect_parallel(Pvecteur in_v1, Pvecteur in_v2) AL950711 input: 2 Pvecteur in_v1 and i...
Definition: reduc.c:104
char *(* union_variable_name)(Variable)
Package : C3/union Author : Arnauld LESERVOT (leservot(a)limeil.cea.fr) Date : Modified : 04 04 95 ...
Definition: sc_list.c:51
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
Pvecteur vecteur
struct Scontrainte * succ
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
Definition: vecteur-local.h:89
#define C3_DEBUG(fun, code)
Definition: union-local.h:150
hspara_elem
Implementation of the finite parallel half space lattice hspara.
Definition: union-local.h:49
@ full
Definition: union-local.h:65
@ keep
bj > b1 -> h1/hj = h1
Definition: union-local.h:61

Referenced by sc_supress_parallel_redund_constraints().

+ Here is the caller graph for this function:

◆ dj_append_system()

Pdisjunct dj_append_system ( Pdisjunct  in_dj,
Psysteme  in_ps 
)

Pdisjunct dj_append_system( (Pdisjunct) in_dj, (Psysteme) in_ps ) Input : A disjunct in_dj to wich in_ps will be added.

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

Parameters
in_djn_dj
in_psn_ps

Definition at line 403 of file disjunct.c.

406 {
407  Pdisjunct ret_dj;
408 
409  if (dj_full_p(in_dj)) { ret_dj = dj_new(); ret_dj->psys = in_ps; }
410  else {ret_dj = (Pdisjunct) sl_append_system((Psyslist) in_dj, in_ps);}
411  return ret_dj;
412 }
Pdisjunct dj_new()
Package : C3/union Author : Arnauld LESERVOT (leservot(a)limeil.cea.fr) Date : Modified : 04 04 95 ...
Definition: disjunct.c:52
bool dj_full_p(Pdisjunct in_dj)
dj_full_p( (Pdisjunct) in_dj ) AL 30/05/94 Returns True if in_dj = (NIL) ^ (NIL)
Definition: disjunct.c:98
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...
Definition: sc_list.c:240
Warning! Do not modify this file that is automatically generated!
Definition: union-local.h:3
Psysteme psys
Definition: union-local.h:4
Ssyslist * Pdisjunct
Definition: union-local.h:10

References dj_full_p(), dj_new(), Ssyslist::psys, and sl_append_system().

Referenced by compatible_pc_p(), dj_system_complement(), and pa_path_to_disjunct_rule4_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dj_disjunct_complement()

Pdisjunct dj_disjunct_complement ( Pdisjunct  in_dj)

Returns complement of in_dj.

No sharing

debugging

Parameters
in_djn_dj

Definition at line 299 of file disjunct.c.

301 {
302  Pdisjunct ret_dj;
303  if DJ_UNDEFINED_P(in_dj) return DJ_UNDEFINED;
304  if (dj_empty_p(in_dj)||dj_full_p(in_dj)) return dj_dup(in_dj);
305 
306  /* debugging */
307  C3_DEBUG("dj_disjunct_complement (in_ps)",
308  {dj_fprint_tab(stderr, in_dj, union_variable_name, 1);});
309 
310  ret_dj = dj_full();
311  for(; in_dj != NULL; in_dj = in_dj->succ)
312  { ret_dj = dj_intersection(ret_dj, dj_system_complement(in_dj->psys)); }
313  C3_RETURN(IS_DJ, ret_dj);
314 }
Pdisjunct dj_system_complement(Psysteme in_ps)
Pdisjunct dj_system_complement( (Psystem) in_ps ) AL 26/10/93 Input : A Psysteme.
Definition: disjunct.c:254
Pdisjunct dj_dup(Pdisjunct in_dj)
Pdisjunct dj_dup( (Pdisjunct) in_dj ) AL 15/11/93 Duplicates input disjunction.
Definition: disjunct.c:58
bool dj_empty_p(Pdisjunct in_dj)
dj_empty_p( (Ppath) in_pa ) AL 30/05/94 Returns True if in_dj = (1*TCST = 0) ^ (NIL)
Definition: disjunct.c:118
Pdisjunct dj_full()
Pdisjunct dj_full() AL 18/11/93 Return full space disjunction = dj_new()
Definition: disjunct.c:92
void dj_fprint_tab(FILE *in_fi, Pdisjunct in_dj, char *(*in_fu)(), int in_tab)
void dj_fprint_tab(FILE*, Pdisjunct, function, int) prints a Pdisjunct
Definition: disjunct.c:492
struct Ssyslist * succ
Definition: union-local.h:5
#define IS_DJ
Definition: union-local.h:135
#define DJ_UNDEFINED_P(dj)
Definition: union-local.h:97
#define dj_intersection(dj1, dj2)
Definition: union-local.h:101
#define C3_RETURN(type, val)
Definition: union-local.h:151
#define DJ_UNDEFINED
Definition: union-local.h:12

References C3_DEBUG, C3_RETURN, dj_dup(), dj_empty_p(), dj_fprint_tab(), dj_full(), dj_full_p(), dj_intersection, dj_system_complement(), DJ_UNDEFINED, DJ_UNDEFINED_P, IS_DJ, and union_variable_name.

Referenced by dj_intersect_djcomp_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dj_dup()

Pdisjunct dj_dup ( Pdisjunct  in_dj)

Pdisjunct dj_dup( (Pdisjunct) in_dj ) AL 15/11/93 Duplicates input disjunction.

Parameters
in_djn_dj

Definition at line 58 of file disjunct.c.

60 {
61  if (dj_full_p(in_dj)) return dj_full();
62  return (Pdisjunct) sl_dup( (Psyslist) in_dj );
63 }
Psyslist sl_dup(Psyslist in_sl)
Psyslist sl_dup( (Psyslist) in_sl ) AL 15/11/93 w - 1 duplication : everything is duplicated,...
Definition: sc_list.c:296

References dj_full(), dj_full_p(), and sl_dup().

Referenced by dj_disjunct_complement(), dj_intersect_djcomp_ofl_ctrl(), dj_intersection_ofl_ctrl(), and dj_simple_inegs_to_eg().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dj_dup1()

Pdisjunct dj_dup1 ( Pdisjunct  in_dj)

Pdisjunct dj_dup1( (Pdisjunct) in_dj ) AL 31/05/94 1st depth duplication of input disjunction.

Parameters
in_djn_dj

Definition at line 76 of file disjunct.c.

78 { return( (Pdisjunct) sl_dup1( (Psyslist) in_dj ) ); }
Psyslist sl_dup1(Psyslist in_sl)
Psyslist sl_dup1( (Psyslist) in_sl ) AL 15/11/93 Duplicates input syslist.
Definition: sc_list.c:311

References sl_dup1().

+ Here is the call graph for this function:

◆ dj_empty()

Pdisjunct dj_empty ( void  )

Pdisjunct dj_empty() AL 18/11/93 Returns a disjunction with sc_empty() element.

Definition at line 111 of file disjunct.c.

112 { return (Pdisjunct) sl_append_system(NULL, sc_empty((Pbase) NULL)); }
Psysteme sc_empty(Pbase b)
Psysteme sc_empty(Pbase b): build a Psysteme with one unfeasible constraint to define the empty subsp...
Definition: sc_alloc.c:319

References sc_empty(), and sl_append_system().

Referenced by dj_intersect_djcomp_ofl_ctrl(), dj_intersection_ofl_ctrl(), pa_path_to_disjunct_ofl_ctrl(), pa_path_to_disjunct_rule4_ofl_ctrl(), pa_path_to_few_disjunct_ofl_ctrl(), and pa_system_difference_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dj_empty_p()

bool dj_empty_p ( Pdisjunct  in_dj)

dj_empty_p( (Ppath) in_pa ) AL 30/05/94 Returns True if in_dj = (1*TCST = 0) ^ (NIL)

Parameters
in_djn_dj

Definition at line 118 of file disjunct.c.

120 {
121  return( ( in_dj != DJ_UNDEFINED ) &&
122  ( in_dj->succ == NULL ) &&
123  ( in_dj->psys != NULL ) &&
124  ( sc_empty_p( in_dj->psys ) ) );
125 }
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.
Definition: sc_alloc.c:350

References DJ_UNDEFINED, and sc_empty_p().

Referenced by dj_disjunct_complement(), dj_intersect_djcomp_ofl_ctrl(), dj_intersection_ofl_ctrl(), dj_projection_along_variables_ofl_ctrl(), dj_simple_inegs_to_eg(), dj_union(), dj_variable_rename(), dj_variable_substitution_with_eqs_ofl_ctrl(), and pa_feasibility_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dj_feasibility_ofl_ctrl()

bool dj_feasibility_ofl_ctrl ( Pdisjunct  in_dj,
int  ofl_ctrl 
)

bool dj_feasibility_ofl_ctrl( (Pdisjunct) in_dj, (int) ofl_ctrl ) Returns true if in_dj is a feasible disjunction.

AL,BC 23/02/95

Parameters
in_djn_dj
ofl_ctrlfl_ctrl

Definition at line 232 of file disjunct.c.

235 {
236  bool ret_bool = false;
237  Pdisjunct dj;
238 
239  if ( in_dj == DJ_UNDEFINED ) return false;
240  for( dj = in_dj; dj != NULL && !ret_bool; dj = dj->succ ) {
241  if (dj->psys == SC_UNDEFINED) return false;
242  ret_bool = ret_bool ||
243  sc_rational_feasibility_ofl_ctrl( dj->psys, ofl_ctrl, true );
244  }
245  return ret_bool;
246 }
bool sc_rational_feasibility_ofl_ctrl(Psysteme sc, int ofl_ctrl, bool ofl_res)

References DJ_UNDEFINED, Ssyslist::psys, sc_rational_feasibility_ofl_ctrl(), and Ssyslist::succ.

+ Here is the call graph for this function:

◆ dj_fprint_tab()

void dj_fprint_tab ( FILE *  ,
Pdisjunct  ,
char *  *)(void,
int   
)

◆ dj_free()

Pdisjunct dj_free ( Pdisjunct  in_dj)

Pdisjunct dj_free( (Pdisjunct) in_dj ) AL 31/05/94 w - 1 depth free of input disjunction.

Parameters
in_djn_dj

Definition at line 69 of file disjunct.c.

70  { return (Pdisjunct) sl_free( (Psyslist) in_dj ); }
Psyslist sl_free(Psyslist psl)
Psyslist sl_free(Psyslist psl) BA, AL 30/05/94 w - 1 depth free.
Definition: sc_list.c:327

References sl_free().

Referenced by disjunction_to_region_sc(), dj_union(), pa_feasibility_ofl_ctrl(), pa_path_to_disjunct_ofl_ctrl(), pa_path_to_few_disjunct_ofl_ctrl(), pa_reduce_simple_complement(), and pa_system_difference_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dj_free1()

Pdisjunct dj_free1 ( Pdisjunct  in_dj)

Pdisjunct dj_free1( (Pdisjunct) in_dj ) AL 31/05/94 1st depth free of input disjunction.

Parameters
in_djn_dj

Definition at line 84 of file disjunct.c.

85  { return (Pdisjunct) sl_free1( (Psyslist) in_dj ); }
Psyslist sl_free1(Psyslist psl)
Psyslist sl_free1(Psyslist psl) AL 30/05/94 1 depth free.
Definition: sc_list.c:343

References sl_free1().

Referenced by disjunction_to_region_sc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dj_full()

Pdisjunct dj_full ( void  )

Pdisjunct dj_full() AL 18/11/93 Return full space disjunction = dj_new()

Definition at line 92 of file disjunct.c.

92 { return( dj_new() ); }

References dj_new().

Referenced by dj_disjunct_complement(), dj_dup(), dj_intersection_ofl_ctrl(), dj_system_complement(), pa_path_to_disjunct_ofl_ctrl(), and pa_path_to_few_disjunct_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dj_full_p()

bool dj_full_p ( Pdisjunct  in_dj)

dj_full_p( (Pdisjunct) in_dj ) AL 30/05/94 Returns True if in_dj = (NIL) ^ (NIL)

Parameters
in_djn_dj

Definition at line 98 of file disjunct.c.

100 {
101  return( (in_dj != DJ_UNDEFINED) &&
102  ( in_dj->succ == NULL ) &&
103  ( in_dj->psys == NULL ) );
104 }

References DJ_UNDEFINED.

Referenced by dj_append_system(), dj_disjunct_complement(), dj_dup(), dj_fprint_tab(), dj_intersect_djcomp_ofl_ctrl(), dj_intersection_ofl_ctrl(), dj_projection_along_variables_ofl_ctrl(), dj_simple_inegs_to_eg(), dj_union(), dj_variable_rename(), and dj_variable_substitution_with_eqs_ofl_ctrl().

+ Here is the caller graph for this function:

◆ dj_intersect_djcomp_ofl_ctrl()

Pdisjunct dj_intersect_djcomp_ofl_ctrl ( Pdisjunct  in_dj1,
Pdisjunct  in_dj2,
int  ofl_ctrl 
)

Pdisjunct dj_intersect_djcomp_ofl_ctrl( ) No sharing.

in_dj1 and in_dj2 stay as is.

Special cases

debuging

General cases

Parameters
in_dj1n_dj1
in_dj2n_dj2
ofl_ctrlfl_ctrl

Definition at line 173 of file disjunct.c.

176 {
177  Pdisjunct dj, ret_dj;
178 
179  /* Special cases */
180  if (DJ_UNDEFINED_P(in_dj1) || DJ_UNDEFINED_P(in_dj2)) return DJ_UNDEFINED;
181 
182  if (dj_empty_p( in_dj1 ) || dj_full_p(in_dj2)) return dj_empty();
183  if (dj_full_p ( in_dj1 )) return dj_disjunct_complement( in_dj2 );
184  if (dj_empty_p( in_dj2 )) return dj_dup( in_dj1 );
185 
186  /* debuging */
187  C3_DEBUG("dj_intersect_djcomp_ofl_ctrl",{
188  fprintf(stderr,"Inputs (in_dj1, then in_dj2):");
189  dj_fprint_tab(stderr, in_dj1, union_variable_name, 1);
190  dj_fprint_tab(stderr, in_dj2, union_variable_name, 1);
191  });
192 
193  /* General cases */
194  ret_dj = dj_empty();
195  for(dj = in_dj1; dj != NULL; dj = dj->succ ){
196  Ppath pa = pa_make( dj->psys, (Pcomplist) in_dj2 );
197  ret_dj = dj_union( ret_dj, pa_path_to_few_disjunct_ofl_ctrl( pa, ofl_ctrl ) );
198  free(pa);
199  }
200  C3_RETURN(IS_DJ, ret_dj);
201 }
Pdisjunct dj_disjunct_complement(Pdisjunct in_dj)
Returns complement of in_dj.
Definition: disjunct.c:299
Pdisjunct dj_union(Pdisjunct in_dj1, Pdisjunct in_dj2)
Pdisjunct dj_union( (Pdisjunct) in_dj1, (Pdisjunct) in_dj2 ) Give the union of the two disjunctions.
Definition: disjunct.c:211
Pdisjunct dj_empty()
Pdisjunct dj_empty() AL 18/11/93 Returns a disjunction with sc_empty() element.
Definition: disjunct.c:111
void free(void *)
Ppath pa_make(Psysteme in_ps, Pcomplist in_pcomp)
Package : C3/union Author : Arnauld LESERVOT (leservot(a)limeil.cea.fr) Date : Modified : 04 04 95 ...
Definition: path.c:53
Pdisjunct pa_path_to_few_disjunct_ofl_ctrl(Ppath in_pa, int ofl_ctrl)
line 1197 "reduc.w"
Definition: reduc.c:648

References C3_DEBUG, C3_RETURN, dj_disjunct_complement(), dj_dup(), dj_empty(), dj_empty_p(), dj_fprint_tab(), dj_full_p(), DJ_UNDEFINED, DJ_UNDEFINED_P, dj_union(), fprintf(), free(), IS_DJ, pa_make(), pa_path_to_few_disjunct_ofl_ctrl(), Ssyslist::psys, Ssyslist::succ, and union_variable_name.

+ Here is the call graph for this function:

◆ dj_intersect_system_ofl_ctrl()

Pdisjunct dj_intersect_system_ofl_ctrl ( Pdisjunct  ,
Psysteme  ,
int   
)

◆ dj_intersection_ofl_ctrl()

Pdisjunct dj_intersection_ofl_ctrl ( Pdisjunct  in_dj1,
Pdisjunct  in_dj2,
int  ofl_ctrl 
)

Pdisjunct dj_intersection_ofl_ctrl( in_dj1, in_dj2, ofl_ctrl ) Computes intersection of two disjunctions.

AL,BC 23/03/95 Very costly function : -> sc_faisabilite_ofl_ctrl used. No sharing

empty intersection

Parameters
in_dj1n_dj1
in_dj2n_dj2
ofl_ctrlfl_ctrl

Definition at line 134 of file disjunct.c.

137 {
138  Pdisjunct dj1, dj2, ret_dj;
139 
140  if (DJ_UNDEFINED_P(in_dj1)||DJ_UNDEFINED_P(in_dj2)) return DJ_UNDEFINED ;
141  if (dj_full_p(in_dj1) && dj_full_p(in_dj2)) return dj_full() ;
142  if (dj_full_p(in_dj1)) return dj_dup(in_dj2) ;
143  if (dj_full_p(in_dj2)) return dj_dup(in_dj1) ;
144  if (dj_empty_p(in_dj1)||dj_empty_p(in_dj2)) return dj_empty() ;
145 
146  ret_dj = (Pdisjunct) NULL;
147  for(dj1 = in_dj1; dj1 != NULL; dj1 = dj1->succ) {
148  for(dj2 = in_dj2; dj2 != NULL; dj2 = dj2->succ) {
149  Psysteme ps = sc_append( sc_dup(dj1->psys), dj2->psys );
150  if (!sc_rational_feasibility_ofl_ctrl( ps, ofl_ctrl, true ))
151  { ps = sc_free( ps ); continue; }
152  ret_dj = (Pdisjunct) sl_append_system( ret_dj, ps );
153  }
154  }
155  if (ret_dj == (Pdisjunct) NULL) return dj_empty(); /* empty intersection */
156  return ret_dj;
157 }
Psysteme sc_dup(Psysteme ps)
Psysteme sc_dup(Psysteme ps): should becomes a link.
Definition: sc_alloc.c:176
Psysteme sc_append(Psysteme s1, Psysteme s2)
Psysteme sc_append(Psysteme s1, Psysteme s2): calcul de l'intersection des polyedres definis par s1 e...
Psysteme sc_free(Psysteme in_ps)
Psysteme sc_free( in_ps ) AL 30/05/94 Free of in_ps.
Definition: sc_list.c:112

References dj_dup(), dj_empty(), dj_empty_p(), dj_full(), dj_full_p(), DJ_UNDEFINED, DJ_UNDEFINED_P, Ssyslist::psys, sc_append(), sc_dup(), sc_free(), sc_rational_feasibility_ofl_ctrl(), sl_append_system(), and Ssyslist::succ.

Referenced by dj_intersect_system_ofl_ctrl(), and pa_path_to_disjunct_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dj_is_system_p()

bool dj_is_system_p ( Pdisjunct  in_dj)

bool dj_is_system_p( (Pdisjunct) in_dj ) AL 16/11/93 Returns True if disjunction in_dj has only one Psysteme in it.

Parameters
in_djn_dj

Definition at line 393 of file disjunct.c.

395 { return( sl_is_system_p( (Psyslist) in_dj ) ); }
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...
Definition: sc_list.c:230

References sl_is_system_p().

+ Here is the call graph for this function:

◆ dj_new()

Pdisjunct dj_new ( void  )

cproto-generated files

disjunct.c

cproto-generated files

           WARNING

THOSE FUNCTIONS ARE AUTOMATICALLY DERIVED

    FROM THE WEB SOURCES !

Ansi includes
Linear includes
Pdisjunct dj_new() AL 26/10/93 Allocate a new Pdisjunct

Definition at line 52 of file disjunct.c.

52 { return( (Pdisjunct) sl_new() ); }
Psyslist sl_new()
Psyslist sl_new() AL 26/10/93 Input : Nothing.
Definition: sc_list.c:277

References sl_new().

Referenced by dj_append_system(), and dj_full().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dj_projection_along_variables_ofl_ctrl()

Pdisjunct dj_projection_along_variables_ofl_ctrl ( Pdisjunct  in_dj,
Pvecteur  in_pv,
int  ofl_ctrl 
)

Returns projection of in_dj along vars of in_pv.

Sharing : in_dj is modified

Parameters
in_djn_dj
in_pvn_pv
ofl_ctrlfl_ctrl

Definition at line 319 of file disjunct.c.

323 {
324  Pdisjunct dj;
325  if DJ_UNDEFINED_P(in_dj) return DJ_UNDEFINED;
326  if (dj_empty_p(in_dj)||dj_full_p(in_dj)) return in_dj;
327 
328  for(dj = in_dj; dj != NULL; dj = dj->succ)
329  { sc_projection_along_variables_ofl_ctrl( &(dj->psys), in_pv, ofl_ctrl ); }
330  return in_dj;
331 }

References dj_empty_p(), dj_full_p(), DJ_UNDEFINED, DJ_UNDEFINED_P, Ssyslist::psys, and Ssyslist::succ.

+ Here is the call graph for this function:

◆ dj_read()

Pdisjunct dj_read ( char *  nomfic)

void dj_read(FILE*) reads a Pdisjunct

Parameters
nomficomfic

Definition at line 510 of file disjunct.c.

512 { return ( (Pdisjunct) sl_read(nomfic) ); }
Psyslist sl_read(char *nomfic)
void sl_read(FILE*) reads a Psyslist
Definition: sc_list.c:461

References sl_read().

+ Here is the call graph for this function:

◆ dj_simple_inegs_to_eg()

Pdisjunct dj_simple_inegs_to_eg ( Pdisjunct  in_dj)

Pdisjunct dj_simple_inegs_to_eg( in_dj ) transforms two opposite inequalities in a simple equality in each system of the input disjunction.

Input disjunction is not modified.

Special case

General case

Compare with inequalities

Do we have ineq <= 0 and - ineq <= 0 ?

Parameters
in_djn_dj

Definition at line 339 of file disjunct.c.

341 {
342  Pdisjunct dj;
343  Pdisjunct ret_dj = NULL;
344 
345  /* Special case */
346  if (DJ_UNDEFINED_P(in_dj) || dj_empty_p(in_dj) || dj_full_p(in_dj))
347  return dj_dup(in_dj);
348 
349  /* General case */
350  for( dj = in_dj; dj != NULL; dj = dj->succ) {
351  Psysteme ps = dj->psys, new_ps;
352  Pcontrainte ineq;
353 
354  assert(!SC_UNDEFINED_P(ps)&&!sc_empty_p(ps)&&!sc_full_p(ps));
355 
356  if (ps->nb_ineq <= 1) {
357  ret_dj = sl_append_system( ret_dj, sc_dup( ps ));
358  continue;
359  }
360 
361  /* Compare with inequalities */
363  for (ineq = ps->inegalites; ineq != NULL; ineq = ineq->succ) {
364  Pcontrainte co, ineq2;
365  Pvecteur pv = vect_dup(ineq->vecteur);
366  vect_chg_sgn ( pv );
367  co = contrainte_make( pv );
368  ineq2 = contrainte_dup(ineq);
369 
370  /* Do we have ineq <= 0 and - ineq <= 0 ? */
371  if (contrainte_in_liste(co, ps->inegalites)) {
372  if ( !contrainte_in_liste(ineq, new_ps->egalites)
373  && !contrainte_in_liste(co, new_ps->egalites) )
374  sc_add_egalite( new_ps, ineq2 );
375  }
376  else { sc_add_inegalite( new_ps, ineq2 ); }
377  co = contrainte_free( co );
378  }
379 
380  new_ps->base = NULL;
381  sc_creer_base( new_ps );
382  ret_dj = (Pdisjunct) sl_append_system( ret_dj, new_ps );
383  }
384 
385  return ret_dj;
386 }
#define CONTRAINTE_UNDEFINED
Pcontrainte contrainte_make(Pvecteur pv)
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecte...
Definition: alloc.c:73
Pcontrainte contrainte_free(Pcontrainte c)
Pcontrainte contrainte_free(Pcontrainte c): liberation de l'espace memoire alloue a la contrainte c a...
Definition: alloc.c:184
Pcontrainte contrainte_dup(Pcontrainte c_in)
Pcontrainte contrainte_dup(Pcontrainte c_in): allocation d'une contrainte c_out prenant la valeur de ...
Definition: alloc.c:132
Pcontrainte contraintes_dup(Pcontrainte c_in)
Pcontrainte contraintes_dup(Pcontrainte c_in) a list of constraints is copied.
Definition: alloc.c:146
bool contrainte_in_liste(Pcontrainte, Pcontrainte)
listes.c
Definition: listes.c:52
Psysteme sc_make(Pcontrainte leg, Pcontrainte lineg)
Psysteme sc_make(Pcontrainte leg, Pcontrainte lineg): allocation et initialisation d'un systeme d'equ...
Definition: sc.c:78
void sc_creer_base(Psysteme ps)
void sc_creer_base(Psysteme ps): initialisation des parametres dimension et base d'un systeme lineair...
Definition: sc_alloc.c:129
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 ...
Definition: sc_alloc.c:389
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...
Definition: sc_alloc.c:406
bool sc_full_p(Psysteme in_ps)
Psysteme sc_full_p( in_ps ) similar to sc_new.
Definition: sc_list.c:61
void vect_chg_sgn(Pvecteur v)
void vect_chg_sgn(Pvecteur v): multiplie v par -1
Definition: scalaires.c:151
Pcontrainte inegalites
Definition: sc-local.h:71
Pcontrainte egalites
Definition: sc-local.h:70
int nb_ineq
Definition: sc-local.h:73
Pvecteur vect_dup(Pvecteur v_in)
Pvecteur vect_dup(Pvecteur v_in): duplication du vecteur v_in; allocation de et copie dans v_out;.
Definition: alloc.c:51

References assert, contrainte_dup(), contrainte_free(), contrainte_in_liste(), contrainte_make(), CONTRAINTE_UNDEFINED, contraintes_dup(), dj_dup(), dj_empty_p(), dj_full_p(), DJ_UNDEFINED_P, Ssysteme::egalites, Ssysteme::inegalites, Ssysteme::nb_ineq, Ssyslist::psys, sc_add_egalite(), sc_add_inegalite(), sc_creer_base(), sc_dup(), sc_empty_p(), sc_full_p(), sc_make(), sl_append_system(), Scontrainte::succ, Ssyslist::succ, vect_chg_sgn(), vect_dup(), and Scontrainte::vecteur.

Referenced by pa_system_difference_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dj_system_complement()

Pdisjunct dj_system_complement ( Psysteme  in_ps)

Pdisjunct dj_system_complement( (Psystem) in_ps ) AL 26/10/93 Input : A Psysteme.

Output : A disjunction which is complement of in_ps.

debugging

v1 = 1*TCST to build complement system ...

Look for equalities

Look for inequalities

Parameters
in_psn_ps

Definition at line 254 of file disjunct.c.

256 {
257  Pdisjunct ret_dj = NULL;
258  Pvecteur v1 = NULL, pv = NULL;
259  Psysteme ps = NULL;
260  Pcontrainte eq = NULL, ineq = NULL;
261 
262  if ( in_ps == SC_UNDEFINED ) return DJ_UNDEFINED;
263  if (sc_empty_p(in_ps)) return dj_full();
264 
265  /* debugging */
266  C3_DEBUG("dj_system_complement (in_ps)",
267  {sc_fprint(stderr, in_ps, union_variable_name);});
268 
269 
270  /* v1 = 1*TCST to build complement system ... */
271  v1 = vect_new( TCST, VALUE_ONE);
272  /* Look for equalities */
273  for( eq = in_ps->egalites; eq != NULL; eq = eq->succ ) {
275  contrainte_make( vect_add( v1, eq->vecteur ) ) );
276  ret_dj = (Pdisjunct) sl_append_system( ret_dj, ps );
277  pv = vect_dup( eq->vecteur ); vect_chg_sgn( pv );
279  vect_rm( pv ); pv = NULL;
280  ret_dj = (Pdisjunct) sl_append_system( ret_dj, ps );
281 
282  }
283  /* Look for inequalities */
284  for(ineq = in_ps->inegalites; ineq != NULL; ineq = ineq->succ) {
285  pv = vect_dup(ineq->vecteur);
286  vect_chg_sgn( pv );
288  vect_rm( pv ); pv = NULL;
289  ret_dj = dj_append_system( ret_dj, ps );
290  }
291 
292  vect_rm( v1 );
293  C3_RETURN(IS_DJ, ret_dj);
294 }
#define VALUE_ONE
Pdisjunct dj_append_system(Pdisjunct in_dj, Psysteme in_ps)
Pdisjunct dj_append_system( (Pdisjunct) in_dj, (Psysteme) in_ps ) Input : A disjunct in_dj to wich in...
Definition: disjunct.c:403
Pcontrainte eq
element du vecteur colonne du systeme donne par l'analyse
Definition: sc_gram.c:108
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...
Definition: sc_io.c:220
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
Pvecteur vect_new(Variable var, Value coeff)
Pvecteur vect_new(Variable var,Value coeff): allocation d'un vecteur colineaire au vecteur de base va...
Definition: alloc.c:110
void vect_rm(Pvecteur v)
void vect_rm(Pvecteur v): desallocation des couples de v;
Definition: alloc.c:78
Pvecteur vect_add(Pvecteur v1, Pvecteur v2)
package vecteur - operations binaires
Definition: binaires.c:53

References C3_DEBUG, C3_RETURN, contrainte_make(), CONTRAINTE_UNDEFINED, dj_append_system(), dj_full(), DJ_UNDEFINED, Ssysteme::egalites, eq, Ssysteme::inegalites, IS_DJ, sc_empty_p(), sc_fprint(), sc_make(), sl_append_system(), Scontrainte::succ, TCST, union_variable_name, VALUE_ONE, vect_add(), vect_chg_sgn(), vect_dup(), vect_new(), vect_rm(), and Scontrainte::vecteur.

Referenced by analyze_quast(), dj_disjunct_complement(), pa_path_to_disjunct_ofl_ctrl(), and pa_reduce_simple_complement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dj_union()

Pdisjunct dj_union ( Pdisjunct  in_dj1,
Pdisjunct  in_dj2 
)

Pdisjunct dj_union( (Pdisjunct) in_dj1, (Pdisjunct) in_dj2 ) Give the union of the two disjunctions.

AL 15/11/93 Memory: systems of the 2 unions are shared. in_dj1 = dj_union(in_dj1,in_dj2); (in_dj1 = dj_free(in_dj1); to remove in_dj1 and in_dj2

Parameters
in_dj1n_dj1
in_dj2n_dj2

Definition at line 211 of file disjunct.c.

213 {
214  Pdisjunct dj;
215 
216  if (DJ_UNDEFINED_P(in_dj1) || DJ_UNDEFINED_P(in_dj2)) return DJ_UNDEFINED;
217  if (dj_empty_p( in_dj2 )) {dj_free(in_dj2); return in_dj1;}
218  if (dj_full_p ( in_dj2 )) {dj_free(in_dj1); return in_dj2;}
219  if (dj_empty_p( in_dj1 )) {dj_free(in_dj1); return in_dj2;}
220  if (dj_full_p ( in_dj1 )) {dj_free(in_dj2); return in_dj1;}
221 
222  for( dj = in_dj1; dj->succ != NULL; dj = dj->succ) {};
223  dj->succ = in_dj2;
224  return in_dj1;
225 }
Pdisjunct dj_free(Pdisjunct in_dj)
Pdisjunct dj_free( (Pdisjunct) in_dj ) AL 31/05/94 w - 1 depth free of input disjunction.
Definition: disjunct.c:69

References dj_empty_p(), dj_free(), dj_full_p(), DJ_UNDEFINED, DJ_UNDEFINED_P, and Ssyslist::succ.

Referenced by dj_intersect_djcomp_ofl_ctrl(), and pa_path_to_few_disjunct_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dj_variable_rename()

Pdisjunct dj_variable_rename ( Pdisjunct  in_dj,
Variable  in_vold,
Variable  in_vnew 
)

dj_variable_rename replaces in_vold with in_vnew : in_dj is modified

Parameters
in_djn_dj
in_voldn_vold
in_vnewn_vnew

Definition at line 417 of file disjunct.c.

421 {
422  Pdisjunct dj;
423  if DJ_UNDEFINED_P(in_dj) return DJ_UNDEFINED;
424  if (dj_empty_p(in_dj)||dj_full_p(in_dj)) return in_dj;
425 
426  for(dj = in_dj; dj != NULL; dj = dj->succ)
427  { sc_variable_rename( dj->psys, in_vold, in_vnew ); }
428  return in_dj;
429 }
Psysteme sc_variable_rename(Psysteme s, Variable v_old, Variable v_new)
Psysteme sc_variable_rename(Psysteme s, Variable v_old, Variable v_new): reecriture du systeme s remp...
Definition: sc.c:157

References dj_empty_p(), dj_full_p(), DJ_UNDEFINED, DJ_UNDEFINED_P, Ssyslist::psys, sc_variable_rename(), and Ssyslist::succ.

+ Here is the call graph for this function:

◆ dj_variable_substitution_with_eqs_ofl_ctrl()

Pdisjunct dj_variable_substitution_with_eqs_ofl_ctrl ( Pdisjunct  ,
Pcontrainte  ,
Pvecteur  ,
int   
)

◆ pa_convex_hull_equals_union_p_ofl_ctrl()

bool pa_convex_hull_equals_union_p_ofl_ctrl ( Psysteme  conv_hull,
Psysteme  ps1,
Psysteme  ps2,
int  ofl_ctrl,
volatile bool  ofl_res 
)

bool pa_convex_hull_equals_union_p(conv_hull, ps1, ps2) input : two Psystems and their convex hull AL,BC 23/03/95 output : true if ps1 U ps2 = convex_hull, false otherwise modifies : nothing comment : complexity = nb_constraints(ps1) * nb_constraints(ps2) if ofl_ctrl = OFL_CTRL, conservatively returns ofl_ctrl when an overflow error occurs

Parameters
conv_hullonv_hull
ps1s1
ps2s2
ofl_ctrlfl_ctrl
ofl_resfl_res

Definition at line 937 of file reduc.c.

942 {
943  volatile Ppath chemin;
944  bool result;
945  int local_ofl_ctrl = (ofl_ctrl == OFL_CTRL)?FWD_OFL_CTRL:ofl_ctrl;
946 
947  chemin = pa_make(conv_hull,sl_append_system(sl_append_system(NULL,ps1),ps2));
948 
949  if (ofl_ctrl==OFL_CTRL) {
951  result = ofl_res;
952  }
953  TRY {
954  result = !(pa_feasibility_ofl_ctrl(chemin, local_ofl_ctrl));
956  }
957  }
958  else
959  result = !(pa_feasibility_ofl_ctrl(chemin, local_ofl_ctrl));
960 
961  chemin = pa_free1(chemin);
962  return(result);
963 }
#define CATCH(what)
@ overflow_error
#define UNCATCH(what)
#define TRY
bool pa_feasibility_ofl_ctrl(Ppath in_pa, int ofl_ctrl)
bool pa_feasibility_ofl_ctrl( (Ppath) in_pa, int ofl_ctrl) Returns true if the input path is possib...
Definition: path.c:309
Ppath pa_free1(Ppath in_pa)
Ppath pa_free1(Ppath pa) BA, AL 30/05/94 1 depth free.
Definition: path.c:102
#define FWD_OFL_CTRL
#define OFL_CTRL
I do thing that overflows are managed in a very poor manner.

References CATCH, FWD_OFL_CTRL, OFL_CTRL, overflow_error, pa_feasibility_ofl_ctrl(), pa_free1(), pa_make(), sl_append_system(), TRY, and UNCATCH.

+ Here is the call graph for this function:

◆ pa_dup()

Ppath pa_dup ( Ppath  in_pa)

void pa_dup(Ppath pa) AL 30/05/94

Parameters
in_pan_pa

Definition at line 68 of file path.c.

70 {
71  if (in_pa == PA_UNDEFINED ) return PA_UNDEFINED;
72  return pa_make( sc_dup(in_pa->psys), sl_dup(in_pa->pcomp) );
73 }
Pcomplist pcomp
Definition: union-local.h:20
Psysteme psys
Definition: union-local.h:19
#define PA_UNDEFINED
Definition: union-local.h:23

References pa_make(), PA_UNDEFINED, sc_dup(), and sl_dup().

+ Here is the call graph for this function:

◆ pa_dup1()

Ppath pa_dup1 ( Ppath  in_pa)

void pa_dup1(Ppath pa) AL 30/05/94 1 depth duplication: system and complements are shared.

Parameters
in_pan_pa

Definition at line 91 of file path.c.

93 {
94  if (in_pa == PA_UNDEFINED) return PA_UNDEFINED;
95  return pa_make( in_pa->psys, sl_dup1(in_pa->pcomp) );
96 }

References pa_make(), PA_UNDEFINED, and sl_dup1().

+ Here is the call graph for this function:

◆ pa_empty()

Ppath pa_empty ( void  )

Ppath pa_empty() AL 18/11/93 Returns empty path : pa_empty = sc_empty(NULL) ^ (NIL)

Definition at line 135 of file path.c.

135 { return pa_make(sc_empty(NULL), NULL); }

References pa_make(), and sc_empty().

Referenced by adg_path_possible_source(), pa_intersect_complement(), pa_intersect_system(), pa_path_to_few_disjunct_ofl_ctrl(), pa_reduce_simple_complement(), and pa_supress_same_constraints().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_empty_p()

bool pa_empty_p ( Ppath  in_pa)

pa_empty_p( (Ppath) in_pa ) AL 18/11/93 Returns True if in_pa = (1*TCST = 0) ^ (NIL)

Parameters
in_pan_pa

Definition at line 141 of file path.c.

143 {
144  return( (in_pa != PA_UNDEFINED) &&
145  ( in_pa->pcomp == NULL ) &&
146  ( in_pa->psys != NULL ) &&
147  ( sc_empty_p( in_pa->psys ) ) );
148 }

References PA_UNDEFINED, and sc_empty_p().

Referenced by adg_dataflowgraph(), adg_path_possible_source(), pa_feasibility_ofl_ctrl(), pa_intersect_complement(), pa_intersect_system(), pa_max_constraints_nb(), 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(), and pa_transform_eg_in_ineg().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_feasibility_ofl_ctrl()

bool pa_feasibility_ofl_ctrl ( Ppath  in_pa,
int  ofl_ctrl 
)

bool pa_feasibility_ofl_ctrl( (Ppath) in_pa, int ofl_ctrl)
Returns true if the input path is possible and false if it is not possible or undefined.


Parameters
in_pan_pa
ofl_ctrlfl_ctrl

Definition at line 309 of file path.c.

312 {
313  Pdisjunct dj;
314  Ppath pa;
315  bool ret_bo = false;
316 #ifdef TRACE_LINEAR_PATH
317  FILE* report_file;
318 #endif
319 
320  if ( PA_UNDEFINED_P( in_pa )) return false;
321  if ( pa_empty_p ( in_pa )) return false;
322  if ( pa_full_p ( in_pa )) return true;
323 
324 #ifdef TRACE_LINEAR_PATH
325  /* Just to keep trace of input paths if wanted */
326  if (getenv("KEEP_PATH") != (char*) NULL) {
327  struct timeval *tp = (struct timeval*) malloc(sizeof(struct timeval));
328  struct timezone *tz = (struct timezone*) malloc(sizeof(struct timezone));
329  int seconds;
330  gettimeofday( tp, tz ); seconds = tp->tv_sec;
331  report_file = fopen("mail_those_paths_to_arnauld","a");
332  pa_fprint( report_file, in_pa, union_variable_name );
333  fprintf( report_file, "# %s", ctime( &(seconds) ));
334  fprintf( report_file,
335  "# Module: \t%s\n", db_get_current_module_name());
336  fprintf( report_file,
337  "# Input number of complement: \t%d\n", sl_length(in_pa->pcomp) );
338  fprintf( report_file,
339  "# Input max constrainst: \t%d\n", pa_max_constraints_nb(in_pa));
340  fflush ( report_file ); free( tp ); free( tz );
341  }
342 #endif
343 
344  pa = pa_supress_same_constraints( in_pa );
345  dj = pa_path_to_few_disjunct_ofl_ctrl( pa, ofl_ctrl );
346  if( dj_empty_p(dj) || (dj == NULL) ) ret_bo = false;
347  else ret_bo = true;
348 
349 
350 #ifdef TRACE_LINEAR_PATH
351  /* keep trace of paths */
352  if (getenv("KEEP_PATH") != (char*) NULL) {
353  fprintf( report_file,
354  "# Output number of disjunctions: \t%d\n", sl_length(dj) );
355  fprintf( report_file,
356  "# Output max constrainst: \t%d\n", sl_max_constraints_nb(dj));
357  fprintf( report_file,
358  "# Feasible: \t%s\n", (ret_bo) ? "YES":"NO" );
359  fclose ( report_file );
360  }
361 #endif
362 
363  pa = pa_free( pa ); dj = dj_free( dj );
364  return ret_bo;
365 }
string db_get_current_module_name(void)
Also used to check whether set...
Definition: database.c:1059
void * malloc(YYSIZE_T)
int pa_max_constraints_nb(Ppath in_pa)
int pa_max_constraints_nb( (Ppath) in_pa ) Give the maximum constraints nb among systems of in_pa.
Definition: path.c:155
Ppath pa_free(Ppath in_pa)
Ppath pa_free(Ppath pa) BA, AL 30/05/94.
Definition: path.c:76
bool pa_full_p(Ppath in_pa)
pa_full_p( (Ppath) in_pa ) AL 18/11/93 Returns True if in_pa = (NIL) ^ (NIL)
Definition: path.c:123
bool pa_empty_p(Ppath in_pa)
pa_empty_p( (Ppath) in_pa ) AL 18/11/93 Returns True if in_pa = (1*TCST = 0) ^ (NIL)
Definition: path.c:141
Ppath pa_supress_same_constraints(Ppath in_pa)
Ppath pa_supress_same_constraints( (Ppath) in_pa ) Supress from complements of in_pa same constrain...
Definition: reduc.c:528
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.
Definition: sc_list.c:207
bool sl_length(Psyslist in_sl)
int sl_length( (Psyslist) in_sl ) AL 26/04/95 Returns length of in_sl.
Definition: sc_list.c:193
#define pa_fprint(fi, pa, fu)
Definition: union-local.h:109
#define PA_UNDEFINED_P(pa)
Definition: union-local.h:110

References db_get_current_module_name(), dj_empty_p(), dj_free(), fprintf(), free(), malloc(), pa_empty_p(), pa_fprint, pa_free(), pa_full_p(), pa_max_constraints_nb(), pa_path_to_few_disjunct_ofl_ctrl(), pa_supress_same_constraints(), PA_UNDEFINED_P, sl_length(), sl_max_constraints_nb(), and union_variable_name.

Referenced by disjunction_to_region_sc(), pa_convex_hull_equals_union_p_ofl_ctrl(), and pa_inclusion_p_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_fprint_tab()

void pa_fprint_tab ( FILE *  ,
Ppath  ,
char *  *)(void,
int   
)

◆ pa_free()

Ppath pa_free ( Ppath  in_pa)

Ppath pa_free(Ppath pa) BA, AL 30/05/94.

Parameters
in_pan_pa

Definition at line 76 of file path.c.

78 {
79  if (in_pa != PA_UNDEFINED) {
80  in_pa->psys = sc_free(in_pa->psys);
81  in_pa->pcomp = sl_free((Psyslist) in_pa->pcomp);
82  free( in_pa ); in_pa = PA_UNDEFINED;
83  }
84  return((Ppath) PA_UNDEFINED);
85 }

References free(), PA_UNDEFINED, Spath::psys, sc_free(), and sl_free().

Referenced by pa_feasibility_ofl_ctrl(), pa_path_to_disjunct_rule4_ofl_ctrl(), pa_path_to_few_disjunct_ofl_ctrl(), and pa_reduce_simple_complement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_free1()

Ppath pa_free1 ( Ppath  in_pa)

Ppath pa_free1(Ppath pa) BA, AL 30/05/94 1 depth free.

System and complement are not freed.

Parameters
in_pan_pa

Definition at line 102 of file path.c.

104 {
105  if (in_pa != PA_UNDEFINED) {
106  sl_free1((Psyslist) in_pa->pcomp);
107  free( in_pa ); in_pa = PA_UNDEFINED;
108  }
109  return((Ppath) PA_UNDEFINED);
110 }

References free(), PA_UNDEFINED, and sl_free1().

Referenced by disjunction_to_region_sc(), pa_convex_hull_equals_union_p_ofl_ctrl(), pa_inclusion_p_ofl_ctrl(), pa_path_to_few_disjunct_ofl_ctrl(), pa_reduce_simple_complement(), and pa_system_difference_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_full()

Ppath pa_full ( void  )

Ppath pa_full() AL 18/11/93 Returns full space path : pa_full = pa_new()

Definition at line 117 of file path.c.

117 { return pa_new(); }
#define pa_new()
Definition: union-local.h:111

References pa_new.

Referenced by adg_dataflowgraph(), adg_dataflowgraph_with_extremities(), and pa_supress_same_constraints().

+ Here is the caller graph for this function:

◆ pa_full_p()

bool pa_full_p ( Ppath  in_pa)

pa_full_p( (Ppath) in_pa ) AL 18/11/93 Returns True if in_pa = (NIL) ^ (NIL)

Parameters
in_pan_pa

Definition at line 123 of file path.c.

125 {
126  return( (in_pa != PA_UNDEFINED) &&
127  ( in_pa->pcomp == NULL ) &&
128  ( in_pa->psys == NULL ) );
129 }

References PA_UNDEFINED.

Referenced by pa_feasibility_ofl_ctrl(), pa_fprint_tab(), pa_intersect_complement(), pa_intersect_system(), pa_max_constraints_nb(), pa_path_to_disjunct_ofl_ctrl(), pa_path_to_few_disjunct_ofl_ctrl(), pa_reduce_simple_complement(), pa_supress_same_constraints(), and pa_transform_eg_in_ineg().

+ Here is the caller graph for this function:

◆ pa_inclusion_p_ofl_ctrl()

bool pa_inclusion_p_ofl_ctrl ( Psysteme  ps1,
Psysteme  ps2,
int  ofl_ctrl 
)

bool pa_inclusion_p(Psysteme ps1, Psysteme ps2) BA, AL 31/05/94 returns true if ps1 represents a subset of ps2, false otherwise Inspector (no sharing on memory).

Parameters
ps1s1
ps2s2
ofl_ctrlfl_ctrl

Definition at line 868 of file reduc.c.

871 {
872  bool result;
873  Ppath chemin = pa_make(ps1, sl_append_system(NULL, ps2));
874 
876  result = false;
877  }
878  TRY {
879  result = ! (pa_feasibility_ofl_ctrl(chemin, ofl_ctrl));
881  }
882  chemin = pa_free1(chemin);
883  return(result);
884 }

References CATCH, overflow_error, pa_feasibility_ofl_ctrl(), pa_free1(), pa_make(), sl_append_system(), TRY, and UNCATCH.

Referenced by pa_system_equal_p_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_intersect_complement()

Ppath pa_intersect_complement ( Ppath  in_pa,
Pcomplement  in_pc 
)

Ppath pa_intersect_complement( (Ppath) in_pa, (Pcomplement) in_pc ) Computes the intersection between in_pa and in_ps.

AL 17/11/93 No sharing

Parameters
in_pan_pa
in_pcn_pc

Definition at line 200 of file path.c.

203 {
204  Pcomplist pc;
205  Psysteme ps;
206 
207  if (PA_UNDEFINED_P(in_pa)||SC_UNDEFINED_P(in_pc)) return PA_UNDEFINED;
208  if (pa_empty_p(in_pa)) return pa_empty();
209 
210  if (pa_full_p(in_pa)) ps = sc_full(); else ps = sc_dup(in_pa->psys);
211  pc = sl_append_system( sl_dup(in_pa->pcomp), sc_dup(in_pc) );
212  return pa_make(ps, pc) ;
213 }
Ppath pa_empty()
Ppath pa_empty() AL 18/11/93 Returns empty path : pa_empty = sc_empty(NULL) ^ (NIL)
Definition: path.c:135
Psysteme sc_full()
Psysteme sc_full() similar to sc_new.
Definition: sc_list.c:58

References pa_empty(), pa_empty_p(), pa_full_p(), pa_make(), PA_UNDEFINED, PA_UNDEFINED_P, sc_dup(), sc_full(), sl_append_system(), and sl_dup().

Referenced by adg_path_max_source(), adg_path_possible_source(), and adg_update_dfg().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_intersect_system()

Ppath pa_intersect_system ( Ppath  in_pa,
Psysteme  in_ps 
)

Ppath pa_intersect_system( (Ppath) in_pa, (Psysteme) in_ps ) Computes the intersection between in_pa and in_ps.

AL 25/04/95 No sharing

Parameters
in_pan_pa
in_psn_ps

Definition at line 178 of file path.c.

181 {
182  Psysteme ps;
183 
184  if (PA_UNDEFINED_P(in_pa)||SC_UNDEFINED_P(in_ps))
185  return PA_UNDEFINED;
186  if ( pa_empty_p(in_pa) ) return pa_empty();
187  if ( pa_full_p(in_pa) ) return pa_make(sc_dup(in_ps),NULL);
188 
189  ps = sc_normalize(sc_append( sc_dup(in_pa->psys), in_ps ));
190  if (ps == NULL){ ps = sc_free(ps); return pa_empty(); }
191  return pa_make(ps, sl_dup(in_pa->pcomp));
192 }
Psysteme sc_normalize(Psysteme ps)
Psysteme sc_normalize(Psysteme ps): normalisation d'un systeme d'equation et d'inequations lineaires ...

References pa_empty(), pa_empty_p(), pa_full_p(), pa_make(), PA_UNDEFINED, PA_UNDEFINED_P, sc_append(), sc_dup(), sc_free(), sc_normalize(), and sl_dup().

Referenced by adg_max_of_leaves(), adg_path_max_source(), adg_path_possible_source(), and adg_update_dfg().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_make()

Ppath pa_make ( Psysteme  in_ps,
Pcomplist  in_pcomp 
)

path.c

path.c

           WARNING

THOSE FUNCTIONS ARE AUTOMATICALLY DERIVED

    FROM THE WEB SOURCES !

Ansi includes
Linear includes
Ppath pa_make(in_ps, in_pcomp) AL 16/11/93 Allocates a Ppath and initialize it with in_ps and in_pcomp SHARING.

Parameters
in_psn_ps
in_pcompn_pcomp

Definition at line 53 of file path.c.

56 {
57  Ppath ret_pa = (Ppath) malloc( sizeof( Spath ) );
58  if (ret_pa == NULL) {
59  (void) fprintf(stderr,"pa_new: Out of memory space\n");
60  exit(-1);
61  }
62  ret_pa->psys = in_ps; ret_pa->pcomp = in_pcomp;
63  return ret_pa;
64 }
#define exit(code)
Definition: misc-local.h:54
struct Spath * Ppath

References exit, fprintf(), malloc(), Spath::pcomp, and Spath::psys.

Referenced by disjunction_to_region_sc(), dj_intersect_djcomp_ofl_ctrl(), pa_convex_hull_equals_union_p_ofl_ctrl(), pa_dup(), pa_dup1(), pa_empty(), pa_inclusion_p_ofl_ctrl(), pa_intersect_complement(), pa_intersect_system(), pa_path_to_disjunct_rule4_ofl_ctrl(), pa_path_to_few_disjunct_ofl_ctrl(), pa_read(), pa_reduce_simple_complement(), pa_supress_same_constraints(), and pa_system_difference_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_max_constraints_nb()

int pa_max_constraints_nb ( Ppath  in_pa)

int pa_max_constraints_nb( (Ppath) in_pa ) Give the maximum constraints nb among systems of in_pa.

Parameters
in_pan_pa

Definition at line 155 of file path.c.

157 {
158  Psysteme ps;
159  int loc, ret_int;
160 
161  if (PA_UNDEFINED_P(in_pa)||pa_full_p(in_pa)) return 0;
162  if ( pa_empty_p(in_pa) ) return 1;
163 
164  ps = in_pa->psys;
165  ret_int = 2*(ps->nb_eq) + ps->nb_ineq;
166  loc = sl_max_constraints_nb( (Psyslist) in_pa->pcomp );
167 
168  if (loc > ret_int) ret_int = loc;
169  return ret_int;
170 }
int nb_eq
Definition: sc-local.h:72

References Ssysteme::nb_eq, Ssysteme::nb_ineq, pa_empty_p(), pa_full_p(), PA_UNDEFINED_P, and sl_max_constraints_nb().

Referenced by pa_feasibility_ofl_ctrl(), and pa_path_to_disjunct_rule4_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_path_to_disjunct_ofl_ctrl()

Pdisjunct pa_path_to_disjunct_ofl_ctrl ( Ppath  in_pa,
int  ofl_ctrl 
)

Pdisjunct pa_path_to_disjunct_ofl_ctrl ( (Ppath) in_pa, (int) ofl_ctrl)
Produces a Pdisjunct corresponding to the path Ppath.

No sharing.

comparison between 2 methods

Parameters
in_pan_pa
ofl_ctrlfl_ctrl

Definition at line 374 of file path.c.

377 {
378  Pdisjunct ret_dj;
379  Pcomplist comp;
380  int meth1 = 0, meth2 = 1; /* comparison between 2 methods */
381 
382  if ( in_pa == PA_UNDEFINED ) return DJ_UNDEFINED;
383  if (pa_full_p(in_pa)) return dj_full();
384  if (pa_empty_p(in_pa)) return dj_empty();
385  if ((in_pa->psys != NULL) &&
386  sc_empty_p(in_pa->psys)) return dj_empty();
387 
388  ret_dj = (Pdisjunct) sl_append_system(NULL, sc_dup(in_pa->psys));
389  for( comp = in_pa->pcomp; comp != NULL; comp = comp->succ) {
390  Pdisjunct dj1 = dj_system_complement( comp->psys );
391  Pdisjunct dj2 = ret_dj;
392  int lg1 = sl_length( dj1 );
393  int lg2 = sl_length( dj2 );
394 
395  meth1 = meth1 + lg2*lg1 ; meth2 = meth2 * lg1;
396 
397  ret_dj = dj_intersection_ofl_ctrl( ret_dj, dj1, ofl_ctrl);
398  dj1 = dj_free( dj1 ); dj2 = dj_free( dj2 );
399  }
400 
401  C3_DEBUG("pa_path_to_disjunct_ofl_ctrl", {
402  fprintf(stderr, "Feasibility calls with method 1 and 2 : %d\t%d\n",
403  meth1, meth2);
404  });
405 
406  return( ret_dj );
407 }
Pdisjunct dj_intersection_ofl_ctrl(Pdisjunct in_dj1, Pdisjunct in_dj2, int ofl_ctrl)
Pdisjunct dj_intersection_ofl_ctrl( in_dj1, in_dj2, ofl_ctrl ) Computes intersection of two disjuncti...
Definition: disjunct.c:134

References C3_DEBUG, dj_empty(), dj_free(), dj_full(), dj_intersection_ofl_ctrl(), dj_system_complement(), DJ_UNDEFINED, fprintf(), pa_empty_p(), pa_full_p(), PA_UNDEFINED, Ssyslist::psys, sc_dup(), sc_empty_p(), sl_append_system(), sl_length(), and Ssyslist::succ.

Referenced by pa_path_to_disjunct_rule4_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_path_to_disjunct_rule4_ofl_ctrl()

Pdisjunct pa_path_to_disjunct_rule4_ofl_ctrl ( Ppath  in_pa,
int  ofl_ctrl 
)

Pdisjunct pa_path_to_disjunct_rule4_ofl_ctrl( (Ppath) in_pa, int ofl_ctrl)
Returns the corresponding disjunction according rule 4.

AL 05/16/95 No sharing.

Returns according to different cases

we've modified P0 systeme

Parameters
in_pan_pa
ofl_ctrlfl_ctrl

Definition at line 570 of file reduc.c.

573 {
574  Pcomplist comp, lcomp = NULL;
575  Pdisjunct ret_dj ;
576  Psysteme systeme ;
577  Ppath pa ;
578  int pa_clength1, pa_clength2;
579 
580  if (in_pa == PA_UNDEFINED) return DJ_UNDEFINED;
581  if (pa_empty_p(in_pa)) return dj_empty();
582 
583  C3_DEBUG( "pa_path_to_disjunct_rule4_ofl_ctrl", {
584  fprintf(stderr, "\n\n Input path:\n\n");
585  pa_fprint(stderr, in_pa, union_variable_name );
586  });
587 
588 
590  C3_RETURN(IS_DJ, pa_path_to_disjunct_ofl_ctrl( in_pa, ofl_ctrl));
591 
592  systeme = in_pa->psys;
593  if (in_pa->pcomp == NULL)
594  C3_RETURN(IS_DJ, sl_append_system(NULL,sc_dup(systeme)));
595 
596  for( comp = in_pa->pcomp; comp != NULL; comp = comp->succ ) {
597  Psysteme ps;
598  if (comp->psys == SC_UNDEFINED)
599  { sl_free(lcomp); C3_RETURN( IS_DJ, DJ_UNDEFINED ); }
600 
601  ps = sc_dup(comp->psys);
602 
603  ps = sc_elim_redund_with_first_ofl_ctrl( systeme, ps, ofl_ctrl );
604 
605  if (sc_empty_p( ps )) { ps = sc_free(ps); continue; }
606  if (sc_full_p ( ps ))
607  { ps = sc_free(ps); C3_RETURN( IS_DJ, dj_empty() ); }
608 
609  lcomp = sl_append_system( lcomp, ps );
610  }
611 
612  pa = pa_make(sc_dup(in_pa->psys), lcomp);
613  pa_clength1 = sl_length( pa->pcomp );
614  pa = pa_reduce_simple_complement( pa );
615  pa_clength2 = sl_length( pa->pcomp );
616  systeme = pa->psys;
617 
618 
619  /* Returns according to different cases */
620  if (pa_empty_p(pa))
621  { ret_dj = dj_empty(); }
622  else if (pa_clength2 == 0)
623  { ret_dj = dj_append_system(NULL,sc_dup(systeme)); }
624  else if (pa_clength1 != pa_clength2) /* we've modified P0 systeme */
625  { ret_dj = pa_path_to_disjunct_rule4_ofl_ctrl( pa, ofl_ctrl); }
626  else { ret_dj = pa_path_to_disjunct_ofl_ctrl( pa, ofl_ctrl); }
627 
628  pa = pa_free( pa );
629 
630  C3_RETURN( IS_DJ, ret_dj );
631 }
Pdisjunct pa_path_to_disjunct_ofl_ctrl(Ppath in_pa, int ofl_ctrl)
Pdisjunct pa_path_to_disjunct_ofl_ctrl ( (Ppath) in_pa, (int) ofl_ctrl) Produces a Pdisjunct corres...
Definition: path.c:374
Ppath pa_reduce_simple_complement(Ppath in_pa)
Ppath pa_reduce_simple_complement( (Ppath) in_pa ) AL 16/11/93 Scan all the complement.
Definition: path.c:222
Pdisjunct pa_path_to_disjunct_rule4_ofl_ctrl(Ppath in_pa, int ofl_ctrl)
Pdisjunct pa_path_to_disjunct_rule4_ofl_ctrl( (Ppath) in_pa, int ofl_ctrl) Returns the correspondin...
Definition: reduc.c:570
Psysteme sc_elim_redund_with_first_ofl_ctrl(Psysteme in_ps1, Psysteme in_ps2, int ofl_ctrl)
Psysteme sc_elim_redund_with_first_ofl_ctrl( in_ps1, in_ps2, ofl_ctrl ) Returns constraints of in_ps2...
Definition: reduc.c:412
#define PATH_MAX_CONSTRAINTS
Misceleanous (debuging...)
Definition: union-local.h:131

References C3_DEBUG, C3_RETURN, dj_append_system(), dj_empty(), DJ_UNDEFINED, fprintf(), IS_DJ, pa_empty_p(), pa_fprint, pa_free(), pa_make(), pa_max_constraints_nb(), pa_path_to_disjunct_ofl_ctrl(), pa_reduce_simple_complement(), PA_UNDEFINED, PATH_MAX_CONSTRAINTS, Spath::pcomp, Ssyslist::psys, Spath::psys, sc_dup(), sc_elim_redund_with_first_ofl_ctrl(), sc_empty_p(), sc_free(), sc_full_p(), sl_append_system(), sl_free(), sl_length(), Ssyslist::succ, and union_variable_name.

Referenced by pa_path_to_few_disjunct_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_path_to_few_disjunct_ofl_ctrl()

Pdisjunct pa_path_to_few_disjunct_ofl_ctrl ( Ppath  in_pa,
int  ofl_ctrl 
)

line 1197 "reduc.w"

Pdisjunct pa_path_to_few_disjunct_ofl_ctrl( (Ppath) in_pa, (int) ofl_ctrl )
Produces a Pdisjunct corresponding to the path Ppath and reduces the number of disjunctions. See "Extension de C3 aux Unions de Polyedres" Version 2, for a complete explanation about this function. in_pa is modified. AL 23/03/95

line 1208 "reduc.w"

If it's an empty path or if it has no complements : return

We are looking for a common hyperplan

removes cons_pv and vect_dup(vect_1)

take care of rule 2

take care of rule 2

Manage memory, free: cons_oppose, common_ps, common_ps_oppose, cons_pv, vect_1, pa1, pa2

Manage memory

Parameters
in_pan_pa
ofl_ctrlfl_ctrl

Definition at line 648 of file reduc.c.

651 {
652 
653 #line 980 "reduc.w"
654  Psysteme systeme; Pdisjunct ret_dj = DJ_UNDEFINED;
655 #line 1001 "reduc.w"
656  Ppath pa; Pcomplist lcomp;
657 #line 1040 "reduc.w"
658 
659  Pcontrainte common_cons = NULL, cons, cons_oppose = NULL;
660  Pvecteur vect_1, cons_pv = NULL;
661  Pcomplist comp;
662 
663 #line 1111 "reduc.w"
664 
665  Pcontrainte common_cons_oppose;
666  Psysteme common_ps, common_ps_oppose;
667  Ppath pa1, pa2;
668  bool pa1_empty = false, pa2_empty = false;
669  bool pa1_filled = false, pa2_filled = false;
670 
671 #line 1144 "reduc.w"
672  Pdisjunct dj1 = dj_empty(), dj2 = dj_empty();
673 #line 1214 "reduc.w"
674 
675 
676 
677 #line 981 "reduc.w"
678 
679  C3_DEBUG( "pa_path_to_few_disjunct_ofl_ctrl", {
680  fprintf(stderr, "\n\n Input path:\n\n");
681  pa_fprint(stderr, in_pa, union_variable_name );
682  });
683 
684  if (PA_UNDEFINED_P( in_pa )) C3_RETURN(IS_DJ, DJ_UNDEFINED);
685  if (pa_full_p ( in_pa )) C3_RETURN(IS_DJ, dj_full());
686  if (pa_empty_p ( in_pa )) C3_RETURN(IS_DJ, dj_empty());
687 
688  /* If it's an empty path or if it has no complements : return */
689  systeme = in_pa->psys ;
690  if (!sc_faisabilite_ofl( systeme )) C3_RETURN(IS_DJ,dj_empty());
691  if (in_pa->pcomp == NULL) C3_RETURN(IS_DJ,(Pdisjunct) sl_append_system(NULL,sc_dup(systeme)));
692 
693 #line 1216 "reduc.w"
694 
695 
696 #line 1002 "reduc.w"
697 
698  pa = pa_make(sc_dup(systeme), sl_dup(in_pa->pcomp));
699  pa = pa_reduce_simple_complement( pa );
700 
701  if (pa_empty_p(pa)) {pa = pa_free(pa); C3_RETURN(IS_DJ,dj_empty());}
702 
703  pa = pa_transform_eg_in_ineg ( pa );
704  lcomp = pa->pcomp ;
705  systeme = pa->psys ;
706 
707  C3_DEBUG( "pa_path_to_few_disjunct_ofl_ctrl", {
708  fprintf(stderr, "pa:\n");
709  pa_fprint_tab(stderr, pa, union_variable_name, 1 );
710  });
711 
712  if ( pa->pcomp == NULL ) {
713  pa = pa_free1(pa);
714  ret_dj = (Pdisjunct) sl_append_system(NULL, systeme);
715 
716  C3_DEBUG( "pa_path_to_few_disjunct_ofl_ctrl", {
717  fprintf(stderr, "No complement, returning:\n");
718  dj_fprint_tab(stderr, ret_dj, union_variable_name, 1 );
719  });
720 
721  return ret_dj;
722  }
723 
724 #line 1217 "reduc.w"
725 
726 
727 #line 1045 "reduc.w"
728 
729  /* We are looking for a common hyperplan */
730  vect_1 = vect_new(TCST, VALUE_ONE); common_cons = NULL;
731 
732  for(cons = (lcomp->psys)->inegalites;
733  (cons != NULL)&&(lcomp->succ != NULL);cons = cons->succ){
734  bool is_common = true;
735  cons_pv = vect_dup( cons->vecteur ); vect_chg_sgn( cons_pv );
736  cons_oppose = contrainte_make(vect_add( cons_pv, vect_1 ));
737 
738  for(comp = lcomp->succ;(comp != NULL) && is_common; comp = comp->succ){
739  Pcontrainte ineg = (comp->psys)->inegalites;
740  bool is_common1, is_common2;
741 
742  is_common1 = contrainte_in_liste( cons, ineg );
743  is_common2 = contrainte_in_liste( cons_oppose, ineg );
744  is_common = is_common1 || is_common2;
745  }
746  if (!is_common) {
747  /* removes cons_pv and vect_dup(vect_1) */
748  cons_oppose = contrainte_free(cons_oppose);
749  vect_rm( cons_pv ); cons_pv = (Pvecteur) NULL;
750  continue;
751  }
752  common_cons = cons;
753  vect_chg_sgn( cons_pv );
754  break;
755  }
756 
757  C3_DEBUG( "pa_path_to_few_disjunct_ofl_ctrl", {
758  fprintf(stderr, "cons_pv: ");
759  if (common_cons == NULL) fprintf(stderr, "NULL\n");
760  else vect_fprint(stderr, cons_pv, union_variable_name);
761  });
762 
763 #line 1218 "reduc.w"
764 
765 
766 #line 1086 "reduc.w"
767 
768  if( common_cons != NULL ) {
769 
770 #line 1118 "reduc.w"
771 
772  common_ps = sc_make( CONTRAINTE_UNDEFINED, contrainte_make(cons_pv) );
773  cons_pv = vect_dup( common_cons->vecteur ); vect_chg_sgn( cons_pv );
774  common_cons_oppose = contrainte_make(vect_add(cons_pv,vect_1));
775  common_ps_oppose = sc_make( CONTRAINTE_UNDEFINED, common_cons_oppose );
776  pa1 = pa_new(); pa2= pa_new();
777 
778  for(comp = lcomp; comp != NULL; comp = comp->succ){
779  Psysteme local_ps;
780  Pcontrainte co = comp->psys->inegalites;
781 
782  if (!pa1_empty && contrainte_in_liste(common_cons, co)) {
783  local_ps = sc_supress_same_constraints( common_ps, comp->psys );
784  if (local_ps == SC_EMPTY) { pa1 = pa_empty(); pa1_empty = true; continue;}
785  pa1->pcomp = sl_append_system( pa1->pcomp, local_ps ); pa1_filled = true;
786  }
787  else if(!pa2_empty && contrainte_in_liste(common_cons_oppose, co)) {
788  local_ps = sc_supress_same_constraints( common_ps_oppose, comp->psys );
789  if (local_ps == SC_EMPTY) {pa2 = pa_empty(); pa2_empty = true; continue;}
790  pa2->pcomp = sl_append_system( pa2->pcomp, local_ps ); pa2_filled = true;
791  }
792  }
793 
794 #line 1088 "reduc.w"
795 
796 
797 #line 1145 "reduc.w"
798 
799  if (pa1_filled) {
800  /* take care of rule 2 */
801  if (pa_full_p( pa2 )) pa1->psys = sc_dup( systeme );
802  else pa1->psys = sc_safe_append( sc_dup(common_ps), systeme );
803 
804  C3_DEBUG("pa_path_to_few_disjunct", {
805  fprintf(stderr, "pa1:\n");
806  pa_fprint_tab( stderr, pa1, union_variable_name, 1 );
807  });
808 
809  if (pa_full_p(pa2)||sc_faisabilite_ofl(pa1->psys))
810  {dj_free(dj1);dj1 = pa_path_to_few_disjunct_ofl_ctrl(pa1, ofl_ctrl);}
811 
812  }
813 
814  if (pa2_filled) {
815  /* take care of rule 2 */
816  if (pa_full_p( pa1 )) pa2->psys = sc_dup( systeme );
817  else pa2->psys = sc_safe_append( sc_dup(common_ps_oppose), systeme );
818 
819  C3_DEBUG("pa_path_to_few_disjunct", {
820  fprintf(stderr, "pa2:\n");
821  pa_fprint_tab( stderr, pa2, union_variable_name, 1 );
822  });
823  if (pa_full_p(pa1)||sc_faisabilite_ofl(pa2->psys))
824  {dj_free(dj2);dj2 = pa_path_to_few_disjunct_ofl_ctrl(pa2, ofl_ctrl);}
825 
826 
827  }
828 
829  ret_dj = dj_union( dj1, dj2 );
830 
831  /* Manage memory, free:
832  * cons_oppose, common_ps, common_ps_oppose,
833  * cons_pv, vect_1, pa1, pa2
834  */
835  cons_oppose = contrainte_free( cons_oppose );
836  common_ps = sc_free( common_ps );
837  common_ps_oppose = sc_free( common_ps_oppose );
838  vect_rm(cons_pv); cons_pv = NULL;
839  pa1 = pa_free(pa1); pa2 = pa_free(pa2);
840 
841 #line 1089 "reduc.w"
842 
843  }
844  else {
845 
846 #line 1191 "reduc.w"
847  ret_dj = pa_path_to_disjunct_rule4_ofl_ctrl( pa, ofl_ctrl );
848 
849 #line 1092 "reduc.w"
850 
851  }
852 
853  /* Manage memory */
854  pa = pa_free(pa); vect_rm(vect_1); vect_1 = NULL;
855 
856  C3_RETURN(IS_DJ, ret_dj);
857 
858 #line 1219 "reduc.w"
859 
860 }
struct cons cons
The structure used to build lists in NewGen.
void vect_fprint(FILE *f, Pvecteur v, get_variable_name_t variable_name)
void vect_fprint(FILE * f, Pvecteur v, char * (*variable_name)()): impression d'un vecteur creux v su...
Definition: io.c:124
void pa_fprint_tab(FILE *in_fi, Ppath in_pa, char *(*in_fu)(), int in_tab)
void pa_fprint_tab(FILE*, Pdisjunct, function, tab) prints a Ppath
Definition: path.c:412
Ppath pa_transform_eg_in_ineg(Ppath in_pa)
Ppath pa_transform_eg_in_ineg( in_pa ) Transforms all equalities of all systems composing in_pa in in...
Definition: path.c:284
Psysteme sc_supress_same_constraints(Psysteme in_ps1, Psysteme in_ps2)
Psysteme sc_supress_same_constraints( in_ps1, in_ps2 ) supress in in_ps2 constraints that are in in_p...
Definition: reduc.c:329
Psysteme sc_safe_append(Psysteme s1, Psysteme s2)
Psysteme sc_safe_append(Psysteme s1, Psysteme s2) input : output : calcul de l'intersection des polye...
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
struct Svecteur * Pvecteur

References C3_DEBUG, C3_RETURN, contrainte_free(), contrainte_in_liste(), contrainte_make(), CONTRAINTE_UNDEFINED, dj_empty(), dj_fprint_tab(), dj_free(), dj_full(), DJ_UNDEFINED, dj_union(), fprintf(), Ssysteme::inegalites, IS_DJ, pa_empty(), pa_empty_p(), pa_fprint, pa_fprint_tab(), pa_free(), pa_free1(), pa_full_p(), pa_make(), pa_new, pa_path_to_disjunct_rule4_ofl_ctrl(), pa_reduce_simple_complement(), pa_transform_eg_in_ineg(), PA_UNDEFINED_P, Spath::pcomp, Ssyslist::psys, Spath::psys, sc_dup(), sc_free(), sc_make(), sc_safe_append(), sc_supress_same_constraints(), sl_append_system(), sl_dup(), Ssyslist::succ, TCST, union_variable_name, VALUE_ONE, vect_add(), vect_chg_sgn(), vect_dup(), vect_fprint(), vect_new(), vect_rm(), and Scontrainte::vecteur.

Referenced by dj_intersect_djcomp_ofl_ctrl(), pa_feasibility_ofl_ctrl(), and pa_system_difference_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_read()

Ppath pa_read ( char *  nomfic)

void pa_read(FILE*) reads a Ppath

Parameters
nomficomfic

Definition at line 438 of file path.c.

440 {
441  Ppath ret_pa;
442  Psyslist sl;
443 
444  sl = sl_read(nomfic);
445  if (sl == SL_NULL) return PA_UNDEFINED;
446  ret_pa = pa_make(sl->psys, (Pcomplist) sl->succ);
447  free( sl );
448  return ret_pa;
449 }
#define SL_NULL
Definition: union-local.h:8

References free(), pa_make(), PA_UNDEFINED, Ssyslist::psys, SL_NULL, sl_read(), and Ssyslist::succ.

+ Here is the call graph for this function:

◆ pa_reduce_simple_complement()

Ppath pa_reduce_simple_complement ( Ppath  in_pa)

Ppath pa_reduce_simple_complement( (Ppath) in_pa ) AL 16/11/93 Scan all the complement.

If one complement is a simple inequality, its complement is computed and intersected with psys part of in_pa. in_pa is modified. (Sharing with in_pa).

Do we have a simple complement ?

also frees pss

Parameters
in_pan_pa

Definition at line 222 of file path.c.

224 {
225  Psysteme pss;
226  Pcomplist pco, pco2 = NULL, tofree = NULL;
227  Ppath ret_pa;
228  bool at_least_one = false ; /* Do we have a simple complement ? */
229 
230  if( pa_full_p(in_pa) || pa_empty_p(in_pa) || (in_pa == PA_UNDEFINED) )
231  return (in_pa);
232 
233  C3_DEBUG("pa_reduce_simple_complement", {
234  fprintf(stderr, "Input path:\n");
235  pa_fprint_tab( stderr, in_pa, union_variable_name, 1 );
236  });
237 
238  pss = in_pa->psys;
239  for( pco = in_pa->pcomp, pco2 = NULL; pco != NULL; pco = pco->succ ) {
240  Psysteme ps = pco->psys;
241 
242  if (ps == SC_UNDEFINED) {
243  pco2 = sl_free1(pco2);
244  in_pa = pa_free1(in_pa);
245  return PA_UNDEFINED ;
246  }
247  else if (sc_empty_p(ps)) continue;
248  else if ((ps->nb_ineq == 1) && (ps->nb_eq == 0)) {
249  Pdisjunct dj = dj_system_complement( ps );
250  pss = sc_safe_append( pss, dj->psys );
251  tofree = sl_append_system( tofree, ps );
252  dj = dj_free( dj );
253  at_least_one = true;
254  }
255  else { pco2 = (Pcomplist) sl_append_system( pco2, ps ); }
256  }
257 
258  if(!at_least_one) {
259  pco2 = sl_free1(pco2);
260  ret_pa = in_pa;
261  }
262  else if(!sc_faisabilite_ofl(pss)) {
263  pco2 = sl_free1( pco2 );
264  tofree = sl_free1( tofree );
265  in_pa = pa_free ( in_pa ); /* also frees pss */
266  ret_pa = pa_empty();
267  }
268  else {
269  in_pa = pa_free1( in_pa );
270  tofree = sl_free ( tofree );
271  ret_pa = pa_make ( pss, pco2 );
272  }
273 
274  C3_RETURN( IS_PA, ret_pa );
275 }
#define false
Definition: newgen_types.h:80
#define IS_PA
Definition: union-local.h:136
Ssyslist * Pcomplist
Definition: union-local.h:17

References C3_DEBUG, C3_RETURN, dj_free(), dj_system_complement(), false, fprintf(), IS_PA, Ssysteme::nb_eq, Ssysteme::nb_ineq, pa_empty(), pa_empty_p(), pa_fprint_tab(), pa_free(), pa_free1(), pa_full_p(), pa_make(), PA_UNDEFINED, Ssyslist::psys, sc_empty_p(), sc_safe_append(), sl_append_system(), sl_free(), sl_free1(), Ssyslist::succ, and union_variable_name.

Referenced by pa_path_to_disjunct_rule4_ofl_ctrl(), and pa_path_to_few_disjunct_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_supress_same_constraints()

Ppath pa_supress_same_constraints ( Ppath  in_pa)

Ppath pa_supress_same_constraints( (Ppath) in_pa )
Supress from complements of in_pa same constraints than those in positif Psystem in_pa->psys.

Returned path have no more equalities. AL050795 No sharing, no modification of inputs.

Special cases

debuging

General case

Psysteme ps = sc_supress_same_constraints( positif, comp->psys );

Parameters
in_pan_pa

Definition at line 528 of file reduc.c.

530 {
531  Ppath ret_pa = PA_UNDEFINED;
532  Pcomplist comp;
533  Psysteme positif;
534  Psyslist psl = NULL;
535 
536  /* Special cases */
537  if ( PA_UNDEFINED_P( in_pa )) return PA_UNDEFINED;
538  if ( pa_empty_p ( in_pa )) return pa_empty();
539  if ( pa_full_p ( in_pa )) return pa_full ();
540 
541  /* debuging */
542  C3_DEBUG( "pa_supress_same_constraints", {
543  fprintf(stderr, "Input path:\n");
544  pa_fprint_tab(stderr, in_pa, union_variable_name, 1);
545  });
546 
547  /* General case */
548  positif = in_pa->psys;
549  if (!sc_faisabilite_ofl(positif)) return pa_empty();
550 
551  for( comp = in_pa->pcomp; comp != NULL; comp = comp->succ) {
552  /* Psysteme ps = sc_supress_same_constraints( positif, comp->psys ); */
554  if (ps == NULL)
555  {psl = sl_free(psl); ret_pa = pa_empty(); C3_RETURN(IS_PA, ret_pa);}
556  else psl = sl_append_system( psl, ps );
557  }
558 
559  positif = sc_dup(positif); sc_transform_eg_in_ineg( positif );
560  ret_pa = pa_make( positif, (Pcomplist) psl );
561  C3_RETURN(IS_PA, ret_pa);
562 }
Ppath pa_full()
Ppath pa_full() AL 18/11/93 Returns full space path : pa_full = pa_new()
Definition: path.c:117
Psysteme sc_supress_parallel_redund_constraints(Psysteme in_ps1, Psysteme in_ps2)
Psysteme sc_supress_parallel_redund_constraints( in_ps1, in_ps2 ) input: 2 Psystemes in_ps1 and in_ps...
Definition: reduc.c:255
void sc_transform_eg_in_ineg(Psysteme sc)
Package sc.

References C3_DEBUG, C3_RETURN, fprintf(), IS_PA, pa_empty(), pa_empty_p(), pa_fprint_tab(), pa_full(), pa_full_p(), pa_make(), PA_UNDEFINED, PA_UNDEFINED_P, Ssyslist::psys, sc_dup(), sc_supress_parallel_redund_constraints(), sc_transform_eg_in_ineg(), sl_append_system(), sl_free(), Ssyslist::succ, and union_variable_name.

Referenced by pa_feasibility_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pa_system_difference_ofl_ctrl()

Pdisjunct pa_system_difference_ofl_ctrl ( Psysteme  ps1,
Psysteme  ps2,
int  ofl_ctrl 
)

Pdisjunct pa_system_difference_ofl_ctrl(ps1, ps2) input : two Psystemes output : a disjunction representing ps1 - ps2 modifies : nothing comment : algorihtm : chemin = ps1 inter complement of (ps2) ret_dj = dj_simple_inegs_to_eg( pa_path_to_few_disjunct(chemin) )

Parameters
ps1s1
ps2s2
ofl_ctrlfl_ctrl

Definition at line 908 of file reduc.c.

911 {
912  Ppath chemin;
913  Pdisjunct dj, ret_dj;
914 
915  if ((ps1 == SC_UNDEFINED)||(ps2 == SC_UNDEFINED)) return DJ_UNDEFINED;
916  if (sc_empty_p(ps2)) return sl_append_system(NULL,sc_dup(ps1));
917  if (sc_empty_p(ps1)) return dj_empty();
918 
919  chemin = pa_make(ps1, sl_append_system(NULL,ps2));
920  dj = pa_path_to_few_disjunct_ofl_ctrl(chemin, ofl_ctrl);
921  chemin = pa_free1( chemin );
922  ret_dj = dj_simple_inegs_to_eg( dj );
923  dj = dj_free( dj );
924  return ret_dj;
925 }
Pdisjunct dj_simple_inegs_to_eg(Pdisjunct in_dj)
Pdisjunct dj_simple_inegs_to_eg( in_dj ) transforms two opposite inequalities in a simple equality in...
Definition: disjunct.c:339

References dj_empty(), dj_free(), dj_simple_inegs_to_eg(), DJ_UNDEFINED, pa_free1(), pa_make(), pa_path_to_few_disjunct_ofl_ctrl(), sc_dup(), sc_empty_p(), and sl_append_system().

+ Here is the call graph for this function:

◆ pa_system_equal_p_ofl_ctrl()

bool pa_system_equal_p_ofl_ctrl ( Psysteme  ps1,
Psysteme  ps2,
int  ofl_ctrl 
)

bool pa_system_equal_p(Psysteme ps1, Psysteme ps2) BA

Parameters
ps1s1
ps2s2
ofl_ctrlfl_ctrl

Definition at line 890 of file reduc.c.

893 {
894  return ( pa_inclusion_p_ofl_ctrl(ps1,ps2, ofl_ctrl) &&
895  pa_inclusion_p_ofl_ctrl(ps2,ps1, ofl_ctrl) );
896 }
bool pa_inclusion_p_ofl_ctrl(Psysteme ps1, Psysteme ps2, int ofl_ctrl)
bool pa_inclusion_p(Psysteme ps1, Psysteme ps2) BA, AL 31/05/94 returns true if ps1 represents a subs...
Definition: reduc.c:868

References pa_inclusion_p_ofl_ctrl().

+ Here is the call graph for this function:

◆ pa_transform_eg_in_ineg()

Ppath pa_transform_eg_in_ineg ( Ppath  in_pa)

Ppath pa_transform_eg_in_ineg( in_pa ) Transforms all equalities of all systems composing in_pa in inequalities and returns in_pa.

in_pa is modified. (Sharing with in_pa).

Parameters
in_pan_pa

Definition at line 284 of file path.c.

286 {
287  Pcomplist pco;
288 
289  if( pa_full_p(in_pa) || pa_empty_p(in_pa) || (in_pa == PA_UNDEFINED) )
290  return (in_pa);
291 
292  sc_transform_eg_in_ineg( in_pa->psys );
293  for( pco = in_pa->pcomp; pco != NULL; pco = pco->succ )
294  { sc_transform_eg_in_ineg( pco->psys ); }
295 
296  return in_pa;
297 }

References pa_empty_p(), pa_full_p(), PA_UNDEFINED, Ssyslist::psys, sc_transform_eg_in_ineg(), and Ssyslist::succ.

Referenced by pa_path_to_few_disjunct_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sc_concatenate()

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_s1n_s1
in_s2n_s2

Definition at line 157 of file sc_list.c.

159 {
160  Pcontrainte eq;
161  Psysteme s1, s2;
162 
163  s1 = sc_dup1( in_s1 ); s2 = sc_dup1( in_s2 );
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);}
166 
167  if (s1->nb_eq != 0) {
168  for (eq = s1->egalites; eq->succ != (Pcontrainte)NULL; eq = eq->succ) ;
169  eq->succ = s2->egalites; s1->nb_eq += s2->nb_eq;
170  }
171  else { s1->egalites = s2->egalites; s1->nb_eq = s2->nb_eq; }
172 
173  if (s1->nb_ineq != 0) {
174  for (eq = s1->inegalites;eq->succ != (Pcontrainte)NULL;eq = eq->succ) ;
175  eq->succ = s2->inegalites; s1->nb_ineq += s2->nb_ineq;
176  }
177  else { s1->inegalites = s2->inegalites; s1->nb_ineq = s2->nb_ineq; }
178 
179  /* Memory management and returns */
180  vect_rm( s1->base ); vect_rm( s2->base ); free( s2 ); s2 = NULL;
181  s1->base = NULL; sc_creer_base( s1 );
182  return(s1);
183 }
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...
Definition: sc_list.c:72
Psysteme sc_free1(Psysteme in_ps)
Psysteme sc_free1( in_ps ) AL 30/05/94 Only pcontrainte of in_ps are freed.
Definition: sc_list.c:121
s1
Definition: set.c:247
Pbase base
Definition: sc-local.h:75

References Ssysteme::base, Ssysteme::egalites, eq, free(), Ssysteme::inegalites, Ssysteme::nb_eq, Ssysteme::nb_ineq, s1, sc_creer_base(), sc_dup1(), sc_free1(), Scontrainte::succ, and vect_rm().

+ Here is the call graph for this function:

◆ sc_dup1()

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_psn_ps

Definition at line 72 of file sc_list.c.

74 {
75  Psysteme cp = SC_UNDEFINED;
76  Pcontrainte eq, eq_cp;
77 
78  if (!SC_UNDEFINED_P(in_ps)) {
79  cp = sc_new();
80 
81  for (eq = in_ps->egalites; eq != NULL; eq = eq->succ) {
82  eq_cp = contrainte_new();
84  sc_add_egalite(cp, eq_cp);
85  }
86 
87  for(eq=in_ps->inegalites;eq!=NULL;eq=eq->succ) {
88  eq_cp = contrainte_new();
90  sc_add_inegalite(cp, eq_cp);
91  }
92 
93  if(in_ps->dimension==0) {
95  cp->dimension = 0;
96  cp->base = VECTEUR_UNDEFINED;
97  }
98  else {
99  assert(in_ps->dimension==vect_size(in_ps->base));
100  cp->dimension = in_ps->dimension;
101  cp->base = vect_dup(in_ps->base);
102  }
103  }
104  return(cp);
105 }
#define contrainte_vecteur(c)
passage au champ vecteur d'une contrainte "a la Newgen"
Pcontrainte contrainte_new(void)
package contrainte - allocations et desallocations
Definition: alloc.c:47
int vect_size(Pvecteur v)
package vecteur - reductions
Definition: reductions.c:47
Psysteme sc_new(void)
Psysteme sc_new(): alloue un systeme vide, initialise tous les champs avec des valeurs nulles,...
Definition: sc_alloc.c:55
Pvecteur cp
pointeur sur l'egalite ou l'inegalite courante
Definition: sc_read.c:87
int dimension
Definition: sc-local.h:74
#define VECTEUR_UNDEFINED
#define VECTEUR_UNDEFINED_P(v)

References assert, contrainte_new(), contrainte_vecteur, cp, eq, sc_add_egalite(), sc_add_inegalite(), sc_new(), Scontrainte::succ, vect_dup(), vect_size(), VECTEUR_UNDEFINED, and VECTEUR_UNDEFINED_P.

Referenced by sc_concatenate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sc_elim_redund_with_first_ofl_ctrl()

Psysteme sc_elim_redund_with_first_ofl_ctrl ( Psysteme  in_ps1,
Psysteme  in_ps2,
int  ofl_ctrl 
)

Psysteme sc_elim_redund_with_first_ofl_ctrl( in_ps1, in_ps2, ofl_ctrl ) Returns constraints of in_ps2 which cut in_ps1.

AL 06 04 95 It is assumed that in_ps1 and in_ps2 are feasible ! in_ps1 is not modified, in_ps2 is modified.

Return on special cases

debuging

build in_ps1.and.in_ps2 with sharing on in_ps2 This also works if in_ps1 is full space

debuging

update information on ps1

debuging

Normalize 2 inputs systems

returns if there is no intersection

We run over in_ps2 constraints (shared by ps1) and detect redundance

eliminate the constraint from in_ps2, and thus from ps1

Parameters
in_ps1n_ps1
in_ps2n_ps2
ofl_ctrlfl_ctrl

Definition at line 412 of file reduc.c.

415 {
416  Psysteme ps1;
417  Pcontrainte prev_eq = NULL, eq, tail = NULL;
418  Pbase pb;
419 
420  /* Return on special cases */
421  if ( sc_full_p(in_ps1) ) return in_ps2;
422  if ( in_ps1->nb_ineq == 0 ) return in_ps2;
423 
424  /* debuging */
425  C3_DEBUG("sc_elim_redund_with_first", {
426  fprintf(stderr, "\nInput systems, in_ps1, then in_ps2:\n");
427  sc_fprint( stderr, in_ps1, union_variable_name );
428  sc_fprint( stderr, in_ps2, union_variable_name );
429  });
430 
431 
432  /* build in_ps1.and.in_ps2 with sharing on in_ps2
433  * This also works if in_ps1 is full space */
434  if ( in_ps2->nb_eq != 0 ) sc_transform_eg_in_ineg( in_ps2 );
435  ps1 = sc_dup( in_ps1 );
436  for (eq = ps1->inegalites; eq != NULL; tail = eq, eq = eq->succ) {}
437  tail->succ = in_ps2->inegalites;
438 
439  /* debuging */
440  C3_DEBUG("sc_elim_redund_with_first", {
441  fprintf(stderr, "ps1 old: nb_eq= %d, nb_ineq= %d, dimension= %d, base= \n",
442  ps1->nb_eq, ps1->nb_ineq, ps1->dimension);
443  vect_fprint(stderr, ps1->base, union_variable_name);
444  fprintf(stderr, "in_ps2: nb_eq= %d, nb_ineq= %d, dimension= %d, base= \n",
445  in_ps2->nb_eq, in_ps2->nb_ineq, in_ps2->dimension);
446  vect_fprint(stderr, in_ps2->base, union_variable_name);
447  });
448 
449  /* update information on ps1 */
450  ps1->nb_eq = ps1->nb_eq + in_ps2->nb_eq;
451  ps1->nb_ineq = ps1->nb_ineq + in_ps2->nb_ineq;
452  pb = ps1->base;
453  ps1->base = base_union( ps1->base, in_ps2->base );
454  ps1->dimension = vect_size ( ps1->base );
455  vect_rm( pb );
456 
457  /* debuging */
458  C3_DEBUG("sc_elim_redund_with_first", {
459  fprintf(stderr, "ps1: nb_eq= %d, nb_ineq= %d, dimension= %d, base= \n",
460  ps1->nb_eq, ps1->nb_ineq, ps1->dimension);
461  vect_fprint(stderr, ps1->base, union_variable_name);
462  });
463 
464  /* Normalize 2 inputs systems */
465  for (eq = ps1->inegalites; eq != NULL; eq=eq->succ)
466  {
468  }
469  /* returns if there is no intersection */
470  if (!sc_rational_feasibility_ofl_ctrl(ps1, ofl_ctrl, true)) {
471  tail->succ = NULL; ps1 = sc_free(ps1);
472  in_ps2 = sc_free(in_ps2); in_ps2 = sc_empty(NULL);
473  C3_RETURN( IS_SC, in_ps2 );
474  }
475 
476 
477  /* We run over in_ps2 constraints (shared by ps1)
478  * and detect redundance */
479  assert(sc_weak_consistent_p(in_ps2));
481  for (eq = tail->succ, prev_eq = tail; eq != NULL; eq = eq->succ)
482  {
485  C3_DEBUG("sc_elim_redund_with_first", {
486  fprintf(stderr, "\nps1:\n");
487  fprintf(stderr, "nb_eq= %d, nb_ineq= %d, dimension= %d\n",
488  ps1->nb_eq, ps1->nb_ineq, ps1->dimension);
489  sc_fprint( stderr, ps1, union_variable_name );
490  });
491 
492  if (sc_rational_feasibility_ofl_ctrl(ps1, ofl_ctrl, true))
493  {
495  prev_eq = prev_eq->succ;
496  }
497  else{
498  /* eliminate the constraint from in_ps2, and thus from ps1 */
500  if (in_ps2->inegalites == eq)
501  in_ps2->inegalites = eq->succ;
502  prev_eq->succ = eq->succ;
504  eq = contrainte_free(eq);
505  eq = prev_eq;
506  in_ps2->nb_ineq--;
507  ps1->nb_ineq--;
509  assert(sc_weak_consistent_p(in_ps2));
510  }
511  }
512 
513 
514  if ( in_ps2->inegalites == NULL )
515  { in_ps2 = sc_free(in_ps2); in_ps2 = sc_full(); }
516 
517  tail->succ = NULL; ps1 = sc_free( ps1 );
518  C3_RETURN( IS_SC, in_ps2 );
519 }
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...
Definition: base.c:428
void eq_set_vect_nul(Pcontrainte)
void_eq_set_vect_nul(Pcontrainte c): transformation d'une contrainte en une contrainte triviale 0 == ...
Definition: unaires.c:84
void contrainte_reverse(Pcontrainte)
void contrainte_reverse(Pcontrainte eq): changement de signe d'une contrainte, i.e.
Definition: unaires.c:67
bool sc_weak_consistent_p(Psysteme sc)
check that sc is well defined, that the numbers of equalities and inequalities are consistent with th...
Definition: sc.c:362
#define IS_SC
Definition: union-local.h:133
void vect_normalize(Pvecteur v)
void vect_normalize(Pvecteur v): division de tous les coefficients de v par leur pgcd; "normalisation...
Definition: unaires.c:59

References assert, Ssysteme::base, base_union(), C3_DEBUG, C3_RETURN, contrainte_free(), contrainte_reverse(), CONTRAINTE_UNDEFINED, Ssysteme::dimension, eq, eq_set_vect_nul(), fprintf(), Ssysteme::inegalites, IS_SC, Ssysteme::nb_eq, Ssysteme::nb_ineq, sc_dup(), sc_empty(), sc_fprint(), sc_free(), sc_full(), sc_full_p(), sc_rational_feasibility_ofl_ctrl(), sc_transform_eg_in_ineg(), sc_weak_consistent_p(), Scontrainte::succ, union_variable_name, vect_fprint(), vect_normalize(), vect_rm(), vect_size(), and Scontrainte::vecteur.

Referenced by pa_path_to_disjunct_rule4_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sc_free()

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_psn_ps

Definition at line 112 of file sc_list.c.

114 { sc_rm( in_ps ); return( (Psysteme) NULL ); }
void sc_rm(Psysteme ps)
void sc_rm(Psysteme ps): liberation de l'espace memoire occupe par le systeme de contraintes ps;
Definition: sc_alloc.c:277

References sc_rm().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sc_free1()

Psysteme sc_free1 ( Psysteme  in_ps)

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

Parameters
in_psn_ps

Definition at line 121 of file sc_list.c.

123 {
124  Pcontrainte pc, pc2;
125 
126  if (in_ps != NULL) {
127  for(pc = in_ps->inegalites; pc != NULL; ) {
128  pc2 = pc;
129  pc = pc->succ;
130  free(pc2);
131  pc2 = NULL;
132  }
133  for(pc = in_ps->egalites; pc != NULL; ) {
134  pc2 = pc;
135  pc = pc->succ;
136  free(pc2);
137  pc2 = NULL;
138  }
139  in_ps->nb_eq = 0;
140  in_ps->nb_ineq = 0;
141  in_ps->dimension = 0;
142  vect_rm( in_ps->base );
143  in_ps->base = NULL;
144 
145  free((char *) in_ps);
146  in_ps = (Psysteme) NULL;
147  }
148  return( (Psysteme) NULL );
149 }
struct Ssysteme * Psysteme

References free(), Scontrainte::succ, and vect_rm().

Referenced by sc_concatenate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sc_full()

Psysteme sc_full ( void  )

Psysteme sc_full() similar to sc_new.

Definition at line 58 of file sc_list.c.

58 { return sc_new(); }

References sc_new().

Referenced by pa_intersect_complement(), and sc_elim_redund_with_first_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sc_full_p()

bool sc_full_p ( Psysteme  in_ps)

Psysteme sc_full_p( in_ps ) similar to sc_new.

Parameters
in_psn_ps

Definition at line 61 of file sc_list.c.

63 { return( (in_ps->nb_eq == 0) && (in_ps->nb_ineq == 0) &&
64  (in_ps->egalites == NULL) && (in_ps->inegalites == 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().

+ Here is the caller graph for this function:

◆ sc_supress_parallel_redund_constraints()

Psysteme sc_supress_parallel_redund_constraints ( Psysteme  in_ps1,
Psysteme  in_ps2 
)

Psysteme sc_supress_parallel_redund_constraints( in_ps1, in_ps2 ) input: 2 Psystemes in_ps1 and in_ps2 output: in_ps1 / in_ps2 (cut operation on polyhedrons) memory: Inspector (nothing is shared, nor modified, output allocated).

comment: Supress in dup(in_ps2) parallel constraints that are redundant relatively to in_ps1. Returned Psysteme have only inequalities.

debuging

Transforms equalities in inequalities if necessary

Compare with inequalities

update base and normalize

Manage memory and return

Parameters
in_ps1n_ps1
in_ps2n_ps2

Definition at line 255 of file reduc.c.

257 {
258  Psysteme ps1, ps2, ret_ps = NULL;
259  Pcontrainte ineq1, ineqs2;
260  bool stop = false, dup1 = false, dup2 = false;
261 
262  if ( in_ps1 == SC_RN ) return sc_dup(in_ps2);
263 
264  /* debuging */
265  C3_DEBUG("sc_supress_parallel_constraints", {
266  fprintf(stderr, "Input systems, in_ps1, then in_ps2:\n");
267  sc_fprint( stderr, in_ps1, union_variable_name );
268  sc_fprint( stderr, in_ps2, union_variable_name );
269  });
270 
271 
272  /* Transforms equalities in inequalities if necessary */
273  if (in_ps1->nb_eq != 0)
274  { ps1 = sc_dup( in_ps1 ); sc_transform_eg_in_ineg( ps1 ); dup1 = true; }
275  else ps1 = in_ps1;
276 
277  if (in_ps2->nb_eq != 0)
278  { ps2 = sc_dup( in_ps2 ); sc_transform_eg_in_ineg( ps2 ); dup2 = true; }
279  else ps2 = in_ps2;
280 
281 
282  /* Compare with inequalities */
283  ineqs2 = ps2->inegalites;
284 
285  for (ineq1 = ps1->inegalites; ineq1 != NULL && !stop; ineq1 = ineq1->succ) {
286  enum hspara_elem sk = contrainte_parallel_in_liste( ineq1, ineqs2 );
287  switch (sk)
288  {
289  case keep:
290  if (ret_ps != NULL){ sc_add_inegalite( ret_ps, contrainte_dup(ineq1) ); }
291  else ret_ps = sc_make( NULL, contrainte_dup(ineq1) );
292  break;
293  case empty:
294  ret_ps = sc_free(ret_ps);
295  ret_ps = sc_empty(NULL);
296  stop = true;
297  break;
298  case full: continue; break;
299  default:
300  {
301  fprintf(stderr, "%s supress_kind == %d should not appear !",
302  "[sc_supress_parallel_redund_constraints]", (int) sk );
303  abort();
304  }
305  }
306 
307  }
308 
309  /* update base and normalize */
310  if ((ret_ps != NULL) && !sc_empty_p(ret_ps)) {
311  vect_rm(ret_ps->base);
312  ret_ps->base = NULL; sc_creer_base( ret_ps );
313  ret_ps = sc_normalize( ret_ps );
314  }
315 
316  /* Manage memory and return */
317  ps1 = (dup1)? sc_free(ps1) : ps1;
318  ps2 = (dup2)? sc_free(ps2) : ps2;
319  C3_RETURN( IS_SC, ret_ps );
320 }
#define abort()
Definition: misc-local.h:53
enum hspara_elem contrainte_parallel_in_liste(Pcontrainte in_co, Pcontrainte in_lc)
enum enum hspara_elem contrainte_parallel_in_liste( in_co, in_lc ) AL950711 input: 1 constraint in_co...
Definition: reduc.c:204
@ empty
b1 < bj -> h1/hj = empty
Definition: union-local.h:64

References abort, Ssysteme::base, C3_DEBUG, C3_RETURN, contrainte_dup(), contrainte_parallel_in_liste(), empty, fprintf(), full, Ssysteme::inegalites, IS_SC, keep, sc_add_inegalite(), sc_creer_base(), sc_dup(), sc_empty(), sc_empty_p(), sc_fprint(), sc_free(), sc_make(), sc_normalize(), sc_transform_eg_in_ineg(), Scontrainte::succ, union_variable_name, and vect_rm().

Referenced by pa_supress_same_constraints().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sc_supress_same_constraints()

Psysteme sc_supress_same_constraints ( Psysteme  in_ps1,
Psysteme  in_ps2 
)

Psysteme sc_supress_same_constraints( in_ps1, in_ps2 ) supress in in_ps2 constraints that are in in_ps1.

Nothing is shared, nor modified. Returned Psysteme have only inequalities. This function should be superseded by sc_supress_parallel_redund_contraints

Compare with equalities a == 0 <=> a <= 0 and -a <= 0

add co to returned inegs

add eq to returned inegs

add co and eq to returned inegs

Compare with inequalities

Parameters
in_ps1n_ps1
in_ps2n_ps2

Definition at line 329 of file reduc.c.

331 {
332  Psysteme ret_ps = NULL;
333  Pcontrainte eq, ineq;
334 
335  if ( in_ps1 == SC_RN ) return sc_dup(in_ps2);
336 
337  C3_DEBUG("sc_supress_same_constraints", {
338  fprintf(stderr, "\nInput systems, in_ps1, then in_ps2:\n");
339  sc_fprint( stderr, in_ps1, union_variable_name );
340  sc_fprint( stderr, in_ps2, union_variable_name );
341  });
342 
343  /* Compare with equalities a == 0 <=> a <= 0 and -a <= 0 */
344  for (eq = in_ps2->egalites; eq != NULL; eq = eq->succ) {
345  Pcontrainte co, eq2;
346  Pvecteur pv;
347  bool eq_in_ineq, co_in_ineq;
348 
349  if (contrainte_in_liste(eq, in_ps1->egalites)) continue;
350 
351  pv = vect_dup(eq->vecteur);
352  vect_chg_sgn ( pv );
353  co = contrainte_make( pv );
354  if (contrainte_in_liste(co, in_ps1->egalites ))
355  { co = contrainte_free( co ); continue; }
356 
357 
359  co_in_ineq = contrainte_in_liste(co, in_ps1->inegalites);
360 
361  if (eq_in_ineq && co_in_ineq) {
362  co = contrainte_free( co );
363  }
364  else if (eq_in_ineq) { /* add co to returned inegs */
365  if (ret_ps != NULL){ sc_add_inegalite( ret_ps, co ); }
366  else ret_ps = sc_make( NULL, co );
367  }
368  else if (co_in_ineq) { /* add eq to returned inegs */
369  eq2 = contrainte_dup(eq);
370  if (ret_ps != NULL){ sc_add_inegalite( ret_ps, eq2 ); }
371  else ret_ps = sc_make( NULL, eq2 );
372  co = contrainte_free( co );
373  }
374  else { /* add co and eq to returned inegs */
375  eq2 = contrainte_dup(eq);
376  if (ret_ps != NULL){ sc_add_inegalite( ret_ps, eq2 ); }
377  else ret_ps = sc_make( NULL, eq2 );
378  sc_add_inegalite( ret_ps, co );
379  }
380  }
381 
382  /* Compare with inequalities */
383  for (ineq = in_ps2->inegalites; ineq != NULL; ineq = ineq->succ) {
384  Pcontrainte io;
385  if (contrainte_in_liste(ineq, in_ps1->inegalites)) continue;
386  if (contrainte_in_liste(ineq, in_ps1->egalites)) continue;
387  io = contrainte_dup( ineq ); contrainte_chg_sgn( io );
388  if (contrainte_in_liste(io, in_ps1->egalites)) {
389  io = contrainte_free(io);
390  continue;
391  }
392 
393  if (ret_ps != NULL){ sc_add_inegalite( ret_ps, contrainte_dup(ineq) ); }
394  else ret_ps = sc_make( NULL, contrainte_dup(ineq) );
395  io = contrainte_free(io);
396  }
397 
398  if (ret_ps != NULL)
399  { vect_rm(ret_ps->base); ret_ps->base = NULL; sc_creer_base( ret_ps );}
400 
401  ret_ps = sc_normalize( ret_ps );
402  C3_RETURN( IS_SC, ret_ps );
403 }
void contrainte_chg_sgn(Pcontrainte)
void contrainte_chg_sgn(Pcontrainte eq): changement de signe d'une contrainte, i.e.
Definition: unaires.c:56
Psommet eq_in_ineq(Psommet *sys, int *nb_som, Pvecteur *lvbase)
Psommet eq_in_ineq(Psommet * sys, int * nb_som, Pvecteur * lvbase): Transformation des egalites du sy...
Definition: plvar-ecart.c:68

References Ssysteme::base, C3_DEBUG, C3_RETURN, contrainte_chg_sgn(), contrainte_dup(), contrainte_free(), contrainte_in_liste(), contrainte_make(), eq, eq_in_ineq(), fprintf(), IS_SC, sc_add_inegalite(), sc_creer_base(), sc_dup(), sc_fprint(), sc_make(), sc_normalize(), Scontrainte::succ, union_variable_name, vect_chg_sgn(), vect_dup(), vect_rm(), and Scontrainte::vecteur.

Referenced by pa_path_to_few_disjunct_ofl_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sl_append_system()

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_sln_sl
in_psn_ps

Definition at line 240 of file sc_list.c.

243 {
244  Psyslist ret_sl;
245 
246  if (in_ps == NULL) return( in_sl );
247  ret_sl = sl_new(); ret_sl->psys = in_ps; ret_sl->succ = in_sl;
248  return( ret_sl );
249 }

References 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sl_append_system_first()

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_sln_sl
in_psn_ps

Definition at line 256 of file sc_list.c.

259 {
260  Psyslist new_sl = SL_NULL, sl = SL_NULL;
261 
262  if (in_ps == NULL) return( in_sl );
263  new_sl = sl_append_system(NULL, in_ps);
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) {}
267  sl->succ = new_sl;
268  return( in_sl );
269 }

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

+ Here is the call graph for this function:

◆ sl_dup()

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_sln_sl

Definition at line 296 of file sc_list.c.

298 {
299  Psyslist sl, ret_sl = SL_NULL;
300  for( sl = in_sl; sl != NULL; sl = sl->succ ) {
301  ret_sl = sl_append_system( ret_sl, sc_dup( sl->psys ) );
302  }
303  return ret_sl;
304 }

References 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sl_dup1()

Psyslist sl_dup1 ( Psyslist  in_sl)

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

Sharing.

Parameters
in_sln_sl

Definition at line 311 of file sc_list.c.

313 {
314  Psyslist sl, ret_sl = NULL;
315  for( sl = in_sl; sl != NULL; sl = sl->succ ) {
316  if ( sl->psys == SC_UNDEFINED ) continue;
317  ret_sl = sl_append_system( ret_sl, sl->psys );
318  }
319  return ret_sl;
320 }

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

Referenced by dj_dup1(), and pa_dup1().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sl_fprint()

void sl_fprint ( FILE *  ,
Psyslist  ,
char *  *)(void 
)

◆ sl_fprint_tab()

void sl_fprint_tab ( FILE *  ,
Psyslist  ,
char *  *)(void,
int   
)

◆ sl_free()

Psyslist sl_free ( Psyslist  psl)

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

Parameters
pslsl

Definition at line 327 of file sc_list.c.

329 {
330  if( psl != SL_NULL ) {
331  psl->psys = sc_free( psl->psys );
332  psl->succ = sl_free(psl->succ);
333  free( psl ); psl = NULL;
334  }
335  return SL_NULL;
336 }

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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sl_free1()

Psyslist sl_free1 ( Psyslist  psl)

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

Parameters
pslsl

Definition at line 343 of file sc_list.c.

345 {
346  if( psl != SL_NULL ) {
347  psl->psys = (Psysteme) NULL;
348  psl->succ = sl_free1(psl->succ);
349  free( psl );
350  }
351  return SL_NULL;
352 }

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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sl_get_tab_string()

char* sl_get_tab_string ( int  in_tab)

char* sl_get_tab_string( in_tab ) returns a string of in_tab \t

Parameters
in_tabn_tab

Definition at line 366 of file sc_list.c.

368 {
369  int d;
370  static char name[20];
371 #ifndef strdup
372  extern char* strdup();
373 #endif
374 
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"); }
378  return strdup(name);
379 }
char * strdup()

References assert, and strdup().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sl_init_lex()

void sl_init_lex ( void  )

◆ sl_is_system_p()

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 Psysteme in it.

Parameters
in_sln_sl

Definition at line 230 of file sc_list.c.

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

References sl_length().

Referenced by dj_is_system_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sl_length()

bool sl_length ( Psyslist  in_sl)

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

Parameters
in_sln_sl

Definition at line 193 of file sc_list.c.

195 {
196  int length; Psyslist sl = in_sl;
197  if (in_sl == NULL) return 0;
198  for(length = 0; sl != NULL; sl = sl->succ, length++);
199  return length;
200 }

References 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().

+ Here is the caller graph for this function:

◆ sl_max_constraints_nb()

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_sln_sl

Definition at line 207 of file sc_list.c.

209 {
210  Psysteme ps;
211  int ret_int = 0;
212 
213  if (in_sl == NULL) return 0;
214 
215  for(; in_sl != NULL; in_sl = in_sl->succ) {
216  int loc;
217  ps = in_sl->psys;
218  if (sc_empty_p(ps)) continue;
219  loc = 2*(ps->nb_eq) + ps->nb_ineq;
220  if (loc > ret_int) ret_int = loc;
221  }
222  return ret_int;
223 }
if(!(yy_init))
Definition: genread_lex.c:1029

References if(), Ssysteme::nb_eq, Ssysteme::nb_ineq, and sc_empty_p().

Referenced by pa_feasibility_ofl_ctrl(), and pa_max_constraints_nb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sl_new()

Psyslist sl_new ( void  )

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

Output : An empty syslist.

Definition at line 277 of file sc_list.c.

278 {
279  Psyslist p;
280 
281  p = (Psyslist) malloc(sizeof(Ssyslist));
282  if (p == NULL) {
283  (void) fprintf(stderr,"sl_new: Out of memory space\n");
284  exit(-1);
285  }
286  p->psys = (Psysteme ) NULL; p->succ = (Psyslist) NULL;
287  return(p);
288 }
struct Ssyslist * Psyslist

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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sl_read()

Psyslist sl_read ( char *  nomfic)

void sl_read(FILE*) reads a Psyslist

Parameters
nomficomfic

Definition at line 461 of file sc_list.c.

463 {
464  if ((slx_in = fopen(nomfic, "r")) == NULL) {
465  (void) fprintf(stderr, "Ouverture du fichier %s impossible\n",nomfic);
466  exit(4);
467  }
468  sl_init_lex(); slx_parse(); fclose( slx_in );
469  return( sl_yacc );
470 }
Psyslist sl_yacc
Definition: sl_gram.c:113
void sl_init_lex(void)
FILE * slx_in
Psysteme construit par sl_gram.y.
int slx_parse(void)
fichier lu par sl_lex.l

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

Referenced by dj_read(), and pa_read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sl_set_variable_name()

void sl_set_variable_name ( char *  *)(void)

◆ slx_alloc()

void* slx_alloc ( yy_size_t  )

◆ slx_error()

int slx_error ( char *  s)

procedure minimum de recouvrement d'erreurs

Definition at line 1702 of file sl_gram.c.

1703 {
1704  /* procedure minimum de recouvrement d'erreurs */
1705  int c;
1706  (void) fprintf(stderr, "%s near %s\n",s, slx_text);
1707  while ((c = getchar()) != EOF) putchar(c);
1708  syntax_error = true;
1709  return 0;
1710 }
bool syntax_error
sl_gram.c
Definition: sl_gram.c:95
char * slx_text

References fprintf(), slx_text, and syntax_error.

+ Here is the call graph for this function:

◆ slx_free()

void slx_free ( void *  )

◆ slx_get_debug()

int slx_get_debug ( void  )

◆ slx_get_in()

FILE* slx_get_in ( void  )

◆ slx_get_leng()

int slx_get_leng ( void  )

◆ slx_get_lineno()

int slx_get_lineno ( void  )

◆ slx_get_out()

FILE* slx_get_out ( void  )

◆ slx_get_text()

char* slx_get_text ( void  )

◆ slx_lex()

int slx_lex ( void  )

◆ slx_lex_destroy()

int slx_lex_destroy ( void  )

◆ slx_parse()

int slx_parse ( void  )

◆ slx_pop_buffer_state()

void slx_pop_buffer_state ( void  )

◆ slx_realloc()

void* slx_realloc ( void *  ,
yy_size_t   
)

◆ slx_restart()

void slx_restart ( FILE *  )

◆ slx_set_debug()

void slx_set_debug ( int  )

◆ slx_set_in()

void slx_set_in ( FILE *  )

◆ slx_set_lineno()

void slx_set_lineno ( int  )

◆ slx_set_out()

void slx_set_out ( FILE *  )

◆ slx_wrap()

int slx_wrap ( void  )

◆ un_fprint_tab()

void un_fprint_tab ( FILE *  ,
char *  ,
char *  *)(void,
int  ,
int   
)

◆ vect_parallel()

enum hspara_elem vect_parallel ( Pvecteur  in_v1,
Pvecteur  in_v2 
)

reduc.c

reduc.c

complexity: length(in_v1) * length(in_v2) comment: in_v1 = a1 X + b1 represents a1 X+b1 <= 0 and in_v2 a2 X + b2 <=0. if (a1!=a2) || (a1!=-a2), returns unpara else if (a1==a2), return sign(b2-b1) in ss part of hspara else if (a1==-a2), return sign(-b2-b1) in op part of hspara.

gcd of each vector

length of each vector without TCST

value of TCST and their diff

debuging

get gcd of each vector and constant linked to TCST

Determine what kind of parallel hyperplane we are in

coefficient value was 0 and was not represented

compute return value

debuging

Parameters
in_v1n_v1
in_v2n_v2

Definition at line 49 of file reduc.c.

106 {
107  Pvecteur v1, v2;
108  enum hspara_elem ret_sle = unpara;
109  bool first = true;
110  bool same_sign = false;
111  Value gcd1, gcd2; /* gcd of each vector */
112  int l1, l2; /* length of each vector without TCST */
113  Value b1, b2, diff; /* value of TCST and their diff */
114 
115  if (!in_v1 || !in_v2) return unpara;
116 
117  /* debuging */
118  /*
119  C3_DEBUG("vect_parallel", {
120  fprintf(stderr, "Input vectors, in_v1, then in_v2:\n");
121  vect_fprint( stderr, in_v1, union_variable_name );
122  vect_fprint( stderr, in_v2, union_variable_name );
123  });
124  */
125 
126 
127  /* get gcd of each vector and constant linked to TCST */
128 
129  l1 = 0; b1 = 0; gcd1 = value_abs(val_of(in_v1));
130  for (v1 = in_v1; v1 != NULL; v1 = v1->succ) {
131  gcd1 = pgcd( gcd1, value_abs(val_of(v1)) );
132  if(var_of(v1)==TCST) b1 = val_of(v1);
133  else l1++;
134  }
135 
136  l2 = 0; b2 = 0; gcd2 = value_abs(val_of(in_v2));
137  for (v2 = in_v2; v2 != NULL; v2 = v2->succ) {
138  gcd2 = pgcd( gcd2, value_abs(val_of(v2)) );
139  if(var_of(v2)==TCST) b2 = val_of(v2);
140  else l2++;
141  }
142 
143  if (l1 != l2) return unpara ;
144 
145 
146  /* Determine what kind of parallel hyperplane we are in */
147  for (v2 = in_v2; v2 != NULL; v2 = v2->succ) {
148  Variable var2 = var_of(v2);
149  Value val2 = val_of(v2);
150  bool found = false;
151 
152  if (var2 == TCST) continue;
153 
154  for (v1 = in_v1; v1 != NULL; v1 = v1->succ) {
155  if (var_of(v1) == var2) {
156  Value i1 = value_mult(gcd2,val_of(v1));
157  Value i2 = value_mult(gcd1,val2);
158  bool ss = value_eq(i1,i2);
159  bool op = value_eq(i1,value_uminus(i2));
160 
161  if (!ss && !op) return unpara;
162  if (first) {first = false; same_sign = (ss)?ss:op ;}
163  if ((same_sign && op)||(!same_sign && ss)) return unpara;
164  found = true;
165  }
166  }
167 
168  /* coefficient value was 0 and was not represented */
169  if(!found) return unpara;
170  }
171 
172 
173  /* compute return value */
174  {
175  Value p1 = value_mult(gcd1,b2),
176  p2 = value_uminus(value_mult(gcd2,b1));
177  diff = (same_sign)? value_plus(p1,p2): value_minus(p2,p1);
178  }
179  if (value_zero_p(diff)) ret_sle = (same_sign) ? sszero : opzero ;
180  else if (value_pos_p(diff)) ret_sle = (same_sign) ? ssplus : opplus ;
181  else if (value_neg_p(diff)) ret_sle = (same_sign) ? ssminus : opminus ;
182  else ret_sle = unpara;
183 
184  /* debuging */
185  /*
186  C3_DEBUG("vect_parallel",
187  { fprintf(stderr, "Output hspara: %s\n", hspara_to_string(ret_sle)); });
188  */
189 
190  return ret_sle;
191 }
#define value_pos_p(val)
#define value_minus(v1, v2)
#define pgcd(a, b)
Pour la recherche de performance, selection d'une implementation particuliere des fonctions.
#define value_uminus(val)
unary operators on values
#define value_zero_p(val)
int Value
#define value_eq(v1, v2)
bool operators on values
#define value_plus(v1, v2)
binary operators on values
#define value_abs(val)
#define value_mult(v, w)
whether the default is protected or not this define makes no sense any more...
#define value_neg_p(val)
Value b2
Definition: sc_gram.c:105
Value b1
booleen indiquant quel membre est en cours d'analyse
Definition: sc_gram.c:105
struct Svecteur * succ
Definition: vecteur-local.h:92
@ ssplus
b1 == bj -> h1/hj = full
Definition: union-local.h:53
@ opzero
bj < b1 -> h1/hj = h1
Definition: union-local.h:59
@ opplus
b1 == bj -> h1/hj = h1
Definition: union-local.h:60
@ ssminus
bj > b1 -> h1/hj = full
Definition: union-local.h:57
@ unpara
compare {h1: a1 X + b1 <= 0} with {hj: aj X + bj <= 0}
Definition: union-local.h:50
@ sszero
unparallel -> h1/hj = h1
Definition: union-local.h:52
@ opminus
empty part
Definition: union-local.h:63
#define val_of(varval)
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Definition: vecteur-local.h:60
#define var_of(varval)

Variable Documentation

◆ ba_yacc

Pbase ba_yacc
extern

Definition at line 113 of file sl_gram.c.

◆ sl_yacc

Psyslist sl_yacc
extern

Definition at line 113 of file sl_gram.c.

◆ slx__flex_debug

int slx__flex_debug
extern

◆ slx_char

int slx_char
extern

◆ slx_in

FILE* slx_in
extern

◆ slx_leng

int slx_leng
extern

◆ slx_lineno

int slx_lineno
extern

◆ slx_nerrs

int slx_nerrs
extern

◆ slx_out

FILE* slx_out
extern

◆ slx_text

char* slx_text
extern

◆ syntax_error

bool syntax_error
extern

sl_gram.c

Definition at line 95 of file sl_gram.c.

Referenced by slx_error().

◆ union_variable_name

◆ va_yacc

Variable va_yacc
extern

Definition at line 113 of file sl_gram.c.

◆ valcst

Value valcst
extern

Definition at line 96 of file sl_gram.c.