Repository navigation
Highlights
rules_score: root causes are argued byRootCauseAssessmentrecords. They replaceMitigationandSafetyMeasure.rules_score: failure modes trace to concrete public API methods, generated from the public API class diagrams.rules_score: formal RST test specifications, and Given/When/Then text derived from gtest test names.rules_score: documentation is keyed by the full target label, so equal target names in different packages or repositories no longer collide.rules_score:$TransferInGatelinks fault trees, requirement ASILs are checked, and the certified-scope check is repository-aware.- PlantUML and
validation: class template parameters and specializations. cr_checker://and/* */headers are interchangeable.
Breaking changes
These changes require edits to build files, TRLC files or PlantUML diagrams.
rules_score: root cause assessments replace mitigations and safety measures (#534)
-
New TRLC type
ScoreReq.RootCauseAssessmentwithroot_causes,measures,safety,rationaleandversion. An assessment withoutmeasuresargues that the root cause does not apply. -
Removed:
ScoreReq.Mitigation,ScoreReq.SafetyMeasure,AoU.root_causes(and:root_causes:in.rstaou_reqdirectives) and root causes inCompReq.derived_from. -
Every
CompReq.derived_fromentry needs a version:Package.Item@<version>. -
safety_analysistakes the assessment files in the new attributeassessments.safety_measuresmay only containassumptions_of_useandcomponent_requirementstargets. -
assumptions_of_useandcomponent_requirementstargets no longer need thefault_treestarget indeps. -
The traceability report has the levels "Assumptions of Use" and "Root Cause Assessments" instead of "Safety Measures". Custom LOBSTER templates must use
{OWN_AOU_BLOCK}and{ASSESSMENT_BLOCK}instead of{SAFETYMEASURES_BLOCK}.# before safety_analysis( ... safety_measures = [ "//docs:sample_aous", "sample_safety_analysis_safetymeasures.trlc", ], ) # now safety_analysis( ... assessments = ["sample_safety_analysis_assessments.trlc"], safety_measures = ["//docs:sample_aous"], )
ScoreReq.RootCauseAssessment ShmemCreatedWrongNameAssessed { root_causes = [sample_safety_analysis_fta.ShmemCreatedWrongName] measures = [SampleType.SampleAoU@1] safety = ScoreReq.Asil.B rationale = "The user prevents the wrong name through the assumption of use." version = 1 }
rules_score: failure modes reference public API methods (#555)
-
FailureMode.interfaceis a list ofScoreReq.ApiMethodrecords instead of a free-text string. The records are generated from thepublic_apiclass diagrams of anarchitectural_design: one per public method name (overloads collapsed) and one per free function. -
architectural_designhas the new attributepackage, the TRLC package of the generated records. It is required withpublic_api.pumldiagrams and rejected without them. -
failure_modesmust list thearchitectural_designindeps, and the failure mode filesimportits package. -
safety_analysis.arch_designis removed. -
The traceability level "Architecture" is replaced by "Public API". Custom LOBSTER templates must use
{PUBLIC_API_SOURCES}instead of{ARCH_SOURCES}.# before architectural_design( name = "sample_seooc_design", public_api = ["public_api.puml"], ) failure_modes( name = "sample_failure_modes", srcs = ["failure_modes.trlc"], ) safety_analysis( ... arch_design = ":sample_seooc_design", ) # now architectural_design( name = "sample_seooc_design", package = "sample_seooc_api", public_api = ["public_api.puml"], ) failure_modes( name = "sample_failure_modes", srcs = ["failure_modes.trlc"], deps = [":sample_seooc_design"], ) safety_analysis( ... )
// before interface = "safety_software_seooc_example.SampleLibraryAPI.GetNumber" // now import sample_seooc_api ... interface = [sample_seooc_api.safety_software_seooc_example_SampleLibraryAPI_GetNumber]
rules_score: documentation is keyed by the full target label (#542)
- Pages and sources of units, components, unit designs, dependency modules, architectural designs and test-case coverage are keyed by
<repo>/<package>/<name>(_mainfor the main repository) instead of the bare target name.units/<label path>/index.rst,units/<label path>/<diagram>.puml,units/<label path>/<design>.rst.inccomponents/<label path>/index.rst,components/<label path>/requirements/...- Page titles are the full label.
- The HTML of a dependency module is merged to
<repo>/<package>/<dep>/instead of<dep>/. Links to published dependency pages change.
- Custom rules that consume the providers must adapt:
SphinxModuleInfo.transitive_modulesandSphinxNeedsInfo.needs_modulesare structs withpath(the label path) instead ofname.UnitInfo.dependent_labelsandComponentInfo.dependent_labelsare depsets of structs(unit_label, dependencies), one per unit, instead of depsets of labels (#533).
PlantUML: the provided-interface binding )- is removed (#544)
-
Component )- Interfaceis rejected. Write the provided binding as-,--or--(). Layout and style hints (-up-,--[bold]--) stay allowed.' before Gateway )- ResponseApi ' now Gateway - ResponseApi
-
A bare
--between a component and an interface is a provided binding and no longer an association.
Skills
- The
SKILL.mdfiles ofrules-score,score-architecture,score-requirements,score-safety-analysisandscore-testingchanged. Downstream repositories must regenerate theirsync_skillsgoldens.
Stricter validations
These changes need no new syntax, but input that built before can now fail.
TRLC requirement ASILs (#540)
- A
FeatReqorCompReqmust not have a lower ASIL than any requirement it is derived from. An upstreamASIL_BforbidsQM, an upstreamASIL_DrequiresASIL_D. trlcis raised from 3.0.1 to 3.1.1. Raise it if you pin an older version.
Root cause assessments (#534)
Errors in the safety_analysis build:
- A root cause is listed by more than one assessment.
- An assessment lists a root cause that no
fault_treestarget generates, or a measure that is not an own AoU or aCompReqofsafety_measures. - The
safetyof an assessment is below the ASIL of a failure mode of its root causes or above the ASIL of a listed measure.
Failures of the traceability report of the dependable_element:
- A root cause has no assessment.
- An own AoU is not listed as a measure of any assessment.
Certified scope (#533)
unit.scopeentries are resolved relative to the package of the unit and matched together with the repository: an exact target,:__pkg__or:__subpackages__in the same repository. A scope in another repository no longer matches by package path alone. Add the repository, for example@seooc//:sample_library.- A component no longer implicitly certifies nested components. A unit implicitly certifies its own
implementation. - The message is
Unit <unit label> depends on <dependency label>, but the dependency is not in any certified scope (<reason>). - Violations warn with
maturity = "development"and fail otherwise, so release builds can fail on dependencies the old check accepted.
Documentation names (#542)
- Basenames of design diagrams and images must be unique within a unit.
design_namemust be unique within its parent component (case-insensitive).
Public API diagrams (#555)
- The
public_apidiagrams of anarchitectural_designmust be class diagrams. - Public API classes must not declare conversion operators,
new,deleteorco_await. The parser fails withUnsupportedOperator.
$TransferInGate (#545)
$TransferInGate(alias, connection)connects to the fault tree of the failure modeconnection. The build fails when:aliasis not the fully qualified name of a failure mode (for example"Transfer1").- The target is unknown or ambiguous.
- The transfers form a cycle, including a transfer to the own tree.
- The gate alias collides with another node of the same diagram.
- Transfers across different
fault_treestargets are not supported. - A root cause inherited through a transfer is assessed once. The
safetyof its assessment must be at least the ASIL of all failure modes of all trees it belongs to.
New features
rules_score
- Failure-mode-to-API traceability (#555): the report traces failure modes to the public API methods in the "Public API" level. The safety analysis page shows one badge per guideword.
- Formal test specifications (#550): the new rule
test_specificationtakes an RST file with a Test Goal, an optional Test Focus and at least one Test Step (optional Precondition, Action, Expected). A unit lists them intest_specs, a test refers to one withRecordProperty("test-spec", "//pkg:label"). The coverage lock gets aspeckey per test case, which must not be mixed with Given/When/Then keys. - Given/When/Then from test names (#505): a test named
[<Prefix>_]Given<X>[_When<Y>]_(Expect|Then)<Z>does not need thegiven/when/thenproperties. This needs alobsterversion with--derive-gwt-from-test-name. Withlobster1.0.6 only the properties are used. A test case in a coverage lock needs a Given and a Then. The When is optional.
PlantUML and validation
- Class template parameters (type, non-type, template-template, parameter packs, optional names) are modeled in PlantUML and compared with the C++ implementation by position, count, kind and pack marker. An omitted design name is unconstrained, an explicit name must match (#532).
- Partial and explicit specializations are matched to the design by their fully qualified base name. Their template arguments are not compared. Explicit instantiations are ignored (#532).
cr_checker
- C, C++, Rust and TRLC headers may use either
//or/* */. The other form is derived from the template, and--fixkeeps the form a file already uses (#554).
Bug fixes
cr_checker:--modified-onlyhonorsinputsand:(exclude)pathspecs. Before, it checked all modified files. A leading YAML frontmatter block of a Markdown file is kept in front of the header, and--fixno longer breaks it (#546).rules_score: the architecture key conflict check of a dependable element works for elements in non-root packages and external repositories (#543).
Migration checklist
Breaking changes:
- Replace
Mitigation/SafetyMeasurerecords byRootCauseAssessmentrecords and pass them throughsafety_analysis.assessments. Removeroot_causesfrom AoUs and root causes fromCompReq.derived_from. Add@<version>to everyderived_fromentry. - Add
packagetoarchitectural_designtargets withpublic_api, list them in thedepsoffailure_modes, removearch_designfromsafety_analysis, and writeFailureMode.interfaceas a list ofApiMethodrecords. - Update custom LOBSTER templates:
{OWN_AOU_BLOCK}and{ASSESSMENT_BLOCK}replace{SAFETYMEASURES_BLOCK}, and{PUBLIC_API_SOURCES}replaces{ARCH_SOURCES}. - Adapt links to documentation paths (
<repo>/<package>/<dep>/) and custom rules that read the changed provider fields. - Replace
Component )- InterfacebyComponent - Interfacein PlantUML component diagrams. - Regenerate the
sync_skillsgoldens.
Stricter validations:
- Check the ASIL of every
FeatReqandCompReqagainst its upstream requirements. - Give every root cause exactly one assessment and list every own AoU in an assessment.
- Add the repository to
unit.scopeentries of external targets and build withmaturity = "release". - Make design diagram and image basenames unique per unit and
design_nameunique per component. - Make sure
public_apidiagrams are class diagrams without unsupported operators. - Check
$TransferInGatecalls: use the fully qualified failure mode as alias and a failure mode of another tree as connection.