License: Creative Commons Attribution 3.0 Unported license (CC BY 3.0)
When quoting this document, please refer to the following
DOI: 10.4230/OASIcs.SLATE.2017.7
URN: urn:nbn:de:0030-drops-79420
Go to the corresponding OASIcs Volume Portal

Whitington, John ; Ridge, Tom

Visualizing the Evaluation of Functional Programs for Debugging

OASIcs-SLATE-2017-7.pdf (0.4 MB)


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.

BibTeX - Entry

  author =	{John Whitington and Tom Ridge},
  title =	{{Visualizing the Evaluation of Functional Programs for Debugging}},
  booktitle =	{6th Symposium on Languages, Applications and Technologies (SLATE 2017)},
  pages =	{7:1--7:9},
  series =	{OpenAccess Series in Informatics (OASIcs)},
  ISBN =	{978-3-95977-056-9},
  ISSN =	{2190-6807},
  year =	{2017},
  volume =	{56},
  editor =	{Ricardo Queir{\'o}s and M{\'a}rio Pinto and Alberto Sim{\~o}es and Jos{\'e} Paulo Leal and Maria Jo{\~a}o Varanda},
  publisher =	{Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{},
  URN =		{urn:nbn:de:0030-drops-79420},
  doi =		{10.4230/OASIcs.SLATE.2017.7},
  annote =	{Keywords: Debugging, Functional, Visualization, OCaml}

Keywords: Debugging, Functional, Visualization, OCaml
Collection: 6th Symposium on Languages, Applications and Technologies (SLATE 2017)
Issue Date: 2017
Date of publication: 04.10.2017

DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI