diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-06-04 09:57:22 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-06-08 08:59:20 +0200 |
commit | 9c978899b5151b410b4de479608ac24be1b5c4a3 (patch) | |
tree | 8d8265f313acee90286094816abb90c47e042368 /spec/spec | |
parent | spec: Define generic attribute key types (diff) | |
download | rtems-central-9c978899b5151b410b4de479608ac24be1b5c4a3.tar.bz2 |
spec: Specify directive requirement items
Diffstat (limited to 'spec/spec')
-rw-r--r-- | spec/spec/interface-function-role.yml | 25 | ||||
-rw-r--r-- | spec/spec/requirement-directive-condition-list.yml | 16 | ||||
-rw-r--r-- | spec/spec/requirement-directive-condition.yml | 37 | ||||
-rw-r--r-- | spec/spec/requirement-directive-name.yml | 23 | ||||
-rw-r--r-- | spec/spec/requirement-directive-state-list.yml | 16 | ||||
-rw-r--r-- | spec/spec/requirement-directive-state.yml | 31 | ||||
-rw-r--r-- | spec/spec/requirement-directive-test-context-list.yml | 16 | ||||
-rw-r--r-- | spec/spec/requirement-directive-test-context.yml | 33 | ||||
-rw-r--r-- | spec/spec/requirement-directive-test-fixture.yml | 37 | ||||
-rw-r--r-- | spec/spec/requirement-directive-transition-list.yml | 16 | ||||
-rw-r--r-- | spec/spec/requirement-directive-transition-post.yml | 27 | ||||
-rw-r--r-- | spec/spec/requirement-directive-transition-pre-states.yml | 23 | ||||
-rw-r--r-- | spec/spec/requirement-directive-transition-pre.yml | 27 | ||||
-rw-r--r-- | spec/spec/requirement-directive-transition.yml | 33 | ||||
-rw-r--r-- | spec/spec/requirement-directive.yml | 93 | ||||
-rw-r--r-- | spec/spec/requirement-functional-type.yml | 1 |
16 files changed, 454 insertions, 0 deletions
diff --git a/spec/spec/interface-function-role.yml b/spec/spec/interface-function-role.yml new file mode 100644 index 00000000..052a898a --- /dev/null +++ b/spec/spec/interface-function-role.yml @@ -0,0 +1,25 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +- role: spec-refinement + spec-key: role + spec-value: interface-function + uid: link +spec-description: null +spec-example: null +spec-info: + dict: + attributes: {} + description: | + It defines the interface function role of links. It is used to indicate + that a ${requirement-directive:/spec-name} item specifies functional + requirements of an ${interface-function:/spec-name} or + a ${interface-macro:/spec-name} item. + mandatory-attributes: all +spec-name: Interface Function Link Role +spec-type: interface-function-role +type: spec diff --git a/spec/spec/requirement-directive-condition-list.yml b/spec/spec/requirement-directive-condition-list.yml new file mode 100644 index 00000000..b9672337 --- /dev/null +++ b/spec/spec/requirement-directive-condition-list.yml @@ -0,0 +1,16 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + list: + description: null + spec-type: requirement-directive-condition +spec-name: Directive Requirement Condition List +spec-type: requirement-directive-condition-list +type: spec diff --git a/spec/spec/requirement-directive-condition.yml b/spec/spec/requirement-directive-condition.yml new file mode 100644 index 00000000..10a35b2e --- /dev/null +++ b/spec/spec/requirement-directive-condition.yml @@ -0,0 +1,37 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + dict: + attributes: + name: + description: null + spec-type: requirement-directive-name + states: + description: null + spec-type: requirement-directive-state-list + test-epilogue: + description: | + If the value is present, then it shall be the test epilogue code. + The epilogue code is placed in the test condition preparation or + check before the state-specific code. + spec-type: optional-str + test-prologue: + description: | + If the value is present, then it shall be the test prologue code. + The prologue code is placed in the test condition preparation or + check after the state-specific code. + spec-type: optional-str + description: | + This set of attributes defines a directive pre-condition or + post-condition. + mandatory-attributes: all +spec-name: Directive Requirement Condition +spec-type: requirement-directive-condition +type: spec diff --git a/spec/spec/requirement-directive-name.yml b/spec/spec/requirement-directive-name.yml new file mode 100644 index 00000000..a09f184b --- /dev/null +++ b/spec/spec/requirement-directive-name.yml @@ -0,0 +1,23 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + str: + assert: + - re: ^[A-Z][a-zA-Z0-9]+$ + description: | + It shall be the name of a condition or a state of a condition used to + define pre-conditions and post-conditions of a directive requirement. It + shall be formatted in CamelCase. It should be brief and abbreviated. + The rationale for this is that the names are used in tables and the + horizontal space is limited by the page width. The more conditions you + have in a directive requirement, the shorter the names should be. +spec-name: Directive Requirement Name +spec-type: requirement-directive-name +type: spec diff --git a/spec/spec/requirement-directive-state-list.yml b/spec/spec/requirement-directive-state-list.yml new file mode 100644 index 00000000..516833e0 --- /dev/null +++ b/spec/spec/requirement-directive-state-list.yml @@ -0,0 +1,16 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + list: + description: null + spec-type: requirement-directive-state +spec-name: Directive Requirement State List +spec-type: requirement-directive-state-list +type: spec diff --git a/spec/spec/requirement-directive-state.yml b/spec/spec/requirement-directive-state.yml new file mode 100644 index 00000000..3cc00a67 --- /dev/null +++ b/spec/spec/requirement-directive-state.yml @@ -0,0 +1,31 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + dict: + attributes: + name: + description: null + spec-type: requirement-directive-name + test-code: + description: | + It shall be the test code to prepare or check the state of the + condition. + spec-type: str + text: + description: | + It shall define the state of the condition. + spec-type: requirement-text + description: | + This set of attributes defines a directive pre-condition or + post-condition state. + mandatory-attributes: all +spec-name: Directive Requirement State +spec-type: requirement-directive-state +type: spec diff --git a/spec/spec/requirement-directive-test-context-list.yml b/spec/spec/requirement-directive-test-context-list.yml new file mode 100644 index 00000000..afada65e --- /dev/null +++ b/spec/spec/requirement-directive-test-context-list.yml @@ -0,0 +1,16 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + list: + description: null + spec-type: requirement-directive-test-context +spec-name: Directive Requirement Test Context List +spec-type: requirement-directive-test-context-list +type: spec diff --git a/spec/spec/requirement-directive-test-context.yml b/spec/spec/requirement-directive-test-context.yml new file mode 100644 index 00000000..ae408ae7 --- /dev/null +++ b/spec/spec/requirement-directive-test-context.yml @@ -0,0 +1,33 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + dict: + attributes: + brief: + description: | + It shall be the test context member brief description. + spec-type: optional-str + description: + description: | + It shall be the test context member description. + spec-type: optional-str + member: + description: | + It shall be the test context member definition. It shall be a valid + C structure member definition without a trailing ``;``. + spec-type: str + description: | + This set of attributes defines a directive requirement test context + member. + mandatory-attributes: all + none: null +spec-name: Directive Requirement Test Context Member +spec-type: requirement-directive-test-context +type: spec diff --git a/spec/spec/requirement-directive-test-fixture.yml b/spec/spec/requirement-directive-test-fixture.yml new file mode 100644 index 00000000..50db0b83 --- /dev/null +++ b/spec/spec/requirement-directive-test-fixture.yml @@ -0,0 +1,37 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + dict: + attributes: + brief: + description: | + It shall be the test fixture method brief description. + spec-type: optional-str + code: + description: | + It shall be the test fixture method code. The code may use a local + variable ``ctx`` which points to the test context, see + ${requirement-directive-test-context:/spec-name}. + spec-type: str + description: + description: | + It shall define the state of the condition. + spec-type: requirement-text + description: | + It shall be the test fixture method description. + spec-type: optional-str + description: | + This set of attributes defines a directive requirement test fixture + method. + mandatory-attributes: all + none: null +spec-name: Directive Requirement Test Fixture Method +spec-type: requirement-directive-test-fixture +type: spec diff --git a/spec/spec/requirement-directive-transition-list.yml b/spec/spec/requirement-directive-transition-list.yml new file mode 100644 index 00000000..5f62bc19 --- /dev/null +++ b/spec/spec/requirement-directive-transition-list.yml @@ -0,0 +1,16 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + list: + description: null + spec-type: requirement-directive-transition +spec-name: Directive Requirement Transition List +spec-type: requirement-directive-transition-list +type: spec diff --git a/spec/spec/requirement-directive-transition-post.yml b/spec/spec/requirement-directive-transition-post.yml new file mode 100644 index 00000000..1f56b74e --- /dev/null +++ b/spec/spec/requirement-directive-transition-post.yml @@ -0,0 +1,27 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + dict: + attributes: {} + description: | + This set of attributes defines for each post-condition the state after + the directive call for a transition in a directive requirement. + generic-attributes: + description: | + There shall be exactly one generic attribute key for each + post-condition. The key name shall be the post-condition name. The + value of each generic attribute shall be the state of the + post-condition. + key-spec-type: requirement-directive-name + value-spec-type: requirement-directive-name + mandatory-attributes: all +spec-name: Directive Requirement Transition Post-Conditions +spec-type: requirement-directive-transition-post +type: spec diff --git a/spec/spec/requirement-directive-transition-pre-states.yml b/spec/spec/requirement-directive-transition-pre-states.yml new file mode 100644 index 00000000..32766365 --- /dev/null +++ b/spec/spec/requirement-directive-transition-pre-states.yml @@ -0,0 +1,23 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + list: + description: | + The list defines the set of states of the pre-condition in the + transition. + spec-type: requirement-directive-name + str: + assert: + eq: all + description: | + The value represents all states of the pre-condition in the transition. +spec-name: Directive Requirement Transition Pre-Condition State Set +spec-type: requirement-directive-transition-pre-states +type: spec diff --git a/spec/spec/requirement-directive-transition-pre.yml b/spec/spec/requirement-directive-transition-pre.yml new file mode 100644 index 00000000..187a89c7 --- /dev/null +++ b/spec/spec/requirement-directive-transition-pre.yml @@ -0,0 +1,27 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + dict: + attributes: {} + description: | + This set of attributes defines for each pre-condition the set of states + before the directive call for a transition in a directive requirement. + generic-attributes: + description: | + There shall be exactly one generic attribute key for each + pre-condition. The key name shall be the pre-condition name. The + value of each generic attribute shall be a set of states of the + pre-condition. + key-spec-type: requirement-directive-name + value-spec-type: requirement-directive-transition-pre-states + mandatory-attributes: all +spec-name: Directive Requirement Transition Pre-Conditions +spec-type: requirement-directive-transition-pre +type: spec diff --git a/spec/spec/requirement-directive-transition.yml b/spec/spec/requirement-directive-transition.yml new file mode 100644 index 00000000..aa5ac6e9 --- /dev/null +++ b/spec/spec/requirement-directive-transition.yml @@ -0,0 +1,33 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + dict: + attributes: + enabled-by: + description: | + The transition map may be customized to support configuration + variants through this attribute. The default transitions + (``enabled-by: true``) shall be specified before the customized + variants in the list. + spec-type: enabled-by + post-conditions: + description: null + spec-type: requirement-directive-transition-post + pre-conditions: + description: null + spec-type: requirement-directive-transition-pre + description: | + This set of attributes defines the transition from a set of + pre-conditions to post-conditions through a directive call in a directive + requirement. + mandatory-attributes: all +spec-name: Directive Requirement Transition +spec-type: requirement-directive-transition +type: spec diff --git a/spec/spec/requirement-directive.yml b/spec/spec/requirement-directive.yml new file mode 100644 index 00000000..1c1abcc2 --- /dev/null +++ b/spec/spec/requirement-directive.yml @@ -0,0 +1,93 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +- role: spec-refinement + spec-key: functional-type + spec-value: directive + uid: requirement-functional +spec-description: null +spec-example: null +spec-info: + dict: + attributes: + post-conditions: + description: null + spec-type: requirement-directive-condition-list + pre-conditions: + description: null + spec-type: requirement-directive-condition-list + test-action: + description: | + It shall be the test action code. + spec-type: str + test-brief: + description: | + If the value is present, then it shall be the test case brief + description. + spec-type: optional-str + test-context: + description: null + spec-type: requirement-directive-test-context-list + test-description: + description: | + If the value is present, then it shall be the test case description. + spec-type: optional-str + test-includes: + description: | + It shall be a list of header files included via ``#include <...>``. + spec-type: list-str + test-local-includes: + description: | + It shall be a list of header files included via ``#include "..."``. + spec-type: list-str + test-name: + description: null + spec-type: test-name + test-setup: + description: null + spec-type: requirement-directive-test-fixture + test-stop: + description: null + spec-type: requirement-directive-test-fixture + test-support: + description: | + If the value is present, then it shall be the test case support code. + The support code is placed at file scope before the test case code. + spec-type: optional-str + test-target: + description: | + It shall be the path to the generated target test case source file. + spec-type: str + test-teardown: + description: null + spec-type: requirement-directive-test-fixture + transition-map: + description: null + spec-type: requirement-directive-transition-list + description: | + This set of attributes specifies functional requirements and + corresponding validation tests for a directive. A directive is a + function or a macro. There shall be exactly one link with the + ${interface-function-role:/spec-name} to the interface of the directive. + The directive requirement specifies + + * a list of pre-conditions, each with a set of states, + + * a list of post-conditions, each with a set of states, + + * the transition of pre-condition states to post-condition states through + a call of the directive, and + + * the test code to generate a validation test. + + For a directive requirement it is verified that all variations of + pre-condition states have a set of post-condition states specified in the + transition map. + mandatory-attributes: all +spec-name: Directive Requirement Item Type +spec-type: requirement-directive +type: spec diff --git a/spec/spec/requirement-functional-type.yml b/spec/spec/requirement-functional-type.yml index 1acc7c0d..a3c15db2 100644 --- a/spec/spec/requirement-functional-type.yml +++ b/spec/spec/requirement-functional-type.yml @@ -13,6 +13,7 @@ spec-info: in: - capability - dependability-function + - directive - function - operational - safety-function |