Abstract
One of the applications of supercompilation is proving properties of programs. We focus in this paper on a specific task: proving term equivalence for a higher-order lazy functional language. The “classical” way to prove equivalence of two terms t1 and t2 is to write an equality function equals and to simplify the term (equals t1 t2). However, this works only when certain conditions are met. The paper presents another approach to proving term equivalence by means of supercompilation. In this approach we supercompile both terms and compare supercompiled terms syntactically. Some applications of the technique are discussed. In particular, one of these applications may lead to the development of a more powerful “higher-level” supercompiler.
Supported by Russian Foundation for Basic Research projects No. 08-07-00280-a and No. 09-01-00834-a.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Albert, E., Vidal, G.: The narrowing-driven approach to functional logic program specialization. New Generation Computing 20(1), 3–26 (2002)
Alpuente, M., Falaschi, M., Vidal, G.: Partial evaluation of functional logic programs. ACM Transactions on Programming Languages and Systems (TOPLAS) 20(4), 768–844 (1998)
Cockett, R.: Deforestation, program transformation, and cut-elimination. Electronic Notes in Theoretical Computer Science 44(1), 88–127 (2001)
Dybjer, P., Filinski, A.: Normalization and partial evaluation. In: Barthe, G., Dybjer, P., Pinto, L., Saraiva, J. (eds.) APPSEM 2000. LNCS, vol. 2395, pp. 137–192. Springer, Heidelberg (2002)
Glück, R., Klimov, A.V.: Occam’s razor in metacompuation: the notion of a perfect process tree. In: Cousot, P., Filé, G., Falaschi, M., Rauzy, A. (eds.) WSA 1993. LNCS, vol. 724, pp. 112–123. Springer, Heidelberg (1993)
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, pp. 61–70. ACM Press, New York (2007)
Hamilton, G.W., Kabir, M.H.: Constructing programs from metasystem transition proofs. In: Proceedings of the First International Workshop on Metacomputation in Russia (2008)
Holst, C.K., Hughes, J.: Towards binding-time improvement for free. In: Functional Programming, Workshops in Computing, Glasgow. Springer, Heidelberg (1990)
Jonsson, P.A.: Positive supercompilation for a higher-order call-by-value language. Luleå University of Technology (2008)
Klimov, A.V.: A program specialization relation based on supercompilation and its properties. In: Proceedings of the First International Workshop on Metacomputation in Russia, pp. 54–78. Ailamazyan University of Pereslavl (2008)
Lisitsa, A., Nemytykh, A.P.: Reachability analysis in verification via supercompilation. International Journal of Foundations of Computer Science 19(4), 953–969 (2008)
Lisitsa, A.P., Nemytykh, A.P.: Verification as a parameterized testing (experiments with the scp4 supercompiler). Programming and Computer Software 33(1), 14–23 (2007)
Lisitsa, A.P., Webster, M.: Supercompilation for equivalence testing in metamorphic computer viruses detection. In: Proceedings of the First International Workshop on Metacomputation in Russia. Ailamazyan University of Pereslavl (2008)
Mitchell, N., Runciman, C.: A supercompiler for core haskell. In: Chitil, O., Horváth, Z., Zsók, V. (eds.) IFL 2007. LNCS, vol. 5083, pp. 147–164. Springer, Heidelberg (2008)
Pitts, A.M.: Operationally-based theories of program equivalence. In: Semantics and Logics of Computation, pp. 241–298 (1997)
Romanenko, S.A.: Higher-order functions as a substitute for partial evaluation. In: Proceedings of the First International Workshop on Metacomputation in Russia. Ailamazyan University of Pereslavl (2008)
Sørensen, M.H., Glück, R., Jones, N.D.: A positive supercompiler. Journal of Functional Programming 6(6), 811–838 (1993)
Turchin, V.F.: The Language Refal: The Theory of Compilation and Metasystem Analysis. Department of Computer Science, Courant Institute of Mathematical Sciences, New York University (1980)
Turchin, V.F.: The concept of a supercompiler. ACM Transactions on Programming Languages and Systems (TOPLAS) 8(3), 292–325 (1986)
Turchin, V.F.: Metacomputation: Metasystem transitions plus supercompilation. In: Danvy, O., Thiemann, P., Glück, R. (eds.) Dagstuhl Seminar 1996. LNCS, vol. 1110, pp. 481–509. Springer, Heidelberg (1996)
Turner, D.A.: Total functional programming. Journal of Universal Computer Science 10(7), 751–768 (2004)
Wadler, P.: Theorems for free! In: FPCA 1989: Proceedings of the fourth international conference on Functional programming languages and computer architecture, pp. 347–359. ACM, New York (1989)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Klyuchnikov, I., Romanenko, S. (2010). Proving the Equivalence of Higher-Order Terms by Means of Supercompilation. In: Pnueli, A., Virbitskaite, I., Voronkov, A. (eds) Perspectives of Systems Informatics. PSI 2009. Lecture Notes in Computer Science, vol 5947. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-11486-1_17
Download citation
DOI: https://doi.org/10.1007/978-3-642-11486-1_17
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-11485-4
Online ISBN: 978-3-642-11486-1
eBook Packages: Computer ScienceComputer Science (R0)