PIPS
sc_enveloppe.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "linear_assert.h"
#include "boolean.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
#include "sc.h"
#include "sommet.h"
#include "ray_dte.h"
#include "sg.h"
#include "polyedre.h"
+ Include dependency graph for sc_enveloppe.c:

Go to the source code of this file.

Functions

Psysteme sc_enveloppe_chernikova_ofl_ctrl (Psysteme s1, Psysteme s2, int ofl_ctrl)
 package polyedre: enveloppe convexe de deux systemes lineaires More...
 
Psysteme sc_enveloppe_chernikova (Psysteme s1, Psysteme s2)
 
static Psysteme actual_convex_union (Psysteme s1, Psysteme s2)
 call chernikova with compatible base. More...
 
Psysteme elementary_convex_union (Psysteme s1, Psysteme s2)
 implements FC basic idea of simple fast cases... More...
 
static bool base_to_set (linear_hashtable_pt s, Pvecteur b)
 put base variables in set. More...
 
static bool contains_variables (Pvecteur v, linear_hashtable_pt vars)
 returns whether c contains variables of vars. More...
 
static bool transitive_closure_pass (Pcontrainte *pc, Pcontrainte *ex, linear_hashtable_pt vars)
 one pass only of transitive closure. More...
 
static Psysteme transitive_closure_system (Psysteme s, linear_hashtable_pt vars)
 transtitive extraction of constraints. More...
 
static Psysteme transitive_closure_from_two_bases (Psysteme s, Pbase b1, Pbase b2)
 returns constraints from s which may depend on variables in b1 and b2. More...
 
Psysteme sc_cute_convex_hull (Psysteme is1, Psysteme is2)
 returns s1 v s2. More...
 
Psysteme sc_rectangular_hull (Psysteme sc, Pbase pb)
 take the rectangular bounding box of the systeme sc, by projecting each constraint of the systeme against each of the basis in pb More...
 

Function Documentation

◆ actual_convex_union()

static Psysteme actual_convex_union ( Psysteme  s1,
Psysteme  s2 
)
static

call chernikova with compatible base.

same common base!

call chernikova directly. sc_common_projection_convex_hull improvements have already been included.

restaure initial base

Definition at line 134 of file sc_enveloppe.c.

135 {
136  Psysteme s;
137 
138  /* same common base! */
139  Pbase b1 = sc_base(s1), b2 = sc_base(s2), bu = base_union(b1, b2);
140  int d1 = sc_dimension(s1), d2 = sc_dimension(s2), du = vect_size(bu);
141 
142  sc_base(s1) = bu;
143  sc_dimension(s1) = du;
144  sc_base(s2) = bu;
145  sc_dimension(s2) = du;
146 
147  /* call chernikova directly.
148  sc_common_projection_convex_hull improvements have already been included.
149  */
150  s = sc_enveloppe_chernikova(s1, s2);
151 
152  /* restaure initial base */
153  sc_base(s1) = b1;
154  sc_dimension(s1) = d1;
155  sc_base(s2) = b2;
156  sc_dimension(s2) = d2;
157 
158  base_rm(bu);
159 
160  return s;
161 }
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
int vect_size(Pvecteur v)
package vecteur - reductions
Definition: reductions.c:47
Psysteme sc_enveloppe_chernikova(Psysteme s1, Psysteme s2)
Definition: sc_enveloppe.c:127
Value b2
Definition: sc_gram.c:105
Value b1
booleen indiquant quel membre est en cours d'analyse
Definition: sc_gram.c:105
s1
Definition: set.c:247
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
Definition: vecteur-local.h:89
#define base_rm(b)

References b1, b2, base_rm, base_union(), s1, sc_enveloppe_chernikova(), and vect_size().

Referenced by elementary_convex_union().

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

◆ base_to_set()

static bool base_to_set ( linear_hashtable_pt  s,
Pvecteur  b 
)
static

put base variables in set.

returns whether something was put.

Definition at line 217 of file sc_enveloppe.c.

218 {
219  bool modified = false;
220 
221  for (; b; b=b->succ)
222  if (b->var && !linear_hashtable_isin(s, b->var))
223  {
224  linear_hashtable_put(s, b->var, b->var);
225  modified = true;
226  }
227 
228  return modified;
229 }
bool linear_hashtable_isin(linear_hashtable_pt h, void *k)
Definition: hashpointer.c:273
void linear_hashtable_put(linear_hashtable_pt h, void *k, void *v)
Definition: hashpointer.c:263
Variable var
Definition: vecteur-local.h:90
struct Svecteur * succ
Definition: vecteur-local.h:92

References linear_hashtable_isin(), linear_hashtable_put(), Svecteur::succ, and Svecteur::var.

Referenced by transitive_closure_from_two_bases(), and transitive_closure_pass().

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

◆ contains_variables()

static bool contains_variables ( Pvecteur  v,
linear_hashtable_pt  vars 
)
static

returns whether c contains variables of vars.

Definition at line 232 of file sc_enveloppe.c.

233 {
234  for (; v; v = v->succ)
235  if (v->var && linear_hashtable_isin(vars, v->var))
236  return true;
237  return false;
238 }

References linear_hashtable_isin(), Svecteur::succ, and Svecteur::var.

Referenced by transitive_closure_pass().

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

◆ elementary_convex_union()

Psysteme elementary_convex_union ( Psysteme  s1,
Psysteme  s2 
)

implements FC basic idea of simple fast cases...

returns s1 v s2. s1 and s2 are not touched. The bases should be minimum for best efficiency! otherwise useless columns are allocated and computed. a common base is rebuilt in actual_convex_union. other fast cases may be added?

Parameters
s11
s22

Definition at line 171 of file sc_enveloppe.c.

172 {
173  bool
174  b1 = sc_empty_p(s1),
175  b2 = sc_empty_p(s2);
176 
177  if (b1 && b2)
178  return sc_empty(base_union(sc_base(s1), sc_base(s2)));
179 
180  if (b1) {
181  Psysteme s = sc_dup(s2);
182  Pbase b = base_union(sc_base(s1), sc_base(s2));
183  base_rm(sc_base(s));
184  sc_base(s) = b;
185  return s;
186  }
187 
188  if (b2) {
189  Psysteme s = sc_dup(s1);
190  Pbase b = base_union(sc_base(s1), sc_base(s2));
191  base_rm(sc_base(s));
192  sc_base(s) = b;
193  return s;
194  }
195 
196  if (sc_rn_p(s1) || sc_rn_p(s2) ||
197  !vect_common_variables_p(sc_base(s1), sc_base(s2)))
198  return sc_rn(base_union(sc_base(s1), sc_base(s2)));
199 
200  /*
201  if (sc_dimension(s1)==1 && sc_dimension(s2)==1 &&
202  sc_base(s1)->var == sc_base(s2)->var)
203  {
204  // fast computation...
205  }
206  */
207 
208  return actual_convex_union(s1, s2);
209 }
bool sc_rn_p(Psysteme sc)
bool sc_rn_p(Psysteme sc): check if the set associated to sc is the whole space, rn
Definition: sc_alloc.c:369
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
Psysteme sc_rn(Pbase b)
Psysteme sc_rn(Pbase b): build a Psysteme without constraints to define R^n, where n is b's dimension...
Definition: sc_alloc.c:336
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
Psysteme sc_dup(Psysteme ps)
Psysteme sc_dup(Psysteme ps): should becomes a link.
Definition: sc_alloc.c:176
static Psysteme actual_convex_union(Psysteme s1, Psysteme s2)
call chernikova with compatible base.
Definition: sc_enveloppe.c:134
bool vect_common_variables_p(Pvecteur v1, Pvecteur v2)
bool vect_common_variables_p(Pvecteur v1, v2) BA 19/05/94 input : two vectors.
Definition: unaires.c:397

References actual_convex_union(), b1, b2, base_rm, base_union(), s1, sc_dup(), sc_empty(), sc_empty_p(), sc_rn(), sc_rn_p(), and vect_common_variables_p().

Referenced by sc_cute_convex_hull().

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

◆ sc_cute_convex_hull()

Psysteme sc_cute_convex_hull ( Psysteme  is1,
Psysteme  is2 
)

returns s1 v s2.

initial systems are not changed.

v convex union u union n intersection T orthogonality

(1) CA:

P1 v P2 = (P n X1) v (P n X2) = let P = P' n P'' so that P' T X1 and P' T X2 and P' T P'' built by transitive closure, then P1 v P2 = (P' n (P'' n X1)) v (P' n (P'' n X2)) = P' n ((P'' n X1) v (P'' n X2))

Proof by considering generating systems: Def: A T B <=> var(A) n var(B) = 0 Prop: A n B if A T B Let A = (x,v,l), B = (y,w,m) A n B = { z | z = (x) \mu + (v) d + (l) e + (0) f (0) + (0) + (0) (I) and z = (0) \nu + (0) g + (0) h + (I) f' (y) + (w) + (m) (0) with \mu>0, \nu>0, \sum\mu=1, \sum\nu=1, d>0, g>0 } we can always find f and f' equals to the other part (by extension) so A n B = { z | z = (x 0) \mu + (v 0) d + (l 0) e (0 y) \nu (0 w) g (0 m) h with \mu \nu d g constraints... } It is a convex : ((xi) , (v 0), (l 0)) (yj)ij, (0 w), (0 m) we just need to prove that Cmn == Cg defined as (x 0) \mu == (xi) \gamma with >0 and \sum = 1 (0 y) \nu (yj)ij . Cg in a convex. . Cg \in Cmn since ((xi)(yj) ij) in Cmn with \mu = \delta i, \nu = \delta j . Cmn \in Cg by chosing \gamma_ij = \mu_i\nu_j, which >0 and \sum = 1 Prop: A T B and A T C => A T (B v C) and A T (B n C) Theo: A T B and A T C => (A n B) v (A n C) = A n (B v C) compute both generating systems with above props. they are equal.

(2) FI:

perform exact projections of common equalities. no proof at the time. It looks ok anyway.

(3) FC:

base(P) n base(Q) = 0 => P u Q = Rn and some other very basic simplifications... which are not really interesting if no decomposition is performed?

on overflows FI suggested.

1/ we want to compute : (A n B1) u (A n B2) 2/ we chose to approximate it as : (A n B1) v (A n B2) 3/ we try Corinne's factorization with transitive closure A' n ((A'' n B1) v (A'' n B2)) 4/ on overflow, we can try A n (B1 v B2) // NOT IMPLEMENTED YET 5/ if we have one more overflow, then A looks good as an approximation.

CA: extract common disjoint part.

FI: in sc_common_projection_convex_hull note that equalities are not that big a burden to chernikova?

fast sc_append

usually we use V (convex hull) as a U (set union) approximation. as we have : (A n B1) U (A n B2) \in A the common part of both systems is an approximation of the union! sc_rn is returned on overflows (and some other case). I don't think that the result is improved apart when actual overflow occurs. FC/CA.

dead. either rm or moved as sc.

better compatibility with previous version, as the convex union normalizes the system and removes redundancy, what is not done if part of the system is separated. Other calls may be considered here?

ok, it will look better.

misleading... not really projected. { x==y, y==3 } => { x==3, y==3 }

sc, su: fast union of disjoint.

regenerate the expected base.

Parameters
is1s1
is2s2

Definition at line 369 of file sc_enveloppe.c.

370 {
371  Psysteme s1, s2, sc, stc, su, scsaved;
372  int current_overflow_count;
373 
374  s1 = sc_dup(is1);
375  s2 = sc_dup(is2);
376 
377  /* CA: extract common disjoint part.
378  */
379  sc = extract_common_syst(s1, s2);
380  scsaved = sc_dup(sc);
381  stc = transitive_closure_from_two_bases(sc, s1->base, s2->base);
382 
383  /* FI: in sc_common_projection_convex_hull
384  note that equalities are not that big a burden to chernikova?
385  */
386  sc_extract_exact_common_equalities(stc, sc, s1, s2);
387 
388  /* fast sc_append */
389  s1 = sc_fusion(s1, sc_dup(stc));
390  sc_fix(s1);
391 
392  s2 = sc_fusion(s2, stc);
393  sc_fix(s2);
394 
395  stc = NULL;
396 
397  current_overflow_count = linear_number_of_exception_thrown;
398 
399  su = elementary_convex_union(s1, s2);
400 
401  /* usually we use V (convex hull) as a U (set union) approximation.
402  * as we have : (A n B1) U (A n B2) \in A
403  * the common part of both systems is an approximation of the union!
404  * sc_rn is returned on overflows (and some other case).
405  * I don't think that the result is improved apart
406  * when actual overflow occurs. FC/CA.
407  */
408  if (current_overflow_count!=linear_number_of_exception_thrown)
409  {
410  if (su) sc_rm(su), su = NULL;
411  if (sc) sc_rm(sc), sc = NULL;
412  sc = scsaved;
413  }
414  else
415  {
416  sc_rm(scsaved);
417  }
418 
419  scsaved = NULL; /* dead. either rm or moved as sc. */
420  sc_rm(s1);
421  sc_rm(s2);
422 
423  /* better compatibility with previous version, as the convex union
424  * normalizes the system and removes redundancy, what is not done
425  * if part of the system is separated. Other calls may be considered here?
426  */
427  sc_transform_ineg_in_eg(sc); /* ok, it will look better. */
428  /* misleading... not really projected. { x==y, y==3 } => { x==3, y==3 } */
429  sc_project_very_simple_equalities(sc);
430 
431  /* sc, su: fast union of disjoint. */
432  sc = sc_fusion(sc, su);
433 
434  /* regenerate the expected base. */
435  if (sc)
436  {
437  sc_fix(sc);
438  if (sc_base(sc)) base_rm(sc_base(sc));
439  }
440  else
441  {
442  sc = sc_rn(NULL);
443  }
444  sc_base(sc) = base_union(sc_base(is1), sc_base(is2));
445  sc_dimension(sc) = vect_size(sc_base(sc));
446 
447  return sc;
448 }
int linear_number_of_exception_thrown
static int is2(Pproblem XX, Pproblem VV, struct rproblem *RR)
=======================================================================
Definition: isolve.c:2158
void sc_fix(Psysteme s)
fix system s for coherency of the base and number of things.
Definition: sc_alloc.c:141
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
static Psysteme transitive_closure_from_two_bases(Psysteme s, Pbase b1, Pbase b2)
returns constraints from s which may depend on variables in b1 and b2.
Definition: sc_enveloppe.c:292
Psysteme elementary_convex_union(Psysteme s1, Psysteme s2)
implements FC basic idea of simple fast cases...
Definition: sc_enveloppe.c:171
Psysteme extract_common_syst(Psysteme s1, Psysteme s2)
returns the common subsystem if appropriate...
Psysteme sc_fusion(Psysteme s1, Psysteme s2)
package sc
void sc_transform_ineg_in_eg(Psysteme sc)
Transform the two constraints A.x <= b and -A.x <= -b of system sc into an equality A....
Pbase base
Definition: sc-local.h:75

References Ssysteme::base, base_rm, base_union(), elementary_convex_union(), extract_common_syst(), is2(), linear_number_of_exception_thrown, s1, sc_dup(), sc_fix(), sc_fusion(), sc_rm(), sc_rn(), sc_transform_ineg_in_eg(), transitive_closure_from_two_bases(), and vect_size().

Referenced by cute_convex_union(), do_array_expansion(), and statement_insertion_fix_access().

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

◆ sc_enveloppe_chernikova()

Psysteme sc_enveloppe_chernikova ( Psysteme  s1,
Psysteme  s2 
)
Parameters
s11
s22

Definition at line 127 of file sc_enveloppe.c.

128 {
130 }
Psysteme sc_enveloppe_chernikova_ofl_ctrl(Psysteme s1, Psysteme s2, int ofl_ctrl)
package polyedre: enveloppe convexe de deux systemes lineaires
Definition: sc_enveloppe.c:68
#define OFL_CTRL
I do thing that overflows are managed in a very poor manner.

References OFL_CTRL, s1, and sc_enveloppe_chernikova_ofl_ctrl().

Referenced by actual_convex_union(), and dependence_cone_positive().

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

◆ sc_enveloppe_chernikova_ofl_ctrl()

Psysteme sc_enveloppe_chernikova_ofl_ctrl ( Psysteme  s1,
Psysteme  s2,
int  ofl_ctrl 
)

package polyedre: enveloppe convexe de deux systemes lineaires

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

Ce module est range dans le package polyedre bien qu'il soit utilisable en n'utilisant que des systemes lineaires (package sc) parce qu'il utilise lui-meme des routines sur les polyedres.

Francois Irigoin, Janvier 1990 Corinne Ancourt, Fabien Coelho from time to time (1999/2000) Psysteme sc_enveloppe_chernikova_ofl_ctrl(Psysteme s1, s2, int ofl_ctrl) input : output : modifies : s1 and s2 are NOT modified. comment : s1 and s2 must have a basis.

s = enveloppe(s1, s2); return s;

calcul d'une representation par systeme lineaire de l'enveloppe convexe des polyedres definis par les systemes lineaires s1 et s2

mem_spy_begin();

calcul de l'enveloppe convexe

printf("systeme final \n"); sc_dump(s);

mem_spy_end("sc_enveloppe_chernikova_ofl_ctrl");

Parameters
s11
s22
ofl_ctrlfl_ctrl

Definition at line 68 of file sc_enveloppe.c.

72 {
73  Psysteme s = SC_UNDEFINED;
74  volatile bool catch_performed = false;
75  /* mem_spy_begin(); */
76 
77  assert(!SC_UNDEFINED_P(s1) && !SC_UNDEFINED_P(s2));
78 
79  // yuk
80  if (ofl_ctrl == OFL_CTRL)
81  {
82  ofl_ctrl = FWD_OFL_CTRL;
83  catch_performed = true;
85  //CATCH(overflow_error) {
86  /*
87  * PLEASE do not remove this warning.
88  *
89  * BC 24/07/95
90  */
91  fprintf(stderr, "[sc_enveloppe_chernikova_ofl_ctrl] "
92  "arithmetic error occured\n" );
93  s = sc_rn(base_dup(sc_base(s1)));
94  return s;
95  }
96  }
97 
98  if (SC_RN_P(s2) || sc_rn_p(s2) || sc_dimension(s2)==0
99  || sc_empty_p(s1) || !sc_faisabilite_ofl(s1))
100  {
101  Psysteme sc2 = sc_dup(s2);
102  sc2 = sc_elim_redond(sc2);
103  s = SC_UNDEFINED_P(sc2)? sc_empty(base_dup(sc_base(s2))): sc2;
104  }
105  else
106  {
107  if (SC_RN_P(s1) ||sc_rn_p(s1) || sc_dimension(s1)==0
108  || sc_empty_p(s2) || !sc_faisabilite_ofl(s2))
109  {
110  Psysteme sc1 = sc_dup(s1);
111  sc1 = sc_elim_redond(sc1);
112  s = SC_UNDEFINED_P(sc1)? sc_empty(base_dup(sc_base(s1))): sc1;
113  }
114  else
115  {
116  /* calcul de l'enveloppe convexe */
117  s = sc_convex_hull(s1,s2);
118  /* printf("systeme final \n"); sc_dump(s); */
119  }
120  }
121  if (catch_performed)
123  /* mem_spy_end("sc_enveloppe_chernikova_ofl_ctrl"); */
124  return s;
125 }
#define CATCH(what)
@ overflow_error
@ timeout_error
#define UNCATCH(what)
Psysteme sc_convex_hull(Psysteme sc1, Psysteme sc2)
Definition: chernikova.c:74
#define assert(ex)
Definition: newgen_assert.h:41
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
#define FWD_OFL_CTRL
Pbase base_dup(Pbase b)
Pbase base_dup(Pbase b) Note: this function changes the value of the pointer.
Definition: alloc.c:268

References assert, base_dup(), CATCH, fprintf(), FWD_OFL_CTRL, OFL_CTRL, overflow_error, s1, sc_convex_hull(), sc_dup(), sc_empty(), sc_empty_p(), sc_rn(), sc_rn_p(), timeout_error, and UNCATCH.

Referenced by sc_enveloppe_chernikova().

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

◆ sc_rectangular_hull()

Psysteme sc_rectangular_hull ( Psysteme  sc,
Pbase  pb 
)

take the rectangular bounding box of the systeme sc, by projecting each constraint of the systeme against each of the basis in pb

SG: this is basically a renaming of sc_projection_on_variables ...

Parameters
scc
pbb

Definition at line 456 of file sc_enveloppe.c.

456  {
457  volatile Psysteme rectangular = SC_UNDEFINED;
458  rectangular = sc_projection_on_variables(sc,pb,pb);
460  ;
461  // it does not matter if we fail ...
462  }
463  TRY {
464  sc_nredund(&rectangular);
466  }
467  return rectangular;
468 }
#define TRY

References CATCH, overflow_error, TRY, and UNCATCH.

Referenced by do_array_expansion(), do_solve_hardware_constraints_on_nb_proc(), and rectangularization_region().

+ Here is the caller graph for this function:

◆ transitive_closure_from_two_bases()

static Psysteme transitive_closure_from_two_bases ( Psysteme  s,
Pbase  b1,
Pbase  b2 
)
static

returns constraints from s which may depend on variables in b1 and b2.

these constraints are removed from s, hence s is modified.

Definition at line 292 of file sc_enveloppe.c.

293 {
294  Psysteme st;
296 
297  base_to_set(vars, b1);
298  base_to_set(vars, b2);
299  st = transitive_closure_system(s, vars);
300  linear_hashtable_free(vars);
301 
302  return st;
303 }
linear_hashtable_pt linear_hashtable_make(void)
constructor.
Definition: hashpointer.c:165
void linear_hashtable_free(linear_hashtable_pt h)
destructor
Definition: hashpointer.c:189
static Psysteme transitive_closure_system(Psysteme s, linear_hashtable_pt vars)
transtitive extraction of constraints.
Definition: sc_enveloppe.c:273
static bool base_to_set(linear_hashtable_pt s, Pvecteur b)
put base variables in set.
Definition: sc_enveloppe.c:217
hidden structure to store the hashtable.
Definition: hashpointer.c:66

References b1, b2, base_to_set(), linear_hashtable_free(), linear_hashtable_make(), and transitive_closure_system().

Referenced by sc_cute_convex_hull().

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

◆ transitive_closure_pass()

static bool transitive_closure_pass ( Pcontrainte pc,
Pcontrainte ex,
linear_hashtable_pt  vars 
)
static

one pass only of transitive closure.

returns whether vars was modified. appends extracted constraints to ex.

Definition at line 245 of file sc_enveloppe.c.

247 {
248  Pcontrainte c, cp, cn;
249  bool modified = false;
250 
251  for (c=*pc,
253  cn = c? c->succ: CONTRAINTE_UNDEFINED;
254  c;
255  cp = c==cn? cp: c,
256  c = cn,
257  cn = c? c->succ: CONTRAINTE_UNDEFINED)
258  {
259  if (contains_variables(c->vecteur, vars))
260  {
261  modified |= base_to_set(vars, c->vecteur);
262  c->succ = *ex, *ex = c;
263  if (cp) cp->succ = cn; else *pc = cn;
264  c = cn;
265  }
266  }
267 
268  return modified;
269 }
#define CONTRAINTE_UNDEFINED
static bool contains_variables(Pvecteur v, linear_hashtable_pt vars)
returns whether c contains variables of vars.
Definition: sc_enveloppe.c:232
Pvecteur cp
pointeur sur l'egalite ou l'inegalite courante
Definition: sc_read.c:87
struct Scontrainte * succ

References base_to_set(), contains_variables(), CONTRAINTE_UNDEFINED, cp, Scontrainte::succ, Svecteur::succ, and Scontrainte::vecteur.

Referenced by transitive_closure_system().

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

◆ transitive_closure_system()

static Psysteme transitive_closure_system ( Psysteme  s,
linear_hashtable_pt  vars 
)
static

transtitive extraction of constraints.

Definition at line 273 of file sc_enveloppe.c.

274 {
276  bool modified;
277 
278  do {
279  modified = transitive_closure_pass(&s->egalites, &e, vars);
280  modified |= transitive_closure_pass(&s->inegalites, &i, vars);
281  }
282  while (modified);
283 
284  sc_fix(s);
285  return sc_make(e, i);
286 }
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
static bool transitive_closure_pass(Pcontrainte *pc, Pcontrainte *ex, linear_hashtable_pt vars)
one pass only of transitive closure.
Definition: sc_enveloppe.c:245
Pcontrainte inegalites
Definition: sc-local.h:71
Pcontrainte egalites
Definition: sc-local.h:70

References CONTRAINTE_UNDEFINED, Ssysteme::egalites, Ssysteme::inegalites, sc_fix(), sc_make(), and transitive_closure_pass().

Referenced by transitive_closure_from_two_bases().

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