UOR Type System
Imports
https://uor.foundation/schema/https://uor.foundation/u/
Classes
| Name | Subclass Of | Disjoint With | Comment |
|---|---|---|---|
TypeDefinition | Thing | A runtime type declaration. The root class for all UOR types. Each TypeDefinition, when resolved, produces a partition of the ring at the specified quantum level. | |
PrimitiveType | TypeDefinition | A primitive type defined by a fixed bit width. The carrier is the entire ring Z/(2^n)Z at the specified quantum level. | |
ProductType | TypeDefinition | A product (Cartesian) type formed from multiple component types. The carrier is the product of the component carriers. | |
SumType | TypeDefinition | A sum (disjoint union) type formed from multiple variant types. The carrier is the disjoint union of the variant carriers. | |
ConstrainedType | TypeDefinition | A type formed by constraining a base type with a predicate. The carrier is the subset of the base carrier satisfying the constraint. |
Properties
| Name | Kind | Functional | Domain | Range | Comment |
|---|---|---|---|---|---|
bitWidth | Datatype | true | PrimitiveType | positiveInteger | The bit width of a primitive type (the quantum level n). The carrier is Z/(2^n)Z. |
component | Object | false | ProductType | TypeDefinition | A component type in a product type. |
baseType | Object | true | ConstrainedType | TypeDefinition | The base type that a constrained type restricts. |
constraint | Datatype | false | ConstrainedType | string | The constraint predicate applied to the base type. Expressed as a string in the Prism constraint language. |
contentAddress | Object | true | TypeDefinition | Address | The content-derived address of this type definition, uniquely identifying the type in the UOR address space. |