[PPL-devel] ocaml interface issues

Enea Zaffanella zaffanella at cs.unipr.it
Sat Feb 5 21:23:41 CET 2011


Il 05/02/2011 00:50, piotrm ha scritto:
> Hellos, "Out_of_memory" exceptions are thrown using the ocaml interface
> when doing very very simple tasks, like below. I have yet to find an
> example on the use of linear_partition using the ocaml interface so I
> hope I'm not embarrassing myself by using it incorrectly. Also, the
> ppl_Polyhedron_OK returns false right before get_minimized_constraints
> (or most other polyhedron functions) result in the exception.
> 
> The same task is performed just fine using the C++ interface. Any info
> regarding this issue would be greatly appreciated.

Function ppl_Pointset_Powerset_NNC_Polyhedron_get_disjunct should be
working as expected now. Can you please retry and tell us how it goes?

Thanks again,
Enea.

PS: a warning on the use of powerset's disjuncts.
The elements (in this case, NNC polyhedra) retrieved from a powerset
using function ppl_Pointset_Powerset_*_get_disjunct are meant to be
*read-only* (because their resources are still owned by the powerset).
It is perfectly fine to query them so as, e.g., to obtain their
(minimized) constraints/generators, but other operations that may
actually change the disjuncts should be avoided.
If needed, you can take a copy of the disjunct and modify the copy.
If you need to modify the disjunct itself (i.e., the very same element
*in* the powerset), then you should first remove it from the powerset
(using ppl_Pointset_Powerset_NNC_Polyhedron_drop_disjunct) and then add
back the modified version (using
ppl_Pointset_Powerset_NNC_Polyhedron_add_disjunct).




More information about the PPL-devel mailing list