Reasoning about object-oriented programs that use subtypes

@inproceedings{Leavens1990ReasoningAO,
  title={Reasoning about object-oriented programs that use subtypes},
  author={Gary T. Leavens and William E. Weihl},
  booktitle={OOPSLA/ECOOP '90},
  year={1990}
}
Programmers informally reason about object-oriented programs by using subtype relationships to classify the behavior of objects of different types and by letting supertypes stand for all their subtypes. We describe formal specification and verification techniques for such programs that mimic these informal ideas. Our techniques are modular and extend standard techniques for reasoning about programs that use abstract data types. Semantic restrictions on subtype relationships guarantee the… 

Figures from this paper

Subtyping for Mutable Types in Object-Oriented Programming Languages
TLDR
This work defines what it means for one abstract data type to be a subtype of another in object-oriented programming languages, and allows for both mutation and aliasing.
Modular Reasoning in an Object-Oriented Refinement Calculus
TLDR
A simple model of procedure invocation for object-oriented languages based on the refinement calculus is developed and the minimum requirements for a system to support modular reasoning are defined.
Specification and verification of object-oriented programs using supertype abstraction
TLDR
A formal definition for legal subtype relations, based on the specified behavior of objects, is given, and it is shown that this definition is sufficient to ensure the soundness of the verification logic.
Modular specification and verification of object-oriented programs
TLDR
A method for modular specification and verification using the ideas of subtype and normal type, which corresponds to informal techniques used by object-oriented programmers, and a formal model of abstract type specifications is used.
Specifying and Verifying Object-Oriented Programs: An Overview of the Problems and a Solution
This paper presents a careful analysis of the problem of reasoning about objectoriented programs. A solution to this problem allows new types to be added to a program without respecifying or
Modular Verification of Object-Oriented Programs with Subtypes
TLDR
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.
Reasoning about Object Structures Using Ownership
TLDR
An ownership model is developed, which allows one to structure the object store and to restrict reference passing and the operations that can be performed on references, and is used to generalize classical object invariants to cover such object structures.
Behavioral Subtyping Using Invariants and Constraints
TLDR
A way of defining the subtype relation that ensures that subtype objects preserve behavioral properties of their supertypes is presented, and the ramifications of the approach of subtyping the design of type families are discussed.
6 Concepts of Behavioral Subtyping and a Sketch of their Extension to Component-Based Systems
TLDR
This work sketches a notion of behavioral subtyping for objects in component-based systems, where reasoning about the events that a component can raise is important.
Specifications and their use in defining subtypes
TLDR
A way of specifying types is presented, and it is shown how some extra information, in addition to specifications of the objects' methods, is needed to support reasoning and a new way of showing that one type is a subtype of another.
...
...

References

SHOWING 1-10 OF 57 REFERENCES
Verifying object-oriented programs that use subtypes
TLDR
This dissertation shows how to write formal specifications of functions that useGeneric invocation and gives a logic for verifying applicative programs that use generic invocation and a formal definition of subtype relationships among immutable abstract types, including nondeterministic and incompletely specified types.
Modular Verification of Object-Oriented Programs with Subtypes
TLDR
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.
Three Approaches to Type Structure
We examine three disparate views of the type structure of programming languages: Milner's type deduction system and polymorphic let construct, the theory of subtypes and generic operators, and the
A behavioural approach to subtyping in object-oriented programming languages
It is argued that in object-oriented programming languages a distinction should be made between illheritallce, considered as a mechanism by which classes can share code for variables and methods, and
Representation independence and data abstraction
TLDR
This work studies the representation independence properties of a typed functional language with polymorphic functions and abstract data type declarations in which data type implementations may be passed as function parameters and returned as results.
Encapsulation and Inheritance in Object-Oriented Programming Languages
TLDR
This paper examines the relationship between inheritance and encapsulation and develops requirements for full support of encapsulation with inheritance.
On understanding types, data abstraction, and polymorphism
TLDR
A λ-calculus-based model for type systems that allows us to explore the interaction among the concepts of type, data abstraction, and polymorphism in a simple setting, unencumbered by complexities of production programming languages is developed.
How to make ad-hoc polymorphism less ad hoc
TLDR
Type classes extend the Hindley/Milner polymorphic type system, and provide a new approach to issues that arise in object-oriented programming, bounded type quantification, and abstract data types.
A TWO-TIERED APPROACH TO SPECIFYING PROGRAMS
TLDR
This thesis presents an interface specification language for the CLU programming language and presumes the use of the Larch shared language, and suggests a number of kinds of analyses that one might want to perform on two-tiered specifications.
Parameterized Programming
  • J. Goguen
  • Computer Science
    IEEE Transactions on Software Engineering
  • 1984
TLDR
Three new ideas that seem especially useful in supporting parameterized programming are introduced: theories, which declare global properties of program modules and interfaces; views, which connect theories with program modules in an elegant way; and module expressions, a kind of general structured program transformation which produces new modules by modifying and combining existing modules.
...
...