Re: counting the number of backtracs

From: Nick Wedd (nick_at_maproom.co.uk)
Date: 04/17/04


Date: Sat, 17 Apr 2004 15:48:27 +0100

In message <f238fff9.0403272349.5c5d2eb1@posting.google.com>, zeus
<zohar@sheernetworks.com> writes
>bart demoen <bmd@cs.kuleuven.ac.be> wrote in message
>news:<1080422530.509215@seven.kulnet.kuleuven.ac.be>...
>> zeus wrote:
>> > How can I use assert/retract to count the number of backtracks made in
>> > execution of a predicate?
>> >
>> > Thanks,
>> > Zeus
>>
>> Your question is very difficult to answer - it resembles the question:
>> "how can I use a hammer to put a nail in a piece of wood".
>> The question suggests that you are so close to actually doing it, that
>> you need no more help.
>> Unless you don't know what "the number of backtracks" means - and then
>> your question should have been different ...
>>
>> ???
>>
>> Cheers
>>
>> Bart Demoen
>
>
>Actually to be precise, what I wanna count is the number of
>constraints checked by a predicate.

That is not "precise", it is an entirely different question.

You are unlikely to get a helpful answer unless you give us some slight
hint as to what you are actually trying to do. If you show us your
predicate, and say what you mean by a constraint, maybe someone can
help.

Nick

-- 
Nick Wedd    nick@maproom.co.uk


Relevant Pages

  • Re: Sublists question
    ... > Dear Nick and zeus, ... > I think zeus would like to replace those with a recursive predicate. ... test_all_sublists should generate all N sublists ...
    (comp.lang.prolog)
  • Re: counting the number of backtracs
    ... zeus wrote: ... What is your definition of a "constraint checked by a predicate"? ... Since you asked specifically where the assert and retract go, ... and in case you don't know: reading the manual helps. ...
    (comp.lang.prolog)
  • Re: Sublists question
    ... In message, zeus ... you might start by writing a sublist predicate. ... >that L1,L2,L3 are its sublists. ... >sequence with n variables? ...
    (comp.lang.prolog)
  • Re: counting the number of backtracs
    ... > zeus wrote: ... >> execution of a predicate? ... what I wanna count is the number of ... constraints checked by a predicate. ...
    (comp.lang.prolog)
  • Re: counting the number of backtracs
    ... > zeus wrote: ... >> execution of a predicate? ... the semantics of assert and retract, so I lack the understanding of ...
    (comp.lang.prolog)