From: Guillaume R. <Gui...@em...> - 2007-06-06 13:44:50
|
Hi, Malcolm Ryan a écrit : > Thanks, that gives me what I need. My other question is about > backtracking. There is a section in the User Guide labeled > "backtrackable structures" but it is lacking any content. Could you > explain what how it works? > > There are "backtrackable variables" called StoredVar (StoredInt, StoredBitSet, StoredBool...). A StoredVar works as a variable (affectation, modification...) but all its previous values are stored and automatically restored upon bactracking. > One of the things I have implemented in Eclipse is a variable length > list of values. It only creates variables for entries in the list as > they are called for (ie, as the lower bound of the length variable > increases). The good thing about Prolog is that it automatically > handles backtracking over this action. How hard would it be to do > something similar in Choco? > > I don't really understand your question. There aren't any methods available to add/remove variables dynamically. Hope it helps... Guillaume |