[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
chapter

WAM for everyone: a virtual machine for logic programming

Published: 01 September 2018 Publication History

Abstract

This chapter is a tutorial presentation of the Warren Abstract Machine (akaWAM), which is a virtual machine for Prolog designed by David H. D.Warren [Warren 1983] (note not David S. Warren, who is the author of this chapter.) We present a variant of the WAM by developing it incrementally through a series of examples. Its similarity to a traditional implementation of a procedural language is emphasized. The development starts with a description of the run-time environment that supports Prolog program execution. Then it is shown how deterministic Datalog programs compile to WAM instructions, followed by deterministic Prolog programs that include complex terms, and finally nondeterministic Prolog programs that require backtracking.

References

[1]
A. V. Aho, M. S. Lam, R. Sethi, and J. D. Ullman. 1986. Compilers: Principles, Techniques, and Tools. Addison-Wesley. 238
[2]
H. Ait-Kaci. August 1991. Warren's Abstract Machine: A Tutorial Reconstruction. MIT Press. Out of print; available from http:wambook.sourceforge.net. 237
[3]
B. Demoen and P.-L. Nguyen. 2000. So many WAM variations, so little time. Computational Logic---CL 2000, pp. 1240--1254. 276
[4]
B. Demoen and K. Sagonas. January 1999. Chat: the copy-hybrid approach to tabling. In G. Gupta, editor, LNCS number 1551, Practical Aspects of Declarative Languages (PADL), pp. 106--121. Springer, San Antonio, TX. 275
[5]
B. Demoen, P.-L. Nguyen, and R. Vandeginste. 2002. Copying garbage collection for the WAM: To mark or not to mark? Logic Programming, pp. 297--321. 276
[6]
G. Janssens, B. Demoen, and A. Mariën. Aug. 1988. Improving the register allocation in WAM by reordering unification. In International Conference and Symposium on Logic Programming, pp. 1388--1402. 276
[7]
A. Mariën and B. Demoen. 1991. A new scheme for unification in WAM. In Logic Programming: Proceedings of the 1991 International Symposium. Citeseer. 276
[8]
D. Michie. 1968. Memo functions and machine learning. Nature, 218: 19--22. 275
[9]
K. Sagonas, T. Swift, and D. S. Warren. September 2000. An abstract machine for efficiently computing queries to well-founded models. Journal of Logic Programming, 45(1-3): 1--41. 275
[10]
E. Tick and D. H. D. Warren. February 1984. Towards a pipelined Prolog processor. In Proceedings of the International Symposium on Logic Programming, pp. 29--40. IEEE Computer Society, Atlantic City, NJ. 237
[11]
P. Van Roy. 1994. 1983-1993: The wonder years of sequential Prolog implementation. The Journal of Logic Programming, 19: 385--441. 276
[12]
P. Van Roy and A. M. Despain. 1992. High-performance logic programming with the Aquarius Prolog compiler. Computer, 25(1): 54--68. 276
[13]
P. L. Van Roy. 1990. Can logic programming execute as fast as imperative programming? PhD thesis, University of California at Berkeley, Berkeley, CA. 276
[14]
D. H. D. Warren. October 1983. An abstract Prolog instruction set. Technical Report 309, SRI, International. 237, 238, 273
[15]
D. S. Warren. Mar 1984. The runtime environment for a Prolog compiler using a copy algorithm. Technical report, Department of Computer Science, University at Stony Brook, NY. Major revision of TR#83/052. 238
[16]
N.-F. Zhou, Y.-D. Shen, L.-Y. Yuan, and J.-H. You. January 2000. Implementation of a linear tabling mechanism. In E. Pontelli and V. S. Costa, eds., LNCS, Practical Aspects of Declarative Languages (PADL), pp. 109--123. Springer, Boston, MA. 275

Cited By

View all
  • (2021)What is the Natural Abstraction Level of an Algorithm?Logic, Computation and Rigorous Methods10.1007/978-3-030-76020-5_12(199-214)Online publication date: 4-Jun-2021

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Books
Declarative Logic Programming: Theory, Systems, and Applications
September 2018
615 pages
ISBN:9781970001990
DOI:10.1145/3191315

Publisher

Association for Computing Machinery and Morgan & Claypool

Publication History

Published: 01 September 2018

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Chapter

Appears in

ACM Books

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)1
Reflects downloads up to 04 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2021)What is the Natural Abstraction Level of an Algorithm?Logic, Computation and Rigorous Methods10.1007/978-3-030-76020-5_12(199-214)Online publication date: 4-Jun-2021

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media