91 lines
3.3 KiB
Markdown
91 lines
3.3 KiB
Markdown
# Doorstop Integration for UniversalisOS
|
|
|
|
Tools for managing requirements traceability using Doorstop, with import/export
|
|
support for IBM Rational DOORS and ReqIF formats.
|
|
|
|
## Directory Structure
|
|
|
|
```
|
|
doorstop-integration/
|
|
├── doorstop_config.py # Document type configuration (req, spec, test)
|
|
├── doorsetup.py # Initialize Doorstop repo, create sample requirements
|
|
├── doors_import.py # Import DOORS XML → Doorstop YAML
|
|
├── doors_export.py # Export Doorstop YAML → DOORS XML (round-trip)
|
|
├── reqs/ # Sample requirement YAML files
|
|
│ ├── REQ-001.yml # Scheduler correctness
|
|
│ ├── REQ-002.yml # Memory isolation
|
|
│ ├── REQ-003.yml # Virtio device support
|
|
│ ├── REQ-004.yml # SMP scheduling (RISC-V)
|
|
│ └── REQ-005.yml # Health monitoring
|
|
└── README.md
|
|
```
|
|
|
|
## Quick Start
|
|
|
|
```bash
|
|
# 1. Initialize the repository with sample requirements
|
|
python3 doorsetup.py init --init
|
|
|
|
# 2. Import from DOORS XML export
|
|
python3 doors_import.py --doors-xml export.xml --output reqs/
|
|
|
|
# 3. Export back to DOORS XML (round-trip)
|
|
python3 doors_export.py --doorstop reqs/ --output reimport.xml
|
|
|
|
# 4. Generate traceability matrix
|
|
cd ../uos-cover
|
|
python3 uos_trace.py generate --doorstop ../doorstop-integration/reqs/ \
|
|
--umdb proj.umdb --format html -o trace.html
|
|
```
|
|
|
|
## Document Types
|
|
|
|
| Type | Prefix | Template | Description |
|
|
|--------|--------|---------------|--------------------------|
|
|
| `req` | REQ | requirement | Top-level requirements |
|
|
| `spec` | SPEC | specification | Design specifications |
|
|
| `test` | TC | test_case | Test cases |
|
|
|
|
## Custom Attributes
|
|
|
|
| Attribute | Type | Required | Description |
|
|
|--------------------|---------|----------|--------------------------------------|
|
|
| `linked_files` | list | No | Source files implementing this req |
|
|
| `linked_functions` | list | No | Functions implementing this req |
|
|
| `linked_tests` | list | No | Test cases covering this req |
|
|
| `dal_level` | string | Yes | DO-178C Design Assurance Level (A-F) |
|
|
| `priority` | string | Yes | Requirement priority |
|
|
| `category` | string | Yes | Requirement category |
|
|
|
|
## Importing from DOORS
|
|
|
|
The `doors_import.py` script reads DOORS XML exports conforming to the
|
|
`rqtrace-2.1.xsd` schema and converts them to Doorstop YAML format.
|
|
|
|
```bash
|
|
python3 doors_import.py --doors-xml doors_export.xml --output reqs/ --prefix REQ
|
|
```
|
|
|
|
## Exporting to DOORS
|
|
|
|
The `doors_export.py` script generates DOORS-compatible XML from Doorstop YAML,
|
|
supporting full round-trip: Doorstop → DOORS → Doorstop.
|
|
|
|
```bash
|
|
python3 doors_export.py --doorstop reqs/ --output doors_reexport.xml --module "UniversalisOS"
|
|
```
|
|
|
|
## Traceability Matrix Generation
|
|
|
|
The `uos_trace.py` tool (in `../uos-cover/`) supports Doorstop as an input format:
|
|
|
|
```bash
|
|
# From Doorstop YAML
|
|
python3 uos_trace.py generate --doorstop reqs/ --umdb proj.umdb -o trace.html
|
|
|
|
# From DOORS XML
|
|
python3 uos_trace.py generate --doors-xml export.xml --umdb proj.umdb -o trace.html
|
|
|
|
# From ReqIF
|
|
python3 uos_trace.py generate --reqif requirements.reqif --umdb proj.umdb -o trace.csv
|
|
```
|