Extended Theory of Classes Sample Clauses

Extended Theory of Classes. ‌ As we stated in Section 2.3 a UTP theory consists of its alphabet of observational variables, the signature of operators in the language, and the healthiness conditions as idempotent func- tions that constrain the theory’s domain. We will now proceed to define each of these for our extended theory of classes. We assume the following types for our theory of classes: • Type, the set of all type names; • T (⊂ Type), the set of basic type names; • CName(⊂ Type), the set of class names; • AName, the set of attribute5 names. T → T ∀ ∈ T ∃ ∈ For VDM-RT, consists of the usual constructions such as strings, integers, sequences, maps, and sets. We also assume a function carrier : P U that gives the set of values for each type (in a suitable universe). Moreover, we assume that every type yields a non-empty carrier, that is t . v.v carrier(t), which ensures that we can always pick an arbitrary value for each type by using the indefinite description operator ϵ (as in Isabelle/HOL). Next we give the observational variables of our UTP theory of classes. cls : P CName atts : CName → (AName → Type) sc : CName ↔ CName ivr : CName → Object → C ≺ D C ≤ D = (C, D) ∈ sc+ ^ =^ (C, D) ∈ sc∗ ↔ The observational variable cls records the set of defined classes, atts is a partial function as- signing a set of attributes to each class, and sc is the subclass relationship. We deviate slightly from [10] and [47] in that sc is now a relation (CName CName) rather than a partial function. This allows us to support multiple inheritance, where the original work only supported single