rCOS: A Refinement Calculus of Object Systems Zhiming Liu and He Jifeng Xiaoshan Li International Institute for Software Technology Faculty of Science and Technology The United Nations University The University of Macau Macao SAR, China Macao SAR, China {lzm,hjf}@iist.unu.edu xsl@umac.mo Abstract This article presents a mathematical characterization of object-oriented concepts by defining an observation-oriented semantics for a relational object- oriented language with a rich variety of features including subtypes, visibil- ity, inheritance, type casting, dynamic binding and polymorphism. The lan- guage is expressive enough for the specification of object-oriented designs and programs. We also propose a calculus based on this model to support both structural and behavioral refinement of object-oriented designs. We take the approach of the development of the design calculus based on the standard predicate logic in Hoare and He’s Unifying Theories of Programming (UTP). We also consider object reference in terms of object identity as values and mutually dependent methods. Keywords: Object Orientation, Refinement, Semantics, UTP. 1 Introduction Software engineering is mainly concerned with using techniques to systematically develop large and complex program suites. However, it is well known that it is hard to obtain the level of assurance of correctness for safety critical software us- ing old fashioned programming techniques. In the search for techniques for making software development more productive and software systems more reliable, object- oriented programming and formal methods are two important but largely indepen- dent approaches which have been visibly influential in recent years. * This is a revised and extended version of the paper [30]. Part of it was also presented at the 3rd International Symposium on Formal Methods for Component and Object Systems. The research is partly supported by the UNU-IIST e-Macao Project. 1