PIPS
union-local.h
Go to the documentation of this file.
1 
2 
3 typedef struct Ssyslist {
5  struct Ssyslist *succ;
7 
8 #define SL_NULL (Psyslist) NULL
9 
11 
12 #define DJ_UNDEFINED (Pdisjunct) NULL
13 
15 
16 #define CO_UNDEFINED (Pcomplement) NULL
18 typedef struct Spath {
22 
23 #define PA_UNDEFINED (Ppath) NULL
24 
25 typedef struct Sunion {
29 
30 #define UN_UNDEFINED (Punion) NULL
31 #define UN_FULL_SPACE (Punion) NULL
32 #define UN_EMPTY_SPACE (Punion) NULL
33 
34 /* Implementation of the finite parallel half space lattice hspara
35  *
36  * ________ full
37  * / |
38  * / empty ___
39  * / | \
40  * / keep \
41  * / / \ \
42  * ssplus / opplus \
43  * | ssminus | opminus
44  * sszero \ opzero /
45  * \ \ / /
46  * \________ unpara _____/
47  */
49 { /* compare {h1: a1 X + b1 <= 0} with {hj: aj X + bj <= 0} */
50  unpara = 0, /* unparallel -> h1/hj = h1 */
51  /**/ /* a1 == aj for same sign (ss) part lattice */
52  sszero = 1, /* b1 == bj -> h1/hj = full */
53  ssplus = 2, /* bj > b1 -> h1/hj = full */
54  /**/
55  /**/ /* keep part */
56  /**/
57  ssminus = 3, /* bj < b1 -> h1/hj = h1 */
58  /**/ /* -a1 == aj for opposite sign (op) part lattice */
59  opzero = 4, /* b1 == bj -> h1/hj = h1 */
60  opplus = 5, /* bj > b1 -> h1/hj = h1 */
61  keep = 6,
62  /**/ /* empty part */
63  opminus = 7, /* b1 < bj -> h1/hj = empty */
64  empty = 8,
65  full = 9
66 };
67 
68 /* FOR BACKWARD COMPATIBILITY */
69 #define my_sc_full() sc_full()
70 #define my_sc_empty() sc_empty((Pbase) NULL)
71 #define is_sc_my_empty_p(ps) sc_empty_p((ps))
72 #define is_dj_full_p(dj) dj_full_p((dj))
73 #define is_dj_empty_p(dj) dj_empty_p((dj))
74 #define is_pa_full_p(pa) pa_full_p((pa))
75 #define is_pa_empty_p(pa) pa_empty_p((pa))
76 
77 
78 /* FOR BACKWARD COMPATIBILITY */
79 #define sc_difference(ps1, ps2) pa_system_difference_ofl_ctrl((ps1),(ps2),FWD_OFL_CTRL)
80 #define sc_inclusion_p(ps1, ps2) pa_inclusion_p_ofl_ctrl((ps1), (ps2), NO_OFL_CTRL)
81 #define sc_inclusion_p_ofl(ps1, ps2) pa_inclusion_p_ofl_ctrl((ps1), (ps2), FWD_OFL_CTRL)
82 #define sc_inclusion_p_ofl_ctrl(ps1, ps2, ofl) pa_inclusion_p_ofl_ctrl((ps1), (ps2), (ofl))
83 #define sc_equal_p(ps1,ps2) pa_system_equal_p_ofl_ctrl((ps1), (ps2), NO_OFL_CTRL)
84 #define sc_equal_p_ofl(ps1,ps2) pa_system_equal_p_ofl_ctrl((ps1), (ps2), FWD_OFL_CTRL)
85 #define sc_equal_p_ofl_ctrl(ps1, ps2, ofl) pa_system_equal_p_ofl_ctrl((ps1), (ps2), (ofl))
86 #define sc_convex_hull_equals_union_p(conv_hull, ps1, ps2) \
87  pa_convex_hull_equals_union_p_ofl_ctrl((conv_hull), (ps1), (ps2),NO_OFL_CTRL, false)
88 #define sc_convex_hull_equals_union_p_ofl(conv_hull, ps1, ps2) \
89  pa_convex_hull_equals_union_p_ofl_ctrl((conv_hull), (ps1), (ps2), OFL_CTRL, false)
90 #define sc_convex_hull_equals_union_p_ofl_ctrl(conv_hull, ps1, ps2, ofl, bo) \
91  pa_convex_hull_equals_union_p_ofl_ctrl((conv_hull), (ps1), (ps2), (ofl), (bo))
92 
93 /* OTHERS */
94 #define sc_elim_redund_with_first(ps1, ps2) sc_elim_redund_with_first_ofl_ctrl((ps1), (ps2), NO_OFL_CTRL)
95 
96 #define dj_fprint(fi,dj,fu) dj_fprint_tab((fi), (dj), (fu), 0)
97 #define DJ_UNDEFINED_P(dj) ((dj) == DJ_UNDEFINED)
98 #define dj_faisabilite(dj) dj_feasibility_ofl_ctrl((dj), NO_OFL_CTRL)
99 #define dj_feasibility(dj) dj_feasibility_ofl_ctrl((dj), NO_OFL_CTRL)
100 #define dj_faisabilite_ofl(dj) dj_feasibility_ofl_ctrl((dj), FWD_OFL_CTRL)
101 #define dj_intersection(dj1, dj2) dj_intersection_ofl_ctrl((dj1), (dj2), NO_OFL_CTRL)
102 #define dj_intersect_system(dj,ps) dj_intersect_system_ofl_ctrl((dj), (ps), NO_OFL_CTRL )
103 #define dj_intersect_djcomp(dj1,dj2) dj_intersect_djcomp_ofl_ctrl( (dj1), (dj2), NO_OFL_CTRL )
104 #define dj_projection_along_variables(dj,pv) \
105  dj_projection_along_variables_ofl_ctrl((dj),(pv),NO_OFL_CTRL)
106 #define dj_variable_substitution_with_eqs(dj,co,pv) \
107  dj_variable_substitution_with_eqs_ofl_ctrl( (dj), (co), (pv), NO_OFL_CTRL )
108 
109 #define pa_fprint(fi,pa,fu) pa_fprint_tab((fi), (pa), (fu), 0)
110 #define PA_UNDEFINED_P(pa) ((pa) == PA_UNDEFINED)
111 #define pa_new() pa_make(NULL, NULL)
112 #define pa_faisabilite(pa) pa_feasibility_ofl_ctrl((pa), NO_OFL_CTRL)
113 #define pa_feasibility(pa) pa_feasibility_ofl_ctrl((pa), NO_OFL_CTRL)
114 #define pa_faisabilite_ofl(pa) pa_feasibility_ofl_ctrl((pa), FWD_OFL_CTRL)
115 #define pa_path_to_disjunct(pa) pa_path_to_disjunct_ofl_ctrl((pa), NO_OFL_CTRL )
116 #define pa_path_dup_to_disjunct(pa) pa_path_to_disjunct_ofl_ctrl((pa), NO_OFL_CTRL )
117 #define pa_system_difference(ps1,ps2) pa_system_difference_ofl_ctrl((ps1),(ps2),NO_OFL_CTRL)
118 #define pa_system_equal_p(ps1,ps2) pa_system_equal_p_ofl_ctrl((ps1),(ps2),NO_OFL_CTRL)
119 #define pa_inclusion_p(ps1,ps2) pa_inclusion_p_ofl_ctrl((ps1),(ps2),NO_OFL_CTRL)
120 #define pa_path_to_disjunct_ofl(pa) pa_path_to_disjunct_ofl_ctrl((pa), FWD_OFL_CTRL )
121 #define pa_path_to_disjunct_rule4(pa) pa_path_to_disjunct_rule4_ofl_ctrl((pa), FWD_OFL_CTRL )
122 #define pa_path_to_few_disjunct(pa) pa_path_to_few_disjunct_ofl_ctrl((pa), NO_OFL_CTRL)
123 #define pa_system_difference(ps1,ps2) pa_system_difference_ofl_ctrl((ps1),(ps2),NO_OFL_CTRL)
124 #define pa_convex_hull_equals_union_p(conv_hull, ps1, ps2) \
125  pa_convex_hull_equals_union_p_ofl_ctrl((conv_hull), (ps1), (ps2), NO_OFL_CTRL, false)
126 
127 #define un_fprint(fi,un,fu,ty) un_fprint_tab((fi), (un), (fu), (ty), 0)
128 
129 
130 /* Misceleanous (debuging...) */
131 #define PATH_MAX_CONSTRAINTS 12
132 
133 #define IS_SC 1
134 #define IS_SL 2
135 #define IS_DJ 3
136 #define IS_PA 4
137 
138 extern char* (*union_variable_name)(Variable);
139 
140 #if(defined(DEBUG_UNION_C3) || defined(DEBUG_UNION_PIPS))
141 #define C3_DEBUG( fun, code ) \
142  {if(getenv("DEBUG_UNION")){fprintf(stderr,"[%s]\n", fun); {code}}}
143 #define C3_RETURN( type, val ) \
144  {if(getenv("DEBUG_UNION")){ \
145  char* val1 = (char*) val; \
146  fprintf(stderr,"Returning:\n"); \
147  un_fprint_tab(stderr,(char*)val1,union_variable_name,type,1); return val1;} \
148  else{ return val; }}
149 #else
150 #define C3_DEBUG( fun, code )
151 #define C3_RETURN( type, val ) {return val;}
152 #endif
Pcomplist pcomp
Definition: union-local.h:20
Psysteme psys
Definition: union-local.h:19
Warning! Do not modify this file that is automatically generated!
Definition: union-local.h:3
Psysteme psys
Definition: union-local.h:4
struct Ssyslist * succ
Definition: union-local.h:5
Pdisjunct pdi
Definition: union-local.h:26
Ppath ppa
Definition: union-local.h:27
struct Sunion Sunion
Ssysteme * Pcomplement
Definition: union-local.h:14
struct Ssyslist Ssyslist
Ssyslist Scomplist
Definition: union-local.h:17
Ssyslist * Pdisjunct
Definition: union-local.h:10
struct Spath Spath
struct Ssyslist * Psyslist
struct Spath * Ppath
Ssysteme Scomplement
Definition: union-local.h:14
Ssyslist * Pcomplist
Definition: union-local.h:17
struct Sunion * Punion
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
@ 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
@ empty
b1 < bj -> h1/hj = empty
Definition: union-local.h:64
Ssyslist Sdisjunct
Definition: union-local.h:10
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