Expand description
Enumerable workload-construction nodes.
Every node kind of the workload grammar (workload root,
phase, op, poll, scenario node, …) implements
EnumerableNode: it names itself with a single
discriminant, enumerates its valid sub-elements WITH their
valid forms, and VALIDATES a runtime AST (partial or
complete) directly. Child node kinds are held as DIRECT
&'static dyn EnumerableNode references inside Form — no
side mapping from names to nodes exists, so a dangling
reference is unrepresentable: the reference graph is checked
by the compiler, the same single-discriminant discipline the
wrapper registry uses at the execution-context layer.
These tables are the single declaration point for each
element (name + forms + doc together). The flat name lists in
crate::vocab are PROJECTIONS of these tables (the parser
consumes those projections for its rejection checks), and the
phase table is pinned against the
crate::model::WorkloadPhase struct itself by a serde
field probe in this module’s tests.
ENFORCEMENT: parse_workload runs validate_workload on
every extends-merged document (the construction gate —
docs/guide/construction_model.md). COHERENCE AXIOM: a
construction that cannot be represented in the synthesizer
fuzz is not yet a valid construction; the fuzzer’s deferral
list is the debt register against this axiom.
Context sensitivity: EnumerableNode::elements receives
the partial AST node (when the caller has one) and may narrow
— e.g. a phase carrying poll: pins concurrency to 1, a
phase with inline ops: loses the tags: selector (one
source of ops, SRD-108 Part A), and an op with abstract:
drops the statement payload.
Structs§
- Abstract
Node - Backoff
Node - Binding
Classes Node - Checkpoint
Node - Continue
IfNode - Delay
Node - Element
Spec - One valid sub-element of a node: the single declaration point for its name, accepted forms, and documentation.
- Evaluations
Node - Memo
Node - Metric
Node - OpNode
- OpPoll
Node - Optimize
Node - Phase
Node - Poll
Node - Relevancy
Node - Scenario
Node - Stop
When Node - Throttle
Node - Tries
Node - Violation
- One validation finding, with the AST path it anchors to.
- Workload
Node
Enums§
- Form
- A valid value form for one element. Nested node kinds are direct references — the grammar graph carries itself.
- Mode
- Validation strictness: a PARTIAL model skips required-element checks (it is still being authored); a COMPLETE model does not.
Statics§
- ABSTRACT
- ABSTRACT_
ELEMENTS - ALL_
NODES - Every registered node kind — an enumeration surface for
tooling (
describe, docs). Resolution never goes through this list: forms hold their child nodes directly. - BACKOFF
- BACKOFF_
ELEMENTS - BINDING_
CLASSES - BINDING_
CLASS_ ELEMENTS - GK binding declaration classes usable from workload
bindings:blocks (the grammar itself is polydat’s; the barename := exprderived form has no keyword). - CHECKPOINT
- CHECKPOINT_
ELEMENTS - CONTINUE_
IF - CONTINUE_
IF_ ELEMENTS - DELAY
- DELAY_
ELEMENTS - EVALUATIONS
- EVALUATIONS_
ELEMENTS - MEMO
- MEMO_
ELEMENTS - METRIC
- METRIC_
ELEMENTS - OP
- OPTIMIZE
- OPTIMIZE_
ELEMENTS - OP_
ACTIVITY_ ELEMENTS - Activity-level op keys excised from adapter fields by the model layer (the parser’s excision list is this table’s name projection — single source).
- OP_
MODEL_ ELEMENTS - OP_POLL
- OP_
POLL_ ELEMENTS - OP_
STMT_ ELEMENTS - PHASE
- PHASE_
ELEMENTS - POLL
- POLL_
ELEMENTS - RELEVANCY
- RELEVANCY_
ELEMENTS - SCENARIO
- SCENARIO_
NODE_ ELEMENTS - STOP_
WHEN - STOP_
WHEN_ ELEMENTS - THROTTLE
- THROTTLE_
ELEMENTS - TRIES
- TRIES_
ELEMENTS - WORKLOAD
- WORKLOAD_
ELEMENTS
Traits§
- Enumerable
Node - An enumerable node kind of the workload construction grammar.
Functions§
- discover_
at - Resolve the node kind at
pathinsidepartial(a possibly incomplete workload AST) and enumerate its valid sub-elements there. Path segments are the YAML keys / author-chosen names from the root; list indices are decimal. ReturnsNonewhen the path leaves the modeled grammar (e.g. descends into a declared-open surface). - node_
by_ kind - Kind lookup over
ALL_NODES— a convenience for external tooling only. - root
- The workload root node.
- validate_
workload - Validate an entire (possibly partial) workload AST against the construction grammar.