Show HN: QBE – a new compiler back end
Interesting project mpu. I like the stuff here:<p><a href="http:&#x2F;&#x2F;c9x.me&#x2F;compile&#x2F;doc&#x2F;llvm.html" rel="nofollow">http:&#x2F;&#x2F;c9x.me&#x2F;compile&#x2F;doc&#x2F;llvm.html</a><p>Especially the optimizations that get you the first 70%. I&#x27;ve been asking optimization people as I see them to do a survey of various methods to find the smallest collection that provide the hugest benefit. This will help people writing new compilers and formal verification community get a head start.<p>Now, back to correctness. Your project aims to be small, simple, and rigorous. That&#x27;s perfect time to use methods for higher assurance software or design yours to work with them easily. So, I suggest trying Design-by-Contract w&#x2F; interface checks, some static analysis tools, or even something like Softbound+CETS that makes C safer automatically. I also usually recommend writing compilers in something like Ocaml as it prevents lots of bugs and easier to do.<p>Also, if you do Ocaml or safe imperative, you can always do two implementations side-by-side in the safe language and in portable C. You run tests, analysis, etc available for each one. Problems in one might be problems in the other. Regardless, though, you get the benefits of the safer language by default with a C implementation if you absolutely need it. Many of us have used this with Sandia Labs even doing it for hardware with ML and hardware language of a Java processor that came out <i>great</i>.<p>So, I challenge you to try to push the envelope by using some available techniques and tools to boost the assurance of your code. Preferably getting it off C, too, due to all the errors it (esp pointers) introduce into the compilers.