Visualizing the Evaluation of Functional Programs for Debugging

Authors John Whitington, Tom Ridge



PDF
Thumbnail PDF

File

OASIcs.SLATE.2017.7.pdf
  • Filesize: 379 kB
  • 9 pages

Document Identifiers

Author Details

John Whitington
Tom Ridge

Cite AsGet BibTex

John Whitington and Tom Ridge. Visualizing the Evaluation of Functional Programs for Debugging. In 6th Symposium on Languages, Applications and Technologies (SLATE 2017). Open Access Series in Informatics (OASIcs), Volume 56, pp. 7:1-7:9, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2017)
https://doi.org/10.4230/OASIcs.SLATE.2017.7

Abstract

In this position paper, we present a prototype of a visualizer for functional programs. Such programs, whose evaluation model is the reduction of an expression to a value through repeated application of rewriting rules, and which tend to make little or no use of mutable state, are amenable to visualization in the same fashion as simple mathematical expressions, with which every schoolchild is familiar. We show how such visualizations may be produced for the strict functional language OCaml, by direct interpretation of the abstract syntax tree and appropriate pretty-printing. We describe (and begin to address) the challenges of presenting such program traces in limited space and of identifying their essential elements, so that our methods will one day be practical for more than toy programs. We consider the problems posed by the parts of modern functional programming which are not purely functional such as mutable state, input/output and exceptions. We describe initial work on the use of such visualizations to address the problem of program debugging, which is our ultimate aim.
Keywords
  • Debugging
  • Functional
  • Visualization
  • OCaml

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Mikhail Auguston and Juris Reinfields. A visual Miranda machine. In Software Education Conference, pages 198-203, November 1994. Google Scholar
  2. Robert Bruce Finder, John Clements, Cormac Flanagan, Matthew Flatt, Shriram Krishnamurthi, Paull Steckler, and Matthias Felleisen. DrScheme: A programming environment for Scheme. Journal of Functional Programming, 12(2):159-182, March 2002. Google Scholar
  3. Andy Gill. Debugging Haskell by observing intermediate data structures. Technical report, University of Nottingham, 2000. Google Scholar
  4. Doug Goldson. A symbolic calculator for non-strict functional programs. The Computer Journal, 37(3):177-187, 1993. Google Scholar
  5. Henry Lieberman. The debugging scandal and what to do about it. Communications of the ACM, 40(4), April 1997. Google Scholar
  6. Simon Marlow, José Iborra, Bernard Pope, and Andy Gill. A lightweight interactive debugger for Haskell. In ACM SIGPLAN Workshop on Haskell Workshop, pages 13-24. ACM, 2007. Google Scholar
  7. Cristóbal Pareja-Flores, Jaime Urquiza-Fuentes, and J. Ángel Velázquez-Iturbide. WinHIPE: An IDE for functional programming based on rewriting and visualization. ACM SIGPLAN Notices, 42(3):14-23, March 2007. Google Scholar
  8. Marian Petre and Ed de Quincey. A gentle overview of software visualization. PPIG Newsletter, pages 1-10, September 2006. Google Scholar
  9. Steve Reeves, Doug Goldson, Pat Fung, Mike Hopkins, and Richard Bornat. The Calculator project - formal reasoning about programs. In Software Education Conference, pages 166-173, November 1994. Google Scholar
  10. Hina Shah, Carsten Görg, and Mary Jean Harrold. Visualization of exception handling constructs to support program understanding. In 4th ACM Symposium on Software Visualization, pages 19-28, 2008. Google Scholar
  11. Juha Sorva, Ville Karavirta, and Lauri Malmi. A review of generic program visualization systems for introductory programming education. Transactions on Computing Education, 13(4):15:1-15:64, November 2013. Google Scholar
  12. Jonathan Paul Taylor. Presenting the Lazy Evaluation of Functions. PhD thesis, Queen Mary, University of London, 1996. Google Scholar
  13. Andrew Tolmach and Andrew W. Appel. A debugger for Standard ML. Journal of Functional Programming, 5(2):155-200, April 1995. Google Scholar
  14. David S. Touretzky. Visualizing evaluation in applicative languages. Communications of the ACM, 35(10):49-59, October 1989. Google Scholar
  15. David Ungar, Henry Lieberman, and Christopher Fry. Debugging and the experience of immediacy. Communications of the ACM, 40(4):38-43, April 1997. Google Scholar
  16. Jaime Urquiza-Fuentes and J. Ángel Velázquez-Iturbide. A survey of program visualizations for the functional paradigm. In 3rd Program Visualization Workshop, pages 2-9, 2004. Google Scholar
  17. Jaime Urquiza-Fuentes and J. Ángel Velázquez-Iturbide. A survey of successful evaluations of program visualisation and algorithm animation systems. Transactions on Computing Education, 9(2):9:1-9:21, June 2009. Google Scholar
  18. Philip Wadler. Why no one uses functional languages. The SIGPLAN Notices, 33(8):23-27, August 1998. URL: http://dx.doi.org/10.1145/286385.286387.
  19. Malcolm Wallace, Olaf Chitil, Thorsten Brehm, and Colin Runciman. Multiple-view tracing for Haskell: a new Hat. In ACM SIGPLAN Haskell Workshop, pages 151-170, 2001. Google Scholar
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail