POST: A Case Study for an Incremental Development in rCOS Quan Long 1 , Qiu Zongyan 1 , Zhiming Liu 2 , Lingshuang Shao 3 , and He Jifeng 2 1 LMAM and Department of Informatics, School of Mathematical Sciences, Peking University, Beijing, China {longquan,qzy}@math.pku.edu.cn 2 International Institute for Software Technology, United Nations University, Macao, China {lzm,hjf}@iist.unu.edu 3 Software Engineering Institute, Peking University, Beijing, China shaolsh04@sei.pku.edu.cn Abstract. We have recently developed an object-oriented refinement calculus called rCOS to formalize the basic object-orient design principles, patterns and refactoring as refinement laws. The aim is of rCOS is to provide a formal sup- port to the use-cased driven, incremental and iterative Rational Unified Process (RUP). In this paper, we apply rCOS to a step-wised development of a Point of Sale Terminal (POST) system, from a requirement model to a design model, and finally, to the implementation in Visual C#. Keywords: Refinement, Software design, Object-orientation, Refactoring, UML 1 Introduction In the imperative paradigm, the specification of a problem is mainly concerned with the control and data structures of the program. The program development is the design and implementation of data structures and algorithms through a number of steps of refinement. Verification is needed to prove that each step preserves the specification of the control and data structures in the previous step. Various formal methods, especially those state-based models [5, 10] such as VDM [11] and Z [4], are widely found helpful in correct and reliable construction of such a program. The object-oriented requirement analysis, design and programming are popular re- cently in practical software engineering. Recent development and application of UML and the Rational Unified Process (RUP) have led to the use of design patterns and refac- toring more effective. However, the research in the formal aspects and techniques does not reflect or provide enough support to these newly developed objected-oriented engineering prin- ciples and development processes. It is still hard to obtain assurance of correctness in object-oriented developing process using old fashioned programming techniques. Model-based formalisms have been extended with object-oriented techniques, via lan- guages such as Object-Z [1], VDM++ [6], and methods such as Syntropy [3] which uses the Z notation, and Fusion [2] that is related to VDM. Whilst these formalisms are effective at modelling data structures as sets and relations between sets, they do Supported by NNSFC(No. 60173003) and NKBRPC(2004CB318000)