Peter Baumgartner wrote: > > | As a workaround, you can obviously just remove the mode declaration. > | Alternatively, if you only need retract_all/1, you can use > | abolish/1 instead (and repeat the dynamic declaration). > | > > I tried that, it works (of course), but it makes no difference. On second thought, removing the mode declaration is clearly the better fix, because it breaks all of retract, retractall, clause and listing on that predicate... > Thanks for this hint. I was not aware of trimcore/0. It is not > mentioned in the user manual, isn't it? Is there some other place > where to find such information? This is not a critique - I'd just > would be curious to know how to find such things. You are welcome to criticise, we need your input. What implementors write in the documentation is often not what a user wants to know :-) trimcore/0 is in the reference manual, but we clearly need to add some pointers. > > A question for my understanding: in the server endless loop, which is > a tail recursive predicate, I essentially do a > > ( call(Query) -> > something_good > ; something_bad > ) > > Usually the Query succeeds. Is it so that the open choicepoints in the > execution of Query are removed? It is so, I guess... Everything in the condition of an if-then-else gets cut, so no problem here. For a server-loop, where the individual queries are completely independent, it is safest to use a repeat-fail loop, i.e. serve :- repeat, trimcore, read_query(Query), ( call(Query) -> something_good ; something_bad ), fail. -- Joachim Schimpf / phone: +44 20 7594 8187 IC-Parc, Imperial College / mailto:J.Schimpf@ic.ac.uk London SW7 2AZ, UK / http://www.icparc.ic.ac.uk/eclipseReceived on Fri Jun 07 14:18:21 2002
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:16 PM GMT GMT