determinism

michel levy <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
Could you help to write this program :
det(T,G) succeeds if and only if G succeeds once and only once and give 
the T answer.
1) I don't want the solution below by findall, because I want to try at 
most two back tracks on G.
det(T,G) :- findall(T,G,L),length(L,1)

2) I know already call_det but it's not the solution because G can have 
choice points, but only one answer.



	
-- 
Michel Levy
L.S.R., Bureau C214, B.P.72 - 38402 SAINT MARTIN D'HERES CEDEX
e.mail : [email protected]    tel :(33)476514022
http://www-lsr.imag.fr/users/Michel.Levy
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.