-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
882 additions
and
181 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
kerml/src/examples/KerML Spec Annex A Examples/A-2-Atoms.kerml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package Atoms { | ||
doc | ||
/* This package defines a keyword (atom) for classifiers with | ||
* exactly one instance and are disjoint from any others | ||
* marked with this keyword. | ||
*/ | ||
|
||
private import Metaobjects::Metaobject; | ||
|
||
classifier Atom; | ||
metaclass <atom> AtomMetadata specializes Metaobject { | ||
baseType = Atom meta KerML::Classifier; | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
kerml/src/examples/KerML Spec Annex A Examples/A-2-ModelingInstances.kerml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package ModelingInstances { | ||
doc | ||
/* | ||
*/ | ||
|
||
classifier Vehicle; | ||
classifier Bicycle specializes Vehicle; | ||
classifier MyBike [1] specializes Bicycle; | ||
classifier YourBike [1] specializes Bicycle disjoint from MyBike; | ||
} | ||
|
||
package ModelingInstancesWithAtoms { | ||
doc | ||
/* | ||
*/ | ||
|
||
import Atoms::atom; | ||
|
||
classifier Vehicle; | ||
classifier Bicycle specializes Vehicle; | ||
|
||
#atom | ||
classifier MyBike specializes Bicycle; | ||
#atom | ||
classifier YourBike specializes Bicycle; | ||
|
||
/* Assigning feature values. */ | ||
|
||
classifier Garage { | ||
feature stores : Bicycle [*]; | ||
} | ||
classifier OurBicycle unions MyBike, YourBike; | ||
|
||
#atom | ||
classifier OurGarage specializes Garage { | ||
feature redefines stores : OurBicycle [2]; | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
kerml/src/examples/KerML Spec Annex A Examples/A-3-2-WithoutConnectors.kerml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
package WithoutConnectorsModelToBeExecuted { | ||
doc | ||
/* | ||
*/ | ||
|
||
classifier Bicycle { | ||
feature rollsOn : Wheel [2]; | ||
feature holdsWheel : BikeFork [*]; | ||
} | ||
classifier Wheel; | ||
classifier BikeFork; | ||
} | ||
|
||
package WithoutConnectorsExecution { | ||
doc | ||
/* | ||
*/ | ||
|
||
import Atoms::*; | ||
import WithoutConnectorsModelToBeExecuted::*; | ||
|
||
#atom | ||
classifier MyWheel1 specializes Wheel; | ||
#atom | ||
classifier MyWheel2 specializes Wheel; | ||
|
||
classifier MyWheel unions MyWheel1, MyWheel2; | ||
|
||
#atom | ||
classifier MyBike specializes Bicycle { | ||
feature redefines rollsOn : MyWheel; | ||
} | ||
} | ||
|
||
|
||
|
58 changes: 58 additions & 0 deletions
58
kerml/src/examples/KerML Spec Annex A Examples/A-3-3-OneToOneConnectors.kerml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
package OneToOneConnectorsModelToBeExecuted { | ||
doc | ||
/* | ||
*/ | ||
|
||
import WithoutConnectorsModelToBeExecuted::Wheel; | ||
import WithoutConnectorsModelToBeExecuted::BikeFork; | ||
|
||
classifier Bicycle { | ||
feature rollsOn : Wheel [2]; | ||
feature holdsWheel : BikeFork [*]; | ||
connector fixWheel : BikeWheelFixed from rollsOn [1] to holdsWheel [1]; | ||
} | ||
assoc BikeWheelFixed { | ||
end feature wheel : Wheel; | ||
end feature fixedTo : BikeFork; | ||
} | ||
} | ||
|
||
package OneToOneConnectorsExecution { | ||
doc | ||
/* | ||
*/ | ||
|
||
import Atoms::*; | ||
import OneToOneConnectorsModelToBeExecuted::*; | ||
import WithoutConnectorsExecution::MyWheel1; | ||
import WithoutConnectorsExecution::MyWheel2; | ||
import WithoutConnectorsExecution::MyWheel; | ||
|
||
#atom | ||
classifier MyBikeFork1 specializes BikeFork; | ||
#atom | ||
classifier MyBikeFork2 specializes BikeFork; | ||
|
||
classifier MyBikeFork unions MyBikeFork1, MyBikeFork2; | ||
|
||
#atom | ||
assoc MyBikeWheel1_Fork1_BWF_Link specializes BikeWheelFixed { | ||
end feature redefines wheel : MyWheel1; | ||
end feature redefines fixedTo : MyBikeFork1; | ||
} | ||
#atom | ||
assoc MyBikeWheel2_Fork2_BWF_Link specializes BikeWheelFixed { | ||
end feature redefines wheel : MyWheel2; | ||
end feature redefines fixedTo : MyBikeFork2; | ||
} | ||
|
||
classifier MyBikeWheel_Fork_BWF_Link unions MyBikeWheel1_Fork1_BWF_Link, MyBikeWheel2_Fork2_BWF_Link; | ||
|
||
#atom | ||
classifier MyBike specializes Bicycle { | ||
feature redefines rollsOn : MyWheel; | ||
feature redefines holdsWheel : MyBikeFork; | ||
connector redefines fixWheel : MyBikeWheel_Fork_BWF_Link [2] from rollsOn [1] to holdsWheel [1]; | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
kerml/src/examples/KerML Spec Annex A Examples/A-3-4-OneToUnrestrictedConnectors.kerml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
|
||
package OneToUnrestrictedConnectorsModelToBeExecuted { | ||
doc | ||
/* | ||
*/ | ||
|
||
import WithoutConnectorsModelToBeExecuted::BikeFork; | ||
|
||
classifier Bicycle { | ||
feature carrier : BikeBasket [*]; | ||
feature holdsWheel : BikeFork [*]; | ||
connector carrierFixed : BikeBasketFixed from carrier [*] to holdsWheel [1]; | ||
} | ||
classifier BikeBasket; | ||
|
||
assoc BikeBasketFixed { | ||
end feature basket : BikeBasket; | ||
end feature fixedTo : BikeFork; | ||
} | ||
} | ||
|
||
package OneToUnrestrictedConnectorsExecution { | ||
doc | ||
/* | ||
*/ | ||
|
||
import Atoms::*; | ||
import OneToUnrestrictedConnectorsModelToBeExecuted::*; | ||
import OneToOneConnectorsExecution::MyBikeFork1; | ||
import OneToOneConnectorsExecution::MyBikeFork2; | ||
import OneToOneConnectorsExecution::MyBikeFork; | ||
|
||
#atom | ||
classifier MyBikeBasket1 specializes BikeBasket; | ||
#atom | ||
classifier MyBikeBasket2 specializes BikeBasket; | ||
|
||
classifier MyBikeBasket unions MyBikeBasket1, MyBikeBasket2; | ||
|
||
#atom | ||
assoc MyBikeBasket1_Fork1_BBF_Link specializes BikeBasketFixed { | ||
end feature redefines basket : MyBikeBasket1; | ||
end feature redefines fixedTo : MyBikeFork1; | ||
} | ||
#atom | ||
assoc MyBikeBasket2_Fork1_BBF_Link specializes BikeBasketFixed { | ||
end feature redefines basket : MyBikeBasket2; | ||
end feature redefines fixedTo : MyBikeFork1; | ||
} | ||
|
||
classifier MyBikeBasket_Fork_BBF_Link unions MyBikeBasket1_Fork1_BBF_Link, MyBikeBasket2_Fork1_BBF_Link; | ||
|
||
#atom | ||
classifier MyBike specializes Bicycle { | ||
feature redefines carrier : MyBikeBasket [2]; | ||
feature redefines holdsWheel : MyBikeFork [2]; | ||
connector redefines carrierFixed : MyBikeBasket_Fork_BBF_Link [2] from carrier [*] to holdsWheel [1]; | ||
} | ||
} |
Oops, something went wrong.