-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathFeatures.kerml
More file actions
72 lines (50 loc) · 1.58 KB
/
Features.kerml
File metadata and controls
72 lines (50 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package Features {
classifier A;
classifier B;
feature f;
feature g;
feature x typed by A, B references f subsets g;
// Equivalent declaration:
feature x1 subsets g typed by A subsets f typed by B;
classifier C;
feature y;
featuring F of y by C;
feature y1 : A :> x featured by C;
feature z unions f, g disjoint from y;
feature z1 intersects f,g differences y, y1, z;
classifier Person;
abstract feature person : Person; // Default subsets Base::things.
feature child subsets person;
feature adult differences person, child;
classifier Fuel;
classifier Tanks {
feature fuelInPort {
in feature fuelFlow : Fuel;
}
feature fuelOutPort ~ fuelInPort;
}
feature parent[1..2] : Person;
feature mother : Person[1] :> parent;
specialization t1 typing f typed by B;
specialization t2 typing g : A;
specialization Sub subset parent subsets person;
specialization subset mother subsets parent;
classifier LegalRecord {
feature guardian[1];
}
class RegisteredAsset {
composite var feature identifier[0..1];
}
classifier Vehicle :> RegisteredAsset {
derived var feature vin[1] = identifier;
var feature v : Vehicle;
binding vin = v.vin;
var feature w = v.vin;
feature x = vin;
binding x = vin;
}
feature legalIdentification;
specialization Redef redefinition LegalRecord::guardian redefines parent;
specialization redefinition Vehicle::vin redefines RegisteredAsset::identifier;
redefinition Vehicle::vin redefines legalIdentification;
}