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.
Similar content being viewed by others
References
Turchin, V.F., The concept of a supercompiler, ACM Trans. Programming Languages Systems (TOPLAS), 1986, vol. 8, no. 3, pp. 292–325.
Turchin, V.F., The Language Refal: The Theory of Compilation and Metasystem Analysis, New York University Press, 1980.
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.
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.
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.
Klyuchnikov, I., Inferring and proving properties of functional programs by means of supercompilation, Cand. Sci. Dissertation, Moscow: Keldysh Institute of Applied Mathematics, 2010.
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.
Turchin, V.F., Supercompilation: techniques and results, in Perspectives of System Informatics, 1996, vol. 1181.
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.
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.
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.
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.
Nordstroom, B., Petersson, K., and Smith, J.M., Programming in Martin-Lof’s Type Theory, Oxford University Press, 1990.
Thompson, S., Type Theory and Functional Programming, Redwood City: Addison Wesley Longman, 1991.
Harper, R., Practical Foundations for Programming Languages, Cambridge University Press, 2012.
Hutton, G., A tutorial on the universality and expressiveness of fold, J. Funct. Program., 1999, vol. 9, pp. 355–372.
McBride, C., Elimination with a motive, in Types for Proofs and Programs, Berlin: Springer, 2002, pp. 197–216
Loh, A., McBride, C., and Swierstra, W., A tutorial implementation of a dependently typed lambda calculus, Fundamenta Informaticae, 2010, vol. 21, pp. 1001–1032.
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.
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.
Proc. 3rd International Valentin Turchin Workshop on Metacomputation, Klimov, A. and Romanenko, S., Eds. (Pereslavl-Zalessky, 2012), Pereslavl: Univ. of Pereslavl Press, 2012.
Author information
Authors and Affiliations
Corresponding author
Additional information
Original Russian Text © I.G. Klyuchnikov, S.A. Romanenko, 2015, published in Programmirovanie, 2015, Vol. 41, No. 3.
Rights and permissions
About this article
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
Received:
Published:
Issue Date:
DOI: https://doi.org/10.1134/S0361768815030068