
Axel Simon wrote:
I don't think I do anything that could invalidate the iterator. Here is the Haskell code (and an explanation between the lines in C):
cs <- PPL.polyhedronMinimizedConstraints p
cs=ppl_Polyhedron_minimized_constraints(p)
[...]
time. I would like to debug it but it is kind of hard since all interesting functions are in-line. It could be something with my binding to Haskell, but I just thought I ask if somebody has experienced the same problem with the C interface before going down that route.
One simple test that you can do is to explicitly call function ppl_Polyhedron_OK() on polyhedron `p' just after retrieving its minimized constraint system. This will check if the (coded) polyhedron invariants are all valid (see documentation). I do not expect this call to fail, but if it does, then it will be an indication that the problem is caused somewhere else before this program point.
Of course, the above test is already done implicitly (and it is thus redundant) if you have configured the PPL with assertions turned on, which I would recommend in such a debugging phase.
Good luck and keep us informed, Enea.