Abstract
The syntactic logical relations developed by Pitts are applied to show the correctness of a higher-order removal program transformation algorithm. The convenient proof method that resorts to the induction on the structure of programs does not apply because of the circular references to be introduced by the transformation. Using a variant of the syntactic logical relations, in which every pair of the transformation source and target are related, one can break the circularity and make an inductive proof go through. This demonstrates that the syntactic logical relations provide a basis of another general proof method for showing the correctness of program transformations.
Most of this work was done while the author was at Research Institute for Mathematical Sciences, Kyoto University.
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
Chin, W.-N.: Safe fusion of functional expressions II: Further improvements. Journal of Functional Programming 4(4), 515–555 (1994)
Engelfriet, J., Vogler, H.: Macro tree transducers. Journal of Computer and System Sciences 31, 71–146 (1985)
Ganzinger, H., Giegerich, R.: Attribute coupled grammars. In: Proceedings of the ACM SIGPLAN 1984 Symposium on Compiler Construction, June 1984. SIGPLAN Notices, vol. 19(6), pp. 157–170 (1984)
Gill, A., Launchbury, J., Peyton Jones, S.: A short cut to deforestation. In: Proceedings of the Conference on Functional Programming Languages and Computer Architecture, pp. 223–232. ACM Press, New York (1993)
The Haskell home page, http://www.haskell.org/
Johann, P.: Short cut fusion: Proved and improved. In: Taha, W. (ed.) SAIG 2001. LNCS, vol. 2196, pp. 47–71. Springer, Heidelberg (2001)
Leroy, X.: Unboxed objects and polymorphic typing. In: Conference record of the 19th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming, pp. 177–188. ACM Press, New York (1992)
Minamide, Y., Garrigue, J.: On the runtime complexity of type-directed unboxing. In: Proceedings of the third ACM SIGPLAN International Conference on Functional Programming (ICFP 1998), pp. 1–12. ACM Press, New York (1998)
Mitchell, J.C.: Foundations for Programming Languages. Foundation of Computing Series. The MIT Press, Cambridge (1996)
Nielsen, L.R.: A denotational investigation of defunctionalization. Technical Report RS-00-47, BRICS (2000)
Nishimura, S.: Deforesting in accumulating parameters via type-directed transformations. In: Informal proceedings of Asian Workshop on Programming Languages and Systems 2002, APLAS 2002 (2002), electronic version http://www.math.kyoto-u.ac.jp/~susumu/papers/aplas02.ps.gz
Nishimura, S.: Correctness of a higher-order removal transformation through a relational reasoning. Technical Report Kyoto-Math 2003-06, Kyoto University (2003), electronic version http://www.math.kyoto-u.ac.jp/~susumu/papers/aplas03-long.ps.gz
Ore, O.: Galois connexions. Transactions of American Mathematical Society 55, 493–513 (1944)
Pitts, A.: Parametric polymorphism and operational equivalence. Mathematical Structures in Computer Science 10(3), 321–359 (2000)
Reynolds, J.C.: Definitional interpreters for higher-order programming languages. Higher-Order Symbolic Computation 11(4), 363–397 (1998); Reprint from the Proc. of the 25th ACM National Conference (1972)
Sheard, T., Fegaras, L.: A fold for all seasons. In: Proceedings 6th ACM SIGPLAN/ SIGARCH Int. Conf. on Functional Programming Languages and Computer Architecture, FPCA 1993, Copenhagen, Denmark, June 9-11, pp. 233–242. ACM Press, New York (1993)
Takano, A., Meijer, E.: Shortcut deforestation in calculational form. In: Proceedings of the 7th International Conference on Functional Programming Languages and Computer Architecture, La Jolla, California, June 1995, pp. 306–313 (1995), ACM SIGPLAN/SIGARCH and IFIP WG2.8, ACM Press, New Yolk
Voigtländer, J.: Using circular programs to deforest in accumulating parameters. In: Asai, K., Chin, W.-N. (eds.) ASIAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 126–137. ACM Press, New York (2002)
Wadler, P.: Deforestation: transforming programs to eliminate trees. Theoretical Computer Science 73(2), 231–248 (1990)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Nishimura, S. (2003). Correctness of a Higher-Order Removal Transformation through a Relational Reasoning. In: Ohori, A. (eds) Programming Languages and Systems. APLAS 2003. Lecture Notes in Computer Science, vol 2895. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-40018-9_24
Download citation
DOI: https://doi.org/10.1007/978-3-540-40018-9_24
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-20536-4
Online ISBN: 978-3-540-40018-9
eBook Packages: Springer Book Archive