Skip to main content
Log in

Supercompilation for Martin-Lof’s type theory

  • Computer Algebra, Applied Logic, Circuit Synthesis
  • Published:
Programming and Computer Software Aims and scope Submit manuscript

Abstract

This paper describes the design and implementation of a TT Lite certifying supercompiler, which transforms a source program into a pair consisting of a residual program and a proof that the residual program is equivalent to the source one. As far as we can judge from the presently available literature, it is the first time that certifying supercompilation is implemented for a nontrivial higher-order functional language. Proofs generated by the TT Lite supercompiler can be verified by the type checker that does not depend on the supercompiler and is not based on supercompilation. This is especially important when reliability of results obtained by means of supercompilation is of primary concern.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Turchin, V.F., The concept of a supercompiler, ACM Trans. Programming Languages Systems (TOPLAS), 1986, vol. 8, no. 3, pp. 292–325.

    Article  MATH  MathSciNet  Google Scholar 

  2. Turchin, V.F., The Language Refal: The Theory of Compilation and Metasystem Analysis, New York University Press, 1980.

    Google Scholar 

  3. Lisitsa, A. and Nemytykh, A., Verification as a parameterized testing (experiments with the scp4 supercompiler), Program. Comput. Software, 2007, vol. 33, no. 1, pp. 14–23.

    Article  MATH  Google Scholar 

  4. Klimov, A.V., Klyuchnikov, I.G., and Romanenko, S.A., Automatic verification of counter systems via domainspecific multiresult supercompilation, Proc. 3rd International Valentin Turchin Workshop on Metacomputation, Klimov, A. and Romanenko, S., Eds. (Pereslavl-Zalessky, 2012), Pereslavl: Univ. of Pereslavl Press, 2012.

    Google Scholar 

  5. Klyuchnikov, I.G. and Romanenko, S.A., Proving the equivalence of higher-order terms by means of supercompilation, Proc. 7th International Andrei Ershov Memorial Conference (PSI 2009), Pnueli, A., Virbitskaite, I., and Voronkov, A., Eds., Novosibirsk, 2009.

    Google Scholar 

  6. Klyuchnikov, I., Inferring and proving properties of functional programs by means of supercompilation, Cand. Sci. Dissertation, Moscow: Keldysh Institute of Applied Mathematics, 2010.

    Google Scholar 

  7. Nemytykh, A.P. and Pinchuk, V.A., Program transformation with metasystem transitions: experiments with a supercompiler, in Perspectives of System Informatics, 1996, vol. 1181, pp. 249–260.

    Google Scholar 

  8. Turchin, V.F., Supercompilation: techniques and results, in Perspectives of System Informatics, 1996, vol. 1181.

  9. Klyuchnikov, I. and Romanenko, S., Towards higherlevel supercompilation, Proc. 3rd International Valentin Turchin Workshop on Metacomputation, Klimov, A. and Romanenko, S., Eds., (Pereslavl-Zalessky, 2012), Pereslavl: Univ. of Pereslavl Press, 2012.

    Google Scholar 

  10. Klyuchnikov, I., Supercompiler HOSC: Proof of correctness, Preprint of Keldysh Inst. Appl. Math., Russ. Acad. Sci., Moscow, 2010. http://library.keldysh.ru/preprint.asp?id=2010-31.

    Google Scholar 

  11. Krustev, D., A simple supercompiler formally verified in Coq, Proc. 2nd International Valentin Turchin Memorial Workshop on Metacomputation, Nemytykh, A.P., Ed. (Pereslavl-Zalessky, 2010), Pereslavl: Univ. of Pereslavl Press, 2010.

    Google Scholar 

  12. Pardo, A. and da Rosa, S., Program transformation in Martin-Lof’s type theory, Proc. Workshop on Proof-Search in Typetheoretic Languages (CADE-12), 1994.

    Google Scholar 

  13. Nordstroom, B., Petersson, K., and Smith, J.M., Programming in Martin-Lof’s Type Theory, Oxford University Press, 1990.

    Google Scholar 

  14. Thompson, S., Type Theory and Functional Programming, Redwood City: Addison Wesley Longman, 1991.

    MATH  Google Scholar 

  15. Harper, R., Practical Foundations for Programming Languages, Cambridge University Press, 2012.

    Book  Google Scholar 

  16. Hutton, G., A tutorial on the universality and expressiveness of fold, J. Funct. Program., 1999, vol. 9, pp. 355–372.

    Article  MATH  MathSciNet  Google Scholar 

  17. McBride, C., Elimination with a motive, in Types for Proofs and Programs, Berlin: Springer, 2002, pp. 197–216

    Chapter  Google Scholar 

  18. Loh, A., McBride, C., and Swierstra, W., A tutorial implementation of a dependently typed lambda calculus, Fundamenta Informaticae, 2010, vol. 21, pp. 1001–1032.

    MathSciNet  Google Scholar 

  19. Klyuchnikov, I.G. and Romanenko, S.A., MRSC: a toolkit for building multi-result supercompilers, Preprint of Keldysh Inst. Appl. Math., Russ. Acad. Sci., Moscow, 2011. http://library.keldysh.ru/preprint.asp?lg=e&id=2011-77.

    Google Scholar 

  20. Klyuchnikov, I., Supercompiler HOSC 1.0: Under the hood, Preprint of Keldysh Inst. Appl. Math., Russ. Acad. Sci., Moscow, 2009. http://library.keldysh.ru/preprint.asp?id=2009-63.

    Google Scholar 

  21. Proc. 3rd International Valentin Turchin Workshop on Metacomputation, Klimov, A. and Romanenko, S., Eds. (Pereslavl-Zalessky, 2012), Pereslavl: Univ. of Pereslavl Press, 2012.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to I. G. Klyuchnikov.

Additional information

Original Russian Text © I.G. Klyuchnikov, S.A. Romanenko, 2015, published in Programmirovanie, 2015, Vol. 41, No. 3.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Klyuchnikov, I.G., Romanenko, S.A. Supercompilation for Martin-Lof’s type theory. Program Comput Soft 41, 170–182 (2015). https://doi.org/10.1134/S0361768815030068

Download citation

  • Received:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1134/S0361768815030068

Keywords

Navigation