The new polylib library combines both the Strasbourg version and IRISA version
and includes option to support 32 bit or 64 bit or GNU muti-precision integers. It also includes the recent (April 2001) changes suggested by Doran Wilde and the changes made by Vincent Loechner in polylib4.20. A new feature: computati- ons on Z-polyhedron has been added into the new polylib version. The new version has following changes compared to the polylib version at Strassbourg:- ******************************************************************************* Directory: ./include/polylib (1) Arithmetique.h * Included "GMP" value-type. eg: #else /* If defined(GNUMP) */ #define LINEAR_VALUE_GMP "gmp" typedef mpz_t Value; * Added macros corresponding to "GMP" value-type :- eg:- ! Basic Macros :- value_init(val), etc.. ! Boolean operators on 'Value' :- value_eq(v1,v2), etc... ! Trian operators on 'Value' :- value_sign(val),etc.. ! Binary operations on 'Value' :- value_addto(ref,val) ! Conditional operations on 'Value' :- value_pos_p(val), etc... * A few macros are not defined for "GMP" value-types compared to other defined value-types, as there is no way to do so in "GMP". eg:- (i) VALUE_CONST, VALUE_NAN, VALUE_MAX, VALUE_MIN, etc... (ii) ! Cast to value macros :- int_to_value(i), etc.... (iii)! Binary operators on 'Value' :- value_plus(v1,v2), etc.. (iV) ! Unary operators on 'Value' :- value_not(val), etc... * A few macros not defined for "GMP" value-types compared to other defined value-types, as they seemed redundant in "GMP". eg:- (i) value_direct_product(ref,val) /* No overflow check reqd. */ (ii) ! Various macros for protected multiplication :- value_protected_multiply(v,w) * A new set of macro defintions included in every value-type to handle initialization and clear operations in "GMP". eg:- value_init(val), value_assign(v1,v2),value_clear(val), etc .. * A few macro definitions changed. eg:- value_addto(ref,val) -> value_addto(ref,val1,val2) value_increment(ref) -> value_increment(ref,val). etc... * A few function prototype definitions removed as they were redundant. eg:- extern Value abs_ofl_ctrl(...): abs.c extern Value divide_fast(....): divide.c extern Value pgcd_slow(......): pgcd.c * Comments added and modified wherever seemed appropriate. (2) arithmetic_errors.h * added a test on the cygwin flag for CATCH and THROW macros (3) eval_ehrhart.h * Changes in function prototype definitions to match with the changes made in the file 'eval_ehrhart.c'. (4) matrix.h * Changes in function prototype definitions to match with the changes made in the file 'matrix.c'. (5) polyhedron.h * Added Statement : extern Polyhedron *Stras_DomainSimplify(Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays); * Changes in function prototype definitions to match with the changes made in the file 'polyhedron.c'. (6) polylib.h * Added statement: && !defined(GNUMP) * Removed few statements. eg:- #include <polylib/types_mp.h> #include <polylib/matrix_mp.h> #include <polylib/ehrhart_mp.h> (7) polyparam.h * Changes in function prototype definitions to match with the changes made in the file 'polyparam.c'. (8) types.h * Added macro: #ifdef DGNUMP #include <gmp.h> #endif $define MAXNOOFRAYS 200 * Added statement: #else /* Default : GNUMP */ #define P_VALUE_FMT "%4s" #endif * Added Data-structures to represent Z-Polyhedron eg: Lattice, LatticeUnion, ZPolyhedron * Deleted a few redundant macros: eg: (1) Vector_Copy (2) Vector_Init (3) Vector_Exchange * Deleted file "types_mp.h", as it is not required now. * Comments added and modified wherever seemed appropriate. (9) vector.h * Changes in function prototype definitions to match with the changes made in the file 'vector.c'. (10) Addition of new header files eg: Solvedio.h, Lattice.h, Matop.h, NormalForms.h and Zpolyhedron.h (11) Makefile * Changes in Makefile to match with the changes made in the library. ******************************************************************************* Directory: ./ArithLib (1) arithmetic_errors.h (copied from ./include/polylib/arithmetic_errors.h) (2) arithmetique.h (copied from ./include/polylib/arithmetique.h) (3) Deleted redundant files "arithmetique-local.h", "abs.c", "divide.c", "doc.h", "exp.c", "io.c", "linear.h" "modulo.c", "pgcd.c", "pgcm.c". ******************************************************************************* Directory: ./source (1) count.c * Changes in local variable names in function declarations eg: (1) main : Value k -> int k str (added) (2) ehrhart.c * Programming code changed from K&R C to ANSI C. * Changes in parameter names or return type in function declarations eg: (1) Scan_Vertices : returned type changed to (Value*) from Value * Changes in local variable names in function declarations eg: (1) cherche_min : j (added) (2) Polyhedron_Preprocess : tmp, size_copy (added) (3) Polyhedron_Preprocess2 : tmp1, tmp2 (added) (4) old_Polyhedron_Preprocess : temp (deleted) abs_a, abs_b, size_copy (added) (5) count_points : result (added) (5) P_Enum : temp (deleted) tmp, lcm_copy (added) (6) Enumerate_NoParametres : j, tmp (added) (7) Polyhedron_Enumerate : i (added) (8) main : i,str (added) * Comments added wherever seemed appropriate. * Changes in almost all the functions in order to make it generic and allow handling of all the 'Value' types including GMP. * Deleted file "ehrhart_mp.c" as it is not required now. (3) eval_ehrhart.c * Changes in parameter names or return type in function declarations eg: (1) compute_poly : return type changed to (Value *) from Value * Changes in local variable names in function declarations eg: (1) in_domain : tmp (added) (2) compute_poly : tmp (added) * Changes in almost all the functions in order to make it generic and allow handling of all the 'Value' types including GMP. (4) example.c : * Added file "example.c" in ./source directory. * A few macro definitions removed: eg: #include "types.h" #include "ztypes.h" #include "vector.h", etc.... * A few macro definitions added: eg: #include "polylib/polylib.h" (5) Lattice.c * Added file "Lattice.c" in ./source directory. * Removed macro header definitions eg: #include "types.h" #include "ztypes.h" etc.. * Added macro header definitions eg: #include <polylib/polylib.h> * Changes in parameter names or return type in function declarations eg: * Changes in local variable names in function declarations eg: (1) AffineSmith : sum, quo, rem (added) (2) LatticeDifference : int k -> Value k (3) AddLattice : tmp (added) (4) FindHermiteBasisofDomain : fact(added) int lcm -> Value lcm (5) LatticePreimage : tmp (added) int divisor -> Value divisor (6) Simplify : aux,k,fac, num, tmp, foobar (added) int cnt -> Value cnt (7) AffinePartSimplify : aux (added) * Comments added wherever seemed appropriate. * Changes in almost all the functions in order to make it generic and allow handling of all the 'Value' types including GMP. (6) Matop.c * Added file "Matop.c" in ./source directory. * Removed macro header definitions eg: #include "types.h" #include "ztypes.h" etc.. * Added macro header definitions eg: #include <polylib/polylib.h> * Changes in parameter names or return type in function declarations eg: (1) Lcm : return type changed to (Value *) from (int) int i -> Value i int j -> Value j * Changes in local variable names in function declarations eg: (1) Lcm : tmp, aux (added) (2) ExchangeRows : int *temp -> Value *temp (3) ExchangeColumns : int *temp -> Value *temp; (4) isIntegral : int divisor -> Value divisor tmp (added) (5) isinHnf : int rem -> Value rem (6) PutRowLast : int *vector -> Value *vector (7) PutRowFirst : int *vector -> Value *vector (8) PutColumnFirst : int *vector -> Value *vector (9) PutColumnLast : int *vector -> Value *vector * Comments added wherever seemed appropriate. * Changes in almost all the functions in order to make it generic and allow handling of all the 'Value' types including GMP. (7) matrix.c * Programming code changed from K&R C to ANSI C. * A few functions added: eg: int Matrix_Inverse(Matrix *Mat, Matrix *MatInv) * Changes in parameter names or return type in function declarations eg: (1) MatInverse : M -> Mat MInv -> MatInv (2) Matrix_Vector_Product : mat -> Mat (3) Vector_Matrix_Product : mat -> Mat (4) Matrix_Product : mat1 -> Mat1 mat2 -> Mat2 mat3 -> Mat3 * Changes in local variable names in function declarations eg: (1) Matrix_Alloc : j (added) (2) Matrix_Free : (i,j,p) (added) (3) Matrix_Read_Input : str (added) (4) hermite : aux (added) tmp -> temp1 tmp2 -> temp2 (5) MatInverse : g -> gcd p -> i li -> j, tmp (deleted) (6) rat_prodmat : denom -> last column_index dcom -> lcm old_dc -> old_lcm g -> gcd d -> last_column_entry s -> s1, s2(added), tmp (deleted) (7) Matrix_Vector_Product : s (added) (8) Vector_Matrix_Product : s (added) (9) Matrix_Product : s (added) * Error correction in code eg: (1) rat_prodmat : if (value_zero_p(dcom)) -> if (value_one_p(dcom)) * Deleted file "matrix_mp.c", as it is not required now. * Comments added wherever seemed appropriate. * Changes in almost all the functions in order to make it generic and allow handling of all the 'Value' types including GMP. (8) NormalForms.c * Added file "NormalForms.c" in ./source directory. * Programming code changed from K&R C to ANSI C. * Removed macro header definitions eg: #include "types.h" #include "ztypes.h" etc.. * Added macro header definitions eg: #include <polylib/polylib.h> * Removed function: static int abs(int x) * Changes in parameter names or return type in function declarations eg: (1) moins_l : int *a -> Value *a (2) moins_c : int *a -> Value *a (3) echange_l : int *a -> Value *a (4) echange_c : int *a -> Value *a (5) ligne : int *a -> Value *a int x -> Value x (6) colonne : int *a -> Value *a int x -> Value x (7) petit_l : int *a -> Value *a (8) petit_c : int *a -> Value *a (9) identite : int *a -> Value *a (10) transpose: int *a -> Value *a (11) encore : int *a -> Value *a int val -> Value val (12) smith : int *a -> Value *a int *b -> Value *b int *c -> Value *c int *b_inverse -> Value *b_inverse int *c_inverse -> Value *c_inverse (13) hermite : int *a, -> Value *a int *b -> Value *b int *d -> Value *d (14) ConvertpolMattoDarMat : return type changed to (Value *) from (int *) (15) ConvertDarMattoPolMat : int *A -> Value *A * Changes in local variable names in function declarations eg: (1) moins_l : int *c -> Value *c (2) moins_c : int *c -> Value *c (3) echange_l : int s -> Value s int *c1, *c2 -> Value *c1, *c2 (4) echange_c : int s -> Value s int *c1, *c2 -> Value *c1, *c2 (5) ligne : int *c1, *c2 :-> Value *c1, *c2 tmp (added) (6) colonne : int *c1, *c2 -> Value *c1, *c2 tmp (added) (7) petit_l : int *c -> Value *c int minus, comp -> Value minus, comp (8) petit_c : int *c -> Value *c int minus, comp -> Value minus, comp (9) identite : int *b -> Value *b (10) transpose : int *b, *c -> Value *b, *c int val -> Value val (11) encore : int *c -> Value *c int comp -> Vale comp tmp (added) (12) smith : int *f -> Value *f int x, pivot -> Value x, pivot tmp, x_inv (added) (13) hermite : int *c1 -> Value *c1 int x, pivot -> Value x, pivot tmp, x_inv (added) (14) ConvertPolMattoDarMat : int *result -> Value *result (15) Smith : int *a, *u, *v, *u_inv, *v_inv -> Value *a, *u, *v, *u_inv, *v_inv i (added) (16) Hermite : int *darte_matA -> Value *darte_matA int *darte_identite -> Value *darte_identite int *darte_id_inv -> Value *darte_id_inv i (added) * Comments added wherever seemed appropriate. * Changes in almost all the functions in order to make it generic and allow handling of all the 'Value' types including GMP. (9) polyhedron.c * Programming code changed from K&R C to ANSI C. * A few function declarations removed. eg: VVPd,IVPd,MPd (functions) * A few function names changed. eg: SMPd -> SMPrint SatVector_Or -> SatVector_OR PPd -> PolyPrint * A few functions added eg: (1) Stras_DomainSimplify(Pol1, Pol2, NbMaxRays) (2) SimplifyEqualities(Pol1, Pol2, Filter) * Changes in Macro definition eg: bexchange(a,b,t,l) -> bexchange(a,b,l) * Changes in parameter names in function declarations eg: (1) Combine : temp (deleted) (2) RaySort : Temp1 (deleted), Temp2 (deleted) (3) Gauss : temp (deleted) (4) Rays2Polyhedron : NbMaxRays -> NbMaxConstrs (5) BuildSat : NbCon -> NbConstraints (6) AddConstraints : Con2 -> Con NbCon2 -> NbConstraints Pol1 -> Pol (7) AddPolyToDomain : p3 -> Pol p3beg -> PolDomain (8) SubConstraint : Con2 -> Con Pol1 -> Pol (9) AddRays : Ray2 ->AddedRays NbRay2 -> NbAddedRays Pol1 -> Pol NbMaxRays -> NbMaxConstrs (10) DomainAddRays : Pol1 -> Pol Mat2 -> Ray NbMaxRays -> NbMaxConstrs (11) DomainConvex : Pol1 -> Pol NbMaxRays -> NbMaxConstrs (12) align_context : D -> Pol n -> align_dimension MAXRAYS -> NbMaxRays (13) Polyhedron_Scan : MAXRAYS -> NbMaxRays (14) Polyhedron_Preimage : Pol1 -> Pol (15) DomainPreimage : Pol1 -> Pol (16) Polyhedron_Image : Pol1 -> Pol NbMaxrays -> NbMaxConstrs (17) DomainImage : Pol1 -> Pol NbMaxRays -> NbMaxConstrs (18) DomainCost : Pol1 -> Pol (19) DomainAddConstraints : Pol1 -> Pol Mat2 -> Mat * Changes in local variable names in function declarations eg: (1) Combine : a -> gcd abs_a1,abs_a2,neg_a1 (added) (2) TransformSat : nc2 -> sat_nbcolumns Sat2 -> result (3) Chernikova : nc -> sat_nbcolumns Temp1 (deleted) Temp2 -> Temp (4) Gauss : col_of_rank -> column_index tmp (added) RowSize (deleted) (5) Remove_Redundants : nc -> sat_nbcolumns Dim -> Dim_RaySpace tmp1,tmp2,tmp3 (added) (6) Polyhedron_Alloc : j (added) (7) Polyhedron_Free : size,p,NbRows,NbColumns (added) (8) Domain_Free : size,p,NbRows,NbColumns (added) (9) Constraints2Polyhedron : nc -> nbcolumns (10) Rays2Polyhedron: Sat -> SatTranspose Sat2 -> Sat nc -> nbcolumns (11) BuildSat : nc -> nbcolumns tmp (added) (12) AddConstraints : Pol -> NewPol NbCon1, NbEle1 (deleted) (13) PolyhedronIncludes : tmp (added) (14) AddPolyToDomain : p3end -> p_domain_end (15) SubConstraint : Pol -> NewPol NbCon1 -> NbCon NbCon (deleted) (16) AddRays : Pol -> NewPol Sat -> SatTranspose Sat2 -> Sat NbRay1 -> NbRay NbRay (deleted) (17) FindSimple : tmp (added) (18) SimplifyConstraints : notvid ->notempty (19) SimplifyEqualities : temp (deleted) (20) DomainSimplify : nc -> nbentries NbCon2 -> NbCon vid -> empty RowSize (deleted) (21) DomainConvex : Pol -> NewPol PolNew -> q (22) align_context : p1 -> q M -> Mat (23) Polyhedron_Scan : dim2 (deleted) numP (deleted) M -> Mat (24) lower_upper_bounds : tmp (added) (25) Polyhedron_Preimage : Pol2 -> NewPol tmp (added) (26) DomainPreimage : p1 -> q (27) Polyhedron_Image : Pol2 -> NewPol tmp (added) (28) DomainImage : p1 -> q (29) DomainCost : tmp1,tmp2,tmp3 (added) * Error correction in code eg: (1) Gauss: column_index = (int *)malloc(Dimension*sizeof(Value)) -> column_index = (int *)malloc(Dimension*sizeof(int)) (2) DomainAddRays: if (PolyhedronIncludes(p2,p1)) -> if (PolyhedronIncludes(p2,p3)) (3) DomainAddConstraints: if (PolyhedronIncludes(p2,p1)) -> if (PolyhedronIncludes(p2,p3)) * Comments added wherever seemed appropriate. * Changes in almost all the functions in order to make it generic and allow handling of all the 'Value' types including GMP. (10) polyparam.c :-> * Programming code changed from K&R C to ANSI C. * A few macro definitions removed. eg: Vector_Init (deleted) * A few function declarations removed. eg: TestRank_mp * Changes in parametres names in function declarations eg: (1) TestRank : M -> Mat gcd,tmp (added) (2) SMaAlloc : m -> matrix (3) Poly2Sat : P -> Pol (4) GenParamPolyhedron : poly -> Pol (5) Param_Domain_Free : PP -> PD * Changes in local variable names in function declarations eg: (1) TestRank : gcd (added) (2) Poly2Sat : Tmp -> Temp tmp (added) (3) Elim_Columns : tmp1, tmp2 (added) (4) Polyhedron2Param_Vertices : res -> result (5) Param_Vertices_Free : n -> next_pv (6) Print_Vertex : t (deleted), tmp (added) g -> gcd (7) Param_Vertices_Print : a -> poly (8) Polyhedron2Param_Domain : res -> result (9) Polyhedron2Param_SimplifiedDomain : res ->result (10) Param_Domain_Free : n -> next_pd * Error correction in code: eg: (1) PDomainIntersection : Uncommented statement - Polyhedron_Free(p3); * Comments added wherever seemed appropriate. * Changes in almost all the functions in order to make it generic and allow handling of all the 'Value' types including GMP. (11) polytest.c * Programming code changed from K&R C to ANSI C. * Changes in Macro definition eg: bexchange(a,b,t,l) (deleted) * Changes in parameter names or return type in function declarations eg: (1) exist_points : P -> Pol (2) PolyhedronLTQ : P1 -> Pol1 P2 -> Pol2 MAXRAYS -> NbMaxConstrs (3) GaussSimplify : M -> Mat1 M2 -> Mat2 * Changes in local variable names or types in function declarations eg: (1) exist_points : tmp (added) (2) Polyhedron_Not_Empty : i (added) (3) PolyhedronLTQ : M -> Mat (4) GaussSimplify : col_of_rank :-> column_index tmp (added) temp,RowSize (deleted) * Error correction in code: eg: (1) GaussSimplify : if(value_gt(gcd,int_to_value(2))) -> if(value_ge(...)) * Comments added wherever seemed appropriate. * Changes in almost all the functions in order to make it generic and allow handling of all the 'Value' types including GMP. (12) SolveDio.c * Added file "SolveDio.c" in ./source directory. * Removed macro header definitions eg: #include "types.h" #include "ztypes.h" etc.. * Added macro header definitions eg: #include <polylib/polylib.h> * Changes in local variable names or types in function declarations eg: (1) SolveDiophantine : int *C -> Value *C int *T -> Value *T int sum -> Value sum k1, k2, tmp (added) * Comments added wherever seemed appropriate. * Changes in almost all the functions in order to make it generic and allow handling of all the 'Value' types including GMP. (13) vector.c * Programming code changed from K&R C to ANSI C. * Functions added eg: void Vector_Copy(Value *,Value *,unsigned) void Vector_Exchange(Value *,Value *,unsigned) * Changes in parameter names or return type in function declarations eg: (1) Factorial : return type changed to (Value *) from (Value) (2) Binomial : return type changed to (Value *) from (Value) (3) CNP : return type changed to (Value *) from (Value) (4) GCD : return type changed to (Value *) from (Value) (5) Vector_Free : vec -> vector (6) Vector_Print : vec -> vector (7) Vector_Set : Value n -> int n (8) Inner_Product : return type changed to (Value *) from (Value) (9) Vector_Max : return type changed to (Value *) from (Value) (10) Vector_Min : return type changed to (Value *) from (Value) (11) Vector_Min_Not_Zero : return type changed to (Value *) from (Value) (12) Vector_Gcd : return type changed to (Value *) from (Value) q (deleted) (13) Vector_Map : Value (*f)() -> Value *(*f)() (14) Vector_Normalize : q (deleted) (15) Vector_Normalize_Positive : tmp (deleted) (16) Vector_Reduce : return type changed to (Value *) from (Value) Value (*f)() -> Value *(*f)() (17) Vector_Sort : Vecv -> vector * Changes in local variable names or types in function declarations eg: (1) Factorial : Value fact -> Value *fact tmp (added) (2) Binomial : Value prod -> Value *result f (deleted), tmp (added) (3) CNP : Value c -> Value *result tmp (added) (4) GCD : Value aux -> Value *result acopy,bcopy (added) (5) Vector_Alloc : vec -> vector i (added) (6) Vector_Free : i (added) (7) Vector_Read : vec -> vector str (added) (8) Inner_Product : Value ip -> Value *ip tmp (added) (9) Vector_Max : Value max -> Value *max (10) Vector_Min : Value min -> Value *min (11) Vector_Min_Not_Zero : Value min -> Value *min j (added) (12) Vector_Gcd : Value min -> Value *min q (added) (13) Vector_Normalize : Value gcd -> Value *gcd tmp (added) (14) Vector_Normalize_positive : Value g -> Value *gcd (15) Vector_Reduce : Value r -> Value *r * Comments added wherever seemed appropriate. * Changes in almost all the functions in order to make it generic and allow handling of all the 'Value' types including GMP. (14) verif_ehrhart.c * Changes in local variable names or types in function declarations eg: (1) check_poly : Value k -> int k tmp (added) (2) main : tmp (added) * Changes in almost all the functions in order to make it generic and allow handling of all the 'Value' types including GMP. (15) Zpolyhedron.c -> * Added file "Zpolyhderon.c" in ./source directory. * A few macro definitions removed: eg: #include "types.h" #include "ztypes.h" #include "vector.h", etc.... * A few macro definitions added: eg: #include "polylib/polylib.h" * Changes in local variable names or types in function declarations eg: (1) CanonicalForm : tmp (added) * Comments added wherever seemed appropriate. * Changes in almost all the functions in order to make it generic and allow handling of all the 'Value' types including GMP. (16) Zpolytest.c * Added file "Zpolytest.c" in ./source directory. * A few macro definitions removed: eg: #include "types.h" #include "ztypes.h" #include "vector.h", etc.... * A few macro definitions added: eg: #include "polylib/polylib.h" ******************************************************************************* |