[PPL-devel] Re: How tu use purify with PPL?

Roberto Bagnara bagnara at cs.unipr.it
Thu Feb 14 14:36:39 CET 2002


David Merchat wrote:
> I work with PPL.0.2
> [...]
> I also made some tests with PPL a observed some strange behaviours:
> - satisfies with a polyhedron given by vertex allways abord
> Exemple :
>     GenSys gs;
>     gs.insert(vertex(1*A + 1*B));
>     Polyhedron test(gs);
>     ConSys lin;
>     lin.insert(A >= 0);
>     GenSys_Con_Rel rel = test.satisfies(lin[0]);
> Execution
>     Abort
> 
> - calling affine_image can produce a polyhedron which violates
> invariants of PPL
> Exemple
>     ostream& sortie = cout;
>     Polyhedron test(3);
>     test.insert(C == -2);
>     test.insert(A == 0);
>     LinExpression lin = LinExpression(Integer(2));
>     lin = lin + (Integer(1)*Variable(0));
>     lin = lin + (Integer(0)*Variable(1));
>     lin = lin + (Integer(0)*Variable(2));
>     lin = lin + (Integer(0)*Variable(2));
>     test.affine_image(Variable(1), lin, 1);
>     if(!test.OK()) sortie << "???" << endl;
> Execution
> Poly space_dim 3
> -ZE -EM  -CM -GM  +CS -GS  -SC -SG
> con_sys (up-to-date)
> 3 x 4 (not_sorted)
> 1 0 0 0   >=
> 2 0 0 1   =
> 0 1 0 0   =
> 
> gen_sys (not_up-to-date)
> 0 x 0 (not_sorted)
> 
> sat_c
> 0 x 0
> 
> sat_g
> 0 x 0
> 
> Lin expr 2 1 0 0
> Generators must have at least one nonzero homogeneous coefficient!
> Here is the guilty polyhedron:
> space_dim 3
> -ZE -EM  -CM -GM  -CS +GS  -SC -SG
> con_sys (not_up-to-date)
> 3 x 4 (sorted)
> 2 0 0 1   =
> 0 1 0 0   =
> 1 0 0 0   >=
> 
> gen_sys (up-to-date)
> 2 x 4 (not_sorted)
> 0 0 0 0   L
> 1 0 2 -2   V
> 
> sat_c
> 0 x 0
> 
> sat_g
> 3 x 2
> 0 0
> 0 0
> 0 1
> 
> ???
> 
> Is there any others known strange behaviours?

Dear David,

the strange behaviors you have identified are indeed bugs and the test
programs you included allowed us to find them quickly (they are
already solved in the CVS repository).  The library is still young and
your programs exercised two methods that received little testing so far.

Even though we plan to release PPL version 0.3 in the near future, we
are still not ready for that.  The most convenient way to solve the
problems you encountered would be to use a PPL snapshot: we have just
uploaded snapshot 0.3pre4 to our FTP/HTTP site (get it either from
ftp://ftp.cs.unipr.it/pub/ppl/snapshots/ or
http://www.cs.unipr.it/ppl/Download/ftp/snapshots/).

In this way you would get a version with several other problems
solved.  There is a drawback though: you would need to upgrade your
GMP installation to version 4.0.1 (get it from http://swox.com/gmp/),
something that all the PPL 0.3 users will have to do anyway (this
brings you other advantages but may be a nuisance).

If you don't want to upgrade to GMP 4.0.1 what you could do is to
patch your PPL 0.2 sources: you will find the relevant patches in

  http://www.cs.unipr.it/pipermail/ppl-devel/2002-February/001031.html

You may also want to apply the following patch, correcting a bug in
the method Polyhedron::remove_higher_dimensions(size_t)

  http://www.cs.unipr.it/pipermail/ppl-devel/2002-January/001003.html

> I interfaced PPL with one of my programms and i tryed to complie with
> "purify" (my programm isn't finished and i have some problems of memory
> management). But it's seem that i can't compile PPL with "purify".
> So my question is how comple PPL.0.2 with "purify" (if it's possible).

Can you be more specific about the problems you are encountering?  We
do not have a license for Purify so we do not really know what to say.
You could send us the compiler messages so that we can narrow
the search down.

> Thanks for your answer and for PPL

Glad to be useful.
Please do not hesitate to contact us for reporting bugs, making
suggestions and sharing your experiences with the library.
All the best

   the PPL development team

-- 
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