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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Biswas, B., Mall, R.: Reverse execution of programs. ACM SIGPLAN Notices 34(4), 61–69 (1999)
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)
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)
Jefferson, D.R.: Virtual time. ACM Transactions on Programming Languages and Systems 7(3), 404–425 (1985)
Muchnick, S.S.: Advanced Compiler Design Implementation. Morgan Kaufmann Publishers (1997)
Pratt, V.R.: Semantical consideration on floyo-hoare logic. In: 17th Annual Symposium on Foundations of Computer Science (1976)
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)
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)
Pop, S., Jouvelot, P., Silber, G.-A.: In and Out of SSA: A Denotational Specification. In: Static Single-Assignment Form Seminar (2009)
Srivastava, S., Gulwani, S., Chaudhuri, S., Foster, J.S.: Path-based inductive synthesis for program inversion. In: PLDI 2011. ACM Press (2011)
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)
Wolfe, M.: Beyond Induction Variables. In: Proceedings of the ACM SIGPLAN 1992 Conference on Programming Language Design and Implementation, PLDI (1992)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)