diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-06-08 08:45:01 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-06-08 08:59:20 +0200 |
commit | 1a58bbe76eba50160565d02e63a5c3a4d5424d8e (patch) | |
tree | 47ad7e535ebe1993186894c2e49709c0be136d75 | |
parent | 49b564701d2c3309a4eee2eb85d24da55e7ff8a2 (diff) |
spec: Generalize directive to action requirements
-rw-r--r-- | spec/spec/interface-function-role.yml | 2 | ||||
-rw-r--r-- | spec/spec/requirement-action-condition-list.yml (renamed from spec/spec/requirement-directive-condition-list.yml) | 6 | ||||
-rw-r--r-- | spec/spec/requirement-action-condition.yml (renamed from spec/spec/requirement-directive-condition.yml) | 19 | ||||
-rw-r--r-- | spec/spec/requirement-action-name.yml (renamed from spec/spec/requirement-directive-name.yml) | 8 | ||||
-rw-r--r-- | spec/spec/requirement-action-state-list.yml (renamed from spec/spec/requirement-directive-state-list.yml) | 6 | ||||
-rw-r--r-- | spec/spec/requirement-action-state.yml (renamed from spec/spec/requirement-directive-state.yml) | 13 | ||||
-rw-r--r-- | spec/spec/requirement-action-test-context-list.yml (renamed from spec/spec/requirement-directive-transition-list.yml) | 6 | ||||
-rw-r--r-- | spec/spec/requirement-action-test-context.yml (renamed from spec/spec/requirement-directive-test-context.yml) | 7 | ||||
-rw-r--r-- | spec/spec/requirement-action-test-fixture.yml (renamed from spec/spec/requirement-directive-test-fixture.yml) | 9 | ||||
-rw-r--r-- | spec/spec/requirement-action-transition-list.yml (renamed from spec/spec/requirement-directive-test-context-list.yml) | 6 | ||||
-rw-r--r-- | spec/spec/requirement-action-transition-post.yml (renamed from spec/spec/requirement-directive-transition-post.yml) | 10 | ||||
-rw-r--r-- | spec/spec/requirement-action-transition-pre-states.yml (renamed from spec/spec/requirement-directive-transition-pre-states.yml) | 6 | ||||
-rw-r--r-- | spec/spec/requirement-action-transition-pre.yml (renamed from spec/spec/requirement-directive-transition-pre.yml) | 10 | ||||
-rw-r--r-- | spec/spec/requirement-action-transition.yml (renamed from spec/spec/requirement-directive-transition.yml) | 14 | ||||
-rw-r--r-- | spec/spec/requirement-action.yml (renamed from spec/spec/requirement-directive.yml) | 47 |
15 files changed, 89 insertions, 80 deletions
diff --git a/spec/spec/interface-function-role.yml b/spec/spec/interface-function-role.yml index 052a898a..bff51fad 100644 --- a/spec/spec/interface-function-role.yml +++ b/spec/spec/interface-function-role.yml @@ -16,7 +16,7 @@ spec-info: attributes: {} description: | It defines the interface function role of links. It is used to indicate - that a ${requirement-directive:/spec-name} item specifies functional + that a ${requirement-action:/spec-name} item specifies functional requirements of an ${interface-function:/spec-name} or a ${interface-macro:/spec-name} item. mandatory-attributes: all diff --git a/spec/spec/requirement-directive-condition-list.yml b/spec/spec/requirement-action-condition-list.yml index b9672337..4d0ba479 100644 --- a/spec/spec/requirement-directive-condition-list.yml +++ b/spec/spec/requirement-action-condition-list.yml @@ -10,7 +10,7 @@ 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 + spec-type: requirement-action-condition +spec-name: Action Requirement Condition List +spec-type: requirement-action-condition-list type: spec diff --git a/spec/spec/requirement-directive-condition.yml b/spec/spec/requirement-action-condition.yml index 10a35b2e..36fc34cb 100644 --- a/spec/spec/requirement-directive-condition.yml +++ b/spec/spec/requirement-action-condition.yml @@ -12,26 +12,29 @@ spec-info: attributes: name: description: null - spec-type: requirement-directive-name + spec-type: requirement-action-name states: description: null - spec-type: requirement-directive-state-list + spec-type: requirement-action-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. + check before the state-specific code. The code may use a local + variable ``ctx`` which points to the test context, see + ${requirement-action-test-context:/spec-name}. 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. + check after the state-specific code. The code may use a local + variable ``ctx`` which points to the test context, see + ${requirement-action-test-context:/spec-name}. spec-type: optional-str description: | - This set of attributes defines a directive pre-condition or - post-condition. + This set of attributes defines an action pre-condition or post-condition. mandatory-attributes: all -spec-name: Directive Requirement Condition -spec-type: requirement-directive-condition +spec-name: Action Requirement Condition +spec-type: requirement-action-condition type: spec diff --git a/spec/spec/requirement-directive-name.yml b/spec/spec/requirement-action-name.yml index a09f184b..62ce8b3a 100644 --- a/spec/spec/requirement-directive-name.yml +++ b/spec/spec/requirement-action-name.yml @@ -13,11 +13,11 @@ spec-info: - 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 + define pre-conditions and post-conditions of an action 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 + have in an action requirement, the shorter the names should be. +spec-name: Action Requirement Name +spec-type: requirement-action-name type: spec diff --git a/spec/spec/requirement-directive-state-list.yml b/spec/spec/requirement-action-state-list.yml index 516833e0..7ce67fac 100644 --- a/spec/spec/requirement-directive-state-list.yml +++ b/spec/spec/requirement-action-state-list.yml @@ -10,7 +10,7 @@ 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 + spec-type: requirement-action-state +spec-name: Action Requirement State List +spec-type: requirement-action-state-list type: spec diff --git a/spec/spec/requirement-directive-state.yml b/spec/spec/requirement-action-state.yml index 3cc00a67..8b1e55ba 100644 --- a/spec/spec/requirement-directive-state.yml +++ b/spec/spec/requirement-action-state.yml @@ -12,20 +12,21 @@ spec-info: attributes: name: description: null - spec-type: requirement-directive-name + spec-type: requirement-action-name test-code: description: | It shall be the test code to prepare or check the state of the - condition. + condition. The code may use a local variable ``ctx`` which points to + the test context, see ${requirement-action-test-context:/spec-name}. 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. + This set of attributes defines an action pre-condition or post-condition + state. mandatory-attributes: all -spec-name: Directive Requirement State -spec-type: requirement-directive-state +spec-name: Action Requirement State +spec-type: requirement-action-state type: spec diff --git a/spec/spec/requirement-directive-transition-list.yml b/spec/spec/requirement-action-test-context-list.yml index 5f62bc19..ae9e0866 100644 --- a/spec/spec/requirement-directive-transition-list.yml +++ b/spec/spec/requirement-action-test-context-list.yml @@ -10,7 +10,7 @@ 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 + spec-type: requirement-action-test-context +spec-name: Action Requirement Test Context List +spec-type: requirement-action-test-context-list type: spec diff --git a/spec/spec/requirement-directive-test-context.yml b/spec/spec/requirement-action-test-context.yml index ae408ae7..b5ef3838 100644 --- a/spec/spec/requirement-directive-test-context.yml +++ b/spec/spec/requirement-action-test-context.yml @@ -24,10 +24,9 @@ spec-info: C structure member definition without a trailing ``;``. spec-type: str description: | - This set of attributes defines a directive requirement test context - member. + This set of attributes defines an action requirement test context member. mandatory-attributes: all none: null -spec-name: Directive Requirement Test Context Member -spec-type: requirement-directive-test-context +spec-name: Action Requirement Test Context Member +spec-type: requirement-action-test-context type: spec diff --git a/spec/spec/requirement-directive-test-fixture.yml b/spec/spec/requirement-action-test-fixture.yml index 84338e2b..15b7c5dc 100644 --- a/spec/spec/requirement-directive-test-fixture.yml +++ b/spec/spec/requirement-action-test-fixture.yml @@ -18,17 +18,16 @@ spec-info: 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}. + ${requirement-action-test-context:/spec-name}. spec-type: str description: 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. + This set of attributes defines an action requirement test fixture method. mandatory-attributes: all none: null -spec-name: Directive Requirement Test Fixture Method -spec-type: requirement-directive-test-fixture +spec-name: Action Requirement Test Fixture Method +spec-type: requirement-action-test-fixture type: spec diff --git a/spec/spec/requirement-directive-test-context-list.yml b/spec/spec/requirement-action-transition-list.yml index afada65e..c44a98f1 100644 --- a/spec/spec/requirement-directive-test-context-list.yml +++ b/spec/spec/requirement-action-transition-list.yml @@ -10,7 +10,7 @@ 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 + spec-type: requirement-action-transition +spec-name: Action Requirement Transition List +spec-type: requirement-action-transition-list type: spec diff --git a/spec/spec/requirement-directive-transition-post.yml b/spec/spec/requirement-action-transition-post.yml index 1f56b74e..7fca2f11 100644 --- a/spec/spec/requirement-directive-transition-post.yml +++ b/spec/spec/requirement-action-transition-post.yml @@ -12,16 +12,16 @@ spec-info: attributes: {} description: | This set of attributes defines for each post-condition the state after - the directive call for a transition in a directive requirement. + the action for a transition in an action 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 + key-spec-type: requirement-action-name + value-spec-type: requirement-action-name mandatory-attributes: all -spec-name: Directive Requirement Transition Post-Conditions -spec-type: requirement-directive-transition-post +spec-name: Action Requirement Transition Post-Conditions +spec-type: requirement-action-transition-post type: spec diff --git a/spec/spec/requirement-directive-transition-pre-states.yml b/spec/spec/requirement-action-transition-pre-states.yml index 32766365..4c55c872 100644 --- a/spec/spec/requirement-directive-transition-pre-states.yml +++ b/spec/spec/requirement-action-transition-pre-states.yml @@ -12,12 +12,12 @@ spec-info: description: | The list defines the set of states of the pre-condition in the transition. - spec-type: requirement-directive-name + spec-type: requirement-action-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 +spec-name: Action Requirement Transition Pre-Condition State Set +spec-type: requirement-action-transition-pre-states type: spec diff --git a/spec/spec/requirement-directive-transition-pre.yml b/spec/spec/requirement-action-transition-pre.yml index 187a89c7..0da85c42 100644 --- a/spec/spec/requirement-directive-transition-pre.yml +++ b/spec/spec/requirement-action-transition-pre.yml @@ -12,16 +12,16 @@ spec-info: 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. + before the action for a transition in an actin 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 + key-spec-type: requirement-action-name + value-spec-type: requirement-action-transition-pre-states mandatory-attributes: all -spec-name: Directive Requirement Transition Pre-Conditions -spec-type: requirement-directive-transition-pre +spec-name: Action Requirement Transition Pre-Conditions +spec-type: requirement-action-transition-pre type: spec diff --git a/spec/spec/requirement-directive-transition.yml b/spec/spec/requirement-action-transition.yml index aa5ac6e9..45484566 100644 --- a/spec/spec/requirement-directive-transition.yml +++ b/spec/spec/requirement-action-transition.yml @@ -19,15 +19,15 @@ spec-info: spec-type: enabled-by post-conditions: description: null - spec-type: requirement-directive-transition-post + spec-type: requirement-action-transition-post pre-conditions: description: null - spec-type: requirement-directive-transition-pre + spec-type: requirement-action-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. + This set of attributes defines the transition from all state variations + of the set of pre-conditions to states of post-conditions through an + action in an action requirement. mandatory-attributes: all -spec-name: Directive Requirement Transition -spec-type: requirement-directive-transition +spec-name: Action Requirement Transition +spec-type: requirement-action-transition type: spec diff --git a/spec/spec/requirement-directive.yml b/spec/spec/requirement-action.yml index 1c1abcc2..85d027d0 100644 --- a/spec/spec/requirement-directive.yml +++ b/spec/spec/requirement-action.yml @@ -7,7 +7,7 @@ links: uid: root - role: spec-refinement spec-key: functional-type - spec-value: directive + spec-value: action uid: requirement-functional spec-description: null spec-example: null @@ -16,10 +16,10 @@ spec-info: attributes: post-conditions: description: null - spec-type: requirement-directive-condition-list + spec-type: requirement-action-condition-list pre-conditions: description: null - spec-type: requirement-directive-condition-list + spec-type: requirement-action-condition-list test-action: description: | It shall be the test action code. @@ -31,7 +31,7 @@ spec-info: spec-type: optional-str test-context: description: null - spec-type: requirement-directive-test-context-list + spec-type: requirement-action-test-context-list test-description: description: | If the value is present, then it shall be the test case description. @@ -49,10 +49,10 @@ spec-info: spec-type: test-name test-setup: description: null - spec-type: requirement-directive-test-fixture + spec-type: requirement-action-test-fixture test-stop: description: null - spec-type: requirement-directive-test-fixture + spec-type: requirement-action-test-fixture test-support: description: | If the value is present, then it shall be the test case support code. @@ -64,30 +64,37 @@ spec-info: spec-type: str test-teardown: description: null - spec-type: requirement-directive-test-fixture + spec-type: requirement-action-test-fixture transition-map: description: null - spec-type: requirement-directive-transition-list + spec-type: requirement-action-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 + corresponding validation test code. The functional requirements of an + action are specified. An action performs a step in a finite state + machine. An action is implemented through a function or a macro. The + action is performed through a call of the function or an execution of the + code of an macro expansion by an actor. The actor is for example a task + or an interrupt service routine. + + There shall be exactly one link with the + ${interface-function-role:/spec-name} to the interface of the action. + + The action requirements are specified by * 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. + the action. - 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. + Along with the requirements, the test code to generate a validation test + is specified. For an action requirement it is verified that all + variations of pre-condition states have a set of post-condition states + specified in the transition map. All transitions are covered by the + generated test code. mandatory-attributes: all -spec-name: Directive Requirement Item Type -spec-type: requirement-directive +spec-name: Action Requirement Item Type +spec-type: requirement-action type: spec |