🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #4114

Re: Prolog interpreter in LISP wanted

#4114
From: Dorai Sitaram
Date: Mon, 18 Dec 1989 21:16
36 lines
2574 bytes
In article <1690@gannet.cl.cam.ac.uk> wfc@cl.cam.ac.uk (William Clocksin) writes:
$Could somebody send me the source code of a Prolog interpreter
$written in LISP (or the reference of a paper where one may be found)?
$I need this for teaching purposes only, and can't spare the time
$just at the moment to write one myself.  I already know about
$the "smallest one in the world" in John Campbell's book, but I
$wonder whether somebody has got a more realistic one to share.
$Thank you.

[This is also addressed to people other than Clocksin.]

I have a fairly complete (i.e., it includes bagof and ilk, though I
didn't feel the need to add assert/detract!) and "easily" extensible
Prolog embedding written in Scheme, modeled on the one described in
Matthias Felleisen's "Transliterating Prolog into Scheme," Tech. Rep.
182, Indiana Univ. Comp. Sci. Dept., 1985.  I may have referred to
this in my only previous posting on c.l.p. a few weeks ago.

It's "better" than an interpreter since it's an embedding, i.e., I can
use both languages with something approaching gay abandon. I am not
sure if this is what you want, since the language used is Scheme
(Ch*z) rather than Lisp. First-class continuations of Scheme,
something not available in Lisp, are exploited. If you think you still
want it, send me email, I'll see if I can make it subscribe to RRRS
standards to make it portable (allow time for delivery!), and email
you a copy. If you don't have a Scheme at your place, my code will
probably not be a good idea, since a Prolog embedding in a Scheme
interpreter written on top of your Lisp would be enough to break your
back, efficiency-wise, I should think.

--dorai
--
-------------------------------------------------------------------------------
It may be that the gulfs will wash us down;
It may be we shall touch the Happy Isles.
-------------------------------------------------------------------------------
Technical Details
Message-ID: <3833@brazos.Rice.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!rice!titan!dorai
References: <1690@gannet.cl.cam.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!rice!titan!dorai
From: dorai@titan.rice.edu (Dorai Sitaram)
Newsgroups: comp.lang.prolog,comp.lang.scheme
Subject: Re: Prolog interpreter in LISP wanted
Summary: realistic(?) Prolog embedding (was interpreter) in Scheme (was Lisp)
Keywords: Prolog, embedding, Scheme, email, portable
Message-ID: <3833@brazos.Rice.edu>
Date: 18 Dec 89 21:16:27 GMT
References: <1690@gannet.cl.cam.ac.uk>
Sender: root@rice.edu
Reply-To: dorai@titan.rice.edu (Dorai Sitaram)
Followup-To: comp.lang.prolog
Organization: Rice University, Houston
Lines: 36
Cc: wfc@cl.cam.ac.uk dorai