Abstract
This paper presents a box-oriented debugging model for the functional logic language ALF. Due to the sophisticated operational semantics of ALF which is based on innermost basic narrowing with simplification, the debugger must reflect the application of the different computation rules during program execution. Hence our debugging model includes not only one box type as in Byrd's debugging model for logic programs but several different kinds of boxes corresponding to the various computation rules of the functional logic language (narrowing, simplification etc.). Moreover, additional box types are introduced in order to allow skips over (sometimes) uninteresting program parts like proofs of the condition in a conditional equation. Since ALF is a genuine amalgamation of functional and logic languages, our debugging model subsumes operational aspects of both kinds of languages. As a consequence, it can be also used for pure logic languages, pure functional languages with eager evaluation, or functional logic languages with a less sophisticated operational semantics like SLOG or eager BABEL.
The research described in this paper was partially funded by the German Ministry for Research and Technology (BMFT) under grant ITS 9103. The responsibility for the contents of this publication lies with the authors.
Preview
Unable to display preview. Download preview PDF.
References
P.G. Bosco, C. Cecchi, and C. Moiso. An extension of WAM for K-LEAF: a WAM-based compilation of conditional narrowing. In Proc. Sixth International Conference on Logic Programming (Lisboa), pp. 318–333. MIT Press, 1989.
K.A. Buettner. Fast Decompilation of Compiled Prolog Clauses. In Proc. Third International Conference on Logic Programming (London), pp. 663–670. Springer LNCS 225, 1986.
L. Byrd. Understanding the Control Flow of Prolog Programs. In Proc. of the Workshop on Logic Programming, Debrecen, 1980.
M.M.T. Chakravarty and H.C.R. Lock. The Implementation of Lazy Narrowing. In Proc. of the 3rd Int. Symposium on Programming Language Implementation and Logic Programming, pp. 123–134. Springer LNCS 528, 1991.
D. DeGroot and G. Lindstrom, editors. Logic Programming, Functions, Relations, and Equations. Prentice Hall, 1986.
N. Dershowitz and J.-P. Jouannaud. Rewrite Systems. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, Vol. B, pp. 243–320. Elsevier, 1990.
M. Ducassé. A general trace query mechanism based on Prolog. In Proc. of the 4th International Symposium on Programming Language Implementation and Logic Programming, pp. 400–414. Springer LNCS 631, 1992.
M. Eisenstadt. A Powerful Prolog Trace Package. In Advances in Artificial Intelligence, pp. 149–158. Elsevier Science Publishers, 1985.
M.J. Fay. First-Order Unification in an Equational Theory. In Proc. 4th Workshop on Automated Deduction, pp. 161–167, Austin (Texas), 1979. Academic Press.
L. Fribourg. SLOG: A Logic Programming Language Interpreter Based on Clausal Superposition and Rewriting. In Proc. IEEE Internat. Symposium on Logic Programming, pp. 172–184, Boston, 1985.
M. Hanus. Compiling Logic Programs with Equality. In Proc. of the 2nd Int. Workshop on Programming Language Implementation and Logic Programming, pp. 387–401. Springer LNCS 456, 1990.
M. Hanus. Efficient Implementation of Narrowing and Rewriting. In Proc. Int. Workshop on Processing Declarative Knowledge, pp. 344–365. Springer LNAI 567, 1991.
M. Hanus. Improving Control of Logic Programs by Using Functional Logic Languages. In Proc. of the 4th International Symposium on Programming Language Implementation and Logic Programming, pp. 1–23. Springer LNCS 631, 1992.
M. Hanus. Incremental Rewriting in Narrowing Derivations. In Proc. of the 3rd International Conference on Algebraic and Logic Programming, pp. 228–243. Springer LNCS 632, 1992.
M. Hanus. On the Completeness of Residuation. In Proc. of the 1992 Joint International Conference and Symposium on Logic Programming, pp. 192–206. MIT Press, 1992.
S. Hölldobler. Foundations of Equational Logic Programming. Springer LNCS 353, 1989.
J.-M. Hullot. Canonical Forms and Unification. In Proc. 5th Conference on Automated Deduction, pp. 318–334. Springer LNCS 87, 1980.
B. Josephs. The development of a debugger for the functional logic language ALF (in German). Diploma thesis, Univ. Dortmund, 1992.
H. Kuchen, R. Loogen, J.J. Moreno-Navarro, and M. Rodríguez-Artalejo. Graph-based Implementation of a Functional Logic Language. In Proc. ESOP 90, pp. 271–290. Springer LNCS 432, 1990.
R. Loogen. From Reduction Machines to Narrowing Machines. In Proc. of the TAPSOFT '91, pp. 438–457. Springer LNCS 494, 1991.
A. Mück. Compilation of Narrowing. In Proc. of the 2nd Int. Workshop on Programming Language Implementation and Logic Programming, pp. 16–29. Springer LNCS 456, 1990.
W. Nutt, P. Réty, and G. Smolka. Basic Narrowing Revisited. Journal of Symbolic Computation, Vol. 7, pp. 295–317, 1989.
P. Padawitz. Computing in Horn Clause Theories, volume 16 of EATCS Monographs on Theoretical Computer Science. Springer, 1988.
D. Plummer. Coda: An Extended Debugger for PROLOG. In Proc. 5th Conference on Logic Programming & 5th Symposium on Logic Programming (Seattle), pp. 496–511. MIT Press, 1988.
U.S. Reddy. Narrowing as the Operational Semantics of Functional Languages. In Proc. IEEE Internat. Symposium on Logic Programming, pp. 138–151, Boston, 1985.
A. Schleiermacher and J.F.H. Winkler. The Implementation of ProTest a Prolog-Debugger for a Refined Box Model. Software-Practice & Experience, Vol. 20, No. 10, pp. 985–1006, 1990.
A.P. Tolmach and A.W. Appel. Debugging Standard ML Without Reverse Engineering. In Proc. ACM Lisp and Functional Programming Conference '90, pp. 1–12, Nice, 1990.
D. Wolz. Design of a Compiler for Lazy Pattern Driven Narrowing. In Recent Trends in Data Type Specification, pp. 362–379. Springer LNCS 534, 1990.
Author information
Authors and Affiliations
Corresponding author
Editor information
Rights and permissions
Copyright information
© 1993 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hanus, M., Josephs, B. (1993). A debugging model for functional logic programs. In: Bruynooghe, M., Penjam, J. (eds) Progamming Language Implementation and Logic Programming. PLILP 1993. Lecture Notes in Computer Science, vol 714. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57186-8_69
Download citation
DOI: https://doi.org/10.1007/3-540-57186-8_69
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-57186-5
Online ISBN: 978-3-540-47945-1
eBook Packages: Springer Book Archive