Abstract

This paper presents an extended Common LISP implementation of a PROLOG interpreter named CL-Prolog, giving a detailed description of the major problems met and the principal data structures and algorithms used for their solution.A sort of PROLOG virtual processor has been implemented whose instructions are defined using LISP as microcode; particular attention is payed to the the Memory Management Unit and the basic Control Mechanism.The reader is supposed to be accustomed with PROLOG Programming and the evaluation of the first order Logic Predicates.The main characteristics of CL-Prolog are:- Clean separation from the host language.- Tail recursion handling and binding mechanism optimization.- Portability, flexibility, and extendibility of basic model.- Interaction between PROLOG code and host LISP interpreter.Interpreter's core is separated in three big modules in order to cut off the different issues :- the reader, the evaluator, and the resources manager -Finally the introduction of a double-stack recursion management has sped up the Backtracking mechanism; the resulting overall performances of this interpreter are really comparable to other commercial one even when they are implemented using procedural languages, supposed faster, confirming the possibility of using very high level languages as effective tools for real implementations.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.