polylib 5.22.8
polyhedron.h
Go to the documentation of this file.
1#ifndef _polyhedron_H_
2#define _polyhedron_H_
3
4/* Make sure the Constraint member is valid */
5#define POL_ENSURE_INEQUALITIES(P) \
6 if (F_ISSET(P, POL_VALID) && !F_ISSET(P, POL_INEQUALITIES)) \
7 Polyhedron_Compute_Dual(P);
8/* Make sure the Ray member is valid */
9#define POL_ENSURE_POINTS(P) \
10 if (F_ISSET(P, POL_VALID) && !F_ISSET(P, POL_POINTS)) \
11 Polyhedron_Compute_Dual(P);
12/* Make sure the Constraint member is valid and non-redundant */
13#define POL_ENSURE_FACETS(P) \
14 if (F_ISSET(P, POL_VALID) && !F_ISSET(P, POL_FACETS)) \
15 Polyhedron_Compute_Dual(P);
16/* Make sure the Ray member is valid and non-redundant */
17#define POL_ENSURE_VERTICES(P) \
18 if (F_ISSET(P, POL_VALID) && !F_ISSET(P, POL_VERTICES)) \
19 Polyhedron_Compute_Dual(P);
20
21#if defined(__cplusplus)
22extern "C" {
23#endif
24
26
28
29extern Polyhedron *AddConstraints(Value *Con, unsigned NbConstraints,
30 Polyhedron *Pol, unsigned NbMaxRays);
31extern Polyhedron *AddPolyToDomain(Polyhedron *Pol, Polyhedron *PolDomain);
32extern Polyhedron *AddRays(Value *Ray2, unsigned NbRay2, Polyhedron *Pol1,
33 unsigned NbMaxRays);
34extern Polyhedron *align_context(Polyhedron *Pol, int align_dimension,
35 int NbMaxRays);
36extern Polyhedron *Constraints2Polyhedron(Matrix *Constraints,
37 unsigned NbMaxRays);
38extern Polyhedron *Disjoint_Domain(Polyhedron *Pol, int flag,
39 unsigned NbMaxRays);
41 unsigned NbMaxRays);
42extern Polyhedron *DomainAddRays(Polyhedron *Pol, Matrix *Ray,
43 unsigned NbMaxConstrs);
44extern Polyhedron *DomainConvex(Polyhedron *Pol, unsigned NbMaxConstrs);
45extern Interval *DomainCost(Polyhedron *Pol, Value *Cost);
47 unsigned NbMaxRays);
48extern Polyhedron *DomainImage(Polyhedron *Pol, Matrix *Func,
49 unsigned NbMaxConstrs);
51 unsigned NbMaxRays);
52extern Polyhedron *DomainPreimage(Polyhedron *Pol, Matrix *Func,
53 unsigned NbMaxRays);
55 unsigned NbMaxRays);
57 unsigned NbMaxRays);
58extern Polyhedron *DomainUnion(Polyhedron *Pol1, Polyhedron *Pol2,
59 unsigned NbMaxRays);
61extern void Domain_Free(Polyhedron *Pol);
62extern void Domain_PrintConstraints(FILE *Dst, const char *Format,
63 Polyhedron *Pol);
64extern Polyhedron *Empty_Polyhedron(unsigned Dimension);
65extern int Gauss(Matrix *Mat, int NbEq, int Dimension);
66extern int lower_upper_bounds(int pos, Polyhedron *P, Value *context,
67 Value *LBp, Value *UBp);
70extern int PolyhedronIncludes(Polyhedron *Pol1, Polyhedron *Pol2);
71extern Polyhedron *Polyhedron_Alloc(unsigned Dimension, unsigned NbConstraints,
72 unsigned NbRays);
74extern void Polyhedron_Free(Polyhedron *Pol);
76 unsigned NbMaxConstrs);
78 unsigned NbMaxRays);
79extern void Polyhedron_Print(FILE *Dst, const char *Format,
80 const Polyhedron *Pol);
81extern void Polyhedron_PrintConstraints(FILE *Dst, const char *Format,
82 Polyhedron *Pol);
84 unsigned MAXRAYS);
85extern void PolyPrint(Polyhedron *Pol);
86extern Polyhedron *Rays2Polyhedron(Matrix *Ray, unsigned NbMaxConstrs);
87extern Polyhedron *SubConstraint(Value *Con, Polyhedron *Pol,
88 unsigned NbMaxRays, int Pass);
89extern Polyhedron *Universe_Polyhedron(unsigned Dimension);
90extern void polylib_close(void);
91
92#if defined(__cplusplus)
93}
94#endif
95
96#endif /* _polyhedron_H_ */
void PolyPrint(Polyhedron *Pol)
Definition: polyhedron.c:1710
int PolyhedronIncludes(Polyhedron *Pol1, Polyhedron *Pol2)
Definition: polyhedron.c:2404
Polyhedron * DomainAddRays(Polyhedron *Pol, Matrix *Ray, unsigned NbMaxConstrs)
Add rays pointed by 'Ray' to each and every polyhedron in the polyhedral domain 'Pol'.
Definition: polyhedron.c:2794
Polyhedron * align_context(Polyhedron *Pol, int align_dimension, int NbMaxRays)
Definition: polyhedron.c:3753
void Domain_PrintConstraints(FILE *Dst, const char *Format, Polyhedron *Pol)
Definition: polyhedron.c:4752
Polyhedron * Polyhedron_Image(Polyhedron *Pol, Matrix *Func, unsigned NbMaxConstrs)
Definition: polyhedron.c:4204
void Polyhedron_PrintConstraints(FILE *Dst, const char *Format, Polyhedron *Pol)
Definition: polyhedron.c:4739
Polyhedron * Stras_DomainSimplify(Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
Definition: polyhedron.c:3459
Polyhedron * DomainAddConstraints(Polyhedron *Pol, Matrix *Mat, unsigned NbMaxRays)
Definition: polyhedron.c:4485
void Polyhedron_Free(Polyhedron *Pol)
Definition: polyhedron.c:1614
void Polyhedron_Compute_Dual(Polyhedron *P)
Definition: polyhedron.c:2206
Polyhedron * DomainConvex(Polyhedron *Pol, unsigned NbMaxConstrs)
Definition: polyhedron.c:3659
Polyhedron * Empty_Polyhedron(unsigned Dimension)
Definition: polyhedron.c:1721
Polyhedron * DomainConstraintSimplify(Polyhedron *P, unsigned MaxRays)
Definition: polyhedron.c:4797
void polylib_close(void)
Free all cache allocated memory: call this function before exiting in a memory checker environment li...
Definition: polyhedron.c:4843
int Gauss(Matrix *Mat, int NbEq, int Dimension)
Definition: polyhedron.c:823
Polyhedron * DomainDifference(Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
Definition: polyhedron.c:3694
Polyhedron * AddPolyToDomain(Polyhedron *Pol, Polyhedron *PolDomain)
Definition: polyhedron.c:2449
Polyhedron * Polyhedron_Preimage(Polyhedron *Pol, Matrix *Func, unsigned NbMaxRays)
Definition: polyhedron.c:4113
Polyhedron * DomainIntersection(Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
Return the intersection of two polyhedral domains 'Pol1' and 'Pol2'.
Definition: polyhedron.c:2637
Interval * DomainCost(Polyhedron *Pol, Value *Cost)
Definition: polyhedron.c:4340
Polyhedron * Polyhedron_Copy(Polyhedron *Pol)
Definition: polyhedron.c:2840
Polyhedron * Domain_Copy(Polyhedron *Pol)
Definition: polyhedron.c:2867
Polyhedron * DomainPreimage(Polyhedron *Pol, Matrix *Func, unsigned NbMaxRays)
Definition: polyhedron.c:4175
Polyhedron * DomainSimplify(Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
Definition: polyhedron.c:3346
Polyhedron * Universe_Polyhedron(unsigned Dimension)
Definition: polyhedron.c:1754
Polyhedron * Rays2Polyhedron(Matrix *Ray, unsigned NbMaxConstrs)
Given a matrix of rays 'Ray', create and return a polyhedron.
Definition: polyhedron.c:2087
Polyhedron * DomainUnion(Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
Definition: polyhedron.c:3585
int lower_upper_bounds(int pos, Polyhedron *P, Value *context, Value *LBp, Value *UBp)
Definition: polyhedron.c:3905
Polyhedron * Polyhedron_Scan(Polyhedron *D, Polyhedron *C, unsigned MAXRAYS)
Definition: polyhedron.c:3838
Matrix * Polyhedron2Constraints(Polyhedron *Pol)
Definition: polyhedron.c:2060
Polyhedron * DomainImage(Polyhedron *Pol, Matrix *Func, unsigned NbMaxConstrs)
Definition: polyhedron.c:4303
Polyhedron * Disjoint_Domain(Polyhedron *Pol, int flag, unsigned NbMaxRays)
Definition: polyhedron.c:4540
Polyhedron * Polyhedron_Alloc(unsigned Dimension, unsigned NbConstraints, unsigned NbRays)
Definition: polyhedron.c:1566
Polyhedron * Constraints2Polyhedron(Matrix *Constraints, unsigned NbMaxRays)
Given a matrix of constraints ('Constraints'), construct and return a polyhedron.
Definition: polyhedron.c:1905
Polyhedron * AddConstraints(Value *Con, unsigned NbConstraints, Polyhedron *Pol, unsigned NbMaxRays)
Definition: polyhedron.c:2303
void Polyhedron_Print(FILE *Dst, const char *Format, const Polyhedron *Pol)
Definition: polyhedron.c:1639
void Domain_Free(Polyhedron *Pol)
Definition: polyhedron.c:1626
Polyhedron * AddRays(Value *Ray2, unsigned NbRay2, Polyhedron *Pol1, unsigned NbMaxRays)
Add 'NbAddedRays' rays to polyhedron 'Pol'.
Definition: polyhedron.c:2696
Polyhedron * SubConstraint(Value *Con, Polyhedron *Pol, unsigned NbMaxRays, int Pass)
Definition: polyhedron.c:2529
Matrix * Polyhedron2Rays(Polyhedron *Pol)
Given a polyhedron 'Pol', return a matrix of rays.
Definition: polyhedron.c:2672
Definition: types.h:75
#define MAXRAYS
Definition: verif_ehrhart.c:20