next up previous
Next: Generating Runtime Applications Up: Notes on Using Previous: Name Conflicts in

Compatibility of the Foreign Interface

As far as I am aware of, there is no standard for foreign language interfaces in Prolog. The SWI-Prolog interface is no attempt to propose such a standard. It is (in part) tailored to the possibilities of the SWI-Prolog machinery. BIM-Prolog has a similar interface to analyse and construct terms. The major difference is that they have garbage collection and calls are made available to lock and unlock terms for garbage collection. I built a similar interface to Edinburgh C-Prolog (although less clean). This at least tells us that the interface can work for various forms of the WAM as well as a structure sharing Prolog.

As no standard exists nor emerges, users of the foreign language interface should carefully design the interface if the C-code should be portable to other Prolog implementation. The best advice to give is to define a small interface layer around the C-application and interface this to Prolog.



Passani Luca
Tue Nov 14 08:58:33 MET 1995