<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" version="2.0">
<channel>
	<title>Comments for My2Cents</title>
	
	<link>http://my2cents.safecodellc.net</link>
	<description>While Versions of Software Danced in my Head...</description>
	<lastBuildDate>Wed, 22 Sep 2010 04:49:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/safecode/my2cents/comments" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="safecode/my2cents/comments" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Comment on Slicing with Dijkstra by Max H</title>
		<link>http://my2cents.safecodellc.net/2010/06/20/slicing-with-dijkstra/comment-page-1/#comment-18</link>
		<dc:creator>Max H</dc:creator>
		<pubDate>Wed, 22 Sep 2010 04:49:13 +0000</pubDate>
		<guid isPermaLink="false">http://s328149455.onlinehome.us/my2cents/?p=187#comment-18</guid>
		<description>I've often heard abstract interpretation referred to as pseudo-dynamic analysis as well.  I would like to know more about your tools.

The above case was real-world. It involved a loss of state information during power-cycles, and the information lost was never relevant -- except, as it turns out, for a very specific class and sequence of sensor failures with intervening power-cycles; a condition that could not have been foreseen.  The state it reached was not even incorrect; what was incorrect, for the class of sensor failure, was the transition -- the reinstatement of the previously failed sensor.

Short of full specifications and formal methods, I'm not sure how detecting such a thing might have been automated.  It does seem like an excellent topic for research, though.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve often heard <a href="http://en.wikipedia.org/wiki/Abstract_interpretation">abstract interpretation</a> referred to as pseudo-dynamic analysis as well.  I would like to know more about your tools.</p>
<p>The above case was real-world. It involved a loss of state information during power-cycles, and the information lost was never relevant &#8212; except, as it turns out, for a very specific class and sequence of sensor failures with intervening power-cycles; a condition that could not have been foreseen.  The state it reached was not even incorrect; what was incorrect, for the class of sensor failure, was the transition &#8212; the reinstatement of the previously failed sensor.</p>
<p>Short of full specifications and formal methods, I&#8217;m not sure how detecting such a thing might have been automated.  It does seem like an excellent topic for research, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sessions on Architectural Complexity by xtranguru</title>
		<link>http://my2cents.safecodellc.net/2010/05/20/sessions-on-architectural-complexity/comment-page-1/#comment-17</link>
		<dc:creator>xtranguru</dc:creator>
		<pubDate>Sun, 19 Sep 2010 23:03:44 +0000</pubDate>
		<guid isPermaLink="false">http://my2cents.safecodellc.net/?p=266#comment-17</guid>
		<description>Hmm.  For a long time, both as a software engineer and as an architect, I've been using what I call the "cocktail shaker" method of designing and implementing software systems.  This combines top-down functional decomposition of the requirements problem domain with bottom-up identification of the common primitives that will be needed, both domain-specific and domain-independent. If done right, the process meets in the middle, with the functional decomposition being implemented in terms of the primitives.  This also maximizes reuse, because the primitives, by their nature, are almost always candidates for reuse.  (I assume a "primitive librarian" to oversee all of this -- a critical position, to be filled by the best person who can be found and afforded.)

With this "cocktail-shaker" approach, the functional decomposition and the primitive identification are intimately related; they are done on concert and cannot be separated.  In fact, the primitives ID usually shapes the functional decomposition as it progress, and vice versa.  Furthermore, both aspects of the design need to be done by very experienced and skilled people, and as few as possible of them. Brooks' law applies with a vengeance...

A key to all of this, IMHO, is doing a comprehensive ERD as a first step; it will clarify the relationships among the data of the problem, which in turn begins to suggest the design architecture, leading to the implementation architecture.  Of course, the data schema will change, but not as much as functional requirements usually do, so maintaining the ERD, once created, shouldn't be unduly burdensome.  The ERD also serves as an "anchor" as functional requirements change -- sometimes a proposed requirements change will, upon being related to the ERD, be discovered to be not such a good idea, or a better way to achieve the change's objective is discovered.

I also think that this "cocktail-shaker" approach is orthogonal to competing methodologies such as waterfall vs. Agile.

BTW, Capers Jones's stats show that reuse is far and away the most effective approach to reducing software defects; nothing else even comes close.  And I have made reuse a part of my professional practice for a very long time.  I have created, and currently babysit, 1/2 million lines of C that are rife with reuse at just about every conceivable level.

In fact, IMHO identifying reusable components (resulting in run libraries and OO classes) is an inherent part of a software architect's or engineer's skill set.  I do agree that it's really difficult to get many enterprises to make the necessary skills investments to achieve it, which is very sad.</description>
		<content:encoded><![CDATA[<p>Hmm.  For a long time, both as a software engineer and as an architect, I&#8217;ve been using what I call the &#8220;cocktail shaker&#8221; method of designing and implementing software systems.  This combines top-down functional decomposition of the requirements problem domain with bottom-up identification of the common primitives that will be needed, both domain-specific and domain-independent. If done right, the process meets in the middle, with the functional decomposition being implemented in terms of the primitives.  This also maximizes reuse, because the primitives, by their nature, are almost always candidates for reuse.  (I assume a &#8220;primitive librarian&#8221; to oversee all of this &#8212; a critical position, to be filled by the best person who can be found and afforded.)</p>
<p>With this &#8220;cocktail-shaker&#8221; approach, the functional decomposition and the primitive identification are intimately related; they are done on concert and cannot be separated.  In fact, the primitives ID usually shapes the functional decomposition as it progress, and vice versa.  Furthermore, both aspects of the design need to be done by very experienced and skilled people, and as few as possible of them. Brooks&#8217; law applies with a vengeance&#8230;</p>
<p>A key to all of this, IMHO, is doing a comprehensive ERD as a first step; it will clarify the relationships among the data of the problem, which in turn begins to suggest the design architecture, leading to the implementation architecture.  Of course, the data schema will change, but not as much as functional requirements usually do, so maintaining the ERD, once created, shouldn&#8217;t be unduly burdensome.  The ERD also serves as an &#8220;anchor&#8221; as functional requirements change &#8212; sometimes a proposed requirements change will, upon being related to the ERD, be discovered to be not such a good idea, or a better way to achieve the change&#8217;s objective is discovered.</p>
<p>I also think that this &#8220;cocktail-shaker&#8221; approach is orthogonal to competing methodologies such as waterfall vs. Agile.</p>
<p>BTW, Capers Jones&#8217;s stats show that reuse is far and away the most effective approach to reducing software defects; nothing else even comes close.  And I have made reuse a part of my professional practice for a very long time.  I have created, and currently babysit, 1/2 million lines of C that are rife with reuse at just about every conceivable level.</p>
<p>In fact, IMHO identifying reusable components (resulting in run libraries and OO classes) is an inherent part of a software architect&#8217;s or engineer&#8217;s skill set.  I do agree that it&#8217;s really difficult to get many enterprises to make the necessary skills investments to achieve it, which is very sad.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Slicing with Dijkstra by xtranguru</title>
		<link>http://my2cents.safecodellc.net/2010/06/20/slicing-with-dijkstra/comment-page-1/#comment-16</link>
		<dc:creator>xtranguru</dc:creator>
		<pubDate>Sun, 19 Sep 2010 22:30:24 +0000</pubDate>
		<guid isPermaLink="false">http://s328149455.onlinehome.us/my2cents/?p=187#comment-16</guid>
		<description>Max -- would Wednesday be OK? :)

Seriously, we're talking to a couple of clients about applying static code analysis to the kind of problem you describe, although yours is an inverse version, which makes it even more interesting.

I'm looking at applying a version of static analysis I call "pseudo-dynamic analysis", which consists of writing analysis rules to follow logic paths looking for trouble.  For example, that's how we measure Cyclomatic Complexity and find dead code.  It can also find things like uninitialized variables, potential buffer overflows, and "divide by 0" types of problems.  Our rules language has built-in AST navigation facilities that make this approach easy to implement. 

The 100K lines of code is no problem; we routinely deal in multiples of 100K, and the analysis takes from a few minutes to a few hours, depending on circumstances.

Your inverse problem is interesting because it requires inferring a set of possible causes from the failure condition, then looking for indicators of those causes.  Depending on the condition, that could be very easy or nearly impossible.  Do you have a real-world failure in mind, or was it a general question?

BTW, I've found that Occam's Razor is really good at that kind of slicing :)</description>
		<content:encoded><![CDATA[<p>Max &#8212; would Wednesday be OK? <img src='http://my2cents.safecodellc.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Seriously, we&#8217;re talking to a couple of clients about applying static code analysis to the kind of problem you describe, although yours is an inverse version, which makes it even more interesting.</p>
<p>I&#8217;m looking at applying a version of static analysis I call &#8220;pseudo-dynamic analysis&#8221;, which consists of writing analysis rules to follow logic paths looking for trouble.  For example, that&#8217;s how we measure Cyclomatic Complexity and find dead code.  It can also find things like uninitialized variables, potential buffer overflows, and &#8220;divide by 0&#8243; types of problems.  Our rules language has built-in AST navigation facilities that make this approach easy to implement. </p>
<p>The 100K lines of code is no problem; we routinely deal in multiples of 100K, and the analysis takes from a few minutes to a few hours, depending on circumstances.</p>
<p>Your inverse problem is interesting because it requires inferring a set of possible causes from the failure condition, then looking for indicators of those causes.  Depending on the condition, that could be very easy or nearly impossible.  Do you have a real-world failure in mind, or was it a general question?</p>
<p>BTW, I&#8217;ve found that Occam&#8217;s Razor is really good at that kind of slicing <img src='http://my2cents.safecodellc.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Structs in Wonderland by xtranguru</title>
		<link>http://my2cents.safecodellc.net/2010/07/19/structs-in-wonderland/comment-page-1/#comment-15</link>
		<dc:creator>xtranguru</dc:creator>
		<pubDate>Sun, 19 Sep 2010 22:23:35 +0000</pubDate>
		<guid isPermaLink="false">http://my2cents.safecodellc.net/?p=365#comment-15</guid>
		<description>Another tool that can be used to apply transformations to large (or small) bodies of code is XTRAN, our software engineering automation meta-tool.  Its rules language has lots of useful primitives for performing such transformations, including navigation at all levels of the AST (statement, expression, etc.) and very powerful pattern matching and replacement facilities that operate directly on the AST representing the code content, in which almost any AST entity can be "wild" for pattern matching, and you can ask for a copy of what matched such a "wildcard" in the even of a successful match.</description>
		<content:encoded><![CDATA[<p>Another tool that can be used to apply transformations to large (or small) bodies of code is XTRAN, our software engineering automation meta-tool.  Its rules language has lots of useful primitives for performing such transformations, including navigation at all levels of the AST (statement, expression, etc.) and very powerful pattern matching and replacement facilities that operate directly on the AST representing the code content, in which almost any AST entity can be &#8220;wild&#8221; for pattern matching, and you can ask for a copy of what matched such a &#8220;wildcard&#8221; in the even of a successful match.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Structs in Wonderland by Max H</title>
		<link>http://my2cents.safecodellc.net/2010/07/19/structs-in-wonderland/comment-page-1/#comment-14</link>
		<dc:creator>Max H</dc:creator>
		<pubDate>Fri, 06 Aug 2010 16:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://my2cents.safecodellc.net/?p=365#comment-14</guid>
		<description>The article was updated today to reflect the information in the above comment.  This was done because I have seen comments by readers on LinkedIn were who not cognizant of the new information.  I hope the changes will eliminate some of the confusion.  

My update covered the two paragraphs that immediately followed the last line of sample code.  The original text of these paragraphs was as follows:
&lt;blockquote&gt;Now there are two issues that should be emphasized about the above examples.  First, the copy semantics of structs exclude any array members, so the member &lt;em&gt;a&lt;/em&gt; will not be initialized or modified in any of the examples except the first two.  Second, the last example is very inefficient since, disregarding any possible optimizations, &lt;em&gt;gee&lt;/em&gt; will first be copied to the parameter, then to the result, then to &lt;em&gt;golly&lt;/em&gt;.


Though I am now sure that the code I was seeing is legal; given the inefficiencies of copying structures and the large number of structs being set, I believe the originators of the application I'm dealing with would have significantly improved performance by using a pass-by-reference (pointer) strategy.  While I have worked with structures in countless programs, I tend not to do direct struct-to-struct assignments, preferring to use memcpy.  The latter works whether the struct contains member arrays or not, so treatment can be consistent throughout and across applications.  &lt;/blockquote&gt;

While I am grateful for Derek Jones response, and I accept his interpretation as authoritative with respect to the intent of the standard, my own experience and articles/advice I've seen from other developers leads me to believe that at least some embedded compiler vendors shared my original interpretation; so I recommend that you tread carefully if you decide to use struct-to-struct copy with array members.  Run a few quick tests to make sure the implementation performs as you expect it to.

As I side-note, I was very impressed with the Coccinelle tool that Mr. Jones mentioned.  I am quite sure I will be able to make use of it; and perhaps I'll give it a review here then.  In the meantime, it looks amazingly useful for anyone who is maintaining or updating a large code base, either for use in review or bulk-update.</description>
		<content:encoded><![CDATA[<p>The article was updated today to reflect the information in the above comment.  This was done because I have seen comments by readers on LinkedIn were who not cognizant of the new information.  I hope the changes will eliminate some of the confusion.  </p>
<p>My update covered the two paragraphs that immediately followed the last line of sample code.  The original text of these paragraphs was as follows:</p>
<blockquote><p>Now there are two issues that should be emphasized about the above examples.  First, the copy semantics of structs exclude any array members, so the member <em>a</em> will not be initialized or modified in any of the examples except the first two.  Second, the last example is very inefficient since, disregarding any possible optimizations, <em>gee</em> will first be copied to the parameter, then to the result, then to <em>golly</em>.</p>
<p>Though I am now sure that the code I was seeing is legal; given the inefficiencies of copying structures and the large number of structs being set, I believe the originators of the application I&#8217;m dealing with would have significantly improved performance by using a pass-by-reference (pointer) strategy.  While I have worked with structures in countless programs, I tend not to do direct struct-to-struct assignments, preferring to use memcpy.  The latter works whether the struct contains member arrays or not, so treatment can be consistent throughout and across applications.  </p></blockquote>
<p>While I am grateful for Derek Jones response, and I accept his interpretation as authoritative with respect to the intent of the standard, my own experience and articles/advice I&#8217;ve seen from other developers leads me to believe that at least some embedded compiler vendors shared my original interpretation; so I recommend that you tread carefully if you decide to use struct-to-struct copy with array members.  Run a few quick tests to make sure the implementation performs as you expect it to.</p>
<p>As I side-note, I was very impressed with the Coccinelle tool that Mr. Jones mentioned.  I am quite sure I will be able to make use of it; and perhaps I&#8217;ll give it a review here then.  In the meantime, it looks amazingly useful for anyone who is maintaining or updating a large code base, either for use in review or bulk-update.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Structs in Wonderland by Max H</title>
		<link>http://my2cents.safecodellc.net/2010/07/19/structs-in-wonderland/comment-page-1/#comment-12</link>
		<dc:creator>Max H</dc:creator>
		<pubDate>Tue, 27 Jul 2010 22:59:15 +0000</pubDate>
		<guid isPermaLink="false">http://my2cents.safecodellc.net/?p=365#comment-12</guid>
		<description>Because I was not sure of my interpretation, I contacted Mr. Derek Jones, a member of the C standards committee, and author of "The New C Standard" (linked in my previous comment); and asked him to provide feedback on the article.  His response follows:

&lt;blockquote&gt;
All named members of a structure are required to be copied by a
conforming implementation, including arrays.
The only places where implementations may vary is in the handling
of any padding between named members, they are not required to
copy this.
See sentence 1298.

I can see how you might connect 6.5.16.1 and footnote 42 to think
that members having an array type would not be copied.  The reason
that arrays cannot be copied is that they degenerate to pointers to
their first element, loosing all 'arrayness' information in the process.

Unless the struct is very small it is much more efficient to pass its
address.  Of course this usage requires that the called function does
not modify the contents of the struct.

As s1298 struct assignment can be more efficient than using memcpy (gcc
does do fancy things to figure out alignment of the objects passed to
memcpy). Member by member copy can be more efficient for low numbers
of members because it has no loop overhead.

If you are making lots of very similar changes to C source you might be
interested in using Coccinelle:
http://shape-of-code.coding-guidelines.com/2009/01/08/semantic-pattern-matching-coccinelle/

You are welcome to copy-and-paste this to the comment section of your blog.

-- 
Derek M. Jones                         tel: +44 (0) 1252 520 667
Knowledge Software Ltd                 mailto:derek@knosof.co.uk
Source code analysis                   http://www.knosof.co.uk
&lt;/blockquote&gt;

Thank you Mr. Jones for your kind and prompt response.</description>
		<content:encoded><![CDATA[<p>Because I was not sure of my interpretation, I contacted Mr. Derek Jones, a member of the C standards committee, and author of &#8220;The New C Standard&#8221; (linked in my previous comment); and asked him to provide feedback on the article.  His response follows:</p>
<blockquote><p>
All named members of a structure are required to be copied by a<br />
conforming implementation, including arrays.<br />
The only places where implementations may vary is in the handling<br />
of any padding between named members, they are not required to<br />
copy this.<br />
See sentence 1298.</p>
<p>I can see how you might connect 6.5.16.1 and footnote 42 to think<br />
that members having an array type would not be copied.  The reason<br />
that arrays cannot be copied is that they degenerate to pointers to<br />
their first element, loosing all &#8216;arrayness&#8217; information in the process.</p>
<p>Unless the struct is very small it is much more efficient to pass its<br />
address.  Of course this usage requires that the called function does<br />
not modify the contents of the struct.</p>
<p>As s1298 struct assignment can be more efficient than using memcpy (gcc<br />
does do fancy things to figure out alignment of the objects passed to<br />
memcpy). Member by member copy can be more efficient for low numbers<br />
of members because it has no loop overhead.</p>
<p>If you are making lots of very similar changes to C source you might be<br />
interested in using Coccinelle:<br />
<a href="http://shape-of-code.coding-guidelines.com/2009/01/08/semantic-pattern-matching-coccinelle/" rel="nofollow">http://shape-of-code.coding-guidelines.com/2009/01/08/semantic-pattern-matching-coccinelle/</a></p>
<p>You are welcome to copy-and-paste this to the comment section of your blog.</p>
<p>&#8211;<br />
Derek M. Jones                         tel: +44 (0) 1252 520 667<br />
Knowledge Software Ltd                 mailto:derek@knosof.co.uk<br />
Source code analysis                   <a href="http://www.knosof.co.uk" rel="nofollow">http://www.knosof.co.uk</a>
</p></blockquote>
<p>Thank you Mr. Jones for your kind and prompt response.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Structs in Wonderland by Max H</title>
		<link>http://my2cents.safecodellc.net/2010/07/19/structs-in-wonderland/comment-page-1/#comment-11</link>
		<dc:creator>Max H</dc:creator>
		<pubDate>Sat, 24 Jul 2010 04:43:23 +0000</pubDate>
		<guid isPermaLink="false">http://my2cents.safecodellc.net/?p=365#comment-11</guid>
		<description>A reader on LinkedIn posed the following question:

&lt;blockquote&gt;
I do not know the standards well, so could you direct me to where in they state that the copy semantics of structs exclude any array members. This seems inherently wrong not to copy all member of the structure. It could also take a alot more instructions, depending on how many array intermixed in the structure, to do a selective copy than just copy the whole structure.
&lt;/blockquote&gt;

As I said, these are my interpretations of the standard.  In reviewing the materials to respond to your question, I found that I had misread one section, and failed to consider the technical corrigenda.  I also dug a bit deeper by looking at &lt;a href="http://www.knosof.co.uk/cbook/cbook.html" target="_blank" rel="nofollow"&gt;"The New C Standard"&lt;/a&gt;, by Derek M. Jones.  I now believe that a more correct interpretation is that the copying of array members in structs is implementation optional.

The rule in question is not explicitly stated anywhere that I can find, and I am not entirely confident that my interpretation is correct.  
Nonetheless here are the areas that lead me to this conclusion:
&lt;ul&gt;
&lt;li&gt;Section 6.5.16.1  Makes no provision for an assignment to an array. (i.e. direct array-to-array copy is not supported).&lt;/li&gt;
&lt;li&gt;Footnote 42 to Section 6.2.6.1 par 6 indicates that a structure assignment may be copied via a memcpy or via element-by-element copy.  If the latter is used, I would expect it to be via the rules of the previously mentioned section.&lt;/li&gt;
&lt;li&gt;Section 6.7.2.1, was heavily ammended by TC2.  According to the new paragraph 22, which is discussing flexible array members, it indicates that the portions of the flexible array member which reside within the structure size may either be copied or overwritten by arbitrary data.  While this is a specific case, the treatment seems consistent with my interpretation.&lt;/li&gt;
&lt;/ul&gt;
By the way, inefficient or not, the compiler implementation I am dealing with is performing the member-by-member copy of structs.</description>
		<content:encoded><![CDATA[<p>A reader on LinkedIn posed the following question:</p>
<blockquote><p>
I do not know the standards well, so could you direct me to where in they state that the copy semantics of structs exclude any array members. This seems inherently wrong not to copy all member of the structure. It could also take a alot more instructions, depending on how many array intermixed in the structure, to do a selective copy than just copy the whole structure.
</p></blockquote>
<p>As I said, these are my interpretations of the standard.  In reviewing the materials to respond to your question, I found that I had misread one section, and failed to consider the technical corrigenda.  I also dug a bit deeper by looking at <a href="http://www.knosof.co.uk/cbook/cbook.html" target="_blank" rel="nofollow">&#8220;The New C Standard&#8221;</a>, by Derek M. Jones.  I now believe that a more correct interpretation is that the copying of array members in structs is implementation optional.</p>
<p>The rule in question is not explicitly stated anywhere that I can find, and I am not entirely confident that my interpretation is correct.<br />
Nonetheless here are the areas that lead me to this conclusion:</p>
<ul>
<li>Section 6.5.16.1  Makes no provision for an assignment to an array. (i.e. direct array-to-array copy is not supported).</li>
<li>Footnote 42 to Section 6.2.6.1 par 6 indicates that a structure assignment may be copied via a memcpy or via element-by-element copy.  If the latter is used, I would expect it to be via the rules of the previously mentioned section.</li>
<li>Section 6.7.2.1, was heavily ammended by TC2.  According to the new paragraph 22, which is discussing flexible array members, it indicates that the portions of the flexible array member which reside within the structure size may either be copied or overwritten by arbitrary data.  While this is a specific case, the treatment seems consistent with my interpretation.</li>
</ul>
<p>By the way, inefficient or not, the compiler implementation I am dealing with is performing the member-by-member copy of structs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Slicing with Dijkstra by Max H</title>
		<link>http://my2cents.safecodellc.net/2010/06/20/slicing-with-dijkstra/comment-page-1/#comment-9</link>
		<dc:creator>Max H</dc:creator>
		<pubDate>Tue, 22 Jun 2010 04:06:27 +0000</pubDate>
		<guid isPermaLink="false">http://s328149455.onlinehome.us/my2cents/?p=187#comment-9</guid>
		<description>This article was shared to several groups on LinkedIn.  There have been a few suggestions that various automated analysis tools could have done the job as well. I disagree. Klocwork and Polyspace are two that were specifically mentioned.  Below is a copy of my reply to the suggestion that Polyspace could have done the job:

&lt;blockquote&gt;&lt;em&gt;The purpose of the article was to share a powerful technique for manual static analysis.&lt;/em&gt;  Actually I work with a number of automated analysis tools. I am very familiar with Polyspace. I have trained people in its use, and I have sold it into client sites.  It was one of the static analyzers used on this code, and it did not and could not find the issue; and we could not find a modeling technique that would permit us to find it.  The capabilities of the tool are a bit stronger now than they were then, but even in the best case Polyspace would have required extensive setup, code annotation, and modeling.  Polyspace also had some issues in how it dealt with bitfield values and bitwise operators in C.  I don't believe that any automated analysis tool in existence could have done this job.  The viable options were formal methods, simulation, and manual analysis.   Formal methods suffers from fidelity issues, and simulation was done in parallel by three of the original developers using Matlab.  The simulation team also found the issue at about the same time the analysis did, but they had a two or three day head-start.

It is not true that Polyspace creates all possible test cases.  It uses abstract interpretation to mathematically try all possible values for a variable value at every point in the program.  In many cases it also tries values that are not possible, and values that are not possible in combination.  This makes it valuable for detecting semantic errors, but without extensive modeling it generates many false positives and while it detects where exceptions might potentially be thrown; it is fairly useless for determining correct decision making in code not specifically written to take advantage of its analysis strengths.   Setting up for a Polyspace analysis of a substantial program can take a great deal of time; and if I recall correctly, the run time of the Polyspace analysis on that application was actually longer than the time I took for my manual analysis; and we had to run several times as we modeled to reduce false positives.  We had the fastest Polyspace server configuration available at the time.&lt;/blockquote&gt;

</description>
		<content:encoded><![CDATA[<p>This article was shared to several groups on LinkedIn.  There have been a few suggestions that various automated analysis tools could have done the job as well. I disagree. <a href="http://www.klocwork.com/" target="_blank">Klocwork</a> and <a href="http://www.mathworks.com/products/polyspace/">PolySpace</a> are two that were specifically mentioned.  Below is a copy of my reply to the suggestion that <a href="http://www.mathworks.com/products/polyspace/">PolySpace</a> could have done the job:</p>
<blockquote><p><em>The purpose of the article was to share a powerful technique for manual static analysis.</em>  Actually I work with a number of automated analysis tools. I am very familiar with <a href="http://www.mathworks.com/products/polyspace/">PolySpace</a>. I have trained people in its use, and I have sold it into client sites.  It was one of the static analyzers used on this code, and it did not and could not find the issue; and we could not find a modeling technique that would permit us to find it.  The capabilities of the tool are a bit stronger now than they were then, but even in the best case <a href="http://www.mathworks.com/products/polyspace/">PolySpace</a> would have required extensive setup, code annotation, and modeling.  <a href="http://www.mathworks.com/products/polyspace/">PolySpace</a> also had some issues in how it dealt with bitfield values and bitwise operators in C.  I don&#8217;t believe that any automated analysis tool in existence could have done this job.  The viable options were formal methods, simulation, and manual analysis.   Formal methods suffers from fidelity issues, and simulation was done in parallel by three of the original developers using <a href="http://www.mathworks.com/products/matlab/">MATLAB</a>.  The simulation team also found the issue at about the same time the analysis did, but they had a two or three day head-start.</p>
<p>It is not true that <a href="http://www.mathworks.com/products/polyspace/">PolySpace</a> creates all possible test cases.  It uses <a href="http://en.wikipedia.org/wiki/Abstract_interpretation">abstract interpretation</a> to mathematically try all possible values for a variable value at every point in the program.  In many cases it also tries values that are not possible, and values that are not possible in combination.  This makes it valuable for detecting semantic errors, but without extensive modeling it generates many false positives and while it detects where exceptions might potentially be thrown; it is fairly useless for determining correct decision making in code not specifically written to take advantage of its analysis strengths.   Setting up for a <a href="http://www.mathworks.com/products/polyspace/">PolySpace</a> analysis of a substantial program can take a great deal of time; and if I recall correctly, the run time of the <a href="http://www.mathworks.com/products/polyspace/">PolySpace</a> analysis on that application was actually longer than the time I took for my manual analysis; and we had to run several times as we modeled to reduce false positives.  We had the fastest <a href="http://www.mathworks.com/products/polyspace/">PolySpace</a> server configuration available at the time.</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The OOTiA Handbook: In Search of Safer OO by Max H</title>
		<link>http://my2cents.safecodellc.net/2010/05/25/ootia-handbook/comment-page-1/#comment-8</link>
		<dc:creator>Max H</dc:creator>
		<pubDate>Sat, 05 Jun 2010 05:48:55 +0000</pubDate>
		<guid isPermaLink="false">http://s328149455.onlinehome.us/my2cents/?p=195#comment-8</guid>
		<description>Thanks.  I read Jim's comment, as well as several others alluding to the obsolescence of the OOTiA.  While I am inclined to agree that the reading is dry, and not a complete guide for safety in OO; I would not agree that it is obsolete.  In my view, obsolete means that either the information is no longer correct (which is not true), or that it has been replaced by something better (which it has not... yet).  The OO annex to DO-178C is not yet official, and it is not a generally available document.  There is much valuable information contained in the OOTiA, and most is still not generally known to OO developers.</description>
		<content:encoded><![CDATA[<p>Thanks.  I read Jim&#8217;s comment, as well as several others alluding to the obsolescence of the <a href="http://www.faa.gov/aircraft/air_cert/design_approvals/air_software/oot/" target="_blank">OOTiA</a>.  While I am inclined to agree that the reading is dry, and not a complete guide for safety in OO; I would not agree that it is obsolete.  In my view, obsolete means that either the information is no longer correct (which is not true), or that it has been replaced by something better (which it has not&#8230; yet).  The OO annex to DO-178C is not yet official, and it is not a generally available document.  There is much valuable information contained in the <a href="http://www.faa.gov/aircraft/air_cert/design_approvals/air_software/oot/" target="_blank">OOTiA</a>, and most is still not generally known to OO developers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The OOTiA Handbook: In Search of Safer OO by hbonnin</title>
		<link>http://my2cents.safecodellc.net/2010/05/25/ootia-handbook/comment-page-1/#comment-7</link>
		<dc:creator>hbonnin</dc:creator>
		<pubDate>Thu, 27 May 2010 08:39:36 +0000</pubDate>
		<guid isPermaLink="false">http://s328149455.onlinehome.us/my2cents/?p=195#comment-7</guid>
		<description>Please consult Jim Chelini comment on LinkedIn (http://tinyurl.com/2wuzg3j), about obsolescence of OOTiA Handbook, and on next issue of RTCA/EUROCAE DO178-C/ED12-C. This standard will contain an OOT Supplement, addressing the Object Oriented Technologies issues with adavantages of 1) beeing  a consensus bw Authorities and Industry 2) beeing an accepted means of compliance for avionics regulation 3) beeing up to date regarding technologies. It will be pusblished in early 2011.</description>
		<content:encoded><![CDATA[<p>Please consult Jim Chelini comment on LinkedIn (<a href="http://tinyurl.com/2wuzg3j" rel="nofollow">http://tinyurl.com/2wuzg3j</a>), about obsolescence of <a href="http://www.faa.gov/aircraft/air_cert/design_approvals/air_software/oot/" target="_blank">OOTiA</a> Handbook, and on next issue of RTCA/EUROCAE DO178-C/ED12-C. This standard will contain an OOT Supplement, addressing the Object Oriented Technologies issues with adavantages of 1) beeing  a consensus bw Authorities and Industry 2) beeing an accepted means of compliance for avionics regulation 3) beeing up to date regarding technologies. It will be pusblished in early 2011.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

