From ok@atlas.otago.ac.nz Sun Feb 25 22:34:06 2001
Received: from atlas.otago.ac.nz (atlas.otago.ac.nz [139.80.32.250])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f1PLY5Z24918
	for <prolog@swi.psy.uva.nl>; Sun, 25 Feb 2001 22:34:05 +0100 (MET)
Received: (from ok@localhost)
	by atlas.otago.ac.nz (8.9.3/8.9.3) id KAA28444;
	Mon, 26 Feb 2001 10:33:54 +1300 (NZDT)
Date: Mon, 26 Feb 2001 10:33:54 +1300 (NZDT)
From: "Richard A. O'Keefe" <ok@atlas.otago.ac.nz>
Message-Id: <200102252133.KAA28444@atlas.otago.ac.nz>
To: fisch@ptolemy.arc.nasa.gov, prolog@swi.psy.uva.nl
Subject: Re:  [SWIPL] choicepoints from flag/3

"Bernd Fischer" <fisch@ptolemy.arc.nasa.gov> wrote:
	using flag/3 leaves my with unwanted (and redundant)
	choicepoints which I can't cut away.

But why do you think there are any such choicepoints?  The transcript
you provided provides *ABSOLUTELY NO EVIDENCE* for that belief.

Try the following instead.

% pl
?- flag(test, _, 3).
?- [user].
q :- statistics, fail; flag(test, X, X), statistics, fail; true.
end_of_file.
?- q.

I'll chop out the irrelevant bits.  I get
Local  stack :     2,048,000       16,384          628 Bytes
Global stack :     4,096,000       16,384          676 Bytes
Trail  stack :     4,096,000       16,384          232 Bytes

Local  stack :     2,048,000       16,384          628 Bytes
Global stack :     4,096,000       16,384          676 Bytes
Trail  stack :     4,096,000       16,384          236 Bytes

The only change is one trail entry for X.
The call to flag/3 has left *NO* choice-point of its own.

