Automatic Partial Inversion of Inductively Sequential Functions

  • Jesús M. Almendros-Jiménez
  • Germán Vidal
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4449)


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.


Sequential Function Inversion Algorithm Extra Variable Functional Programming Language Lazy Evaluation 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Antoy, S.: Definitional trees. In: Kirchner, H., Levi, G. (eds.) Algebraic and Logic Programming. LNCS, vol. 632, pp. 143–157. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  2. 2.
    Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press, Cambridge (1998)Google Scholar
  3. 3.
    Danvy, O., Schultz, U.P.: Lambda-Lifting in Quadratic Time. Journal of Functional and Logic Programming, 2004 (2004)Google Scholar
  4. 4.
    Hanus, M. (ed.): Curry: An Integrated Functional Logic Language Available at:
  5. 5.
    Fischbach, A., Hannan, J.: Specification and correctness of lambda lifting. J. Funct. Program. 13(3), 509–543 (2003)zbMATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    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)Google Scholar
  7. 7.
    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)Google Scholar
  8. 8.
    Harrison, P.G.: Function Inversion. In: Proc. of Int’l Workshop on Partial Evaluation and Mixed Computation, pp. 153–166. North-Holland, Amsterdam (1988)Google Scholar
  9. 9.
    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)Google Scholar
  10. 10.
    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)Google Scholar
  11. 11.
    Marchiori, M.: Unraveling and Ultraproperties. In: Hanus, M., Rodríguez-Artalejo, M. (eds.) ALP 1996. LNCS, vol. 1139, pp. 107–121. Springer, Heidelberg (1996)Google Scholar
  12. 12.
    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)Google Scholar
  13. 13.
    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)Google Scholar
  14. 14.
    Mu, S.-C.: A Calculational Approach to Program Inversion. PhD thesis, Oxford University Computing Laboratory (2003)Google Scholar
  15. 15.
    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)Google Scholar
  16. 16.
    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)Google Scholar
  17. 17.
    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)Google Scholar
  18. 18.
    Slagle, J.R.: Automated Theorem-Proving for Theories with Simplifiers, Commutativity and Associativity. Journal of the ACM 21(4), 622–642 (1974)zbMATHCrossRefMathSciNetGoogle Scholar
  19. 19.
    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)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Jesús M. Almendros-Jiménez
    • 1
  • Germán Vidal
    • 2
  1. 1.University of AlmeríaSpain
  2. 2.Technical University of ValenciaSpain

Personalised recommendations