"Embedded Prolog" in C code

O Morgan own at castle.ed.ac.uk
Mon May 27 20:38:31 AEST 1991


>In article <1991May26.231138.13000 at brolga.cc.uq.oz.au>, exnirad at brolga.cc.uq.oz.au (Nirad Sharma) writes:
>> Is it possible to write Prolog progams and have them integrated into a c
>> program ?  I seem to remember that Turbo Prolog on the PC platform allows
>> this.  I am looking for a Unix (SYSV) solution which would allow prolog
>> units to be written and either compiled and linked to the c code or be
>> interpreted at run-time.  Some extensive logic needs to be built into some
>> algorithms that I am using for a database application. While I have already
>> coded some of this logic in c I would prefer to convert the existing and
>> the future code to prolog for ease of programming and verification.

On a PC, it is certainly possible to call Arity Prolog predicates from
Microsoft C.  The prolog does not neccessarily all need to be compiled,
some of it can be consulted in at run time.  You can also call the
Prolog from other MS language implementations such as Fortran if you get
them to call C first. 

Another (PC) option would be to run your C program under Windows3 and
get it to operate a Windows based Prolog that supports DDE.  Prolog-2
for Windows can do this. 

Olly  Morgan
--
----------------------------------------------------------------------------
 Olly Morgan @ Scottish Agricultural College,  Edinburgh EH9 2HH, Scotland
               Tel: (+44 31) 662 4395          E.Mail: O.Morgan at ed.ac.uk
----------------------------------------------------------------------------



More information about the Comp.lang.c mailing list