Skip to content

v3.0.0

Choose a tag to compare

@hoe-jo hoe-jo released this 14 Oct 12:39
· 48 commits to main since this release
abcb983

Highlights

  • rules_score: the safety analysis is split into failure_modes, fault_trees and safety_analysis. A dependable_element now derives its own AoUs from the safety analysis measures.
  • PlantUML tooling: an element's identifier now comes from its written name, not its alias. Qualified and rooted declarations and free functions in class diagrams are supported.
  • validation: free-function consistency check between PlantUML class design and C++ implementation.

Breaking changes

rules_score: safety analysis and AoUs

  • safety_analysis is split into three rules to avoid a dependency cycle between the fault trees, the measures and the analysis:

    • failure_modes(srcs, deps): the FailureMode records.
    • fault_trees(srcs, deps, fta_package): the fault-tree diagrams and the generated RootCause records.
    • safety_analysis(failure_modes, fault_trees, safety_measures, arch_design): the FMEA page.
  • safety_analysis attributes are renamed:

    Before Now
    failuremodes failure_modes (labels of failure_modes targets)
    root_causes fault_trees (label of a fault_trees target, required)
    safetymeasures safety_measures
    arch_design (optional) arch_design (required)
  • dependable_element.assumptions_of_use is removed. The element's own AoUs are the assumptions_of_use targets listed in the safety_measures of its safety_analysis targets.

    • An assumptions_of_use target that no safety_analysis lists is neither rendered nor forwarded.
    • A dependable_element without a safety analysis has no own AoUs.
  • ScoreReq.AoU.root_causes is now mandatory.

    • .rst aou_req directives need :root_causes: <fta_package>.<RootCause>, ....
    • assumptions_of_use.deps must list the fault_trees target. Other assumptions_of_use targets are rejected there.
    • :root_causes: on non-AoU directives is rejected.
  • aou_forwarding.yaml entries must carry the AoU version: aou_id: "Package.AOU_ID@1". Unknown IDs, version mismatches and duplicate entries fail the build.

  • The default fta_package is now the package and name joined by __ plus _fta (e.g. pkg_sub__name_fta). Set fta_package explicitly if you reference <fta_package>.<RootCause> from elsewhere.

  • Raw .trlc files in safety_measures may only contain Mitigation records. A root cause whose failure mode is missing from failure_modes fails the build.

  • List one safety_analysis per dependability_analysis. Use several dependability_analysis targets for several analyses.

  • The .github/skills/*/SKILL.md files changed. Downstream repos must regenerate their sync_skills goldens.

PlantUML: identifiers are built from the name, not the alias

  • The written name of an element is its identity. The alias (as X) is only a local reference key and no longer takes part in the identifier.

  • Names must be identifier paths: segments of letters, digits and _, separated by . or ::. Free-text names are errors, for every element kind.

  • Sequence participants:

    • The "instance : pkg::Type" label form is removed.
    • Referencing an aliased participant by its name instead of its alias is an error.
  • Diagrams must be migrated.

    ' before
    component "Unit 1" as unit_1 <<unit>>
    participant "Order Service" as OrderService
    
    ' now
    component unit_1 <<unit>>
    participant "orders::OrderService" as OrderService
  • validation matches by this identifier. Component and sequence checks match participant uids, and the Bazel check matches the last segment of the entity id (case-insensitive) against the Bazel target name.

  • See plantuml/parser/docs/element-identifiers.md for the full rules.

New features

PlantUML

  • Qualified names in nested declarations are appended to the enclosing scope (like relative names in C++). A leading . or :: roots the name:
    package outer {
        class core::X     ' outer.core.X
        class ::core::X   ' core.X
    }
    :: is accepted wherever a name is written: declarations, package/namespace names, ports, extends/implements targets and relationship endpoints.
  • Free functions in class diagrams: entity Name <<function>> { + f(...) } groups free functions, which resolve in the enclosing namespace. They are serialized to FlatBuffers. See plantuml/parser/docs/class-diagram.md. (#511)
  • Class-diagram parser and AST simplified. (#517)
  • Clearer sequence-diagram diagnostics for aliased participants and lifecycle commands.

Sphinx clickable_plantuml

  • Links are resolved by uid. A last-segment name index lets a bare unit_1 in a sequence or component diagram find the diagram that defines pkg.comp.unit_1.
  • *.idmap.json gains match_by_name (default false). It is true for component, class and sequence diagrams and false for FTA diagrams.
  • Aliases that are not plain identifiers are quoted in url of "...". Aliases that cannot be written (double quote, line break) are reported with a warning.

validation

  • New ClassDesignImplementationFreeFunctionConsistency check: a free function in the unit design must exist in the C++ implementation with a matching return type, parameters and template parameters. (#518)
  • Clearer errors for bazel_component, sequence and class checks.

Bug fixes

  • validation: a class reachable through several implementation targets (e.g. a shared header) was reported as defined more than once. The duplicate-class error now says "design" or "implementation". (#522)
  • rules_score: units listed directly in dependable_element.components were missing from the generated toctree. (#519)

Build and CI

  • Rust crates are pinned to minor versions (~x.y). Cargo.lock and cargo-bazel-lock.json are added, and the crate repository is renamed from @crates to @crates_score_tooling. (#515)

Migration checklist

  1. Split each safety_analysis into failure_modes, fault_trees and safety_analysis, and rename its attributes.
  2. Remove assumptions_of_use from dependable_element. List the AoU targets in safety_analysis.safety_measures instead.
  3. Add root_causes to every AoU and list the fault_trees target in the deps of each assumptions_of_use target.
  4. Add @<version> to the aou_id entries in aou_forwarding.yaml.
  5. Rewrite PlantUML declarations to identifier-path names. Use an alias only for long or qualified names.
  6. Regenerate the sync_skills goldens.

Full changelog: v2.3.1...v3.0.0