Skip to main content

A complete indexing scheme for WAM-based abstract machines

  • Conference paper
  • First Online:
Programming Language Implementation and Logic Programming (PLILP 1992)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 631))

  • 164 Accesses

Abstract

This paper introduces an indexing scheme for logic programming languages, complete in considering all parameters and nested terms. Nevertheless it does not lead to a code-size explosion, because the sets of valid clauses are not encoded by special control flow instructions. Instead, some kind of identifiers of the applicable clauses are stored in (clause) sets allowing the stepwise restriction of alternative clauses during the runtime analysis of the parameters.

We present the compilation scheme to integrate this approach in existing compilers. It shows the cooperation of the new instructions, the strict separation of the indexing code from the code executing the compiled clauses, and it demonstrates the easiness of integrating a complete indexer in compilers. The compilation scheme was originally developed for the stack-based narrowing machine of the functional logic language BABEL. We describe, however, the slightly modified indexing scheme for the usual WAM-architecture and assume Prolog as the language platform.

The author is supported by the grant In 20/6-1 from the ’Deutsche Forschungsgemeinschaft’.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. H. AÏt-Kaci, Warren's Abstract Machine: A Tutorial Reconstruction, MIT Press, Logic Programming Series. Cambridge, MA, 1991

    Google Scholar 

  2. M. M. T. Chakravarty and H. C. R. Lock, The Implementation of Lazy Narrowing, PLILP 91, Lecture Notes in Computer Science, 528, Springer Verlag, Aug. 1991

    Google Scholar 

  3. T. Hickey and Sh. Mudambi, Global compilation of Prolog, Journal on Logic Programming, Vol. 7, 1989

    Google Scholar 

  4. S. Kliger and E. Shapiro, A Decision Tree Compilation Algorithm for FCP(—,:,?), Proceedings of the Fifth International Conference of Logic Programming and Symposium of Logic Programming, MIT Press, 1988

    Google Scholar 

  5. S. Kliger and E. Shapiro, From Decision Trees to Decision Graphs, North American Conference on Logic Programming, Austin, MIT Press, October 1990

    Google Scholar 

  6. M. Korsloot and E. Tick, Compilation Techniques for Nondeterminate Flat Concurrent Logic Programming Languages, Logic Programming: Proceedings of the Eighth International Conference, MIT Press, June 1991

    Google Scholar 

  7. R. Loogen, From Reduction Machines to Narrowing Machines, In CCPSD, TAPSOFT 91, Lecture Notes in Computer Science, 494, Springer Verlag, 1991

    Google Scholar 

  8. R. Loogen and S. Winkler, Dynamic Detection of Determinism in Functional Logic Languages, PLILP 91, Lecture Notes in Computer Science, 528, Springer Verlag, 1991

    Google Scholar 

  9. J.J. Moreno-Navarro and M. Rodríguez-Artalejo, Logic Programming with Functions and Predicates: The Language BABEL, Technical Report DIA/89/3, Universidad Complutense, Madrid 1989

    Google Scholar 

  10. D. Palmer and L. Naish, NUA-Prolog: An Extension to the WAM for Parallel Andorra, Logic Programming: Proceedings of the Eighth International Conference, MIT Press, June 1991

    Google Scholar 

  11. S. L. Peyton Jones, The Implementation of Functional Programming Languages, Prentice Hall, 1987

    Google Scholar 

  12. D.H.D. Warren, An Abstract PROLOG Instruction Set, Technical Note 309, SRI International, Menlo Park, California, 1983

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Maurice Bruynooghe Martin Wirsing

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hans, W. (1992). A complete indexing scheme for WAM-based abstract machines. In: Bruynooghe, M., Wirsing, M. (eds) Programming Language Implementation and Logic Programming. PLILP 1992. Lecture Notes in Computer Science, vol 631. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55844-6_139

Download citation

  • DOI: https://doi.org/10.1007/3-540-55844-6_139

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-55844-6

  • Online ISBN: 978-3-540-47297-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics