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’.
Preview
Unable to display preview. Download preview PDF.
References
H. AÏt-Kaci, Warren's Abstract Machine: A Tutorial Reconstruction, MIT Press, Logic Programming Series. Cambridge, MA, 1991
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
T. Hickey and Sh. Mudambi, Global compilation of Prolog, Journal on Logic Programming, Vol. 7, 1989
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
S. Kliger and E. Shapiro, From Decision Trees to Decision Graphs, North American Conference on Logic Programming, Austin, MIT Press, October 1990
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
R. Loogen, From Reduction Machines to Narrowing Machines, In CCPSD, TAPSOFT 91, Lecture Notes in Computer Science, 494, Springer Verlag, 1991
R. Loogen and S. Winkler, Dynamic Detection of Determinism in Functional Logic Languages, PLILP 91, Lecture Notes in Computer Science, 528, Springer Verlag, 1991
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
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
S. L. Peyton Jones, The Implementation of Functional Programming Languages, Prentice Hall, 1987
D.H.D. Warren, An Abstract PROLOG Instruction Set, Technical Note 309, SRI International, Menlo Park, California, 1983
Author information
Authors and Affiliations
Editor information
Rights 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