All filesFile 02 / 04
cFS Traceability
Requirement-to-code traceability for NASA flight software
Maps engineering requirements to source functions in NASA’s Core Flight System, showing what is implemented, what is tested, and where the gaps are.
- Type
- Research
- Year
- 2025
- Status
- Ongoing
- Role
- Undergraduate research assistant
- Stack
- Python · PyTorch · Pandas · Holoviews · Bokeh · Plotly
- Links
- Dataset
Figures
- 284Ground-truth links
- 114Requirements
- 65Functions
- 0.58Test MRR
- 0.74Recall@10
Overview
Automated requirement-to-code traceability for safety-critical NASA and DoD flight software, aimed at a manual verification bottleneck in software assurance.
Built
- A traceability dataset from the cFS Checksum (CS) application: 284 ground-truth links across 114 requirements and 65 functions.
- BM25-mined hard negatives and grouped splits, so no requirement family leaks between train and test.
- A fine-tuned CoCoSoDa contrastive transformer that retrieves the functions implementing a requirement.
System
- 01
Collect the ground truth
Each requirement of the Checksum application is paired with the production functions that implement it. Test code is excluded: production functions are the only valid trace targets.
- 02
Mine hard negatives
A BM25 index over all 65 functions scores every function against each requirement. The top-ranked functions that are not true links become hard negatives, two per positive.
- 03
Split by requirement family
Splits are grouped by CS requirement group (CS1 to CS9), so requirements that share vocabulary never appear on both sides of a split.
- 04
Train a dual encoder
CoCoSoDa is fine-tuned with InfoNCE on requirement, positive, and hard-negative triplets, then ranked on held-out groups.
Specifications
- Problem
- Requirement-to-code verification in large flight software repositories is manual, slow, and error-prone.
- Constraint
- Thousands of C files with inconsistent naming between production and test code.
- Corpus
- cFS Checksum (CS) application, production code only
- Model
- CoCoSoDa, fine-tuned with InfoNCE loss
- Negatives
- BM25Okapi, two hard negatives per positive
- Evaluation
- Leave-one-group-out cross-validation