Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
10 changes: 10 additions & 0 deletions docs/internals/requirements/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,16 @@ Architecture Attributes
Docs-as-Code shall enforce that valid safety architectural elements (Safety != QM) can
only be linked against valid safety architectural elements.

.. tool_req:: Check safety architecture view fulfils only safety requirements
:id: tool_req__docs_arch_link_safety_fulfils
:tags: Architecture
:implemented: YES
:version: 1
:satisfies: gd_req__arch_linkage_safety
Comment thread
a-zw marked this conversation as resolved.
:parent_covered: YES

Enforce that valid ASIL architecture views fulfil only ASIL requirements.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we mention the exact attribute here? And what exactly is an architecture view. There was so much confusion int he past about what a "view" is, that I would love to simply have the exact need types here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, should be static and dynamic ...

Copy link
Copy Markdown
Contributor Author

@a-zw a-zw May 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. The classics are feat_arc_sta, comp_arc_sta, logic_arc_int, real_arc_int. I'll add them.

What about logic_arc_int, real_arc_int, und mod_view_sta? At least in tool_req__docs_arch_views they are listed as architecture views.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RolandJentschETAS Maybe it's better to extend tool_req__docs_req_arch_link_safety_to_arch to cover all architecture elements AND views? Otherwise it feels like we spread the same requirement to multiple requirements.


.. tool_req:: Security: Restrict linkage
:id: tool_req__docs_arch_link_security
:tags: Architecture
Expand Down
12 changes: 12 additions & 0 deletions src/extensions/score_metamodel/metamodel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,18 @@ graph_checks:
fulfils: safety != QM
explanation: An QM architecture element cannot implement ASIL requirements.

# req-Id: tool_req__docs_arch_link_safety_fulfils
tool_req__docs_arch_link_safety_fulfils:
needs:
include: feat_arc_sta, feat_arc_dyn, comp_arc_sta, comp_arc_dyn
Comment thread
a-zw marked this conversation as resolved.
condition:
and:
- safety != QM
- status == valid
check:
fulfils: safety != QM
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to be status == valid too.
Otherwise we would be checking also when we link against invalid requirements ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the other comment: We don't require that for other links.

explanation: Safety architecture views must only fulfil safety architecture elements.

# req-Id: tool_req__docs_req_arch_link_safety_to_arch
tool_req__docs_req_arch_link_safety_to_arch:
needs:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
..
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

#CHECK: check_metamodel_graph

.. feat_req:: QM Feature Requirement Parent
:id: feat_req__test__qm_parent
:safety: QM
:status: valid

.. feat_req:: Safety Feature Requirement Parent
:id: feat_req__test__asil_parent
:safety: ASIL_B
:status: valid

.. comp_req:: QM Component Requirement Parent
:id: comp_req__test__qm_parent
:safety: QM
:status: valid

.. comp_req:: Safety Component Requirement Parent
:id: comp_req__test__asil_parent
:safety: ASIL_B
:status: valid


.. Negative Test: Safety feat_arc_sta fulfils a QM feat_req β€” should warn.
#EXPECT: feat_arc_sta__test__safety_to_qm: Parent need `feat_req__test__qm_parent` does not fulfill condition `safety != QM`.
Comment thread
AlexanderLanin marked this conversation as resolved.

.. feat_arc_sta:: Safety view with QM parent
:id: feat_arc_sta__test__safety_to_qm
Comment thread
a-zw marked this conversation as resolved.
:safety: ASIL_B
:security: NO
:status: valid
:fulfils: feat_req__test__qm_parent


.. Positive Test: Safety feat_arc_sta fulfils a safety feat_req β€” should not warn.
#EXPECT-NOT: Safety architecture views must only fulfil safety architecture elements

.. feat_arc_sta:: Safety view with safety parent
:id: feat_arc_sta__test__safety_to_asil
:safety: ASIL_B
:security: NO
:status: valid
:fulfils: feat_req__test__asil_parent


.. Positive Test: QM feat_arc_sta β€” check does not apply to QM elements.
#EXPECT-NOT: Safety architecture views must only fulfil safety architecture elements
Comment thread
a-zw marked this conversation as resolved.
Outdated

.. feat_arc_sta:: QM view with QM parent
:id: feat_arc_sta__test__qm_to_qm
:safety: QM
:security: NO
:status: valid
:fulfils: feat_req__test__qm_parent


.. Negative Test: Safety feat_arc_dyn fulfils a QM feat_req β€” should warn.
#EXPECT: feat_arc_dyn__test__safety_to_qm: Parent need `feat_req__test__qm_parent` does not fulfill condition `safety != QM`.
Comment thread
a-zw marked this conversation as resolved.

.. feat_arc_dyn:: Safety dynamic view with QM parent
:id: feat_arc_dyn__test__safety_to_qm
:safety: ASIL_B
:security: NO
:status: valid
:fulfils: feat_req__test__qm_parent


.. Positive Test: Safety feat_arc_dyn fulfils a safety feat_req β€” should not warn.
#EXPECT-NOT: Safety architecture views must only fulfil safety architecture elements

.. feat_arc_dyn:: Safety dynamic view with safety parent
:id: feat_arc_dyn__test__safety_to_asil
:safety: ASIL_B
:security: NO
:status: valid
:fulfils: feat_req__test__asil_parent


.. Positive Test: QM feat_arc_dyn β€” check does not apply to QM elements.
#EXPECT-NOT: Safety architecture views must only fulfil safety architecture elements
Comment thread
a-zw marked this conversation as resolved.
Outdated
Comment thread
a-zw marked this conversation as resolved.
Outdated

.. feat_arc_dyn:: QM dynamic view with QM parent
:id: feat_arc_dyn__test__qm_to_qm
:safety: QM
:security: NO
:status: valid
:fulfils: feat_req__test__qm_parent


.. Negative Test: Safety comp_arc_sta fulfils a QM comp_req β€” should warn.
#EXPECT: comp_arc_sta__test__safety_to_qm: Parent need `comp_req__test__qm_parent` does not fulfill condition `safety != QM`.
Comment thread
a-zw marked this conversation as resolved.

.. comp_arc_sta:: Safety component view with QM parent
:id: comp_arc_sta__test__safety_to_qm
:safety: ASIL_B
:security: NO
:status: valid
:fulfils: comp_req__test__qm_parent


.. Positive Test: Safety comp_arc_sta fulfils a safety comp_req β€” should not warn.
#EXPECT-NOT: Safety architecture views must only fulfil safety architecture elements

.. comp_arc_sta:: Safety component view with safety parent
:id: comp_arc_sta__test__safety_to_asil
:safety: ASIL_B
:security: NO
:status: valid
:fulfils: comp_req__test__asil_parent


.. Negative Test: Safety comp_arc_dyn fulfils a QM comp_req β€” should warn.
#EXPECT: comp_arc_dyn__test__safety_to_qm: Parent need `comp_req__test__qm_parent` does not fulfill condition `safety != QM`.
Comment thread
a-zw marked this conversation as resolved.

.. comp_arc_dyn:: Safety dynamic component view with QM parent
:id: comp_arc_dyn__test__safety_to_qm
:safety: ASIL_B
:security: NO
:status: valid
:fulfils: comp_req__test__qm_parent


.. Positive Test: Safety comp_arc_dyn fulfils a safety comp_req β€” should not warn.
#EXPECT-NOT: Safety architecture views must only fulfil safety architecture elements

.. comp_arc_dyn:: Safety dynamic component view with safety parent
:id: comp_arc_dyn__test__safety_to_asil
:safety: ASIL_B
:security: NO
:status: valid
:fulfils: comp_req__test__asil_parent
Loading