SwiProlog-C++ Homepage

SwiProlog-C++ is an interface between Prolog and C++. It is a wrapper around the Foreign Language Interface of the free Prolog interpreter SWI-Prolog, striving to make it easy for C++ programmers to interface to Prolog. With SwiProlog-C++ you can either incorporate C++ parts in a Prolog program (as foreign predicates) or the Prolog engine in a C++ program (for a logic component).

Designing the interface turned out to be quite tricky. There is a huge semantic gap between the logic programming and the imperative worlds. SwiProlog-C++ acts as a kind of bridge. It reinterprets the Prolog concepts in imperative terms, and tries to integrate the Prolog constructs as smoothly as possible in the C++ language. More details are in the manual.

Thanks to Jan Wielemaker for his support with the SWI-Prolog internals.

Status

2004-09-21 Development has frozen for two years. I'm not sure if I will ever completely finish it. Possibly I will switch to another logic programming system, when I begin to experiment with expert systems again. SwiProlog-C++ is unfinished, but useful. If you want to use it, expect that you will have to do some modifications (and send me a patch).

SwiProlog-C++ is in a proceded state, and as far as it goes, is tested and mostly documented. It also should be quite mature and usable, since a lot of thought and reconsideration has gone into it. However, some things remain to be done. And it hasn't been in much usage yet.

Requirements

SWI-Prolog
Has been developed with version 4.0.9. Later versions should also work.
C++ compiler
It is tested with GCC 2.95, but any compliant C++ compiler should do. GCC 3.02 does not work, because of bugs.
Docbook-XML installation
The documentation is written using Docbook 4.1.2 (the XML version) and Normal Walsh's Docbook XML stylesheets 1.40 for formatting. The XSLT processor is xsltproc 1.0.0, but any should do. You need this only if you want to change the manual.

Distribution

The current version is 0.1.0, released 2002-01-14.

swiprolog-c++-0.1.0.tar.gz (69 kB)

Here is an online version of the manual.

The Author

Volker Wysk <post@volker-wysk.de>

Links

Last changed 2004-09-21.