Abstract
Program inversion has many applications such as in the implementation of serialization/deserialization and in providing support for redo/undo, and has been studied by many researchers. However, little attention has been paid to two problems: how to characterize programs that are easy or hard to invert and whether, for each class of programs, efficient inverses can be obtained. In this paper, we propose an inversion framework that we call grammar-based inversion, where a program is associated with an unambiguous grammar describing the range of the program. The complexity of the grammar indicates how hard it is to invert the program, while the complexity is related to how efficient an inverse can be obtained.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Abramov, S.M., Glück, R.: Principles of Inverse Computation and the Universal Resolving Algorithm. In: The Essence of Computation, pp. 269–295 (2002)
Aho, A.V., Ullman, J.D.: The Theory of Parsing, Translation, and Compiling. Prentice-Hall, Inc., Upper Saddle River (1972)
Asveld, P.R.J.: Time and Space Complexity of Inside-Out Macro Languages. Int. J. Comput. Math. 10(1), 3–14 (1981)
Biehl, M., Klarlund, N., Rauhe, T.: Algorithms for Guided Tree Automata. In: Raymond, D.R., Yu, S., Wood, D. (eds.) WIA 1996. LNCS, vol. 1260, pp. 6–25. Springer, Heidelberg (1997)
Boullier, P.: Range Concatenation Grammars. In: New Developments in Parsing Technology, pp. 269–289. Kluwer Academic Publishers, Norwell (2004)
Comon, H., Dauchet, M., Gilleron, R., Jacquemard, F., Lugiez, D., Tison, S., Tommasi, M.: Tree Automata Techniques and Applications, http://www.grappa.univ-lille3.fr/tata
Dershowitz, N., Mitra, S.: Jeopardy. In: Narendran, P., Rusinowitch, M. (eds.) RTA 1999. LNCS, vol. 1631, pp. 16–29. Springer, Heidelberg (1999)
Dijkstra, E.W.: Program Inversion. In: Gerhart, S.L., Pair, C., Pepper, P.A., Wössner, H., Dijkstra, E.W., Guttag, J.V., Owicki, S.S., Partsch, H., Bauer, F.L., Gries, D., Griffiths, M., Horning, J.J., Wirsing, M. (eds.) Program Construction. LNCS, vol. 69, pp. 54–57. Springer, Heidelberg (1979)
Engelfriet, J., Schmidt, E.M.: IO and OI. I. J. Comput. Syst. Sci. 15(3), 328–353 (1977)
Engelfriet, J., Vogler, H.: Macro Tree Transducers. J. Comput. Syst. Sci. 31(1), 71–146 (1985)
Eppstein, D.: A Heuristic Approach to Program Inversion. In: International Joint Conference on Artificial Intelligence (IJCAI 1985), pp. 219–221 (1985)
Foster, J.N., Greenwald, M.B., Moore, J.T., Pierce, B.C., Schmitt, A.: Combinators for Bidirectional Tree Transformations: A Linguistic Approach to the View-Update Problem. ACM Trans. Program. Lang. Syst. 29(3) (2007)
Frisch, A.: Regular Tree Language Recognition with Static Information. In: Lévy, J.J., Mayr, E.W., Mitchell, J.C. (eds.) Exploring New Frontiers of Theoretical Informatics, IFIP 18th World Computer Congress, TC1 3rd International Conference on Theoretical Computer Science (TCS 2004), pp. 661–674. Kluwer, Dordrecht (2004)
Fülöp, Z., Vogler, H.: Syntax-Directed Semantics: Formal Models Based on Tree Transducers. Springer, New York (1998)
Glück, R., Kawabe, M.: A Method for Automatic Program Inversion Based on LR(0) Parsing. Fundam. Inform. 66(4), 367–395 (2005)
Glück, R., Kawabe, M.: Revisiting an Automatic Program Inverter for Lisp. SIGPLAN Notices 40(5), 8–17 (2005)
Gries, D.: 21 Inverting Programs. In: The Science of Programming. Springer, Heidelberg (1981)
Hopcroft, J.E., Motwani, R., Ullman, J.D.: 7 Properties of Context-Free Languages. In: Introduction to Automata Theory, Languages, and Computation, 3rd edn. Addison-Wesley Longman Publishing Co., Inc., Amsterdam (2006)
Hosoya, H., Pierce, B.C.: XDuce: A Statically Typed XML Processing Language. ACM Trans. Internet Techn. 3(2), 117–148 (2003)
Hu, Z., Iwasaki, H., Takeichi, M., Takano, A.: Tupling Calculation Eliminates Multiple Data Traversals. In: ICFP 1997: Proceedings of the second ACM SIGPLAN International Conference on Functional Programming, pp. 164–175. ACM Press, New York (1997)
Matsuda, K., Hu, Z., Nakano, K., Hamana, M., Takeichi, M.: Bidirectionalization Transformation based on Automatic Derivation of View Complement Functions. In: ICFP 2007: Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming, pp. 47–58. ACM, New York (2007)
Morihata, A., Kakehi, K., Hu, Z., Takeichi, M.: Swapping Arguments and Results of Recursive Functions. In: Uustalu, T. (ed.) MPC 2006. LNCS, vol. 4014, pp. 379–396. Springer, Heidelberg (2006)
Mu, S.C., Hu, Z., Takeichi, M.: An Injective Language for Reversible Computation. In: Kozen, D. (ed.) MPC 2004. LNCS, vol. 3125, pp. 289–313. Springer, Heidelberg (2004)
Neumann, A., Seidl, H.: Locating Matches of Tree Patterns in Forests. In: Arvind, V., Sarukkai, S. (eds.) FST TCS 1998. LNCS, vol. 1530, pp. 134–146. Springer, Heidelberg (1998)
Nishida, N., Sakai, M.: Completion after Program Inversion of Injective Functions. Electr. Notes Theor. Comput. Sci. 237, 39–56 (2009)
Nishida, N., Sakai, M.: Proving Injectivity of Functions via Program Inversion in Term Rewriting. Accepted for FLOPS 2010. LNCS, vol. 6009. Springer, Heidelberg (2010)
Nishida, N., Sakai, M., Sakabe, T.: Partial Inversion of Constructor Term Rewriting Systems. In: Giesl, J. (ed.) RTA 2005. LNCS, vol. 3467, pp. 264–278. Springer, Heidelberg (2005)
Schimpf, K.M., Gallier, J.H.: Tree Pushdown Automata. J. Comput. Syst. Sci. 30(1), 25–40 (1985)
Wadler, P.: Deforestation: Transforming Programs to Eliminate Trees. Theor. Comput. Sci. 73(2), 231–248 (1990)
Yellin, D.M.: Attribute Grammar Inversion and Source-to-source Translation. LNCS, vol. 302. Springer, Heidelberg (1988)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Matsuda, K., Mu, SC., Hu, Z., Takeichi, M. (2010). A Grammar-Based Approach to Invertible Programs. In: Gordon, A.D. (eds) Programming Languages and Systems. ESOP 2010. Lecture Notes in Computer Science, vol 6012. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-11957-6_24
Download citation
DOI: https://doi.org/10.1007/978-3-642-11957-6_24
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-11956-9
Online ISBN: 978-3-642-11957-6
eBook Packages: Computer ScienceComputer Science (R0)