<div dir="ltr">Commit it. <div><br></div><div>If mcdc-checker is happy with it, then I'm ok.</div><div><br></div><div><a href="https://gtd-gmbh.gitlab.io/mcdc-checker/mcdc-checker/index.html">https://gtd-gmbh.gitlab.io/mcdc-checker/mcdc-checker/index.html</a> is </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 25, 2023 at 1:34 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 23.03.23 17:46, Joel Sherrill wrote:<br>
> <br>
> <br>
> On Thu, Mar 23, 2023 at 11:09 AM Sebastian Huber <br>
> <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a> <br>
> <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>>> wrote:<br>
> <br>
> On 23.03.23 17:03, Joel Sherrill wrote:<br>
> ><br>
> > On Thu, Mar 23, 2023 at 10:40 AM Sebastian Huber<br>
> > <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
> <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>><br>
> > <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
> <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>>>> wrote:<br>
> ><br>
> > Close #4863.<br>
> > ---<br>
> > cpukit/include/rtems/score/objectimpl.h | 4 +---<br>
> > 1 file changed, 1 insertion(+), 3 deletions(-)<br>
> ><br>
> > diff --git a/cpukit/include/rtems/score/objectimpl.h<br>
> > b/cpukit/include/rtems/score/objectimpl.h<br>
> > index c58957ccb5..a1a87b5ccb 100644<br>
> > --- a/cpukit/include/rtems/score/objectimpl.h<br>
> > +++ b/cpukit/include/rtems/score/objectimpl.h<br>
> > @@ -542,9 +542,7 @@ static inline bool _Objects_Is_api_valid(<br>
> > uint32_t the_api<br>
> > )<br>
> > {<br>
> > - if ( !the_api || the_api > OBJECTS_APIS_LAST )<br>
> > - return false;<br>
> > - return true;<br>
> > + return ( 1 <= the_api && the_api <= OBJECTS_APIS_LAST );<br>
> > }<br>
> ><br>
> ><br>
> > I'd really prefer we avoid compound logical expressions since it<br>
> > becomes something that needs MCDC analysis at higher levels<br>
> > of verification/qualification.<br>
> <br>
> How does this simplify MC/DC analysis? The truth table doesn't<br>
> change if<br>
> I replace a short-circuit boolean expression with if + return.<br>
> <br>
> <br>
> gcov cannot directly do mcdc analysis but using simple expressions<br>
> avoids the introduction of those cases. So gcov reports can be equivalent<br>
> of an expensive MCDC analysis tool.<br>
> <br>
> I'm at the FSW this week and one of the NASA Johnson people shared<br>
> information on an open source tool and way to use gcov where you<br>
> are guaranteed to have gcov reports cover this. I'm going to experiment<br>
> with this when I get home. If it is as easy as it sounds, I'll write up <br>
> something<br>
> on the technique and we can discuss if we want to apply this to RTEMS.<br>
> I think we do since it would allow us to use gcov to ensure we do<br>
> MCDC level analysis as required by the highest level of all the safety<br>
> standards I know.<br>
<br>
Any news with respect to this topic?<br>
<br>
> <br>
> <br>
> ><br>
> > Please rewrite using simple logical expressions even if it means<br>
> > two exit paths at the source leve. It's the same machine code.<br>
> <br>
> Yes.<br>
<br>
Do you really want to change<br>
<br>
static inline bool _Objects_Is_api_valid(<br>
uint32_t the_api<br>
)<br>
{<br>
return ( 1 <= the_api && the_api <= OBJECTS_APIS_LAST );<br>
}<br>
<br>
in<br>
<br>
static inline bool _Objects_Is_api_valid(<br>
uint32_t the_api<br>
)<br>
{<br>
if ( the_api < 1 ) {<br>
return false;<br>
}<br>
<br>
if ( the_api > OBJECTS_APIS_LAST ) {<br>
return false;<br>
}<br>
<br>
return true;<br>
}<br>
<br>
?<br>
<br>
I am not really sure why we should do this.<br>
<br>
-- <br>
embedded brains GmbH<br>
Herr Sebastian HUBER<br>
Dornierstr. 4<br>
82178 Puchheim<br>
Germany<br>
email: <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
phone: +49-89-18 94 741 - 16<br>
fax: +49-89-18 94 741 - 08<br>
<br>
Registergericht: Amtsgericht München<br>
Registernummer: HRB 157899<br>
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler<br>
Unsere Datenschutzerklärung finden Sie hier:<br>
<a href="https://embedded-brains.de/datenschutzerklaerung/" rel="noreferrer" target="_blank">https://embedded-brains.de/datenschutzerklaerung/</a><br>
</blockquote></div>