Powertype

Term

Powertype

Aliases

-

Identity

  • Term ID: src/main/doxsite/glossary/object-foundation/powertype.dox

  • English label: Powertype

  • Japanese label: パワータイプ

  • Category: Object Foundation

  • Status: normative

  • Definition authority: SimpleModeling BoK

DEFINITION

A Powertype is a Classifier that explicitly defines a classification axis for Classes or Objects together with the classification values available on that axis. In SimpleModeling, Generalization expresses a general-to-specific hierarchy among Classifiers, whereas a Powertype models an axis and its categories, such as customer type or product category.

UML

In UML 2.5.1, a Powertype is a Classifier designated by the powertype property of a GeneralizationSet, with its Instances corresponding to the specific Classifiers in that GeneralizationSet. SimpleModeling aligns with this usage while extending it so a classification axis and its categories can remain explicit Model Elements even when every concrete subclass is not modeled. A strict UML mapping uses a GeneralizationSet and Powertype Classifier; a category-value mapping may use an Enumeration or a Profile.

Common Usage

In business systems, a Powertype may be implemented in a form resembling a classification code, reference-data table, or enum. A Powertype is not merely a list of code values: it owns the Domain Model meaning of what is classified and by which axis. A display-label list or database master table alone is not a Powertype.

Object-Functional Paradigm

On the object side, a Powertype represents a classification axis and its categories for Objects or Classifiers. On the functional side, a closed Powertype may connect to a sum type, enum, and pattern matching so category-specific processing can be checked through Types. Whether an open classification is reduced to a closed enum is a separate realization decision.

CML

CML (Cozy Modeling Language) defines Powertype as an Object kind and describes its classification values as Kinds. A classified Class, Entity, or related element may reference a Powertype. The CML Powertype, its relationship to a classified element, and a generated program Type are related but are neither identical nor necessarily mapped one-to-one.

Scala

A closed Powertype may be realized in Scala as an enum , a sealed trait with case objects, or a generated Type carrying values. The current SimpleModeler generates a Scala class family with enumeration values from Powertype Kinds. Categories may carry logical values, datastore values, and display labels, but the Scala representation is not the canonical definition of Powertype.

simplemodeling-lib

The current simplemodeling-lib does not define one universal base representing an Object Model Powertype. SimpleModeler owns the model representation and Scala code generation, while simplemodeling-model owns the base contract used by generated code. Schemas, Data Types, and Value Domains from simplemodeling-lib may support value contracts at boundaries, but they do not replace the classification semantics of a Powertype.

Public Usage

Japanese articles and videos introduce the term as パワータイプ(Powertype). Introductory material explains it as “an element that models a classification axis and the categories used on that axis” and contrasts it with Generalization as “Generalization provides a general-to-specific hierarchy; Powertype provides an axis and categories.” The UML GeneralizationSet mechanism is discussed only when a precise metamodel explanation is required.

Boundary

  • Powertype is not synonymous with Generalization. Generalization is a taxonomic Relationship among Classifiers, while a Powertype is a Classifier representing an axis and its categories.

  • A Powertype is not a kind of Association or Dependency and is not itself treated as a Relationship among Objects.

  • Powertype is not synonymous with an enum, classification code, display-label list, or reference-data table.

  • Powertype is not synonymous with StateMachine. A Powertype describes classification, whereas a StateMachine describes state transitions over time.

  • A CML Powertype and a Scala Type do not necessarily map one-to-one.

  • Generalization

  • Classifier

  • Class

  • Type

  • Object

  • Relationship

  • StateMachine

  • CML

References

  • OMG Unified Modeling Language 2.5.1

  • src/main/doxsite/domain-modeling/domain-model-elements.dox

  • src/main/doxsite/glossary/object-foundation/classifier.dox

  • src/main/doxsite/glossary/object-foundation/generalization.dox

  • src/main/doxsite/glossary/object-foundation/type.dox

  • /Users/asami/src/dev2025/simple-modeler/src/main/scala/org/simplemodeling/model/MPowertype.scala

  • /Users/asami/src/dev2025/simple-modeler/src/main/scala/org/simplemodeling/model/MPowertypeKind.scala

  • /Users/asami/src/dev2025/simple-modeler/src/main/scala/org/simplemodeling/SimpleModeler/transformers/scala/PowertypeScalaModelTransformer.scala

  • /Users/asami/src/dev2026/simplemodeling-model/src/main/scala/org/simplemodeling/model/powertype/Powertype.scala

  • docs/spec/glossary-entry-format.md