Advertisement

A complete indexing scheme for WAM-based abstract machines

  • Werner Hans
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 631)

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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [AÏt-Kaci91]
    H. AÏt-Kaci, Warren's Abstract Machine: A Tutorial Reconstruction, MIT Press, Logic Programming Series. Cambridge, MA, 1991Google Scholar
  2. [Chakravarty,Lock91]
    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. 1991Google Scholar
  3. [Hickey,Mudambi89]
    T. Hickey and Sh. Mudambi, Global compilation of Prolog, Journal on Logic Programming, Vol. 7, 1989Google Scholar
  4. [Kliger,Shapiro88]
    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, 1988Google Scholar
  5. [Kliger,Shapiro90]
    S. Kliger and E. Shapiro, From Decision Trees to Decision Graphs, North American Conference on Logic Programming, Austin, MIT Press, October 1990Google Scholar
  6. [Korsloot,Tick91]
    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 1991Google Scholar
  7. [Loogen91]
    R. Loogen, From Reduction Machines to Narrowing Machines, In CCPSD, TAPSOFT 91, Lecture Notes in Computer Science, 494, Springer Verlag, 1991Google Scholar
  8. [Loogen,Winkler91]
    R. Loogen and S. Winkler, Dynamic Detection of Determinism in Functional Logic Languages, PLILP 91, Lecture Notes in Computer Science, 528, Springer Verlag, 1991Google Scholar
  9. [Moreno,Rodríguez89]
    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 1989Google Scholar
  10. [Palmer,Naish91]
    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 1991Google Scholar
  11. [Peyton,Jones87]
    S. L. Peyton Jones, The Implementation of Functional Programming Languages, Prentice Hall, 1987Google Scholar
  12. [Warren83]
    D.H.D. Warren, An Abstract PROLOG Instruction Set, Technical Note 309, SRI International, Menlo Park, California, 1983Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1992

Authors and Affiliations

  • Werner Hans
    • 1
  1. 1.Lehrstuhl für Informatik IIRWTH AachenAachenGermany

Personalised recommendations