Preserve native authoring evidence and compared semantic contracts
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# Current-source7 authoring probe
|
||||
|
||||
Isolated experiment owned by Codex-956atf `/root/requirements_delta`. The complete initial example is `alarm-response.arcadia`; `probe.rs` calls the existing public core. No proposed new syntax is implemented here.
|
||||
|
||||
The final run passed with no model warnings on 2026-09-11. See `probe-output.txt` and the parent design report. Generated source alternatives live in `observed/`: open `stabilized.arcadia`, `canonical.arcadia`, `renamed.arcadia` or `reparented.arcadia` individually. The split example consists of `split-entry.arcadia` plus `participants.arcadia`. The six alternatives are not one SourceBundle.
|
||||
|
||||
The split-entry snapshot retains the indentation on the blank line left by moving its participant declaration. That trailing whitespace is intentional observed source, not a hand-authored formatting requirement; preserve the snapshot's bytes when using it as evidence.
|
||||
|
||||
The reader lease used Rust 1.98.1 gnullvm and core artifact `liboa_core-6c8da57367eec642.rlib`, SHA-256 `D7EFB5F3C423FF8AF13637F53CC481502C7F317BF01E9D072F9EFD64CD954C13`. Root retains Cargo/build ownership. The temporary probe executable was removed; no target artifact was changed.
|
||||
|
||||
From the repository root, after the build owner identifies the matching artifact and grants a reader lease:
|
||||
|
||||
```powershell
|
||||
. .local\toolchain\env.ps1
|
||||
$authoringCore = (Get-Item -LiteralPath 'target\debug\deps\liboa_core-6c8da57367eec642.rlib').FullName
|
||||
$authoringDeps = Join-Path (Get-Location) 'target\debug\deps'
|
||||
$authoringProbe = Join-Path (Get-Location) 'harness\experiments\textual-authoring-20260911\probe.exe'
|
||||
rustc --edition=2024 'harness\experiments\textual-authoring-20260911\probe.rs' --extern "oa_core=$authoringCore" -L "dependency=$authoringDeps" -C linker=clang.exe -o $authoringProbe
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Probe compilation failed' }
|
||||
& $authoringProbe 'harness\experiments\textual-authoring-20260911\alarm-response.arcadia' 'harness\experiments\textual-authoring-20260911\observed-rerun'
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Probe assertions failed' }
|
||||
```
|
||||
|
||||
Each run intentionally authors a new model from omitted IDs, so regenerated UUID bytes differ across runs. Assertions test stable identity only after adopting that run's accepted bundle. The retained `observed/` snapshots are the exact final run, not deterministic UUID fixtures. The probe does not test HTTP/native UI, save recovery, performance or a new grammar.
|
||||
@@ -0,0 +1,110 @@
|
||||
arcadia 7;
|
||||
project alarm_response "Alarm response" {
|
||||
description "A complete small OA/SA source-authoring example. Numerical annotations are descriptive.";
|
||||
|
||||
oa_actor plant_operator "Plant operator" {}
|
||||
oa_entity maintenance "Maintenance team" {}
|
||||
oa_activity manage_alarm "Manage a pressure alarm" {
|
||||
oa_activity detect_alarm "Detect alarm" {}
|
||||
// Assessing the alarm is work decomposition, independently allocated below.
|
||||
oa_activity assess_alarm "Assess alarm" {}
|
||||
}
|
||||
oa_capability safe_response "Respond safely" {}
|
||||
oa_exchange_item alarm_report "Alarm report" {
|
||||
mechanism Flow;
|
||||
oa_data_field reported_pressure "Reported pressure" {
|
||||
type_ref Real;
|
||||
unit "kPa";
|
||||
}
|
||||
}
|
||||
allocation operator_detects "Operator detects" {
|
||||
source @plant_operator; target @detect_alarm;
|
||||
}
|
||||
allocation team_assesses "Team assesses" {
|
||||
source @maintenance; target @assess_alarm;
|
||||
}
|
||||
interaction alarm_message "Pressure alarm report" {
|
||||
source @detect_alarm; target @assess_alarm; items [@alarm_report];
|
||||
}
|
||||
capability_involvement assessment_supports_response "Assessment supports safe response" {
|
||||
source @assess_alarm; target @safe_response;
|
||||
}
|
||||
|
||||
oa_process triage "Alarm triage" {
|
||||
steps [@detect_once, @assess_once];
|
||||
oa_occurrence detect_once "Detect this alarm" {
|
||||
body { Action { action @detect_alarm; lifeline none; }; };
|
||||
}
|
||||
oa_occurrence assess_once "Assess this alarm" {
|
||||
body { Action { action @assess_alarm; lifeline none; }; };
|
||||
}
|
||||
}
|
||||
sequence_link assessment_after_detection "Assess after detecting" {
|
||||
source @detect_once; target @assess_once;
|
||||
}
|
||||
chain_involvement triage_supports_response "Triage supports safe response" {
|
||||
source @triage; target @safe_response;
|
||||
}
|
||||
|
||||
oa_scenario notification "Alarm notification" {
|
||||
viewpoint OperationalActivity;
|
||||
context @safe_response;
|
||||
steps [@notify_once];
|
||||
oa_lifeline detector_line "Detector" { represented @detect_alarm; }
|
||||
oa_lifeline assessor_line "Assessor" { represented @assess_alarm; }
|
||||
oa_occurrence notify_once "Report this pressure" {
|
||||
body { Exchange {
|
||||
exchange @alarm_message; sender @detector_line; receiver @assessor_line;
|
||||
message_kind Asynchronous; reply_to none;
|
||||
values [{ field @reported_pressure; path []; expression "420"; }];
|
||||
}; };
|
||||
}
|
||||
}
|
||||
|
||||
sa_system alarm_console "Alarm console" {
|
||||
sa_state_machine console_status "Console status" {
|
||||
sa_region console_region "Main region" {
|
||||
sa_initial console_start "Start" {}
|
||||
sa_state console_ready "Ready" {}
|
||||
sa_state console_alerting "Alerting" {}
|
||||
}
|
||||
}
|
||||
}
|
||||
sa_function classify_alarm "Classify alarm" {}
|
||||
sa_functional_chain classification_flow "Alarm classification" {
|
||||
steps [@classify_once];
|
||||
sa_occurrence classify_once "Classify this alarm" {
|
||||
body { Action { action @classify_alarm; lifeline none; }; };
|
||||
}
|
||||
}
|
||||
allocation console_classifies "Console classifies" {
|
||||
source @alarm_console; target @classify_alarm;
|
||||
}
|
||||
sa_event alarm_received "Alarm received" {}
|
||||
state_transition initialize_console "Initialize" {
|
||||
source @console_start; target @console_ready;
|
||||
}
|
||||
state_transition display_alarm "Display alarm" {
|
||||
source @console_ready; target @console_alerting; triggers [@alarm_received];
|
||||
}
|
||||
trace assessment_refinement "Alarm classification refines assessment" {
|
||||
oa @assess_alarm; sa @classify_alarm;
|
||||
baseline {
|
||||
oa { name "Assess alarm"; description ""; };
|
||||
sa { name "Classify alarm"; description ""; };
|
||||
};
|
||||
}
|
||||
artifact response_procedure "Response procedure" {
|
||||
owner @assess_alarm; uri "procedures/alarm-response.md"; revision "review-1";
|
||||
}
|
||||
|
||||
diagram response_view "Operational work" { projection FunctionalDataflow; }
|
||||
node detector_card {
|
||||
diagram @response_view; element @detect_alarm;
|
||||
position { x 40; y 40; };
|
||||
}
|
||||
node assessor_card {
|
||||
diagram @response_view; element @assess_alarm;
|
||||
position { x 400; y 40; };
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,344 @@
|
||||
arcadia 7;
|
||||
project alarm_response "Alarm response" id "a0f5c4c2-f39c-4095-9816-71f1862e24d8" {
|
||||
description "A complete small OA/SA source-authoring example. Numerical annotations are descriptive.";
|
||||
|
||||
oa_exchange_item alarm_report "Alarm report" id "0a48a460-964a-4578-97c4-428707e8b201" {
|
||||
description "";
|
||||
kind Information;
|
||||
mechanism Flow;
|
||||
parent none;
|
||||
supertype none;
|
||||
}
|
||||
|
||||
oa_data_field reported_pressure "Reported pressure" id "0bf7f442-cc8d-4782-ba65-f357e91fd477" {
|
||||
default none;
|
||||
description "";
|
||||
direction Unspecified;
|
||||
maximum 1;
|
||||
minimum 1;
|
||||
parent @alarm_report;
|
||||
storage Value;
|
||||
type_ref Real;
|
||||
unit "kPa";
|
||||
}
|
||||
|
||||
oa_lifeline assessor_line "Assessor" id "1b421446-9d17-4c8b-90f1-6fbe8b513a04" {
|
||||
description "";
|
||||
parent @notification;
|
||||
represented @assess_alarm;
|
||||
}
|
||||
|
||||
oa_activity manage_alarm "Manage a pressure alarm" id "4154bf39-9fd5-490e-aebf-fba3d67b697c" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_state console_alerting "Alerting" id "4d167878-2bbe-4acd-abd6-ee7dcd42ec50" {
|
||||
description "";
|
||||
do_activity "";
|
||||
entry "";
|
||||
exit "";
|
||||
kind State;
|
||||
parent @console_region;
|
||||
}
|
||||
|
||||
oa_occurrence assess_once "Assess this alarm" id "528d1c78-62d9-4e45-bb4a-cf529d8ed4a9" {
|
||||
body {
|
||||
Action {
|
||||
action @assess_alarm;
|
||||
lifeline none;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @triage;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_functional_chain classification_flow "Alarm classification" id "578dbcd5-3c28-43d8-913e-af27bc51ebde" {
|
||||
description "";
|
||||
parent none;
|
||||
steps [@classify_once];
|
||||
}
|
||||
|
||||
oa_lifeline detector_line "Detector" id "57c62024-6d19-4818-ac8c-66fb4a9b3da7" {
|
||||
description "";
|
||||
parent @notification;
|
||||
represented @detect_alarm;
|
||||
}
|
||||
|
||||
sa_initial console_start "Start" id "5a92c3a8-6af5-452a-849e-c2a17dc33260" {
|
||||
description "";
|
||||
do_activity "";
|
||||
entry "";
|
||||
exit "";
|
||||
kind Initial;
|
||||
parent @console_region;
|
||||
}
|
||||
|
||||
oa_actor plant_operator "Plant operator" id "60539571-2921-4e7d-ab83-bae670d0cb15" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
oa_scenario notification "Alarm notification" id "69e23f04-7bb3-4db1-a2a3-d8e65101c546" {
|
||||
context @safe_response;
|
||||
description "";
|
||||
parent none;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
steps [@notify_once];
|
||||
viewpoint OperationalActivity;
|
||||
}
|
||||
|
||||
oa_entity maintenance "Maintenance team" id "6af96577-1b04-4ba1-b91b-6cef61adc6d6" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
oa_occurrence detect_once "Detect this alarm" id "6ca87cbe-9579-49b3-884e-e6ee63ba8c5b" {
|
||||
body {
|
||||
Action {
|
||||
action @detect_alarm;
|
||||
lifeline none;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @triage;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_event alarm_received "Alarm received" id "7fba860a-721f-4da2-8315-010de2e9c69e" {
|
||||
body {
|
||||
Signal {
|
||||
items [];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
oa_activity assess_alarm "Assess alarm" id "8cbd5a4f-1c31-49c9-8a01-987144ce962e" {
|
||||
description "";
|
||||
parent @manage_alarm;
|
||||
}
|
||||
|
||||
sa_state console_ready "Ready" id "9064a197-96ea-4bdf-9dd6-2e9ef66856d8" {
|
||||
description "";
|
||||
do_activity "";
|
||||
entry "";
|
||||
exit "";
|
||||
kind State;
|
||||
parent @console_region;
|
||||
}
|
||||
|
||||
oa_process triage "Alarm triage" id "9888d781-09f3-4861-b9dc-7a97080d24d6" {
|
||||
description "";
|
||||
parent none;
|
||||
steps [@detect_once, @assess_once];
|
||||
}
|
||||
|
||||
sa_system alarm_console "Alarm console" id "9ea585b5-be12-4204-8909-02ea9bed49f0" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
oa_occurrence notify_once "Report this pressure" id "a1c37b31-41ed-4e16-a243-a50702ff1bc1" {
|
||||
body {
|
||||
Exchange {
|
||||
exchange @alarm_message;
|
||||
message_kind Asynchronous;
|
||||
receiver @assessor_line;
|
||||
reply_to none;
|
||||
sender @detector_line;
|
||||
values [{
|
||||
expression "420";
|
||||
field @reported_pressure;
|
||||
path [];
|
||||
}];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @notification;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_occurrence classify_once "Classify this alarm" id "a6c37863-8e72-44f9-a8a3-fea06341c714" {
|
||||
body {
|
||||
Action {
|
||||
action @classify_alarm;
|
||||
lifeline none;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @classification_flow;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_state_machine console_status "Console status" id "a6c6f463-5c80-4b02-a2e6-67cd0088b2f2" {
|
||||
description "";
|
||||
parent @alarm_console;
|
||||
}
|
||||
|
||||
sa_function classify_alarm "Classify alarm" id "ad6941ee-f900-4a2b-a368-d8879f1ffece" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
oa_activity detect_alarm "Detect alarm" id "bf9e9d8a-edb2-47f4-93f9-7ae373c42160" {
|
||||
description "";
|
||||
parent @manage_alarm;
|
||||
}
|
||||
|
||||
oa_capability safe_response "Respond safely" id "c097b1b5-45dc-49de-bcf6-89b5ccb752d1" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_region console_region "Main region" id "e8b62edc-2233-4ec4-a811-2e8baf81a6e9" {
|
||||
description "";
|
||||
parent @console_status;
|
||||
}
|
||||
|
||||
interaction alarm_message "Pressure alarm report" id "269e5bdd-2478-4a43-9c77-84d99ac4e8a6" {
|
||||
description "";
|
||||
items [@alarm_report];
|
||||
source @detect_alarm;
|
||||
target @assess_alarm;
|
||||
}
|
||||
|
||||
capability_involvement assessment_supports_response "Assessment supports safe response" id "27633a6d-d962-4d19-9367-9ca3f00de0b0" {
|
||||
description "";
|
||||
source @assess_alarm;
|
||||
target @safe_response;
|
||||
}
|
||||
|
||||
allocation console_classifies "Console classifies" id "294d4262-303f-41db-b01e-fe47c1647693" {
|
||||
description "";
|
||||
source @alarm_console;
|
||||
target @classify_alarm;
|
||||
}
|
||||
|
||||
chain_involvement triage_supports_response "Triage supports safe response" id "2aeba184-bf69-49c7-87ff-cc2da82b006c" {
|
||||
description "";
|
||||
source @triage;
|
||||
target @safe_response;
|
||||
}
|
||||
|
||||
state_transition initialize_console "Initialize" id "839d4359-c78f-414b-867e-5b40b1f145cc" {
|
||||
description "";
|
||||
effect "";
|
||||
effects [];
|
||||
guard "";
|
||||
source @console_start;
|
||||
target @console_ready;
|
||||
transition_kind External;
|
||||
trigger "";
|
||||
triggers [];
|
||||
}
|
||||
|
||||
allocation operator_detects "Operator detects" id "8653fb7d-529d-495d-abde-897dee36b4bb" {
|
||||
description "";
|
||||
source @plant_operator;
|
||||
target @detect_alarm;
|
||||
}
|
||||
|
||||
allocation team_assesses "Team assesses" id "bb36afbf-9878-401b-b172-d04b08ecf603" {
|
||||
description "";
|
||||
source @maintenance;
|
||||
target @assess_alarm;
|
||||
}
|
||||
|
||||
sequence_link assessment_after_detection "Assess after detecting" id "bfd9c0e7-832b-4983-90aa-fc37d23193e2" {
|
||||
description "";
|
||||
guard "";
|
||||
source @detect_once;
|
||||
target @assess_once;
|
||||
}
|
||||
|
||||
state_transition display_alarm "Display alarm" id "dd383165-1b89-46b9-8ae3-80a6b6406a4e" {
|
||||
description "";
|
||||
effect "";
|
||||
effects [];
|
||||
guard "";
|
||||
source @console_ready;
|
||||
target @console_alerting;
|
||||
transition_kind External;
|
||||
trigger "";
|
||||
triggers [@alarm_received];
|
||||
}
|
||||
|
||||
diagram response_view "Operational work" id "a44d9d69-78a0-49de-8eb8-3757aa6c0919" {
|
||||
description "";
|
||||
layer Oa;
|
||||
projection FunctionalDataflow;
|
||||
routes [];
|
||||
view_options {
|
||||
coverage "All";
|
||||
exchange_labels "Name";
|
||||
hidden_edges [];
|
||||
participant_categories "All";
|
||||
relation_kinds "All";
|
||||
work_categories "All";
|
||||
work_contexts "All";
|
||||
};
|
||||
}
|
||||
|
||||
node detector_card id "45f016f4-3558-45b9-9559-da8ef9d5dcad" {
|
||||
collapsed false;
|
||||
diagram @response_view;
|
||||
element @detect_alarm;
|
||||
position {
|
||||
x 40.0;
|
||||
y 40.0;
|
||||
};
|
||||
size {
|
||||
height 94.0;
|
||||
width 224.0;
|
||||
};
|
||||
}
|
||||
|
||||
node assessor_card id "6ee7a0cc-013b-4a0f-8cff-513872e028b7" {
|
||||
collapsed false;
|
||||
diagram @response_view;
|
||||
element @assess_alarm;
|
||||
position {
|
||||
x 400.0;
|
||||
y 40.0;
|
||||
};
|
||||
size {
|
||||
height 94.0;
|
||||
width 224.0;
|
||||
};
|
||||
}
|
||||
|
||||
artifact response_procedure "Response procedure" id "6ba54037-c6f1-495b-ba96-6f2e910a218c" {
|
||||
description "";
|
||||
fragment none;
|
||||
owner @assess_alarm;
|
||||
relation References;
|
||||
revision "review-1";
|
||||
uri "procedures/alarm-response.md";
|
||||
}
|
||||
|
||||
trace assessment_refinement "Alarm classification refines assessment" id "34142333-67c2-4972-a64f-47e140ed93ca" {
|
||||
baseline {
|
||||
oa {
|
||||
description "";
|
||||
name "Assess alarm";
|
||||
};
|
||||
sa {
|
||||
description "";
|
||||
name "Classify alarm";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Refinement;
|
||||
oa @assess_alarm;
|
||||
sa @classify_alarm;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
oa_actor plant_operator "Plant operator" id "60539571-2921-4e7d-ab83-bae670d0cb15" {}
|
||||
@@ -0,0 +1,110 @@
|
||||
arcadia 7;
|
||||
project alarm_response "Alarm response" id "a0f5c4c2-f39c-4095-9816-71f1862e24d8" {
|
||||
description "A complete small OA/SA source-authoring example. Numerical annotations are descriptive.";
|
||||
|
||||
oa_actor plant_operator "Plant operator" id "60539571-2921-4e7d-ab83-bae670d0cb15" {}
|
||||
oa_entity maintenance "Maintenance team" id "6af96577-1b04-4ba1-b91b-6cef61adc6d6" {}
|
||||
oa_activity manage_alarm "Manage a pressure alarm" id "4154bf39-9fd5-490e-aebf-fba3d67b697c" {
|
||||
oa_activity detect_alarm "Detect alarm" id "bf9e9d8a-edb2-47f4-93f9-7ae373c42160" {}
|
||||
// Assessing the alarm is work decomposition, independently allocated below.
|
||||
oa_activity review_alarm "Assess alarm" id "8cbd5a4f-1c31-49c9-8a01-987144ce962e" {}
|
||||
}
|
||||
oa_capability safe_response "Respond safely" id "c097b1b5-45dc-49de-bcf6-89b5ccb752d1" {}
|
||||
oa_exchange_item alarm_report "Alarm report" id "0a48a460-964a-4578-97c4-428707e8b201" {
|
||||
mechanism Flow;
|
||||
oa_data_field reported_pressure "Reported pressure" id "0bf7f442-cc8d-4782-ba65-f357e91fd477" {
|
||||
type_ref Real;
|
||||
unit "kPa";
|
||||
}
|
||||
}
|
||||
allocation operator_detects "Operator detects" id "8653fb7d-529d-495d-abde-897dee36b4bb" {
|
||||
source @plant_operator; target @detect_alarm;
|
||||
}
|
||||
allocation team_assesses "Team assesses" id "bb36afbf-9878-401b-b172-d04b08ecf603" {
|
||||
source @maintenance; target @review_alarm;
|
||||
}
|
||||
interaction alarm_message "Pressure alarm report" id "269e5bdd-2478-4a43-9c77-84d99ac4e8a6" {
|
||||
source @detect_alarm; target @review_alarm; items [@alarm_report];
|
||||
}
|
||||
capability_involvement assessment_supports_response "Assessment supports safe response" id "27633a6d-d962-4d19-9367-9ca3f00de0b0" {
|
||||
source @review_alarm; target @safe_response;
|
||||
}
|
||||
|
||||
oa_process triage "Alarm triage" id "9888d781-09f3-4861-b9dc-7a97080d24d6" {
|
||||
steps [@detect_once, @assess_once];
|
||||
oa_occurrence detect_once "Detect this alarm" id "6ca87cbe-9579-49b3-884e-e6ee63ba8c5b" {
|
||||
body { Action { action @detect_alarm; lifeline none; }; };
|
||||
}
|
||||
oa_occurrence assess_once "Assess this alarm" id "528d1c78-62d9-4e45-bb4a-cf529d8ed4a9" {
|
||||
body { Action { action @review_alarm; lifeline none; }; };
|
||||
}
|
||||
}
|
||||
sequence_link assessment_after_detection "Assess after detecting" id "bfd9c0e7-832b-4983-90aa-fc37d23193e2" {
|
||||
source @detect_once; target @assess_once;
|
||||
}
|
||||
chain_involvement triage_supports_response "Triage supports safe response" id "2aeba184-bf69-49c7-87ff-cc2da82b006c" {
|
||||
source @triage; target @safe_response;
|
||||
}
|
||||
|
||||
oa_scenario notification "Alarm notification" id "69e23f04-7bb3-4db1-a2a3-d8e65101c546" {
|
||||
viewpoint OperationalActivity;
|
||||
context @safe_response;
|
||||
steps [@notify_once];
|
||||
oa_lifeline detector_line "Detector" id "57c62024-6d19-4818-ac8c-66fb4a9b3da7" { represented @detect_alarm; }
|
||||
oa_lifeline assessor_line "Assessor" id "1b421446-9d17-4c8b-90f1-6fbe8b513a04" { represented @review_alarm; }
|
||||
oa_occurrence notify_once "Report this pressure" id "a1c37b31-41ed-4e16-a243-a50702ff1bc1" {
|
||||
body { Exchange {
|
||||
exchange @alarm_message; sender @detector_line; receiver @assessor_line;
|
||||
message_kind Asynchronous; reply_to none;
|
||||
values [{ field @reported_pressure; path []; expression "420"; }];
|
||||
}; };
|
||||
}
|
||||
}
|
||||
|
||||
sa_system alarm_console "Alarm console" id "9ea585b5-be12-4204-8909-02ea9bed49f0" {
|
||||
sa_state_machine console_status "Console status" id "a6c6f463-5c80-4b02-a2e6-67cd0088b2f2" {
|
||||
sa_region console_region "Main region" id "e8b62edc-2233-4ec4-a811-2e8baf81a6e9" {
|
||||
sa_initial console_start "Start" id "5a92c3a8-6af5-452a-849e-c2a17dc33260" {}
|
||||
sa_state console_ready "Ready" id "9064a197-96ea-4bdf-9dd6-2e9ef66856d8" {}
|
||||
sa_state console_alerting "Alerting" id "4d167878-2bbe-4acd-abd6-ee7dcd42ec50" {}
|
||||
}
|
||||
}
|
||||
}
|
||||
sa_function classify_alarm "Classify alarm" id "ad6941ee-f900-4a2b-a368-d8879f1ffece" {}
|
||||
sa_functional_chain classification_flow "Alarm classification" id "578dbcd5-3c28-43d8-913e-af27bc51ebde" {
|
||||
steps [@classify_once];
|
||||
sa_occurrence classify_once "Classify this alarm" id "a6c37863-8e72-44f9-a8a3-fea06341c714" {
|
||||
body { Action { action @classify_alarm; lifeline none; }; };
|
||||
}
|
||||
}
|
||||
allocation console_classifies "Console classifies" id "294d4262-303f-41db-b01e-fe47c1647693" {
|
||||
source @alarm_console; target @classify_alarm;
|
||||
}
|
||||
sa_event alarm_received "Alarm received" id "7fba860a-721f-4da2-8315-010de2e9c69e" {}
|
||||
state_transition initialize_console "Initialize" id "839d4359-c78f-414b-867e-5b40b1f145cc" {
|
||||
source @console_start; target @console_ready;
|
||||
}
|
||||
state_transition display_alarm "Display alarm" id "dd383165-1b89-46b9-8ae3-80a6b6406a4e" {
|
||||
source @console_ready; target @console_alerting; triggers [@alarm_received];
|
||||
}
|
||||
trace assessment_refinement "Alarm classification refines assessment" id "34142333-67c2-4972-a64f-47e140ed93ca" {
|
||||
oa @review_alarm; sa @classify_alarm;
|
||||
baseline {
|
||||
oa { name "Assess alarm"; description ""; };
|
||||
sa { name "Classify alarm"; description ""; };
|
||||
};
|
||||
}
|
||||
artifact response_procedure "Response procedure" id "6ba54037-c6f1-495b-ba96-6f2e910a218c" {
|
||||
owner @review_alarm; uri "procedures/alarm-response.md"; revision "review-1";
|
||||
}
|
||||
|
||||
diagram response_view "Operational work" id "a44d9d69-78a0-49de-8eb8-3757aa6c0919" { projection FunctionalDataflow; }
|
||||
node detector_card id "45f016f4-3558-45b9-9559-da8ef9d5dcad" {
|
||||
diagram @response_view; element @detect_alarm;
|
||||
position { x 40; y 40; };
|
||||
}
|
||||
node assessor_card id "6ee7a0cc-013b-4a0f-8cff-513872e028b7" {
|
||||
diagram @response_view; element @review_alarm;
|
||||
position { x 400; y 40; };
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
arcadia 7;
|
||||
project alarm_response "Alarm response" id "a0f5c4c2-f39c-4095-9816-71f1862e24d8" {
|
||||
description "A complete small OA/SA source-authoring example. Numerical annotations are descriptive.";
|
||||
|
||||
oa_actor plant_operator "Plant operator" id "60539571-2921-4e7d-ab83-bae670d0cb15" {}
|
||||
oa_entity maintenance "Maintenance team" id "6af96577-1b04-4ba1-b91b-6cef61adc6d6" {}
|
||||
oa_activity manage_alarm "Manage a pressure alarm" id "4154bf39-9fd5-490e-aebf-fba3d67b697c" {
|
||||
oa_activity detect_alarm "Detect alarm" id "bf9e9d8a-edb2-47f4-93f9-7ae373c42160" {}
|
||||
|
||||
|
||||
|
||||
}
|
||||
oa_capability safe_response "Respond safely" id "c097b1b5-45dc-49de-bcf6-89b5ccb752d1" {}
|
||||
oa_exchange_item alarm_report "Alarm report" id "0a48a460-964a-4578-97c4-428707e8b201" {
|
||||
mechanism Flow;
|
||||
oa_data_field reported_pressure "Reported pressure" id "0bf7f442-cc8d-4782-ba65-f357e91fd477" {
|
||||
type_ref Real;
|
||||
unit "kPa";
|
||||
}
|
||||
}
|
||||
allocation operator_detects "Operator detects" id "8653fb7d-529d-495d-abde-897dee36b4bb" {
|
||||
source @plant_operator; target @detect_alarm;
|
||||
}
|
||||
allocation team_assesses "Team assesses" id "bb36afbf-9878-401b-b172-d04b08ecf603" {
|
||||
source @maintenance; target @assess_alarm;
|
||||
}
|
||||
interaction alarm_message "Pressure alarm report" id "269e5bdd-2478-4a43-9c77-84d99ac4e8a6" {
|
||||
source @detect_alarm; target @assess_alarm; items [@alarm_report];
|
||||
}
|
||||
capability_involvement assessment_supports_response "Assessment supports safe response" id "27633a6d-d962-4d19-9367-9ca3f00de0b0" {
|
||||
source @assess_alarm; target @safe_response;
|
||||
}
|
||||
|
||||
oa_process triage "Alarm triage" id "9888d781-09f3-4861-b9dc-7a97080d24d6" {
|
||||
steps [@detect_once, @assess_once];
|
||||
oa_occurrence detect_once "Detect this alarm" id "6ca87cbe-9579-49b3-884e-e6ee63ba8c5b" {
|
||||
body { Action { action @detect_alarm; lifeline none; }; };
|
||||
}
|
||||
oa_occurrence assess_once "Assess this alarm" id "528d1c78-62d9-4e45-bb4a-cf529d8ed4a9" {
|
||||
body { Action { action @assess_alarm; lifeline none; }; };
|
||||
}
|
||||
}
|
||||
sequence_link assessment_after_detection "Assess after detecting" id "bfd9c0e7-832b-4983-90aa-fc37d23193e2" {
|
||||
source @detect_once; target @assess_once;
|
||||
}
|
||||
chain_involvement triage_supports_response "Triage supports safe response" id "2aeba184-bf69-49c7-87ff-cc2da82b006c" {
|
||||
source @triage; target @safe_response;
|
||||
}
|
||||
|
||||
oa_scenario notification "Alarm notification" id "69e23f04-7bb3-4db1-a2a3-d8e65101c546" {
|
||||
viewpoint OperationalActivity;
|
||||
context @safe_response;
|
||||
steps [@notify_once];
|
||||
oa_lifeline detector_line "Detector" id "57c62024-6d19-4818-ac8c-66fb4a9b3da7" { represented @detect_alarm; }
|
||||
oa_lifeline assessor_line "Assessor" id "1b421446-9d17-4c8b-90f1-6fbe8b513a04" { represented @assess_alarm; }
|
||||
oa_occurrence notify_once "Report this pressure" id "a1c37b31-41ed-4e16-a243-a50702ff1bc1" {
|
||||
body { Exchange {
|
||||
exchange @alarm_message; sender @detector_line; receiver @assessor_line;
|
||||
message_kind Asynchronous; reply_to none;
|
||||
values [{ field @reported_pressure; path []; expression "420"; }];
|
||||
}; };
|
||||
}
|
||||
}
|
||||
|
||||
sa_system alarm_console "Alarm console" id "9ea585b5-be12-4204-8909-02ea9bed49f0" {
|
||||
sa_state_machine console_status "Console status" id "a6c6f463-5c80-4b02-a2e6-67cd0088b2f2" {
|
||||
sa_region console_region "Main region" id "e8b62edc-2233-4ec4-a811-2e8baf81a6e9" {
|
||||
sa_initial console_start "Start" id "5a92c3a8-6af5-452a-849e-c2a17dc33260" {}
|
||||
sa_state console_ready "Ready" id "9064a197-96ea-4bdf-9dd6-2e9ef66856d8" {}
|
||||
sa_state console_alerting "Alerting" id "4d167878-2bbe-4acd-abd6-ee7dcd42ec50" {}
|
||||
}
|
||||
}
|
||||
}
|
||||
sa_function classify_alarm "Classify alarm" id "ad6941ee-f900-4a2b-a368-d8879f1ffece" {}
|
||||
sa_functional_chain classification_flow "Alarm classification" id "578dbcd5-3c28-43d8-913e-af27bc51ebde" {
|
||||
steps [@classify_once];
|
||||
sa_occurrence classify_once "Classify this alarm" id "a6c37863-8e72-44f9-a8a3-fea06341c714" {
|
||||
body { Action { action @classify_alarm; lifeline none; }; };
|
||||
}
|
||||
}
|
||||
allocation console_classifies "Console classifies" id "294d4262-303f-41db-b01e-fe47c1647693" {
|
||||
source @alarm_console; target @classify_alarm;
|
||||
}
|
||||
sa_event alarm_received "Alarm received" id "7fba860a-721f-4da2-8315-010de2e9c69e" {}
|
||||
state_transition initialize_console "Initialize" id "839d4359-c78f-414b-867e-5b40b1f145cc" {
|
||||
source @console_start; target @console_ready;
|
||||
}
|
||||
state_transition display_alarm "Display alarm" id "dd383165-1b89-46b9-8ae3-80a6b6406a4e" {
|
||||
source @console_ready; target @console_alerting; triggers [@alarm_received];
|
||||
}
|
||||
trace assessment_refinement "Alarm classification refines assessment" id "34142333-67c2-4972-a64f-47e140ed93ca" {
|
||||
oa @assess_alarm; sa @classify_alarm;
|
||||
baseline {
|
||||
oa { name "Assess alarm"; description ""; };
|
||||
sa { name "Classify alarm"; description ""; };
|
||||
};
|
||||
}
|
||||
artifact response_procedure "Response procedure" id "6ba54037-c6f1-495b-ba96-6f2e910a218c" {
|
||||
owner @assess_alarm; uri "procedures/alarm-response.md"; revision "review-1";
|
||||
}
|
||||
|
||||
diagram response_view "Operational work" id "a44d9d69-78a0-49de-8eb8-3757aa6c0919" { projection FunctionalDataflow; }
|
||||
node detector_card id "45f016f4-3558-45b9-9559-da8ef9d5dcad" {
|
||||
diagram @response_view; element @detect_alarm;
|
||||
position { x 40; y 40; };
|
||||
}
|
||||
node assessor_card id "6ee7a0cc-013b-4a0f-8cff-513872e028b7" {
|
||||
diagram @response_view; element @assess_alarm;
|
||||
position { x 400; y 40; };
|
||||
}
|
||||
|
||||
// Assessing the alarm is work decomposition, independently allocated below.
|
||||
oa_activity assess_alarm "Assess alarm" id "8cbd5a4f-1c31-49c9-8a01-987144ce962e" {}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
arcadia 7;
|
||||
project alarm_response "Alarm response" id "a0f5c4c2-f39c-4095-9816-71f1862e24d8" {
|
||||
description "A complete small OA/SA source-authoring example. Numerical annotations are descriptive.";
|
||||
|
||||
|
||||
oa_entity maintenance "Maintenance team" id "6af96577-1b04-4ba1-b91b-6cef61adc6d6" {}
|
||||
oa_activity manage_alarm "Manage a pressure alarm" id "4154bf39-9fd5-490e-aebf-fba3d67b697c" {
|
||||
oa_activity detect_alarm "Detect alarm" id "bf9e9d8a-edb2-47f4-93f9-7ae373c42160" {}
|
||||
// Assessing the alarm is work decomposition, independently allocated below.
|
||||
oa_activity assess_alarm "Assess alarm" id "8cbd5a4f-1c31-49c9-8a01-987144ce962e" {}
|
||||
}
|
||||
oa_capability safe_response "Respond safely" id "c097b1b5-45dc-49de-bcf6-89b5ccb752d1" {}
|
||||
oa_exchange_item alarm_report "Alarm report" id "0a48a460-964a-4578-97c4-428707e8b201" {
|
||||
mechanism Flow;
|
||||
oa_data_field reported_pressure "Reported pressure" id "0bf7f442-cc8d-4782-ba65-f357e91fd477" {
|
||||
type_ref Real;
|
||||
unit "kPa";
|
||||
}
|
||||
}
|
||||
allocation operator_detects "Operator detects" id "8653fb7d-529d-495d-abde-897dee36b4bb" {
|
||||
source @plant_operator; target @detect_alarm;
|
||||
}
|
||||
allocation team_assesses "Team assesses" id "bb36afbf-9878-401b-b172-d04b08ecf603" {
|
||||
source @maintenance; target @assess_alarm;
|
||||
}
|
||||
interaction alarm_message "Pressure alarm report" id "269e5bdd-2478-4a43-9c77-84d99ac4e8a6" {
|
||||
source @detect_alarm; target @assess_alarm; items [@alarm_report];
|
||||
}
|
||||
capability_involvement assessment_supports_response "Assessment supports safe response" id "27633a6d-d962-4d19-9367-9ca3f00de0b0" {
|
||||
source @assess_alarm; target @safe_response;
|
||||
}
|
||||
|
||||
oa_process triage "Alarm triage" id "9888d781-09f3-4861-b9dc-7a97080d24d6" {
|
||||
steps [@detect_once, @assess_once];
|
||||
oa_occurrence detect_once "Detect this alarm" id "6ca87cbe-9579-49b3-884e-e6ee63ba8c5b" {
|
||||
body { Action { action @detect_alarm; lifeline none; }; };
|
||||
}
|
||||
oa_occurrence assess_once "Assess this alarm" id "528d1c78-62d9-4e45-bb4a-cf529d8ed4a9" {
|
||||
body { Action { action @assess_alarm; lifeline none; }; };
|
||||
}
|
||||
}
|
||||
sequence_link assessment_after_detection "Assess after detecting" id "bfd9c0e7-832b-4983-90aa-fc37d23193e2" {
|
||||
source @detect_once; target @assess_once;
|
||||
}
|
||||
chain_involvement triage_supports_response "Triage supports safe response" id "2aeba184-bf69-49c7-87ff-cc2da82b006c" {
|
||||
source @triage; target @safe_response;
|
||||
}
|
||||
|
||||
oa_scenario notification "Alarm notification" id "69e23f04-7bb3-4db1-a2a3-d8e65101c546" {
|
||||
viewpoint OperationalActivity;
|
||||
context @safe_response;
|
||||
steps [@notify_once];
|
||||
oa_lifeline detector_line "Detector" id "57c62024-6d19-4818-ac8c-66fb4a9b3da7" { represented @detect_alarm; }
|
||||
oa_lifeline assessor_line "Assessor" id "1b421446-9d17-4c8b-90f1-6fbe8b513a04" { represented @assess_alarm; }
|
||||
oa_occurrence notify_once "Report this pressure" id "a1c37b31-41ed-4e16-a243-a50702ff1bc1" {
|
||||
body { Exchange {
|
||||
exchange @alarm_message; sender @detector_line; receiver @assessor_line;
|
||||
message_kind Asynchronous; reply_to none;
|
||||
values [{ field @reported_pressure; path []; expression "420"; }];
|
||||
}; };
|
||||
}
|
||||
}
|
||||
|
||||
sa_system alarm_console "Alarm console" id "9ea585b5-be12-4204-8909-02ea9bed49f0" {
|
||||
sa_state_machine console_status "Console status" id "a6c6f463-5c80-4b02-a2e6-67cd0088b2f2" {
|
||||
sa_region console_region "Main region" id "e8b62edc-2233-4ec4-a811-2e8baf81a6e9" {
|
||||
sa_initial console_start "Start" id "5a92c3a8-6af5-452a-849e-c2a17dc33260" {}
|
||||
sa_state console_ready "Ready" id "9064a197-96ea-4bdf-9dd6-2e9ef66856d8" {}
|
||||
sa_state console_alerting "Alerting" id "4d167878-2bbe-4acd-abd6-ee7dcd42ec50" {}
|
||||
}
|
||||
}
|
||||
}
|
||||
sa_function classify_alarm "Classify alarm" id "ad6941ee-f900-4a2b-a368-d8879f1ffece" {}
|
||||
sa_functional_chain classification_flow "Alarm classification" id "578dbcd5-3c28-43d8-913e-af27bc51ebde" {
|
||||
steps [@classify_once];
|
||||
sa_occurrence classify_once "Classify this alarm" id "a6c37863-8e72-44f9-a8a3-fea06341c714" {
|
||||
body { Action { action @classify_alarm; lifeline none; }; };
|
||||
}
|
||||
}
|
||||
allocation console_classifies "Console classifies" id "294d4262-303f-41db-b01e-fe47c1647693" {
|
||||
source @alarm_console; target @classify_alarm;
|
||||
}
|
||||
sa_event alarm_received "Alarm received" id "7fba860a-721f-4da2-8315-010de2e9c69e" {}
|
||||
state_transition initialize_console "Initialize" id "839d4359-c78f-414b-867e-5b40b1f145cc" {
|
||||
source @console_start; target @console_ready;
|
||||
}
|
||||
state_transition display_alarm "Display alarm" id "dd383165-1b89-46b9-8ae3-80a6b6406a4e" {
|
||||
source @console_ready; target @console_alerting; triggers [@alarm_received];
|
||||
}
|
||||
trace assessment_refinement "Alarm classification refines assessment" id "34142333-67c2-4972-a64f-47e140ed93ca" {
|
||||
oa @assess_alarm; sa @classify_alarm;
|
||||
baseline {
|
||||
oa { name "Assess alarm"; description ""; };
|
||||
sa { name "Classify alarm"; description ""; };
|
||||
};
|
||||
}
|
||||
artifact response_procedure "Response procedure" id "6ba54037-c6f1-495b-ba96-6f2e910a218c" {
|
||||
owner @assess_alarm; uri "procedures/alarm-response.md"; revision "review-1";
|
||||
}
|
||||
|
||||
diagram response_view "Operational work" id "a44d9d69-78a0-49de-8eb8-3757aa6c0919" { projection FunctionalDataflow; }
|
||||
node detector_card id "45f016f4-3558-45b9-9559-da8ef9d5dcad" {
|
||||
diagram @response_view; element @detect_alarm;
|
||||
position { x 40; y 40; };
|
||||
}
|
||||
node assessor_card id "6ee7a0cc-013b-4a0f-8cff-513872e028b7" {
|
||||
diagram @response_view; element @assess_alarm;
|
||||
position { x 400; y 40; };
|
||||
}
|
||||
include "participants.arcadia";
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
arcadia 7;
|
||||
project alarm_response "Alarm response" id "a0f5c4c2-f39c-4095-9816-71f1862e24d8" {
|
||||
description "A complete small OA/SA source-authoring example. Numerical annotations are descriptive.";
|
||||
|
||||
oa_actor plant_operator "Plant operator" id "60539571-2921-4e7d-ab83-bae670d0cb15" {}
|
||||
oa_entity maintenance "Maintenance team" id "6af96577-1b04-4ba1-b91b-6cef61adc6d6" {}
|
||||
oa_activity manage_alarm "Manage a pressure alarm" id "4154bf39-9fd5-490e-aebf-fba3d67b697c" {
|
||||
oa_activity detect_alarm "Detect alarm" id "bf9e9d8a-edb2-47f4-93f9-7ae373c42160" {}
|
||||
// Assessing the alarm is work decomposition, independently allocated below.
|
||||
oa_activity assess_alarm "Assess alarm" id "8cbd5a4f-1c31-49c9-8a01-987144ce962e" {}
|
||||
}
|
||||
oa_capability safe_response "Respond safely" id "c097b1b5-45dc-49de-bcf6-89b5ccb752d1" {}
|
||||
oa_exchange_item alarm_report "Alarm report" id "0a48a460-964a-4578-97c4-428707e8b201" {
|
||||
mechanism Flow;
|
||||
oa_data_field reported_pressure "Reported pressure" id "0bf7f442-cc8d-4782-ba65-f357e91fd477" {
|
||||
type_ref Real;
|
||||
unit "kPa";
|
||||
}
|
||||
}
|
||||
allocation operator_detects "Operator detects" id "8653fb7d-529d-495d-abde-897dee36b4bb" {
|
||||
source @plant_operator; target @detect_alarm;
|
||||
}
|
||||
allocation team_assesses "Team assesses" id "bb36afbf-9878-401b-b172-d04b08ecf603" {
|
||||
source @maintenance; target @assess_alarm;
|
||||
}
|
||||
interaction alarm_message "Pressure alarm report" id "269e5bdd-2478-4a43-9c77-84d99ac4e8a6" {
|
||||
source @detect_alarm; target @assess_alarm; items [@alarm_report];
|
||||
}
|
||||
capability_involvement assessment_supports_response "Assessment supports safe response" id "27633a6d-d962-4d19-9367-9ca3f00de0b0" {
|
||||
source @assess_alarm; target @safe_response;
|
||||
}
|
||||
|
||||
oa_process triage "Alarm triage" id "9888d781-09f3-4861-b9dc-7a97080d24d6" {
|
||||
steps [@detect_once, @assess_once];
|
||||
oa_occurrence detect_once "Detect this alarm" id "6ca87cbe-9579-49b3-884e-e6ee63ba8c5b" {
|
||||
body { Action { action @detect_alarm; lifeline none; }; };
|
||||
}
|
||||
oa_occurrence assess_once "Assess this alarm" id "528d1c78-62d9-4e45-bb4a-cf529d8ed4a9" {
|
||||
body { Action { action @assess_alarm; lifeline none; }; };
|
||||
}
|
||||
}
|
||||
sequence_link assessment_after_detection "Assess after detecting" id "bfd9c0e7-832b-4983-90aa-fc37d23193e2" {
|
||||
source @detect_once; target @assess_once;
|
||||
}
|
||||
chain_involvement triage_supports_response "Triage supports safe response" id "2aeba184-bf69-49c7-87ff-cc2da82b006c" {
|
||||
source @triage; target @safe_response;
|
||||
}
|
||||
|
||||
oa_scenario notification "Alarm notification" id "69e23f04-7bb3-4db1-a2a3-d8e65101c546" {
|
||||
viewpoint OperationalActivity;
|
||||
context @safe_response;
|
||||
steps [@notify_once];
|
||||
oa_lifeline detector_line "Detector" id "57c62024-6d19-4818-ac8c-66fb4a9b3da7" { represented @detect_alarm; }
|
||||
oa_lifeline assessor_line "Assessor" id "1b421446-9d17-4c8b-90f1-6fbe8b513a04" { represented @assess_alarm; }
|
||||
oa_occurrence notify_once "Report this pressure" id "a1c37b31-41ed-4e16-a243-a50702ff1bc1" {
|
||||
body { Exchange {
|
||||
exchange @alarm_message; sender @detector_line; receiver @assessor_line;
|
||||
message_kind Asynchronous; reply_to none;
|
||||
values [{ field @reported_pressure; path []; expression "420"; }];
|
||||
}; };
|
||||
}
|
||||
}
|
||||
|
||||
sa_system alarm_console "Alarm console" id "9ea585b5-be12-4204-8909-02ea9bed49f0" {
|
||||
sa_state_machine console_status "Console status" id "a6c6f463-5c80-4b02-a2e6-67cd0088b2f2" {
|
||||
sa_region console_region "Main region" id "e8b62edc-2233-4ec4-a811-2e8baf81a6e9" {
|
||||
sa_initial console_start "Start" id "5a92c3a8-6af5-452a-849e-c2a17dc33260" {}
|
||||
sa_state console_ready "Ready" id "9064a197-96ea-4bdf-9dd6-2e9ef66856d8" {}
|
||||
sa_state console_alerting "Alerting" id "4d167878-2bbe-4acd-abd6-ee7dcd42ec50" {}
|
||||
}
|
||||
}
|
||||
}
|
||||
sa_function classify_alarm "Classify alarm" id "ad6941ee-f900-4a2b-a368-d8879f1ffece" {}
|
||||
sa_functional_chain classification_flow "Alarm classification" id "578dbcd5-3c28-43d8-913e-af27bc51ebde" {
|
||||
steps [@classify_once];
|
||||
sa_occurrence classify_once "Classify this alarm" id "a6c37863-8e72-44f9-a8a3-fea06341c714" {
|
||||
body { Action { action @classify_alarm; lifeline none; }; };
|
||||
}
|
||||
}
|
||||
allocation console_classifies "Console classifies" id "294d4262-303f-41db-b01e-fe47c1647693" {
|
||||
source @alarm_console; target @classify_alarm;
|
||||
}
|
||||
sa_event alarm_received "Alarm received" id "7fba860a-721f-4da2-8315-010de2e9c69e" {}
|
||||
state_transition initialize_console "Initialize" id "839d4359-c78f-414b-867e-5b40b1f145cc" {
|
||||
source @console_start; target @console_ready;
|
||||
}
|
||||
state_transition display_alarm "Display alarm" id "dd383165-1b89-46b9-8ae3-80a6b6406a4e" {
|
||||
source @console_ready; target @console_alerting; triggers [@alarm_received];
|
||||
}
|
||||
trace assessment_refinement "Alarm classification refines assessment" id "34142333-67c2-4972-a64f-47e140ed93ca" {
|
||||
oa @assess_alarm; sa @classify_alarm;
|
||||
baseline {
|
||||
oa { name "Assess alarm"; description ""; };
|
||||
sa { name "Classify alarm"; description ""; };
|
||||
};
|
||||
}
|
||||
artifact response_procedure "Response procedure" id "6ba54037-c6f1-495b-ba96-6f2e910a218c" {
|
||||
owner @assess_alarm; uri "procedures/alarm-response.md"; revision "review-1";
|
||||
}
|
||||
|
||||
diagram response_view "Operational work" id "a44d9d69-78a0-49de-8eb8-3757aa6c0919" { projection FunctionalDataflow; }
|
||||
node detector_card id "45f016f4-3558-45b9-9559-da8ef9d5dcad" {
|
||||
diagram @response_view; element @detect_alarm;
|
||||
position { x 40; y 40; };
|
||||
}
|
||||
node assessor_card id "6ee7a0cc-013b-4a0f-8cff-513872e028b7" {
|
||||
diagram @response_view; element @assess_alarm;
|
||||
position { x 400; y 40; };
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
PASS: admission; stable and canonical round-trip; fresh/stable identity; raw alias rejection; command alias rewrite; nested reparent; cross-file move; source7 default probes
|
||||
objects=40 elements=25 relations=9 diagrams=1 artifacts=1 traces=1
|
||||
authored_bytes=4373 stable_bytes=6053 canonical_bytes=9710 authored_lines=110 stable_lines=110 canonical_lines=344
|
||||
warnings=[]
|
||||
@@ -0,0 +1,107 @@
|
||||
//! Isolated reader probe for root's build lease; no production dependencies added.
|
||||
//! Usage: probe.exe INPUT.arcadia OUTPUT_DIRECTORY
|
||||
use oa_core::{language, source_project::*, *};
|
||||
use std::{collections::BTreeMap, path::PathBuf};
|
||||
|
||||
fn compile(bundle: &SourceBundle) -> CompiledSourceProject {
|
||||
compile_bundle(bundle, ProjectLimits::default()).unwrap_or_else(|issues| {
|
||||
panic!("source admission failed: {issues:#?}")
|
||||
})
|
||||
}
|
||||
|
||||
fn identity(project: &Project, alias: &str) -> Id {
|
||||
project.identities().into_iter().find(|(_, name)| *name == alias).unwrap().0
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let arguments: Vec<_> = std::env::args_os().collect();
|
||||
assert_eq!(arguments.len(), 3, "expected input and isolated output directory");
|
||||
let input = std::fs::read_to_string(&arguments[1]).unwrap();
|
||||
let output = PathBuf::from(&arguments[2]);
|
||||
std::fs::create_dir_all(&output).unwrap();
|
||||
let bundle = SourceBundle {
|
||||
entry: "project.arcadia".into(),
|
||||
files: BTreeMap::from([("project.arcadia".into(), input.clone())]),
|
||||
};
|
||||
let compiled = compile(&bundle);
|
||||
let project = &compiled.decoded.project;
|
||||
assert_eq!(project.schema_version, 7);
|
||||
assert_eq!(project.identities().len(), 40);
|
||||
assert_eq!(compile(&compiled.bundle).decoded.project, *project);
|
||||
assert_eq!(compile(&compiled.bundle).bundle, compiled.bundle);
|
||||
assert_ne!(compile(&bundle).decoded.project.id, project.id);
|
||||
|
||||
let stable = &compiled.bundle.files["project.arcadia"];
|
||||
let canonical = language::format(project);
|
||||
assert_eq!(language::parse(&canonical).unwrap(), *project);
|
||||
assert_eq!(language::format(&language::parse(&canonical).unwrap()), canonical);
|
||||
assert_eq!(stable.matches(" id \"").count(), 40);
|
||||
assert!(stable.contains("// Assessing the alarm is work decomposition"));
|
||||
|
||||
let assess = identity(project, "assess_alarm");
|
||||
let mut header_only = compiled.bundle.clone();
|
||||
header_only.files.get_mut("project.arcadia").unwrap().replace_range(
|
||||
stable.find("oa_activity assess_alarm ").unwrap()
|
||||
..stable.find("oa_activity assess_alarm ").unwrap() + "oa_activity assess_alarm ".len(),
|
||||
"oa_activity review_alarm ",
|
||||
);
|
||||
assert!(compile_bundle(&header_only, ProjectLimits::default()).is_err());
|
||||
|
||||
let alias_plan = prepare_command(project, &Command::SetAlias(assess, "review_alarm".into())).unwrap();
|
||||
let aliased = update_bundle_with_identity_map(
|
||||
&compiled, &alias_plan.project, &alias_plan.identity_map, ProjectLimits::default(),
|
||||
).unwrap();
|
||||
assert_eq!(identity(&aliased.decoded.project, "review_alarm"), assess);
|
||||
assert!(!aliased.bundle.files["project.arcadia"].contains("@assess_alarm"));
|
||||
assert!(aliased.bundle.files["project.arcadia"].contains("// Assessing the alarm is work decomposition"));
|
||||
|
||||
let moved_plan = prepare_command(project, &Command::Reparent { element: assess, parent: None }).unwrap();
|
||||
let moved = update_bundle_with_identity_map(
|
||||
&compiled, &moved_plan.project, &moved_plan.identity_map, ProjectLimits::default(),
|
||||
).unwrap();
|
||||
assert_eq!(moved.decoded.project.elements[&assess].parent, None);
|
||||
assert!(moved.bundle.files["project.arcadia"].contains("// Assessing the alarm is work decomposition"));
|
||||
|
||||
let actor = identity(project, "plant_operator");
|
||||
let location = &compiled.index.declarations[&actor];
|
||||
let actor_text = &stable[location.span.start..location.span.end];
|
||||
let mut split_entry = stable.replacen(actor_text, "", 1);
|
||||
let closing = split_entry.rfind('}').unwrap();
|
||||
split_entry.insert_str(closing, " include \"participants.arcadia\";\n");
|
||||
let split = SourceBundle {
|
||||
entry: "project.arcadia".into(),
|
||||
files: BTreeMap::from([
|
||||
("project.arcadia".into(), split_entry),
|
||||
("participants.arcadia".into(), format!("{actor_text}\n")),
|
||||
]),
|
||||
};
|
||||
assert_eq!(compile(&split).decoded.project, *project);
|
||||
|
||||
let mut missing_viewpoint = compiled.bundle.clone();
|
||||
missing_viewpoint.files.insert("project.arcadia".into(), stable.replace("viewpoint OperationalActivity;", ""));
|
||||
let implicit = compile(&missing_viewpoint);
|
||||
let scenario = identity(project, "notification");
|
||||
assert!(matches!(implicit.decoded.project.elements[&scenario].body.shared(),
|
||||
Some(SharedBody::Scenario { viewpoint: ScenarioViewpoint::MixedLegacy, .. })));
|
||||
|
||||
let mut reduced_message = compiled.bundle.clone();
|
||||
reduced_message.files.insert("project.arcadia".into(), stable
|
||||
.replace("message_kind Asynchronous; reply_to none;", "")
|
||||
.replace("lifeline none;", ""));
|
||||
assert_eq!(compile(&reduced_message).decoded.project, *project);
|
||||
|
||||
std::fs::write(output.join("stabilized.arcadia"), stable).unwrap();
|
||||
std::fs::write(output.join("canonical.arcadia"), &canonical).unwrap();
|
||||
std::fs::write(output.join("renamed.arcadia"), &aliased.bundle.files["project.arcadia"]).unwrap();
|
||||
std::fs::write(output.join("reparented.arcadia"), &moved.bundle.files["project.arcadia"]).unwrap();
|
||||
std::fs::write(output.join("split-entry.arcadia"), &split.files["project.arcadia"]).unwrap();
|
||||
std::fs::write(output.join("participants.arcadia"), &split.files["participants.arcadia"]).unwrap();
|
||||
|
||||
println!("PASS: admission; stable and canonical round-trip; fresh/stable identity; raw alias rejection; command alias rewrite; nested reparent; cross-file move; source7 default probes");
|
||||
println!("objects={} elements={} relations={} diagrams={} artifacts={} traces={}",
|
||||
project.identities().len(), project.elements.len(), project.relations.len(),
|
||||
project.diagrams.len(), project.artifact_links.len(), project.traces.len());
|
||||
println!("authored_bytes={} stable_bytes={} canonical_bytes={} authored_lines={} stable_lines={} canonical_lines={}",
|
||||
input.len(), stable.len(), canonical.len(), input.lines().count(), stable.lines().count(), canonical.lines().count());
|
||||
println!("warnings={:#?}", compiled.diagnostics);
|
||||
}
|
||||
Reference in New Issue
Block a user