Font Size: a A A

Compiling Prolog to Logic-inference Virtual Machine

Posted on:2000-11-01Degree:M.ScType:Thesis
University:Lakehead University (Canada)Candidate:Wang, Yifei (Fred)Full Text:PDF
GTID:2468390014463647Subject:Computer Science
Abstract/Summary:
The Logic-inference Virtual Machine (LVM) is a new Prolog execution model consisting of a set of high-level instructions and memory architecture for handling control and unification. Different from the well-known Warren's Abstract Machine [1], which uses Structure Copying method, the LVM adopts a hybrid of Program Sharing [2] and Structure Copying to represent first-order terms. In addition, the LVM employs a single stack paradigm for dynamic memory allocation and embeds a very efficient garbage collection algorithm to reclaim the useless memory cells. In order to construct a complete Prolog system based on the LVM, a corresponding compiler must be written.;In this thesis, a design of such LVM compiler is presented and all important components of the compiler are described. The LVM compiler is developed to translate Prolog programs into LVM bytecode instructions, so that a Prolog program is compiled once and can run anywhere.;The first version of LVM compiler (about 8000 fines of C code) has been developed. The compilation time is approximately proportional to the size of source codes. About 80 percent of the time are spent on the global analysis. Some compiled programs have been tested under a LVM emulator. Benchmarks show that the LVM system is very promising in memory utilization and performance.
Keywords/Search Tags:LVM, Prolog, Memory
Related items