Overview - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Overview of the ZPolyhedralSets Subpackage

 

Calling Sequence

Description

Examples

References

Compatibility

Calling Sequence

ZPolyhedralSets:-command(arguments)

command(arguments)

Description

• 

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.

Examples

withPolyhedralSets:

withZPolyhedralSets:

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.

varsi,j,k,i1,j1,n

varsi,j,k,i1,j1,n

(1)

ineqsj=j1,k=i1,0i,in,i+1j,jn,1k,ki1,0i1,i1n,i1+1j1,j1n,ii11

ineqsj=j1,k=i1,0i,in,i+1j,jn,1k,ki1,0i1,i1n,i1+1j1,j1n,ii11

(2)

zpZPolyhedralSetineqs,vars

We apply IntegerPointDecomposition and deduce that there are no dependencies.

IntegerPointDecompositionzp

(3)

Example from Section 5.1 of William Pugh's paper on Presburger arithmetic.

ineqsx=i+di,y=j+dj,2i,iN1,2j,jN1,1di+dj,didj1,di+dj1,1didj

ineqsx=i+di,y=j+dj,2i,iN1,2j,jN1,−1di+dj,didj1,di+dj1,−1didj

(4)

varsdi,dj,i,j,x,y,N

varsdi,dj,i,j,x,y,N

(5)

zpZPolyhedralSetineqs,vars

Apply IntegerPointDecomposition and deduce the implied relations.

IntegerPointDecompositionzp

Relations:di=xidj=yjN−3i−2j−2x−1y−1iN−1jN−1xy−3xN0y+j1yN0yj1xy+j−1x+yN−2x+yj−1xyN−2x+y2N−1x+iy+j1x+i+yj1xiy+j1xi+yj1xy+jN0x+yjN0Variables:di,dj,i,j,x,y,NParameters:ParameterConstraints:Lattice:ZSpan−101000−10101000001000001000001000001,,,0000000

(6)

Calculation of cache access from William Pugh's paper on Presburger arithmetic.

ineqsy=j+dj,0i+di116x,i+di116x0,2i,jN1,iN1,2j,1di+dj,di+dj1,1didj,didj1

ineqsy=j+dj,0i16+di16116x,i16+di16x116,2i,jN1,iN1,2j,−1di+dj,di+dj1,−1didj,didj1

(7)

varsdi,dj,i,j,y,x,N

varsdi,dj,i,j,y,x,N

(8)

zpZPolyhedralSetineqs,vars

Apply IntegerPointDecomposition and deduce the cache access patterns.

IntegerPointDecompositionzp

Relations:di=1i+16xdj=yjN−3i−2j−2x0y−1iN−1jN−116xy−216xN−1y+j1yN0yj116xy+j016x+yN−116x+yj016xyN−316x+y2N−2i+16xy+j0i+16x+yj0i16xy+j2i16x+yj216xy+jN−116x+yjN−1Variables:di,dj,i,j,y,x,NParameters:ParameterConstraints:Lattice:ZSpan−1001600−11001000001000001000001000001,,,1000000

(9)

References

  

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.

Compatibility

• 

The PolyhedralSets:-ZPolyhedralSets package was introduced in Maple 2023.

• 

For more information on Maple 2023 changes, see Updates in Maple 2023.

See Also

EnumerateIntegerPoints

IntegerPointDecomposition

IsContained

IsEmpty

IsIntegerPointOf

Lattice

PlotIntegerPoints3d

SamplePoint

ZPolyhedralSet