Or, framed differently - if law is code, it's linked against a complicated set of libraries that isn't standard worldwide, or even across a single nation. And the libraries are frequently updated - so unless you've got a statically linked executable (which may or may not be permissible) it's entirely possible that library functions will do things at runtime that hadn't even been imagined when the code was written.
Also, when the code is executed, the system's got a built-in "red team" trying to substitute other libraries that produce opposite results, and from time to time fuzzers appear that generate gibberish which may also be linked with your code.
In that context, your task is to solve the halting problem.
The battles that you are trying to avoid occur because someone wants them to occur.
The problem isn't that law is complicated, the problem is that people are assholes.