Skip to main content

Synthesizing Loops for Program Inversion

  • Conference paper
Reversible Computation (RC 2012)

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

Included in the following conference series:

  • 1057 Accesses

Abstract

We propose a new automatic program inversion method for imperative programs that contain loops. In particular, given a loop that produces an output state given a particular input state, our method can synthesize an inverse loop that reconstructs the input state given the original loop’s output state. The synthesis process consists of two major components: (a) building the inverse loop’s body, and (b) building the inverse loop’s predicate. Our method works for all natural loops, including those that take early exits (e.g., via breaks, gotos, returns). This work extends a program analysis and synthesis framework, called Backstroke, that we developed in prior work.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

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.

Similar content being viewed by others

References

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

    Article  Google Scholar 

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

    Article  Google Scholar 

  3. Hou, C., Vulov, G., Quinlan, D., Jefferson, D., Fujimoto, R., Vuduc, R.: A New Method for Program Inversion. In: O’Boyle, M. (ed.) CC 2012. LNCS, vol. 7210, pp. 81–100. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

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

    Article  MathSciNet  Google Scholar 

  5. Muchnick, S.S.: Advanced Compiler Design Implementation. Morgan Kaufmann Publishers (1997)

    Google Scholar 

  6. Pratt, V.R.: Semantical consideration on floyo-hoare logic. In: 17th Annual Symposium on Foundations of Computer Science (1976)

    Google Scholar 

  7. Ballance, R.A., Maccabe, A.B., Ottenstein, K.J.: The Program Dependence Web: A Representation Supporting Control-, Data-, and Demand-Driven Interpretation of Imperative Language. In: PLDI 1990 (1990)

    Google Scholar 

  8. Roşu, G., Ellison, C., Schulte, W.: Matching Logic: An Alternative to Hoare/Floyd Logic. In: Johnson, M., Pavlovic, D. (eds.) AMAST 2010. LNCS, vol. 6486, pp. 142–162. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  9. Pop, S., Jouvelot, P., Silber, G.-A.: In and Out of SSA: A Denotational Specification. In: Static Single-Assignment Form Seminar (2009)

    Google Scholar 

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

    Google Scholar 

  11. Vulov, G., Hou, C., Vuduc, R., Quinlan, D., Fujimoto, R., Jefferson, D.: The backstroke framework for source level reverse computation applied to parallel discrete event simulation. In: Winter Simulation Conference (2011)

    Google Scholar 

  12. Wolfe, M.: Beyond Induction Variables. In: Proceedings of the ACM SIGPLAN 1992 Conference on Programming Language Design and Implementation, PLDI (1992)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hou, C., Quinlan, D., Jefferson, D., Fujimoto, R., Vuduc, R. (2013). Synthesizing Loops for Program Inversion. In: Glück, R., Yokoyama, T. (eds) Reversible Computation. RC 2012. Lecture Notes in Computer Science, vol 7581. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-36315-3_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-36315-3_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-36314-6

  • Online ISBN: 978-3-642-36315-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics