[PPL-devel] Equivalent dimensions
Mario Mendez
mario at cs.unm.edu
Fri Jul 22 00:22:01 CEST 2005
Thank you! Another question then:
How can I insert dimensions in the middle?
E.G: convert
[B=2,E=8] Dim= N
in [B=2,G=8] Dim = N + 2
after inserting two "universe" dimensions between the original B and E.
I already know how to add at the beginning/end, but no idea about how to
use the library for this particular purpose.
Thanks again
PS: I'm working in a abstract domain based on your library for finding
linear invariants....
P M Hill wrote:
> On Wed, 20 Jul 2005, Mario Mendez wrote:
>
>> Hi again,
>>
>> I wonder if there is any way (by using the API) to discover which
>> dimensions are equal. Right now, I inspect the constraint system
>> looking for 1*X + -1 *Y = 0, but that 'ad-hoc' solution simply does
>> not look right. Can you help me? Thanks!
>
>
> Hi,
>
> Inspecting the constraints is definitely not the right way to check if
> X=Y. There is no guarantee as to the exact form of a constraint system
> for the polyhedron returned to the user. So the constraint X = Y may be
> implied by the other constraints but not explicitly in the constraint
> system.
>
> (Assuming Prolog, but the solution I think would be similar for the C or
> C++ API)
>
> To see if the constraint X = Y is satisfied by all the points in a
> polyhedron, there is the predicate
> ppl_Polyhedron_relation_with_constraint/3
>
> If Poly is your polyhedron and X, Y your dimensions, the query
> ppl_Polyhedron_relation_with_constraint(Poly, X = Y, R).
> will unify R with a list of relations one of which will be "included_in"
> if and only if the constraint X = Y is satisfied by all the points in Poly.
>
> With regards to your stated problem of finding _which_ dimensions are
> equal, I do not know of any way other than by checking all the pairs of
> dimensions X and Y and checking if X = Y holds using a method such as
> that given above.
>
> Can you say what it is about your application that led to such a query?
>
> Best wishes,
> Pat
More information about the PPL-devel
mailing list