Skip to main content

Advertisement

SpringerLink
Log in
Menu
Find a journal Publish with us
Search
Cart
Book cover

International Conference on Compiler Construction

CC 2012: Compiler Construction pp 81–100Cite as

  1. Home
  2. Compiler Construction
  3. Conference paper
A New Method for Program Inversion

A New Method for Program Inversion

  • Cong Hou17,
  • George Vulov17,
  • Daniel Quinlan18,
  • David Jefferson18,
  • Richard Fujimoto17 &
  • …
  • Richard Vuduc17 
  • Conference paper
  • 955 Accesses

  • 7 Citations

Part of the Lecture Notes in Computer Science book series (LNTCS,volume 7210)

Abstract

Program inversion has been successfully applied to several areas such as optimistic parallel discrete event simulation (OPDES) and reverse debugging. This paper introduces a new program inversion algorithm for imperative languages, and focuses on handling arbitrary control flows and basic operations. By building a value search graph that represents recoverability relationships between variable values, we turn the problem of recovering previous values into a graph search one. Forward and reverse code is generated according to the search results. We have implemented our algorithm as part of a compiler framework named Backstroke, a C++ source-to-source translator based on ROSE compiler. Backstroke targets optimistic simulation codes and automatically generates a reverse function to recover values modified by a target function. Experimental results show that our method is effective and produces better performance than previously proposed methods.

Keywords

  • Program inversion
  • SSA
  • SSA graph
  • reverse computation
  • state saving
  • ROSE

Download conference paper PDF

References

  1. Abramov, S., Glück, R.: The Universal Resolving Algorithm: Inverse Computation in a Functional Language. Science of Computer Programming 43(2-3), 193–229 (2002)

    CrossRef  MathSciNet  MATH  Google Scholar 

  2. Akgul, T., Mooney III, V.J.: Assembly instruction level reverse execution for debugging. ACM Transactions on Software Engineering and Methodology 13(2), 149–198 (2004)

    CrossRef  Google Scholar 

  3. Alpern, B., Wegman, M.N., Kenneth, F.: Detecting Equality of Variables in Programs. In: PPL (January 1988)

    Google Scholar 

  4. Ball, T., Larus, J.R.: Optimally profiling and tracing programs. ACM Transactions on Programming Languages and Systems 16(4), 1319–1360 (1994)

    CrossRef  Google Scholar 

  5. Ball, T., Larus, J.R.: Efficient Path Profiling. In: MICRO 1996, pp. 46–57 (1996)

    Google Scholar 

  6. Biswas, B., Mall, R.: Reverse execution of programs. ACM SIGPLAN Notices 34(4), 61–69 (1999)

    CrossRef  Google Scholar 

  7. Briggs, J.S.: Generating reversible programs. Software: Practice and Experience 17(7), 439–453 (1987)

    CrossRef  Google Scholar 

  8. Carothers, C.D., Perumalla, K.S., Fujimoto, R.M.: Efficient Optimistic Parallel Simulations Using Reverse Computation. In: PADS (1999)

    Google Scholar 

  9. Chow, F., Chan, S., Liu, S.-M., Lo, R., Streich, M.: Effective Representation of Aliases and Indirect Memory Operations in SSA Form. In: Gyimóthy, T. (ed.) CC 1996. LNCS, vol. 1060, pp. 253–267. Springer, Heidelberg (1996)

    CrossRef  Google Scholar 

  10. Cooper, K.D., Taylor Simpson, L., Vick, C.A.: Operator strength reduction. ACM Transactions on Programming Languages and Systems 23(5), 603–625 (2001)

    CrossRef  Google Scholar 

  11. Cytron, R., Ferrante, J., Rosen, B.K., Wegman, M.N., Zadeck, F.K.: Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems 13(4), 451–490 (1991)

    CrossRef  Google Scholar 

  12. Ferrante, J., Ottenstein, K.J., Warren, J.D.: The program dependence graph and its use in optimization. ACM Transactions on Programming Languages and Systems 9(3), 319–349 (1987)

    CrossRef  MATH  Google Scholar 

  13. Fink, S., Knobe, K., Sarkar, V.: Unified Analysis of Array and Object References in Strongly Typed Languages. In: SAS 2000. LNCS, vol. 1824, pp. 155–174. Springer, Heidelberg (2000)

    CrossRef  Google Scholar 

  14. Fujimoto, R.M.: Parallel and Distributed Simulation Systems. Wiley (2000)

    Google Scholar 

  15. Glück, R., Kawabe, M.: Revisiting an automatic program inverter for Lisp. ACM SIGPLAN Notices 40(5), 8–17 (2005)

    CrossRef  Google Scholar 

  16. Jefferson, D.R.: Virtual time. ACM Transactions on Programming Languages and Systems 7(3), 404–425 (1985)

    CrossRef  MathSciNet  Google Scholar 

  17. Kawabe, M., Glück, R.: The Program Inverter LRinv and Its Structure. In: Hermenegildo, M.V., Cabeza, D. (eds.) PADL 2004. LNCS, vol. 3350, pp. 219–234. Springer, Heidelberg (2005)

    CrossRef  Google Scholar 

  18. Knobe, K., Sarkar, V.: Array SSA form and its use in parallelization. In: POPL 1998, pp. 107–120. ACM Press, New York (1998)

    CrossRef  Google Scholar 

  19. Muchnick, S.S.: Advanced Compiler Design and Implementation (1997)

    Google Scholar 

  20. Ross, B.J.: Running programs backwards: The logical inversion of imperative computation. Formal Aspects of Computing 9(3), 331–348 (1997)

    CrossRef  MATH  Google Scholar 

  21. Srivastava, S., Gulwani, S., Chaudhuri, S., Foster, J.S.: Path-based inductive synthesis for program inversion. In: PLDI 2011, p. 492. ACM Press, New York (2011)

    Google Scholar 

Download references

Author information

Authors and Affiliations

  1. Georgia Institute of Technology, Atlanta, GA, 30332, USA

    Cong Hou, George Vulov, Richard Fujimoto & Richard Vuduc

  2. Lawrence Livermore National Laboratory, Livermore, CA, 94551, USA

    Daniel Quinlan & David Jefferson

Authors
  1. Cong Hou
    View author publications

    You can also search for this author in PubMed Google Scholar

  2. George Vulov
    View author publications

    You can also search for this author in PubMed Google Scholar

  3. Daniel Quinlan
    View author publications

    You can also search for this author in PubMed Google Scholar

  4. David Jefferson
    View author publications

    You can also search for this author in PubMed Google Scholar

  5. Richard Fujimoto
    View author publications

    You can also search for this author in PubMed Google Scholar

  6. Richard Vuduc
    View author publications

    You can also search for this author in PubMed Google Scholar

Editor information

Editors and Affiliations

  1. School for Informatics, University of Edinburgh, 10 Crichton Street, EH8 9AB, Edinburgh, UK

    Michael O’Boyle

Rights and permissions

Reprints and Permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hou, C., Vulov, G., Quinlan, D., Jefferson, D., Fujimoto, R., Vuduc, R. (2012). A New Method for Program Inversion. In: O’Boyle, M. (eds) Compiler Construction. CC 2012. Lecture Notes in Computer Science, vol 7210. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-28652-0_5

Download citation

  • .RIS
  • .ENW
  • .BIB
  • DOI: https://doi.org/10.1007/978-3-642-28652-0_5

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-28651-3

  • Online ISBN: 978-3-642-28652-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Share this paper

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

Search

Navigation

  • Find a journal
  • Publish with us

Discover content

  • Journals A-Z
  • Books A-Z

Publish with us

  • Publish your research
  • Open access publishing

Products and services

  • Our products
  • Librarians
  • Societies
  • Partners and advertisers

Our imprints

  • Springer
  • Nature Portfolio
  • BMC
  • Palgrave Macmillan
  • Apress
  • Your US state privacy rights
  • Accessibility statement
  • Terms and conditions
  • Privacy policy
  • Help and support

167.114.118.210

Not affiliated

Springer Nature

© 2023 Springer Nature