Modular Verification of Object-Oriented Programs with Subtypes

Object-oriented programming languages like Smalltalk-80 have a message passing mechanism that allows code to work on instances of many di erent types. Techniques for the formal speci cation of such polymorphic functions and abstract types are described, as well as a logic for verifying programs that use message passing but not object mutation or assignment. The reasoning techniques formalize informal methods based on the use of subtypes. A formal de nition of subtype relationships among abstract types whose objects have no time-varying state but may be nondeterministic or incompletely speci ed is given. This de nition captures the intuition that each instance of a subtype behaves like some instance of that type's supertypes. Speci cations of polymorphic functions are written by allowing instances of subtypes as arguments. Restrictions on the way that abstract types are speci ed ensure that such function speci cations are meaningful and do not have to be rewritten when new subtypes are speci ed. Veri cation consists of showing that the speci ed relation among types has certain semantic properties, that each expression's value is an instance of a subtype of the expression's type, and a proof of correctness that ignores subtyping.

[1]  Craig Schaffert,et al.  An introduction to Trellis/Owl , 1986, OOPLSA '86.

[2]  Adele Goldberg,et al.  Smalltalk-80 - the interactive programming environment , 1984 .

[3]  John C. Reynolds,et al.  Three Approaches to Type Structure , 1985, TAPSOFT, Vol.1.

[4]  José Meseguer,et al.  Principles of OBJ2 , 1985, POPL.

[5]  John C. Mitchell,et al.  F-bounded polymorphism for object-oriented programming , 1989, FPCA.

[6]  James J. Horning,et al.  A Larch Shared Language Handbook , 1986, Sci. Comput. Program..

[7]  Barbara Liskov,et al.  Data Abstraction and Hierarchy , 1987 .

[8]  Ravi Sethi,et al.  A semantic model of types for applicative languages , 1982, LFP '82.

[9]  Alan Snyder,et al.  Exception Handling in CLU , 1979, IEEE Transactions on Software Engineering.

[10]  Maurice Herlihy,et al.  ARGUS REFERENCE MANUAL , 1987 .

[11]  Todd Leavens Gary Verifying object-oriented programs that use subtypes , 1989 .

[12]  Paul Hudak,et al.  Conception, evolution, and application of functional programming languages , 1989, CSUR.

[13]  A. Snyder CommonObjects: an overview , 1986, OOPWORK '86.

[14]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[15]  Herbert B. Enderton,et al.  A mathematical introduction to logic , 1972 .

[16]  C. A. R. Hoare,et al.  An axiomatic basis for computer programming , 1969, CACM.

[17]  Andrew P. Black,et al.  Object structure in the Emerald system , 1986, OOPLSA '86.

[18]  Dave Thomas,et al.  An exemplar based Smalltalk , 1986, OOPSLA 1986.

[19]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[20]  Brad J. Cox,et al.  Object-oriented programming ; an evolutionary approach , 1986 .

[21]  Jeannette M. Wing Writing Larch interface language specifications , 1987, TOPL.

[22]  Craig Schaffert,et al.  An introduction to Trellis/Owl , 1986, OOPSLA 1986.

[23]  Larry Carter,et al.  Distrbution and Abstract Types in Emerald , 1987, IEEE Transactions on Software Engineering.

[24]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[25]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[26]  Alan Snyder,et al.  Encapsulation and inheritance in object-oriented programming languages , 1986, OOPLSA '86.

[27]  J. Meseguer,et al.  Order-Sorted Algebra Solves the Constructor-Selector, Multiple Representation, and Coercion Problems , 1993, Inf. Comput..

[28]  Henry Ledgard,et al.  Reference Manual for the ADA® Programming Language , 1983, Springer New York.

[29]  Barbara Liskov,et al.  A language extension for expressing constraints on data access , 1978, CACM.

[30]  Kim B. Bruce,et al.  A modest model of records, inheritance and bounded quantification , 1988, [1988] Proceedings. Third Annual Information Symposium on Logic in Computer Science.

[31]  D. L. Parnas,et al.  On the criteria to be used in decomposing systems into modules , 1972, Software Pioneers.

[32]  Henry Lieberman,et al.  Using prototypical objects to implement shared behavior in object-oriented systems , 1986, OOPLSA '86.

[33]  James J. Horning,et al.  Report on the Larch Shared Language , 1986, Sci. Comput. Program..

[34]  Joseph A. Goguen,et al.  Parameterized Programming , 1984, IEEE Transactions on Software Engineering.

[35]  Luca Cardelli,et al.  Structural subtyping and the notion of power type , 1988, POPL '88.

[36]  Philip Wadler,et al.  How to make ad-hoc polymorphism less ad hoc , 1989, POPL '89.

[37]  Henry Lieberman,et al.  A Shared View of Sharing: The Treaty of Orlando , 1988, Object-Oriented Concepts, Databases, and Applications.

[38]  Manfred Broy,et al.  A Theory for Nondeterminism, Parallelism, Communication, and Concurrency , 1986, Theor. Comput. Sci..

[39]  David A. Schmidt,et al.  Denotationaisemantics: a methodology for language development , 1986 .

[40]  Hartmut Ehrig,et al.  Fundamentals of Algebraic Specification 1: Equations and Initial Semantics , 1985 .

[41]  P. America,et al.  A behavioural approach to subtyping in object-oriented programming languages , 1991 .

[42]  Tobias Nipkow Behavioural implementation concepts for nondeterministic data types , 1986 .

[43]  John B. Goodenough,et al.  Exception handling: issues and a proposed notation , 1975, CACM.

[44]  Luca Cardelli,et al.  Operations on records , 1989, Mathematical Structures in Computer Science.

[45]  T LeavensGary,et al.  Reasoning about object-oriented programs that use subtypes , 1990 .

[46]  H. Aït-Kaci A lattice theoretic approach to computation based on a calculus of partially ordered type structures (property inheritance, semantic nets, graph unification) , 1984 .

[47]  Wilf R. LaLonde Designing families of data types using exemplars , 1989, TOPL.

[48]  Kim B. Bruce,et al.  An algebraic model of sybtypes in object-oriented languages (draft) , 1986, OOPWORK '86.

[49]  Jeannette M. Wing A TWO-TIERED APPROACH TO SPECIFYING PROGRAMS , 1983 .

[50]  Barbara Liskov,et al.  A Language Extension for Controlling Access to Shared Data , 1976, IEEE Transactions on Software Engineering.