A Program Transformation for Tracing Functional Logic Computations

  • Bernd Brassel
  • Sebastian Fischer
  • Frank Huch
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4407)

Abstract

Tracing program executions is a promising technique to find bugs in lazy functional logic programs. In previous work we developed an extension of a heap based semantics for functional logic languages which generates a trace reflecting the computation of the program. This extension was also prototypically implemented by instrumenting an interpreter for functional logic programs. Since this interpreter is too restricted for real world applications, we developed a program transformation which efficiently computes the trace by means of side effects during the computation. This paper presents our program transformation.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Albert, E., Hanus, M., Huch, F., Oliver, J., Vidal, G.: Operational semantics for declarative multi-paradigm languages. Journal of Symbolic Computation 40(1), 795–829 (2005)MATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Antoy, S., Johnson, S.: TeaBag: A functional logic language debugger. In: Kuchen, H. (ed.) Proc. of the 13th International Workshop on Functional and (constraint) Logic Programming (WFLP’04), Aachen, Germany, June, pp. 4–18 (2004)Google Scholar
  3. 3.
    Braßel, B., Chitil, O., Hanus, M., Huch, F.: Observing functional logic computations. In: Jayaraman, B. (ed.) PADL 2004. LNCS, vol. 3057, pp. 193–208. Springer, Heidelberg (2004)Google Scholar
  4. 4.
    Braßel, B., Hanus, M., Huch, F., Vidal, G.: A semantics for tracing declarative multi-paradigm programs. In: Proceedings of the 6th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP’04), pp. 179–190. ACM Press, New York (2004)CrossRefGoogle Scholar
  5. 5.
    Caballero, R., Rodríguez-Artalejo, M.: DDT: a declarative debugging tool for functional-logic languages. In: Kameyama, Y., Stuckey, P.J. (eds.) FLOPS 2004. LNCS, vol. 2998, pp. 70–84. Springer, Heidelberg (2004)Google Scholar
  6. 6.
    Chitil, O., Runciman, C., Wallace, M.: Freja, hat and hood – a comparative evaluation of three systems for tracing and debugging lazy functional programs. In: Mohnen, M., Koopman, P. (eds.) IFL 2000. LNCS, vol. 2011, pp. 176–193. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  7. 7.
    Gill, A.: Debugging Haskell by observing intermediate datastructures. Electronic Notes in Theoretical Computer Science 41(1) (2001)Google Scholar
  8. 8.
    Hanus, M.: Distributed Programming in a Multi-Paradigm Declarative Language. In: Nadathur, G. (ed.) PPDP 1999. LNCS, vol. 1702, pp. 376–395. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  9. 9.
    Hanus, M. (ed.): Curry: An integrated functional logic language (1997), Available at, http://www-i2.informatik.rwth-aachen.de/~hanus/curry
  10. 10.
    Hughes, J.: A novel representation of lists and its application to the function “reverse”. Inf. Process. Lett. 22(3), 141–144 (1986)CrossRefGoogle Scholar
  11. 11.
    López-Fraguas, F., Sánchez-Hernández, J.: TOY: A multiparadigm declarative system. In: Narendran, P., Rusinowitch, M. (eds.) RTA 1999. LNCS, vol. 1631, pp. 244–247. Springer, Heidelberg (1999)Google Scholar
  12. 12.
    Nilsson, H., Sparud, J.: The Evaluation Dependence Tree as a Basis for Lazy Functional Debugging. Automated Software Engineering 4(2), 121–150 (1997)CrossRefGoogle Scholar
  13. 13.
    Jones, S.P. (ed.): Haskell 98 Language and Libraries—The Revised Report. Cambridge University Press, Cambridge (2003)Google Scholar
  14. 14.
    Shapiro, E.: Algorithmic Program Debugging. MIT Press, Cambridge (1983)Google Scholar
  15. 15.
    Sparud, J., Runciman, C.: Tracing Lazy Functional Computations Using Redex Trails. In: Hartel, P.H., Kuchen, H. (eds.) PLILP 1997. LNCS, vol. 1292, pp. 291–308. Springer, Heidelberg (1997)CrossRefGoogle Scholar

Copyright information

© Springer Berlin Heidelberg 2007

Authors and Affiliations

  • Bernd Brassel
    • 1
  • Sebastian Fischer
    • 1
  • Frank Huch
    • 1
  1. 1.Institute of Computer Science, University of Kiel, 24098 KielGermany

Personalised recommendations