Skip to main content

A Program Transformation for Tracing Functional Logic Computations

  • Conference paper
Logic-Based Program Synthesis and Transformation (LOPSTR 2006)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4407))

  • 291 Accesses

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.

This work has been partially supported by the DFG under grant Ha 2457/5-1.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  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)

    Article  MATH  MathSciNet  Google Scholar 

  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. 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. 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)

    Chapter  Google Scholar 

  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. 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)

    Chapter  Google Scholar 

  7. Gill, A.: Debugging Haskell by observing intermediate datastructures. Electronic Notes in Theoretical Computer Science 41(1) (2001)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  9. Hanus, M. (ed.): Curry: An integrated functional logic language (1997), Available at, http://www-i2.informatik.rwth-aachen.de/~hanus/curry

  10. Hughes, J.: A novel representation of lists and its application to the function “reverse”. Inf. Process. Lett. 22(3), 141–144 (1986)

    Article  Google Scholar 

  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. Nilsson, H., Sparud, J.: The Evaluation Dependence Tree as a Basis for Lazy Functional Debugging. Automated Software Engineering 4(2), 121–150 (1997)

    Article  Google Scholar 

  13. Jones, S.P. (ed.): Haskell 98 Language and Libraries—The Revised Report. Cambridge University Press, Cambridge (2003)

    Google Scholar 

  14. Shapiro, E.: Algorithmic Program Debugging. MIT Press, Cambridge (1983)

    Google Scholar 

  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)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Germán Puebla

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer Berlin Heidelberg

About this paper

Cite this paper

Brassel, B., Fischer, S., Huch, F. (2007). A Program Transformation for Tracing Functional Logic Computations. In: Puebla, G. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2006. Lecture Notes in Computer Science, vol 4407. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-71410-1_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-71410-1_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-71409-5

  • Online ISBN: 978-3-540-71410-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics