Abstract
Program traces are a sound basis for explaining the dynamic behavior of programs. Alas, program traces can grow big very quickly, even for small programs, which diminishes their value as explanations.
In this paper we demonstrate how the systematic simplification of traces can yield succinct program explanations. Specifically, we introduce operations for transforming traces that facilitate the abstraction of details. The operations are the basis of a query language for the definition of trace filters that can adapt and simplify traces in a variety of ways.
The generation of traces is governed by a variant of Call-By-Value semantics which specifically supports parsimony in trace representations. We show that our semantics is a conservative extension of Call-By-Value that can produce smaller traces and that the evaluation traces preserve the explanatory content of proof trees at a much smaller footprint.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
Or
, if the closure is recursive.
References
Acar, U.A., Ahmed, A., Cheney, J., Perera, R.: A core calculus for provenance. In: Degano, P., Guttman, J.D. (eds.) POST 2012. LNCS, vol. 7215, pp. 410–429. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-28641-4_22
Bajaj, D., Erwig, M., Fedorin, D., Gay, K.: A visual notation for succinct program traces. In: IEEE International Symposium on Visual Languages and Human-Centric Computing (2021, to appear)
Dunchev, C., et al.: PROOFTOOL: a GUI for the GAPT framework. Electron. Proc. Theor. Comput. Sci. 118, 1–14 (2013)
Erwig, M., Kumar, P.: Explainable dynamic programming. J. Funct. Program. 31, e10 (2021)
Ferrand, G., Lesaint, W., Tessier, A.: Explanations and proof trees. Comput. Inform. 25, 105–125 (2006)
Gill, A.: Debugging Haskell by observing intermediate data structures. Electron. Notes Theor. Comput. Sci. 41(1), 1 (2001)
Khoo, Y.P., Foster, J.S., Hicks, M.: Expositor: scriptable time-travel debugging with first-class traces. In: International Conference on Software Engineering, pp. 352–361 (2013)
Ko, A.J., Myers, B.A.: Finding causes of program output with the Java Whyline. In: SIGCHI Conference on Human Factors in Computing Systems, pp. 1569–1578 (2009)
Marceau, G., Cooper, G.H., Spiro, J.P., Krishnamurthi, S., Reiss, S.P.: The design and implementation of a dataflow language for scriptable debugging. Autom. Softw. Eng. 14(1), 59–86 (2007). https://doi.org/10.1007/s10515-006-0003-z
Nilsson, H., Fritzson, P.: Algorithmic debugging for lazy functional languages. J. Funct. Program. 4(3), 337–369 (1994)
Parnin, C., Orso, A.: Are automated debugging techniques actually helping programmers? In: International Symposium on Software Testing and Analysis, pp. 199–209 (2011)
Perera, R., Acar, U.A., Cheney, J., Levy, P.B.: Functional programs that explain their work. In: ACM International Conference on Functional Programming, pp. 365–376 (2012)
Ricciotti, W., Stolarek, J., Perera, R., Cheney, J.: Imperative functional programs that explain their work. Proc. ACM Program. Lang. 1(ICFP), 1–28 (2017)
Roehm, T., Tiarks, R., Koschke, R., Maalej, W.: How do professional developers comprehend software? In: International Conference on Software Engineering, pp. 255–265 (2012)
Vessey, I.: Expertise in debugging computer programs: an analysis of the content of verbal protocols. IEEE Trans. Syst. Man Cybern. 16(5), 621–637 (1986)
Visser, E., Benaissa, Z., Tolmach, A.: Building program optimizers with rewriting strategies. In: ACM International Conference on Functional Programming, pp. 13–26 (1998)
Acknowledgements
This work is partially supported by the National Science Foundation under the grants CCF-1717300, DRL-1923628, and CCF-2114642.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Bajaj, D., Erwig, M., Fedorin, D., Gay, K. (2021). Adaptable Traces for Program Explanations. In: Oh, H. (eds) Programming Languages and Systems. APLAS 2021. Lecture Notes in Computer Science(), vol 13008. Springer, Cham. https://doi.org/10.1007/978-3-030-89051-3_12
Download citation
DOI: https://doi.org/10.1007/978-3-030-89051-3_12
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-89050-6
Online ISBN: 978-3-030-89051-3
eBook Packages: Computer ScienceComputer Science (R0)