<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ponton&#039;s site &#187; computer science</title>
	<atom:link href="http://www.ponton.srednikpe.org/tag/computer-science/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ponton.srednikpe.org</link>
	<description>blog głównie matematyczno-informatyczny (nie chce mi się pisać o życiu)</description>
	<lastBuildDate>Mon, 18 Jan 2010 22:23:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Program verification conditions</title>
		<link>http://www.ponton.srednikpe.org/2008/12/22/program-verification-conditions/</link>
		<comments>http://www.ponton.srednikpe.org/2008/12/22/program-verification-conditions/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 00:39:01 +0000</pubDate>
		<dc:creator>ponton</dc:creator>
				<category><![CDATA[Computer science and math]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[my code]]></category>

		<guid isPermaLink="false">http://www.ponton.srednikpe.org/?p=159</guid>
		<description><![CDATA[Yay, another parser in Haskell! That was a Haskell week, but I&#8217;m glad I had an opportunity to recall this beautiful full-of-math language. This program reads an annotated program &#8212; a program with assertions. Assertions are just logic formulas. We use them to describe the program state between instructions, ie. variable x is equal to [...]]]></description>
			<content:encoded><![CDATA[<p>Yay, another parser in Haskell! That was a Haskell week, but I&#8217;m glad I had an opportunity to recall this beautiful full-of-math language.</p>
<p>This program reads an annotated program &#8212; a program with assertions. Assertions are just logic formulas. We use them to describe the program state between instructions, ie. variable x is equal to variable y squared. But assertions cannot be random, they must be derived from Hoare&#8217;s logic axioms and rules (which base on the formal semantic of the language). How do we know if there is an derivation of a program?</p>
<p>Here verification condicitions come. They are logic formulas too, but generated from annotated program. If all of them are true, then the program is derivable. More information here: <a href="http://www.macs.hw.ac.uk/~air/hic-hisd/">http://www.macs.hw.ac.uk/~air/hic-hisd/</a> and <a href="http://www.daimi.au.dk/~bra8130/Wiley_book/wiley.html">http://www.daimi.au.dk/~bra8130/Wiley_book/wiley.html</a>. The whole point is about formal verification of programs. Nowadays compiler can tell only whether given program has a syntax or type error. It doesn&#8217;t know anything about how this program should work and can&#8217;t  say something like: &#8220;This program certainly does not multiply matrices.&#8221;. Assertions are some way to tell the programmer&#8217;s intentions to the compiler: &#8220;This is my piece of code and it should multiply two matrices&#8221;, and thus, by generating verification conditions and using automated theorem proving it could say: &#8220;It does.&#8221;.</p>
<p>So after a boring digression&#8230; this program reads an annotated program in a simple imperative language and generates verification conditions. That&#8217;s all.</p>
<p>All files are here: <a href="http://srednikpe.org/src/vc/">http://srednikpe.org/src/vc/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponton.srednikpe.org/2008/12/22/program-verification-conditions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
