
Dear all, I am currently using the PPL (version 0.7) with SICStus. Everything was fine until I met important efficiency issues...
The problem is (or might be) that I want my program to be backtrackable. I mean, if I add a constraint to a polyhedra, I want this constraint to be removed when Prolog backtracks before the addition. As far as I know, it is not possible to do so if I directly use the handlers. To adress that I represent a polyhedron by an attributed variable P containing the list of constraints that define it (say L). Then, when I want to add a constraint (C) , I create a new Polyhedron from L in ppl, add C, get the minimized list of constraints (L'), delete the Polyhedron and update my variable P to L'. If Prolog backtracks before the addition, the old value L of P is automatically restored. I am afraid that this implementation is dramatic for the efficiency of your library.
My questions are : Do you already have tackled the problem of backtrack with PPL ? If yes, would you have a better solution than mine ? How bad is this approach regarding efficiency ? Would it make sense to save a kind of "internal state" of the polyhedron instead of the explicit list of constraints ?
Thank you, Tristan Denmat