Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion kerml/src/examples/Simple Tests/Connectors.kerml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,27 @@ package Connectors {
end feature references a;
end feature references b;
}
binding ab1 : AS of a = b;

succession a then b;
succession s first a then b;
succession {
end feature references a;
end feature references b;
}
succession s1 : AS first a then b;

}

class B {
feature a : A;
feature a : A;
connector :> a.c1 from a.a to a.b;
}

assoc struct AS {
end a;
end b;
}


}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*****************************************************************************
* SysML 2 Pilot Implementation
* Copyright (c) 2019-2020 Model Driven Solutions, Inc.
* Copyright (c) 2019-2020, 2026 Model Driven Solutions, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
Expand Down Expand Up @@ -44,7 +44,7 @@ class KerMLLibraryProvider implements IModelLibraryProvider {
ResourceDescriptionsProvider resourceDescriptionProvider

override Element getElement(Element context, String name) {
if (context === null) {
if (context?.eResource()?.getResourceSet() === null || name === null) {
return null
} else {
val qname = nameConverter.toQualifiedName(name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,21 @@ package ConnectionTest {

connect p1.x to y;
connect p1.x.x1 to y;

part a;
part b;

bind a = b;
binding ab bind a = b;
binding ab1 : AB bind a = b;

first a then b;
succession s first a then b;
succession s1 : AB first a then b;
}

abstract connection def C {
part p;
end end1;
end end2;
end end3;
Expand All @@ -77,7 +89,7 @@ package ConnectionTest {

connection {
part q;
end [2] ref end1 ::> d1 :> q;
end ref end1 ::> d1 :> q;
end end2 ::> d2;
}

Expand All @@ -92,7 +104,8 @@ package ConnectionTest {
part def B;

connection def AB {
end a : A;
end b : B crosses a.b;
end [1] item a : A;
end b : B;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ protected ImplicitGeneralizationMap() {

//checkBindingConnectorSpecialization
put(BindingConnectorImpl.class, "binary", "Links::selfLinks");
put(BindingConnectorImpl.class, "binaryObject", "Links::selfLinks");

//checkBooleanExpressionSpecialization
put(BooleanExpressionImpl.class, "base", "Performances::booleanEvaluations");
Expand Down Expand Up @@ -202,6 +203,7 @@ protected ImplicitGeneralizationMap() {

//checkSuccessionSpecialization
put(SuccessionImpl.class, "binary", "Occurrences::happensBeforeLinks");
put(SuccessionImpl.class, "binaryObject", "Occurrences::happensBeforeLinks");

//checkSuccessionSpecialization
put(SuccessionFlowImpl.class, "base", "Transfers::flowTransfersBefore");
Expand Down Expand Up @@ -285,6 +287,7 @@ protected ImplicitGeneralizationMap() {
put(BindingConnectorAsUsageImpl.class, "base", "Links::selfLinks");
//checkBindingConnectorSpecialization
put(BindingConnectorAsUsageImpl.class, "binary", "Links::selfLinks");
put(BindingConnectorAsUsageImpl.class, "binaryObject", "Links::selfLinks");

//checkCalculationDefinitionSpecialization
put(CalculationDefinitionImpl.class, "base", "Calculations::Calculation");
Expand Down Expand Up @@ -511,6 +514,7 @@ protected ImplicitGeneralizationMap() {
put(SuccessionAsUsageImpl.class, "base", "Occurrences::happensBeforeLinks");
//checkSuccessionSpecialization
put(SuccessionAsUsageImpl.class, "binary", "Occurrences::happensBeforeLinks");
put(SuccessionAsUsageImpl.class, "binaryObject", "Occurrences::happensBeforeLinks");
//checkDecisionNodeOutgoingSuccessionSpecialization
put(SuccessionAsUsageImpl.class, "decision", "ControlPerformances::DecisionPerformance::outgoingHBLink");
//checkMergeNodeIncomingSuccessionSpecialization
Expand Down
13 changes: 13 additions & 0 deletions sysml/src/examples/Simple Tests/ConnectionTest.sysml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ package ConnectionTest {

connect p1.x to y;
connect p1.x.x1 to y;

part a;
part b;

bind a = b;
binding ab bind a = b;
binding ab1 : AB bind a = b;

first a then b;
succession s first a then b;
succession s1 : AB first a then b;
}

abstract connection def C {
Expand Down Expand Up @@ -61,4 +72,6 @@ package ConnectionTest {
}

metadata def M;


}