Xref: utzoo comp.lang.prolog:4023 comp.lang.c:39625 comp.sources.wanted:16848 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!ukc!edcastle!own From: own@castle.ed.ac.uk (O Morgan) Newsgroups: comp.lang.prolog,comp.lang.c,comp.sources.wanted Subject: Re: "Embedded Prolog" in C code Message-ID: <10568@castle.ed.ac.uk> Date: 27 May 91 10:38:31 GMT References: <1991May26.231138.13000@brolga.cc.uq.oz.au> <1991May27.170956.873@csc.canterbury.ac.nz> Organization: Scottish Agricultural College Lines: 27 >In article <1991May26.231138.13000@brolga.cc.uq.oz.au>, exnirad@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@ed.ac.uk ----------------------------------------------------------------------------