Conformance to Templates (OpenReq-CT)
GitHub: https://github.com/OpenReqEU/conformance-to-templates
With the goal of improving the quality of requirements, the OpenReq Conformance to Templates (OpenReq-CT) component checks whether requirements are compliant to certain requirement templates and, if not, provides tips on how becoming compliant. A set of templates is already stored in the component, but new templates can be added by the user.
The templates are specified using rules, which must follow the format of an Augmented BNF grammar (ABNF) [1]:
- A template is defined by one or more rules (the rules are defined by an array of strings).
- The first word of each rule must be written as "<name_of_the_rule> ::= ". This first word defines the name of the rule.
- The name of the first rule must be “main”.
- The first rule must define the structure of the requirement.
- The other rules should be used to define auxiliary structures.
- The only tags that are permitted are:
- plain words (specified with "%").
- POS tags of the OpenNLP library (specified with "()").
- sentence tags (i.e., NP or VP) (specified with "<>").
- augmented tags:
- | : OR
- (all) : ignores the rule
- <*> : accepts anything that comes after
An example of a correct ABNF grammar for Rupp’s template (summarised in Figure 1) [2] would be:
- <main> ::= <conditions> <actor> <modal> <last_part> <np>
- <conditions> ::= %IF | %AFTER | %AS %SOON %AS | %AS %LONG %AS
- <modal> ::= %SHALL | %SHOULD | %WILL
- <actor> ::= <np>
- <infinitive-vp> ::= %TO <vp>
- <last_part> ::= <vp> | %PROVIDE <np> %THE %ABILITY %TO <infinitive-vp> | %BE %ABLE <infinitive-vp>
Figure 1: Rupp’s templates excerpt
References
[1] P. Overell, Augmented BNF for Syntax Specifications: ABNF, RFC editor, 1997.
[2] C. Rupp, Requirements Templates - The Blueprint of your Requirement, SOPHIST GmbH, 2014.
Share: