I'm not sure if you're serious.
The expert system you're looking for is a "judge".
What's actually written in legislation or on a contract doesn't matter. What matters is how a judge will interpret that law or contract in the context of your particular case. Yes, there have certainly been cases where a criminal defendant has gotten away with something because it wasn't technically a crime, and many contracts have been useless because they didn't explicitly prohibit a particular interpretation.
Just like computer programs, all well-tested legal "programs" are far more complicated in detail than their basic design document. There are many edge cases and known weaknesses to account for, leading to many seemingly-irrelevant statements.