Abstract
We introduce a new partial inversion technique for first-order functional programs. Our technique is simple, fully automatic, and (when it succeeds) returns a program that belongs to the same class of the original program, namely the class of inductively sequential programs (i.e., typical functional programs). To ease the definition, our method proceeds in a stepwise manner: normalization (introduction of let expressions), proper inversion, and removal of let expressions. Furthermore, it can easily be implemented. Therefore, it forms an appropriate basis for developing a practically applicable transformation tool. Preliminary experiments with a prototype implementation of the partial inverter demonstrates the usefulness and viability of our approach.
This work has been partially supported by the EU (FEDER) and the Spanish MEC under grant TIN2005-09207-C03-02 and by the ICT for EU-India Cross-Cultural Dissemination Project ALA/95/23/2003/077-054.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Antoy, S.: Definitional trees. In: Kirchner, H., Levi, G. (eds.) Algebraic and Logic Programming. LNCS, vol. 632, pp. 143–157. Springer, Heidelberg (1992)
Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press, Cambridge (1998)
Danvy, O., Schultz, U.P.: Lambda-Lifting in Quadratic Time. Journal of Functional and Logic Programming, 2004 (2004)
Hanus, M. (ed.): Curry: An Integrated Functional Logic Language Available at: http://www.informatik.uni-kiel.de/~mh/curry/
Fischbach, A., Hannan, J.: Specification and correctness of lambda lifting. J. Funct. Program. 13(3), 509–543 (2003)
Glück, R., Kawabe, M.: A Program Inverter for a Functional Language with Equality and Constructors. In: Ohori, A. (ed.) APLAS 2003. LNCS, vol. 2895, pp. 246–264. Springer, Heidelberg (2003)
Glück, R., Kawabe, M.: Derivation of deterministic inverse programs based on LR parsing. In: Kameyama, Y., Stuckey, P.J. (eds.) FLOPS 2004. LNCS, vol. 2998, pp. 291–306. Springer, Heidelberg (2004)
Harrison, P.G.: Function Inversion. In: Proc. of Int’l Workshop on Partial Evaluation and Mixed Computation, pp. 153–166. North-Holland, Amsterdam (1988)
Johnsson, T.: Lambda Lifting: Transforming Programs to Recursive Equations. In: Jouannaud, J.-P. (ed.) Functional Programming Languages and Computer Architecture(Nancy,France). LNCS, vol. 201, pp. 190–203. Springer, Heidelberg (1985)
Khoshnevisan, H., Sephton, K.M.: InvX: An Automatic Function Inverter. In: Dershowitz, N. (ed.) Rewriting Techniques and Applications. LNCS, vol. 355, pp. 564–568. Springer, Heidelberg (1989)
Marchiori, M.: Unraveling and Ultraproperties. In: Hanus, M., Rodríguez-Artalejo, M. (eds.) ALP 1996. LNCS, vol. 1139, pp. 107–121. Springer, Heidelberg (1996)
Mogensen, T.Æ.: Semi-inversion of Guarded Equations. In: Glück, R., Lowry, M. (eds.) GPCE 2005. LNCS, vol. 3676, pp. 189–204. Springer, Heidelberg (2005)
Morazán, M.T., Mucha, B.: Improved Graph-Based Lambda Lifting. In: Proc. of the Int’l Conf. on Software Engineering Research and Practice (SERP 2006), pp. 896–902. CSREA Press (2006)
Mu, S.-C.: A Calculational Approach to Program Inversion. PhD thesis, Oxford University Computing Laboratory (2003)
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)
Pareja-Flores, C., Velázquez-Iturbide, J.A.: Synthesis of Functions by Transformations and Constraints. In: Proc. of the Int’l Conf. on Functional Programming (ICFP 1997), pp. 317–317. ACM Press, New York (1997)
Romanenko, A.: Inversion and metacomputation. In: Partial Evaluation and Semantics-Based Program Manipulation, Sigplan Notices, vol. 26(9), pp. 12–22. ACM, New York (1991)
Slagle, J.R.: Automated Theorem-Proving for Theories with Simplifiers, Commutativity and Associativity. Journal of the ACM 21(4), 622–642 (1974)
Wadler, P.: Views: A Way for Pattern Matching to Cohabit with Data Abstraction. In: Proc. of 14th ACM Symp. on Principles of Programming Languages (POPL 1987), pp. 307–313. ACM Press, New York (1987)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Almendros-Jiménez, J.M., Vidal, G. (2007). Automatic Partial Inversion of Inductively Sequential Functions . In: Horváth, Z., Zsók, V., Butterfield, A. (eds) Implementation and Application of Functional Languages. IFL 2006. Lecture Notes in Computer Science, vol 4449. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-74130-5_15
Download citation
DOI: https://doi.org/10.1007/978-3-540-74130-5_15
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-74129-9
Online ISBN: 978-3-540-74130-5
eBook Packages: Computer ScienceComputer Science (R0)