Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ package ChangingFeatureValuesExecution {


step redefines paint : MyPaint {
feature redefines paint::objectToPaint, MyPaint::objectToPaint;
feature redefines Manufacture::paint::objectToPaint, MyPaint::objectToPaint;
}
feature subsets objectToFinish.beforePaint.immediateSuccessors,
objectToFinish.whilePainting.startShot.timeCoincidentOccurrences
Expand All @@ -172,7 +172,7 @@ package ChangingFeatureValuesExecution {


step redefines dry : MyDry {
feature redefines dry::objectToDry, MyDry::objectToDry;
feature redefines Manufacture::dry::objectToDry, MyDry::objectToDry;
}
succession redefines p_before_d : MyPaint_Before_Dry_Link [1] first paint then dry;
feature subsets objectToFinish.afterPaint.immediateSuccessors,
Expand All @@ -184,7 +184,7 @@ package ChangingFeatureValuesExecution {


step redefines ship : MyShip {
feature redefines ship::objectToShip, MyShip::objectToShip;
feature redefines Manufacture::ship::objectToShip, MyShip::objectToShip;
}
succession redefines d_before_s : MyDry_Before_Ship_Link [1] first dry then ship;
feature subsets objectToFinish.afterDry.immediateSuccessors,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
//* XPECT_SETUP org.omg.kerml.xpect.tests.validation.KerMLValidationTest
ResourceSet {
ThisFile {}
File {from ="/library/Base.kerml"}
}
Workspace {
JavaProject {
SrcFolder {
ThisFile {}
File {from ="/library/Base.kerml"}
}
}
}
END_SETUP
*/

package Redefinition_Scoping {

classifier A {
feature x {
feature y;
}
}

classifier B specializes A {
feature x redefines x {
// XPECT errors ---> "Featuring types of redefining feature and redefined feature cannot be the same" at "x::y"
// XPECT warnings ---> "Duplicate of inherited member name 'y' from x" at "feature redefines x::y;"
// Should redefine B::x::y (itself).
feature redefines x::y;
}
}

classifier C {
feature x;
feature y {
// Should redefine C::x.
feature redefines x;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ public ConstructorExpression getTarget() {

// Transformation

/**
* @satisifies checkConstructorExpressionResultSpecialization
*/
protected void addResultTyping() {
// checkConstructorExpressionResultSpecialization
ConstructorExpression target = getTarget();
Type instantiatedType = target.getInstantiatedType();
if (instantiatedType != null) {
Expand All @@ -59,11 +61,6 @@ protected void addResultTyping() {
@Override
public void addAdditionalMembers() {
TypeUtil.addResultParameterTo(getTarget());
}

@Override
public void doTransform() {
super.doTransform();
addResultTyping();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,12 @@ public void setOwningType(Type newOwningType) {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
* @generated
*/
@Override
public EList<Element> getTarget() {
EList<Element> target = new UniqueEList<Element>();
// TODO: Remove this?
// NOTE: The "general" object must NOT be resolved here, in order to avoid Xtext lazy linking errors.
Element general = basicGetGeneral();
Element general = getGeneral();
if (general != null) {
target.add(general);
}
Expand All @@ -307,13 +305,12 @@ public boolean isSetTarget() {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
* @generated
*/
@Override
public EList<Element> getSource() {
EList<Element> source = new UniqueEList<Element>();
// TODO: Remove this difference?
Type specific = basicGetSpecific();
Type specific = getSpecific();
if (specific != null) {
source.add(specific);
}
Expand Down
6 changes: 3 additions & 3 deletions sysml.library/Domain Libraries/Geometry/ShapeItems.sysml
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ standard library package ShapeItems {
attribute :>> semiMinorAxis [1] = radius;

item :>> base : CircularDisc {
ref :>> base::edges, CircularDisc::edges;
ref :>> Cone::base::edges, CircularDisc::edges;
}
}

Expand Down Expand Up @@ -521,10 +521,10 @@ standard library package ShapeItems {
attribute :>> semiMinorAxis [1] = radius;

item :>> base : CircularDisc {
ref :>> base::edges, CircularDisc::edges;
ref :>> Cylinder::base::edges, CircularDisc::edges;
}
item :>> af : CircularDisc {
ref :>> af::edges, CircularDisc::edges;
ref :>> Cylinder::af::edges, CircularDisc::edges;
}
}

Expand Down