Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

swi - trace does not yield show redo and fail

3 views
Skip to first unread message

The Quiet Center

unread,
Oct 22, 2009, 4:40:31 PM10/22/09
to
I'm reading some data on how the prolog engine works:
http://www.amzi.com/AdventureInProlog/index.htm

and was expecting my trace to show a final redo and fail but for some
reason it did not.

transcript and program follow

/* Transcript */
[debug] ?- trace.

Yes
[trace] ?- edible(X).
Call: (7) edible(_G302) ?
Exit: (7) edible(apple) ?

X = apple ;
Redo: (7) edible(_G302) ?
Exit: (7) edible(crackers) ? creep

X = crackers ;

No
[debug] ?-

/* Program */

edible(apple).
edible(crackers).

zslevi

unread,
Oct 23, 2009, 4:06:36 PM10/23/09
to

The prolog runtime keeps track of choice points, and knows, that no
further choicepoint exists. Actually having unnecessary choicepoints
costs memory.

0 new messages