3 ms·
> If it is not needed, flow analysis, tree shaking and const evaluation could get rid of it. That's harder than it sounds. You can construct simple, iterative
by hansvm 6y ago
> If it is not needed, flow analysis, tree shaking and const evaluation could get rid of it.
That's harder than it sounds. You can construct simple, iterative programs like `while(f(i++)){} return password;` whose behavior depends on hard problems like the Riemann Hypothesis (or easier problems which automated theorem provers still struggle with). Tree-shaking will be unfruitful, but if you can otherwise prove that an equivalent program exists that doesn't leak the password then iO gives an implementation.
One interesting additional property is that you don't need to come up with the program which doesn't leak a password; you just need to prove that one exists, which potentially might be substantially easier.