Logical layer¶
The question this layer answers
How is the solution organised, before choosing a technology?
The logical layer decides which parts of the solution exist and how they interact, before committing any of them to software, electronics or mechanics. It is where the big architectural decisions are made and compared: redundancy, monitoring, isolation, and how responsibilities are grouped into components. Because it stays technology-independent, it remains stable when the implementation technology changes.
Redundancy is expressed by typed channel roles and stated independence, never by duplicating identically named components.
Namespace: memo::architecture::logical · Source: src/architecture/logical/
Key elements¶
Components. A LogicalComponent is one block of the solution. Its
componentRole says what it is: a channel, a data store, a control element, a
user interface, an external system, or generic. Its systemType says what it
will be realised in: still logical, software, or hardware. That records a
decision of this layer; it does not move the block out of the layer.
The system hierarchy. SystemOfSystems, System and Subsystem are logical
components that differ in what they may contain, so they are types rather than
role values. A system of systems is made of independently operated and managed
systems (ISO/IEC/IEEE 21841): a pump talking to a hospital infusion-management
server is one, while a pump and its own battery are not.
Channels and independence. A channel's channelRole gives its safety role:
primary, secondary, redundant, diverse, monitor, watchdog, interlock, or
independent protection. A channel that claims independence from another must be
linked to it by IndependentOf, with the basis for the claim stated.
Boundaries. An IsolationBoundary and a FaultContainmentRegion mark where
faults and trust must stop.
Interfaces and exchanges. A LogicalPort is a component's boundary feature.
A ComponentExchange is an interface def between two ports: the edge is the
path. A LogicalExchange is a typed flow between the same two ports: what
moves over the path, with its content kind (information, command, status,
measurement, alarm, configuration, energy, material, fluid, or mechanical
force). Interface is the abstract common contract; LogicalInterface, SoftwareInterface and (in realization) PhysicalInterface specialize it, one per layer, and DataInterface, and the port types
DataPort, SensorPort, CommandPort and SoftwarePort, are reusable
building blocks for these.
State. LogicalBehavior holds the states and modes of the logical solution,
kept apart from UI state and from physical configuration.
How it connects¶
Within the layer. Components connect at their ports, through an interface
(the path) and a flow (the transfer). Between an enclosing part's boundary port
and an inner part's port, use a flow if the hop has something of its own to
model, such as a delay or a protocol. Use a binding if the inner port is
simply exposed. IndependentOf links channels.
To other layers and disciplines:
- Functions are allocated to components with native
allocate. See Functional. - The implementation realises the logical design. An implementation element
is linked to the logical element it realises with
#refinement dependency, and an exchange is bound to the network medium that carries it (ConnectionBinding). See Implementation and Realization. - Requirements are satisfied by components with
satisfy. - Safety relies on channel roles and independence for its controls.
Cybersecurity's
TrustBoundarymarks where trust changes between these components. See Safety and risk and Cybersecurity.
In the running example¶
The monitor channel detects deviations independently of the measurement channel. It has its own sensing element and power rail. The detection function is allocated to it.
part chMonitor : LogicalComponent {
@MemoIdentity { :>> providedId = "TA-LC-001"; :>> label = "TemperatureMonitorChannel"; }
attribute :>> channelRole = ChannelRoleKind::monitor;
}
part chPrimary : LogicalComponent {
@MemoIdentity { :>> providedId = "TA-LC-002"; :>> label = "MeasurementChannel"; }
attribute :>> channelRole = ChannelRoleKind::primary;
}
connection : IndependentOf connect channel ::> chMonitor to otherChannel ::> chPrimary {
attribute :>> independenceBasis = "separate sensing element and power rail";
}
allocate fnDetectDeviation to chMonitor;The full inventory¶
Generated from src/architecture/logical/.
Elements¶
Interfaces
| Element | SysML kind | What it is |
|---|---|---|
InterfaceItem |
item def |
A typed thing exchanged at a boundary. Concrete items such as AlarmSignal and FlowCommand specialize this type; they are neither functions nor generic action-flow notation.… |
DataPort |
port def |
Data port definition specializing MemoPort. |
SensorPort |
port def |
Sensor port definition specializing DataPort. |
CommandPort |
port def |
Command port definition specializing DataPort. |
SoftwarePort |
port def |
Software port definition specializing MemoPort. |
Structure
| Element | SysML kind | What it is |
|---|---|---|
SystemOfSystems |
part def |
Three types rather than three role values, because they differ in what they may CONTAIN — and containment legality cannot live on an attribute. The allowed children are declared as typed part features, which is how SysML v2 already states "what may be contained".… |
System |
part def |
System definition specializing LogicalComponent. |
Subsystem |
part def |
Subsystem definition specializing LogicalComponent. |
LogicalComponent |
part def |
Logical component definition specializing MemoPart. |
LogicalPort |
port def |
Boundary features and contracts. |
LogicalExchangeItem |
item def |
Logical exchange item definition specializing MemoItem. |
LogicalBehavior |
part def |
States and modes of the logical solution (kept distinct from UI state and from physical device configuration). |
IsolationBoundary |
part def |
Isolation, fault containment, and trust boundaries (§10). |
FaultContainmentRegion |
part def |
Fault containment region definition specializing MemoPart. |
Connections at a glance¶
Each arrow is one relationship, from its source end to its target end. A grey box belongs to another layer.
flowchart LR
LogicalPort["LogicalPort"]
anyElement["any element"]:::other
LogicalComponent["LogicalComponent"]
MemoPart["MemoPart"]:::other
LogicalPort -->|LogicalInterface| anyElement
LogicalComponent -->|LogicalConnector| LogicalComponent
anyElement -->|LogicalTransfer| anyElement
LogicalComponent -->|IndependentOf| LogicalComponent
LogicalComponent -->|RealizedBy| MemoPart
classDef other fill:#eef1f4,stroke:#9aa7b2,color:#4a5a66
Relationships declared here¶
| Relationship | From | To | What it says |
|---|---|---|---|
Interface |
any element | any element | Typed relationship for interface. |
SoftwareInterface |
any element | any element | Software interaction contracts. Concrete technologies add their protocol roles and message flows; ports remain the endpoints that components actually own. |
DataInterface |
any element | any element | Typed relationship for data interface. |
ComponentExchange |
any element | any element | Typed relationship for component exchange. |
LogicalInterface |
LogicalPort |
any element | Typed relationship from LogicalPort to any element. |
LogicalConnector |
LogicalComponent |
LogicalComponent |
A typed logical connection between two components' ports. |
LogicalExchange |
any element | any element | Typed relationship for logical exchange. |
LogicalTransfer |
any element | any element | The concrete exchange a model types its logical flows by; the ends stay untyped for the reason above. |
IndependentOf |
LogicalComponent |
LogicalComponent |
Claimed independence between channels (common-cause defense). |
Relationships from elsewhere that reach this layer¶
| Relationship | Declared in | From | To | What it says |
|---|---|---|---|---|
RealizedBy |
realization | LogicalComponent |
MemoPart |
Typed relationship from LogicalComponent to MemoPart. |
Enumerations¶
| Enumeration | Values |
|---|---|
FlowContentKind |
information, command, status, measurement, alarm, configuration, energy, material, fluid, mechanicalForce |
ChannelRoleKind |
primary, secondary, redundant, diverse, monitor, watchdog, interlock, independentProtection |
ComponentRoleKind |
channel, dataStore, controlElement, userInterface, externalSystem, generic |
SystemTypeKind |
logical, software, hardware |
SystemOriginKind |
internal, external |
Go deeper¶
- The GPCA infusion pump: requirements and architecture.
- Naming and native constructs:
flowtransports,binddelegates. - The logical API.