Integrating Prolog Into the Poplog Environment


Although Prolog undoubtedly has i t s good p o i n t s , there are some tasks (such as w r i t i ng a screen ed i to r or network in ter face c o n t r o l l e r ) for which it is not the language of choice. The most natura l computational concepts [ 2 ] for these tasks are hard to reconci le with Prolog's dec lara t ive nature. Just as there is a need for even the most committed Prolog programmer to use "convent ional " languages for some tasks , so too is there a need for " l o g i c " or iented components in conventional app l ica t ions programs, such as CAD systems [73 and r e l a t i o n a l databases [ 5 ] . At Sussex, the problems of i n teg ra t i ng logic with procedural programming are being addressed by two p ro jec t s . One of these [43 involves a d i s t r i b u t e d r ing of processors communicating by message passing. The other pro ject is the POPLOG system, a mixed language AI programming environment which runs on conventional hardware. This paper describes the way in which we have in tegrated Prolog in to POPLOG. I THE POPLOG ENVIRONMENT The POPLOG system is an AI programming environment developed at Sussex Univers i ty [3D. It supports Pro log , POP-11, a d ia lec t of POP-2 [13 , and a basic LISP. POPLOG cur ren t l y runs on the DEC VAX ser ies of computers under the VMS operat ing system, but other implementations are in progress. In POPLOG, the l i nk between the programming languages and the underly ing machine is the POPLOG v i r t u a l machine. The compilers produce POPLOG v i r t u a l machine i n s t r u c t i o n s , which are then fu r the r t rans la ted in to the machine code for the host machine. At the level of host machine code, i t is possible to l ink in programs wr i t t en in languages such as FORTRAN. Procedures for " p l a n t i n g " i ns t ruc t i ons for the v i r t u a l machine are f u l l y accessible to the user. Thus the Prolog compiler is j us t one of the many possible POPLOG programs that create new pieces of machine code. In p a r t i c u l a r , i t is easy to create procedure c losures. For the purposes of t h i s paper, a closure is a s t ruc ture which contains a pointer to a procedure plus a set of arguments for that procedure. The closure can then be appl ied as if it were a normal procedure with no arguments. Some *Steve Hardy is now at Teknowledge I n c , 525 Un ivers i ty Ave, Palo A l t o , CA 94301, USA. "syn tac t i c sugar" has been provided in POP-11 to make it easy to create c losures; an expression such as:

Extracted Key Phrases

Cite this paper

@inproceedings{Mellish1983IntegratingPI, title={Integrating Prolog Into the Poplog Environment}, author={Chris Mellish and Steve Hardy}, booktitle={IJCAI}, year={1983} }