{"id":118,"date":"2005-05-04T21:26:03","date_gmt":"2005-05-04T20:26:03","guid":{"rendered":"http:\/\/www.nobugs.org\/blog\/archives\/2005\/05\/04\/high-integrity-compilation\/"},"modified":"2005-05-04T21:28:59","modified_gmt":"2005-05-04T20:28:59","slug":"high-integrity-compilation","status":"publish","type":"post","link":"https:\/\/www.nobugs.org\/blog\/archives\/2005\/05\/04\/high-integrity-compilation\/","title":{"rendered":"High Integrity Compilation"},"content":{"rendered":"<p>The book <a href=\"http:\/\/www-users.cs.york.ac.uk\/~susan\/bib\/ss\/hic\/\">High Integrity Compilation<\/a> is keeping my brain engaged as I munch my lunchtime sandwiches.  The basic plot concerns writing a bug-free compiler, and the cast consists of the semantics of the high-level language being compiled and the semantics of the target assembly language.   Happily, it&#8217;s really quite easy going.   My previous encounters with formal semantics have generally left me feeling out of my depth.  In contrast, this book deals with source\/target languages which are just complex enough to show interesting properties but simple enough to pick up immediately.<\/p>\n<p>I&#8217;ll try to give an example of why this book makes things easier.   The &#8220;meaning&#8221; of a computer language is usually formally defined by a mapping from &#8220;programs&#8221; to some kind of mathematical object, like a set.  This is useful because we can then leverage all of our mathematics knowledge to learn stuff about behaviour of the program.  Now, most books on semantics start with a paragraph like &#8220;we&#8217;d like to use boring old primary-school sets as our mathematical objects, but they&#8217;re not powerful enough&#8221;.  And before you know it, they&#8217;ve starting using domain theory and fixed-points as if they were as common as making a cup of tea.  Around this point, I usually head over to slashdot and never return.  However, the &#8220;High Integrity Compilation&#8221; book happily doesn&#8217;t disappear down this road.  It stays safely up in the land of simple maths and easy state machines.  The languages under consideration are simple imperative ones, and so there&#8217;s not the same focus on recursive functions that you get with ML-like languages and so you&#8217;re not immediately hit by a wall of complexity on page four of the book.<\/p>\n<p>This book also dutifully walks through useful examples, working up from simple three-liners into multi-page walkthroughs.  There&#8217;s a refreshing lack of the words &#8220;obviously&#8221;, &#8220;clearly&#8221; and &#8220;trivially&#8221; and instead plenty of concrete worked examples.<\/p>\n<p>Of course, this means that the resulting compiler isn&#8217;t going to really change the world.  The source and target languages are chosen for pedagogical reasons rather than real-world usefulness.  But this means that, for someone like me learning on their own, you can quickly get a good grounding in semantics without having to deal with a whole load of picky little uninteresting details.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The book High Integrity Compilation is keeping my brain engaged as I munch my lunchtime sandwiches. The basic plot concerns writing a bug-free compiler, and the cast consists of the semantics of the high-level language being compiled and the semantics of the target assembly language. Happily, it&#8217;s really quite easy going. My previous encounters with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-118","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/posts\/118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/comments?post=118"}],"version-history":[{"count":0,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/posts\/118\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/media?parent=118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/categories?post=118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/tags?post=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}