LLVM contains an implementation of Fourier-Motzkin elimination by @fhahn. It lives in llvm/Analysis/ConstraintSystem.h and allows solving systems of linear inequalities over real-world (non-wrapping) numbers. Even though machine integers are typically wrapping, Fourier-Motzkin elimination can still be used for refuting inequalities that are impossible *even* in real-world numbers - as long as we guarantee lack of overflows in our own linear operations. And, well, we can still take type size constraints into account.
In this patch I'm (partially) implementing conversion from static analyzer symbolic expressions to linear inequalities and adding Fourier-Motzkin elimination as a refutation backend (similar to our Z3 backend). It's currently off by default but I plan to enable it by default as soon as I double-check that the math is correct and make sure there are no performance regressions. I'd also consider making it a part of the default constraint manager so that to refute infeasible execution paths during analysis but I suspect it may have a much larger performance impact. No matter how this turns out, I see this work as orthogonal to other improvements in RangeConstraintManager; these can still keep coming.
Currently the conversion is very limited. It can already refute some simple constraints such as x < y, y < z, z > x but otherwise it treats most symbols as opaque and doesn't really see linear inequalities when you feed them to it. See the large FIXME for more details. It already did refute some real-world false positives for me, around 1% of total warnings, which is much weaker than Z3 but still very promising. Every false positive refuted this way was also refuted by Z3 which suggests (but of course doesn't prove) correctness of the solution.
Why not const?