Crate trace_doc

Crate trace_doc 

Source
Expand description

§trace-doc

A library for documenting, modeling, and linking requirements, architecture, test specifications, and realization elements directly in Rust’s type system.

By expressing traceability using structs, traits, and attributes, we allow the Rust compiler itself to act as a unified tool for compiling source code and verifying formal traceability in safety-critical software lifecycles.

§Core Concepts

  • Artifact: Any item in the development lifecycle (requirement, realization, test, etc.).
  • Requirement: A specification or constraint for the system.
  • Realization: An artifact that fulfills a requirement.
  • Test: An artifact that validates a requirement.
  • DependsOn: A relationship between two artifacts.
  • Realizes: A realization fulfilling a requirement.
  • Tests: A test validating a requirement.

§Example

use trace_doc::{Artifact, Requirement, Realization, Realizes, Test, Tests};

struct Req;
impl Artifact for Req {}
impl Requirement for Req { const TITLE: &str = "A requirement"; }

struct Real;
impl Artifact for Real {}
impl Realization for Real {}
impl Realizes<Req> for Real {}

struct T;
impl Artifact for T {}
impl Test for T {}
impl Tests<Req> for T {}

Enums§

Status
The status of an artifact in the development lifecycle.

Traits§

Artifact
Represents any artifact in the development lifecycle (requirement, realization, test, etc.).
DependsOn
Represents a dependency relationship between any two artifacts.
Realization
Represents a realization artifact of a system. The description of the Realization can be provided as a doc comment on the realizing type.
Realizes
Represents the traceability of a realization to a requirement. This trait is implemented by the realizations that fulfill specific requirements.
Requirement
Represents a requirement artifact of a system. The description of the requirement can be provided as a doc comment on the implementing type.
Test
Represents a test specification artifact of a system. The description of the Test can be provided as a doc comment on the implementing type.
Tests
Represents the traceability of a test specification to a requirement. This trait is implemented by the test specifications that validate specific requirements.