Network2Go's diagnostics: a single defense-in-depth catch-all, plus one constructor per real
user-facing failure. Every case the catch-all reports is one an earlier pass rules out —
Guarded2Network establishes the network form's own invariants (every channel reference resolved,
every process's threads well-formed) and type checking the TLA⁺-side ones — but this pass has no
proof of either to appeal to, so the checks are real ones.
Network2Go's errors.
- internalInvariantViolated
(pos : SourceSpan)
(description : String)
: N2GError
Defense-in-depth: an input shape this pass's own invariants (or those of an earlier pass) guarantee can't occur still turned up. No proof of unreachability exists yet, just facts established by earlier passes, so this stays a runtime check, not
absurd/nomatch.posisSourceSpan.placeholderat callers past the point a real position is still available (NetworkPlusCal.Statementcarries none), matchingGuarded2Network's precedent. - unsupported
(pos : SourceSpan)
(construct reason : String)
: N2GError
A construct the Go backend cannot compile. Unlike
internalInvariantViolatedthis is a real user-facing failure on well-formed, well-typed input:Nat/Intdenote infinite sets no finite representation captures, theBagsmodule has no runtime counterpart, and function equality would have to compare two lazy maps entry by entry.constructnames what was written,reasonsays why it cannot be compiled.
Instances For
Equations
- instReprN2GError = { reprPrec := instReprN2GError.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- instInhabitedN2GError = { default := instInhabitedN2GError.default }
Equations
- instBEqN2GError.beq (N2GError.internalInvariantViolated a a_1) (N2GError.internalInvariantViolated b b_1) = (a == b && a_1 == b_1)
- instBEqN2GError.beq (N2GError.unsupported a a_1 a_2) (N2GError.unsupported b b_1 b_2) = (a == b && (a_1 == b_1 && a_2 == b_2))
- instBEqN2GError.beq x✝¹ x✝ = false
Instances For
Equations
- instBEqN2GError = { beq := instBEqN2GError.beq }
Equations
- One or more equations did not get rendered due to their size.