Re:Herbie: Automatically Improving Floating Point Accuracy
by pavpanchekha on Friday August 07, 2020 @11:37AM
(#24083021)
That's right, Herbgrind doesn't know which values are variables. It uses antiunification to see which values are always the same (which it assumes are constants) and which differ between invocations (which it assumes are variables).
Once I hooked Herbie up to the Clang Static Analyzer to pull out expressions from code and suggest alternatives. It wasn't a great fit---CSA doesn't model floating point, and it would consider every sub-expression separately as it explored the program. But I think there's merit to the idea.