Skip to content

Commit df2504d

Browse files
castlerCopilot
andcommitted
[rules score] add tool requirements and documentation for AoU forwarding
Tool requirements (TRLC): - Add Forward_AoU_To_Dependees use case - Add potential errors: AoU_Silently_Dropped, Invalid_Forwarding_YAML_Accepted - Add tool requirements: Forward_Own_AoUs_To_Dependees, Chain_Forward_Received_AoUs, Reject_Unknown_AoU_In_Forwarding_YAML, Include_Forwarded_AoUs_In_Traceability User documentation: - Extend requirements.md with AoU Forwarding section explaining both automatic and chain-forwarding mechanisms - Add aou_forwarding attribute to dependable_element in rule_reference.rst - Add Forwarded AoUs to the dependable element concept in general.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7597402 commit df2504d

6 files changed

Lines changed: 149 additions & 0 deletions

File tree

bazel/rules/rules_score/docs/requirements/potential_errors.trlc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,30 @@ section "Potential Errors" {
9797

9898
}
9999

100+
section "AoU Forwarding" {
101+
102+
ToolQualification.PotentialError AoU_Silently_Dropped {
103+
description = '''
104+
An assumption of use defined by a dependency is not forwarded
105+
to the dependee, causing the integrating project to be unaware
106+
of a condition it must satisfy.
107+
'''
108+
impacts = ["Safety-relevant assumption not communicated to integrator"]
109+
affects = [Forward_AoU_To_Dependees, Gate_Traceability_At_Test_Time]
110+
impact_type = ToolQualification.Impact_Type.Safety
111+
}
112+
113+
ToolQualification.PotentialError Invalid_Forwarding_YAML_Accepted {
114+
description = '''
115+
A chain-forwarding YAML file that references a non-existent
116+
AoU identifier is accepted without error, causing the build to
117+
succeed while the intended forwarding does not take effect.
118+
'''
119+
impacts = ["Chain-forwarded AoU missing from traceability report"]
120+
affects = [Forward_AoU_To_Dependees]
121+
impact_type = ToolQualification.Impact_Type.Safety
122+
}
123+
124+
}
125+
100126
}

bazel/rules/rules_score/docs/requirements/tool_requirements.trlc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,57 @@ section "Tool Requirements" {
123123

124124
}
125125

126+
section "AoU Forwarding" {
127+
128+
ToolQualification.ToolRequirement Forward_Own_AoUs_To_Dependees {
129+
description = '''
130+
The dependable_element rule shall automatically include lobster
131+
traceability entries for all assumptions of use defined by its
132+
direct dependencies in the dependee's traceability report as
133+
a "Forwarded AoUs" tier.
134+
'''
135+
mitigates = [AoU_Silently_Dropped]
136+
derived_from = [Forward_AoU_To_Dependees]
137+
satisfied_by = Tools.Bazel
138+
}
139+
140+
ToolQualification.ToolRequirement Chain_Forward_Received_AoUs {
141+
description = '''
142+
The dependable_element rule shall support an aou_forwarding
143+
attribute pointing to a YAML file that selects which received
144+
AoUs are forwarded further to elements that depend on this
145+
element. Each entry in the YAML shall require a mandatory
146+
justification field.
147+
'''
148+
mitigates = [AoU_Silently_Dropped]
149+
derived_from = [Forward_AoU_To_Dependees]
150+
satisfied_by = Tools.Bazel
151+
}
152+
153+
ToolQualification.ToolRequirement Reject_Unknown_AoU_In_Forwarding_YAML {
154+
description = '''
155+
The AoU forwarding tool shall exit with a non-zero return code
156+
when the forwarding YAML references an AoU identifier that does
157+
not exist in the set of received AoUs, preventing silent
158+
misconfiguration.
159+
'''
160+
mitigates = [Invalid_Forwarding_YAML_Accepted]
161+
derived_from = [Forward_AoU_To_Dependees]
162+
satisfied_by = Tools.Bazel
163+
}
164+
165+
ToolQualification.ToolRequirement Include_Forwarded_AoUs_In_Traceability {
166+
description = '''
167+
The lobster traceability report of a dependee shall include
168+
forwarded AoUs as traceable items so that the existing
169+
lobster-ci-report test fails when forwarded AoUs are not
170+
handled (linked to a requirement, test, or justification).
171+
'''
172+
mitigates = [AoU_Silently_Dropped]
173+
derived_from = [Forward_AoU_To_Dependees, Gate_Traceability_At_Test_Time]
174+
satisfied_by = Tools.Lobster
175+
}
176+
177+
}
178+
126179
}

bazel/rules/rules_score/docs/requirements/use_cases.trlc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,17 @@ section "Use Cases" {
142142
affected_tools = [Tools.Docs, Tools.Bazel]
143143
}
144144

145+
ToolQualification.UseCase Forward_AoU_To_Dependees {
146+
description = '''
147+
As a system integrator I want assumptions of use defined by a
148+
dependable element to be automatically forwarded to the elements
149+
that depend on it so that the integrating project is made aware
150+
of all conditions it must satisfy — including those originating
151+
from transitive dependencies.
152+
'''
153+
affected_tools = [Tools.Bazel, Tools.Lobster]
154+
}
155+
145156
ToolQualification.UseCase Validate_Architecture_Specification_Documents {
146157
description = '''
147158
As a software architect I want the build to verify that architectural

bazel/rules/rules_score/docs/rule_reference.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,10 @@ and scope checks at build/test time.
625625
- label list
626626
- no
627627
- Other ``dependable_element`` targets for cross-referencing and HTML merging (default ``[]``)
628+
* - ``aou_forwarding``
629+
- label
630+
- no
631+
- A YAML file selecting which *received* AoUs to chain-forward to elements that depend on this one. Each entry requires an ``aou_id`` and a ``justification``. Own AoUs (from ``assumptions_of_use``) are always forwarded automatically.
628632
* - ``maturity``
629633
- string
630634
- no

bazel/rules/rules_score/docs/user_guide/general.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ A *dependable element* is the top-level unit of certification work. It bundles:
2626
| Assumed System Requirements | System-level requirements given as constraints from the surrounding context |
2727
| Feature Requirements | Functional and safety requirements for this element |
2828
| Assumptions of Use | Conditions the integrating project must satisfy |
29+
| Forwarded AoUs | Assumptions of use received from dependencies that must be handled or forwarded further |
2930
| Architectural Design | Software Architectural Design in PlantUML |
3031
| Software Units and Components | Implementation targets linked to their design |
3132
| Dependability Analysis | FMEA, FTA diagrams and control measures |
@@ -60,6 +61,7 @@ dependable_element(
6061
name = "safety_software_seooc_example",
6162
architectural_design = ["//bazel/rules/rules_score/examples/seooc/design:sample_seooc_design"],
6263
assumptions_of_use = [],
64+
aou_forwarding = "aou_forwarding.yaml", # chain-forward selected received AoUs
6365
components = [":component_example"],
6466
dependability_analysis = [":sample_dependability_analysis"],
6567
integrity_level = "B",

bazel/rules/rules_score/docs/user_guide/requirements.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,59 @@ ScoreReq.AoU AOU_001 {
129129
}
130130
```
131131

132+
### AoU Forwarding
133+
134+
When a dependable element depends on another via `deps`, all **assumptions of use** defined by the dependency are automatically forwarded to the dependee. This ensures the integrating project is made aware of every condition it must satisfy — even those originating from transitive dependencies.
135+
136+
There are two forwarding mechanisms:
137+
138+
**Automatic forwarding (own AoUs)**
139+
All AoUs declared in a dependable element's `assumptions_of_use` attribute are automatically forwarded to every element that lists it in `deps`. No configuration is needed.
140+
141+
**Chain-forwarding (received AoUs)**
142+
When a dependable element receives forwarded AoUs from its own dependencies, it can selectively forward them further by providing an `aou_forwarding` YAML file. Each entry requires a mandatory justification explaining *why* this AoU is forwarded rather than handled locally:
143+
144+
```yaml
145+
# aou_forwarding.yaml
146+
forwarded_aous:
147+
- aou_id: "OtherLibrary.TimingConstraint"
148+
justification: >
149+
This timing constraint originates from the underlying library and
150+
must be satisfied by the final system integrator who controls scheduling.
151+
```
152+
153+
**Handling forwarded AoUs in the dependee**
154+
Forwarded AoUs appear as a "Forwarded AoUs" tier in the dependee's lobster traceability report. The dependee must handle each forwarded AoU by one of:
155+
156+
- Linking it to a component requirement that addresses the assumption
157+
- Linking it to a test that verifies the assumption is met
158+
- Chain-forwarding it further (with justification) to its own dependees
159+
160+
If a forwarded AoU is not handled, the `bazel test` traceability check will fail.
161+
162+
**Example: three-level forwarding chain**
163+
164+
```
165+
other_seooc → defines AoU: TimingConstraint
166+
↑ (deps)
167+
middle_seooc → auto-forwards TimingConstraint
168+
- also chain-forwards it via aou_forwarding.yaml
169+
↑ (deps)
170+
integrator_seooc → receives TimingConstraint, must handle it
171+
```
172+
173+
```{code-block} starlark
174+
:caption: middle_seooc/BUILD
175+
176+
dependable_element(
177+
name = "middle_seooc",
178+
assumptions_of_use = [":my_aous"],
179+
aou_forwarding = "aou_forwarding.yaml",
180+
deps = ["//other:other_seooc"],
181+
...
182+
)
183+
```
184+
132185
## Allocation of Requirements to Architectural Elements
133186

134187
Requirements are allocated to architectural elements differently depending on their level:

0 commit comments

Comments
 (0)