DOE PAGES title logo U.S. Department of Energy
Office of Scientific and Technical Information

Title: Automatic inspection of program state in an uncooperative environment

Journal Article · · Software, Practice and Experience
DOI: https://doi.org/10.1002/spe.3146 · OSTI ID:1897788
 [1];  [2]; ORCiD logo [1]
  1. Computer Science Department UFMG Belo Horizonte Brazil
  2. Center for Applied Scientific Computing Lawrence Livermore National Laboratory Livermore California USA

Abstract The program state is formed by the values that the program manipulates. These values are stored in the stack, in the heap, or in static memory. The ability to inspect the program state is useful as a debugging or as a verification aid. Yet, there exists no general technique to insert inspection points in type‐unsafe languages such as C or C++. The difficulty comes from the need to traverse the memory graph in a so‐called uncooperative environment. In this article, we propose an automatic technique to deal with this problem. We introduce a static code transformation approach that inserts in a program the instrumentation necessary to report its internal state. Our technique has been implemented in LLVM. It is possible to adjust the granularity of inspection points trading precision for performance. In this article, we demonstrate how to use inspection points to debug compiler optimizations; to augment benchmarks with verification code; and to visualize data structures.

Sponsoring Organization:
USDOE
OSTI ID:
1897788
Journal Information:
Software, Practice and Experience, Journal Name: Software, Practice and Experience Journal Issue: 12 Vol. 52; ISSN 0038-0644
Publisher:
Wiley Blackwell (John Wiley & Sons)Copyright Statement
Country of Publication:
United Kingdom
Language:
English

References (37)

Two decades of live coding and debugging of virtual machines through simulation journal May 2020
Practical dynamic reconstruction of control flow graphs journal October 2020
Finite‐state model extraction and visualization from Java program execution journal October 2020
Garbage collection in an uncooperative environment journal September 1988
Debugging with dynamic slicing and backtracking journal June 1993
Black-Box Equivalence Checking Across Compiler Optimizations book January 2017
Synthesizing benchmarks for predictive modeling conference February 2017
JIT trace-based verification for high-level synthesis conference December 2015
Program Lifting using Gray-Box Behavior conference September 2021
Practical analysis of stripped binary code journal December 2005
Valgrind: a framework for heavyweight dynamic binary instrumentation journal June 2007
Animating algorithms with XTANGO journal May 1992
Formal verification of a realistic compiler journal July 2009
Precise garbage collection for C conference June 2009
Space efficient conservative garbage collection journal June 1993
Heapviz conference January 2010
Data structure visualization conference January 2010
Finding and understanding bugs in C compilers journal June 2011
Evaluating value-graph translation validation for LLVM journal June 2011
Automated construction of JavaScript benchmarks journal October 2011
Program visualization as a debugging tool for novices conference January 1993
Compiler validation via equivalence modulo inputs journal June 2014
Solving shape-analysis problems in languages with destructive updating journal January 1998
Defining the undefinedness of C journal August 2015
Use at your own risk: the Java unsafe API in the wild journal December 2015
Finding compiler bugs via live code mutation journal December 2016
Heaps don't lie: countering unsoundness with heap snapshots
  • Grech, Neville; Fourtounis, George; Francalanza, Adrian
  • Proceedings of the ACM on Programming Languages, Vol. 1, Issue OOPSLA https://doi.org/10.1145/3133892
journal October 2017
Compiler fuzzing through deep learning conference July 2018
Compare less, defer more: scaling value-contexts based whole-program heap analyses conference January 2019
Two-tier garbage collection for persistent object conference March 2020
Mix your contexts well: opportunities unleashed by recent advances in scaling context-sensitivity conference February 2020
Sound garbage collection for C using pointer provenance
  • Banerjee, Subarno; Devecsery, David; Chen, Peter M.
  • Proceedings of the ACM on Programming Languages, Vol. 4, Issue OOPSLA https://doi.org/10.1145/3428244
journal November 2020
Counterexample-guided correlation algorithm for translation validation journal November 2020
ExeBench: an ML-scale dataset of executable C functions conference June 2022
Translation validation for an optimizing compiler journal May 2000
An efficient method of computing static single assignment form
  • Cytron, R.; Ferrante, J.; Rosen, B. K.
  • Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages - POPL '89 https://doi.org/10.1145/75277.75280
conference January 1989
Comparing mark-and sweep and stop-and-copy garbage collection conference January 1990

Similar Records

Licensee contractor and vendor inspection status report
Technical Report · 1990 · OSTI ID:6435156

Archer
Software · 2017 · OSTI ID:1349027

Enabling human–infrastructure interfaces for inspection using augmented reality
Journal Article · 2020 · Structural Health Monitoring · OSTI ID:1735768

Related Subjects