Skip to main content

The Universal Resolving Algorithm: Inverse Computation in a Functional Language

  • Conference paper
Mathematics of Program Construction (MPC 2000)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1837))

Included in the following conference series:

Abstract

We present an algorithm for inverse computation in a first-order functional language based on the notion of a perfect process tree. The Universal Resolving Algorithm (URA) introduced in this paper is sound and complete, and computes each solution, if it exists, in finite time. The algorithm has been implemented for TSG, a typed dialect of S-Graph, and shows some remarkable results for the inverse computation of functional programs such as pattern matching and the inverse interpretation of While-programs.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

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.

References

  1. Abramov, S.M.: Metavychislenija i logicheskoe programmirovanie (Metacomputation and logic programming). Programmirovanie 3, 31–44 (1991) (in Russian)

    Google Scholar 

  2. Abramov, S.M.: Metavychislenija i ikh prilozhenija (Metacomputation and its applications). Nauka-Fizmatlit, Moscow (1995) (in Russian)

    Google Scholar 

  3. Abramov, S.M., Glück, R.: From standard to non-standard semantics by semantics modifiers. International Journal of Foundations of Computer Science (to appear)

    Google Scholar 

  4. Abramov, S.M., Glück, R.: Semantics modifiers: an approach to non-standard semantics of programming languages. In: Sato, M., Toyama, Y. (eds.) Third Intern. Symposium on Functional and Logic Programming, pp. 247–270. World Scientific, Singapore (1998)

    Google Scholar 

  5. Bird, R., de Moor, O.: Algebra of Programming. International Series in Computer Science. Prentice-Hall, Englewood Cliffs (1997)

    MATH  Google Scholar 

  6. Chen, W., Udding, J.T.: Program inversion: More than fun! Science of Computer Programming 15, 1–13 (1990)

    Article  MATH  MathSciNet  Google Scholar 

  7. Dijkstra, E.W.: EWD671: Program inversion. In: Selected Writings on Computing: A Personal Perspective, pp. 351–354. Springer, Heidelberg (1982)

    Google Scholar 

  8. Dybjer, P.: Inverse image analysis generalises strictness analysis. Information and Computation 90(2), 194–216 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  9. Eppstein, D.: A heuristic approach to program inversion. In: Intern. Joint Conf. on Artificial Intelligence (IJCAI 1985), pp. 219–221. William Kaufmann Inc. (1985)

    Google Scholar 

  10. Futamura, Y., Nogi, K., Takano, A.: Essence of generalized partial computation. Theoretical Computer Science 90(1), 61–79 (1991)

    Article  MATH  Google Scholar 

  11. Glück, R., Hatcliff, J., Jørgensen, J.: Generalization in hierarchies of online program specialization systems. In: Flener, P. (ed.) LOPSTR 1998. LNCS, vol. 1559, pp. 179–198. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  12. Glück, R., Klimov, A.V.: Occam’s razor in metacomputation: the notion of a perfect process tree. In: Cousot, P., et al. (eds.) WSA 1993. LNCS, vol. 724, pp. 112–123. Springer, Heidelberg (1993)

    Google Scholar 

  13. Glück, R., Klimov, A.V.: Metacomputation as a tool for formal linguistic modeling. In: Trappl, R. (ed.) Cybernetics and Systems 1994, pp. 1563–1570. World Scientific, Singapore (1994)

    Google Scholar 

  14. Glück, R., Sørensen, M.H.: Partial deduction and driving are equivalent. In: Penjam, J. (ed.) PLILP 1994. LNCS, vol. 844, pp. 165–181. Springer, Heidelberg (1994)

    Google Scholar 

  15. Glück, R., Sørensen, M.H.: A roadmap to metacomputation by supercompilation. In: Danvy, O., Thiemann, P., Glück, R. (eds.) Dagstuhl Seminar 1996. LNCS, vol. 1110, pp. 137–160. Springer, Heidelberg (1996)

    Google Scholar 

  16. Gries, D.: Inverting programs. The Science of Programming, ch. 21, pp. 265–274. Springer, Heidelberg (1981)

    Google Scholar 

  17. Gries, D., van de Snepscheut, J.L.A.: Inorder traversal of a binary tree and its inversion. In: Dijkstra, E.W. (ed.) Formal Development of Programs and Proofs, pp. 37–42. Addison Wesley, Reading (1990)

    Google Scholar 

  18. Harrison, P.G., Khoshnevisan, H.: On the synthesis of function inverses. Acta Informatica 29, 211–239 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  19. Jones, N.D.: The essence of program transformation by partial evaluation and driving. In: Sato, M., Hagiya, M., Jones, N.D. (eds.) Logic, Language and Computation. LNCS, vol. 792, pp. 206–224. Springer, Heidelberg (1994)

    Chapter  Google Scholar 

  20. Khoshnevisan, H., Sephton, K.M.: InvX: An automatic function inverter. In: Dershowitz, N. (ed.) RTA 1989. LNCS, vol. 355, pp. 564–568. Springer, Heidelberg (1989)

    Google Scholar 

  21. Korf, R.E.: Inversion of applicative programs. In: Proceedings of the Seventh Intern. Joint Conference on Artificial Intelligence (IJCAI 1981), pp. 1007–1009. William Kaufmann, Inc. (1981)

    Google Scholar 

  22. McCarthy, J.: The inversion of functions defined by Turing machines. In: Shannon, C.E., McCarthy, J. (eds.) Automata Studies, pp. 177–181. Princeton University Press, Princeton (1956)

    Google Scholar 

  23. Nemytykh, A.P., Pinchuk, V.A.: Program transformation with metasystem transitions: experiments with a supercompiler. In: Bjorner, D., Broy, M., Pottosin, I.V. (eds.) PSI 1996. LNCS, vol. 1181, pp. 249–260. Springer, Heidelberg (1996)

    Google Scholar 

  24. Ogawa, M.: Automatic verification based on abstract interpretation. In: Middeldorp, A., Sato, T. (eds.) FLOPS 1999. LNCS, vol. 1722, pp. 131–146. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  25. Romanenko, A.Y.: The generation of inverse functions in Refal. In: Bjørner, D., et al. (eds.) Partial Evaluation and Mixed Computation, pp. 427–444. North-Holland, Amsterdam (1988)

    Google Scholar 

  26. Ross, B.J.: Running programs backwards: the logical inversion of imperative computation. Formal Aspects of Computing 9, 331–348 (1997)

    Article  MATH  Google Scholar 

  27. Sestoft, P.: The structure of a self-applicable partial evaluator. Technical Report 85/11, DIKU, University of Copenhagen, Denmark (1985)

    Google Scholar 

  28. Turchin, V.F.: Ehkvivalentnye preobrazovanija rekursivnykh funkcij na Refale (Equivalent transformations of recursive functions defined in Refal). In: Teorija Jazykov i Metody Programmirovanija (Proceedings of the Symp. on the Theory of Languages and Programming Methods), pp. 31–42 (1972) (in Russian)

    Google Scholar 

  29. Turchin, V.F.: The concept of a supercompiler. ACM Transactions on Programming Languages and Systems 8(3), 292–325 (1986)

    Article  MATH  MathSciNet  Google Scholar 

  30. Turchin, V.F.: Program transformation with metasystem transitions. Journal of Functional Programming 3(3), 283–313 (1993)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Abramov, S., Glück, R. (2000). The Universal Resolving Algorithm: Inverse Computation in a Functional Language. In: Backhouse, R., Oliveira, J.N. (eds) Mathematics of Program Construction. MPC 2000. Lecture Notes in Computer Science, vol 1837. Springer, Berlin, Heidelberg. https://doi.org/10.1007/10722010_13

Download citation

  • DOI: https://doi.org/10.1007/10722010_13

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-67727-7

  • Online ISBN: 978-3-540-45025-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics