-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathtraceability.sysml
More file actions
179 lines (159 loc) · 4.5 KB
/
Copy pathtraceability.sysml
File metadata and controls
179 lines (159 loc) · 4.5 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
// Requirement traceability in one document: the requirements as a list, a
// matrix with every requirement's satisfiers, verifiers and verification
// count on one row, and the verdicts of checking the spacecraft against them.
package Traceability {
private import DocumentQueries::*;
private import KerML::Root::Element;
private import ScalarValues::*;
// ---- The system model the report is generated from ----
part def Bus {
attribute dryMass : Real;
}
part def Antenna {
attribute gain : Real;
}
part def Radiator {
attribute area : Real;
}
requirement def MassLimit {
subject bus : Bus;
require constraint { bus.dryMass <= 1200.0 }
}
requirement def DownlinkGain {
subject antenna : Antenna;
require constraint { antenna.gain >= 40.0 }
}
requirement def HeatRejection {
subject radiator : Radiator;
require constraint { radiator.area >= 2.0 }
}
requirement def Passivation;
part specification {
requirement <'SC-1'> massLimit : MassLimit {
doc /* The bus dry mass shall not exceed 1200 kg. */
}
requirement <'SC-2'> downlinkGain : DownlinkGain {
doc /* The high-gain antenna shall provide at least 40 dBi. */
}
requirement <'SC-3'> heatRejection : HeatRejection {
doc /* The radiator shall provide at least 2 m² of rejection area. */
}
requirement <'SC-4'> passivation : Passivation {
doc /* The spacecraft shall be passivated at end of mission. */
}
}
part spacecraft {
part bus : Bus {
attribute :>> dryMass = 1150.0;
}
part antenna : Antenna {
attribute :>> gain = 42.5;
}
part radiator : Radiator {
attribute :>> area = 1.6;
}
satisfy specification.massLimit by bus;
satisfy specification.downlinkGain by antenna;
satisfy specification.heatRejection by radiator;
}
verification def MassMeasurement {
subject bus : Bus;
VerificationCases::PassIf(bus.dryMass <= 1200.0)
}
verification massMeasurement : MassMeasurement {
subject bus = spacecraft.bus;
objective {
verify specification.massLimit;
}
}
verification def GainTest {
subject antenna : Antenna;
VerificationCases::PassIf(antenna.gain >= 40.0)
}
verification gainTest : GainTest {
subject antenna = spacecraft.antenna;
objective {
verify specification.downlinkGain;
}
}
verification gainAnalysis : GainTest {
subject antenna = spacecraft.antenna;
objective {
verify specification.downlinkGain;
}
}
// ---- Document queries ----
calc def Requirements :> Query {
in root : Element;
Project(
source = WhereType(
source = Descendants(source = root, maxDepth = 1),
type = "RequirementUsage"
),
properties = ("shortName", "name", "documentation")
)
}
calc def TraceMatrix :> Query {
in root : Element;
Project(
source = WhereType(
source = Descendants(source = root, maxDepth = 1),
type = "RequirementUsage"
),
properties = ("shortName", "name"),
columns = (
RelatedColumn(name = "satisfiedBy", relationshipKind = "satisfaction", direction = "incoming", maxDepth = 1),
RelatedColumn(name = "verifiedBy", relationshipKind = "verification", direction = "incoming", maxDepth = 1),
RelatedColumn(
name = "verifications",
relationshipKind = "verification",
direction = "incoming",
maxDepth = 1,
aggregate = "count"
)
)
)
}
calc def Checks :> Query {
in root : Element;
Project(
source = Verdicts(source = root),
properties = ("kind", "name", "path", "verdict", "condition")
)
}
// ---- The document definition ----
part def TraceabilityReport :> Document {
attribute redefines title = "Spacecraft Requirement Traceability";
part intro : Paragraph {
attribute redefines text = "Every requirement, what satisfies and verifies it, and whether the spacecraft meets it.";
}
part requirements : Section {
attribute redefines title = "Requirements";
part list : Definitions {
attribute redefines term = "shortName";
attribute redefines description = "documentation";
calc rows : Requirements {
in root = specification;
}
}
}
part matrix : Section {
attribute redefines title = "Traceability Matrix";
part table : Table {
attribute redefines caption = "Requirements with their satisfiers and verifiers";
calc rows : TraceMatrix {
in root = specification;
}
}
}
part verdicts : Section {
attribute redefines title = "Verdicts";
part table : Table {
attribute redefines caption = "Checks of the spacecraft against its requirements";
calc rows : Checks {
in root = spacecraft;
}
}
}
}
}