|
runtime 1.1.4
Checked CEL programs, owned values, and reusable execution stacks
|
Describe complete semantic types and own scalar or aggregate results. Concrete vectors and tuples use trusted boundary adapters; opaque client leaves must be trivially copyable.
Classes | |
| struct | cel::layout |
| A byte extent and its requested alignment, both in bytes. More... | |
| class | cel::value |
| Holds any type representable by CEL, including client-defined types. More... | |
| class | cel::value_type |
| An immutable, shared semantic type with a canonical byte layout. More... | |
| struct | cel::record_field |
| A source-order name/type pair validated by value_type::record. More... | |
Enumerations | |
| enum class | cel::range_kind { cel::range_kind::range , cel::range_kind::range_from , cel::range_kind::range_to , cel::range_kind::range_to_inclusive , cel::range_kind::range_inclusive , cel::range_kind::range_full } |
| Identifies every source range form independently of its endpoint layout. More... | |
| enum class | cel::type_kind { cel::type_kind::leaf , cel::type_kind::array , cel::type_kind::tuple , cel::type_kind::record , cel::type_kind::range , cel::type_kind::callable } |
| Identifies a descriptor's structural category. More... | |
Functions | |
| template<class T> | |
| value_type | cel::native_type () |
| Returns the runtime's complete descriptor for a trusted native value type. | |
| value_type | cel::bind_runtime_ownership (const value_type &type) |
| Returns a runtime ownership-capable witness for the complete immutable type graph. | |
|
strong |
Identifies every source range form independently of its endpoint layout.
Example: range_kind::range_inclusive describes start..=end.
|
strong |
Identifies a descriptor's structural category.
Example: an empty source unit has type_kind::tuple.
| value_type cel::bind_runtime_ownership | ( | const value_type & | type | ) |
Returns a runtime ownership-capable witness for the complete immutable type graph.
Preserves semantic identity, layout, names, ordering, parameter admission, and results. Binds deferred callables, including nested results, to the runtime's canonical carrier operations; retains already installed canonical ownership and shares unchanged metadata. The input remains unchanged. Binding creates no live callable, body, or initialized bytes and invokes no ownership operations. Repeated binding is representation-compatible.
Throws std::invalid_argument for foreign or incompatible installed callable operations anywhere in the graph. Allocation failures propagate without changing the input.
Complexity: expected O(V + E + S) time, O(V) auxiliary space, and O(V + E + S) new result metadata for distinct nodes V, edges E, and copied identity/name bytes S. Traversal and cleanup use no native recursion.
Example (with <cel/runtime.hpp>):
| value_type cel::native_type | ( | ) |
Returns the runtime's complete descriptor for a trusted native value type.
Tuples and vectors use canonical structural adapters, not native object layouts. record_adapter specializations provide complete nominal-record descriptors. Complexity: O(V + E) time and result metadata on first use, with V distinct concrete descriptor types and E their field/element edges; O(concrete nesting depth) call space. Subsequent calls take O(1) time and auxiliary space.
Example: auto type = native_type<std::vector<std::tuple<bool, double>>>();.