Skip to main content

Algorithm Explanation: Visualizing Abstract States and Invariants

  • Conference paper
  • First Online:
Software Visualization

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2269))

Abstract

Software visualization provides methods to facilitate the understanding of algorithms and programs. Practically all existing visualization systems actually execute the code to be visualized on sample input data. In this paper, we propose a novel approach to algorithm explanation based on static program analysis, specifically shape analysis. Shape analysis of a program operating on heap-based data structures analyzes the program to find out relevant properties of its heap contents. The shape analysis we are using is parameterized with sets of observation properties, which are relevant properties of heap elements. Shape analysis associates sets of shape graphs with program points. These graphs describe both structural properties and non-structural properties such as sortedness. By summarizing sets of undistinguishable heap cells shape analysis supports focusing on active parts of the data structure. By computing the program’s invariants it provides the basis for their visualization. After the application of the shape analysis the program is visually abstractly executed, i.e., traversed with a strategy corresponding to a meaningful explanation. Showing a sequence of shape graphs produced along a program path demonstrates how invariants are temporarily violated and then restored.

supported by the Deutsche Forschungsgemeinschaft, Project Ganimal

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. Sagiv, M., Reps, T., Wilhelm, R.: Parametric shape-analysis. In: Proc. of ACM SIGACTSIGPLAN Symposium on Principles of Programming Languages, St. Antonio, Texas, (1999), extended version to appear in ACM Transactions on Programming Languages and Systems (TOPLAS).

    Google Scholar 

  2. Lev-Ami, T., Reps, T., Mooly, S., Wilhelm, R.: Putting static analysis to work for verification: A case study. Proceedings of the International Symposium on Software Testing and Analysis, Portland, Oregon, USA (2000) 26–38

    Google Scholar 

  3. Aho, A.V., Hopcroft, J.E., Ullman, J. D.: Data Structures and Algorithms. Addison-Wesley, Reading, Mass. (1983)

    Google Scholar 

  4. Nielson, F., Riis Nielson, H., Hankin, C.: Principles of Program Analysis. Springer-Verlag, (1999)

    Google Scholar 

  5. Cousot, P., Cousot R.: Systematic design of program analysis frameworks. Conference Record of the Sixth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, ACM Press, New York, U.S.A., San Antonio, Texas, (1979) 269–282

    Google Scholar 

  6. Braune, B., Wilhelm, R.: Focusing in algorithm explanation. Transactions on Visualization and Computer Graphics, 6(1), (2000) 1–7

    Article  Google Scholar 

  7. Michail, A.: Teaching Binary Tree Algorithms though Visual Programming. In Symposium on Visual Languages, IEEE, (1996) 38–45

    Google Scholar 

  8. Wenger, R.: Helly-Type Theorems and Geometric Transversals. In J.E. Goodman, J. O'Rourke (Eds.): Handbook of Discrete and Computational Geometry, CRC Press, (1997)

    Google Scholar 

  9. Demetrescu C., Finocchi, I. and J. Stasko.: Specifying Algorithm Visualizations: Interesting Events or State Mapping? In this volume, p. 105.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Wilhelm, R., Müldner, T., Seidel, R. (2002). Algorithm Explanation: Visualizing Abstract States and Invariants. In: Diehl, S. (eds) Software Visualization. Lecture Notes in Computer Science, vol 2269. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45875-1_30

Download citation

  • DOI: https://doi.org/10.1007/3-540-45875-1_30

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-43323-1

  • Online ISBN: 978-3-540-45875-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics