PLILP 1993: Progamming Language Implementation and Logic Programming pp 28-43 | Cite as
A debugging model for functional logic programs
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.
Keywords
Logic Program Logic Programming Operational Semantic Logic Language Functional LanguagePreview
Unable to display preview. Download preview PDF.
References
- 1.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.Google Scholar
- 2.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.Google Scholar
- 3.L. Byrd. Understanding the Control Flow of Prolog Programs. In Proc. of the Workshop on Logic Programming, Debrecen, 1980.Google Scholar
- 4.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.Google Scholar
- 5.D. DeGroot and G. Lindstrom, editors. Logic Programming, Functions, Relations, and Equations. Prentice Hall, 1986.Google Scholar
- 6.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.Google Scholar
- 7.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.Google Scholar
- 8.M. Eisenstadt. A Powerful Prolog Trace Package. In Advances in Artificial Intelligence, pp. 149–158. Elsevier Science Publishers, 1985.Google Scholar
- 9.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.Google Scholar
- 10.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.Google Scholar
- 11.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.Google Scholar
- 12.M. Hanus. Efficient Implementation of Narrowing and Rewriting. In Proc. Int. Workshop on Processing Declarative Knowledge, pp. 344–365. Springer LNAI 567, 1991.Google Scholar
- 13.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.Google Scholar
- 14.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.Google Scholar
- 15.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.Google Scholar
- 16.S. Hölldobler. Foundations of Equational Logic Programming. Springer LNCS 353, 1989.Google Scholar
- 17.J.-M. Hullot. Canonical Forms and Unification. In Proc. 5th Conference on Automated Deduction, pp. 318–334. Springer LNCS 87, 1980.Google Scholar
- 18.B. Josephs. The development of a debugger for the functional logic language ALF (in German). Diploma thesis, Univ. Dortmund, 1992.Google Scholar
- 19.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.Google Scholar
- 20.R. Loogen. From Reduction Machines to Narrowing Machines. In Proc. of the TAPSOFT '91, pp. 438–457. Springer LNCS 494, 1991.Google Scholar
- 21.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.Google Scholar
- 22.W. Nutt, P. Réty, and G. Smolka. Basic Narrowing Revisited. Journal of Symbolic Computation, Vol. 7, pp. 295–317, 1989.Google Scholar
- 23.P. Padawitz. Computing in Horn Clause Theories, volume 16 of EATCS Monographs on Theoretical Computer Science. Springer, 1988.Google Scholar
- 24.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.Google Scholar
- 25.U.S. Reddy. Narrowing as the Operational Semantics of Functional Languages. In Proc. IEEE Internat. Symposium on Logic Programming, pp. 138–151, Boston, 1985.Google Scholar
- 26.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.Google Scholar
- 27.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.Google Scholar
- 28.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.Google Scholar