Our other Prolog programs

(Go to the attachments to download.)

——————

——————

Both programs are offered as-is. The SQL-type DBMS had been used repeatedly, and quite successfully, in a 3rd-year undergraduate database course, but it has not been supported for a very long time. If you port it to SWI Prolog, do let me have that version, thanks, by email to <szpak at eecs dot uottawa dot ca>. The forward-chaining engine has been used, for many years and no less successfully, in a 4th-year undergraduate course on artificial intelligence. If you really need help with the forward-chainer, ask me: <szpak at eecs dot uottawa dot ca>.

——————

——————

This compiler accepts programs written in a very simple imperative language A1 and generates assembly code for a very simple one-register machine. The compiler is straightforward, but complete and not entirely unsophisticated. We think that it is a nice demonstration of the power of Prolog for this kind of application: after all, compilation is, in essence, symbolic processing. (The program comes in two versions, for SWI Prolog and for Toy Prolog. There are detailed comments and examples in the code. Note: you may have to increase the sizes of the Toy Prolog tables if you want to compile something seriously large.)

The compiler is part of a larger suite of programs written for didactic purposes. It includes an A1 assembler, an emulator of the A1 machine and a few other goodies. We post it here for your non-Prolog enjoyment.

——————

All these programs are licensed

under a Creative Commons Attribution 3.0 Unported License.

The forward-chaining engine:

© Stanisław Szpakowicz

The SQL-type database management system:

© Feliks Kluźniak & Stanisław Szpakowicz

(with an early contribution by Włodzimierz Grudziński)

Warplan (this code):

© Stanisław Szpakowicz

(acknowledging the authorship of David H. D. Warren)

The A1 mini-compiler and the A1 system:

© Feliks Kluźniak