Compiler Determinism: Computer Science Theory vs. Engineering Reality
By
fragmede
The kind of bagel that ruins lesser bagels for you.
Summary
The article explores whether compilers are deterministic, presenting both computer science and engineering perspectives. The computer science answer is that compilers are deterministic as a function of their full input state, while the engineering reality is that most real builds don't control the full input state, leading to output drift. The author draws from experience at Ksplice in the 2000s, where they patched running Linux kernels, highlighting practical implications of compiler determinism for security updates and system reliability.
Key quotes
· 4 pulledThe computer science answer: a compiler is deterministic as a function of its full input state.
Engineering answer: most real builds do not control the full input state, so outputs drift.
Betteridge says 'no,' and for normal developer experience that answer is mostly right.
I worked at Ksplice back in the 2000s, where we patched running Linux kernels in RAM so you could take security updates without rebooting.
You might also wanna read
A Formal Proof That Jira Is Turing-Complete via Minsky Machine Implementation
This article provides a formal proof that Jira (Atlassian's project-tracking tool) is Turing-complete by demonstrating how to build a Minsky
A Formal Proof That Jira Is Turing-Complete via Minsky Machine Implementation
This article provides a formal proof that Jira (Atlassian's project-tracking tool) is Turing-complete by demonstrating how to build a Minsky
A Practitioner's Perspective on Program Analysis and Software Correctness
The article presents a practitioner's perspective on program analysis, reflecting on a decade-long journey to understand how to write correc
Re-examining the 'Billion Dollar Mistake': Why Null Pointers Are Not the Primary Memory Safety Problem
The article challenges the conventional wisdom about null pointers being a 'Billion Dollar Mistake' by Tony Hoare. It argues that null point
Compiler Engineering Fundamentals: Defining What a Compiler Is
This article is the first part of a blog series called "Compiler Engineering in Practice" that aims to document practical compiler developme
Technical Analysis of Robin Hood Hash Table Implementation with Linear Probing
The article presents a technical discussion of a specific hash table implementation called "Robin Hood open-addressing with linear probing a
