concepts.dsl.dsl_types#
Data structures for custom types in a DSL.
All types extend the base class TypeBase
.
TypeBase
has four derived types:
- :class:`ObjectType`: corresponds to an object in the physical world.
- :class:`ValueType`: corresponds to an encoding of a feature of the object.
- :class:`UnionType`: corresponds to a union of types.
- :class:`SequenceType`: corresponds to a tuple or list type.
- :class:`~concepts.dsl.dsl_functions.FunctionType`: corresponds to a function over the encodings.
- :class:`~concepts.dsl.dsl_functions.OverloadedFunctionType`: corresponds to a collection of functions that share the same name.
Furthermore, ValueType
has four derived types:
- :class:`ConstantType`: corresponds to a constant.
- :class:`TensorValueTypeBase`: corresponds to a tensor-based encoding.
- :class:`PyObjValueType`: corresponds to an arbitrary Python object.
Module attributes
AutoType means the type will be automatically inferred later. |
|
The "quantified index" object, used to indicate a quantified dimension in a tensor value type. |
Functions
|
Check if the type is AnyType. |
|
Check if the type is AutoType. |
Classes
The ConstantType corresponds to a constant value. |
|
FormatContext is a context manager that controls the format of types and objects. |
|
The class representing a constant object in a DSL. |
|
The ObjectType corresponds to the type of "real-world" objects. |
|
The basic sequence type. |
|
A value type refers to a type of some features associated with physical objects. |
|
Base class for all types. |
|
The UnionType is a type that is the union of multiple types. |
|
The ValueType corresponds to a value of a certain type. |
|
The class representing a variable in a function. |
|