@memoarchitect/ontology 0.6.4 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,13 +13,19 @@ package memo_examples_gpca_pump_model_catalog_gpca_behavior_modes {
13
13
  // auto-initiate on the prescribed schedule (REQ 24), with no
14
14
  // external trigger. Mode-tree containment edges (Composes)
15
15
  // live in gpca_trace.sysml.
16
+ // Audit scope: this is a requirements-level therapy-mode abstraction, not
17
+ // a full transcription of CITE-009's monolithic Stateflow chart. The
18
+ // source chart also contains detailed Configuration, Alarms,
19
+ // System_Monitor, Log, and Infusion_Manager state behavior that remains
20
+ // outside this compact mode view.
16
21
  // ═════════════════════════════════════════════════════════════
17
22
  state topLevelModeMachine : StateMachine {
18
23
  attribute :>> id = "BM-001";
19
24
  attribute :>> name = "TopLevelModeMachine";
20
25
  attribute :>> machineKind = "hierarchical state machine";
21
26
  attribute :>> executionSemantics = "single-step synchronous; sub-modes inherit all parent-mode requirements";
22
- attribute :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §4.1 Fig 4.1";
27
+ attribute fidelityScope = "Requirements-derived therapy mode hierarchy; partial abstraction of CITE-009, not a state-for-state Stateflow transcription";
28
+ attribute :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §4.1 Fig 4.1; CITE-009: CriSys PCA Pump Software Model";
23
29
  }
24
30
 
25
31
  // ── Mode states (Fig 4.1) ───────────────────────────────────
@@ -2,6 +2,7 @@ package memo_examples_gpca_pump_model_catalog_gpca_interfaces {
2
2
  private import ScalarValues::*;
3
3
 
4
4
  private import memo_architecture_logical_interfaces::*;
5
+ private import memo_architecture_realization_physical::*;
5
6
  private import memo_architecture_functional_functions::*;
6
7
  private import memo_examples_gpca_pump_model_catalog_gpca_architecture::*;
7
8
  private import memo_examples_gpca_pump_model_catalog_gpca_behavior_subsystems::*;
@@ -572,7 +573,10 @@ package memo_examples_gpca_pump_model_catalog_gpca_interfaces {
572
573
  attribute :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.5 Hospital Pharmacy Database Interface";
573
574
  }
574
575
 
575
- // ── Device-boundary exchanges (GPCA_Device.aadl level) ─────
576
+ // ── MEMO functional-to-physical allocation abstractions ────
577
+ // These four exchanges summarize requirements-derived physical design
578
+ // intent. They are not the named port connections in GPCA_Device.aadl;
579
+ // the exact AADL feature topology is authored below and in gpca_trace.
576
580
  part exSensorVector : ComponentExchange {
577
581
  attribute :>> id = "CE-001";
578
582
  attribute :>> name = "SensorStatusVectorExchange";
@@ -584,7 +588,7 @@ package memo_examples_gpca_pump_model_catalog_gpca_interfaces {
584
588
  ref :>> allocatedExchanges = lfSensorAcquisition;
585
589
  attribute :>> direction = DirectionKind::input;
586
590
  attribute :>> timingSemantics = "immediate (same-step delivery, Communication_Properties::Timing => immediate)";
587
- attribute :>> sourceReference = "CITE-002: CriSys GPCA AADL v2.0, packages/GPCA_Device.aadl";
591
+ attribute :>> sourceReference = "MEMO design extension allocated from LF-001; not a GPCA_Device.aadl connection";
588
592
  }
589
593
  part exFlowCommand : ComponentExchange {
590
594
  attribute :>> id = "CE-002";
@@ -597,7 +601,7 @@ package memo_examples_gpca_pump_model_catalog_gpca_interfaces {
597
601
  ref :>> allocatedExchanges = lfFlowCommand;
598
602
  attribute :>> direction = DirectionKind::output;
599
603
  attribute :>> timingSemantics = "immediate (same-step delivery, Communication_Properties::Timing => immediate)";
600
- attribute :>> sourceReference = "CITE-002: CriSys GPCA AADL v2.0, packages/GPCA_Device.aadl";
604
+ attribute :>> sourceReference = "MEMO design extension allocated from LF-002; not a GPCA_Device.aadl connection";
601
605
  }
602
606
  part exAlarmAnnunciation : ComponentExchange {
603
607
  attribute :>> id = "CE-003";
@@ -610,7 +614,7 @@ package memo_examples_gpca_pump_model_catalog_gpca_interfaces {
610
614
  ref :>> allocatedExchanges = lfAlarmSignal;
611
615
  attribute :>> direction = DirectionKind::output;
612
616
  attribute :>> timingSemantics = "immediate (same-step delivery, Communication_Properties::Timing => immediate)";
613
- attribute :>> sourceReference = "CITE-002: CriSys GPCA AADL v2.0, packages/GPCA_Device.aadl";
617
+ attribute :>> sourceReference = "MEMO design extension allocated from LF-003; not a GPCA_Device.aadl connection";
614
618
  }
615
619
  part exPrescriptionEntry : ComponentExchange {
616
620
  attribute :>> id = "CE-004";
@@ -623,9 +627,34 @@ package memo_examples_gpca_pump_model_catalog_gpca_interfaces {
623
627
  ref :>> allocatedExchanges = lfPrescriptionEntry;
624
628
  attribute :>> direction = DirectionKind::input;
625
629
  attribute :>> timingSemantics = "immediate (same-step delivery, Communication_Properties::Timing => immediate)";
626
- attribute :>> sourceReference = "CITE-002: CriSys GPCA AADL v2.0, packages/GPCA_Device.aadl";
630
+ attribute :>> sourceReference = "MEMO design extension allocated from LF-004; not a GPCA_Device.aadl connection";
627
631
  }
628
632
 
633
+ // ── GPCA_Device and hardware-subsystem ports (AADL, 1:1) ───
634
+ // The published AADL hardware packages are interface wrappers: they do
635
+ // not decompose into the individual physical parts modelled elsewhere in
636
+ // this MEMO example. These features and their connections are therefore
637
+ // kept exact and separate from that extended physical design content.
638
+ part devOpCmdIn : PhysicalPort { attribute :>> id = "PORT-DEV-01"; attribute :>> name = "OP_CMD_IN"; attribute :>> direction = DirectionKind::input; attribute :>> sourceReference = "CITE-002: GPCA_Device.aadl"; }
639
+ part devDbIn : PhysicalPort { attribute :>> id = "PORT-DEV-02"; attribute :>> name = "DB_IN"; attribute :>> direction = DirectionKind::input; attribute :>> sourceReference = "CITE-002: GPCA_Device.aadl"; }
640
+ part devPresIn : PhysicalPort { attribute :>> id = "PORT-DEV-03"; attribute :>> name = "PRES_IN"; attribute :>> direction = DirectionKind::input; attribute :>> sourceReference = "CITE-002: GPCA_Device.aadl"; }
641
+ part devPatientIn : PhysicalPort { attribute :>> id = "PORT-DEV-04"; attribute :>> name = "PATIENT_IN"; attribute :>> direction = DirectionKind::input; attribute :>> sourceReference = "CITE-002: GPCA_Device.aadl"; }
642
+ part devGpcaOut : PhysicalPort { attribute :>> id = "PORT-DEV-05"; attribute :>> name = "GPCA_OUT"; attribute :>> direction = DirectionKind::output; attribute :>> sourceReference = "CITE-002: GPCA_Device.aadl"; }
643
+
644
+ part snsOpCmdIn : PhysicalPort { attribute :>> id = "PORT-SNS-01"; attribute :>> name = "OP_CMD_IN"; attribute :>> direction = DirectionKind::input; attribute :>> sourceReference = "CITE-002: GPCA_HW_Sensors.aadl"; }
645
+ part snsDbIn : PhysicalPort { attribute :>> id = "PORT-SNS-02"; attribute :>> name = "DB_IN"; attribute :>> direction = DirectionKind::input; attribute :>> sourceReference = "CITE-002: GPCA_HW_Sensors.aadl"; }
646
+ part snsPresIn : PhysicalPort { attribute :>> id = "PORT-SNS-03"; attribute :>> name = "PRES_IN"; attribute :>> direction = DirectionKind::input; attribute :>> sourceReference = "CITE-002: GPCA_HW_Sensors.aadl"; }
647
+ part snsPatientIn : PhysicalPort { attribute :>> id = "PORT-SNS-04"; attribute :>> name = "PATIENT_IN"; attribute :>> direction = DirectionKind::input; attribute :>> sourceReference = "CITE-002: GPCA_HW_Sensors.aadl"; }
648
+ part snsOpCmdOut : PhysicalPort { attribute :>> id = "PORT-SNS-05"; attribute :>> name = "OP_CMD_OUT"; attribute :>> direction = DirectionKind::output; attribute :>> sourceReference = "CITE-002: GPCA_HW_Sensors.aadl"; }
649
+ part snsPresOut : PhysicalPort { attribute :>> id = "PORT-SNS-06"; attribute :>> name = "PRES_OUT"; attribute :>> direction = DirectionKind::output; attribute :>> sourceReference = "CITE-002: GPCA_HW_Sensors.aadl"; }
650
+ part snsPatientOut : PhysicalPort { attribute :>> id = "PORT-SNS-07"; attribute :>> name = "PATIENT_OUT"; attribute :>> direction = DirectionKind::output; attribute :>> sourceReference = "CITE-002: GPCA_HW_Sensors.aadl"; }
651
+ part snsSensorOut : PhysicalPort { attribute :>> id = "PORT-SNS-08"; attribute :>> name = "SENSOR_OUT"; attribute :>> direction = DirectionKind::output; attribute :>> sourceReference = "CITE-002: GPCA_HW_Sensors.aadl"; }
652
+ part snsConstOut : PhysicalPort { attribute :>> id = "PORT-SNS-09"; attribute :>> name = "CONST_OUT"; attribute :>> direction = DirectionKind::output; attribute :>> sourceReference = "CITE-002: GPCA_HW_Sensors.aadl"; }
653
+ part snsDbOut : PhysicalPort { attribute :>> id = "PORT-SNS-10"; attribute :>> name = "DB_OUT"; attribute :>> direction = DirectionKind::output; attribute :>> sourceReference = "CITE-002: GPCA_HW_Sensors.aadl"; }
654
+
655
+ part actGpcaSwIn : PhysicalPort { attribute :>> id = "PORT-ACT-01"; attribute :>> name = "GPCA_SW_IN"; attribute :>> direction = DirectionKind::input; attribute :>> sourceReference = "CITE-002: GPCA_HW_Actuators.aadl"; }
656
+ part actGpcaOut : PhysicalPort { attribute :>> id = "PORT-ACT-02"; attribute :>> name = "GPCA_OUT"; attribute :>> direction = DirectionKind::output; attribute :>> sourceReference = "CITE-002: GPCA_HW_Actuators.aadl"; }
657
+
629
658
  // ── GPCA_SW top-level ports (AADL GPCA_SW.aadl features) ────
630
659
  part portOpCmdIn : SoftwarePort {
631
660
  attribute :>> id = "PORT-01"; attribute :>> name = "OP_CMD_IN";
@@ -71,6 +71,15 @@ package memo_examples_gpca_pump_model_catalog_gpca_risk {
71
71
  attribute :>> year = "2009";
72
72
  }
73
73
 
74
+ part citeCriSysSoftwareBehavior : Citation {
75
+ attribute :>> id = "CITE-009";
76
+ attribute :>> name = "CriSysGpcaSoftwareBehaviorModel";
77
+ attribute :>> source = "PCA Pump Software Model (Simulink/Stateflow) — University of Minnesota CriSys";
78
+ attribute :>> section = "Infusion Pump Software Model Stateflow chart";
79
+ attribute :>> uri = "https://crisys.cs.umn.edu/downloads/gpca/PCA_Pump_SoftwareModel.mdl";
80
+ attribute :>> year = "undated";
81
+ }
82
+
74
83
  // ── Shared risk matrix ───────────────────────────────────────────
75
84
  part riskMatrix : RiskMatrix {
76
85
  attribute :>> id = "RMX-001";
@@ -435,14 +435,38 @@ package memo_examples_gpca_pump_model_catalog_gpca_trace {
435
435
  connection : Composes connect parent ::> gpcaSoftware to child ::> portDbIn;
436
436
  connection : Composes connect parent ::> gpcaSoftware to child ::> portGpcaSwOut;
437
437
 
438
- // ── Device-boundary interconnect (GPCA_Device.aadl; CE-001..004,
439
- // CITE-002) — hardware ↔ software-port connection topology ──
440
- connection : ExchangesWith connect source ::> gpcaDeviceSensors to target ::> portSensorIn;
441
- connection : ExchangesWith connect source ::> portGpcaSwOut to target ::> pumpMotorAssembly;
442
- connection : ExchangesWith connect source ::> portGpcaSwOut to target ::> audibleAlarm;
443
- connection : ExchangesWith connect source ::> portGpcaSwOut to target ::> operatorDisplay;
444
- connection : ExchangesWith connect source ::> operatorKeypad to target ::> portPresIn;
445
- connection : ExchangesWith connect source ::> operatorKeypad to target ::> portOpCmdIn;
438
+ // ── Device/subsystem feature ownership (published AADL, 1:1) ──
439
+ connection : Composes connect parent ::> gpcaDevice to child ::> devOpCmdIn;
440
+ connection : Composes connect parent ::> gpcaDevice to child ::> devDbIn;
441
+ connection : Composes connect parent ::> gpcaDevice to child ::> devPresIn;
442
+ connection : Composes connect parent ::> gpcaDevice to child ::> devPatientIn;
443
+ connection : Composes connect parent ::> gpcaDevice to child ::> devGpcaOut;
444
+ connection : Composes connect parent ::> gpcaDeviceSensors to child ::> snsOpCmdIn;
445
+ connection : Composes connect parent ::> gpcaDeviceSensors to child ::> snsDbIn;
446
+ connection : Composes connect parent ::> gpcaDeviceSensors to child ::> snsPresIn;
447
+ connection : Composes connect parent ::> gpcaDeviceSensors to child ::> snsPatientIn;
448
+ connection : Composes connect parent ::> gpcaDeviceSensors to child ::> snsOpCmdOut;
449
+ connection : Composes connect parent ::> gpcaDeviceSensors to child ::> snsPresOut;
450
+ connection : Composes connect parent ::> gpcaDeviceSensors to child ::> snsPatientOut;
451
+ connection : Composes connect parent ::> gpcaDeviceSensors to child ::> snsSensorOut;
452
+ connection : Composes connect parent ::> gpcaDeviceSensors to child ::> snsConstOut;
453
+ connection : Composes connect parent ::> gpcaDeviceSensors to child ::> snsDbOut;
454
+ connection : Composes connect parent ::> gpcaActuators to child ::> actGpcaSwIn;
455
+ connection : Composes connect parent ::> gpcaActuators to child ::> actGpcaOut;
456
+
457
+ // ── GPCA_Device.Impl connections (GPCA_Device.aadl, 1:1) ──
458
+ connection : ExchangesWith connect source ::> devOpCmdIn to target ::> snsOpCmdIn;
459
+ connection : ExchangesWith connect source ::> devDbIn to target ::> snsDbIn;
460
+ connection : ExchangesWith connect source ::> devPresIn to target ::> snsPresIn;
461
+ connection : ExchangesWith connect source ::> devPatientIn to target ::> snsPatientIn;
462
+ connection : ExchangesWith connect source ::> snsOpCmdOut to target ::> portOpCmdIn;
463
+ connection : ExchangesWith connect source ::> snsPresOut to target ::> portPresIn;
464
+ connection : ExchangesWith connect source ::> snsPatientOut to target ::> portPatientIn;
465
+ connection : ExchangesWith connect source ::> snsSensorOut to target ::> portSensorIn;
466
+ connection : ExchangesWith connect source ::> snsConstOut to target ::> portConstIn;
467
+ connection : ExchangesWith connect source ::> snsDbOut to target ::> portDbIn;
468
+ connection : ExchangesWith connect source ::> portGpcaSwOut to target ::> actGpcaSwIn;
469
+ connection : ExchangesWith connect source ::> actGpcaOut to target ::> devGpcaOut;
446
470
 
447
471
  // ── Risk chains (ISO 14971, GIIP causal-tree structure) ─────
448
472
  // Categorized causes converge on each hazard (GIIP Tables 2-9
@@ -19,8 +19,8 @@ package memo_examples_gpca_pump_model_views_logical_device_interconnect_view {
19
19
  attribute :>> id = "VIEW-LOG-003";
20
20
  attribute :>> name = "GPCA_DeviceInterconnectView";
21
21
  attribute :>> title = "GPCA Device Interconnect View";
22
- attribute :>> shortDescription = "Device-level interconnection: hardware assemblies wired to the software system's boundary ports.";
23
- attribute :>> longDescription = "Interconnection-kind view of the GPCA device per GPCA_Device.aadl: sensor and actuator assemblies, the GPCA software system with its seven AADL boundary ports (OP_CMD_IN, PRES_IN, PATIENT_IN, SENSOR_IN, CONST_IN, DB_IN, GPCA_SW_OUT) pinned on its boundary, the eight software subcomponents nested inside, and the ExchangesWith connection topology (device-boundary CE-001..004 plus the GPCA_SW.Impl internal connections). Rendered through the KK-3 Interconnection view template.";
22
+ attribute :>> shortDescription = "AADL device-level interconnection: GPCA_HW_Sensors, GPCA_SW, and GPCA_HW_Actuators with their declared boundary features.";
23
+ attribute :>> longDescription = "Source-faithful interconnection view of GPCA_Device.Impl: exactly the three AADL subcomponents (GPCA_HW_Sensors, GPCA_SW, GPCA_HW_Actuators), the device and subsystem boundary ports, and the twelve declared port connections. MEMO physical-design additions such as the controller board, power sources, enclosure, and individual sensors/actuators are intentionally excluded because the published AADL v2.0 model does not declare them as GPCA_Device.Impl subcomponents. Drill into GPCA_SW to inspect its eight subcomponents and 42 internal connections; use the connection-density control to switch between bundled summary and full fidelity.";
24
24
  attribute :>> outputKind = (ViewOutputKind::diagram);
25
25
  attribute :>> presentationKind = (PresentationKind::internalDiagram);
26
26
  attribute :>> viewKind = DiagramViewKind::interconnection;
@@ -32,7 +32,7 @@ package memo_examples_gpca_pump_model_views_logical_device_interconnect_view {
32
32
  part :>> selectionQuery {
33
33
  attribute :>> id = "QRY-LOG-003";
34
34
  attribute :>> name = "GPCA_DeviceInterconnectQuery";
35
- attribute :>> includeElementKinds = ("HardwareAssembly", "SoftwareSystem", "SoftwareModule", "SoftwarePort");
35
+ attribute :>> includeElementIds = ("gpcaDevice", "gpcaDeviceSensors", "gpcaSoftware", "gpcaActuators", "devOpCmdIn", "devDbIn", "devPresIn", "devPatientIn", "devGpcaOut", "snsOpCmdIn", "snsDbIn", "snsPresIn", "snsPatientIn", "snsOpCmdOut", "snsPresOut", "snsPatientOut", "snsSensorOut", "snsConstOut", "snsDbOut", "portOpCmdIn", "portPresIn", "portPatientIn", "portSensorIn", "portConstIn", "portDbIn", "portGpcaSwOut", "actGpcaSwIn", "actGpcaOut", "tlm", "systemStatus", "alarm", "config", "infusionMgr", "systemMonitor", "logging", "outputBus");
36
36
  attribute :>> includeRelationshipKinds = ("ExchangesWith", "Composes");
37
37
  attribute :>> includeLayers = ("logical_structure", "software_structure", "interfaces");
38
38
  attribute :>> selectionExpression = "product == 'GPCA'";
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@memoarchitect/ontology",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "packageManager": "pnpm@9.15.0",
5
- "description": "MEMO \u2014 Medical Engineering Modelling Ontology. Pure SysML v2 medical-device ontology with native constraints, portable to any conformant SysML v2 tool (SysIDE, SysON, sysand).",
5
+ "description": "MEMO — Medical Engineering Modelling Ontology. Pure SysML v2 medical-device ontology with native constraints, portable to any conformant SysML v2 tool (SysIDE, SysON, sysand).",
6
6
  "scripts": {
7
7
  "build": "bash scripts/build-kpar.sh",
8
8
  "check": "bash scripts/build-kpar.sh",
@@ -19,6 +19,19 @@ package memo_rules_ontology {
19
19
  attribute predicateExpression = "acyclic(composes)";
20
20
  constraint { true }
21
21
  }
22
+ constraint def nestedPartConnectedRule {
23
+ attribute id = "AR-IBD-001";
24
+ attribute appliesTo = "MemoPart";
25
+ attribute severity = RuleSeverityKind::warning;
26
+ attribute rationaleText = "A structural part nested inside another part should expose at least one modeled interface connector. Passive or intentionally isolated parts may retain this warning with an explicit modelling rationale.";
27
+ attribute predicateExpression = "hasConnectorInComposition";
28
+ // Graph-aware structural rule, evaluated by Memo Architect's rule
29
+ // engine: it lifts port endpoints to their owning part, ignores
30
+ // composition/trace/deployment links, and includes a connected child's
31
+ // containing assemblies. The generic KerML expression evaluator cannot
32
+ // represent that transitive containment query.
33
+ constraint { true }
34
+ }
22
35
  constraint def connectorEndpointsExistRule {
23
36
  attribute id = "CR-ONT-002";
24
37
  attribute appliesTo = "ComponentExchange";
@@ -34,6 +34,7 @@ package memo_viewpoints_definitions {
34
34
 
35
35
  part def ViewSelectionQuery specializes MemoPart {
36
36
  attribute includeElementKinds : String[*];
37
+ attribute includeElementIds : String[*];
37
38
  attribute includeRelationshipKinds : String[*];
38
39
  attribute includeLayers : String[*];
39
40
  attribute includeConcerns : ConcernKind[*];
@@ -79,6 +80,7 @@ package memo_viewpoints_definitions {
79
80
 
80
81
  part def ViewInclusionRule specializes MemoPart {
81
82
  attribute includeElementKinds : String[*];
83
+ attribute includeElementIds : String[*];
82
84
  attribute includeRelationshipKinds : String[*];
83
85
  attribute includeLayers : String[*];
84
86
  attribute includeConcerns : ConcernKind[*];