Abstract.
This paper presents a refinement strategy for the compilation of a subset of Java that includes classes, inheritance, dynamic binding, visibility control, and recursion. We tackle the problem of compiler correctness by reducing the task of compilation to that of program refinement. More specifically, refinement laws are used as compilation rules to reduce the source program to a normal form that models an interpreter running the target code. The compilation process is formalized within a single and uniform semantic framework, where translations or comparisons between semantics are avoided. Each compilation rule can be proved correct with respect to the algebraic laws of the language.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Back, R.J.R.: Procedural abstraction in the refinement calculus. Technical Report Ser. A No. 55, Department of Computer Science, Abo - Finland (1987)
Borba, P., Sampaio, A., Cornélio, M.: A refinement algebra for object-oriented programming. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743. Springer, Heidelberg (2003)
Börger, E., Schulte, W.: Defining the java virtual machine as platform for provably correct java compilation. In: Brim, L., Gruska, J., Zlatuška, J. (eds.) MFCS 1998. LNCS, vol. 1450, pp. 17–35. Springer, Heidelberg (1998)
Cavalcanti, A., Naumann, D.: A weakest precondition semantics for refinement of object-oriented programs. IEEE Transactions on Software Enginnering 26(08), 713–728 (2000)
Cornélio, M., Cavalcanti, A.: Augusto Sampaio. Refactoring by transformation. In: Proceedings of REFINE 2002. Electronic Notes in Theoretical Computer Science (2002)
Dijkstra, E.W.: A Discipline of Programming. Prentice-Hall, Englewood Cliffs (1976)
Duran, A., Cavalcanti, A., Sampaio, A.: Refinement algebra for formal bytecode generation. In: George, C.W., Miao, H. (eds.) ICFEM 2002. LNCS, vol. 2495, pp. 347–358. Springer, Heidelberg (2002)
Duran, A., Cavalcanti, A., Sampaio, A.: A refinement strategy for the compilation of classes, inheritance, and dynamic binding (extended version). Technical report, Computing Laboratory, University of Kent at Canterbury (2003)
Duran, A., Sampaio, A., Cavalcanti, A.: Formal bytecode generation for rool virtual machine. In: IV WMF— Workshop on Formal Methods, PUC—Rio de Janeiro/Brazil (October 2001)
Hoare, C.A.R., He, J., Sampaio, A.: Normal form approach to compiler design. Acta Informatica 30, 701–739 (1993)
Lindholm, T., Yellin, F.: The java Virtual Machine Specification. Addison-Wesley, Reading (1997)
McCarthy, J., Painter, J.: Correctness of a compiler for arithmetic expressions. In: Symposium on Applied Mathematics, pp. 33–41. American Mathematical Society (1967)
Morgan, C.: Programming from Specifications, 2nd edn. Prentice Hall, Englewood Cliffs (1994)
Müller-Olm, M.: Modular Compiler Verification. LNCS, vol. 1283. Springer, Heidelberg (1997)
Sampaio, A.: An Algebraic Approach to Compiler Design. AMAST Series in Computing, vol. 4. World Scientific, Singapore (1997)
Stärk, R., Schmid, J., Börger, E.: Java and the Java Virtual Machine - Definition, Verification, Validation. Springer, Heidelberg (2001)
Wildman, L.: A formal basis for a program compilation proof tool. In: Eriksson, L.-H., Lindsay, P.A. (eds.) FME 2002. LNCS, vol. 2391, p. 491. Springer, Heidelberg (2002)
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
Duran, A., Cavalcanti, A., Sampaio, A. (2003). A Strategy for Compiling Classes, Inheritance, and Dynamic Binding. In: Araki, K., Gnesi, S., Mandrioli, D. (eds) FME 2003: Formal Methods. FME 2003. Lecture Notes in Computer Science, vol 2805. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-45236-2_18
Download citation
DOI: https://doi.org/10.1007/978-3-540-45236-2_18
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40828-4
Online ISBN: 978-3-540-45236-2
eBook Packages: Springer Book Archive