Path: utzoo!attcan!uunet!ginosko!gem.mps.ohio-state.edu!uwm.edu!bionet!ig!arizona!debray From: debray@arizona.edu (Saumya K. Debray) Newsgroups: comp.lang.prolog Subject: Re: logic programs -> procedural lang? Message-ID: <14299@megaron.arizona.edu> Date: 27 Sep 89 15:25:05 GMT References: <27335@shemp.CS.UCLA.EDU> Organization: U of Arizona CS Dept, Tucson Lines: 49 arman@oahu.cs.ucla.edu (Arman Bostani) writes: > I am looking references to any work done in the area of "compiling" > logic programming languages (i.e. Prolog, CLP(R), etc.) into a > procedural/deterministic language such as C. See D. H. D. Warren's original work on compiling Prolog: "Implementing Prolog -- compiling predicate logic programs", DAI Research Reports 39 and 40, U. Edinburgh, May 1977. [This is hard to get from Edinburgh, but I've heard that it's available as a research report from SRI International.] There's a bunch of papers on implementing Prolog in Lisp, e.g. see the paper by Ken Kahn and Mats Carlsson in "Implementations of Prolog", ed. J. A. Campbell, Ellis Horwood, 1984. Andrew Turk discusses a number of optimizatios for native code Prolog compilers in Proc. ICLP 86. Mike Newton discusses compiling Prolog into native code for an IBM-3090 in "A High Performance Implementation of Prolog", Caltech CS Dept. Tech. Report TR:5234:86, Apr. 1987. There is also a paper in SIGPLAN-88, by Weiner and Ramakrishnan, that discusses compilation to C. See SIGPLAN Notices vol. 23 no. 7, July 1988. [This paper makes rather strong assumptions about the program, e.g. about the availability of type information, and hence may not satisfy purists.] There is at least one "real" Prolog implementation I'm aware of that compile to native code: BIM-Prolog, from Belgium; I believe Sicstus Prolog, from Sweden, also has a native code compiler for 68020-based machines. bradley@cs.utexas.edu (Bradley L. Richards) writes: > As far as I'm aware, little work *has* been done in this area (although > Borland's highly successful Turbo Prolog is compiled to machine code). One > big reason, at least with Prolog, that little work has been done is that > you almost inevitably sacrifice one of the most important and distinctive > features of the language when you compile it: the ability to have a program > change its universe while running (assert/retract). Not really, it's possible to mix compiled and interpreted code. -- Saumya Debray CS Department, University of Arizona, Tucson internet: debray@arizona.edu uucp: arizona!debray