Overview of the ZPolyhedralSets Subpackage
The ZPolyhedralSets subpackage of the PolyhedralSets package is a collection of commands for computing with Z-polyhedral sets.
A Z-polyhedral set is the intersection of a polyhedral set with an integer lattice. (A Z-polytope is the intersection of a polytope with an integer lattice; a polytope is a bounded polyhedral set.)
The functionalities of this package offer tools to construct, visualize and study Z-polyhedral sets.
The commands Lattice and ZPolyhedralSet build integer lattices and Z-polyhedral sets.
The command IsContained is an inclusion-test for sets of Z-polyhedral sets.
The command IsEmpty checks whether a Z-Polyhedral set is empty.
The command IsIntegerPointOf checks whether a given integer point belongs to a given a Z-Polyhedral set.
The command SamplePoint returns one point of a non-empty Z-Polyhedral set.
The command EnumerateIntegerPoints enumerates the points of a bounded Z-Polyhedral set.
The command PlotIntegerPoints3d plots the points of a bounded three-dimensional Z-Polyhedral set.
The command IntegerPointDecomposition is at the core of this package: it decomposes a given Z-polyhedral set into Z-polyhedral sets with additional properties (such as consistency and good specialization).
The examples below are advanced problems taken from the literature (see the fourth reference below). They illustrate the kind of applications that this package can support.
Dependence analysis in Cholesky's LU algorithm from William Pugh's paper on Presburger arithmetic. We consider below one of the three cases that the Author distinguishes. The other two cases are treated similarly.
vars ≔ i,j,k,i1,j1,n
ineqs ≔ j=j1,k=i1,0≤i,i≤n,i+1≤j,j≤n,1≤k,k≤i−1,0≤i1,i1≤n,i1+1≤j1,j1≤n,i≤i1−1
zp ≔ ZPolyhedralSet⁡ineqs,vars
We apply IntegerPointDecomposition and deduce that there are no dependencies.
Example from Section 5.1 of William Pugh's paper on Presburger arithmetic.
ineqs ≔ x=i+di,y=j+dj,2≤i,i≤N−1,2≤j,j≤N−1,−1≤di+dj,di−dj≤1,di+dj≤1,−1≤di−dj
vars ≔ di,dj,i,j,x,y,N
Apply IntegerPointDecomposition and deduce the implied relations.
Calculation of cache access from William Pugh's paper on Presburger arithmetic.
ineqs ≔ y=j+dj,0≤i+di−116−x,i+di−116−x≤0,2≤i,j≤N−1,i≤N−1,2≤j,−1≤di+dj,di+dj≤1,−1≤di−dj,di−dj≤1
vars ≔ di,dj,i,j,y,x,N
Apply IntegerPointDecomposition and deduce the cache access patterns.
Rui-Juan Jing and Marc Moreno Maza. "Computing the Integer Points of a Polyhedron, I: Algorithm." Proceedings of CASC 2017: 225-241, Springer.
Rui-Juan Jing and Marc Moreno Maza. "Computing the Integer Points of a Polyhedron, II: Complexity Estimates." Proceedings of CASC 2017: 242-256, Springer.
Rachid Seghir, Vincent Loechner, and Benoı̂t Meister. "Integer affine transformations of parametric Z-polytopes and applications to loop nest optimization." Proceedings of TACO, Vol. 9(2):8:1–8:27, 2012.
William Pugh. "The omega test: a fast and practical integer programming algorithm for dependence analysis." Proceedings Supercomputing ’91, pp 4–13. ACM, 1991.
William Pugh. "Counting solutions to presburger formulas: How and why." Proceedings of PLDI, pp 121–134. ACM, 1994.
The PolyhedralSets:-ZPolyhedralSets package was introduced in Maple 2023.
For more information on Maple 2023 changes, see Updates in Maple 2023.
Download Help Document