Unformatted text preview: Initially they have presented the definition of object in this model of computation and
later on they have added special clauses which specify the constraints on the object.
They have modeled a type as a triple, < 0, V, M >, where O is an object, V is a set of
values, and M is a set of methods. According to them each method for an object is a
constructor, an pbserver, or a mutator. Constructors of an object of type 1: retum new
objects of type t; observers return results of other types; mutators modify the values of
objects of type 1:. A type is mutable if any of its methods'is a mutator. According to them
A type specification includes the following information:
0 The type’s name;
0 A description of the type’s value space;
0 For each of the type’s methods;
-lts,signature (including signaled exceptions);
-Its behavior in terms of pre-conditions and post—conditions.
. . . . mam?)
They didn’t mclude creators 1n type spec1£1cations thus—199mg a powerful reasoning tool:
data type induction Data.type induction is used to prove type invariants. To compensate
for the lack of data type induction, they have stated the invariant explicitly in the type
speciﬁcation by means of an invariant clause. The invariant defines the legal values of its
type f. To state that a type is a subtype of s‘ome other type, they have simply appended a
subtype clause to its specification.
Their first definition of the subtype. relation relies on the addition of some information to specifications, namely a constraint clause that states the history properties of the type explicitly. According to them, the formal definition of the subtype relation is ...
View Full Document
- Spring '10
- Dr. Thomas