Skip to content

Commit 6d68d37

Browse files
committed
ST6RI-843 Identified adapter TODOs as spec updates vs. impl fixes.
1 parent 26cd83d commit 6d68d37

13 files changed

Lines changed: 40 additions & 118 deletions

org.omg.sysml/src/org/omg/sysml/adapter/CalculationUsageAdapter.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,10 @@ protected String getSubactionType() {
4949

5050
public boolean isSubcalculation() {
5151
/*
52-
* TODO: ST6RI-843
52+
* TODO: Update checkCalculationUsageSubcalculationSpecialization
5353
*
54-
* checkCalculationUsageSubcalculationSpecialization
55-
*
56-
* owningType <> null and
57-
* (owningType.oclIsKindOf(CalculationDefinition) or
58-
* owningType.oclIsKindOf(CalculationUsage)) implies
59-
* specializesFromLibrary('Calculations::Calculation::subcalculations')
60-
*
6154
* isNonEntryExitComposite check is not part of the OCL
55+
* See SYSML12-298
6256
*/
6357
CalculationUsage target = getTarget();
6458
Type owningType = target.getOwningType();

org.omg.sysml/src/org/omg/sysml/adapter/CaseUsageAdapter.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************
22
* SysML 2 Pilot Implementation
3-
* Copyright (c) 2021, 2023-2024 Model Driven Solutions, Inc.
3+
* Copyright (c) 2021, 2023-2025 Model Driven Solutions, Inc.
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU Lesser General Public License as published by
@@ -57,16 +57,11 @@ protected String getSubactionType() {
5757
}
5858

5959
public boolean isSubcase() {
60-
/*TODO: ST6RI-843
61-
*
62-
* checkCaseUsageSubcaseSpecialization
63-
*
64-
* isComposite and owningType <> null and
65-
* (owningType.oclIsKindOf(CaseDefinition) or
66-
* owningType.oclIsKindOf(CaseUsage)) implies
67-
* specializesFromLibrary('Cases::Case::subcases')
60+
/*
61+
* TODO: Update checkCaseUsageSubcaseSpecialization
6862
*
6963
* nonEntryExit part of the check is not reflected of the OCL
64+
* See SYSML21-298
7065
*/
7166
CaseUsage target = getTarget();
7267
Type owningType = target.getOwningType();

org.omg.sysml/src/org/omg/sysml/adapter/ConstraintUsageAdapter.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,7 @@ protected String getDefaultSupertype() {
8686

8787
protected boolean isCheckedConstraint() {
8888
/*
89-
* TODO: ST6RI-843
90-
*
91-
* checkConstraintUsageCheckedConstraintSpecialization
92-
*
93-
* owningType <> null and
94-
* (owningType.oclIsKindOf(ItemDefinition) or
95-
* owningType.oclIsKindOf(ItemUsage)) implies
96-
* specializesFromLibrary('Items::Item::checkedConstraints')
89+
* TODO: Update checkConstraintUsageCheckedConstraintSpecialization
9790
*
9891
* OCL doesn't require composite
9992
*

org.omg.sysml/src/org/omg/sysml/adapter/EventOccurrenceUsageAdapter.java

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************
22
* SysML 2 Pilot Implementation
3-
* Copyright (c) 2021 Model Driven Solutions, Inc.
3+
* Copyright (c) 2021, 2025 Model Driven Solutions, Inc.
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU Lesser General Public License as published by
@@ -37,30 +37,8 @@ public EventOccurrenceUsage getTarget() {
3737
return (EventOccurrenceUsage)super.getTarget();
3838
}
3939

40-
/*
41-
* TODO: ST6RI-843
42-
*
43-
* All general semantic constraints on an OccurrenceUsage
44-
* (see 8.4.5.2 ) also apply to an EventOccurrenceUsage.
45-
*
46-
* addDefaultGeneralType and getDefaultSuperType overrides look redundant
47-
* as they both check for subOccurrence which is also done by OccurrenceUsageAdapter
48-
*/
49-
50-
/**
51-
* @satisfies checkOccurrenceUsageSuboccurrenceSpecialization
52-
*/
53-
@Override
54-
public void addDefaultGeneralType() {
55-
super.addDefaultGeneralType();
56-
if (isSuboccurrence()) {
57-
addImplicitGeneralType(getSpecializationEClass(),
58-
getLibraryType(getDefaultSupertype("suboccurrence")));
59-
}
60-
}
61-
6240
/**
63-
* @satisfies checkOccurrenceUsageSuboccurrenceSpecialization
41+
* @satisfies checkEventOccurrenceUsageSpecialization
6442
*/
6543
@Override
6644
protected String getDefaultSupertype() {

org.omg.sysml/src/org/omg/sysml/adapter/FeatureAdapter.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -238,18 +238,6 @@ public void addDefaultGeneralType() {
238238

239239

240240
protected void addBoundValueSubsetting() {
241-
/*
242-
* TODO: ST6RI-843
243-
*
244-
* direction = null and
245-
* ownedSpecializations->forAll(isImplied) implies
246-
* ownedMembership->
247-
* selectByKind(FeatureValue)->
248-
* forAll(fv | specializes(fv.value.result))
249-
*
250-
*
251-
*/
252-
253241
Feature target = getTarget();
254242
Feature result = getBoundValueResult();
255243

org.omg.sysml/src/org/omg/sysml/adapter/FeatureReferenceExpressionAdapter.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,9 @@ protected boolean isInFilterExpression() {
6464
*/
6565
protected void addReferenceConnector() {
6666
/*
67-
* TODO: ST6RI-843
68-
*
69-
* ownedMember->selectByKind(BindingConnector)->exists(b |
70-
* b.relatedFeatures->includes(targetFeature) and
71-
* b.relatedFeatures->includes(result))
67+
* TODO: Update checkFeatureReferenceExpressionBindingConnector?
68+
*
69+
* OCL does not include !isInFilterExpression check.
7270
*
7371
*/
7472
if (!isInFilterExpression()) {

org.omg.sysml/src/org/omg/sysml/adapter/IncludeUseCaseUsageAdapter.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ public IncludeUseCaseUsage getTarget() {
3737
return (IncludeUseCaseUsage)super.getTarget();
3838
}
3939

40+
/**
41+
* TODO: checkIncludeUseCaseUsageSpecialization
42+
*
43+
* TODO: Rename checkIncludeUseCaseSpecialization
44+
* See SYSML21-299
45+
*/
46+
4047
/**
4148
* @satisfies checkPerformActionUsageSpecialization
4249
*/

org.omg.sysml/src/org/omg/sysml/adapter/IndexExpressionAdapter.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,10 @@ protected void addResultTyping() {
5858
Type arrayType = getLibraryType(ARRAY_TYPE);
5959
Type scalarValueType = getLibraryType(SCALAR_VALUE_TYPE);
6060
/*
61-
* TODO: ST6RI-843
62-
* checkIndexExpressionResultSpecialization:
63-
* arguments->notEmpty() and
64-
* not arguments->first().result.specializesFromLibrary('Collections::Array') implies
65-
* result.specializes(arguments->first().result)
61+
* TODO: Update checkIndexExpressionResultSpecialization
62+
* See KERML11-69.
6663
*
67-
* '|| TypeUtil.specializes(target, scalarValueType)' part is not reflected by the OCL
64+
* TODO: Generalize to handle all types other than Collection types?
6865
*/
6966
if (!TypeUtil.specializes(target, arrayType) || TypeUtil.specializes(target, scalarValueType)) {
7067
Feature resultFeature = target.getResult();

org.omg.sysml/src/org/omg/sysml/adapter/PartUsageAdapter.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************
22
* SysML 2 Pilot Implementation
3-
* Copyright (c) 2021 Model Driven Solutions, Inc.
3+
* Copyright (c) 2021, 2025 Model Driven Solutions, Inc.
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU Lesser General Public License as published by
@@ -62,13 +62,7 @@ protected boolean isRequirementActor() {
6262

6363
protected boolean isRequirementStakeholder() {
6464
/*
65-
* TODO: ST6RI-843
66-
*
67-
* checkPartUsageStakeholderSpecialization
68-
*
69-
* owningFeatureMembership <> null and
70-
* owningFeatureMembership.oclIsKindOf(StakeholderMembership) implies
71-
* specializesFromLibrary('Requirements::RequirementCheck::stakeholders')
65+
* TODO: Update checkPartUsageStakeholderSpecialization?
7266
*
7367
* OCL doesn't require the owningType to be ReqDef or ReqUsage
7468
*/

org.omg.sysml/src/org/omg/sysml/adapter/UseCaseUsageAdapter.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,10 @@ public boolean isSubUseCase() {
4545
Type owningType = getTarget().getOwningType();
4646

4747
/*
48-
* TODO: ST6RI-843
48+
* TODO: Update checkUseCaseSubUseCaseSpecialization
4949
*
50-
* checkIncludeUseCaseSpecialization
51-
*
52-
* owningType <> null and
53-
* (owningType.oclIsKindOf(UseCaseDefinition) or
54-
* owningType.oclIsKindOf(UseCaseUsage) implies
55-
* specializesFromLibrary('UseCases::UseCase::includedUseCases')
56-
*
57-
* the semantic constraint doens't require the IncludeUseCaseUsage to be composite, also
58-
* IncludeUseCaseUsageImpl overrides isComposite to always return false
50+
* OCL does not include isNonEntryExitComposite.
51+
* See SYSML21-298
5952
*/
6053

6154
return isNonEntryExitComposite() &&

0 commit comments

Comments
 (0)