DocumentCode :
303043
Title :
LAM: another Prolog abstract machine
Author :
Li, Xining ; Yao, Y.Y.
Author_Institution :
Dept. of Comput. Sci., Lakehead Univ., Thunder Bay, Ont., Canada
Volume :
1
fYear :
1996
fDate :
26-29 May 1996
Firstpage :
310
Abstract :
The Warren Abstract Machine has been accepted as the de facto standard for implementing Prolog for more than ten years. The WAM adopts structure copying to represent Prolog terms. It flattens nested structures and expands them into efficient WAM instructions which either copy terms into the heap or unify terms along the heap pointer. When two terms to be unified are structure instances in the heap, the WAM must invoke a built-in procedure to carry out the stack based full unification. We propose a new Prolog execution model-the Lakehead Abstract Machine. The LAM is designed to retain the control features of the WAM, but the structure copying is replaced by program sharing for implementing unification. The idea of program sharing is originated from the structure sharing used in the DEC-10 Prolog. The significant difference, however, is that the shared resources are no longer structure prototypes, but executable LAM code. With the LAM, nested structures are flattened and then translated into a set of subprograms. In constructing a structure, the LAM only puts its corresponding subprogram pointer into the heap. When two terms to be unified are structures, their bound subprograms will be invoked. We have implemented an experimental LAM emulator in C. Benchmarks show that the LAM based Prolog implementation is quite competitive with the WAM based systems, such as SICStus and BIN-Prolog
Keywords :
PROLOG; finite automata; logic programming; program control structures; DEC-10 Prolog; LAM based Prolog implementation; Lakehead Abstract Machine; Prolog abstract machine; Prolog execution model; Warren Abstract Machine; bound subprograms; executable LAM code; experimental LAM emulator; heap pointer; nested structure flattening; program sharing; stack based full unification; structure copying; structure instances; subprogram pointer; Computer science; Concrete; Costs; Data structures; Lakes; Memory architecture; Prototypes;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Electrical and Computer Engineering, 1996. Canadian Conference on
Conference_Location :
Calgary, Alta.
ISSN :
0840-7789
Print_ISBN :
0-7803-3143-5
Type :
conf
DOI :
10.1109/CCECE.1996.548099
Filename :
548099
Link To Document :
بازگشت