Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comprehensive approach to requirements traceability #1564

Open
ThibFrgsGmz opened this issue Jul 13, 2022 · 3 comments
Open

Comprehensive approach to requirements traceability #1564

ThibFrgsGmz opened this issue Jul 13, 2022 · 3 comments

Comments

@ThibFrgsGmz
Copy link
Contributor

F´ Version 3.x.x
Affected Component Process / Traceability / Documentation

Feature Description

It would be interesting if F' offered a comprehensive approach to requirements traceability.
I'm referring to a requirements management tool that allows developers to work on individual activities while linking code and verification artifacts to lower or higher level requirements.

Functional safety and cybersecurity standards require the collection, referencing, and tracking of requirements.
In the face of changing customer requirements, test failures and engineering oversights, updating these artifacts can become a logistical nightmare. Project management automation can make this process more efficient and less time consuming.

The end result would be a comprehensive two-way process that ensures that any changes to requirements, design, or source code are easily understood, verified, and tracked throughout the life cycle.

We would have system requirements assigned to software engineering, high-level requirements and low-level requirements.
I would not be able to propose a technical solution. Should requirements, for example, be listed in tables in markdown files, as components are?

Rationale

Many functional safety and cybersecurity standards mention requirements traceability.

On the one hand, it is essential to demonstrate that all requirements are met as implemented and tested in the code.

And on the other hand, it is important to demonstrate that there is code that does not meet any requirements.
This code may be the result of feature creep, code written to make a component reusable across multiple projects, dead code, or malicious code implemented and added by unscrupulous individuals. In all cases, it is essential to provide a justification for the presence or absence of such code.

@thomas-bc
Copy link
Collaborator

@ThibFrgsGmz trying to deepen the conversation here.

How do you envision such a solution be offered at the F´ level? In my experience, this kind of process is managed at the project/institution level. That's usually (again, in my experience) managed with external tools and services, and I'm tempted to say that F´ should be agnostic to the choices made by each project/institution.
Could F´ help in doing that somehow? Do you have examples of other frameworks (FSW or anything else) that do?

Or am I missing your point?

@ThibFrgsGmz
Copy link
Contributor Author

I completely understand your opinion.

Let's put ourselves in the shoes of a user who has to develop a product for a customer. This customer has software requirements, right?

If the user chooses FPrime to develop their product, how do they ensure that the components of the deployment topologies meet the upstream requirements?

This is a question I still don't have an answer to.

One could say that it's not the framework's responsibility, as it would add too much functionality to maintain and coexist with other processes.

However, a framework, in my opinion, is a structure that is offered to a user to allow them to construct many products with the expectation of producing future products faster and cheaper than if they had developed without it.

In this sense, the framework should have characteristics that reassure the user about its ability to provide an industrializable solution, such as

  • compliance with industry standards (AUTOSAR is widely considered)
  • providing a certification package (Add a certification package #1839) that can be automated
  • guaranteeing the traceability of requirements, justifying that the product meets the customer's needs.

As food for thought, I'm just reading the book "Semantic Software Design" by Eben Hewitt where the following quote from Tech Blogger Jonathan Clarks is included:
Platforms are structures that allow multiple products to be built within the same technical framework. Companies invest in platforms in the hope that they can develop future products faster and cheaper than if they were built independently. Today, it is much more important to think of a platform as a business framework. By that I mean a framework that allows multiple business models to be built and supported.

If I were to quickly think of an implementation, it would be with regexes, something like the following script:

#!/bin/sh
# Requirements trace check - corresponding numbers should be the same
pattern="(GEN|FPRIME)-[A-Z]+-[0-9]+"

echo -n "SRS: "
grep -o -E $pattern SRS.md | sort | uniq | wc -l 

echo -n "SDD: "
grep -o -E $pattern SDD.md | sort | uniq | wc -l 

echo -n "SRS with TEST: "
grep -E $pattern  SRS.md | grep TEST| wc -l 

echo -n "ATP: "
grep -o -E $pattern ATP.md | sort | uniq | wc -l 

echo -n "ALL: "
grep -o -E $pattern *.md | grep -o -E $pattern | sort | uniq | wc -l 

Without this traceability, how do you ensure that the topology you have designed meets the customer's requirements?

@matt392code
Copy link
Contributor

Key approaches to requirements traceability in spacecraft software, drawing from industry practices and standards.

  1. Hierarchical Requirements Structure
  • Top Level: Mission Requirements (e.g., "spacecraft shall maintain pointing accuracy of ±0.1° during science operations")
  • System Level: Broken down into subsystem requirements (e.g., attitude control, power, thermal)
  • Software Level: Specific software implementation requirements
  • Unit Level: Component/function specific requirements
  1. Bidirectional Traceability Methods
  • Forward Tracing: Following requirements down to implementation

    • Requirements → Design Documents → Code → Test Cases
    • Often implemented using unique identifiers (e.g., "ACS-SW-123")
    • Each software component references its parent requirements
    • Test procedures explicitly list which requirements they verify
  • Backward Tracing: Following implementation back to requirements

    • Every piece of flight software should trace back to requirements
    • Exception: Infrastructure code/utilities (which need explicit justification)
    • Particularly important for safety-critical functions
  1. Documentation Practices
  • Requirements Management Tools

    • DOORS (commonly used in aerospace)
    • Jama Connect
    • Enterprise Architect
    • Custom tools built on databases
  • Cross-Reference Matrices

    • Requirements vs. Design Elements
    • Requirements vs. Test Cases
    • Software Components vs. Requirements
    • Test Results vs. Requirements
  1. Implementation Approaches
  • Code-Level Traceability
/**
 * @requirements ACS-SW-123, ACS-SW-124
 * @brief Implements attitude control law
 */
void AttitudeController::updateControlLaw() {
    // Implementation
}
  • Test-Level Traceability
class TestAttitudeControl(unittest.TestCase):
    """
    @requirements ACS-SW-123
    @verifies Attitude control accuracy during nominal operations
    """
    def test_pointing_accuracy(self):
        # Test implementation
  1. Verification and Validation
  • Requirements Verification Matrix (RVM)
    • Lists each requirement
    • Shows verification method (Test/Analysis/Inspection/Demonstration)
    • Links to specific test procedures/results
    • Tracks verification status
  1. Change Management
  • Impact Analysis

    • When requirements change, trace all affected components
    • Identify all tests that need updating
    • Review dependent requirements
  • Version Control Integration

    • Requirements versions linked to software baselines
    • Git commits can reference requirement IDs
    • CI/CD pipelines can validate requirement coverage
  1. NASA/JPL Specific Practices
  • Use of formal methods where appropriate
  • Heavy emphasis on peer reviews
  • Independent V&V teams
  • Requirements tagged with criticality levels
  • Special handling of fault protection requirements
  1. Common Challenges and Solutions
  • Requirements Volatility

    • Regular baseline reviews
    • Change impact assessment procedures
    • Automated traceability tools
  • Coverage Analysis

    • Static analysis tools
    • Coverage reports in CI/CD pipeline
    • Regular requirements coverage reviews

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants