|
Static Value-Flow Analysis
|
#include <SparseAbstractInterpretation.h>
Additional Inherited Members | |
Public Types inherited from SVF::AbstractInterpretation | |
| enum | AESparsity { Dense , SemiSparse , Sparse } |
| enum | HandleRecur { TOP , WIDEN_ONLY , WIDEN_NARROW } |
Static Public Member Functions inherited from SVF::AbstractInterpretation | |
| static AbstractInterpretation & | getAEInstance () |
Protected Attributes inherited from SVF::AbstractInterpretation | |
| SVFIR * | svfir {nullptr} |
| Data and helpers reachable from SparseAbstractInterpretation. | |
| AEWTO * | preAnalysis {nullptr} |
| Map< const ICFGNode *, AbstractState > | abstractTrace |
| per-node trace; owned here | |
Abstract Interpretation for Options::AESparsity::SemiSparse.
ValVars live at their SVFG-style def-sites: reads pull from there, writes go there, state merges replace only the ObjVar map and skip the ValVar map, and the cycle helpers gather/scatter cycle ValVars around each widening iteration.
Definition at line 39 of file SparseAbstractInterpretation.h.
|
inline |
Definition at line 42 of file SparseAbstractInterpretation.h.
|
overridedefault |
|
protectedvirtual |
Reimplemented from SVF::AbstractInterpretation.
Definition at line 137 of file AbstractStateManager.cpp.
|
protectedvirtual |
Reimplemented from SVF::AbstractInterpretation.
Definition at line 138 of file AbstractStateManager.cpp.
|
protectedvirtual |
Read a top-level variable's abstract value. Dense base does a direct trace lookup; sparse subclasses override with their own resolution chain (def-site walk, call-result fallback, etc.). All three overloads are virtual so full-sparse can route ObjVar reads through the SVFG.
Dense base: direct trace lookup, with a top sentinel for genuinely missing entries (e.g. function parameters like argc, never written before first read). Sparse subclasses override with a def-site resolution chain.
The "in map" check is a raw map.count — NOT inVarToValTable / inVarToAddrsTable, which gate on isInterval / isAddr. SVF canonically represents uninit and null-pointer shapes as (interval=bottom ∧ addrs=∅); those predicates would falsely report such an entry as "not present", and the top fallback below would then clobber the very signal NullptrDerefDetector::isUninit keys off.
Reimplemented from SVF::AbstractInterpretation.
Definition at line 136 of file AbstractStateManager.cpp.
|
overrideprotectedvirtual |
Read a top-level variable's abstract value. Dense base does a direct trace lookup; sparse subclasses override with their own resolution chain (def-site walk, call-result fallback, etc.). All three overloads are virtual so full-sparse can route ObjVar reads through the SVFG.
Dense base: direct trace lookup, with a top sentinel for genuinely missing entries (e.g. function parameters like argc, never written before first read). Sparse subclasses override with a def-site resolution chain.
The "in map" check is a raw map.count — NOT inVarToValTable / inVarToAddrsTable, which gate on isInterval / isAddr. SVF canonically represents uninit and null-pointer shapes as (interval=bottom ∧ addrs=∅); those predicates would falsely report such an entry as "not present", and the top fallback below would then clobber the very signal NullptrDerefDetector::isUninit keys off.
Reimplemented from SVF::AbstractInterpretation.
Definition at line 447 of file AbstractStateManager.cpp.
|
overrideprotectedvirtual |
Build a full cycle-head AbstractState. Dense default: trace[cycle_head] as-is. Semi-sparse subclass: also pull cycle ValVars from def-sites.
Reimplemented from SVF::AbstractInterpretation.
Definition at line 129 of file SparseAbstractInterpretation.cpp.
|
protected |
Definition at line 428 of file AbstractStateManager.cpp.
|
protectedvirtual |
Reimplemented from SVF::AbstractInterpretation.
Definition at line 142 of file AbstractStateManager.cpp.
|
protectedvirtual |
Reimplemented from SVF::AbstractInterpretation.
Definition at line 143 of file AbstractStateManager.cpp.
|
protectedvirtual |
Side-effect-free existence check.
Dense base: direct existence check at node. Mirrors the simplified getAbsValue lookup — uses raw map.contains rather than inVar*Table predicates, which would falsely report neutral (interval=bottom ∧ addrs=∅) entries as "not present".
Reimplemented from SVF::AbstractInterpretation.
Definition at line 141 of file AbstractStateManager.cpp.
|
overrideprotectedvirtual |
Side-effect-free existence check.
Dense base: direct existence check at node. Mirrors the simplified getAbsValue lookup — uses raw map.contains rather than inVar*Table predicates, which would falsely report neutral (interval=bottom ∧ addrs=∅) entries as "not present".
Reimplemented from SVF::AbstractInterpretation.
Definition at line 453 of file AbstractStateManager.cpp.
|
overrideprotectedvirtual |
Join src into dst with sparsity-aware semantics. Dense merges everything; semi-sparse skips ValVars.
Reimplemented from SVF::AbstractInterpretation.
Definition at line 414 of file AbstractStateManager.cpp.
|
overrideprotectedvirtual |
Narrow prev with cur; write the narrowed state back. Returns true when narrowing is disabled or the narrowed state equals prev. Semi-sparse subclass scatters the narrowed ValVars on non-fixpoint.
Reimplemented from SVF::AbstractInterpretation.
Definition at line 173 of file SparseAbstractInterpretation.cpp.
|
overrideprotectedvirtual |
Replace the state at node. Sparse subclasses replace only the ObjVar map (ValVars live at def-sites).
Reimplemented from SVF::AbstractInterpretation.
Definition at line 406 of file AbstractStateManager.cpp.
|
protectedvirtual |
Reimplemented from SVF::AbstractInterpretation.
Definition at line 148 of file AbstractStateManager.cpp.
|
protectedvirtual |
Reimplemented from SVF::AbstractInterpretation.
Definition at line 149 of file AbstractStateManager.cpp.
|
protectedvirtual |
Write a variable's abstract value. Sparse subclasses re-route ValVar writes to the def-site.
Reimplemented from SVF::AbstractInterpretation.
Definition at line 147 of file AbstractStateManager.cpp.
|
overrideprotectedvirtual |
Write a variable's abstract value. Sparse subclasses re-route ValVar writes to the def-site.
Reimplemented from SVF::AbstractInterpretation.
Definition at line 459 of file AbstractStateManager.cpp.
|
overrideprotectedvirtual |
Widen prev with cur; write the widened state to trace[cycle_head]. Returns true when next == prev (fixpoint). Semi-sparse subclass additionally scatters ValVars to their def-sites.
Reimplemented from SVF::AbstractInterpretation.
Definition at line 155 of file SparseAbstractInterpretation.cpp.