Hi Malcolm, Malcolm Ryan wrote: > I'm creating a new kind of constrained variable (ordered sets) along > the lines of the 'generic_sets' module. I want to add some unit tests > that ensure that the suspension lists are working correctly - most > importantly, that there aren't any delayed goals remaining once a > variable has been instantiated. Is there any way to access this > information? > > Malcolm > > I am not sure if I understand what you want correctly: do you mean that no suspensions associated with the variable will remain suspended once that variable is bound? If this is what you want, you can test the suspnesions associated with the variable with is_suspension/1 once you have instantiated your variable. You can obtain the suspension either by suspending your goals with suspend/4, or you could get them for a particular variable with suspensions/2 (before you instantiate the variable!). If you are really talking about the general case that you have *no* suspensions left, you can get a list of all live suspensions with suspensions/1. Cheers, KishReceived on Thu Jun 21 2007 - 16:18:29 CEST
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST