aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis/PathSensitive/ExplodedGraph.h
AgeCommit message (Collapse)Author
2008-04-23When building PathDiagnostics for bug reports, generate a trimmed ↵Ted Kremenek
ExplodedGraph with a single path that BugReport objects can safely walk and introspect. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50194 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11Added "GREndPathNodeBuilder", a new node builder that will be used forTed Kremenek
evaluating transfer functions at the end-of-path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49561 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09Major refactoring/cleanup of GRExprEngine, ExplodedGraph, and BugReporter.Ted Kremenek
Bugs are now reported using a combination of "BugType" (previously BugDescription) and Bug "BugReport" objects, which are fed to BugReporter (which generates PathDiagnostics). This provides a far more modular way of registering bug types and plugging in diagnostics. GRExprEngine now owns its copy of GRCoreEngine, and is not owned by the ExplodedGraph. ExplodedGraph is no longer templated on the "checker", but instead on the state contained in the nodes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49453 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03Added node_iterator to ExplodedGraph to allow iteration over all nodes inTed Kremenek
the graph. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49132 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02Fix copy-paste error.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49076 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27ProgramPoint is just a smart pointer; no reason to return a constant reference.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48891 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14Path-sensitive analyses no longer take a FunctionDecl, but any Decl representingTed Kremenek
a block of "code". Patched various ASTConsumers (such as ASTDumper) to have more support for processing ObjCMethodDecl. CFGVisitor now builds CFGs for ObjCMethodDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48363 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-07Added --trim-path-graph to the driver to trim paths from the ExplodedGraphTed Kremenek
that are not related to error nodes. Fixed bug where we did not detect some NULL dereferences. Added "ExplodedGraph::Trim" to trim all nodes that cannot transitively reach a set of provided nodes. Fixed subtle bug in ExplodedNodeImpl where we could create predecessor iterators that included the mangled "sink" bit. The better fix is to integrate this bit into the void* for the wrapped State, not the NodeGroups representing a node's predecessors and successors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48036 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05Fixed bug that could case unwanted bifurcation of states when evaluating calls.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47964 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05Fixed a horribly insidious bit-masking bug in the implementation ofTed Kremenek
ExplodedNode that would occasionally result in heap corruption. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47956 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05Plug-in transfer function "EvalCall" now takes as an argument the currentTed Kremenek
GRStmtNodeBuilder and is now responsible for adding its own nodes to the graph. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47923 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05Cleaned up typedefs involving StateTy so that we always use "StateTy*" ↵Ted Kremenek
instead of StateTy. This is conceptually much cleaner, as it shows that the state is always a pointer. It also makes it easier to marshall these values around across the internal APIs of the path-sensitive engine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47921 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-04Moved GRExprEngine::NodeSet out of GRExprEngine and made it a standalone ↵Ted Kremenek
class: ExplodedNodeSet. Made GRExprEngine::NodeSet a typedef of ExplodedNodeSet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47914 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-04Fixed another obscure node-caching bug.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47898 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03Fixed subtle caching bug in ExplodedGraph that would cause some nodes toTed Kremenek
be incorrectly merged together. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47851 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-28Merged ValueState and ValueStateImpl into just ValueState, with ↵Ted Kremenek
GRExprEngine::StateTy just becoming ValueState*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47714 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-18Added "size()" and "empty()" methods to ExplodedGraphImpl.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47289 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Simplified transfer function logic for ++/-- operators.Ted Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47183 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-13Added support to GRCoreEngine/GRExprEngine for processing control-flowTed Kremenek
from switch...case...default statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47100 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-13Renamed class GREngine => GRCoreEngine.Ted Kremenek
Renamed class GRConstants => GRExprEngine. This was done with a Perl script, and will result in 80 col. violations that I will gradually fix up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47070 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-13Added support to GREngine/GRConstants for handling computed gotos.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47038 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05ValueManager now uses the BumpPtrAllocator owned by the ExplodedGraph.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46740 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Implemented some branch pruning in GRConstants using != and == forTed Kremenek
constant integers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46581 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29Added boilerplate logic in GREngine for processing branches.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46532 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29Renamed GRNodeBuilder to GRStmtNodeBuilder.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46531 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29Driver now passes the top-level FunctionDecl* to GRConstants.Ted Kremenek
Refactoring: for GREngine and GRConstants, pushed references to CFG, ASTContext, and the top-level FunctionDecl into ExplodedGraphImpl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46475 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-16Fixed invalid typedefs in the root and eop iterators for ExplodedGraph.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46091 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-16Added missing ctor to ExplodedGraph.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46079 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-16Hooked up the GRConstants analysis to the driver.Ted Kremenek
Fixed some compilation errors with GREngine that showed up during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46074 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14Added prototype implementation of path-sens. analysis core engine.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45986 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14Removed 'inline' keywords from methods now defined in ExplodedGraph.cpp.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45965 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13Moved destructor logic of templated class ExplodedGraph to non-templatedTed Kremenek
parent class ExplodedGraphImpl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45930 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13Added node cleanup to dstor of ExplodedGraph.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45929 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13Created ExplodedGraph.cpp and moved most method implementations ofTed Kremenek
ExplodedNodeImpl::NodeGroup from being defined inline to being defined "out-of-line" in ExplodedGraph.cpp. This removes a dependence on including <vector> in ExplodedGraph.h, and will hopefully result in smaller generated code with negligible performance impact. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45928 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13Moved 'ExplodedNodeGroup' into class 'ExplodedNode' as the nested classTed Kremenek
'NodeGroup.' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45927 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13Fixed lines preventing compilation.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45926 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13Fixed some comments.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45924 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13Merged ExplodedNode.h into ExplodedGraph.h, since the ExplodedNode class willTed Kremenek
only be used in the context of the ExplodedGraph class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45922 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09Renamed various traits and classes. Added "Infeasible" bit to ExplodedNodeImplTed Kremenek
so that nodes can be marked as representing an infeasible program point. This flag lets the path-sensitive solver know that no successors should be generated for such nodes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45788 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Added ownership of "checker state" within the ExplodedGraph. Moved code thatTed Kremenek
creates the initial root node from the constructor of ReachabilityEngine to ReachabilityEngine::ExecuteWorklist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45722 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Renamed SimulVertex, SimulGraph, and SimulEngine to: Ted Kremenek
ExplodedNode, ExplodedGraph (to match the vocabulary in the RHS paper) ReachabilityEngine The implementation of the core of the path-sensitive dataflow solver has been de-templatized and places in ReachabilityEngine.cpp. The solver is still incomplete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45711 91177308-0d34-0410-b5e6-96231b3b80d8