[PPL-devel] PPL and polyhedra comparisons

Roberto Bagnara bagnara at cs.unipr.it
Fri Aug 15 17:44:59 CEST 2008


Sebastian Pop wrote:
> There were also some missing functions like the comparison function
> between two polyhedra, and then a topological sort based on it:
> http://repo.or.cz/w/cloog-ppl.git?a=commit;h=b2a471f465823452c2c6750c21dc628ea9bf9bd8
> more specifically in domain.c:cloog_domain_polyhedron_compare and
> cloog_domain_sort.  IMHO these are good candidates to extend the
> available functionality of PPL.

Hi again,

we have checked this code and found that it has several memory
leaks you may want to fix.  We also agree that the compare function
would be nice to have in the PPL.  However, can you please specify
exactly the functionality you would like to have?  The comment says:

  /* Compares P1 to P2: returns 0 when the polyhedra don't overlap,
     returns 1 when p1 >= p2, and returns -1 when p1 < p2.  The ">"
     relation is the "contains" relation.  */

What should be returned if P1 and P2 do overlap and neither is
contained into the other?

Concerning the sort function, we are not sure which place it could
have in the PPL.  The Pointset_Powerset domain is a set, so the
ordering is an implementation detail that should not concern
the client application.  Moreover, a reduced Pointset_Powerset
never contains two polyhedra one of which is contained
into the other.
Cheers,

     Roberto

-- 
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it



More information about the PPL-devel mailing list