<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Comment Feed for Channel 9 - The Verification Corner - Loop Termination</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Blogs/Peli/The-Verification-Corner-Loop-Termination/RSS"></atom:link>
	<image>
		<url>http://ecn.channel9.msdn.com/o9/ch9/6/2/9/8/3/5/looptermination_512_ch9.png</url>
		<title>Channel 9 - The Verification Corner - Loop Termination</title>
		<link></link>
	</image>
	<description> In this episode of The Verification Corner, Rustan Leino, Principal Researcher in the Research in Software Engineering (RiSE) group at Microsoft Research, shows how to prove loop termination. During his demonstration, Rustan presents the theoretical background information necessary to build the proof before modeling it using the Dafny language. Try Dafny in your web browser at http://rise4fun.com/dafny ! Find past and future episodes of the The Verification Corner! The Verification Corner is a show on Software Verification Techniques and Tools. The show is produced by the&amp;nbsp;Research in Software Engineering team (RiSE), which coordinates Microsoft&#39;s research in Software Engineering in Redmond, USA. </description>
	<link></link>
	<language>en</language>
	<pubDate>Sat, 18 May 2013 18:08:24 GMT</pubDate>
	<lastBuildDate>Sat, 18 May 2013 18:08:24 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<item>
		<title>Re: The Verification Corner - Loop Termination</title>
		<description>
			<![CDATA[
<p>Minor nitpick: Around 2:35 the argument is made that one needs to ensure a minimum decrease for the loop termination expression; however this is not the case.&nbsp; Rather, it is sufficient and necessary that the sequence of values either diverges, or converges
 to a value less than zero.&nbsp; For instance, both these loops will provably terminate, for any positive values of x and n:</p>
<p>&nbsp;</p>
<pre>/* decreases x - 1 */
while (x &gt; 1)
{
  x = x / 2;
}
</pre>
<p>&nbsp;</p>
<pre>/* decreases x */
while (x &gt; 0)
{
  x = x - (1 / n);
  n = n &#43; 1;
}
</pre>
<p>posted by deskin</p>]]>
		</description>
		<link>http://channel9.msdn.com/Blogs/Peli/The-Verification-Corner-Loop-Termination#c634054836080000000</link>
		<pubDate>Mon, 29 Mar 2010 18:20:08 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Blogs/Peli/The-Verification-Corner-Loop-Termination#c634054836080000000</guid>
		<dc:creator>deskin</dc:creator>
	</item>
	<item>
		<title>Re: The Verification Corner - Loop Termination</title>
		<description>
			<![CDATA[
<p>while (x &gt; 0) may terminate&nbsp;in theory but wont do that&nbsp;in any other case&nbsp;<img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-14.gif' alt='Devil' />.</p>
<p><pre class="brush: cpp">
int x = 1, n = 100000; 
while (x &gt; 0) { 
   x = x - (1 / n); 
   n = n &#43; 1; 
} 
n = 0x7ffffffe, x = 1 
n = 0x7ffffff, ... 
n = 0x8000000, ..., 
n = -1, x = 2 
n = 0 -&gt; div by zero </pre></p>
<p>posted by arcnet</p>]]>
		</description>
		<link>http://channel9.msdn.com/Blogs/Peli/The-Verification-Corner-Loop-Termination#c634055945340000000</link>
		<pubDate>Wed, 31 Mar 2010 01:08:54 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Blogs/Peli/The-Verification-Corner-Loop-Termination#c634055945340000000</guid>
		<dc:creator>arcnet</dc:creator>
	</item>
	<item>
		<title>Re: The Verification Corner - Loop Termination</title>
		<description>
			<![CDATA[
<p>In your particular examples, there is minimum decrease.&nbsp; In the first example (with x = x/2), every iteration decreases x by at least 0.5 (since the loop body is entered only if x&gt;1).&nbsp; In the second example, there is not a single constant that will work
 for every run of the program.&nbsp; However, the minimum decrease can be computed from the values that x and n have just before the loop begins.&nbsp; For example,&nbsp;let X denote the initial value of x and suppose the initial value of n is 1; then, it will take about
 e^X iterations before the 1/n terms add up to X, where e is the base of the natural logarithm and I'm using ^ to denote exponentiation; so, each iteration will decrease x by at least 1 / e^X.</p>
<p>&nbsp;</p>
<p>What you are getting at, though, is correct, namely that what is necessary and sufficient for the loop to terminate&nbsp;is that the successive iterations can be mapped to strictly decreasing values in some well-founded order.</p>
<p>posted by leino</p>]]>
		</description>
		<link>http://channel9.msdn.com/Blogs/Peli/The-Verification-Corner-Loop-Termination#c634057875170000000</link>
		<pubDate>Fri, 02 Apr 2010 06:45:17 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Blogs/Peli/The-Verification-Corner-Loop-Termination#c634057875170000000</guid>
		<dc:creator>leino</dc:creator>
	</item>
	<item>
		<title>Re: The Verification Corner - Loop Termination</title>
		<description>
			<![CDATA[
<p>I downloaded Boogie and dafny verifiers and wanted to know if the Dafny editor used in the demo available for download. I couldn't locate it anywhere.</p>
<p>&nbsp;</p>
<p>Thanks!</p>
<p>&nbsp;</p>
<p>Iman</p>
<p>posted by iman.saleh</p>]]>
		</description>
		<link>http://channel9.msdn.com/Blogs/Peli/The-Verification-Corner-Loop-Termination#c634176097590000000</link>
		<pubDate>Tue, 17 Aug 2010 02:42:39 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Blogs/Peli/The-Verification-Corner-Loop-Termination#c634176097590000000</guid>
		<dc:creator>iman.saleh</dc:creator>
	</item>
	<item>
		<title>Re: The Verification Corner - Loop Termination</title>
		<description>
			<![CDATA[ <p>@<a href="/Blogs/Peli/The-Verification-Corner-Loop-Termination#c634176097590000000">iman.saleh</a>:&nbsp; We just recently released the Visual Studio 2010 mode for Dafny, see <a href="http://boogie.codeplex.com">http://boogie.codeplex.com</a>, click &quot;How to install and build the sources&quot; and then scroll down to &quot;Visual Studio integration&quot;.</p><p>&nbsp; Rustan</p><p>posted by leino</p>]]>
		</description>
		<link>http://channel9.msdn.com/Blogs/Peli/The-Verification-Corner-Loop-Termination#c634219243620000000</link>
		<pubDate>Wed, 06 Oct 2010 01:12:42 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Blogs/Peli/The-Verification-Corner-Loop-Termination#c634219243620000000</guid>
		<dc:creator>leino</dc:creator>
	</item>
</channel>
</rss>