Abstract
In this paper we present the novel term representation of the BinWAM (a simplified WAM engine for executing binary logic programs) and evaluate its impact in BinProlog, a C-emulated system based on the BinWAM and on the mapping of logic programs to binary Prolog introduced in [13]. Terms in the BinWAM are compressed with a new technique called last argument overlapping which takes advantage of an unconventional untagged pointer representation, called tag-on-data. A Cheney-style copy-term algorithm using these term representations is described for BinProlog's fast copy once implementation of findall. While BinProlog's performance is competitive with the best commercial Prolog systems, its implementation is significantly simpler. Our analysis shows that this term representation and a limited amount of instruction folding on top of a reduced basic instruction set make the BinWAM a realistic alternative to its more complex forerunner.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
A. Appel. Compiling with Continuations. Cambridge University Press, 1992.
M. Carlsson. Design and Implementation of an OR-Parallel Prolog Engine. Phd thesis, SICS, 1990.
C. J. Cheney. A nonrecursive list compacting algorithm. Communications of ACM, 11(13):677–678, Nov. 1970.
B. Demoen. On the Transformation of a Prolog program to a more efficient Binary program. Technical Report 130, K.U.Leuven, Dec. 1990.
B. Demoen and A. Mariën. Implementation of Prolog as binary definite Programs. In A. Voronkov, editor, Logic Programming, RCLP Proceedings, number 592 in Lecture Notes in Artificial Intelligence, pages 165–176, Berlin, Heidelberg, 1992. Springer-Verlag.
T. Dobry. A High Performance Architecture for Prolog. Phd thesis, University of California at Berkley, 1987.
A. Mariën. An Optimal Intermediate Code for Structure Creation in a WAM-based Prolog Implementation. Technical report, K.U.Leuven, May 1988.
U. Neumerkel. A transformation based on the equality between terms. In Logic Program Synthesis and Transformation, LOPSTR 1993. Springer-Verlag, 1993.
P. Tarau. A Simplified Abstract Machine for the execution of Binary Metaprograms. In Proceedings of the Logic Programming Conference'91, pages 119–128. ICOT, Tokyo, 7 1991.
P. Tarau. Ecological Memory Managment in a Continuation Passing Prolog Engine. In Y. Bekkers and J. Cohen, editors, Memory Management International Workshop IWMM 92 Proceedings, number 637 in Lecture Notes in Computer Science, pages 344–356. Springer, Sept. 1992.
P. Tarau. Program Transformations and WAM-support for the Compilation of Definite Metaprograms. In A. Voronkov, editor, Logic Programming, RCLP Proceedings, number 592 in Lecture Notes in Artificial Intelligence, pages 462–473, Berlin, Heidelberg, 1992. Springer-Verlag.
P. Tarau. Wam-optimizations in BinProlog: towards a realistic continuation passing prolog engine. Technical Report 92-3, Dept. d'Informatique, Université de Moncton, July 1992. available by ftp from clement.info.umoncton.ca.
P. Tarau and M. Boyer. Elementary Logic Programs. In P. Deransart and J. Małuszyński, editors, Proceedings of Programming Language Implementation and Logic Programming, number 456 in Lecture Notes in Computer Science, pages 159–173. Springer, Aug. 1990.
P. Van Roy. Can Logic programming Execute as Fast as Imperative Programming. Phd thesis, University of California at Berkley, 1990.
M. Wand. Continuation-based program transformation strategies. Journal of the Association for Computing Machinery, 27(1):164–180, 1980.
D. H. D. Warren. An Abstract Prolog Instruction Set. Technical Note 309, SRI International, Oct. 1983.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Tarau, P., Neumerkel, U. (1994). A novel term compression scheme and data representation in the BinWAM. In: Hermenegildo, M., Penjam, J. (eds) Programming Language Implementation and Logic Programming. PLILP 1994. Lecture Notes in Computer Science, vol 844. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58402-1_7
Download citation
DOI: https://doi.org/10.1007/3-540-58402-1_7
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-58402-5
Online ISBN: 978-3-540-48695-4
eBook Packages: Springer Book Archive