General Information

rules_score provides a set of Bazel rules that help you build and document a Safety Element out of Context (SEooC) — a safety-critical software component developed independently and delivered with all the evidence needed for integration into a safety-relevant system.

By declaring your workproducts (requirements, architecture, units, safety analysis) as Bazel targets, rules_score automatically verifies traceability and consistency of all workproducts and assembles them into a Sphinx HTML documentation including the traceability report.

The Dependable Element Concept

A dependable element is the top-level entity:

Artifact

What it contains

Assumed System Requirements

System-level requirements given as constraints from the surrounding context

Feature Requirements

Functional and safety requirements for this element

Assumptions of Use

Conditions the integrating project must satisfy

Received AoUs

Assumptions of use received from dependencies that must be handled locally or chain-forwarded further

Architectural Design

Software Architectural Design in PlantUML

Software Units and Components

Implementation targets linked to their design

Dependability Analysis

FMEA, FTA diagrams and control measures

Architecture Overview

The diagram below shows the full set of rules_score rules and how they relate to each other.

Getting Started

New to rules_score? Work through the step-by-step Tutorial: Your First Dependable Element to build a minimal SEooC from scratch.

Rule Reference dependable_element

For the complete dependable_element attribute reference, see dependable_element in the rule index.

Automatic Validations

rules_score enforces the following constraints at build time — the build fails if any of them are violated. The validation logic is specified and tested via the Tool Reference.

Architecture consistency

The components and units declared in dependable_element.components are compared against the static PlantUML diagrams in architectural_design. Every component or unit that appears in the implementation tree must also appear in the architecture diagrams.

Certified scope

Every Bazel target that is transitively referenced through unit.implementation must fall within the package tree declared by the unit and component targets belonging to this element. External library dependencies that are not safety-certified must not appear there.

When maturity = "development" is set, scope violations are printed as warnings instead of failing the build. Switch back to "release" before certification.

Integrity level

A dependable_element with integrity_level = "B" must not depend (via deps) on another dependable_element with integrity_level = "A". The hierarchy is D > C > B > A.