Abstract
A programming language with subtyping can be translated into a language without subtyping by inserting conversion functions. Previous studies of this interpretation showed only the extensional correctness of the translation. We study runtime behavior of translated programs and show that this translation preserves execution time and stack space within a factor determined by the types in a program. Both the proofs on execution time and stack space are based on the method of logical relations where relations are extended with the factor of slowdown or increase of stack space.
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
A. Bakewell and C. Runciman. A model for comparing the space usage of lazy evaluators. In Proceedings of the 2nd International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, pages 151–162, 2000.
G. E. Blelloch and J. Greiner. A provably time and space efficient implementation of NESL. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming, pages 213–225, 1996.
V. Breazu-Tannen, C. A. Gunter, and A. Scedrov. Computing with coercions. In Proceedings of the 1990 ACM Conference on LISP and Functional programming, pages 44–60, 1990.
C. A. Gunter. Semantics of Programming Languages, chapter 4. The MIT Press, 1992.
J. Gustavsson and D. Sands. A foundation for space-safe transformations of callby-need programs. In Proceedings of the Third International Workshop on Higher Order Operational Techniques in Semantics (HOOTS99), volume 26 of ENTCS, 1999.
J. Gustavsson and D. Sands. Possibilities and limitations of call-by-need space improvement. In Proceedings of the Sixth ACM SIGPLAN International Conference on Functional Programming, pages 265–276, 2001.
N. Heintze. Control-.owanalysis and type systems. In Proceedings of the 1995 International Static Analysis Symposium, volume 983 of LNCS, pages 189–206, 1995.
X. Leroy. Unboxed objects and polymorphic typing. In the 19th ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, pages 177–188, 1992.
Y. Minamide. A space-pro.ling semantics of call-by-value lambda calculus and the CPS transformation. In Proceedings of the Third International Workshop on Higher Order Operational Techniques in Semantics (HOOTS99), volume 26 of ENTCS, 1999.
Y. Minamide. A newcriterion for safe program transformations. In Proceedings of the Forth International Workshop on Higher Order Operational Techniques in Semantics (HOOTS), volume 41(3) of ENTCS, Montreal, 2000.
Y. Minamide and J. Garrigue. On the runtime complexity of type-directed unboxing. In Proceedings of the Third ACM SIGPLAN International Conference on Functional programming, pages 1–12, 1998.
Y. Minamide, G. Morrisett, and R. Harper. Typed closure conversion. In Proceeding of the ACM Symposium on Principles of Programming Languages, pages 271–283, 1996.
J. C. Mitchell. Foundations for Programming Languages, chapter 10. The MIT Press, 1996.
A. Ohori. A polymorphic record calculus and its compilation. ACM Transaction on Programming Languages and Systems, 17(6):844–895, 1995.
D. Sands. A naive time analysis and its theory of cost equivalence. Journal of Logic and Computation, 5(4):495–541, 1995.
D. Sands. Proving the correctness of recursion-based automatic program transformations. Theoretical Computer Science, 167(1&2):193–233, 1996.
D. Sands. Computing with contexts: A simple approach. In Proceedings of the Second Workshop on Higher-Order Operational Techniques in Semantics (HOOTS II), volume 10 of ENTCS, 1998.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Minamide, Y. (2002). Runtime Behavior of Conversion Interpretation of Subtyping. In: Arts, T., Mohnen, M. (eds) Implementation of Functional Languages. IFL 2001. Lecture Notes in Computer Science, vol 2312. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46028-4_10
Download citation
DOI: https://doi.org/10.1007/3-540-46028-4_10
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-43537-2
Online ISBN: 978-3-540-46028-2
eBook Packages: Springer Book Archive