<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Compilers on CS Theorems</title><link>https://cs.lozic.me/areas/compilers/</link><description>Recent content in Compilers on CS Theorems</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 03 Dec 2027 12:00:00 +0100</lastBuildDate><atom:link href="https://cs.lozic.me/areas/compilers/index.xml" rel="self" type="application/rss+xml"/><item><title>Register Allocation Is Graph Coloring</title><link>https://cs.lozic.me/posts/t107-register-allocation-is-graph-coloring/</link><pubDate>Fri, 03 Dec 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t107-register-allocation-is-graph-coloring/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;You write a function with forty local variables. The x86-64 machine it runs on
has sixteen general-purpose registers, two of which are effectively spoken for.&lt;/p&gt;
&lt;p&gt;Something must decide which values live in registers and which live in memory.
Get it right and the function runs at register speed. Get it wrong and every
operation costs a load and a store, and on a modern machine an L1 hit is around
4 cycles against roughly 1 for a register, with an L2 miss costing 12 to 20 and
a trip to DRAM 200 or more.&lt;/p&gt;</description></item><item><title>Abstract Interpretation and Galois Connections</title><link>https://cs.lozic.me/posts/t047-abstract-interpretation-and-galois-connections/</link><pubDate>Fri, 22 Oct 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t047-abstract-interpretation-and-galois-connections/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;Rice&amp;rsquo;s theorem (T011) told you every non-trivial semantic property is
undecidable. Your static analyzer must therefore be unsound, incomplete, or
non-terminating. In practice it is incomplete: it reports things that cannot
happen.&lt;/p&gt;</description></item><item><title>Kleene's Theorem: Regexes Are Finite Automata</title><link>https://cs.lozic.me/posts/t039-kleenes-theorem-regexes-are-finite-automata/</link><pubDate>Fri, 30 Jul 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t039-kleenes-theorem-regexes-are-finite-automata/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;Your service goes down. CPU pinned at 100% on one core, no memory growth, no
error logs, requests timing out.&lt;/p&gt;
&lt;p&gt;The cause is a validation regex — something reasonable-looking like
&lt;code&gt;^(a+)+$&lt;/code&gt;, or in real life a URL or email validator with nested quantifiers —
matched against a 30-character string that happens not to match. The engine is
exploring an exponential number of ways to split the input among the nested
groups, and it will get there eventually, some time after the heat death of
everything.&lt;/p&gt;</description></item><item><title>The Chomsky Hierarchy</title><link>https://cs.lozic.me/posts/t038-the-chomsky-hierarchy/</link><pubDate>Fri, 08 Jan 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t038-the-chomsky-hierarchy/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;The most upvoted answer in Stack Overflow history is a refusal to answer. Someone
asked how to match nested HTML tags with a regular expression, and the reply is
a page of escalating horror about the centre not holding. It is funny, and it is
also a theorem, which is not obvious from reading it.&lt;/p&gt;</description></item></channel></rss>