Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!uunet!mcsun!corton!geocub!billaud From: billaud@geocub.UUCP (Michel BILLAUD) Newsgroups: comp.lang.prolog Subject: Re: List of Folk Theorems Message-ID: <3497@geocub.UUCP> Date: 26 Jun 91 15:37:52 GMT Article-I.D.: geocub.3497 References: <3470@geocub.UUCP> <6473@goanna.cs.rmit.oz.au> Organization: GRECO Programmation du CNRS & LaBRI - FRANCE Lines: 55 In article <6473@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes: .In article <3470@geocub.UUCP>, billaud@geocub.UUCP (Michel BILLAUD) .QUOTES .> 5. If b is deterministic and followed by a !, you can switch them: .> p :- a,...,b,!,c,... .> p :- a,...,!,b,c,... .This is false. Consider . p :- fail, !. p :- !, fail. . p :- write(yoo-hoo). p :- write(yoo-hoo). . ?- p. ?- p. . => yoo-hoo => no .If b is determinate (not "deterministic") and cannot fail, _then_ you .can switch them. - My apologises about inventing new words from time to time. - I suppose the author proposed 5 as a generalisation of the conclusion of 4 with the same premises "in the LAST clause". So nobody is wrong. .> From csa09@seq1.keele.ac.uk Mon May 27 12:04:26 1991 .> From: "P." Singleton . .> If a (deterministic) goal doesn't instantiate its arguments .> any further (perhaps it has useful side-effects), then you .> can replace it by .> .> \+ \+ goal .The DEC-10 Prolog library defines gcc(G) :- \+ \+ X. .It stands for "garbage collecting call". .> Nota : \+ = not .Note: in DEC-10 Prolog and Quintus Prolog 'not' is _not_ the same .as "unprovable" \+ . In both Prologs, 'not' is not an evaluable .predicate, but is defined in the library, and is defined to report .an error when it won't be sound. Stick with \+ for portability. Ok, as long as I dont have to pronounce its name :-) . What is soundness in this context ? Does it mean that the evaluation of not(p(X,Y,foo)) returns an error if there is no procedure p/3 , and that of \+ p(X,Y,foo) simply fails ? Michel Billaud -- Michel BILLAUD : billaud@geocub.greco-prog.fr Departement d'Informatique : IUT "A", Universite Bordeaux I : phone W: 56.84.57.92 // 56.84.69.22 33405 Talence (FRANCE) : H: 56.36.65.90 (answering mach.)