Expand description
#3583: the project-wide facts behind bynk/architectureModel’s events
and uses sections — who emits and who subscribes to each event, which
capabilities each handler requires through given, and which suites
stub a capability.
Until this module, event subscriptions were computed only to be validated
(crate::project_model::phase_event_subscriptions) and a handler’s
resolved given was read only for the sequence diagram. A client could
approximate either by text search, which breaks on aliases and consumes
qualification. These facts are resolved the way the checker resolves them:
- an event’s owner is the context whose
eventtable declares it, found locally first and then through the consuming context’sconsumes, ascrate::symbols::discover_event_subscribersdoes; - an emitter is a call the checker resolved to
Events.emit(its owncrate::checker::Callee, not the receiver’s spelling), with the event type the checker recorded on the call’sCallee(its type argument, written or inferred); - a handler’s
givenset is read aftercrate::project_model::normalize_service_defaults, so a service’sdefault_givenis already part of each handler that declares none of its own; a use is markedinheritedwhen its span lies outside the handler (it is written on the service header); - a capability reference resolves to its providing unit through the unit’s
consumesaliases and flattened selections, ascrate::project_model::handler_cross_capsdoes.
Spans are bare byte offsets against the project-relative file they are
paired with. Nothing here carries source text.
Structs§
- Architecture
Facts - Everything
bynk/architectureModelneeds beyond a unit’s own declarations. - Call
Fact - Emitter
Fact - Event
Fact - Fact
Inputs - The per-unit resolution tables the facts read.
- Fact
Site - A project-relative file and a span within it.
- Handler
Uses Fact - Member
Fact - One handler (or provider operation) of one unit.
- Stub
Fact - A
stubof one capability in one suite (suite-level or in a case). - Subscriber
Fact - UseFact
- One capability a handler requires through
given.
Enums§
- Call
Target - What a handler calls (model-diagrams slice 5).
- Delivery
Kind - How a subscription selects what it is delivered.
- Member
Kind - What declares the member that emits, subscribes or uses.
Functions§
- architecture_
facts - Compute the facts. Deterministic: units, events, members and uses are sorted, so the wire form does not churn between rounds.