Treat Requirements Like Code
Project description
Treat Requirements Like Code (TRLC)
TRLC is a domain-specific language developed at BMW for writing (and linking) requirements with meta-data.
The repository contains:
-
The language reference manual for TRLC. Previous versions are also available.
-
A pure Python reference implementation of TRLC.
The implementation is not very fast, but designed to be pedantically correct in following the language definition. The tools also include a powerful static analysis tool to find issues with types and user-defined check rules.
The Python implementation can be used for several purposes:
-
It can be used to validate other TRLC implementations.
-
It can be used to validate a body of requirements (e.g. a CI check that all requirements are well formed)
-
The API can be used to write other tools based on TRLC (for example a tool to render the requirements in HTML, a tool to diff requirements or perform an impact analysis, or a tool to perform software traceability, etc.)
Documentation
For normal users
- Tutorial (read this as a first introduction)
- Release Notes (read this to find out whats new)
- License
For API users
- Language Reference Manual (for language lawyers)
- Python API Documentation (API reference for end-users)
- AST Hierarchy (overview over all classes in the AST)
For TRLC developers
- Lexer/Parser Hierarchy (overview over all classes releated to the lexing and parsing of TRLC)
- Tool Architecture Overview
Dependencies
Run-time
- 3.8 <= Python3 <= 3.10
Optional dependencies (they are not installed automatically):
- PyVCG (Linux or OSX only, required
when using the
--verify
option)
Development tools
- GNU Make
- Graphviz
- PyCodeStyle (from PyPI, for basic checking of source code style)
- PyLint (from PyPI, for basic bug finding)
- Coverage (from PyPI, to perform branch coverage when running the test suite)
- Sphinx (from PyPI, for building the documentation)
- PyVCG (from PyPI, for building verification conditions)
- CVC5 (from PyPI, for discharging verification conditions)
You can install all Python dependencies by doing:
pip3 install -r requirements.txt
When building the traceability report you also need to install two lobster packages. Since there is a circular dependency, please install like this:
pip3 install bmw-lobster-core bmw-lobster-tool-python
pip3 install --no-deps bmw-lobster-tool-trlc
The most important make targets when developing TRLC are:
lint
(runs pycodestyle and pylint)test
(performs unit and system tests and shows coverage)tracing
(generates traceability report)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for trlc-1.1.7-py3-none-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c36f7a3de9ce9609b67edf9f60edb29d65591ff83cf136b756b5de25d5546bde |
|
MD5 | cec1434cb715a4f48c4f8547bba130fe |
|
BLAKE2b-256 | 5b8bb62f739e26bcefd4e7c743178bc0b2f17858c1610ab6807b6db3bafe3e41 |