Language Reference
Execution DAG & Verification
Nodes, Scenarios & Native Graph Testing
Myceta separates pure helper logic (fn) from named, observable graph computations (node),
making dependency structure, external capability permissions, and test expectations first-class language constructs.
1. node vs. fn
| Property | node | fn |
|---|---|---|
| Visible in dependency DAG | Yes | No |
| Incrementally recomputed | Yes | No (pure callable) |
| Outcome & provenance tracked | Yes | Via enclosing node |
Capability & dialect blocks (using, query, validate) | Yes | No |
2. Capability-Scoped Policies
Ambient host I/O is absent by default. Nodes that read or write external datasets declare required capabilities
(using read, write), which are checked against module policy rules:
policy AuditLedgerPolicy {
default deny read, write;
allow read in nodes [VerifiedInvoices]
}
3. Explicit Outcomes & The expect Test Grammar
Every evaluated node produces one of five explicit outcomes rather than silent NaNs or untyped exceptions.
Native test blocks pin both positive value tolerances and exact negative diagnostic codes:
| Outcome | Grammar | Meaning |
|---|---|---|
OK | expect N : OK [with value <cmp> <expr> [within <tol>]] | Node succeeded and satisfied optional value predicate. |
WARN | expect N : WARN [with diagnostic MYC####] | Node completed with an advisory diagnostic. |
FAIL | expect N : FAIL with diagnostic MYC#### | Fail-closed refusal; diagnostic code is mandatory by grammar. |
BLOCKED | expect N : BLOCKED [because UpstreamNode] | Skipped cleanly because an upstream dependency did not succeed. |
CANCELLED | expect N : CANCELLED | Execution was cancelled prior to completion. |
node StiffnessCheck = {
validate {
rule PositiveModulus: modulus > 0.0<Pa>
severity error
message "Elastic modulus must be strictly positive"
}
}
test QuadratureWeightsSumToOne {
expect WeightSum : OK with value = 1.0 within 1e-12
}