Skip to content

Commit 54b7d08

Browse files
committed
Revert fulfils to satisfies on arch elements, add satisfied_by for requirements
1 parent bab1245 commit 54b7d08

4 files changed

Lines changed: 19 additions & 26 deletions

File tree

docs/internals/requirements/requirements.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,7 @@ Architecture Attributes
793793
.. :derived_from: gd_req__impl_dynamic_diagram
794794
795795
.. Provide needs type ``dd_dyn`` for dynamic diagrams showing unit interactions as UML.
796+
796797
Testing
797798
#######
798799

@@ -1246,7 +1247,3 @@ Overview of Tool to Process Requirements
12461247

12471248
.. needextend:: c.this_doc() and type == 'tool_req' and not status
12481249
:status: valid
1249-
1250-
.. needextend:: "metamodel.yaml" in source_code_link
1251-
:+derived_from: tool_req__docs_metamodel
1252-
:+tags: config

src/extensions/score_metamodel/metamodel.yaml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ needs_types:
298298
derived_from: stkh_req
299299
satisfies: stkh_req
300300
belongs_to: feat # for evaluation
301+
satisfied_by: feat # new preferred name for belongs_to
302+
# req-Id: tool_req__docs_req_link_covers_aou
303+
covers: aou_req
301304
optional_options:
302305
codelink: ^.*$
303306
testlink: ^.*$
@@ -309,9 +312,6 @@ needs_types:
309312
# req-Id: tool_req__docs_req_attr_validity_correctness
310313
valid_from: ^v(0|[1-9]\d*)\.(0|[1-9]\d*)(\.(0|[1-9]\d*))?$
311314
valid_until: ^v(0|[1-9]\d*)\.(0|[1-9]\d*)(\.(0|[1-9]\d*))?$
312-
optional_links:
313-
# req-Id: tool_req__docs_req_link_covers_aou
314-
covers: aou_req
315315
tags:
316316
- requirement
317317
- requirement_excl_process
@@ -338,6 +338,9 @@ needs_types:
338338
# TODO: make derived_from mandatory once downstream repos migrate from satisfies
339339
derived_from: feat_req
340340
satisfies: feat_req
341+
satisfied_by: comp # new preferred name for belongs_to
342+
# req-Id: tool_req__docs_req_link_covers_aou
343+
covers: aou_req
341344
optional_options:
342345
codelink: ^.*$
343346
testlink: ^.*$
@@ -346,9 +349,6 @@ needs_types:
346349
# req-Id: tool_req__docs_req_attr_testcov
347350
testcovered: ^(YES|NO)$
348351
hash: ^.*$
349-
optional_links:
350-
# req-Id: tool_req__docs_req_link_covers_aou
351-
covers: aou_req
352352
tags:
353353
- requirement
354354
- requirement_excl_process
@@ -452,8 +452,6 @@ needs_types:
452452
includes: ^logic_arc_int(_op)*__.+$
453453
belongs_to: feat # make it mandatory for evaluation
454454
optional_links:
455-
# TODO: make satisfies mandatory once downstream repos migrate from fulfils
456-
satisfies: feat_req
457455
fulfils: feat_req
458456
tags:
459457
- architecture_element
@@ -476,8 +474,6 @@ needs_types:
476474
mandatory_links:
477475
belongs_to: feat
478476
optional_links:
479-
# TODO: make satisfies mandatory once downstream repos migrate from fulfils
480-
satisfies: feat_req
481477
fulfils: feat_req
482478
tags:
483479
- architecture_view
@@ -500,7 +496,6 @@ needs_types:
500496
status: ^(valid|invalid)$
501497
optional_links:
502498
includes: logic_arc_int_op
503-
satisfies: feat_req
504499
fulfils: feat_req
505500
tags:
506501
- architecture_element
@@ -609,8 +604,6 @@ needs_types:
609604
belongs_to: comp
610605
optional_links:
611606
uses: logic_arc_int, real_arc_int_op
612-
# TODO: make satisfies mandatory once downstream repos migrate from fulfils
613-
satisfies: comp_req
614607
fulfils: comp_req
615608
tags:
616609
- architecture_view
@@ -632,8 +625,6 @@ needs_types:
632625
mandatory_links:
633626
belongs_to: comp
634627
optional_links:
635-
# TODO: make satisfies mandatory once downstream repos migrate from fulfils
636-
satisfies: comp_req
637628
fulfils: comp_req
638629
tags:
639630
- architecture_view
@@ -655,7 +646,6 @@ needs_types:
655646
status: ^(valid|invalid)$
656647
language: ^(cpp|rust)$
657648
optional_links:
658-
satisfies: comp_req
659649
fulfils: comp_req
660650
tags:
661651
- architecture_element
@@ -1021,6 +1011,10 @@ needs_extra_links:
10211011
incoming: has
10221012
outgoing: belongs to
10231013

1014+
satisfied_by:
1015+
incoming: satisfies
1016+
outgoing: satisfied by
1017+
10241018
satisfies:
10251019
incoming: satisfied by
10261020
outgoing: satisfies
@@ -1099,7 +1093,6 @@ graph_checks:
10991093
include: feat_arc_sta, logic_arc_int, logic_arc_int_op, comp_arc_sta, real_arc_int, real_arc_int_op
11001094
condition: safety == QM
11011095
check:
1102-
satisfies: safety != QM
11031096
fulfils: safety != QM
11041097
explanation: An QM architecture element cannot implement ASIL requirements.
11051098

src/extensions/score_metamodel/tests/rst/architecture/architecture_tests.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
:security: YES
4646
:safety: ASIL_B
4747
:status: invalid
48-
:satisfies: feat_req__test_feature_1__test_req_1
48+
:fulfils: feat_req__test_feature_1__test_req_1
4949
:includes: logic_arc_int__test_feature_1__test_interface_1
5050

5151
.. needarch
@@ -59,7 +59,7 @@
5959
:security: YES
6060
:safety: ASIL_B
6161
:status: invalid
62-
:satisfies: feat_req__test_feature_1__test_req_1
62+
:fulfils: feat_req__test_feature_1__test_req_1
6363

6464
Put here a sequence diagram
6565

@@ -116,7 +116,7 @@ Component 1
116116
:safety: ASIL_B
117117
:security: YES
118118
:status: invalid
119-
:satisfies: comp_req__test_component_1__requirement_1
119+
:fulfils: comp_req__test_component_1__requirement_1
120120
:implements: logic_arc_int__test_feature_1__test_interface_1
121121
:belongs_to: comp__test_sub_component_1
122122

src/extensions/score_metamodel/tests/rst/graph/test_metamodel_graph.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353

5454
.. Negative Test: Child requirement QM. Parent requirement is `ASIL_B`. Child cant fulfill the safety level of the parent.
55-
#EXPECT[+2]: QM requirements cannot satisfy ASIL requirements.
55+
#EXPECT[+2]: QM requirements cannot be derived from ASIL requirements.
5656

5757
.. comp_req:: Child requirement 3
5858
:id: feat_req__qm_child_with_asil_parent
@@ -63,13 +63,16 @@
6363

6464

6565
.. Parent requirement does not exist
66-
#EXPECT: unknown outgoing link
66+
#EXPECT[+2]: unknown outgoing link
6767

6868
.. feat_req:: Child requirement 4
6969
:id: feat_req__linking_to_unknown_parent
7070
:safety: ASIL_B
7171
:status: valid
7272
:derived_from: feat_req__parent0__abcd
73+
74+
75+
7376
.. Mitigation of Safety Analysis (FMEA and DFA) shall be checked. Mitigation shall have the same or higher safety level than the analysed item.
7477
.. Negative Test: Linked to a mitigation that is lower than the safety level of the analysed item.
7578
#EXPECT[+2]: feat_saf_dfa__child__5: Parent need `feat_req__parent__QM` does not fulfill condition `safety != QM`. Explanation: An ASIL_B safety requirement must link to a ASIL_B requirement. Please ensure that the linked requirements safety level is not QM and it's status is valid.

0 commit comments

Comments
 (0)