Add state diagram form and representation contract parity
This commit is contained in:
+36
-6
@@ -1285,17 +1285,47 @@ Studio profile; no running history state is persisted or synthesized.</p>
|
||||
<h2>5. Diagrams, artifacts, and cross-layer traceability</h2>
|
||||
<p><span class="docutils literal">diagram</span> has name, identity, alias, description, <span class="docutils literal">layer</span> (Oa by default),
|
||||
<span class="docutils literal">projection</span> (Overview by default), and <span class="docutils literal">routes</span> (empty list by default).
|
||||
Other projections are Decomposition,
|
||||
Allocation, FunctionalDataflow, Capabilities, and Traceability. Traceability diagrams can show both layers;
|
||||
other diagrams show their chosen layer.</p>
|
||||
The string projections are Overview, Decomposition, Allocation,
|
||||
FunctionalDataflow, Capabilities, and Traceability. StateMachine is a payload
|
||||
constructor with one required <span class="docutils literal">machine</span> reference. Traceability diagrams
|
||||
can show both layers; other diagrams show their chosen layer.</p>
|
||||
<p>Allocation is an architecture view: it shows participants and work, nests
|
||||
allocated work under its performer, and displays interactions, functional
|
||||
exchanges and boundary exchanges. FunctionalDataflow shows the work hierarchy
|
||||
and its exchanges. Capabilities shows participants, roles, missions and
|
||||
capabilities with their involvement, exploitation, include, extend and
|
||||
generalization links. Decomposition and Overview retain general containment;
|
||||
Overview also exposes all relationships. Changing the projection hides
|
||||
Overview also exposes all relationships. These string projections hide
|
||||
inapplicable placements without deleting them or changing semantic records.</p>
|
||||
<p>A StateMachine projection MUST reference an existing StateMachine in the
|
||||
diagram's layer. Its placements MUST refer to that machine, its Regions, or
|
||||
its state vertices, including nested Regions and vertices. Events, other
|
||||
machines and their members, and unrelated semantic elements are not valid
|
||||
placements in this view. Empty and partial state views are valid; neither
|
||||
creating nor reading a view synthesizes semantic elements or placements.
|
||||
Changing an existing diagram to StateMachine, or changing its machine, MUST
|
||||
remove or relocate incompatible placements in the same transaction. Context
|
||||
errors use <span class="docutils literal">state_diagram_context</span>; incompatible placements use
|
||||
<span class="docutils literal">state_diagram_member</span>. Neither case silently hides invalid members.</p>
|
||||
<p>This complete source example places one state from an existing machine:</p>
|
||||
<pre class="code text literal-block"><code>arcadia 3;
|
||||
project operating "Operating modes" {
|
||||
oa_entity crew "Crew" {}
|
||||
oa_state_machine modes "Modes" { parent @crew; }
|
||||
oa_region main "Main region" { parent @modes; }
|
||||
oa_state ready "Ready" { parent @main; }
|
||||
diagram mode_view "Operating modes" {
|
||||
layer Oa;
|
||||
projection { StateMachine { machine @modes; }; };
|
||||
}
|
||||
node ready_view { diagram @mode_view; element @ready; }
|
||||
}</code></pre>
|
||||
<p>The JSON projection is
|
||||
<span class="docutils literal"><span class="pre">{"StateMachine":{"machine":"11111111-1111-4111-8111-111111111111"}}</span></span>,
|
||||
where the UUID is the referenced machine's identity. A bare <span class="docutils literal">"StateMachine"</span>,
|
||||
a missing or null <span class="docutils literal">machine</span>, an invalid UUID, or additional payload fields
|
||||
is malformed. Existing projections retain their string representation, for
|
||||
example <span class="docutils literal">"Overview"</span> in JSON and <span class="docutils literal">projection Overview;</span> in source.</p>
|
||||
<p>Ports are boundary anchors of visible owners, with their existing
|
||||
semantic identity. An explicitly placed port is not rendered as a separate
|
||||
large node. Functional exchanges use their declared source/target ports;
|
||||
@@ -1312,8 +1342,8 @@ allocation, or realization. Hiding an element from a diagram must remain
|
||||
distinguishable from deleting it from the model.
|
||||
Changing a node's diagram preserves the placement identity, alias, coordinates,
|
||||
size, collapse state, manual port anchors, and attached artifacts. The destination
|
||||
must accept the element's layer and must not already contain another placement
|
||||
of that element.</p>
|
||||
must accept the element's layer, satisfy StateMachine membership when applicable,
|
||||
and must not already contain another placement of that element.</p>
|
||||
<p>Each <span class="docutils literal">port_anchors</span> entry is a PortAnchor record with required <span class="docutils literal">port</span>
|
||||
reference, <span class="docutils literal">side</span> (Left, Right, Top, or Bottom), and <span class="docutils literal">offset</span> (finite
|
||||
binary32 from 0 through 1). It has no separate identity or alias. The port MUST
|
||||
|
||||
Reference in New Issue
Block a user