[comp.lang.prolog] PROLOG Digest V5 #11

PROLOG-REQUEST@SUSHI.STANFORD.EDU.UUCP (02/22/87)

PROLOG Digest           Monday, 23 Feb 1987      Volume 5 : Issue 11

Today's Topics:
          Query - Frames & Connection Graph Proof Procedure,
                      Programming - 91 Function
----------------------------------------------------------------------

From: "Norbert E. Fuchs" <fuchs%ifi.unizh.chunet@RELAY.CS.NET>
Subject: Frames in Prolog

Does anybody know about an efficient implementation of frames in
Prolog, or a Prolog system with frames?

Thank you very much for your help.

-- Norbert E. Fuchs

------------------------------

Date: Tue, 17 Feb 87 19:11:37 est
From: Stephen Schaefer <schaefer%andy.bgsu.edu@RELAY.CS.NET>
Subject: Connection Graph Proof Procedure

Can anyone point me to further references on the application of the
connection graph proof procedure, described in Kowalski's _Logic_
_for_ _Problem_ _Solving_, chapter 8?  Are any Prolog implementations
built on top of it?  Thanks.

-- Stephen P. Schaefer

------------------------------

Date: 17 Feb 87 23:21:17 GMT
From: milano!varghese@im4u.utexas.edu
Subject: 91 Function

In article <3782@milano.UUCP>, varghese@milano.UUCP writes:
>
> A "fix" to make it converge to 91:
>
> (defun f91 (x)
>   (cond ((= x 91) 91)
>       ((> x 111) (f91 (f91 (- x 10))))
>       ((> x 100) (f91 (- x 10)))
>       (t (f91 (f91 (+ x 11))))))
>
> or, if you don't speak LISP, a Prolog version:
>
> f91(91,91) :- !.
> f91(X,Y) :- X > 111, !, Z is X - 10, f91(Z,W), f91(W,Y).
> f91(X,Y) :- X > 100, !, Z is X - 10, f91(Z,Y).
> f91(X,Y) :- Z is X + 10, f91(Z,W), f91(W,Y).
>

The last line of the Prolog version should be

f91(X,Y) :- Z is X + 11, f91(Z,W), f91(W,Y).

to make it correspond to the Lisp version. I work on Lisp machines and
the Prolog version is a translation of the Lisp program. Sorry about
that.

-- Joe Varghese

------------------------------

End of PROLOG Digest
********************