Type
Term |
Type |
Aliases |
- |
Identity
-
Term ID:
src/main/doxsite/glossary/object-foundation/type.dox -
English label: Type
-
Japanese label: 型
-
Category: Object Foundation
-
Status: normative
-
Definition authority: SimpleModeling BoK
DEFINITION
A Type is a semantic contract in the SimpleModeling Object-Functional Paradigm that statically specifies the contexts in which values may be used and the operations, transformations, results, effects, and compositions that apply to those values.
UML
In UML 2.5.1, Type is an abstract ModelElement that constrains the values represented by a TypedElement. Classifier specializes Type, and Class, Interface, and DataType specialize Classifier. A UML Class or Interface is therefore itself a Type; it does not stand outside and realize a separate Type. SimpleModeling preserves this relationship while centering its canonical term Type on an Object-Functional semantic contract.
Common Usage
In programming languages, Type includes not only types introduced by class declarations but also function types, union types, intersection types, type aliases, applied types, and other forms. Type and Class are therefore not synonyms.
Object-Functional Paradigm
In an Object Model, Classes, Interfaces, Traits, and Data Types describe object structure, contracts, reusable partial structures, and value meaning instead of foregrounding abstract Type. On the functional side, Types describe values, functions, results, effects, and composability. A SimpleModeling Type connects these sides and provides a shared contract for realizing an Object Model in a type system such as Scala’s.
CML
CML (Cozy Modeling Language) formalizes Object kinds such as Entity, Value, Trait, Powertype, and StateMachine together with Attributes, Associations, Operations, and Constraints. These descriptions participate in Types during realization, but a CML Model Element and a programming-language Type are neither identical nor necessarily mapped one-to-one.
Scala
In Scala, declarations such as class, trait, enum, and opaque type introduce Types, while the language also expresses function, union, intersection, and applied types and type lambdas. Higher-kinded type constructors and kinds matter at the Scala boundary but are advanced topics outside an Object Model introduction.
simplemodeling-lib
simplemodeling-lib does not define one universal Type base for an entire Model. It distributes responsibilities according to meaning across Scala abstract classes, classes, traits, case classes, enums, opaque types, function types, Schema Data Types, Runtime Data Types, and other constructs. This is a realization policy for Types, not the canonical definition of Type itself.
Public Usage
Japanese articles and videos introduce the term as 型(Type). Object Model explanations use the concrete terms Class, Interface, Trait, and Data Type, while Type is used for the Object-Functional contract or the Scala realization boundary. Classifier is introduced only when the UML relationship requires precise explanation.
Boundary
-
Type is not synonymous with Class, Interface, or Trait.
-
A CML Model Element and a Scala Type are neither identical nor necessarily mapped one-to-one.
-
Type Constructor and Kind are related to Type but are not the same concept.