Complete source 6 engineering workflows and preserve release validation evidence
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# Existing-core interface-operation expressivity probe
|
||||
|
||||
`probe.rs` is a standalone executable using the unchanged shared core. It writes
|
||||
three deterministic complete model/source snapshots under a supplied directory.
|
||||
There is no proposed DTO implemented in this helper and no native input.
|
||||
|
||||
Observed result, 2026-09-06:
|
||||
|
||||
- Valid baseline:12 elements/5 relations, one System/Actor pair, two Standard
|
||||
ports, one boundary/interface, two Synchronous parameterless Operation items,
|
||||
two participant lifelines and two Calls.
|
||||
- Both Calls' typed bodies are identical. Their names express different intent;
|
||||
neither Call references its intended item/allocation identity.
|
||||
- Using item or allocation as the existing exchange reference rejects with
|
||||
`occurrence_exchange`; adding an `operation` field to the typed JSON rejects as
|
||||
unknown. No undiscovered existing selector is being relabeled missing.
|
||||
- Renaming then deleting Reset preserves the Call body and leaves the Call
|
||||
structurally valid, because there is no maintained operation-use reference.
|
||||
- Explicit functional refinement distinguishes the two messages and preserves the
|
||||
same boundary, but adds6 elements (two Functions/four ports) and10 relationships.
|
||||
It is a real alternative when that refinement is intended, not a zero-cost
|
||||
encoding of the unrefined interface-only model.
|
||||
- All three output models pass complete source and JSON round trips. No core or
|
||||
desktop production file was changed.
|
||||
|
||||
The first helper compile lacked explicit validation imports; initial construction
|
||||
also used the disabled generic Port factory and reversed Allocation/PortAllocation
|
||||
directions. Those helper errors were corrected before the successful full run.
|
||||
They are not product defects. Final compilation used `-D warnings` and succeeded.
|
||||
|
||||
Reproduce only after coordinating stable rlibs/shared resources:
|
||||
|
||||
```powershell
|
||||
. .local/toolchain/env.ps1
|
||||
rustc --edition 2024 -D warnings -C linker=clang.exe --extern oa_core=.local/target-gnullvm/debug/deps/liboa_core-6c8da57367eec642.rlib --extern serde_json=.local/target-gnullvm/debug/deps/libserde_json-da2c4f333fc47818.rlib -L dependency=.local/target-gnullvm/debug/deps harness/fixtures/interface-operation-probe/probe.rs -o .local/native-fixtures/interface-operation-probe.exe
|
||||
.local/native-fixtures/interface-operation-probe.exe NEW_OUTPUT_DIRECTORY
|
||||
```
|
||||
|
||||
Final output is retained in `.local/native-fixtures/interface-operation-probe.log`.
|
||||
The tracked `output/` files are probe oracles, not native acceptance fixtures.
|
||||
See [the proposed contract](../../release-interface-operation-contract-20260906.md).
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"algorithm": "SHA256",
|
||||
"core_rlib": "e53a68018ab470f3d1e3c024a06fc0b5f1618d1495e6095716e9c4d9105680e0",
|
||||
"serde_json_rlib": "6fd0f5ebc7956d12d0828f218368abdb366f73e075fbe745259ba7f736be1f3f",
|
||||
"files": {
|
||||
"output/after-reset-deletion.arcadia": "c0fe9570684c0061efc4cad65e339fede6961b04ca90c6f324c787bd65e61226",
|
||||
"output/after-reset-deletion.json": "93187f7a1b476a44185725c6b15f2e1767482b6911ab1280144348d033eb51f0",
|
||||
"output/boundary-only.arcadia": "02f85e39957ebe6d56336fa729a5c8b10f51865face9d3b2c9679200571fcfc7",
|
||||
"output/boundary-only.json": "756f9710336e6734ce3592ca774c6f104bba5a37c9e165540eb39326682393d1",
|
||||
"output/explicit-functional-refinement.arcadia": "ac5b629ba5596464f9f8a975b8bc2764e3007ceb7342de3f828d4b18e4f069b7",
|
||||
"output/explicit-functional-refinement.json": "78a47c978dc667aa1c45af711f06aa2a0d3c581003013e30c3e02fb0faae2e64",
|
||||
"probe.rs": "72b1b443e25eb20420dec4477b0fb5ef5d1c705e3882c81df88dd578ab96a426"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
arcadia 6;
|
||||
project mission "Two operations, one interface" id "52060906-0000-4000-8000-000000000001" {
|
||||
description "";
|
||||
|
||||
sa_actor operation_probe_10 "Operator console" id "52060906-0000-4000-8000-00000000000a" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_system operation_probe_11 "Valve service" id "52060906-0000-4000-8000-00000000000b" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_port operation_probe_12 "Service socket" id "52060906-0000-4000-8000-00000000000c" {
|
||||
contract {
|
||||
Component {
|
||||
kind Standard;
|
||||
orientation Unset;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
legacy none;
|
||||
parent @operation_probe_10;
|
||||
}
|
||||
|
||||
sa_port operation_probe_13 "Service socket" id "52060906-0000-4000-8000-00000000000d" {
|
||||
contract {
|
||||
Component {
|
||||
kind Standard;
|
||||
orientation Unset;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
legacy none;
|
||||
parent @operation_probe_11;
|
||||
}
|
||||
|
||||
sa_exchange_item operation_probe_21 "ReadStatus" id "52060906-0000-4000-8000-000000000015" {
|
||||
description "";
|
||||
kind Information;
|
||||
mechanism Operation;
|
||||
parent none;
|
||||
supertype none;
|
||||
}
|
||||
|
||||
sa_interface operation_probe_22 "Valve commands" id "52060906-0000-4000-8000-000000000016" {
|
||||
description "";
|
||||
parent none;
|
||||
supertype none;
|
||||
}
|
||||
|
||||
sa_scenario operation_probe_40 "Reset then read status" id "52060906-0000-4000-8000-000000000028" {
|
||||
context none;
|
||||
description "";
|
||||
parent none;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
steps [@operation_probe_43, @operation_probe_44];
|
||||
viewpoint BoundaryInterface;
|
||||
}
|
||||
|
||||
sa_lifeline operation_probe_41 "Service participant" id "52060906-0000-4000-8000-000000000029" {
|
||||
description "";
|
||||
parent @operation_probe_40;
|
||||
represented @operation_probe_10;
|
||||
}
|
||||
|
||||
sa_lifeline operation_probe_42 "Service participant" id "52060906-0000-4000-8000-00000000002a" {
|
||||
description "";
|
||||
parent @operation_probe_40;
|
||||
represented @operation_probe_11;
|
||||
}
|
||||
|
||||
sa_occurrence operation_probe_43 "Call Reset" id "52060906-0000-4000-8000-00000000002b" {
|
||||
body {
|
||||
Exchange {
|
||||
exchange @operation_probe_34;
|
||||
message_kind Call;
|
||||
receiver @operation_probe_42;
|
||||
reply_to none;
|
||||
sender @operation_probe_41;
|
||||
values [];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @operation_probe_40;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_occurrence operation_probe_44 "Call ReadStatus" id "52060906-0000-4000-8000-00000000002c" {
|
||||
body {
|
||||
Exchange {
|
||||
exchange @operation_probe_34;
|
||||
message_kind Call;
|
||||
receiver @operation_probe_42;
|
||||
reply_to none;
|
||||
sender @operation_probe_41;
|
||||
values [];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @operation_probe_40;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
interface_item_allocation operation_probe_31 "InterfaceItemAllocation 31" id "52060906-0000-4000-8000-00000000001f" {
|
||||
acquisition Unspecified;
|
||||
description "";
|
||||
order 0;
|
||||
source @operation_probe_22;
|
||||
target @operation_probe_21;
|
||||
transmission Synchronous;
|
||||
}
|
||||
|
||||
interface_requirement operation_probe_32 "InterfaceRequirement 32" id "52060906-0000-4000-8000-000000000020" {
|
||||
description "";
|
||||
source @operation_probe_12;
|
||||
target @operation_probe_22;
|
||||
}
|
||||
|
||||
interface_provision operation_probe_33 "InterfaceProvision 33" id "52060906-0000-4000-8000-000000000021" {
|
||||
description "";
|
||||
source @operation_probe_13;
|
||||
target @operation_probe_22;
|
||||
}
|
||||
|
||||
boundary_exchange operation_probe_34 "BoundaryExchange 34" id "52060906-0000-4000-8000-000000000022" {
|
||||
description "";
|
||||
items [@operation_probe_21];
|
||||
oriented false;
|
||||
source @operation_probe_12;
|
||||
target @operation_probe_13;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,276 @@
|
||||
{
|
||||
"schema_version": 6,
|
||||
"id": "52060906-0000-4000-8000-000000000001",
|
||||
"alias": "mission",
|
||||
"name": "Two operations, one interface",
|
||||
"description": "",
|
||||
"elements": {
|
||||
"52060906-0000-4000-8000-00000000000a": {
|
||||
"id": "52060906-0000-4000-8000-00000000000a",
|
||||
"alias": "operation_probe_10",
|
||||
"name": "Operator console",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": "Actor"
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000000b": {
|
||||
"id": "52060906-0000-4000-8000-00000000000b",
|
||||
"alias": "operation_probe_11",
|
||||
"name": "Valve service",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": "System"
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000000c": {
|
||||
"id": "52060906-0000-4000-8000-00000000000c",
|
||||
"alias": "operation_probe_12",
|
||||
"name": "Service socket",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-00000000000a",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Port": {
|
||||
"contract": {
|
||||
"Component": {
|
||||
"kind": "Standard",
|
||||
"orientation": "Unset"
|
||||
}
|
||||
},
|
||||
"legacy": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000000d": {
|
||||
"id": "52060906-0000-4000-8000-00000000000d",
|
||||
"alias": "operation_probe_13",
|
||||
"name": "Service socket",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-00000000000b",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Port": {
|
||||
"contract": {
|
||||
"Component": {
|
||||
"kind": "Standard",
|
||||
"orientation": "Unset"
|
||||
}
|
||||
},
|
||||
"legacy": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000015": {
|
||||
"id": "52060906-0000-4000-8000-000000000015",
|
||||
"alias": "operation_probe_21",
|
||||
"name": "ReadStatus",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"ExchangeItem": {
|
||||
"kind": "Information",
|
||||
"mechanism": "Operation",
|
||||
"supertype": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000016": {
|
||||
"id": "52060906-0000-4000-8000-000000000016",
|
||||
"alias": "operation_probe_22",
|
||||
"name": "Valve commands",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Interface": {
|
||||
"supertype": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000028": {
|
||||
"id": "52060906-0000-4000-8000-000000000028",
|
||||
"alias": "operation_probe_40",
|
||||
"name": "Reset then read status",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Scenario": {
|
||||
"viewpoint": "BoundaryInterface",
|
||||
"context": null,
|
||||
"precondition": "",
|
||||
"postcondition": "",
|
||||
"steps": [
|
||||
"52060906-0000-4000-8000-00000000002b",
|
||||
"52060906-0000-4000-8000-00000000002c"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000029": {
|
||||
"id": "52060906-0000-4000-8000-000000000029",
|
||||
"alias": "operation_probe_41",
|
||||
"name": "Service participant",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000028",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Lifeline": {
|
||||
"represented": "52060906-0000-4000-8000-00000000000a"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000002a": {
|
||||
"id": "52060906-0000-4000-8000-00000000002a",
|
||||
"alias": "operation_probe_42",
|
||||
"name": "Service participant",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000028",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Lifeline": {
|
||||
"represented": "52060906-0000-4000-8000-00000000000b"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000002b": {
|
||||
"id": "52060906-0000-4000-8000-00000000002b",
|
||||
"alias": "operation_probe_43",
|
||||
"name": "Call Reset",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000028",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Occurrence": {
|
||||
"body": {
|
||||
"Exchange": {
|
||||
"exchange": "52060906-0000-4000-8000-000000000022",
|
||||
"sender": "52060906-0000-4000-8000-000000000029",
|
||||
"receiver": "52060906-0000-4000-8000-00000000002a",
|
||||
"message_kind": "Call",
|
||||
"reply_to": null,
|
||||
"values": []
|
||||
}
|
||||
},
|
||||
"precondition": "",
|
||||
"postcondition": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000002c": {
|
||||
"id": "52060906-0000-4000-8000-00000000002c",
|
||||
"alias": "operation_probe_44",
|
||||
"name": "Call ReadStatus",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000028",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Occurrence": {
|
||||
"body": {
|
||||
"Exchange": {
|
||||
"exchange": "52060906-0000-4000-8000-000000000022",
|
||||
"sender": "52060906-0000-4000-8000-000000000029",
|
||||
"receiver": "52060906-0000-4000-8000-00000000002a",
|
||||
"message_kind": "Call",
|
||||
"reply_to": null,
|
||||
"values": []
|
||||
}
|
||||
},
|
||||
"precondition": "",
|
||||
"postcondition": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"52060906-0000-4000-8000-00000000001f": {
|
||||
"id": "52060906-0000-4000-8000-00000000001f",
|
||||
"alias": "operation_probe_31",
|
||||
"name": "InterfaceItemAllocation 31",
|
||||
"description": "",
|
||||
"body": {
|
||||
"InterfaceItemAllocation": {
|
||||
"source": "52060906-0000-4000-8000-000000000016",
|
||||
"target": "52060906-0000-4000-8000-000000000015",
|
||||
"order": 0,
|
||||
"transmission": "Synchronous",
|
||||
"acquisition": "Unspecified"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000020": {
|
||||
"id": "52060906-0000-4000-8000-000000000020",
|
||||
"alias": "operation_probe_32",
|
||||
"name": "InterfaceRequirement 32",
|
||||
"description": "",
|
||||
"body": {
|
||||
"InterfaceRequirement": {
|
||||
"source": "52060906-0000-4000-8000-00000000000c",
|
||||
"target": "52060906-0000-4000-8000-000000000016"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000021": {
|
||||
"id": "52060906-0000-4000-8000-000000000021",
|
||||
"alias": "operation_probe_33",
|
||||
"name": "InterfaceProvision 33",
|
||||
"description": "",
|
||||
"body": {
|
||||
"InterfaceProvision": {
|
||||
"source": "52060906-0000-4000-8000-00000000000d",
|
||||
"target": "52060906-0000-4000-8000-000000000016"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000022": {
|
||||
"id": "52060906-0000-4000-8000-000000000022",
|
||||
"alias": "operation_probe_34",
|
||||
"name": "BoundaryExchange 34",
|
||||
"description": "",
|
||||
"body": {
|
||||
"BoundaryExchange": {
|
||||
"source": "52060906-0000-4000-8000-00000000000c",
|
||||
"target": "52060906-0000-4000-8000-00000000000d",
|
||||
"oriented": false,
|
||||
"items": [
|
||||
"52060906-0000-4000-8000-000000000015"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"diagrams": {},
|
||||
"artifact_links": {},
|
||||
"traces": {}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
arcadia 6;
|
||||
project mission "Two operations, one interface" id "52060906-0000-4000-8000-000000000001" {
|
||||
description "";
|
||||
|
||||
sa_actor operation_probe_10 "Operator console" id "52060906-0000-4000-8000-00000000000a" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_system operation_probe_11 "Valve service" id "52060906-0000-4000-8000-00000000000b" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_port operation_probe_12 "Service socket" id "52060906-0000-4000-8000-00000000000c" {
|
||||
contract {
|
||||
Component {
|
||||
kind Standard;
|
||||
orientation Unset;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
legacy none;
|
||||
parent @operation_probe_10;
|
||||
}
|
||||
|
||||
sa_port operation_probe_13 "Service socket" id "52060906-0000-4000-8000-00000000000d" {
|
||||
contract {
|
||||
Component {
|
||||
kind Standard;
|
||||
orientation Unset;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
legacy none;
|
||||
parent @operation_probe_11;
|
||||
}
|
||||
|
||||
sa_exchange_item operation_probe_20 "Reset" id "52060906-0000-4000-8000-000000000014" {
|
||||
description "";
|
||||
kind Information;
|
||||
mechanism Operation;
|
||||
parent none;
|
||||
supertype none;
|
||||
}
|
||||
|
||||
sa_exchange_item operation_probe_21 "ReadStatus" id "52060906-0000-4000-8000-000000000015" {
|
||||
description "";
|
||||
kind Information;
|
||||
mechanism Operation;
|
||||
parent none;
|
||||
supertype none;
|
||||
}
|
||||
|
||||
sa_interface operation_probe_22 "Valve commands" id "52060906-0000-4000-8000-000000000016" {
|
||||
description "";
|
||||
parent none;
|
||||
supertype none;
|
||||
}
|
||||
|
||||
sa_scenario operation_probe_40 "Reset then read status" id "52060906-0000-4000-8000-000000000028" {
|
||||
context none;
|
||||
description "";
|
||||
parent none;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
steps [@operation_probe_43, @operation_probe_44];
|
||||
viewpoint BoundaryInterface;
|
||||
}
|
||||
|
||||
sa_lifeline operation_probe_41 "Service participant" id "52060906-0000-4000-8000-000000000029" {
|
||||
description "";
|
||||
parent @operation_probe_40;
|
||||
represented @operation_probe_10;
|
||||
}
|
||||
|
||||
sa_lifeline operation_probe_42 "Service participant" id "52060906-0000-4000-8000-00000000002a" {
|
||||
description "";
|
||||
parent @operation_probe_40;
|
||||
represented @operation_probe_11;
|
||||
}
|
||||
|
||||
sa_occurrence operation_probe_43 "Call Reset" id "52060906-0000-4000-8000-00000000002b" {
|
||||
body {
|
||||
Exchange {
|
||||
exchange @operation_probe_34;
|
||||
message_kind Call;
|
||||
receiver @operation_probe_42;
|
||||
reply_to none;
|
||||
sender @operation_probe_41;
|
||||
values [];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @operation_probe_40;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_occurrence operation_probe_44 "Call ReadStatus" id "52060906-0000-4000-8000-00000000002c" {
|
||||
body {
|
||||
Exchange {
|
||||
exchange @operation_probe_34;
|
||||
message_kind Call;
|
||||
receiver @operation_probe_42;
|
||||
reply_to none;
|
||||
sender @operation_probe_41;
|
||||
values [];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @operation_probe_40;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
interface_item_allocation operation_probe_30 "InterfaceItemAllocation 30" id "52060906-0000-4000-8000-00000000001e" {
|
||||
acquisition Unspecified;
|
||||
description "";
|
||||
order 0;
|
||||
source @operation_probe_22;
|
||||
target @operation_probe_20;
|
||||
transmission Synchronous;
|
||||
}
|
||||
|
||||
interface_item_allocation operation_probe_31 "InterfaceItemAllocation 31" id "52060906-0000-4000-8000-00000000001f" {
|
||||
acquisition Unspecified;
|
||||
description "";
|
||||
order 0;
|
||||
source @operation_probe_22;
|
||||
target @operation_probe_21;
|
||||
transmission Synchronous;
|
||||
}
|
||||
|
||||
interface_requirement operation_probe_32 "InterfaceRequirement 32" id "52060906-0000-4000-8000-000000000020" {
|
||||
description "";
|
||||
source @operation_probe_12;
|
||||
target @operation_probe_22;
|
||||
}
|
||||
|
||||
interface_provision operation_probe_33 "InterfaceProvision 33" id "52060906-0000-4000-8000-000000000021" {
|
||||
description "";
|
||||
source @operation_probe_13;
|
||||
target @operation_probe_22;
|
||||
}
|
||||
|
||||
boundary_exchange operation_probe_34 "BoundaryExchange 34" id "52060906-0000-4000-8000-000000000022" {
|
||||
description "";
|
||||
items [@operation_probe_20, @operation_probe_21];
|
||||
oriented false;
|
||||
source @operation_probe_12;
|
||||
target @operation_probe_13;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,310 @@
|
||||
{
|
||||
"schema_version": 6,
|
||||
"id": "52060906-0000-4000-8000-000000000001",
|
||||
"alias": "mission",
|
||||
"name": "Two operations, one interface",
|
||||
"description": "",
|
||||
"elements": {
|
||||
"52060906-0000-4000-8000-00000000000a": {
|
||||
"id": "52060906-0000-4000-8000-00000000000a",
|
||||
"alias": "operation_probe_10",
|
||||
"name": "Operator console",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": "Actor"
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000000b": {
|
||||
"id": "52060906-0000-4000-8000-00000000000b",
|
||||
"alias": "operation_probe_11",
|
||||
"name": "Valve service",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": "System"
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000000c": {
|
||||
"id": "52060906-0000-4000-8000-00000000000c",
|
||||
"alias": "operation_probe_12",
|
||||
"name": "Service socket",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-00000000000a",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Port": {
|
||||
"contract": {
|
||||
"Component": {
|
||||
"kind": "Standard",
|
||||
"orientation": "Unset"
|
||||
}
|
||||
},
|
||||
"legacy": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000000d": {
|
||||
"id": "52060906-0000-4000-8000-00000000000d",
|
||||
"alias": "operation_probe_13",
|
||||
"name": "Service socket",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-00000000000b",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Port": {
|
||||
"contract": {
|
||||
"Component": {
|
||||
"kind": "Standard",
|
||||
"orientation": "Unset"
|
||||
}
|
||||
},
|
||||
"legacy": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000014": {
|
||||
"id": "52060906-0000-4000-8000-000000000014",
|
||||
"alias": "operation_probe_20",
|
||||
"name": "Reset",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"ExchangeItem": {
|
||||
"kind": "Information",
|
||||
"mechanism": "Operation",
|
||||
"supertype": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000015": {
|
||||
"id": "52060906-0000-4000-8000-000000000015",
|
||||
"alias": "operation_probe_21",
|
||||
"name": "ReadStatus",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"ExchangeItem": {
|
||||
"kind": "Information",
|
||||
"mechanism": "Operation",
|
||||
"supertype": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000016": {
|
||||
"id": "52060906-0000-4000-8000-000000000016",
|
||||
"alias": "operation_probe_22",
|
||||
"name": "Valve commands",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Interface": {
|
||||
"supertype": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000028": {
|
||||
"id": "52060906-0000-4000-8000-000000000028",
|
||||
"alias": "operation_probe_40",
|
||||
"name": "Reset then read status",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Scenario": {
|
||||
"viewpoint": "BoundaryInterface",
|
||||
"context": null,
|
||||
"precondition": "",
|
||||
"postcondition": "",
|
||||
"steps": [
|
||||
"52060906-0000-4000-8000-00000000002b",
|
||||
"52060906-0000-4000-8000-00000000002c"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000029": {
|
||||
"id": "52060906-0000-4000-8000-000000000029",
|
||||
"alias": "operation_probe_41",
|
||||
"name": "Service participant",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000028",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Lifeline": {
|
||||
"represented": "52060906-0000-4000-8000-00000000000a"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000002a": {
|
||||
"id": "52060906-0000-4000-8000-00000000002a",
|
||||
"alias": "operation_probe_42",
|
||||
"name": "Service participant",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000028",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Lifeline": {
|
||||
"represented": "52060906-0000-4000-8000-00000000000b"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000002b": {
|
||||
"id": "52060906-0000-4000-8000-00000000002b",
|
||||
"alias": "operation_probe_43",
|
||||
"name": "Call Reset",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000028",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Occurrence": {
|
||||
"body": {
|
||||
"Exchange": {
|
||||
"exchange": "52060906-0000-4000-8000-000000000022",
|
||||
"sender": "52060906-0000-4000-8000-000000000029",
|
||||
"receiver": "52060906-0000-4000-8000-00000000002a",
|
||||
"message_kind": "Call",
|
||||
"reply_to": null,
|
||||
"values": []
|
||||
}
|
||||
},
|
||||
"precondition": "",
|
||||
"postcondition": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000002c": {
|
||||
"id": "52060906-0000-4000-8000-00000000002c",
|
||||
"alias": "operation_probe_44",
|
||||
"name": "Call ReadStatus",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000028",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Occurrence": {
|
||||
"body": {
|
||||
"Exchange": {
|
||||
"exchange": "52060906-0000-4000-8000-000000000022",
|
||||
"sender": "52060906-0000-4000-8000-000000000029",
|
||||
"receiver": "52060906-0000-4000-8000-00000000002a",
|
||||
"message_kind": "Call",
|
||||
"reply_to": null,
|
||||
"values": []
|
||||
}
|
||||
},
|
||||
"precondition": "",
|
||||
"postcondition": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"52060906-0000-4000-8000-00000000001e": {
|
||||
"id": "52060906-0000-4000-8000-00000000001e",
|
||||
"alias": "operation_probe_30",
|
||||
"name": "InterfaceItemAllocation 30",
|
||||
"description": "",
|
||||
"body": {
|
||||
"InterfaceItemAllocation": {
|
||||
"source": "52060906-0000-4000-8000-000000000016",
|
||||
"target": "52060906-0000-4000-8000-000000000014",
|
||||
"order": 0,
|
||||
"transmission": "Synchronous",
|
||||
"acquisition": "Unspecified"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000001f": {
|
||||
"id": "52060906-0000-4000-8000-00000000001f",
|
||||
"alias": "operation_probe_31",
|
||||
"name": "InterfaceItemAllocation 31",
|
||||
"description": "",
|
||||
"body": {
|
||||
"InterfaceItemAllocation": {
|
||||
"source": "52060906-0000-4000-8000-000000000016",
|
||||
"target": "52060906-0000-4000-8000-000000000015",
|
||||
"order": 0,
|
||||
"transmission": "Synchronous",
|
||||
"acquisition": "Unspecified"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000020": {
|
||||
"id": "52060906-0000-4000-8000-000000000020",
|
||||
"alias": "operation_probe_32",
|
||||
"name": "InterfaceRequirement 32",
|
||||
"description": "",
|
||||
"body": {
|
||||
"InterfaceRequirement": {
|
||||
"source": "52060906-0000-4000-8000-00000000000c",
|
||||
"target": "52060906-0000-4000-8000-000000000016"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000021": {
|
||||
"id": "52060906-0000-4000-8000-000000000021",
|
||||
"alias": "operation_probe_33",
|
||||
"name": "InterfaceProvision 33",
|
||||
"description": "",
|
||||
"body": {
|
||||
"InterfaceProvision": {
|
||||
"source": "52060906-0000-4000-8000-00000000000d",
|
||||
"target": "52060906-0000-4000-8000-000000000016"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000022": {
|
||||
"id": "52060906-0000-4000-8000-000000000022",
|
||||
"alias": "operation_probe_34",
|
||||
"name": "BoundaryExchange 34",
|
||||
"description": "",
|
||||
"body": {
|
||||
"BoundaryExchange": {
|
||||
"source": "52060906-0000-4000-8000-00000000000c",
|
||||
"target": "52060906-0000-4000-8000-00000000000d",
|
||||
"oriented": false,
|
||||
"items": [
|
||||
"52060906-0000-4000-8000-000000000014",
|
||||
"52060906-0000-4000-8000-000000000015"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"diagrams": {},
|
||||
"artifact_links": {},
|
||||
"traces": {}
|
||||
}
|
||||
+275
@@ -0,0 +1,275 @@
|
||||
arcadia 6;
|
||||
project mission "Two operations, one interface" id "52060906-0000-4000-8000-000000000001" {
|
||||
description "";
|
||||
|
||||
sa_actor operation_probe_10 "Operator console" id "52060906-0000-4000-8000-00000000000a" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_system operation_probe_11 "Valve service" id "52060906-0000-4000-8000-00000000000b" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_port operation_probe_12 "Service socket" id "52060906-0000-4000-8000-00000000000c" {
|
||||
contract {
|
||||
Component {
|
||||
kind Standard;
|
||||
orientation Unset;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
legacy none;
|
||||
parent @operation_probe_10;
|
||||
}
|
||||
|
||||
sa_port operation_probe_13 "Service socket" id "52060906-0000-4000-8000-00000000000d" {
|
||||
contract {
|
||||
Component {
|
||||
kind Standard;
|
||||
orientation Unset;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
legacy none;
|
||||
parent @operation_probe_11;
|
||||
}
|
||||
|
||||
sa_exchange_item operation_probe_20 "Reset" id "52060906-0000-4000-8000-000000000014" {
|
||||
description "";
|
||||
kind Information;
|
||||
mechanism Operation;
|
||||
parent none;
|
||||
supertype none;
|
||||
}
|
||||
|
||||
sa_exchange_item operation_probe_21 "ReadStatus" id "52060906-0000-4000-8000-000000000015" {
|
||||
description "";
|
||||
kind Information;
|
||||
mechanism Operation;
|
||||
parent none;
|
||||
supertype none;
|
||||
}
|
||||
|
||||
sa_interface operation_probe_22 "Valve commands" id "52060906-0000-4000-8000-000000000016" {
|
||||
description "";
|
||||
parent none;
|
||||
supertype none;
|
||||
}
|
||||
|
||||
sa_scenario operation_probe_40 "Reset then read status" id "52060906-0000-4000-8000-000000000028" {
|
||||
context none;
|
||||
description "";
|
||||
parent none;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
steps [@operation_probe_43, @operation_probe_44];
|
||||
viewpoint BoundaryInterface;
|
||||
}
|
||||
|
||||
sa_lifeline operation_probe_41 "Service participant" id "52060906-0000-4000-8000-000000000029" {
|
||||
description "";
|
||||
parent @operation_probe_40;
|
||||
represented @operation_probe_10;
|
||||
}
|
||||
|
||||
sa_lifeline operation_probe_42 "Service participant" id "52060906-0000-4000-8000-00000000002a" {
|
||||
description "";
|
||||
parent @operation_probe_40;
|
||||
represented @operation_probe_11;
|
||||
}
|
||||
|
||||
sa_occurrence operation_probe_43 "Call Reset" id "52060906-0000-4000-8000-00000000002b" {
|
||||
body {
|
||||
Exchange {
|
||||
exchange @operation_probe_80;
|
||||
message_kind Call;
|
||||
receiver @operation_probe_42;
|
||||
reply_to none;
|
||||
sender @operation_probe_41;
|
||||
values [];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @operation_probe_40;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_occurrence operation_probe_44 "Call ReadStatus" id "52060906-0000-4000-8000-00000000002c" {
|
||||
body {
|
||||
Exchange {
|
||||
exchange @operation_probe_81;
|
||||
message_kind Call;
|
||||
receiver @operation_probe_42;
|
||||
reply_to none;
|
||||
sender @operation_probe_41;
|
||||
values [];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @operation_probe_40;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_function operation_probe_50 "Issue service request" id "52060906-0000-4000-8000-000000000032" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_function operation_probe_51 "Execute service request" id "52060906-0000-4000-8000-000000000033" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_port operation_probe_70 "Operation output" id "52060906-0000-4000-8000-000000000046" {
|
||||
contract {
|
||||
FunctionOutput {
|
||||
outgoing_items [@operation_probe_20];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
legacy none;
|
||||
parent @operation_probe_50;
|
||||
}
|
||||
|
||||
sa_port operation_probe_71 "Operation input" id "52060906-0000-4000-8000-000000000047" {
|
||||
contract {
|
||||
FunctionInput {
|
||||
incoming_items [@operation_probe_20];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
legacy none;
|
||||
parent @operation_probe_51;
|
||||
}
|
||||
|
||||
sa_port operation_probe_72 "Operation output" id "52060906-0000-4000-8000-000000000048" {
|
||||
contract {
|
||||
FunctionOutput {
|
||||
outgoing_items [@operation_probe_21];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
legacy none;
|
||||
parent @operation_probe_50;
|
||||
}
|
||||
|
||||
sa_port operation_probe_73 "Operation input" id "52060906-0000-4000-8000-000000000049" {
|
||||
contract {
|
||||
FunctionInput {
|
||||
incoming_items [@operation_probe_21];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
legacy none;
|
||||
parent @operation_probe_51;
|
||||
}
|
||||
|
||||
interface_item_allocation operation_probe_30 "InterfaceItemAllocation 30" id "52060906-0000-4000-8000-00000000001e" {
|
||||
acquisition Unspecified;
|
||||
description "";
|
||||
order 0;
|
||||
source @operation_probe_22;
|
||||
target @operation_probe_20;
|
||||
transmission Synchronous;
|
||||
}
|
||||
|
||||
interface_item_allocation operation_probe_31 "InterfaceItemAllocation 31" id "52060906-0000-4000-8000-00000000001f" {
|
||||
acquisition Unspecified;
|
||||
description "";
|
||||
order 0;
|
||||
source @operation_probe_22;
|
||||
target @operation_probe_21;
|
||||
transmission Synchronous;
|
||||
}
|
||||
|
||||
interface_requirement operation_probe_32 "InterfaceRequirement 32" id "52060906-0000-4000-8000-000000000020" {
|
||||
description "";
|
||||
source @operation_probe_12;
|
||||
target @operation_probe_22;
|
||||
}
|
||||
|
||||
interface_provision operation_probe_33 "InterfaceProvision 33" id "52060906-0000-4000-8000-000000000021" {
|
||||
description "";
|
||||
source @operation_probe_13;
|
||||
target @operation_probe_22;
|
||||
}
|
||||
|
||||
boundary_exchange operation_probe_34 "BoundaryExchange 34" id "52060906-0000-4000-8000-000000000022" {
|
||||
description "";
|
||||
items [@operation_probe_20, @operation_probe_21];
|
||||
oriented false;
|
||||
source @operation_probe_12;
|
||||
target @operation_probe_13;
|
||||
}
|
||||
|
||||
allocation operation_probe_60 "Allocation 60" id "52060906-0000-4000-8000-00000000003c" {
|
||||
description "";
|
||||
source @operation_probe_10;
|
||||
target @operation_probe_50;
|
||||
}
|
||||
|
||||
allocation operation_probe_61 "Allocation 61" id "52060906-0000-4000-8000-00000000003d" {
|
||||
description "";
|
||||
source @operation_probe_11;
|
||||
target @operation_probe_51;
|
||||
}
|
||||
|
||||
functional_exchange operation_probe_80 "FunctionalExchange 80" id "52060906-0000-4000-8000-000000000050" {
|
||||
description "";
|
||||
items [@operation_probe_20];
|
||||
source @operation_probe_50;
|
||||
source_port @operation_probe_70;
|
||||
target @operation_probe_51;
|
||||
target_port @operation_probe_71;
|
||||
}
|
||||
|
||||
functional_exchange operation_probe_81 "FunctionalExchange 81" id "52060906-0000-4000-8000-000000000051" {
|
||||
description "";
|
||||
items [@operation_probe_21];
|
||||
source @operation_probe_50;
|
||||
source_port @operation_probe_72;
|
||||
target @operation_probe_51;
|
||||
target_port @operation_probe_73;
|
||||
}
|
||||
|
||||
port_allocation operation_probe_90 "PortAllocation 90" id "52060906-0000-4000-8000-00000000005a" {
|
||||
description "";
|
||||
source @operation_probe_12;
|
||||
target @operation_probe_70;
|
||||
}
|
||||
|
||||
port_allocation operation_probe_91 "PortAllocation 91" id "52060906-0000-4000-8000-00000000005b" {
|
||||
description "";
|
||||
source @operation_probe_13;
|
||||
target @operation_probe_71;
|
||||
}
|
||||
|
||||
port_allocation operation_probe_92 "PortAllocation 92" id "52060906-0000-4000-8000-00000000005c" {
|
||||
description "";
|
||||
source @operation_probe_12;
|
||||
target @operation_probe_72;
|
||||
}
|
||||
|
||||
port_allocation operation_probe_93 "PortAllocation 93" id "52060906-0000-4000-8000-00000000005d" {
|
||||
description "";
|
||||
source @operation_probe_13;
|
||||
target @operation_probe_73;
|
||||
}
|
||||
|
||||
exchange_allocation operation_probe_100 "ExchangeAllocation 100" id "52060906-0000-4000-8000-000000000064" {
|
||||
description "";
|
||||
source @operation_probe_34;
|
||||
target @operation_probe_80;
|
||||
}
|
||||
|
||||
exchange_allocation operation_probe_101 "ExchangeAllocation 101" id "52060906-0000-4000-8000-000000000065" {
|
||||
description "";
|
||||
source @operation_probe_34;
|
||||
target @operation_probe_81;
|
||||
}
|
||||
|
||||
}
|
||||
+552
@@ -0,0 +1,552 @@
|
||||
{
|
||||
"schema_version": 6,
|
||||
"id": "52060906-0000-4000-8000-000000000001",
|
||||
"alias": "mission",
|
||||
"name": "Two operations, one interface",
|
||||
"description": "",
|
||||
"elements": {
|
||||
"52060906-0000-4000-8000-00000000000a": {
|
||||
"id": "52060906-0000-4000-8000-00000000000a",
|
||||
"alias": "operation_probe_10",
|
||||
"name": "Operator console",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": "Actor"
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000000b": {
|
||||
"id": "52060906-0000-4000-8000-00000000000b",
|
||||
"alias": "operation_probe_11",
|
||||
"name": "Valve service",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": "System"
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000000c": {
|
||||
"id": "52060906-0000-4000-8000-00000000000c",
|
||||
"alias": "operation_probe_12",
|
||||
"name": "Service socket",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-00000000000a",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Port": {
|
||||
"contract": {
|
||||
"Component": {
|
||||
"kind": "Standard",
|
||||
"orientation": "Unset"
|
||||
}
|
||||
},
|
||||
"legacy": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000000d": {
|
||||
"id": "52060906-0000-4000-8000-00000000000d",
|
||||
"alias": "operation_probe_13",
|
||||
"name": "Service socket",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-00000000000b",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Port": {
|
||||
"contract": {
|
||||
"Component": {
|
||||
"kind": "Standard",
|
||||
"orientation": "Unset"
|
||||
}
|
||||
},
|
||||
"legacy": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000014": {
|
||||
"id": "52060906-0000-4000-8000-000000000014",
|
||||
"alias": "operation_probe_20",
|
||||
"name": "Reset",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"ExchangeItem": {
|
||||
"kind": "Information",
|
||||
"mechanism": "Operation",
|
||||
"supertype": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000015": {
|
||||
"id": "52060906-0000-4000-8000-000000000015",
|
||||
"alias": "operation_probe_21",
|
||||
"name": "ReadStatus",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"ExchangeItem": {
|
||||
"kind": "Information",
|
||||
"mechanism": "Operation",
|
||||
"supertype": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000016": {
|
||||
"id": "52060906-0000-4000-8000-000000000016",
|
||||
"alias": "operation_probe_22",
|
||||
"name": "Valve commands",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Interface": {
|
||||
"supertype": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000028": {
|
||||
"id": "52060906-0000-4000-8000-000000000028",
|
||||
"alias": "operation_probe_40",
|
||||
"name": "Reset then read status",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Scenario": {
|
||||
"viewpoint": "BoundaryInterface",
|
||||
"context": null,
|
||||
"precondition": "",
|
||||
"postcondition": "",
|
||||
"steps": [
|
||||
"52060906-0000-4000-8000-00000000002b",
|
||||
"52060906-0000-4000-8000-00000000002c"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000029": {
|
||||
"id": "52060906-0000-4000-8000-000000000029",
|
||||
"alias": "operation_probe_41",
|
||||
"name": "Service participant",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000028",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Lifeline": {
|
||||
"represented": "52060906-0000-4000-8000-00000000000a"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000002a": {
|
||||
"id": "52060906-0000-4000-8000-00000000002a",
|
||||
"alias": "operation_probe_42",
|
||||
"name": "Service participant",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000028",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Lifeline": {
|
||||
"represented": "52060906-0000-4000-8000-00000000000b"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000002b": {
|
||||
"id": "52060906-0000-4000-8000-00000000002b",
|
||||
"alias": "operation_probe_43",
|
||||
"name": "Call Reset",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000028",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Occurrence": {
|
||||
"body": {
|
||||
"Exchange": {
|
||||
"exchange": "52060906-0000-4000-8000-000000000050",
|
||||
"sender": "52060906-0000-4000-8000-000000000029",
|
||||
"receiver": "52060906-0000-4000-8000-00000000002a",
|
||||
"message_kind": "Call",
|
||||
"reply_to": null,
|
||||
"values": []
|
||||
}
|
||||
},
|
||||
"precondition": "",
|
||||
"postcondition": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000002c": {
|
||||
"id": "52060906-0000-4000-8000-00000000002c",
|
||||
"alias": "operation_probe_44",
|
||||
"name": "Call ReadStatus",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000028",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Occurrence": {
|
||||
"body": {
|
||||
"Exchange": {
|
||||
"exchange": "52060906-0000-4000-8000-000000000051",
|
||||
"sender": "52060906-0000-4000-8000-000000000029",
|
||||
"receiver": "52060906-0000-4000-8000-00000000002a",
|
||||
"message_kind": "Call",
|
||||
"reply_to": null,
|
||||
"values": []
|
||||
}
|
||||
},
|
||||
"precondition": "",
|
||||
"postcondition": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000032": {
|
||||
"id": "52060906-0000-4000-8000-000000000032",
|
||||
"alias": "operation_probe_50",
|
||||
"name": "Issue service request",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": "Function"
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000033": {
|
||||
"id": "52060906-0000-4000-8000-000000000033",
|
||||
"alias": "operation_probe_51",
|
||||
"name": "Execute service request",
|
||||
"description": "",
|
||||
"parent": null,
|
||||
"body": {
|
||||
"Sa": "Function"
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000046": {
|
||||
"id": "52060906-0000-4000-8000-000000000046",
|
||||
"alias": "operation_probe_70",
|
||||
"name": "Operation output",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000032",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Port": {
|
||||
"contract": {
|
||||
"FunctionOutput": {
|
||||
"outgoing_items": [
|
||||
"52060906-0000-4000-8000-000000000014"
|
||||
]
|
||||
}
|
||||
},
|
||||
"legacy": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000047": {
|
||||
"id": "52060906-0000-4000-8000-000000000047",
|
||||
"alias": "operation_probe_71",
|
||||
"name": "Operation input",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000033",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Port": {
|
||||
"contract": {
|
||||
"FunctionInput": {
|
||||
"incoming_items": [
|
||||
"52060906-0000-4000-8000-000000000014"
|
||||
]
|
||||
}
|
||||
},
|
||||
"legacy": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000048": {
|
||||
"id": "52060906-0000-4000-8000-000000000048",
|
||||
"alias": "operation_probe_72",
|
||||
"name": "Operation output",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000032",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Port": {
|
||||
"contract": {
|
||||
"FunctionOutput": {
|
||||
"outgoing_items": [
|
||||
"52060906-0000-4000-8000-000000000015"
|
||||
]
|
||||
}
|
||||
},
|
||||
"legacy": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000049": {
|
||||
"id": "52060906-0000-4000-8000-000000000049",
|
||||
"alias": "operation_probe_73",
|
||||
"name": "Operation input",
|
||||
"description": "",
|
||||
"parent": "52060906-0000-4000-8000-000000000033",
|
||||
"body": {
|
||||
"Sa": {
|
||||
"Shared": {
|
||||
"Port": {
|
||||
"contract": {
|
||||
"FunctionInput": {
|
||||
"incoming_items": [
|
||||
"52060906-0000-4000-8000-000000000015"
|
||||
]
|
||||
}
|
||||
},
|
||||
"legacy": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"52060906-0000-4000-8000-00000000001e": {
|
||||
"id": "52060906-0000-4000-8000-00000000001e",
|
||||
"alias": "operation_probe_30",
|
||||
"name": "InterfaceItemAllocation 30",
|
||||
"description": "",
|
||||
"body": {
|
||||
"InterfaceItemAllocation": {
|
||||
"source": "52060906-0000-4000-8000-000000000016",
|
||||
"target": "52060906-0000-4000-8000-000000000014",
|
||||
"order": 0,
|
||||
"transmission": "Synchronous",
|
||||
"acquisition": "Unspecified"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000001f": {
|
||||
"id": "52060906-0000-4000-8000-00000000001f",
|
||||
"alias": "operation_probe_31",
|
||||
"name": "InterfaceItemAllocation 31",
|
||||
"description": "",
|
||||
"body": {
|
||||
"InterfaceItemAllocation": {
|
||||
"source": "52060906-0000-4000-8000-000000000016",
|
||||
"target": "52060906-0000-4000-8000-000000000015",
|
||||
"order": 0,
|
||||
"transmission": "Synchronous",
|
||||
"acquisition": "Unspecified"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000020": {
|
||||
"id": "52060906-0000-4000-8000-000000000020",
|
||||
"alias": "operation_probe_32",
|
||||
"name": "InterfaceRequirement 32",
|
||||
"description": "",
|
||||
"body": {
|
||||
"InterfaceRequirement": {
|
||||
"source": "52060906-0000-4000-8000-00000000000c",
|
||||
"target": "52060906-0000-4000-8000-000000000016"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000021": {
|
||||
"id": "52060906-0000-4000-8000-000000000021",
|
||||
"alias": "operation_probe_33",
|
||||
"name": "InterfaceProvision 33",
|
||||
"description": "",
|
||||
"body": {
|
||||
"InterfaceProvision": {
|
||||
"source": "52060906-0000-4000-8000-00000000000d",
|
||||
"target": "52060906-0000-4000-8000-000000000016"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000022": {
|
||||
"id": "52060906-0000-4000-8000-000000000022",
|
||||
"alias": "operation_probe_34",
|
||||
"name": "BoundaryExchange 34",
|
||||
"description": "",
|
||||
"body": {
|
||||
"BoundaryExchange": {
|
||||
"source": "52060906-0000-4000-8000-00000000000c",
|
||||
"target": "52060906-0000-4000-8000-00000000000d",
|
||||
"oriented": false,
|
||||
"items": [
|
||||
"52060906-0000-4000-8000-000000000014",
|
||||
"52060906-0000-4000-8000-000000000015"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000003c": {
|
||||
"id": "52060906-0000-4000-8000-00000000003c",
|
||||
"alias": "operation_probe_60",
|
||||
"name": "Allocation 60",
|
||||
"description": "",
|
||||
"body": {
|
||||
"Allocation": {
|
||||
"source": "52060906-0000-4000-8000-00000000000a",
|
||||
"target": "52060906-0000-4000-8000-000000000032"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000003d": {
|
||||
"id": "52060906-0000-4000-8000-00000000003d",
|
||||
"alias": "operation_probe_61",
|
||||
"name": "Allocation 61",
|
||||
"description": "",
|
||||
"body": {
|
||||
"Allocation": {
|
||||
"source": "52060906-0000-4000-8000-00000000000b",
|
||||
"target": "52060906-0000-4000-8000-000000000033"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000050": {
|
||||
"id": "52060906-0000-4000-8000-000000000050",
|
||||
"alias": "operation_probe_80",
|
||||
"name": "FunctionalExchange 80",
|
||||
"description": "",
|
||||
"body": {
|
||||
"FunctionalExchange": {
|
||||
"source": "52060906-0000-4000-8000-000000000032",
|
||||
"target": "52060906-0000-4000-8000-000000000033",
|
||||
"source_port": "52060906-0000-4000-8000-000000000046",
|
||||
"target_port": "52060906-0000-4000-8000-000000000047",
|
||||
"items": [
|
||||
"52060906-0000-4000-8000-000000000014"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000051": {
|
||||
"id": "52060906-0000-4000-8000-000000000051",
|
||||
"alias": "operation_probe_81",
|
||||
"name": "FunctionalExchange 81",
|
||||
"description": "",
|
||||
"body": {
|
||||
"FunctionalExchange": {
|
||||
"source": "52060906-0000-4000-8000-000000000032",
|
||||
"target": "52060906-0000-4000-8000-000000000033",
|
||||
"source_port": "52060906-0000-4000-8000-000000000048",
|
||||
"target_port": "52060906-0000-4000-8000-000000000049",
|
||||
"items": [
|
||||
"52060906-0000-4000-8000-000000000015"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000005a": {
|
||||
"id": "52060906-0000-4000-8000-00000000005a",
|
||||
"alias": "operation_probe_90",
|
||||
"name": "PortAllocation 90",
|
||||
"description": "",
|
||||
"body": {
|
||||
"PortAllocation": {
|
||||
"source": "52060906-0000-4000-8000-00000000000c",
|
||||
"target": "52060906-0000-4000-8000-000000000046"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000005b": {
|
||||
"id": "52060906-0000-4000-8000-00000000005b",
|
||||
"alias": "operation_probe_91",
|
||||
"name": "PortAllocation 91",
|
||||
"description": "",
|
||||
"body": {
|
||||
"PortAllocation": {
|
||||
"source": "52060906-0000-4000-8000-00000000000d",
|
||||
"target": "52060906-0000-4000-8000-000000000047"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000005c": {
|
||||
"id": "52060906-0000-4000-8000-00000000005c",
|
||||
"alias": "operation_probe_92",
|
||||
"name": "PortAllocation 92",
|
||||
"description": "",
|
||||
"body": {
|
||||
"PortAllocation": {
|
||||
"source": "52060906-0000-4000-8000-00000000000c",
|
||||
"target": "52060906-0000-4000-8000-000000000048"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-00000000005d": {
|
||||
"id": "52060906-0000-4000-8000-00000000005d",
|
||||
"alias": "operation_probe_93",
|
||||
"name": "PortAllocation 93",
|
||||
"description": "",
|
||||
"body": {
|
||||
"PortAllocation": {
|
||||
"source": "52060906-0000-4000-8000-00000000000d",
|
||||
"target": "52060906-0000-4000-8000-000000000049"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000064": {
|
||||
"id": "52060906-0000-4000-8000-000000000064",
|
||||
"alias": "operation_probe_100",
|
||||
"name": "ExchangeAllocation 100",
|
||||
"description": "",
|
||||
"body": {
|
||||
"ExchangeAllocation": {
|
||||
"source": "52060906-0000-4000-8000-000000000022",
|
||||
"target": "52060906-0000-4000-8000-000000000050"
|
||||
}
|
||||
}
|
||||
},
|
||||
"52060906-0000-4000-8000-000000000065": {
|
||||
"id": "52060906-0000-4000-8000-000000000065",
|
||||
"alias": "operation_probe_101",
|
||||
"name": "ExchangeAllocation 101",
|
||||
"description": "",
|
||||
"body": {
|
||||
"ExchangeAllocation": {
|
||||
"source": "52060906-0000-4000-8000-000000000022",
|
||||
"target": "52060906-0000-4000-8000-000000000051"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"diagrams": {},
|
||||
"artifact_links": {},
|
||||
"traces": {}
|
||||
}
|
||||
@@ -0,0 +1,335 @@
|
||||
//! Existing-core expressivity experiment, not a proposed production DTO.
|
||||
use oa_core::validation::{Severity, validate};
|
||||
use oa_core::*;
|
||||
use std::{collections::BTreeMap, fs, path::Path};
|
||||
fn id(n: u128) -> Id {
|
||||
Id::from_u128(0x52060906000040008000000000000000 + n)
|
||||
}
|
||||
fn add(p: &mut Project, n: u128, k: Kind, name: &str, parent: Option<Id>) -> Id {
|
||||
let mut e = if k == Kind::Port {
|
||||
Element {
|
||||
id: id(n),
|
||||
alias: format!("operation_probe_{n}"),
|
||||
name: name.into(),
|
||||
description: String::new(),
|
||||
parent,
|
||||
body: ElementBody::shared_in(
|
||||
Layer::Sa,
|
||||
SharedBody::Port {
|
||||
contract: PortContract::Component {
|
||||
kind: ComponentPortKind::Standard,
|
||||
orientation: ComponentPortOrientation::Unset,
|
||||
},
|
||||
legacy: None,
|
||||
},
|
||||
),
|
||||
}
|
||||
} else {
|
||||
p.make_element(k, Layer::Sa, name, parent).unwrap()
|
||||
};
|
||||
e.id = id(n);
|
||||
e.alias = format!("operation_probe_{n}");
|
||||
p.elements.insert(e.id, e);
|
||||
id(n)
|
||||
}
|
||||
fn body(p: &mut Project, n: u128, b: SharedBody) {
|
||||
*p.elements.get_mut(&id(n)).unwrap().shared_mut().unwrap() = b;
|
||||
}
|
||||
fn rel(p: &mut Project, n: u128, k: RelationKind, a: u128, b: u128) {
|
||||
p.relations.insert(
|
||||
id(n),
|
||||
Relation {
|
||||
id: id(n),
|
||||
alias: format!("operation_probe_{n}"),
|
||||
name: format!("{k:?} {n}"),
|
||||
description: String::new(),
|
||||
body: RelationBody::new(k, id(a), id(b)),
|
||||
},
|
||||
);
|
||||
}
|
||||
fn valid(p: &Project) {
|
||||
let errors: Vec<_> = validate(p)
|
||||
.into_iter()
|
||||
.filter(|i| i.severity == Severity::Error)
|
||||
.collect();
|
||||
assert!(errors.is_empty(), "{errors:?}");
|
||||
}
|
||||
fn message(p: &Project, n: u128) -> &OccurrenceBody {
|
||||
let Some(SharedBody::Occurrence { body, .. }) = p.elements[&id(n)].shared() else {
|
||||
panic!()
|
||||
};
|
||||
body
|
||||
}
|
||||
fn set_exchange(p: &mut Project, n: u128, target: Id) {
|
||||
let Some(SharedBody::Occurrence {
|
||||
body: OccurrenceBody::Exchange { exchange, .. },
|
||||
..
|
||||
}) = p.elements.get_mut(&id(n)).unwrap().shared_mut()
|
||||
else {
|
||||
panic!()
|
||||
};
|
||||
*exchange = Some(target);
|
||||
}
|
||||
fn initial() -> Project {
|
||||
let mut p = Project::empty();
|
||||
p.id = id(1);
|
||||
p.name = "Two operations, one interface".into();
|
||||
add(&mut p, 10, Kind::SystemActor, "Operator console", None);
|
||||
add(&mut p, 11, Kind::System, "Valve service", None);
|
||||
for (port, owner) in [(12, 10), (13, 11)] {
|
||||
add(&mut p, port, Kind::Port, "Service socket", Some(id(owner)));
|
||||
body(
|
||||
&mut p,
|
||||
port,
|
||||
SharedBody::Port {
|
||||
contract: PortContract::Component {
|
||||
kind: ComponentPortKind::Standard,
|
||||
orientation: ComponentPortOrientation::Unset,
|
||||
},
|
||||
legacy: None,
|
||||
},
|
||||
);
|
||||
}
|
||||
for (operation, name) in [(20, "Reset"), (21, "ReadStatus")] {
|
||||
add(&mut p, operation, Kind::ExchangeItem, name, None);
|
||||
body(
|
||||
&mut p,
|
||||
operation,
|
||||
SharedBody::ExchangeItem {
|
||||
kind: ExchangeItemKind::Information,
|
||||
mechanism: ExchangeMechanism::Operation,
|
||||
supertype: None,
|
||||
},
|
||||
);
|
||||
}
|
||||
add(&mut p, 22, Kind::Interface, "Valve commands", None);
|
||||
for (allocation, item) in [(30, 20), (31, 21)] {
|
||||
rel(
|
||||
&mut p,
|
||||
allocation,
|
||||
RelationKind::InterfaceItemAllocation,
|
||||
22,
|
||||
item,
|
||||
);
|
||||
let RelationBody::InterfaceItemAllocation { transmission, .. } =
|
||||
&mut p.relations.get_mut(&id(allocation)).unwrap().body
|
||||
else {
|
||||
panic!()
|
||||
};
|
||||
*transmission = TransmissionProtocol::Synchronous;
|
||||
}
|
||||
rel(&mut p, 32, RelationKind::InterfaceRequirement, 12, 22);
|
||||
rel(&mut p, 33, RelationKind::InterfaceProvision, 13, 22);
|
||||
rel(&mut p, 34, RelationKind::BoundaryExchange, 12, 13);
|
||||
p.relations.get_mut(&id(34)).unwrap().body = RelationBody::BoundaryExchange {
|
||||
source: id(12),
|
||||
target: id(13),
|
||||
oriented: false,
|
||||
items: vec![id(20), id(21)],
|
||||
};
|
||||
add(&mut p, 40, Kind::Scenario, "Reset then read status", None);
|
||||
body(
|
||||
&mut p,
|
||||
40,
|
||||
SharedBody::Scenario {
|
||||
viewpoint: ScenarioViewpoint::BoundaryInterface,
|
||||
context: None,
|
||||
precondition: String::new(),
|
||||
postcondition: String::new(),
|
||||
steps: vec![id(43), id(44)],
|
||||
},
|
||||
);
|
||||
for (line, participant) in [(41, 10), (42, 11)] {
|
||||
add(
|
||||
&mut p,
|
||||
line,
|
||||
Kind::Lifeline,
|
||||
"Service participant",
|
||||
Some(id(40)),
|
||||
);
|
||||
body(
|
||||
&mut p,
|
||||
line,
|
||||
SharedBody::Lifeline {
|
||||
represented: Some(id(participant)),
|
||||
},
|
||||
);
|
||||
}
|
||||
for (call, name) in [(43, "Call Reset"), (44, "Call ReadStatus")] {
|
||||
add(&mut p, call, Kind::Occurrence, name, Some(id(40)));
|
||||
body(
|
||||
&mut p,
|
||||
call,
|
||||
SharedBody::Occurrence {
|
||||
body: OccurrenceBody::Exchange {
|
||||
exchange: Some(id(34)),
|
||||
sender: Some(id(41)),
|
||||
receiver: Some(id(42)),
|
||||
message_kind: MessageKind::Call,
|
||||
reply_to: None,
|
||||
values: vec![],
|
||||
},
|
||||
precondition: String::new(),
|
||||
postcondition: String::new(),
|
||||
},
|
||||
);
|
||||
}
|
||||
valid(&p);
|
||||
p
|
||||
}
|
||||
fn refined(p: &Project) -> Project {
|
||||
let mut q = p.clone();
|
||||
for (work, owner, name) in [
|
||||
(50, 10, "Issue service request"),
|
||||
(51, 11, "Execute service request"),
|
||||
] {
|
||||
add(&mut q, work, Kind::Function, name, None);
|
||||
rel(&mut q, work + 10, RelationKind::Allocation, owner, work);
|
||||
}
|
||||
for (item, output, input, exchange) in [(20, 70, 71, 80), (21, 72, 73, 81)] {
|
||||
add(&mut q, output, Kind::Port, "Operation output", Some(id(50)));
|
||||
add(&mut q, input, Kind::Port, "Operation input", Some(id(51)));
|
||||
body(
|
||||
&mut q,
|
||||
output,
|
||||
SharedBody::Port {
|
||||
contract: PortContract::FunctionOutput {
|
||||
outgoing_items: vec![id(item)],
|
||||
},
|
||||
legacy: None,
|
||||
},
|
||||
);
|
||||
body(
|
||||
&mut q,
|
||||
input,
|
||||
SharedBody::Port {
|
||||
contract: PortContract::FunctionInput {
|
||||
incoming_items: vec![id(item)],
|
||||
},
|
||||
legacy: None,
|
||||
},
|
||||
);
|
||||
rel(&mut q, exchange, RelationKind::FunctionalExchange, 50, 51);
|
||||
q.relations.get_mut(&id(exchange)).unwrap().body = RelationBody::FunctionalExchange {
|
||||
source: id(50),
|
||||
target: id(51),
|
||||
source_port: id(output),
|
||||
target_port: id(input),
|
||||
items: vec![id(item)],
|
||||
};
|
||||
rel(
|
||||
&mut q,
|
||||
output + 20,
|
||||
RelationKind::PortAllocation,
|
||||
12,
|
||||
output,
|
||||
);
|
||||
rel(&mut q, input + 20, RelationKind::PortAllocation, 13, input);
|
||||
rel(
|
||||
&mut q,
|
||||
exchange + 20,
|
||||
RelationKind::ExchangeAllocation,
|
||||
34,
|
||||
exchange,
|
||||
);
|
||||
}
|
||||
set_exchange(&mut q, 43, id(80));
|
||||
set_exchange(&mut q, 44, id(81));
|
||||
valid(&q);
|
||||
q
|
||||
}
|
||||
fn write(p: &Project, out: &Path, name: &str) {
|
||||
let source = language::format(p);
|
||||
let bundle = source_project::SourceBundle {
|
||||
entry: "entry.arcadia".into(),
|
||||
files: BTreeMap::from([("entry.arcadia".into(), source.clone())]),
|
||||
};
|
||||
assert_eq!(
|
||||
&source_project::compile_bundle(&bundle, Default::default())
|
||||
.unwrap()
|
||||
.decoded
|
||||
.project,
|
||||
p
|
||||
);
|
||||
assert_eq!(
|
||||
&serde_json::from_value::<Project>(serde_json::to_value(p).unwrap()).unwrap(),
|
||||
p
|
||||
);
|
||||
fs::write(out.join(format!("{name}.arcadia")), source).unwrap();
|
||||
fs::write(
|
||||
out.join(format!("{name}.json")),
|
||||
serde_json::to_vec_pretty(p).unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
fn main() {
|
||||
let directory = std::env::args().nth(1).expect("probe OUTPUT_DIRECTORY");
|
||||
let out = Path::new(&directory);
|
||||
fs::create_dir_all(out).unwrap();
|
||||
let p = initial();
|
||||
write(&p, out, "boundary-only");
|
||||
assert_eq!(
|
||||
message(&p, 43),
|
||||
message(&p, 44),
|
||||
"Only prose distinguishes the intended operations"
|
||||
);
|
||||
assert!(!references::element_references(&p.elements[&id(43)]).contains(&id(20)));
|
||||
assert!(!references::element_references(&p.elements[&id(44)]).contains(&id(21)));
|
||||
for target in [20, 30] {
|
||||
let mut invalid = p.clone();
|
||||
set_exchange(&mut invalid, 43, id(target));
|
||||
assert!(
|
||||
validate(&invalid)
|
||||
.iter()
|
||||
.any(|i| i.code == "occurrence_exchange" && i.element == Some(id(43)))
|
||||
);
|
||||
}
|
||||
let mut proposed = serde_json::to_value(message(&p, 43)).unwrap();
|
||||
proposed["Exchange"]["operation"] = serde_json::to_value(id(30)).unwrap();
|
||||
assert!(
|
||||
serde_json::from_value::<OccurrenceBody>(proposed)
|
||||
.unwrap_err()
|
||||
.to_string()
|
||||
.contains("unknown field")
|
||||
);
|
||||
let mut session = Session::new(p.clone());
|
||||
let mut reset = p.elements[&id(20)].clone();
|
||||
reset.name = "EmergencyReset".into();
|
||||
session
|
||||
.execute(Command::EditElement(id(20), reset))
|
||||
.unwrap();
|
||||
assert_eq!(message(session.project(), 43), message(&p, 43));
|
||||
session.execute(Command::Delete(id(20))).unwrap();
|
||||
assert_eq!(message(session.project(), 43), message(&p, 43));
|
||||
assert!(session.project().elements.contains_key(&id(43)));
|
||||
valid(session.project());
|
||||
write(session.project(), out, "after-reset-deletion");
|
||||
let q = refined(&p);
|
||||
write(&q, out, "explicit-functional-refinement");
|
||||
assert_eq!(q.relations[&id(34)], p.relations[&id(34)]);
|
||||
assert_ne!(message(&q, 43), message(&q, 44));
|
||||
for n in [43, 44] {
|
||||
assert!(
|
||||
references::element_references(&q.elements[&id(n)])
|
||||
.iter()
|
||||
.any(|v| [id(80), id(81)].contains(v))
|
||||
);
|
||||
}
|
||||
println!(
|
||||
"PASS validated boundary-only model: {} elements / {} relations, two parameterless Operations",
|
||||
p.elements.len(),
|
||||
p.relations.len()
|
||||
);
|
||||
println!(
|
||||
"PASS identical typed Calls; item/allocation exchange substitutions rejected; operation DTO field rejected"
|
||||
);
|
||||
println!(
|
||||
"PASS operation rename/delete leaves intended Call's typed body unchanged; Call remains structurally valid"
|
||||
);
|
||||
println!(
|
||||
"PASS distinct FE Calls require this explicit refinement: +{} elements / +{} relations; same original boundary",
|
||||
q.elements.len() - p.elements.len(),
|
||||
q.relations.len() - p.relations.len()
|
||||
);
|
||||
println!("PASS all three complete source/JSON round trips; no production mutation");
|
||||
}
|
||||
Reference in New Issue
Block a user