Prev Next Up Home Keys Figs Search New

Prolog in Scheme

Appeared in Volume 7/1, February 1994

Keywords: scheme.

oz@ursa.sis.yorku.ca
Ozan S. Yigit
25th November 1993

secrist@kxovax.enet.dec.com writes:
Is anyone aware of an implementation of Prolog in Scheme (even a BASIC WAM, etc.) ?

A place to look is the Scheme Repository, currently on nexus.yorku.ca under pub/scheme. It contains the Univ. of Calgary Scheme Prolog as pub/scheme/scm/prolog.[123].kit.

I include its README below.

Scheme Prolog 1.2

Written by John Cleary, Alan Dewar, Vinit Kaushik and Sue Rempel at the University of Calgary (cleary@cpsc.ucalgary.ca).

This package provides a fairly simple interpreter for pure Prolog, implemented in Scheme. It is primarily intended for use in students' projects involving implementations of Prolog. Scheme Prolog version 1.2 is mostly a pure Prolog interpreter, though a few built-in primitives are also included. Delayed goals are also supported, and an interval-arithmetic package is included.

The interval arithmetic is a form of constraint solving on real variables. It is logically correct in the sense that no solutions to constraints are ever rejected. It deals correctly with rounding and truncation and can solve non-linear constraints.

This implementation runs on Chez Scheme and on Elk, and is intended to be portable to other Scheme implementations.

For details on the interval-arithmetic package, refer to the following paper: Cleary, John G. (1987) "Logical Arithmetic," Future Computing Systems 2(2) 125-149.

d88-pjo@dront.nada.kth.se
Patric Jonsson
25th November 1993

From the Scheme FAQ:

Subject: [1-11] Where can I get an implementation of Prolog in Scheme?

Prolog in Scheme is a collection of macros that expand syntax for clauses, elations, and so on. It is written in Scheme and has support for delayed goals and interval arithmetic. It is known to run in Chez Scheme and in Elk, and is intended to be portable to other Scheme implementations. It relies on continuations, and so is not easily ported to Common Lisp. Available from the University of Calgary by anonymous FTP from:
ftp://ftp.cpsc.ucalgary.ca/pub/prolog1.2/prolog12.tar.Z

Questions and comments may be addressed to Alan Dewar (dewar@cpsc.ucalgary.ca) or John Cleary (jcleary@waikato.ac.nz).

An implementation of Prolog for Chez Scheme is available by anonymous FTP from:
ftp://titan.cs.rice.edu/public/dorai/schelog2.tar.Z

It is a collection of macros that expand syntax for clauses, elations, and so on into pure Scheme. It should be easily portable to other Schemes. Its use of higher-order continuations is probably a major obstacle to porting it to Common Lisp. For more information, please contact the author: dorai@cs.rice.edu.

Prev Next Up Home Keys Figs Search New