Skip to content

Commit db8d967

Browse files
committed
SYSML21-322 Fixed diamond inheritance problems in Systems Library.
Mostly, this involved just adding appropriate explicit redefinitions. But: - Flows was fixed in part by updating Connections::BinaryConnection and Transfers::FlowTransferBefore to re-order specializations. - Usages typed by metadata definitions in SysML were mostly fixed by the fix to Metadata. However, this did not fix usages typed by KerML metaobjects. To consistently resolve all problems, "subsets Metadata::metadataItems" was added to all metadata/metaobject item usages. - Views was fixed by adding a redefinition of "this" to View::viewpointConformance::viewpointSatisfactions, but with a default of "that.that" (which is basically the default value of "this" for View::viewpointSatisfactions; but see also SYSML21-323).
1 parent 240fba1 commit db8d967

9 files changed

Lines changed: 223 additions & 207 deletions

File tree

sysml.library/Kernel Libraries/Kernel Semantic Library/Transfers.kerml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ standard library package Transfers {
167167
private succession self then target;
168168
}
169169

170-
interaction FlowTransferBefore specializes FlowTransfer, TransferBefore intersects FlowTransfer, TransferBefore {
170+
interaction FlowTransferBefore specializes TransferBefore, FlowTransfer intersects FlowTransfer, TransferBefore {
171171
doc
172172
/*
173173
* FlowTransferBefore is a FlowTransfer that is also a TransferBefore.

sysml.library/Systems Library/Actions.sysml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ standard library package Actions {
190190
*/
191191

192192
in :>> payload [0..*];
193-
ref sentMessage :>> sentTransfer: MessageTransfer, MessageAction;
193+
ref sentMessage :>> sentTransfer: MessageTransfer, MessageAction {
194+
in :>> MessageTransfer::payload, MessageAction::payload;
195+
}
194196
}
195197

196198
abstract action sendActions: SendAction[0..*] nonunique :> actions, sendPerformances {
@@ -207,7 +209,9 @@ standard library package Actions {
207209
* of a designated receiver Occurrence, providing its payload as output.
208210
*/
209211
inout :>> payload;
210-
ref acceptedMessage :>> acceptedTransfer: MessageTransfer, MessageAction;
212+
ref acceptedMessage :>> acceptedTransfer: MessageTransfer, MessageAction {
213+
in :>> MessageTransfer::payload, MessageAction::payload;
214+
}
211215
}
212216

213217
action def AcceptAction :> AcceptMessageAction {
@@ -330,7 +334,9 @@ standard library package Actions {
330334
*/
331335

332336
in transitionLinkSource : Action :>> TransitionPerformance::transitionLinkSource;
333-
ref acceptedMessage : MessageTransfer, MessageAction :>> trigger;
337+
ref acceptedMessage : MessageTransfer, MessageAction :>> trigger {
338+
in :>> MessageTransfer::payload, MessageAction::payload;
339+
}
334340

335341
ref receiver :>> triggerTarget;
336342

sysml.library/Systems Library/Connections.sysml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ standard library package Connections {
3232
*/
3333
}
3434

35-
abstract connection def BinaryConnection :> Connection, BinaryLinkObject {
35+
abstract connection def BinaryConnection :> BinaryLinkObject, Connection {
3636
doc
3737
/*
3838
* BinaryConnection is the most general class of binary links between two things

sysml.library/Systems Library/Flows.sysml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ standard library package Flows {
8181
* It is the base type for FlowUsages that identify their source output and
8282
* target input.
8383
*/
84-
84+
8585
end occurrence source: Occurrence :>> Message::source, FlowTransfer::source;
8686
end occurrence target: Occurrence :>> Message::target, FlowTransfer::target;
8787
}
@@ -92,6 +92,8 @@ standard library package Flows {
9292
* SuccessionFlow is a subclass of flowss that appen after their source and
9393
* before their target. It is the base type for all SuccessionFlowUsages.
9494
*/
95+
96+
ref self : SuccessionFlow :>> Flow::self, FlowTransferBefore::self;
9597

9698
end occurrence source: Occurrence :>> Flow::source, FlowTransferBefore::source;
9799
end occurrence target: Occurrence :>> Flow::target, FlowTransferBefore::target;

sysml.library/Systems Library/Items.sysml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,14 @@ standard library package Items {
7272
}
7373

7474
item boundingShapes : StructuredSpaceObject [0..*] :> envelopingShapes {
75-
doc
75+
doc
7676
/*
7777
* envelopingShapes that are structured space objects with every face or every edge
7878
* intersecting this Item.
7979
*/
80-
80+
81+
attribute :>> StructuredSpaceObject::innerSpaceDimension, envelopingShapes::innerSpaceDimension;
82+
8183
item boundingShape: Item :>> self;
8284

8385
item :>> faces {

sysml.library/Systems Library/Metadata.sysml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ doc
1616
* MetadataItem is the most general class of Items that represent Metaobjects.
1717
* MetadataItem is the base type of all MetadataDefinitions.
1818
*/
19+
20+
ref self : MetadataItem redefines Metaobject::self, Item::self;
1921
}
2022

2123
abstract item metadataItems : MetadataItem[0..*] :> metaobjects, items {

sysml.library/Systems Library/Ports.sysml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ standard library package Ports {
3939
/*
4040
* The target of each of the outgoingTransfersFromSelf of a Port must be an interfacingPort.
4141
*/
42+
43+
end ref source;
44+
end ref target;
4245
}
4346
}
4447

sysml.library/Systems Library/SysML.sysml

Lines changed: 192 additions & 192 deletions
Large diffs are not rendered by default.

sysml.library/Systems Library/Views.sysml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ standard library package Views {
1414
ref view :>> self : View;
1515

1616
abstract ref view subviews : View[0..*] :> views {
17-
doc
18-
/*
19-
* Other Views that are used in the rendering of this View.
20-
*/
17+
doc
18+
/*
19+
* Other Views that are used in the rendering of this View.
20+
*/
2121
}
2222

2323
abstract ref rendering viewRendering : Rendering[0..1] {
24-
doc
24+
doc
2525
/*
2626
* The rendering of this View.
2727
*/
2828
}
2929

3030
viewpoint viewpointSatisfactions : ViewpointCheck[0..*] :> viewpointChecks, checkedConstraints {
31-
doc
31+
doc
3232
/*
3333
* Checks that the View satisfies all required ViewpointUsages.
3434
*/
@@ -39,12 +39,13 @@ standard library package Views {
3939
/*
4040
* An assertion that all viewpointSatisfactions are true.
4141
*/
42-
42+
4343
require viewpointSatisfactions {
4444
doc
4545
/*
4646
* The required ViewpointChecks.
4747
*/
48+
ref :>> ownedPerformances::this, subperformances::this default that.that;
4849
}
4950
}
5051
}

0 commit comments

Comments
 (0)