Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ST6RI-724 Model library updates from SysML v2 FTF Ballot #9 #521

Merged
merged 8 commits into from
Dec 1, 2023
12 changes: 7 additions & 5 deletions org.omg.sysml/src/org/omg/sysml/adapter/TypeAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,15 @@ public void removeUnnecessaryImplicitGeneralTypes() {
filter(spec->spec.getSpecific() == target && spec.getGeneral() != target).
map(Specialization::getGeneral).
collect(Collectors.toList());
implicitGeneralTypes.values().forEach(generals::addAll);
List<Type> implicitGenerals = new ArrayList<>();
implicitGeneralTypes.values().forEach(implicitGenerals::addAll);
for (Object eClass: implicitGeneralTypes.keySet().toArray()) {
if (eClass != SysMLPackage.eINSTANCE.getRedefinition()) {
List<Type> implicitGenerals = implicitGeneralTypes.get(eClass);
implicitGenerals.removeIf(gen->
generals.stream().anyMatch(type->type != gen && conforms(type, gen)));
if (implicitGenerals.isEmpty()) {
List<Type> implicitEClassGenerals = implicitGeneralTypes.get(eClass);
implicitEClassGenerals.removeIf(gen->
generals.stream().anyMatch(type->conforms(type, gen)) ||
implicitGenerals.stream().anyMatch(type->type != gen && conforms(type, gen)));
if (implicitEClassGenerals.isEmpty()) {
implicitGeneralTypes.remove(eClass);
}
}
Expand Down
14 changes: 6 additions & 8 deletions sysml.library/Domain Libraries/Geometry/SpatialItems.sysml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ standard library package SpatialItems {
private import Time::TimeInstantValue;
private import ScalarValues::Natural;
private import ISQ::universalCartesianSpatial3dCoordinateFrame;
private import ISQ::Position3dVector;
private import ISQ::Displacement3dVector;
private import VectorFunctions::isZeroVector;
private import SequenceFunctions::isEmpty;
private import ControlFunctions::forAll;
Expand Down Expand Up @@ -97,9 +99,8 @@ standard library package SpatialItems {
in timeInstant : TimeInstantValue[1];
in enclosingItem :>> 'frame' : SpatialItem[1];
in clock : Clock[1] default enclosingItem.localClock;
return positionVector : VectorQuantityValue[1] {
return positionVector : Position3dVector[1] {
attribute :>> mRef = enclosingItem.coordinateFrame;
attribute :>> isBound = true;
}
}

Expand All @@ -113,9 +114,8 @@ standard library package SpatialItems {
in point : Point[1];
in enclosingItem :>> 'frame' : SpatialItem[1];
in clock : Clock[1] default enclosingItem.localClock;
return positionVector : VectorQuantityValue[1] {
return positionVector : Position3dVector[1] {
attribute :>> mRef = enclosingItem.coordinateFrame;
attribute :>> isBound = true;
}
}

Expand All @@ -132,9 +132,8 @@ standard library package SpatialItems {
in timeInstant : TimeInstantValue[1];
in spatialItem :>> 'frame' : SpatialItem[1];
in clock : Clock[1] default spatialItem.localClock;
return displacementVector : VectorQuantityValue[1] {
return displacementVector : Displacement3dVector[1] {
attribute :>> mRef = spatialItem.coordinateFrame;
attribute :>> isBound = false;
}
}

Expand All @@ -149,9 +148,8 @@ standard library package SpatialItems {
in point2 : Point[1];
in spatialItem :>> 'frame' : SpatialItem[1];
in clock : Clock[1] default spatialItem.localClock;
return displacementVector : VectorQuantityValue[1] {
return displacementVector : Displacement3dVector[1] {
attribute :>> mRef = spatialItem.coordinateFrame;
attribute :>> isBound = false;
}
}

Expand Down
14 changes: 11 additions & 3 deletions sysml.library/Systems Library/Actions.sysml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ standard library package Actions {
}
}

action sendSubactions: SendAction[0..*] :> subactions {
action sendSubactions: SendAction[0..*] :> subactions, sendActions {
doc
/*
* The subactions of this Action that are SendActions.
*/
}

action acceptSubactions: AcceptAction[0..*] :> subactions {
action acceptSubactions: AcceptAction[0..*] :> subactions, acceptActions {
doc
/*
* The subactions of this Action that are AcceptActions.
Expand Down Expand Up @@ -124,7 +124,7 @@ standard library package Actions {
*/
}

abstract action decisionTransitions : DecisionTransitionAction[0..*] :> transitionActions {
abstract action decisionTransitions : DecisionTransitionAction[0..*] :> transitions {
doc
/*
* The subactions of this Action that are DecisionTransitionActions.
Expand Down Expand Up @@ -335,6 +335,14 @@ standard library package Actions {
/*
* assignmentActions is the base feature for all AssignmentActionsUsages.
*/

in :>> target : Occurrence[1] default that as Occurrence {
doc
/*
* The default target for assignmentActions is its featuring instance (if that is
* an Occurrence).
*/
}
}

action def IfThenAction :> Action, IfThenPerformance {
Expand Down
Loading