Align the teaching source and language contract with compact defaults
This commit is contained in:
+107
-16
@@ -2,7 +2,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="Docutils 0.22.2: https://docutils.sourceforge.io/" />
|
||||
<meta name="generator" content="Docutils 0.23: https://docutils.sourceforge.io/" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Arcadia Studio OA / SA Language and Editing Contract</title>
|
||||
<style type="text/css">
|
||||
@@ -806,11 +806,11 @@ references may be omitted and then mean <span class="docutils literal">none</spa
|
||||
These omissions are accepted in newly authored source 7, not only in schema-2
|
||||
compatibility input. Earlier schema admission of constructors and fields is
|
||||
still governed by its version rules.</p>
|
||||
<p>Canonical formatting writes the hydrated occurrence references and default
|
||||
<span class="docutils literal">message_kind</span>, <span class="docutils literal">reply_to</span> and <span class="docutils literal">values</span> explicitly. An absent
|
||||
<span class="docutils literal">operation</span> remains omitted in canonical output. Lossless no-op updates and
|
||||
unrelated name edits retain authored omissions; canonical formatting is a
|
||||
different operation. An admitted incomplete occurrence can still produce model
|
||||
<p>Canonical formatting omits optional occurrence references equal to <span class="docutils literal">none</span>,
|
||||
the default Asynchronous <span class="docutils literal">message_kind</span>, empty <span class="docutils literal">values</span>, and absent
|
||||
<span class="docutils literal">operation</span>. Required fields of a selected constructor remain present.
|
||||
Lossless updates retain unchanged explicit defaults and authored omissions;
|
||||
canonical formatting is a different operation. An admitted incomplete occurrence can still produce model
|
||||
checks requesting its missing work, exchange, lifeline or referenced scenario.</p>
|
||||
<table>
|
||||
<caption>Occurrence body constructors</caption>
|
||||
@@ -1569,29 +1569,40 @@ has no explicit default, and does not convey ownership or deletion of the type.<
|
||||
<thead>
|
||||
<tr><th class="head"><p>Constructor</p></th>
|
||||
<th class="head"><p>Required fields</p></th>
|
||||
<th class="head"><p>Optional fields (omission value)</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td><p>Boolean</p></td>
|
||||
<td><p>None</p></td>
|
||||
<td><p>None</p></td>
|
||||
</tr>
|
||||
<tr><td><p>Integer</p></td>
|
||||
<td><p><span class="docutils literal">minimum</span>, <span class="docutils literal">maximum</span>: optional signed 64-bit integers</p></td>
|
||||
<td><p>None</p></td>
|
||||
<td><p><span class="docutils literal">minimum</span>, <span class="docutils literal">maximum</span>: signed 64-bit integers? (none)</p></td>
|
||||
</tr>
|
||||
<tr><td><p>Real</p></td>
|
||||
<td><p><span class="docutils literal">minimum</span>, <span class="docutils literal">maximum</span>: optional finite IEEE-754 binary64 values</p></td>
|
||||
<td><p>None</p></td>
|
||||
<td><p><span class="docutils literal">minimum</span>, <span class="docutils literal">maximum</span>: finite IEEE-754 binary64 values? (none)</p></td>
|
||||
</tr>
|
||||
<tr><td><p>String</p></td>
|
||||
<td><p><span class="docutils literal">minimum_length</span>: u32; <span class="docutils literal">maximum_length</span>: optional u32</p></td>
|
||||
<td><p><span class="docutils literal">minimum_length</span>: u32</p></td>
|
||||
<td><p><span class="docutils literal">maximum_length</span>: u32? (none)</p></td>
|
||||
</tr>
|
||||
<tr><td><p>Enumeration</p></td>
|
||||
<td><p><span class="docutils literal">literals</span>: unique nonempty, case-sensitive strings</p></td>
|
||||
<td><p>None</p></td>
|
||||
</tr>
|
||||
<tr><td><p>Record</p></td>
|
||||
<td><p><span class="docutils literal">supertype</span>: same-layer Record ref?</p></td>
|
||||
<td><p>None</p></td>
|
||||
<td><p><span class="docutils literal">supertype</span>: same-layer Record ref? (none)</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Optional fields may be absent or explicitly <span class="docutils literal">none</span>. Selected String and
|
||||
Enumeration constructors still require <span class="docutils literal">minimum_length</span> and <span class="docutils literal">literals</span>,
|
||||
respectively, including zero and an empty list. Selecting a constructor does
|
||||
not merge fields from the default String definition. Unknown fields reject.</p>
|
||||
<p>Bounds are inclusive and ordered; an absent bound means unbounded within the
|
||||
represented numeric domain. Integer comparisons MUST NOT convert to binary64.
|
||||
NaN, infinities, overflow and reversed bounds reject. String length counts Unicode
|
||||
@@ -2439,10 +2450,27 @@ references, placements, artifacts, trace baselines, and ordered occurrences.
|
||||
Map order is irrelevant. The writer preserves signed coordinate zero and
|
||||
emits decimals that recover the original binary32 value.</p>
|
||||
<p>Canonical output uses LF, four-space indentation, explicit identities,
|
||||
defaults, and JSON-escaped strings. Elements are emitted in UUID order, then
|
||||
and JSON-escaped strings. It omits fields equal to the omission defaults of
|
||||
their actual declaration or selected constructor, as specified in the field
|
||||
tables. This includes an empty project description. It MUST NOT omit a required
|
||||
field merely because its value is zero, false, empty, or <span class="docutils literal">none</span>. Elements are emitted in UUID order, then
|
||||
relations; diagrams and their nodes follow, then artifacts, then traces.
|
||||
Fields use deterministic name order. Output ends with LF. Alias values come
|
||||
from the model, never from regenerating display names.</p>
|
||||
<p>Omission is context-sensitive: Scenario uses the source default MixedLegacy;
|
||||
BoundaryExchange and CommunicationMean have different orientation defaults;
|
||||
state declarations determine their state-kind discriminator. A nonempty or
|
||||
whitespace-only description remains exact. Present-empty optional strings or
|
||||
collections, unbounded multiplicity versus a finite default, selected operation
|
||||
intent, and negative coordinate zero remain distinct values. A nondefault
|
||||
geometry record retains all required coordinates or dimensions.</p>
|
||||
<p>Only specified optional fields inside selected constructors may be omitted.
|
||||
For example, Integer bounds and LegacyPortContract.interface may be absent;
|
||||
String.minimum_length, Signal.items, port-contract payload lists, and historical
|
||||
snapshot name/description fields remain required. A LegacyPortContract record
|
||||
still requires direction. Historical semantic baseline payloads are retained
|
||||
without generic empty/default pruning. Compact output MUST preserve every
|
||||
persistent model field after parsing, including these distinctions.</p>
|
||||
<p>Comments and input whitespace are lexical trivia to the canonical writer.
|
||||
Canonical export does not preserve them. The source-project editor and compiler
|
||||
preserve authored comments and whitespace on Apply while inserting missing
|
||||
@@ -2484,11 +2512,19 @@ independent parent and child moves are resolved together. Leading whitespace
|
||||
adjusts to the destination scope; other token spelling remains authored.</p>
|
||||
<p>Updates MUST NOT canonicalize surviving declarations in full. Header, field and
|
||||
nested value positions are derived from the existing syntax parser. Unchanged
|
||||
fields retain their exact bytes, including field order, omitted defaults, number
|
||||
fields retain their exact bytes, including field order, explicit and omitted defaults, number
|
||||
and string spelling, comments, indentation and line endings. Changed literals and
|
||||
references replace only the required tokens; a reference with comments between
|
||||
<span class="docutils literal">@</span> and its alias retains those comments. A previously omitted default is
|
||||
inserted only if its semantic value changes. New fields use the existing record's
|
||||
<span class="docutils literal">@</span> and its alias retains those comments. A previously omitted field is
|
||||
inserted only when needed to express the requested value in its new declaration
|
||||
context. This includes an unchanged value whose omission default changes with
|
||||
the declaration kind. For example, changing BoundaryExchange to CommunicationMean
|
||||
while retaining orientation true requires <span class="docutils literal">oriented true;</span> if previously
|
||||
implicit. Unchanged explicit defaults MUST survive unrelated sibling edits,
|
||||
including persistence-serializer omissions such as <span class="docutils literal">operation none</span>,
|
||||
<span class="docutils literal">port_anchors []</span> and <span class="docutils literal">baseline.semantic none</span>. New fields and value fragments
|
||||
use compact generation while retaining required selected-constructor payloads.
|
||||
New fields use the existing record's
|
||||
indentation and line-ending style without reformatting its other fields.</p>
|
||||
<p>A constructor tag change retains shared nested fields in place. Removed fields,
|
||||
constructors and declarations remove syntax tokens, retaining their comments
|
||||
@@ -2618,6 +2654,26 @@ placement move are different transactions. The UI MUST identify which operation
|
||||
will occur. Reparenting work must not silently change its performer. A computed
|
||||
parent summary must remain distinguishable from direct allocation. A collapse
|
||||
operation hides presentation detail without deleting the children.</p>
|
||||
<p>In an Allocation view, dragging an Activity or Function body MAY combine a
|
||||
performer change with diagram placement. The preview MUST identify the
|
||||
destination and preserve readable work and destination identity. Destination
|
||||
identity is shown outside the canvas, independently of explanatory or refusal
|
||||
text. The outlined target's hit region remains fixed throughout the gesture;
|
||||
feedback MUST NOT obscure the work or change its pointer-relative placement.
|
||||
A clean click selects without applying unrelated drafts. A refused work press
|
||||
with an unapplied property draft MUST preserve its text, caret and focused
|
||||
editor. An accepted drag is one atomic model/source/history transaction:
|
||||
semantic ownership and work identities are
|
||||
preserved; only leaf direct Allocation relations, their own retired routes and
|
||||
the affected view geometry change. Existing Allocation identities are retained
|
||||
on reassignment. Role realizations and assignments MUST NOT be silently changed. Uniform work groups
|
||||
may move their leaf responsibilities together; ambiguous or distributed groups
|
||||
and changes requiring collateral record edits MUST be refused with an explanation.
|
||||
Moving outside performer regions removes direct assignment only when the
|
||||
effective role responsibility is also absent. Releasing outside the viewport
|
||||
cancels the gesture. Explicit Arrange next drag applies geometry alone for one
|
||||
gesture. Refused and snapped no-op drops MUST NOT create history entries or
|
||||
discard Redo. Undo restores the exact source bundle and identities together.</p>
|
||||
<p>Applying a reachable source bundle is one model transaction. Graphical edits
|
||||
update its owning declarations through the source-preserving updater. Both
|
||||
paths validate their candidate and model/source equality before
|
||||
@@ -2719,6 +2775,40 @@ leaving dangling references. Deleting a sequence does not delete the semantic
|
||||
exchanges it references. Cross-layer counterparts are not owned descendants.
|
||||
Text edits describe a complete candidate and must remove or repair dependencies
|
||||
explicitly before Apply succeeds.</p>
|
||||
<section id="focused-diagram-removal">
|
||||
<h3>8.1. Focused diagram removal</h3>
|
||||
<p>Delete is scoped to the focused diagram and the exact visible selection.
|
||||
Text fields retain their own Delete behavior; diagram shortcuts MUST NOT apply
|
||||
pending property, source or behavior drafts. Keyboard traversal retires diagram
|
||||
input admission before subsequent keys in the same event batch are processed.
|
||||
Active placement, creation, connection, reorder and pan gestures do not authorize
|
||||
removal. A stale document, revision, owner or selection MUST NOT redirect removal.</p>
|
||||
<p>For an explicit architecture or state placement, Delete removes that placement
|
||||
only. The semantic element and its placements in other views remain. Shift+Delete
|
||||
requests confirmed deletion of the semantic element, including when selection
|
||||
originated from Placement properties. A selected architecture route bend takes
|
||||
priority: plain Delete removes the bend without removing its edge.</p>
|
||||
<p>A visible relation with no placement, including a state action or internal
|
||||
transition row, uses confirmed relation deletion for either key. States and
|
||||
referenced Activity/Function definitions remain. Hidden or collapsed rows are
|
||||
not keyboard deletion targets.</p>
|
||||
<p>Process and scenario projections have no independent occurrence placements.
|
||||
Delete and Shift+Delete request confirmed removal of the selected occurrence,
|
||||
participant or maintained link. A link's endpoints and outbound reusable
|
||||
definitions are preserved. Removing a fragment or branch removes its owned
|
||||
subtree. Removing a scenario participant preserves its represented element and
|
||||
retains occurrences with affected participant references cleared; resulting
|
||||
incomplete references remain visible for repair. The modeled scenario Delete
|
||||
message is a separate domain event and is not this editing shortcut.</p>
|
||||
<p>A qualified selection inside an expanded reusable process MUST NOT silently
|
||||
delete the outer reference or shared definition item. The editor directs the
|
||||
user to open the definition or explicitly select the outer reference.</p>
|
||||
<p>Confirmation identifies the captured object and removal effect. Cancel and
|
||||
Escape preserve model, source and history. A confirmation token belongs to one
|
||||
dialog; changes to its document, revision, owner or selected identity invalidate
|
||||
it. Accepted deletion uses one ordinary model/source transaction, and Undo
|
||||
restores the exact complete accepted source bundle and model.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="persistence-and-explicit-migration">
|
||||
<h2>9. Persistence and explicit migration</h2>
|
||||
@@ -2793,8 +2883,9 @@ This compatibility applies equally to source and JSON. It adds explicit
|
||||
defaults without changing any prior identity, name, reference, order, geometry,
|
||||
artifact or trace field. The original V2 golden source/JSON in
|
||||
<span class="docutils literal"><span class="pre">crates/oa-core/tests/fixtures</span></span> MUST NOT be regenerated from the newer demo;
|
||||
they verify that every old persistent field survives. Canonical output writes
|
||||
the added defaults through explicit migration to the current schema 7.</p>
|
||||
they verify that every old persistent field survives. Canonical output uses
|
||||
the current schema 7 and omits values equal to its specified source defaults;
|
||||
parsing recovers the complete migrated model.</p>
|
||||
<p>The V2 adapter preserves every original identity, alias, prose, parent,
|
||||
placement, trace and artifact. Generic ports become Legacy with their original
|
||||
direction/interface record. Existing FE endpoint IDs remain unchanged. For
|
||||
|
||||
Reference in New Issue
Block a user