Ted Kremenek
910e9de131
Renamed ValueManager to BasicValueFactory.
...
llvm-svn: 48025
2008-03-07 20:13:31 +00:00
Gabor Greif
3a8edd8536
fix typos
...
llvm-svn: 47995
2008-03-06 10:40:09 +00:00
Chris Lattner
37e0587839
remove the source location arguments to various target query methods.
...
llvm-svn: 47954
2008-03-05 18:54:05 +00:00
Ted Kremenek
e0c79380cd
Added checking for undefined results of '<<' and '>>' (shifting by too many bits, etc.)
...
This current implementation only works when both operands are concrete values; later we will add support for symbolic values.
llvm-svn: 47726
2008-02-28 20:32:03 +00:00
Ted Kremenek
93d1fed5ff
Renamed "Uninitialized" -> "Undefined" in path-sensitive value tracking engine.
...
llvm-svn: 47713
2008-02-28 09:25:22 +00:00
Ted Kremenek
06b671097d
Added lazy "symbolication" of parameter variables and global variables.
...
Added recording of divide-by-zero and divide-by-uninitialized nodes.
llvm-svn: 47586
2008-02-26 02:15:56 +00:00
Ted Kremenek
7f0639b039
Major cleanup of path-sensitive analysis engine and the current analysis
...
based on constant. prop. and limited symbolics.
- Renamed class: RValue -> RVal, LValue -> LVal, etc.
- Minor method renamings and interface cleanups.
- Tightened the RVal "type system" so that UninitializedVal and UnknownVal
cannot be cast to LVal or NonLVal. This forces these corner cases values
to be explicitly handled early before being dispatched to plug-in transfer
function logic.
- Major cleanup in the transfer function logic for binary and unary operators.
Still fixing some regressions, but we now explicitly handle Uninitialized
and Unknown values in a more rigorous way.
llvm-svn: 47441
2008-02-21 18:02:17 +00:00
Ted Kremenek
34e83b80fd
Implemented transfer function logic for unary '+'
...
llvm-svn: 47357
2008-02-20 04:12:31 +00:00
Ted Kremenek
b597bb9c4a
Placed transfer function logic for dereferences in its own method, while at
...
the same time clearing up some logic of how the unary '*' operator is processed.
llvm-svn: 47356
2008-02-20 04:02:35 +00:00
Ted Kremenek
e0188e6ad7
Added boilerplate transfer function support for CallExprs.
...
llvm-svn: 47298
2008-02-19 01:44:53 +00:00
Ted Kremenek
074965c5cb
Further cleanup. Moved definitions for SymbolManager and ValueManager into
...
their own [.cpp;.h] files.
llvm-svn: 47201
2008-02-16 01:12:31 +00:00
Ted Kremenek
e81734b01c
Simplified transfer function logic for ++/-- operators.
...
Added more boilerplate transfer function support for pointer arithmetic.
Added more pretty-printing support for symbolic constraints.
Added transfer function support for handling enum values.
Minor pointer types cleanup in ExplodedGraphImpl.
llvm-svn: 47183
2008-02-15 22:09:30 +00:00
Ted Kremenek
8e6f6e05c3
Added "symbol iterators" for RValues, allowing easy iteration over the symbols
...
referenced by an RValue, instead of having to query the type of the RValue.
Modified ValueState::RemoveDeadBindings to also prune dead symbols.
llvm-svn: 47142
2008-02-14 23:25:54 +00:00
Ted Kremenek
cf7cf8e8b0
Migrated transfer functions for binary operators for simple value tracking
...
from RValues to GRTransferFuncs/GRSimpleVals.
llvm-svn: 47131
2008-02-14 19:37:24 +00:00
Ted Kremenek
4bad8f7ad6
Migrated transfer functions for unary "~" and "-" to GRTransferFuncs/GRSimpleVals.
...
llvm-svn: 47126
2008-02-14 18:40:24 +00:00
Ted Kremenek
3ca942969e
Started partitioning of transfer function logic (and thus the policy behind
...
these operations) into GRTransferFuncs and its subclasses. Originally all
of this logic was handled by the class RValue, but in reality different
analyses will want more flexibility on how they evaluate different values.
Transfer functions migrated so far: "Cast"
llvm-svn: 47125
2008-02-14 18:28:23 +00:00
Ted Kremenek
747c777bde
Moved Rvalues.h from "Analysis/" to "include/clang/Analysis/PathSensitive".
...
llvm-svn: 47123
2008-02-14 17:30:51 +00:00
Ted Kremenek
736e441266
Added transfer function/value track logic for taking the address of a label.
...
llvm-svn: 47030
2008-02-12 21:37:56 +00:00
Ted Kremenek
fd39e73b7a
Implemented transfer functions for "<<" and ">>" when the RValues are
...
ConcreteInts.
llvm-svn: 46883
2008-02-08 07:14:58 +00:00
Ted Kremenek
fd641f1056
More variable renamings.
...
llvm-svn: 46875
2008-02-08 03:02:48 +00:00
Ted Kremenek
173743da67
Renamed InvalidValue to UnknownVal.
...
Renamed UninitializedValue to UninitializedVal.
llvm-svn: 46874
2008-02-08 02:57:34 +00:00
Ted Kremenek
e187d0511f
Added some more opcode pretty-printing.
...
Minor cleanups with generating nodes for NULL-pointer dereferences.
llvm-svn: 46851
2008-02-07 15:20:13 +00:00
Ted Kremenek
e324704e62
Added recording of "implicit" NULL dereferences of symbolic pointers.
...
llvm-svn: 46843
2008-02-07 05:48:01 +00:00
Chris Lattner
6bd4c7f94f
get the tree building again
...
llvm-svn: 46840
2008-02-07 05:01:42 +00:00
Ted Kremenek
43523e0fe8
Added transfer function logic for ReturnStmts.
...
Fixed insidious bug in handling dereferences.
llvm-svn: 46835
2008-02-07 01:08:27 +00:00
Ted Kremenek
cdd0be1dc1
Major code refactoring/cleanup with transfer function logic. Now the
...
code structure is more suitable for additional symbolic analysis.
llvm-svn: 46831
2008-02-06 22:50:25 +00:00
Ted Kremenek
17b65b557b
Added assumption logic for symbolic non-lvalues when used in conditions such as
...
"if(x)". On the true branch we know the value is != 0, and on the false branch
we know it is 0.
llvm-svn: 46814
2008-02-06 17:32:17 +00:00
Ted Kremenek
d17f05435a
Fixed signedness bug in cast transfer function when casting integers to pointers.
...
Removed lval::SymIntConstraintVal; wrappers for symbolic constraints are not lvalues (only integers that evaluate to !0 or 0).
llvm-svn: 46796
2008-02-06 04:31:33 +00:00
Ted Kremenek
38b32e976c
Added pretty-printing support for lval::SymIntConstraintVal and
...
nonlval::SymIntConstraintVal.
Reworked transfer function for '==' and '!=' for LValues to return
SymIntConstraintVal when comparing a symbol with a constant.
llvm-svn: 46778
2008-02-05 23:08:41 +00:00
Ted Kremenek
1e3fa134de
Moved subclasses of LValue and NonLValue into their own namespaces.
...
This noticeably cleans up the naming of these classes.
llvm-svn: 46770
2008-02-05 21:52:21 +00:00
Ted Kremenek
a4aa95bd9d
Added "SymIntConstraint", a utility class to represent intermediate values for
...
transfer function evaluation that represent constraints between symbolic values
and constant integers.
llvm-svn: 46769
2008-02-05 21:32:43 +00:00
Ted Kremenek
2cdfd6670e
Implemented transfer function for unary '~'.
...
llvm-svn: 46708
2008-02-04 16:58:30 +00:00
Ted Kremenek
effdafa62a
Implemented casts for ConcreteInt and ConcreteIntLValue.
...
Implemented '==' and '!=' for ConcreteIntLValue.
llvm-svn: 46630
2008-02-01 06:36:40 +00:00
Ted Kremenek
2838799859
Moved RValue code in GRConstants.cpp to RValue.[h,cpp].
...
Moved ValueKey/ValueMap declaration to ValueState.h.
llvm-svn: 46618
2008-01-31 19:34:24 +00:00