Abstract
We adopt the untyped imperative object calculus of Abadi and Cardelli as a minimal setting in which to study problems of compilation and program equivalence that arise when compiling object-oriented languages. Our main result is a direct proof, via a small-step unloading machine, of the correctness of compilation to a closure-based abstract machine. Our second result is that contextual equivalence of objects coincides with a form of Mason and Talcott's CIU equivalence; the latter provides a tractable means of establishing operational equivalences. Finally, we prove correct an algorithm, used in our prototype compiler, for statically resolving method offsets. This is the first study of correctness of an object-oriented abstract machine, and of CIU equivalence for an object-oriented language.
Preview
Unable to display preview. Download preview PDF.
References
M. Abadi and L. Cardelli. An imperative object calculus: Basic typing and soundness. In Proceedings SIPL'95, 1995. Technical Report UIUCDCS-R-95-1900, Department of Computer Science, University of Illinois at Urbana-Champaign.
M. Abadi and L. Cardelli. An imperative object calculus. Theory and Practice of Object Systems, 1(13):151–166, 1996.
M. Abadi and L. Cardelli. A Theory of Objects. Springer-Verlag, 1996.
M. Abadi and K.R.M. Leino. A logic of object-oriented programs. In Proceedings TAPSOFT '97, volume 1214 of Lecture Notes in Computer Science, pages 682–696. Springer-Verlag, April 1997.
G. Agha, I. Mason, S. Smith and C. Talcott. A foundation for actor computation. Journal of Functional Programming, 7(1), January 1997.
D.S. Andersen and L.H. Pedersen. An operational approach to the Ï‚-calculus. Master's thesis, Department of Mathematics and Computer Science, Aalborg, 1996. Available as Report R-96-2034.
C. Chambers. The Design and Implementation of the Self Compiler, an Optimizing Compiler for Object-Oriented Programming Languages. PhD thesis, Computer Science Department, Stanford University, March 1992.
M. Felleisen and D. Friedman. Control operators, the SECD-machine, and the λ-calculus. In Formal Description of Programming Concepts III, pages 193–217. North-Holland, 1986.
A.D. Gordon, S.B. Lassen and P.D. Hankin. Compilation and equivalence of imperative objects. Technical Report 429, University of Cambridge Computer Laboratory, 1997. Also appears as BRICS Report RS-97-19, BRICS, Department of Computer Science, University of Aarhus.
A.D. Gordon and G.D. Rees. Bisimilarity for a first-order calculus of objects with subtyping. In Proceedings POPL'96, pages 386–395. ACM, 1996. Accepted for publication in Information and Computation.
J.D. Guttman, V. Swarup and J. Ramsdell. The VLISP verified scheme system. Lisp and Symbolic Computation, 8(1/2):33–110, 1995.
J. Hannan and D. Miller. From operational semantics to abstract machines. Mathematical Structures in Computer Science, 4(2):415–489, 1992.
T. Hardin, L. Maranget and B. Pagano. Functional back-ends and compilers within the lambda-sigma calculus. In ICFP'96, May 1996.
F. Honsell, I. Mason, S. Smith and C. Talcott. A variable typed logic of effects. Information and Computation, 119(1):55–90, 1993.
H. Hüttel and J. Kleist. Objects as mobile processes. In Proceedings MFPS'96, 1996.
X. Leroy. The ZINC experiment: an economical implementation of the ML language. Technical Report 117, INRIA, 1990.
T. Lindholm and F. Yellin. The Java Virtual Machine Specification. The Java Series. Addison-Wesley, 1997.
I. Mason and C. Talcott. Equivalence in functional languages with effects. Journal of Functional Programming, 1(3):287–327, 1991.
E. Moggi. Notions of computations and monads. Information and Computation, 93:55–92, 1989. Earlier version in Proceedings LICS'89.
J.H. Morris. Lambda-Calculus Models of Programming Languages. PhD thesis, MIT, December 1968.
A. Ohori. A compilation method for ML-style polymorphic record calculi. In Proceedings POPL'92, pages 154–165. ACM, 1992.
G.D. Plotkin. Call-by-name, call-by-value and the lambda calculus. Theoretical Computer Science, 1:125–159, 1975.
M. Rittri. Proving compiler correctness by bisimulation. PhD thesis, Chalmers, 1990.
D. Sangiorgi. An interpretation of typed objects into typed π-calculus. In FOOL 3, New Brunswick, 1996.
P. Sestoft. Deriving a lazy abstract machine. Technical Report 1994-146, Department of Computer Science, Technical University of Denmark, September 1994.
I. Stark. Names, equations, relations: Practical ways to reason about new. In TLCA '97, number 1210 in LNCS, pages 336–353. Springer, 1997.
C. Talcott. Reasoning about functions with effects. In Higher Order Operational Techniques in Semantics, Publications of the Newton Institute, pages 347–390. Cambridge University Press, 1997. To appear.
M. Wand. Compiler correctness for parallel languages. In Proceedings FPCA '95, pages 120–134. ACM, June 1995.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1997 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Gordon, A.D., Hankin, P.D., Lassen, S.B. (1997). Compilation and equivalence of imperative objects. In: Ramesh, S., Sivakumar, G. (eds) Foundations of Software Technology and Theoretical Computer Science. FSTTCS 1997. Lecture Notes in Computer Science, vol 1346. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0058024
Download citation
DOI: https://doi.org/10.1007/BFb0058024
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-63876-6
Online ISBN: 978-3-540-69659-9
eBook Packages: Springer Book Archive