[rtems-central commit] spec: Use EARS syntax

Sebastian Huber sebh at rtems.org
Sat Feb 20 12:41:19 UTC 2021


Module:    rtems-central
Branch:    master
Commit:    91882d29ef2e1aa1cb7efaac9bdbb1103a8453fc
Changeset: http://git.rtems.org/rtems-central/commit/?id=91882d29ef2e1aa1cb7efaac9bdbb1103a8453fc

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Feb 19 20:35:16 2021 +0100

spec: Use EARS syntax

Avoid the term "There shall".

---

 spec/req/root.yml                           |  2 +-
 spec/rtems/event/req/send-receive.yml       | 31 ++++++++++++++++-------------
 spec/rtems/message/req/construct-errors.yml |  5 +++--
 spec/rtems/message/req/group.yml            |  2 +-
 spec/rtems/part/req/create.yml              |  4 ++--
 spec/rtems/ratemon/req/group.yml            |  2 +-
 spec/rtems/sem/req/group.yml                |  2 +-
 spec/rtems/task/req/construct-errors.yml    |  4 ++--
 spec/rtems/userext/req/group.yml            |  2 +-
 spec/spec/appl-config-option-value.yml      |  4 ++--
 10 files changed, 31 insertions(+), 27 deletions(-)

diff --git a/spec/req/root.yml b/spec/req/root.yml
index 4c304f1..0a0e9bd 100644
--- a/spec/req/root.yml
+++ b/spec/req/root.yml
@@ -8,5 +8,5 @@ rationale: null
 references: []
 requirement-type: non-functional
 text: |
-  The software product shall shall be a real-time operating system.
+  The software product shall be a real-time operating system.
 type: requirement
diff --git a/spec/rtems/event/req/send-receive.yml b/spec/rtems/event/req/send-receive.yml
index 56e4671..862eda9 100644
--- a/spec/rtems/event/req/send-receive.yml
+++ b/spec/rtems/event/req/send-receive.yml
@@ -26,21 +26,21 @@ post-conditions:
       T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNKNOWN );
       T_eq_u32( GetPendingEvents( ctx ), 0 );
     text: |
-      There shall be no pending events.
+      The receiver task shall have no pending events.
   - name: Pending
     test-code: |
       T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNKNOWN );
       T_eq_u32( GetPendingEvents( ctx ), ctx->events_to_send );
     text: |
-      All events sent shall be pending.
+      The receiver task shall have all events sent pending.
   - name: Timeout
     test-code: |
       T_rsc( ctx->receive_status, RTEMS_TIMEOUT );
       T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNKNOWN );
       T_eq_u32( GetPendingEvents( ctx ), ctx->events_to_send );
     text: |
-      The receive event status shall be RTEMS_TIMEOUT.  All events sent after
-      the timeout shall be pending.
+      The receive event status shall be ${../../status/if/timeout:/name}.  The
+      receiver task shall have all events sent after the timeout pending.
   - name: Satisfied
     test-code: |
       T_rsc( ctx->receive_status, RTEMS_SUCCESSFUL );
@@ -52,24 +52,25 @@ post-conditions:
       T_eq_u32( ctx->received_events, ctx->events_to_send & INPUT_EVENTS );
       T_eq_u32( GetPendingEvents( ctx ), ctx->events_to_send & ~INPUT_EVENTS );
     text: |
-      The receive event status shall be RTEMS_SUCCESSFUL.  The received events
-      shall be equal to the input events sent.  The pending events shall be
-      equal to the events sent which are not included in the input events.
+      The receive event status shall be ${../../status/if/successful:/name}.
+      The receiver task shall receive all events sent which are an element of
+      the input events.  The receiver task shall have all events sent which are
+      not an element of the input events pending.
   - name: Unsatisfied
     test-code: |
       T_rsc( ctx->receive_status, RTEMS_UNSATISFIED );
       T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNKNOWN );
       T_eq_u32( GetPendingEvents( ctx ), ctx->events_to_send );
     text: |
-      The receive event status shall be RTEMS_UNSATISFIED.  All sent events
-      shall be pending.
+      The receive event status shall be ${../../status/if/unsatisfied:/name}.
+      The receiver task shall have all events sent pending.
   - name: Blocked
     test-code: |
       T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNSATISFIED );
       T_eq_u32( ctx->unsatisfied_pending, ctx->events_to_send );
     text: |
       The receiver task shall remain blocked waiting for events after the
-      directive call.  All sent events shall be pending.
+      directive call.  The receiver task shall have all events sent pending.
   test-epilogue: null
   test-prologue: null
 - name: SenderPreemption
@@ -88,14 +89,16 @@ post-conditions:
         T_eq_u32( log->events[ i ].heir, ctx->runner_id );
       }
     text: |
-      There shall be no sender preemption.
+      When the sender task calls the directive to send the events, the sender
+      task shall not be preempted as a result of the call.
   - name: 'Yes'
     test-code: |
       T_eq_sz( log->recorded, 2 );
       T_eq_u32( log->events[ 0 ].heir, ctx->runner_id );
       T_eq_u32( log->events[ 1 ].heir, ctx->worker_id );
     text: |
-      There shall be a sender preemption.
+      When the sender task calls the directive to send the events, the sender
+      task shall be preempted as a result of the call.
   test-epilogue: null
   test-prologue: |
     T_thread_switch_log *log;
@@ -334,13 +337,13 @@ test-context:
   description: null
   member: rtems_status_code receive_status
 - brief: |
-    This member contains the event conditon state of the receiver task after
+    This member contains the event condition state of the receiver task after
     the event send action.
   description: null
   member: ReceiveConditionStates receive_condition_state
 - brief: |
     This member contains the pending events after an event send action which
-    did not satsify the event condition of the receiver.
+    did not satisify the event condition of the receiver.
   description: null
   member: rtems_event_set unsatisfied_pending
 - brief: |
diff --git a/spec/rtems/message/req/construct-errors.yml b/spec/rtems/message/req/construct-errors.yml
index c107fb8..f8dc995 100644
--- a/spec/rtems/message/req/construct-errors.yml
+++ b/spec/rtems/message/req/construct-errors.yml
@@ -152,7 +152,8 @@ pre-conditions:
     test-code: |
       /* Nothing to do */
     text: |
-      There shall be at least one inactive message queue object available.
+      The system shall have at least one inactive message queue object
+      available.
   - name: None
     test-code: |
       memset( &config, 0, sizeof( config ) );
@@ -189,7 +190,7 @@ pre-conditions:
         ++i;
       }
     text: |
-      There shall be no inactive message queue object available.
+      The system shall have no inactive message queue object available.
   test-epilogue: null
   test-prologue: |
     rtems_message_queue_config config;
diff --git a/spec/rtems/message/req/group.yml b/spec/rtems/message/req/group.yml
index eba2c40..c808530 100644
--- a/spec/rtems/message/req/group.yml
+++ b/spec/rtems/message/req/group.yml
@@ -13,6 +13,6 @@ links:
   uid: ../../if/group
 name: Message Manager
 text: |
-  There shall be a software architecture component containing the Message
+  The software architecture shall have a component containing the Message
   Manager implementation.
 type: interface
diff --git a/spec/rtems/part/req/create.yml b/spec/rtems/part/req/create.yml
index 5caf2f5..c550177 100644
--- a/spec/rtems/part/req/create.yml
+++ b/spec/rtems/part/req/create.yml
@@ -178,7 +178,7 @@ pre-conditions:
     test-code: |
       /* Nothing to do */
     text: |
-      There shall be at least one inactive partition object available.
+      The system shall have at least one inactive partition object available.
   - name: None
     test-code: |
       i = 0;
@@ -213,7 +213,7 @@ pre-conditions:
         ++i;
       }
     text: |
-      There shall be no inactive partition object available.
+      The system shall have no inactive partition object available.
   test-epilogue: null
   test-prologue: |
     size_t i;
diff --git a/spec/rtems/ratemon/req/group.yml b/spec/rtems/ratemon/req/group.yml
index a817c98..22a70c8 100644
--- a/spec/rtems/ratemon/req/group.yml
+++ b/spec/rtems/ratemon/req/group.yml
@@ -13,6 +13,6 @@ links:
   uid: ../../if/group
 name: Rate Monotonic Manager
 text: |
-  There shall be a software architecture component containing the Rate
+  The software architecture shall have a component containing the Rate
   Monotonic Manager implementation.
 type: interface
diff --git a/spec/rtems/sem/req/group.yml b/spec/rtems/sem/req/group.yml
index bada757..dd8ef94 100644
--- a/spec/rtems/sem/req/group.yml
+++ b/spec/rtems/sem/req/group.yml
@@ -13,6 +13,6 @@ links:
   uid: ../../if/group
 name: Semaphore Manager
 text: |
-  There shall be a software architecture component containing the Semaphore
+  The software architecture shall have a component containing the Semaphore
   Manager implementation.
 type: interface
diff --git a/spec/rtems/task/req/construct-errors.yml b/spec/rtems/task/req/construct-errors.yml
index 422a119..10619d4 100644
--- a/spec/rtems/task/req/construct-errors.yml
+++ b/spec/rtems/task/req/construct-errors.yml
@@ -124,7 +124,7 @@ pre-conditions:
     test-code: |
       /* Nothing to do */
     text: |
-      There shall be at least one inactive task object available.
+      The system shall have at least one inactive task object available.
   - name: None
     test-code: |
       create_extension_status = ctx->create_extension_status;
@@ -153,7 +153,7 @@ pre-conditions:
 
       ctx->create_extension_status = create_extension_status;
     text: |
-      There shall be no inactive task object available.
+      The system shall have no inactive task object available.
   test-epilogue: null
   test-prologue: |
     bool create_extension_status;
diff --git a/spec/rtems/userext/req/group.yml b/spec/rtems/userext/req/group.yml
index 6e52320..75cf4ef 100644
--- a/spec/rtems/userext/req/group.yml
+++ b/spec/rtems/userext/req/group.yml
@@ -13,6 +13,6 @@ links:
   uid: ../../if/group
 name: User Extension Manager
 text: |
-  There shall be a software architecture component containing the User
+  The software architecture shall have a component containing the User
   Extension Manager implementation.
 type: interface
diff --git a/spec/spec/appl-config-option-value.yml b/spec/spec/appl-config-option-value.yml
index 96abef0..e750318 100644
--- a/spec/spec/appl-config-option-value.yml
+++ b/spec/spec/appl-config-option-value.yml
@@ -23,8 +23,8 @@ spec-info:
         spec-type: appl-config-option-constraints
       default-value:
         description: |
-          It shall shall describe the default value of the application
-          configuration option.
+          It shall describe the default value of the application configuration
+          option.
         spec-type: int-or-str
     description: |
       This set of attributes specifies application configuration initializer or



More information about the vc mailing list