Abstract
In this chapter, we present algebraic laws for a language similar to a subset of sequential Java that includes inheritance, recursive classes, dynamic binding, access control, type tests and casts, assignment, but no sharing. We show that these laws are complete, in the sense that they are sufficient to reduce any program to a normal form substantially close to an imperative program: classes and inheritance are used only to preserve the notion of subtyping; all classes have empty bodies, except the object class, which collects all the attributes moved up from all its subclasses. Methods are also eliminated by first resolving dynamic binding, and then in-lining their bodies in place of the calls. This suggests that our laws are expressive enough to formally derive behaviour preserving program transformations; this is illustrated through the derivation of refactorings.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Sampaio, A., Borba, P. (2006). Transformation Laws for Sequential Object-Oriented Programming. In: Cavalcanti, A., Sampaio, A., Woodcock, J. (eds) Refinement Techniques in Software Engineering. PSSE 2004. Lecture Notes in Computer Science, vol 3167. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11889229_2
Download citation
DOI: https://doi.org/10.1007/11889229_2
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-46253-8
Online ISBN: 978-3-540-46254-5
eBook Packages: Computer ScienceComputer Science (R0)