<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for David Crocker&#039;s Verification Blog</title>
	<atom:link href="http://critical.eschertech.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://critical.eschertech.com</link>
	<description>Formal verification of C/C++ code for critical systems</description>
	<lastBuildDate>Sun, 16 Oct 2011 12:21:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on Dynamic Memory Allocation in Critical Embedded Systems by Five things I never use in Arduino projects &#124; David Crocker&#039;s Solutions blog</title>
		<link>http://critical.eschertech.com/2010/07/30/dynamic-memory-allocation-in-critical-embedded-systems/#comment-585</link>
		<dc:creator><![CDATA[Five things I never use in Arduino projects &#124; David Crocker&#039;s Solutions blog]]></dc:creator>
		<pubDate>Sun, 16 Oct 2011 12:21:09 +0000</pubDate>
		<guid isPermaLink="false">http://critical.eschertech.com/?p=509#comment-585</guid>
		<description><![CDATA[[...] a short while, but crashes with other inputs or after a longer time, due to memory exhaustion. See http://critical.eschertech.com/2010/07/30/dynamic-memory-allocation-in-critical-embedded-systems/ for more about why dynamic memory allocation is a bad idea in embedded software implemented in [...]]]></description>
		<content:encoded><![CDATA[<p>[...] a short while, but crashes with other inputs or after a longer time, due to memory exhaustion. See http://critical.eschertech.com/2010/07/30/dynamic-memory-allocation-in-critical-embedded-systems/ for more about why dynamic memory allocation is a bad idea in embedded software implemented in [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Verifying pointer arithmetic by Verifying programs that use function pointers &#171; David Crocker&#039;s Verification Blog</title>
		<link>http://critical.eschertech.com/2010/07/16/verifying-pointer-arithmetic/#comment-572</link>
		<dc:creator><![CDATA[Verifying programs that use function pointers &#171; David Crocker&#039;s Verification Blog]]></dc:creator>
		<pubDate>Thu, 08 Sep 2011 14:03:18 +0000</pubDate>
		<guid isPermaLink="false">http://critical.eschertech.com/?p=455#comment-572</guid>
		<description><![CDATA[[...] as pointer arithmetic can be verified if you make some extra effort writing the specifications (see Verifying pointer arithmetic), so can well-designed code using function pointers. In this post I&#8217;ll show how you can do [...]]]></description>
		<content:encoded><![CDATA[<p>[...] as pointer arithmetic can be verified if you make some extra effort writing the specifications (see Verifying pointer arithmetic), so can well-designed code using function pointers. In this post I&#8217;ll show how you can do [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using C++ classes in critical software by Anshu Kadam</title>
		<link>http://critical.eschertech.com/2010/02/04/using-c-classes-to-achieve-encapsulation/#comment-571</link>
		<dc:creator><![CDATA[Anshu Kadam]]></dc:creator>
		<pubDate>Wed, 03 Aug 2011 18:27:57 +0000</pubDate>
		<guid isPermaLink="false">http://davidcrocker.wordpress.com/?p=16#comment-571</guid>
		<description><![CDATA[A good article on some runtime critical errors. May be of some help.

http://www.experts-linked.com/content/runtime-error-critical-softwares]]></description>
		<content:encoded><![CDATA[<p>A good article on some runtime critical errors. May be of some help.</p>
<p><a href="http://www.experts-linked.com/content/runtime-error-critical-softwares" rel="nofollow">http://www.experts-linked.com/content/runtime-error-critical-softwares</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Verifying loops: proving termination by davidcrocker</title>
		<link>http://critical.eschertech.com/2010/03/31/verifying-loops-proving-termination/#comment-534</link>
		<dc:creator><![CDATA[davidcrocker]]></dc:creator>
		<pubDate>Sat, 02 Jul 2011 08:04:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.eschertech.com/?p=276#comment-534</guid>
		<description><![CDATA[We intend to automatically infer the loop variant and the simpler parts of the loop invariant of a for-loop with a counter, where the counter is not modified in the loop body. Inferring the full loop invariant is a hard problem in the general case.]]></description>
		<content:encoded><![CDATA[<p>We intend to automatically infer the loop variant and the simpler parts of the loop invariant of a for-loop with a counter, where the counter is not modified in the loop body. Inferring the full loop invariant is a hard problem in the general case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Verifying loops: proving termination by Dave Banham</title>
		<link>http://critical.eschertech.com/2010/03/31/verifying-loops-proving-termination/#comment-520</link>
		<dc:creator><![CDATA[Dave Banham]]></dc:creator>
		<pubDate>Wed, 29 Jun 2011 08:42:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.eschertech.com/?p=276#comment-520</guid>
		<description><![CDATA[David,
Do you have plans to allow eCv to automatically infer the loop invariant and the loop decrement for simple loops? A recent ACM article (June 2011, Vol 64 #6) about indicates that Spec# is capable of doing this.]]></description>
		<content:encoded><![CDATA[<p>David,<br />
Do you have plans to allow eCv to automatically infer the loop invariant and the loop decrement for simple loops? A recent ACM article (June 2011, Vol 64 #6) about indicates that Spec# is capable of doing this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Safer arrays: using a C++ array class by davidcrocker</title>
		<link>http://critical.eschertech.com/2010/03/09/safer-arrays-using-a-c-array-class/#comment-356</link>
		<dc:creator><![CDATA[davidcrocker]]></dc:creator>
		<pubDate>Mon, 18 Apr 2011 16:37:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.eschertech.com/?p=190#comment-356</guid>
		<description><![CDATA[Have you looked at the code for both debug and release builds? In a debug build (i.e. compiler optimization disabled) I would expect each different instantiation to get separate code. In a release build (i.e. optimization enabled) I would expect most of the member functions to get inlined because they are so simple. Code sharing for those functions is not an issue. You may also find that code that is not inlined but does not depend on _C_SIZE gets shared between instantiations, depending on the compiler. If that isn&#039;t the case and you find there is lots of duplicate code even with compiler optimization enabled, then you could write yor own array class, with the code you want to share declared in a non-templated base class.]]></description>
		<content:encoded><![CDATA[<p>Have you looked at the code for both debug and release builds? In a debug build (i.e. compiler optimization disabled) I would expect each different instantiation to get separate code. In a release build (i.e. optimization enabled) I would expect most of the member functions to get inlined because they are so simple. Code sharing for those functions is not an issue. You may also find that code that is not inlined but does not depend on _C_SIZE gets shared between instantiations, depending on the compiler. If that isn&#8217;t the case and you find there is lots of duplicate code even with compiler optimization enabled, then you could write yor own array class, with the code you want to share declared in a non-templated base class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Safer arrays: using a C++ array class by henning laursen</title>
		<link>http://critical.eschertech.com/2010/03/09/safer-arrays-using-a-c-array-class/#comment-355</link>
		<dc:creator><![CDATA[henning laursen]]></dc:creator>
		<pubDate>Mon, 18 Apr 2011 11:24:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.eschertech.com/?p=190#comment-355</guid>
		<description><![CDATA[(same as above but with escape-code for &lt;&gt;)

Each time I create a new array with a different size, the compiler creates a new code-base for that array size, because the size is a part of the array type. For example:

Std::array&lt;unsigned char, 10&gt; MyUC_10;
Std::array&lt;unsigned char, 20&gt; MyUC_20;
Std::array&lt;unsigned char, 30&gt; MyUC_30;

All get their own code base. Is there any way to avoid this type of compiler behaviour?
I would like all of the above to reference the same code-base. 
As a test I created:

Template&lt;typename _T_base, unsigned int _C_Size = 10&gt;class MyTest
{
Public:
		_T_base _myVal;
};

MyTest&lt;unsigned char, 10&gt; T1;
MyTest&lt;unsigned char, 20&gt; T2;

In the test I do not utilize/reference _C_Size any where in my template class, but the compiler creates 2 different code-bases, if I remove the _C_Size in the template it becomes the same code-base. I’ve tried many constructions without any luck. Form a functional point of view they should be similar, it might be the C++ compiler way of identifying types that causes the problem.

I really appreciate some help on this topic.]]></description>
		<content:encoded><![CDATA[<p>(same as above but with escape-code for &lt;&gt;)</p>
<p>Each time I create a new array with a different size, the compiler creates a new code-base for that array size, because the size is a part of the array type. For example:</p>
<p>Std::array&lt;unsigned char, 10&gt; MyUC_10;<br />
Std::array&lt;unsigned char, 20&gt; MyUC_20;<br />
Std::array&lt;unsigned char, 30&gt; MyUC_30;</p>
<p>All get their own code base. Is there any way to avoid this type of compiler behaviour?<br />
I would like all of the above to reference the same code-base.<br />
As a test I created:</p>
<p>Template&lt;typename _T_base, unsigned int _C_Size = 10&gt;class MyTest<br />
{<br />
Public:<br />
		_T_base _myVal;<br />
};</p>
<p>MyTest&lt;unsigned char, 10&gt; T1;<br />
MyTest&lt;unsigned char, 20&gt; T2;</p>
<p>In the test I do not utilize/reference _C_Size any where in my template class, but the compiler creates 2 different code-bases, if I remove the _C_Size in the template it becomes the same code-base. I’ve tried many constructions without any luck. Form a functional point of view they should be similar, it might be the C++ compiler way of identifying types that causes the problem.</p>
<p>I really appreciate some help on this topic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Aliasing and how to control it by davidcrocker</title>
		<link>http://critical.eschertech.com/2010/06/22/aliasing-and-how-to-control-it/#comment-353</link>
		<dc:creator><![CDATA[davidcrocker]]></dc:creator>
		<pubDate>Tue, 01 Mar 2011 15:43:16 +0000</pubDate>
		<guid isPermaLink="false">http://critical.eschertech.com/?p=420#comment-353</guid>
		<description><![CDATA[Hi, and thanks for your comment. One of the problems with invariants in C is knowing when they are supposed to hold, because they generally get broken while structures are being updated. Where an invariant involves 2 or more structs, what we generally do in eCv is declare a &quot;valid&quot; function instead of an invariant. For your example we would do something like the following:

&lt;pre&gt;&lt;strong&gt;ghost&lt;/strong&gt;(&lt;strong&gt;bool &lt;/strong&gt;valid2(hedge_t *he)
    &lt;strong&gt;returns&lt;/strong&gt;(he-&gt;opposite != he);)
&lt;strong&gt;ghost&lt;/strong&gt;(&lt;strong&gt;bool &lt;/strong&gt;valid2(hedge_t *he1, hedge_t *he2)
    &lt;strong&gt;returns&lt;/strong&gt;((he1-&gt;opposite == he2) =&gt;
                       (he2-&gt;opposite == he1));)
&lt;/pre&gt;
and so on. Next we would declare a ghost function that returns true if all elements and pairs of elements in a collection of half edges obey these validity constraints. Finally we would refer to that ghost function in preconditions and postconditions of functions that manipulate half edges belonging to that collection.

There are other approaches, for example Microsoft Research&#039;s Vcc tool requires you to wrap and unwrap objects explicitly to indicate when their invariants are expected to hold. We found that the overhead of this extra annotation wasn&#039;t necessary or justified when verifying typical safety-critical software (which typically doesn&#039;t use complex data structures); but it may be more suited to your example.]]></description>
		<content:encoded><![CDATA[<p>Hi, and thanks for your comment. One of the problems with invariants in C is knowing when they are supposed to hold, because they generally get broken while structures are being updated. Where an invariant involves 2 or more structs, what we generally do in eCv is declare a &#8220;valid&#8221; function instead of an invariant. For your example we would do something like the following:</p>
<pre><strong>ghost</strong>(<strong>bool </strong>valid2(hedge_t *he)
    <strong>returns</strong>(he-&gt;opposite != he);)
<strong>ghost</strong>(<strong>bool </strong>valid2(hedge_t *he1, hedge_t *he2)
    <strong>returns</strong>((he1-&gt;opposite == he2) =&gt;
                       (he2-&gt;opposite == he1));)
</pre>
<p>and so on. Next we would declare a ghost function that returns true if all elements and pairs of elements in a collection of half edges obey these validity constraints. Finally we would refer to that ghost function in preconditions and postconditions of functions that manipulate half edges belonging to that collection.</p>
<p>There are other approaches, for example Microsoft Research&#8217;s Vcc tool requires you to wrap and unwrap objects explicitly to indicate when their invariants are expected to hold. We found that the overhead of this extra annotation wasn&#8217;t necessary or justified when verifying typical safety-critical software (which typically doesn&#8217;t use complex data structures); but it may be more suited to your example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Verifying loops: proving termination by davidcrocker</title>
		<link>http://critical.eschertech.com/2010/03/31/verifying-loops-proving-termination/#comment-352</link>
		<dc:creator><![CDATA[davidcrocker]]></dc:creator>
		<pubDate>Tue, 01 Mar 2011 15:23:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.eschertech.com/?p=276#comment-352</guid>
		<description><![CDATA[Hi Artyom, I can&#039;t see any particular problem with verifying in eCv that the classic implementation of in-place quicksort terminates. Can you explain what disjointness constraints you were concerned about?]]></description>
		<content:encoded><![CDATA[<p>Hi Artyom, I can&#8217;t see any particular problem with verifying in eCv that the classic implementation of in-place quicksort terminates. Can you explain what disjointness constraints you were concerned about?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Verifying loops: proving termination by Artyom Shalkhakov</title>
		<link>http://critical.eschertech.com/2010/03/31/verifying-loops-proving-termination/#comment-351</link>
		<dc:creator><![CDATA[Artyom Shalkhakov]]></dc:creator>
		<pubDate>Tue, 01 Mar 2011 08:08:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.eschertech.com/?p=276#comment-351</guid>
		<description><![CDATA[Hello,

I wonder if there is an example of verifying, say, that a quicksort on array of ints terminates. Some time ago I tried to do that in a programming language but was bitten by disjointness constraints on the input array (with more care I could&#039;ve persuaded the typechecker that types are correct, but ...).]]></description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I wonder if there is an example of verifying, say, that a quicksort on array of ints terminates. Some time ago I tried to do that in a programming language but was bitten by disjointness constraints on the input array (with more care I could&#8217;ve persuaded the typechecker that types are correct, but &#8230;).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

