|
runtime 1.0.0
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 |
| Describes a byte extent and its requested alignment, both in bytes. A checked storage operation accepts a zero size but requires a nonzero power-of-two alignment. The fields describe storage, not initialized objects or their ownership. Example: cel::layout leaf{sizeof(double), alignof(double)};. More... | |
| class | cel::value |
| Owns a complete runtime value; copies own independent mutable payloads. Installed callables are explicit reference-semantic code handles: copies share frozen code, callback references, and the carrier's recursive-entry guard, not mutable aggregate payloads. Moved-from and default values are source unit. Internal descriptors may be shared. Opaque leaves own their bytes, not objects reachable through client pointers. Composite admission rejects incompatible opaque ownership operations even for equal shapes. Example: auto number = value::from(2.0); auto copy = number;. More... | |
| class | cel::value_type |
| Shares an immutable, complete semantic type and canonical byte layout. Leaf identity is concrete C++ type identity; records additionally retain their nominal identity and field names. Capabilities do not change semantic identity. Copies share immutable metadata, never mutable value payloads. Borrowed references, spans, and string views remain valid while a descriptor retaining their metadata remains alive. Keep this descriptor unchanged while using its views. Factories retain component descriptors and copy supplied names; input spans and strings need not outlive construction. See the example for value for record construction. Example: auto numbers = value_type::array(value_type::leaf<double>());. More... | |
| struct | cel::record_field |
| Supplies a source-order name/type pair to value_type::record, which validates its name. Example: record_field{"enabled", value_type::leaf<bool>()}. 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. Example: range_kind::range_inclusive describes start..=end. 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. Example: an empty source unit has type_kind::tuple. More... | |
Functions | |
| template<class T> | |
| value_type | cel::native_type () |
| Returns the runtime's complete descriptor for a trusted native value type. Removes cv/reference qualifiers; leaves must be trivially copyable. Tuples and vectors use canonical structural adapters, not native object layouts. Complexity: O(distinct descriptor nodes and fields) on first use, O(1) thereafter. Example: auto type = native_type<std::vector<std::tuple<bool, double>>>();. | |
| 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 and auxiliary space for V distinct metadata nodes, E edges, and S copied name bytes; traversal and cleanup use no native recursion. Example (with <cel/runtime.hpp>): | |
|
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 and auxiliary space for V distinct metadata nodes, E edges, and S copied name bytes; traversal and cleanup use no native recursion. Example (with <cel/runtime.hpp>):