Skip to main content

Adaptable Traces for Program Explanations

  • Conference paper
  • First Online:
Programming Languages and Systems (APLAS 2021)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 13008))

Included in the following conference series:

  • 572 Accesses

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.

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 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.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

Notes

  1. 1.

    Or , if the closure is recursive.

References

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

    Chapter  Google Scholar 

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

    Google Scholar 

  3. Dunchev, C., et al.: PROOFTOOL: a GUI for the GAPT framework. Electron. Proc. Theor. Comput. Sci. 118, 1–14 (2013)

    Article  Google Scholar 

  4. Erwig, M., Kumar, P.: Explainable dynamic programming. J. Funct. Program. 31, e10 (2021)

    Article  MathSciNet  Google Scholar 

  5. Ferrand, G., Lesaint, W., Tessier, A.: Explanations and proof trees. Comput. Inform. 25, 105–125 (2006)

    MathSciNet  MATH  Google Scholar 

  6. Gill, A.: Debugging Haskell by observing intermediate data structures. Electron. Notes Theor. Comput. Sci. 41(1), 1 (2001)

    Article  Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Article  Google Scholar 

  10. Nilsson, H., Fritzson, P.: Algorithmic debugging for lazy functional languages. J. Funct. Program. 4(3), 337–369 (1994)

    Article  Google Scholar 

  11. Parnin, C., Orso, A.: Are automated debugging techniques actually helping programmers? In: International Symposium on Software Testing and Analysis, pp. 199–209 (2011)

    Google Scholar 

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

    Google Scholar 

  13. Ricciotti, W., Stolarek, J., Perera, R., Cheney, J.: Imperative functional programs that explain their work. Proc. ACM Program. Lang. 1(ICFP), 1–28 (2017)

    Article  Google Scholar 

  14. Roehm, T., Tiarks, R., Koschke, R., Maalej, W.: How do professional developers comprehend software? In: International Conference on Software Engineering, pp. 255–265 (2012)

    Google Scholar 

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

    Article  Google Scholar 

  16. Visser, E., Benaissa, Z., Tolmach, A.: Building program optimizers with rewriting strategies. In: ACM International Conference on Functional Programming, pp. 13–26 (1998)

    Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Divya Bajaj .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics