From 74c0371e3fc3b544d0fb1804f9853f87068ffcc4 Mon Sep 17 00:00:00 2001 From: Jochen Hoenle <173445474+hoe-jo@users.noreply.github.com> Date: Tue, 12 May 2026 17:41:09 +0200 Subject: [PATCH] [rules score] enhance docs build --- .../safety_analysis.md | 0 .../private/architectural_design.bzl | 2 +- .../dependable_element_index.template.rst | 23 ++++++++++++++++--- .../rules/rules_score/trlc/config/README.rst | 13 +++++++---- 4 files changed, 30 insertions(+), 8 deletions(-) rename bazel/rules/rules_score/{examples/seooc/safety_analysis => docs}/safety_analysis.md (100%) diff --git a/bazel/rules/rules_score/examples/seooc/safety_analysis/safety_analysis.md b/bazel/rules/rules_score/docs/safety_analysis.md similarity index 100% rename from bazel/rules/rules_score/examples/seooc/safety_analysis/safety_analysis.md rename to bazel/rules/rules_score/docs/safety_analysis.md diff --git a/bazel/rules/rules_score/private/architectural_design.bzl b/bazel/rules/rules_score/private/architectural_design.bzl index eabb8b45..b875e2ea 100644 --- a/bazel/rules/rules_score/private/architectural_design.bzl +++ b/bazel/rules/rules_score/private/architectural_design.bzl @@ -154,7 +154,7 @@ def _architectural_design_impl(ctx): # toctree entry in the dependable_element index. rst_wrappers = make_puml_rst_wrappers( ctx, - ctx.files.static + ctx.files.dynamic, + ctx.files.static + ctx.files.dynamic + ctx.files.public_api, ctx.label.name, ctx.file._puml_rst_template, ) diff --git a/bazel/rules/rules_score/templates/dependable_element_index.template.rst b/bazel/rules/rules_score/templates/dependable_element_index.template.rst index a6cc37c7..0035e407 100644 --- a/bazel/rules/rules_score/templates/dependable_element_index.template.rst +++ b/bazel/rules/rules_score/templates/dependable_element_index.template.rst @@ -19,19 +19,36 @@ Assumed System -------------- .. toctree:: - :maxdepth: 2 + :maxdepth: 1 + :caption: Assumed System Requirements {assumed_system_requirements} + +.. toctree:: + :maxdepth: 1 + :caption: Assumptions of Use + {assumptions_of_use} Software Architectural Level ---------------------------- .. toctree:: - :maxdepth: 2 + :maxdepth: 1 + :caption: Feature Requirements {feature_requirements} + +.. toctree:: + :maxdepth: 1 + :caption: Architectural Design + {architectural_design} + +.. toctree:: + :maxdepth: 1 + :caption: Dependability Analysis + {dependability_analysis} @@ -39,7 +56,7 @@ Components ---------- .. toctree:: - :maxdepth: 2 + :maxdepth: 1 {components} diff --git a/bazel/rules/rules_score/trlc/config/README.rst b/bazel/rules/rules_score/trlc/config/README.rst index 0ae98ad0..c558e82f 100644 --- a/bazel/rules/rules_score/trlc/config/README.rst +++ b/bazel/rules/rules_score/trlc/config/README.rst @@ -27,7 +27,7 @@ Type Hierarchy ├── description: String ├── version: Integer ├── note: optional String - ├── status: Status {valid, invalid} + ├── status: Status {valid, invalid} -- frozen to "valid" │ └── RequirementSafety (abstract, extends Requirement) ├── safety: Asil {QM, B, D} @@ -36,10 +36,12 @@ Type Hierarchy │ └── rationale: String │ ├── FeatReq - │ └── derived_from: list of ReqId + │ └── derived_from: AssumedSystemReqId[1..*] │ └── CompReq - └── derived_from: list of ReqId + ├── derived_from (optional): FeatReqId[1..*] + ├── fulfilledBy (optional): String + └── mitigates (optional): String Usage ----- @@ -59,6 +61,9 @@ Reference this metamodel as ``spec`` in ``trlc_requirements`` rules: Traceability ------------ -``ReqId`` tuples (e.g., ``FeatReq.derived_from``) connect requirements across levels: +Typed tuple IDs connect requirements across levels: ``AssumedSystemReq`` → ``FeatReq`` → ``CompReq``, forming the traceability chain enforced by LOBSTER at the dependable-element level. + +- ``FeatReq.derived_from`` accepts ``AssumedSystemReqId`` tuples (mandatory) +- ``CompReq.derived_from`` accepts ``FeatReqId`` tuples (optional)