SDML Meta-Model in UML

Table of Contents

This document is a non-normative addition to the documentation for The Simple Domain Modeling Language (SDML) and describes a UML meta-model for the SDML language.

1. Introduction

While the normative description of SDML exists in the main documentation at https://sdml.io as an EBNF grammar and RDF/OWL Ontology. However, for tool makers, an object model is often more easily consumed and useful for tool-to-tool integration. The presentation form uses UML (specifically the PlantUML tool) as it is a standard and only commonly used elements are used here.

The model is organized into a set of separate packages and these are shown, with their dependencies in figure 1.

metamodel-overview.svg

Figure 1: Overview of Metamodel Packages

2. Package Foundation

This package contains the basic semantic components from which the rest of the language is built. Certain classes here are paired, so Type and Typed, Name and Named, and Named and Namespace.

metamodel-foundation.svg

Figure 2: The Foundation Package

2.1. Abstract Class Definition

Some element in the model that acts as a definition, i.e. a classifier.

Hierarchy

  • Named
  • Annotated
    • Definition
      • ModuleDefinition

2.2. Class Name

The name of something in the model, names must be unique within any enclosing namespace.

Syntax: "/\p{Lu}\p{Ll}][\p{Lu}\p{Ll}\p{Nd}]*(_[\p{Lu}\p{Ll}\p{Nd}]+)*/"

Hierarchy

  • String
    • Name

2.3. Abstract Class Named

A base class for named model elements, often members of a namespace.

Hierarchy

  • Named
    • Definition
    • Type
Table 1: Properties on class Named
Name Type Cardinality Notes
identity Name 1 The type of a model element’s name.

2.4. Abstract Class Namespace

A base class for model elements that contain other, named, elements. This can be thought of as a hash map, or dictionary, where the name of the element becomes it’s key.

Hierarchy

  • Namespace

Generic Parameters: T extends Named

Table 2: Properties on class Namespace
Name Type Cardinality Notes
members T 0..* members must have unique names within the namespace.

2.5. Abstract Class Type

The base class of all model elements that may be treated as types. All types are named.

Hierarchy

  • Named
    • Type
      • Datatype
      • Enum
      • MappingType
      • SequenceType
      • Structure
        • Entity
        • Event
      • Union

Super-Class: Named

Table 3: Properties on class Type
Name Type Cardinality Notes
members Typed 0..* The model elements declared with this type.
       

2.6. Abstract Class Typed

A base class for model elements that are typed, and therefore have a association to a type. Hierarchy

  • Typed
Table 4: Properties on class Typed
Name Type Cardinality Notes
type Type 1..* The type, or types, of this model element.

3. Package Modules

metamodel-models.svg

Figure 3: The Modules Package

3.1. Abstract Class Import

A association from a module to another module, or module definition, to make it available for use.

Hierarchy

  • Import
    • ModuleImport
    • ModuleDefinitionImport

3.2. Class Module

A named set of related definitions. The module is a namespace for top-level definitions that are therefore name-unique within the module. Hierarchy

  • Named
  • Namespace<T=ModuleDefinition>
  • Annotated
    • Definition
      • Module
Table 5: Properties on class Module
Name Type Cardinality Notes
+imports Import 0..* The set of imported definitions.

3.3. Abstract Class Module Definition

A module-level, or top-level, definition is one that is directly a member of a module.

Hierarchy

  • Named
  • Annotated
    • Definition
      • ModuleDefinition
        • Datatype
        • Enum
        • MappingType
        • Property
        • SequenceType
        • Structure
          • Entity
          • Event
        • TypeClass
        • Union

3.4. Abstract Class Module Definition Import

A association from a module to an external module definition to make it available for use.

Hierarchy

  • Import
    • ModuleDefinitionImport
Table 6: Properties on class Module Definition Import
Name Type Cardinality Notes
+import ModuleDefinition 1 An imported module definition.

3.5. Abstract Class Module Import

A association from a module to another module to make it’s definitions available for use.

Hierarchy

  • Import
    • ModuleImport
Table 7: Properties on class Module Import
Name Type Cardinality Notes
+import Module 1 An imported module.

4. Package Annotations

metamodel-annotations.svg

Figure 4: The Annotations Package

4.1. Abstract Class Annotated

Hierarchy

  • Annotated
    • Definition
Table 8: Properties on class Annotated
Name Type Cardinality Notes
annotations Annotation 0..*  

4.2. Abstract Class Annotation

Hierarchy

  • Named
    • Annotation
      • AnnotationProperty
      • Constraint
        • FormalConstraint
        • InformalControlledLanguageConstraint
        • InformalNaturalLanguageConstraint
Table 9: Properties on class Annotation
Name Type Cardinality Notes
subject Annotated 1  

4.3. Class Annotation Property

Hierarchy

  • Named
    • Annotation
    • Valued
      • AnnotationProperty
Table 10: Properties on class Annotation Property
Name Type Cardinality Notes
value Value 1  

4.4. Abstract Class Constraint

Hierarchy

  • Named
    • Annotation
    • Valued
      • Constraint
        • FormalConstraint
        • InformalControlledLanguageConstraint
        • InformalNaturalLanguageConstraint

5. Package Datatypes

metamodel-datatypes.svg

Figure 5: The Datatypes Package

metamodel-datatype-languages.svg

Figure 6: The Datatype Languages Tag Detail

5.1. Class Datatype

Hierarchy

  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Datatype

5.2. Class Binary

Hierarchy

  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Datatype
          • Binary

5.3. Class Boolean

Hierarchy

  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Datatype
          • Boolean

5.4. Class Decimal

Hierarchy

  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Datatype
          • Decimal

5.5. Class Double

Hierarchy

  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Datatype
          • Double

5.6. Class Integer

Hierarchy

  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Datatype
          • Integer

5.7. Class String

Hierarchy

  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Datatype
          • String
            • Name
            • LanguageTaggedString

5.8. Class Unsigned

Hierarchy

  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Datatype
          • Unsigned

5.9. Class Uri

Hierarchy

  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Datatype
          • Uri

5.10. Class Language Tag

Hierarchy

  • LanguageTag
Table 11: Properties on class LanguageTag
Name Type Cardinality Notes
language String 1  

5.11. Class Language Tagged String

Hierarchy

  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Datatype
          • String
            • LanguageTaggedString
Table 12: Properties on class LanguageTaggedString
Name Type Cardinality Notes
tag LanguageTag 1  

6. Package Sequence Types

metamodel-sequences.svg

Figure 7: The Sequence Types Package

6.1. Class Cardinality

Hierarchy

  • Cardinality
Table 13: Properties on class Cardinality
Name Type Cardinality Default
ordering Ordering 1 Unordered
uniqueness Uniqueness 1 Nonunique
min_length Unsigned 1 0
max_length Unsigned 0..1  

6.2. Enumeration Ordering

Variants

Ordered
Unordered

6.3. Class Sequence Type

Hierarchy

  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • SequenceType

Generic Parameters: T extends Type

Table 14: Properties on class SequenceType
Name Type Cardinality Notes
cardinality Cardinality 1  
values T 0..*  

6.4. Enumeration Uniqueness

Variants

Nonunique
Unique

7. Package Product Types

metamodel-product-types.svg

Figure 8: The Product Types Package

7.1. Class Entity

Hierarchy

  • Namespace<T=Member>
  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Structure
          • Entity
Table 15: Properties on class Entity
Name Type Cardinality Notes
identity Member 1  

7.2. Class Event

Hierarchy

  • Namespace<T=Member>
  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Structure
          • Event
Table 16: Properties on class Event
Name Type Cardinality Notes
source Event 1  

7.3. Abstract Class Member

Hierarchy

  • Named
    • Member

7.4. Class Member Definition

Hierarchy

  • Named
  • Typed
  • Annotated
    • Definition
      • Member
        • MemberDefinition

7.5. Class Member Group

Hierarchy

  • Annotated
    • MemberGroup
Table 17: Properties on class MemberGroup
Name Type Cardinality Notes
members Member unique 1..*  

7.6. Class Member Reference

Hierarchy

  • Named
    • Member
      • MemberReference
Table 18: Properties on class MemberReference
Name Type Cardinality Notes
+role Role 1  

7.7. Class Property

Hierarchy

  • Namespace<T=Role>
  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Property

7.8. Class Role

Hierarchy

  • Named
    • Typed
  • Annotated
    • Definition
      • Role
Table 19: Properties on class Role
Name Type Cardinality Notes
+is_identity boolean 1 false

7.9. Class Structure

Hierarchy

  • Namespace<T=Member>
  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Structure
          • Entity
          • Event
Table 20: Properties on class Entity
Name Type Cardinality Notes
+groups MemberGroup unique 0..*  

8. Package Sum Types

metamodel-sum-types.svg

Figure 9: The Sum Types Package

8.1. Class Enum

Hierarchy

  • Namespace<T=TypeVariant>
  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Enum

8.2. Class Mapping Type

Hierarchy

  • Named
    • Type
      • MappingType

Generic Parameters K extends SimpleType, V extends Type

Table 21: Properties on class MappingType
Name Type Cardinality Notes
key K 1  
value V 1  

8.3. Class Type Variant

Hierarchy

  • Typed
  • Named
    • Variant
      • TypeVariant

8.4. Class Union

Hierarchy

  • Namespace<T=TypeVariant>
  • Named
    • Type
  • Annotated
    • Definition
      • ModuleDefinition
        • Union

8.5. Abstract Class Variant

Hierarchy

  • Named
    • Variant

8.6. Class Value Variant

Hierarchy

  • Named
    • Variant
      • ∘ ValueVariant

9. Package Values

metamodel-values.svg

Figure 10: The Values Package

9.1. Class Binary Value

Hierarchy

  • Typed
    • Value
      • SimpleValue
        • BinaryValue
Table 22: Properties on class Binary Value
Name Type Cardinality Notes
{subsets} +domain Binary 1  

9.2. Class Boolean Value

Hierarchy

  • Typed
    • Value
      • SimpleValue
        • BooleanValue
Table 23: Properties on class Boolean Value
Name Type Cardinality Notes
{subsets} +domain Boolean 1  

9.3. Class Decimal Value

Hierarchy

  • Typed
    • Value
      • SimpleValue
        • DecimalValue
Table 24: Properties on class Decimal alue
Name Type Cardinality Notes
{subsets} +domain Decimal 1  

9.4. Class Double Value

Hierarchy

  • Typed
    • Value
      • SimpleValue
        • Doublealue
Table 25: Properties on class Double Value
Name Type Cardinality Notes
{subsets} +domain Double 1  

9.5. Class Integer Value

Hierarchy

  • Typed
    • Value
      • SimpleValue
        • IntegerValue
Table 26: Properties on class Integer Value
Name Type Cardinality Notes
{subsets} +domain Integer 1  

9.6. Class Mapping Value

Hierarchy

  • Typed
    • Value
      • MappingValue
Table 27: Properties on class Mapping Value
Name Type Cardinality Notes
{subsets} +domain MappingType 1  

9.7. Class Sequence Value

Hierarchy

  • Typed
    • Value
      • SequenceValue
Table 28: Properties on class Sequence Value
Name Type Cardinality Notes
{subsets} +domain SequenceType 1  

9.8. Abstract Class Simple Value

Hierarchy

  • Typed
    • Value
      • SimpleValue=

9.9. Class String Value

Hierarchy

  • Typed
    • Value
      • SimpleValue
        • StringValue
Table 29: Properties on class String Value
Name Type Cardinality Notes
{subsets} +domain String 1  

9.10. Class Unsigned Value

Hierarchy

  • Typed
    • Value
      • SimpleValue
        • UnsignedValue
Table 30: Properties on class Unsigned Value
Name Type Cardinality Notes
{subsets} +domain Unsigned 1  

9.11. Class Uri Value

Hierarchy

  • Typed
    • Value
      • SimpleValue
        • UriValue
Table 31: Properties on class Uri Value
Name Type Cardinality Notes
{subsets} +domain Uri 1  

9.12. Abstract Class Value

Hierarchy

  • Typed
    • Value

10. Package Formal Constraints

metamodel-constraints.svg

Figure 11: The Constraints Package

10.1. Class Constraint Language Tag

Hierarchy

  • ConstraintLanguageTag
Table 32: Properties on class Formal Constraint
Name Type Cardinality Notes
natural_language String 0..1  
controlled_language String 0..1  

10.2. Class Formal Constraint

This is a constraint described using a structured expression language based on ISO Common Logic.

Hierarchy

  • Named
    • Annotation
      • Constraint
        • FormalConstraint
Table 33: Properties on class Formal Constraint
Name Type Cardinality Notes
sentence Sentence 1  

10.3. Class Informal Controlled Language Constraint

This is a constraint described informally using a controlled natural language (CNL).

Hierarchy

  • Named
    • Annotation
      • Constraint
        • InformalControlledLanguageConstraint
Table 34: Properties on class Informal Controlled Language Constraint
Name Type Cardinality Notes
text String 1  

10.4. Class Informal Natural Language Constraint

This is a constraint described informally using plain language.

Hierarchy

  • Named
    • Annotation
      • Constraint
        • InformalNaturalLanguageConstraint
Table 35: Properties on class Informal Natural Language Constraint
Name Type Cardinality Notes
text String 1  

11. Package Constraint Sentences

metamodel-constraint-sentences-overview.svg

Figure 12: The Constraint Sentences Package Overview

metamodel-constraint-sentences-simple.svg

Figure 13: Constraint Simple Sentences

metamodel-constraint-sentences-boolean.svg

Figure 14: Constraint Boolean Sentences

metamodel-constraint-sentences-quantified.svg

Figure 15: Constraint Quantified Sentences

11.1. Class Atomic

Hierarchy

  • Sentence
    • Simple
      • Atomic
Table 36: Properties on class Atomic
Name Type Cardinality Notes
predicate Term 1  
arguments Term ordered 0..*  

11.2. Class Biconditional

Corresponds the expression to A <==> B, or \(A \iff B\).

Hierarchy

  • Sentence
    • Boolean
      • Binary
        • Biconditional

11.3. Abstract Class Binary

Hierarchy

  • Sentence
    • Boolean
      • Binary
        • Biconditional
        • Conjunction
        • Disjunction
        • ExclusiveDisjunction
        • Implication
Table 37: Properties on class Binary
Name Type Cardinality Notes
lhs Sentence 1 Subsets the association nested.
rhs Sentence 1 Subsets the association nested.

11.4. Abstract Class Boolean

Hierarchy

  • Sentence
    • Boolean
      • Binary
        • Biconditional
        • Conjunction
        • Disjunction
        • ExclusiveDisjunction
        • Implication
      • Unary
        • Negation

11.5. Class Conjunction

Corresponds the expression to A and B, or \(A \land B\).

  • Sentence
    • Boolean
      • Binary
        • Conjunction

11.6. Class Disjunction

Corresponds the expression to A or B, or \(A \lor B\).

  • Sentence
    • Boolean
      • Binary
        • Disjunction

11.7. Class Equation

Corresponds the expression to A = B, or \(A = B\).

Hierarchy

  • Sentence
    • Simple
      • Atomic
      • Relational
        • Equation

11.8. Class Exclusive Disjunction

Corresponds the expression to A xor B, or \(A \veebar B\).

Hierarchy

  • Sentence
    • Boolean
      • Binary
        • ExclusiveDisjunction

11.9. Class Greater Than

Corresponds the expression to A > B, or \(A \gt B\).

Hierarchy

  • Sentence
    • Simple
      • Atomic
      • Relational
        • GreaterThan

11.10. Class Greater Than Or Equal

Corresponds the expression to A >= B, or \(A \geq B\).

Hierarchy

  • Sentence
    • Simple
      • Atomic
      • Relational
        • GreaterThanOrEqual

11.11. Class Implication

Corresponds the expression to A implies B, or \(A \implies B\).

Hierarchy

  • Sentence
    • Boolean
      • Binary
        • Implication

11.12. Class Less Than

Corresponds the expression to A <= B, or \(A \lt B\).

Hierarchy

  • Sentence
    • Simple
      • Atomic
      • Relational
        • LessThan

11.13. Class Less Than Or Equal

Corresponds the expression to A <= B, or \(A \leq B\).

Hierarchy

  • Sentence
    • Simple
      • Atomic
      • Relational
        • LessThanOrEqual

11.14. Class Negation

Corresponds the expression to not A, or \(\neg A\).

Hierarchy

  • Sentence
    • Boolean
      • Unary
        • Negation

11.15. Abstract Class Sentence

Hierarchy

  • Sentence
    • Boolean
      • Binary
        • Biconditional
        • Conjunction
        • Disjunction
        • ExclusiveDisjunction
        • Implication
      • Unary
        • Negation
    • Quantified
    • Simple
      • Atomic
      • Relational
        • Equation
        • GreaterThan
        • GreaterThanOrEqual
        • LessThan
        • LessThanOrEqual
        • StrictInequation
Table 38: Properties on class Sentence
Name Type Cardinality Notes
+nested Sentence 0..* Any sentences that are nested within this sentence.
+parent Sentence 0..1 The parent of this sentence, if nested.

11.16. Class Quantified

Hierarchy

  • Sentence
    • Quantified
Table 39: Properties on class Quantified
Name Type Cardinality Notes
+binding QuantifiedVariableBinding 1  
+body Sentence 1  

11.17. Class Quantified Variable

Hierarchy

  • Named
    • QuantifiedVariable
Table 40: Properties on class Quantified Variable
Name Type Cardinality Notes
+sequence Term 1 Identifies a term that yields a sequence to be iterated over.

11.18. Class Quantified Variable Binding

  • QuantifiedVariableBinding
Table 41: Properties on class Quantified Variable Binding
Name Type Cardinality Notes
+quantifier Quantifier 1  
+variable QuantifiedVariable 1  

11.19. Enum Quantifier

Universal
Corresponds to the keyword forall or the operator ∀.
Existential
Corresponds to the keyword exists or the operator ∃

11.20. Abstract Class Relational

Hierarchy

  • Sentence
    • Simple
      • Atomic
      • Relational
        • Equation
        • GreaterThan
        • GreaterThanOrEqual
        • LessThan
        • LessThanOrEqual
        • StrictInequation
Table 42: Properties on class Relational
Name Type Cardinality Notes
lhs Term 1 Subsets the association nested.
rhs Term 1 Subsets the association nested.

11.21. Abstract Class Simple

Hierarchy

  • Sentence
    • Simple
      • Atomic
      • Relational
        • Equation
        • GreaterThan
        • GreaterThanOrEqual
        • LessThan
        • LessThanOrEqual
        • StrictInequation

11.22. Class Strict Inequation

Corresponds the expression to A /= B, or \(A \ne B\).

Hierarchy

  • Sentence
    • Simple
      • Atomic
      • Relational
        • StrictInequation

11.23. Abstract Class Unary

Hierarchy

  • Sentence
    • Boolean
      • Unary
        • Negation
Table 43: Properties on class Unary
Name Type Cardinality Notes
+rhs Sentence 1 Subsets the association nested.

12. Package Constraint Terms

metamodel-constraint-terms.svg

Figure 16: The Constraint Terms Package

12.1. Class Functional Term

Corresponds to function(...arguments) or \(f(a_0,\cdots, a_n)\)

Hierarchy

  • Term
    • FunctionalTerm
Table 44: Properties on class FunctionalTerm
Name Type Cardinality Notes
function Term 1  
arguments Term 0..*  

12.2. Class Mapping Sequence Variables

Hierarchy

  • SequenceVariables
    • MappingSequenceVariables

Super Class: SequenceVariables

Table 45: Properties on class MappingSequenceVariables
Name Type Cardinality Notes
key Name 1  
value Name 1  

12.3. Class Sequence Builder

Corresponds to {a | forall a, id(a)} or \(\left\{ a | \forall a id(a) \right\}\)

Hierarchy

  • Term
    • SequenceBuilder
Table 46: Properties on class SequenceBuilder
Name Type Cardinality Notes
variables SequenceVariables 1  
body QuantifiedSentence 1  

12.4. Abstract Class Sequence Variables

Hierarchy

  • SequenceVariables

12.5. Class Sequence Variable Set

Hierarchy

  • SequenceVariables
    • SequenceVariableSet
Table 47: Properties on class SequenceVariableSet
Name Type Cardinality Notes
names Name unique 1..*  

12.6. Abstract Class Term

Hierarchy

  • Term
    • FunctionalTerm
    • Name
    • SequenceBuilder
    • Value

13. Package Constraint Environments

metamodel-constraint-environments.svg

Figure 17: The Constraint Environments Package

13.1. Abstract Class Constant

Hierarchy

  • Typed
  • Named
    • EnvironmentDefinition
      • Constant

13.2. Abstract Class Environment Definition

Hierarchy

  • Named
    • EnvironmentDefinition
      • Constant
        • ConstantSentence
        • ConstantValue
      • Function

13.3. Class Function

Hierarchy

  • Named
    • EnvironmentDefinition
      • Function
Table 48: Properties on class Function
Name Type Cardinality Notes
+body Sentence 1  
+parameters Parameter 0..*  

13.4. Class Parameter

Hierarchy

  • Named
  • Typed
    • Parameter

14. Package Type Classes

metamodel-type-classes.svg

Figure 18: The Type Classes Package

14.1. Class Method

Hierarchy

  • Typed
  • Named
  • Annotated
    • Definition
      • Method
Table 49: Properties on class Method
Name Type Cardinality Notes
+parameters Parameter 0..*  
+body Sentence 0..1  

14.2. Class Parameter

Hierarchy

  • Typed
  • Named
    • Parameter

14.3. Class Reference Argument

Hierarchy

  • ReferenceArgument
    • ReferenceList
    • ReferenceWildcard

14.4. Class Reference List

Hierarchy

  • ReferenceArgument
    • ReferenceList
Table 50: Properties on class Type Class Reference
Name Type Cardinality Notes
+classes TypeClassReference 1..*  

14.5. Class Reference Wildcard

Hierarchy

  • ReferenceArgument
    • ReferenceWildcard

14.6. Class Type Class

Hierarchy

  • Namespace<T=Method>
  • Named
  • Annotated
    • Definition
      • ModuleDefinition
        • TypeClass
Table 51: Properties on class Type Class
Name Type Cardinality Notes
+variables TypeVariable 0..*  
+methods Method 0..*  

14.7. Class Type Variable

Hierarchy

  • Named
    • TypeVariable
Table 52: Properties on class Type Variable
Name Type Cardinality Notes
+restrictions TypeClassReference 0..*  

14.8. Class Type Class Reference

Hierarchy

  • TypeClassReference
Table 53: Properties on class Type Class Reference
Name Type Cardinality Notes
+class TypeClass 1  
+arguments ReferenceArgument 1  

Author: Simon Johnston

Created: 2024-02-26 Mon 09:22