Skip to main content

Supercompilation for Datatypes

  • Conference paper
  • First Online:
Perspectives of System Informatics (PSI 2014)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8974))

  • 511 Accesses

Abstract

Supercompilation is a method of transforming programs to obtain equivalent programs that perform fewer computation steps and allocates less memory. A transformed program defines new functions that are combinations of functions from the original program, but the datatypes in the transformed program is a subset of the datatypes defined in the original program. We will change this by extending supercompilation to create new datatypes.

We do this by creating new constructors that combine several constructors from the original program in a way reminiscent of how supercompilation combines several functions to create new functions.

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 EPUB and 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

Notes

  1. 1.

    As an optimisation, the already transformed rules can be cached, so they do not need to be transformed once again.

  2. 2.

    If a cache of transformed rules is used, they can just be copied from this.

References

  1. de Bruijn, N.G.: Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the church-rosser theorem. Indagationes Math. (Proc.) 75(5), 381–392 (1972)

    Article  MATH  Google Scholar 

  2. Dussart, D., Bevers, E., De Vlaminck, K.: Polyvariant constructor specialisation. In: Proceedings of ACM Conference on Partial Evaluation and Program Manipulation, pp. 546–5 (1995)

    Google Scholar 

  3. Glück, R., Klimov, A.V.: Klimov. Occam’s razor in metacomputation: the notion of a perfect process tree. In: Cousot, P., Falaschi, M., Filé, G., Rauzy, A. (eds.) Static Analysis. LNCS, vol. 724, pp. 112–123. Springer, Berlin Heidelberg (1993)

    Chapter  Google Scholar 

  4. 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)

    Chapter  Google Scholar 

  5. Hamilton, G.W.: Distillation: extracting the essence of programs. In: Proceedings of the 2007 ACM SIGPLAN Symposium On Partial Evaluation And Semantics-based Program Manipulation, PEPM 2007, pp. 61–70. ACM, New York (2007)

    Google Scholar 

  6. Jones, S.L.P.: Call-pattern specialisation for haskell programs. In: Hinze, R., Ramsey, N. (eds.) ICFP, pp. 327–337. ACM (2007)

    Google Scholar 

  7. Klimov, A.V.: Solving coverability problem for monotonic counter systems by supercompilation. In: Clarke, E., Virbitskaite, I., Voronkov, A. (eds.) PSI 2011. LNCS, vol. 7162, pp. 193–209. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  8. Klyuchnikov, I., Romanenko, S.: Proving the equivalence of higher-order terms by means of supercompilation. In: Pnueli, A., Virbitskaite, I., Voronkov, A. (eds.) PSI 2009. LNCS, vol. 5947, pp. 193–205. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  9. Kursawe, P.: How to invent a prolog machine. New Gener. Comput. 5, 97–114 (1987). doi:10.1007/BF03037460

    Article  MATH  Google Scholar 

  10. Krivine, J.L.: A call-by-name lambda-calculus machine. In Higher Order and Symbolic Computation, (2004)

    Google Scholar 

  11. Mogensen, T.: Partially static structures in a self-applicable partial evaluator. In: Bjorner, D., Ershov, A.P., Jones, N.D. (eds.) Partial Eval. Mixed Comput., pp. 325–347. North-Holland, Amsterdam (1988)

    Google Scholar 

  12. Mogensen,T.Æ. Constructor specialization. In: Partial Evaluation and Semantics-Based Program Manipulation (PEPM 1993), pp. 22–32. ACM, New York (1993)

    Google Scholar 

  13. Mogensen, T.Æ.: Evolution of partial evaluators: removing inherited limits. In: Danvy, O., Thiemann, P., Glück, R. (eds.) Dagstuhl Seminar 1996. LNCS, vol. 1110. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  14. Mogensen, T.Æ.: A comparison of well-quasi orders on trees. Electron. Proc. Theor. Comput. Sci. 129, 30–40 (2013)

    Article  Google Scholar 

  15. Nemytykh, A.P.: The Supercompiler SCP4: general structure. In: Broy, M., Zamulin, A.V. (eds.) PSI 2003. LNCS, vol. 2890, pp. 162–170. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  16. Sorensen, M.H., Glück, R., Jones, N.D.: A positive supercompiler. J. Funct. Program. 6, 465–479 (1993)

    Google Scholar 

  17. Turchin, V.F.: A supercompiler system based on the language refal. SIGPLAN Not. 14(2), 46–54 (1979)

    Article  Google Scholar 

  18. Turchin, V.F.: The concept of a supercompiler. ACM Trans. Program. Lang. Syst. 8(3), 292–325 (1986)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Torben Ægidius Mogensen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Mogensen, T.Æ. (2015). Supercompilation for Datatypes. In: Voronkov, A., Virbitskaite, I. (eds) Perspectives of System Informatics. PSI 2014. Lecture Notes in Computer Science(), vol 8974. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-46823-4_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-46823-4_19

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-46822-7

  • Online ISBN: 978-3-662-46823-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics