Abstract
Programming-by-difference is a popular technique for incremental object-oriented programming, whereby a new class is built from an existing class using the inheritance mechanism. We give a formalization of this technique using model-based class specifications. This formalization is given in terms of a relation, as-a, between class specifications. We compare this relation with the established reification relation and with the is-a relation, and give some examples.
Preview
Unable to display preview. Download preview PDF.
References
America, P (1991) A behavioural approach to subtyping in object-oriented programming languages, in Lenzerini, Maurizio, Nardi, Daniele and Simi Maria (Editors), Inheritance hierarchies in knowledge representation and programming languages, Wiley, pp 173–190.
America, P and de Boer, F (1990) A sound and complete proof system for SPOOL. Philips Research Labs, Eindhoven.
Cook, WR (1989) A proposal for making Eiffel type-safe, The Computer Journal, 32.
Cook, WR and Palsberg, J (1989) A Denotational Semantics of Inheritance and its Correctness, OOPSLA'89, ACM Press.
Demmers, JWE and Kleingeld, P (1991) SPOOL-S: an object-oriented language with behavioural subtyping, MS Thesis, University of Utrecht.
Dijkstra, EW and Scholten, CS (1989) Predicate Calculus and Program Semantics, Springer-Verlag.
Haughton and Lano (1992) Reasoning and refinement in object-oriented specification languages, ECOOP'92.
Hoare, CAR (1994) How did software get so reliable without proof? presented at the Workshop: From Science to Engineering... Formal Methods for the Next Millenium, Heriot-Watt University, Edinburgh.
Howse, JR, Maung, I, Mitchell, RJ (1994) As-a: a formal relation justifying code reuse by inheritance, Technical Report, Computing Dept, Brighton University.
Johnson, RE and Foote, B (1988) Designing reusable classes, Journal of Objectoriented Progamming, Vol 1, No 2, pp 22–35.
Jones, CB (1990) Systematic software development with VDM, Prentice-Hall.
Lano, K and Haughton, H (eds.) (1993) Object-oriented Specification Case studies, Prentice-Hall.
Leavens, G and Weihl, W (1990) Reasoning about object oriented programs that use subtypes. OOPSLA'90, ACM Press.
Liskov, B (1987) Data abstraction and hierarchy. OOPSLA'87, ACM Press.
Liskov, B and Wing, J (1993) Family Values: A behavioural notion of Subtyping, Technical Report CMU-CS-93-187, Carnegie-Mellon University, July 1993, revised version of OOPSLA'93 and ECOOP'93 papers.
Maung, I, Howse, JR and Mitchell, RJ (1994) Formalising programming by difference, Technical Report, Computing Dept, Brighton University.
Meyer, B (1988) Object-oriented software construction, Prentice-Hall.
Meyer, B (1992) Applying “Design by Contract”, IEEE Computer, October 1992.
Mitchell, RJ, Howse, JR and Maung, I (1994) As-a: a relationship to support code reuse, accepted for publication in JOOP.
Morgan, C, Robinson, K and Gardiner, P (1988) On the Refinement Calculus. Technical Monograph PRG-70, Oxford University Computing Lab.
Porter, HH (1992) Separating the subtype hierarchy from the inheritance of implementation, JOOP, Vol 4, No 9, pp 20–29.
Stepney, S, Barden, R and Cooper, D (editors) (1992) Object Orientation in Z, Workshops in Computing, Springer-Verlag.
Turski, W and Maibaum, T (1987) The Specification of Computer Programs, Addison-Wesley.
Utting, M (1992) An Object-Oriented Refinement Calculus with Modular Reasoning, PhD thesis, University of New South Wales, Australia.
van Emden, M (1992) Rhetoric versus modernism in computing. Editorial, Journal of Logic and Computation, Vol. 2, No. 5, pp. 551–555.
Wegner, P and Zdonik, SB (1988) Inheritance as an incremental modification mechanism or what like is and isn't like, Lecture Notes in Computer Science, Vol 322, Springer Verlag, pp 55–77.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Maung, I., Howse, J.R., Mitchell, R.J. (1994). Towards a formalization of programming-by-difference. In: Naftalin, M., Denvir, T., Bertran, M. (eds) FME '94: Industrial Benefit of Formal Methods. FME 1994. Lecture Notes in Computer Science, vol 873. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58555-9_93
Download citation
DOI: https://doi.org/10.1007/3-540-58555-9_93
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-58555-8
Online ISBN: 978-3-540-49031-9
eBook Packages: Springer Book Archive