math: count some more things as implied
commitdc7056e3c0e650bd8cbcb3624eaf32ae5ccb1814
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 20 Nov 2012 12:01:20 +0000 (20 15:01 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 20 Nov 2012 12:01:20 +0000 (20 15:01 +0300)
treeccf392b75bcf56e7f555e1ea5a668ac978e0ec1c
parent618a46040c1cef75e6f9e08eaf588de29cc6661a
math: count some more things as implied

There are several levels of certainty represented in smatch_math.c.

known            - values
implied          - variables with one value
hard max         - definite max
fuzzy max        - the context seem to imply we can reach this
implied min/max  - <sort of ambiguous>
absolute min/max - fall back to the type information if no other max can
                   be determined

I guess that maximums are used to tell buffer overflows and integer
overflows.  So we need a different degree of certainty for each.

I introduce absolute max first, but that didn't work so I introduced hard
max.  Now I'm trying to put more and more of the stuff that was under
absolute max into the implied max.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_math.c