[cfe-dev] [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

Bal√°zs Benics via cfe-dev cfe-dev at lists.llvm.org
Tue Apr 7 08:48:08 PDT 2020

The constraint manager has limited functionality in comparing symbols to
Though, it wouldn't be too hard to make it a bit smarter.

I would like to implement the following logic in the constraint manager
class hierarchy:
Given `a` and `b` well-constrained symbols.
We should know that `a` less than `b` if the possible maximum value of `a`
is still less than the minimum value of `b`.
In other words: `maxOf(a) < minOf(b)  =>  a < b`

AFAIK `RangedConstraintManager` provides the interface to compare symbols
to constants.
The `RangeConstraintManager` class only implements that interface.

Should I extend the `RangedConstraintManager` interface to be able to
compare symbols to symbols?
Or, I could create another interface layer on top of `
RangedConstraintManager` interface to provide the necessary functions.

Which approach should I prefer?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200407/3ee30f24/attachment.html>

More information about the cfe-dev mailing list