Skip to content
bmw-software-engineeringPublic

About

Treat Requirements Like Code

Topics

Resources

Contributing

Stars

125 stars

Watchers

7 watching

Forks

Latest commit

 

History

569 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 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.

Language note

In a .rsl file, a type may be used before the place where it is declared in the same file. This is allowed for:

  • the type of a record component,
  • the type of a tuple field, if that type is a record,
  • a record type used as a member of a union type.

Example:

package demo

type Requirement {
  position Coordinate
}

tuple Coordinate {
  x Integer
  y Integer
}

This is valid: Requirement uses Coordinate before the line that declares it.

The following are not supported:

  • A tuple field that refers to a tuple declared later in the file. This includes mutually recursive tuples (A contains B, B contains A). Declare the inner tuple first.
  • A record that extends a type declared later in the file. Declare the base type earlier.
  • A check that uses a field of a record type declared after the check. Declare the record type first.

Note:

  • Tuples remain acyclic (because they are inline objects)
  • Type inheritance graph remains acyclic
  • Package import graph remains acyclic

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

For advanced users

For TRLC developers

Tools Available

  • TRLC_RST: Convert TRLC Requirements for Sphinx Build
  • Converters: Multiple converters from TRLC to other file formats. The tool suite is maintained by NewTec GmbH.

Dependencies

Run-time

  • 3.10 <= Python3 <= 3.14
  • PyVCG
  • PyPI CVC5(GNU/Linux only) (required when using the --verify option)

Acknowledgements

Special thanks to Florian Schanda for his many valuable contributions to this repository.

About

Treat Requirements Like Code

Topics

Resources

Contributing

Stars

125 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages