Phoenix: A Modular and Versatile Framework for C/C++ Pointer Analysis Peisen Yao, Zinan Gu, Qingkai Shi Abstract We present Phoenix, a modular pointer analysis framework for C/C++ that unifies multiple state-of-the-art alias analysis algorithms behind a single, stable interface. Phoenix addresses the fragmentation of today’s C/C++ pointer analysis ecosystem by cleanly separating IR construction, constraint generation, solver backends, and client-facing queries—making analyses easy to compare, swap, and compose while exposing explicit precision–performance trade-offs. We evaluate Phoenix against SVF under two representative configurations: a flow- and context-insensitive setting and a more precise flow- and context-sensitive setting, on 28 GNU coreutils programs. Phoenix delivers robust speedups in the baseline configuration (up to 2.88 × \times ) and remains competitive—and often faster—even in the stronger precision regime (up to 2.91 × \times ), without a systematic runtime penalty. In production, Phoenix serves as the analysis substrate for static analysis and fuzzing tools that have uncovered hundreds of new bugs and enabled deployments reporting > 1,000 >1,000 bugs found in an industrial toolchain. 1 Introduction Pointer analysis [ 16 , 17 ] is a fundamental family of static analyses that estimates the possible values of pointer variables in a program. Such information is essential for reasoning about both control and data flows, and it underpins a wide range of applications, including compiler optimizations [ 26 ] , program slicing [ 28 , 46 ] , bug detection [ 51 , 42 , 55 , 62 ] , change-impact analysis [ 31 ] , and program verification [ 58 , 7 , 8 , 22 ] . A more precise pointer analysis is always favored by analysis clients, as it implies, e.g., fewer false alarms for bugs, more accurate code navigation, and greater optimization potential. For managed languages such as Java, pointer analysis has matured into a rich ecosystem of reusable infrastructures—e.g., WALA [ 57 ] , Doop [ 1 ] , Soot [ 56 ] , SootUp [ 20 ] , OPAL [ 15 ] , and Taie [ 54 ] . These analysis frameworks expose stable intermediate representations and shared abstractions, making it practical to (i) implement new analyses without committing to low-level engineering choices, and (ii) compose research prototypes with production-quality components. In contrast, effective pointer analysis for C/C++ remains difficult. The language exposes a low-level memory model with unrestricted pointer arithmetic, manual memory management, type punning, and complex data-structure idioms, all of which complicate sound and precise reasoning. Despite decades of progress [ 43 , 16 ] , the C/C++ tool landscape remains fragmented: frameworks often hard-code a single analysis style, offer limited extensibility, and provide little interoperability across clients and solvers. Table 1 : Comparison of pointer analyses in static analysis frameworks for C/C++. The “Eq/Sub” column indicates whether assignments are modeled with equality or subset constraints. Framework IR Eq/Sub Context-Sen. Flow-Sen. C++ SVF LLVM Sub ✗ ✓ ✓ DG LLVM Sub ✗ ✓ ✓ Sea-DSA LLVM Eq ✓ ✗ ✓ Phasar LLVM – – – ✓ CPAChecker CFA (from CDT) Sub ✓ ✗ ✗ CBMC GOTO CC Sub ✓ ✗ ✗ Phoenix LLVM IR Eq, Sub ✓ ✓ ✓ Table 1 compares representative static analysis frameworks for C/C++ with respect to their pointer analysis capabilities. LLVM [ 25 ] includes several built-in alias analyses (e.g., BasicAA), but these are designed primarily for compiler optimizations and offer limited precision. Software model checkers often rely on pointer analysis for memory modeling. For example, SeaHorn [ 8 ] and SMACK [ 3 ] use unification-based pointer analysis [ 26 , 23 ] to derive region-based memory abstractions. CBMC [ 21 ] and CPAchecker [ 2 ] implement custom pointer analyses over their respective intermediate representations. These analyses are typically designed for scalability and omit flow or context sensitivity. Dedicated pointer analysis frameworks also exhibit trade-offs. SVF [ 50 ] implements Andersen-style pointer analysis with value-flow tracking, but offers limited configurability. For example, it lacks support for (1) exhaustive context-sensitive analysis and (2) exhaustive flow- and context-sensitive analysis. 1 1 1 SVF has a demand-driven, flow- and context-sensitive pointer analysis. DG [ 4 ] focuses on dependence representations and includes a flow-sensitive Andersen variant, but does not aim to provide a general, extensible pointer-analysis platform. Phasar [ 38 ] targets interprocedural dataflow analyses and typically delegates aliasing to external engines, such as LLVM and SVF. This fragmentation has practical costs: empirical comparisons require reimplementing algorithms across incompatible infrastructures; composing analyses demands ad hoc integration and duplicated representations; and extending tools requires deep familiarity with internal data structures. The lack of standardized IR-level interfaces hinders reproducibility and portability, while monolithic implementations obscure algorithmic ideas behind engineering complexity. To address these challenges, we follow the IDEA principles— Integrate , Diversify , Extend , and Advance : • I ntegrate: Provide a unified architecture that enables analyses to interoperate via shared abstractions. • D iversify: Support multiple analysis paradigms, allowing users to select precision–performance trade-offs per task. • E xtend: Offer structured APIs and configuration mechanisms that reduce the effort of developing new analyses. • A dvance: Modernize classical and state-of-the-art techniques via modular implementations that balance experimental flexibility with production scalability. We present Phoenix, a modular pointer analysis framework for C/C++ built within the Lotus infrastructure [ 24 ] . Phoenix unifies multiple pointer analysis algorithms behind a stable query interface, enabling substitutability: clients can switch between equality- and subset-based solvers, and between flow- and context-sensitive variants, without modifying client logic. Phoenix provides: • Algorithm Diversity : A systematic family of context-sensitive and flow-sensitive configurations enables controlled precision–performance studies. • Unified Query Interface : A consistent API for querying pointer information and intermediate representations, abstracting solver-specific details while preserving precision configurability. • Modular Architecture : Clean separation between IR construction, constraint generation, solving backends, and client-facing results enables reuse, comparative evaluation, and incremental extension. Using a suite of 28 GNU coreutils programs, we evaluate Phoenix against SVF [ 50 ] , a state-of-the-art and widely used analysis framework. In the flow- and context-insensitive setting, Phoenix outperforms SVF on all the benchmarks, typically by a large margin, achieving up to 2.88 \times speedup. In a more precise, flow- and context-sensitive configuration, Phoenix remains competitive overall and is often faster (up to 2.91 \times ) despite operating in a strictly stronger precision regime than SVF’s flow-sensitive, context-insensitive analysis; observed slowdowns are limited and do not dominate the suite, indicating that Phoenix’s modular design does not impose a systematic runtime penalty. Phoenix has served as a foundation for higher-level analyses, including static bug finding [ 53 , 41 ] , numerical abstract interpretation [ 5 ] , and directed fuzzing [ 19 , 18 ] . These applications have uncovered hundreds of previously unknown defects in open-source software and have supported industrial deployments at Huawei, facilitating the discovery of over 1,000 bugs. We hope Phoenix will be a common platform for the program analysis and verification community, fostering reuse, reproducibility, and rapid development of new techniques. The framework is publicly available at: https://tinyurl.com/433z9y66 . 2 Overview Figure 1 : Phoenix framework architecture. Building a practical pointer analysis requires addressing both high-level abstraction design and low-level implementation efficiency. Phoenix addresses this challenge by providing a unified, extensible infrastructure for implementing, evaluating, and deploying pointer analyses (Figure 1 ): • Algorithm Layer ( section 3 ): This layer implements a suite of pointer analysis algorithms, each targeting different precision–performance trade-offs, facilitating modular development and comparative evaluation. • Interface Layer ( section 4 ): A central abstraction provides a consistent API for querying pointer information (e.g., points-to sets) and building intermediate representations (e.g., MemorySSA). This interface decouples client analyses from specific algorithms, allowing algorithm substitution and composition. • Application Layer ( section 5 ): The top layer supports integration with downstream analyses and external frameworks. Phoenix provides general facilities, such as caching, serialization, and dependency tracking, as well as built-in clients for dataflow analysis and abstract interpretation. 3 Pointer Analyses in Phoenix At the core of Phoenix is a modular architecture that unifies diverse pointer analysis algorithms into reusable components: (i) a common constraint language and IR-to-constraint front-end, (ii) interchangeable solver backends and optimization passes, and (iii) standardized result adapters consumed by the query layer. Table 2 : Configurable techniques and solver choices for Phoenix. Technique Abbrev. Described in Offline Simplifications \square Hash-based Value Numbering HVN Hardekopf and Lin [ 11 ] \square HVN with deReference and Union HU Hardekopf and Lin [ 11 ] Online Simplifications \square Hybrid Cycle Detection HCD Hardekopf and Lin [ 10 ] \square Lazy Cycle Detection LCD Hardekopf and Lin [ 10 ] Solver \square Wave Propagation Wave Pereira et al. [ 33 ] \square Deep Propagation Deep Pereira et al. [ 33 ] \square Difference Propagation Diff Pearce et al. [ 32 ] \square Partial Update Solver PUS Liu et al. [ 29 ] Worklist Iteration Order \square First In First Out FIFO Pearce et al. [ 32 ] \square Last In First Out LIFO \square Least Recently Fired LRF \square 2-Phase Least Recently Fired 2LRF Hardekopf and Lin [ 10 ] \square Topological TOPO Pearce et al. [ 32 ] Data Structures . Efficient points-to manipulation is critical for scalability. Phoenix decouples the abstract interface of points-to sets from their concrete representation, and supports multiple set implementations: BDD-based representations for compact storage of large points-to sets, and sparse bitvectors for fast bulk set operations. In addition, Phoenix provides a pluggable backend interface to support specialized implementations; a SIMD-accelerated sparse bitvector backend is under development to further improve throughput. Constraint Solving . Phoenix provides an interchangeable solver layer with configurable optimizations summarized in Table 2 . The key design choice is to treat simplifications and propagation strategies as first-class, composable modules, allowing Phoenix to instantiate a large space of solver configurations without rewriting core logic. Algorithm Portfolio . Phoenix integrates an algorithm portfolio that spans a broad range of precision–performance trade-offs. To make these trade-offs explicit and configurable, we categorize algorithms by their semantic abstraction. Inclusion-Based Analyses. Inclusion-based analyses model assignments as directional constraints (e.g., p\supseteq q ), preserving fine-grained flow of information between pointers. Phoenix includes Andersen analysis as the canonical baseline: • Andersen Analysis: A flow-insensitive, context-insensitive, subset-based analysis that serves as the baseline in many pointer analysis frameworks. • Context-Sensitive Variants: A configurable family of variants that refines aliasing across call sites. Phoenix supports systematic context abstractions (e.g., 1-CFA, 2-CFA, etc.) to enable controlled studies of precision and cost. • Flow-Sensitive Variants.: Phoenix can incorporate control-flow awareness into constraint propagation while reusing the same inclusion-constraint semantics. Notably, to our knowledge, there is a lack of publicly available, exhaustive, flow- and context-sensitive Andersen analysis, which Phoenix addresses. Unification-Based Analyses. Unification-based analyses trade precision for speed by merging pointers that are related by assignments, yielding near-linear performance in practice for many codebases. Phoenix supports unification-style analyses through equality constraints and implements Dyck-style variants that provide a principled way to recover useful precision for common C/C++ idioms while retaining efficient solving. 4 The Querying Interfaces of Phoenix Phoenix exposes a unified query interface that hides algorithm-specific representations behind a stable set of operations. The key goal is to decouple client analyses from (i) the choice of pointer-analysis algorithm and (ii) solver- and optimization-level engineering details. To this end, Phoenix adopts an adapter design: each analysis backend provides a thin result adapter that normalizes its output into a common set of query primitives, while the interface layer offers higher-level convenience queries built from these primitives. Core Pointer Queries . Table 3 summarizes the common pointer-related queries supported by Phoenix. These operations are designed to support a wide range of client analyses, including memory safety verification, information flow tracking, and concurrency bug detection. These queries are designed to be composable : more specialized client logic can be expressed as combinations of these primitives without depending on backend internals. Table 3 : Pointer analysis queries exposed by the unified abstraction layer. Query Description Typical Application MayAlias( p,q ) Whether two pointers may alias Data race detection PointedBy( p,o ) Whether o may be pointed to by p Escape analysis GetPointsToSet( p ) Memory locations that pointer p may reference Cast failure analysis GetAliasSet( v ) The set of values aliasing with v Taint analysis Intermediate Representations . Beyond answering direct pointer queries, Phoenix provides access to a set of intermediate representations (IRs) that capture control, data, and memory dependencies. These IRs serve as a shared substrate for downstream analyses: • Program Dependence Graph (PDG): an inter-procedural graph encoding both data and control dependences, supporting reachability-based queries for clients such as program slicing. • Inter-procedural Control-Flow Graph (ICFG): extends intra-procedural CFGs with call/return edges that connect call sites to callee entries, and callee exits back to callers, enabling inter-procedural propagation. • MemorySSA: an SSA-style representation for memory operations with implicit use–def links, enabling precise memory-dependence reasoning by identifying the most recent memory-defining operation reaching each memory use. • Static Single Information (SSI): extends SSA with \sigma (split) and \pi (merge) nodes to support bidirectional information flow, benefiting analyses that mix forward and backward propagation. 5 Applications of Phoenix Phoenix provides a unified, extensible infrastructure for pointer-aware program analysis and verification. By abstracting over diverse pointer analysis algorithms and exposing a common interface, Phoenix enables a range of clients that depend on memory reasoning. This section outlines both existing use cases ( section 5.1 ) and prospective applications ( section 5.2 ). 5.1 Existing Use Cases Phoenix underpins several advanced analyses developed within the broader Lotus framework, including several prior works by the authors [ 53 , 41 , 5 , 19 , 18 ] : • Null pointer Analysis [ 53 ] : Phoenix enables scalable detection of null dereference errors by filtering infeasible dereference sites prior to symbolic execution and path-sensitive value-flow analysis. The underlying engine also supports other memory safety properties, such as use-after-free and buffer overflows. • Taint Analysis [ 41 ] : Interprocedural taint tracking relies on accurate points-to information to propagate tainted data through complex pointer operations. The unified interface allows taint analyses to switch between pointer algorithms based on precision and performance requirements. • Numerical Abstract Interpretation [ 5 ] : We present a new abstract domain combining bit-level precision with word-level reasoning, enabling sound and efficient reasoning about low-level code. Accurate pointer information is essential for tracking value flows through memory operations. • Directed Fuzzing [ 19 , 18 ] : We use the pointer information to guide fuzzers in steering input generation toward targeted program regions (e.g., for reproducing crash reports, confirming static analysis results, and regression testing), improving crash discovery for complex C/C++ binaries. 5.2 Prospective Users Phoenix is designed to support both pointer analysis researchers and users. Its modular architecture and standardized interfaces reduce the engineering effort required to build or evaluate pointer-aware analyses. Improvements to underlying pointer algorithms are immediately reflected in all dependent clients, promoting reuse and accelerating research. • Software Model Checking : Several software verification tools, such as SeaHorn [ 8 , 22 , 9 ] and SMACK [ 3 ] , rely on alias analysis for modeling memory. Phoenix provides a flexible infrastructure for experimenting with alternative aliasing models, such as partitioned memory abstractions, enabling verification researchers to explore different precision-performance trade-offs. • Security Analysis : We have implemented an IFDS/IDE [ 34 ] interprocedural dataflow analysis framework atop Phoenix, enabling a range of security applications, such as policy enforcement. By abstracting over pointer analysis, Phoenix enables security analyses to operate with greater precision over heap-allocated structures, improving both soundness and coverage. • Semantic Indexing and Developer Tools : Accurate alias information is important for tools that perform semantic indexing, program slicing, or automated refactoring. Phoenix enables such tools to reason about memory aliasing and side effects with higher fidelity. As large language models (LLMs) become increasingly integrated into development workflows [ 39 , 59 ] , Phoenix can serve as a backend for providing semantically grounded feedback, enabling agents to reason about pointer-heavy codebases with greater confidence. s 6 Evaluation Analysis Performance . We evaluate Phoenix against SVF [ 50 ] , a state-of-the-art, actively maintained, and widely used pointer analysis framework for C/C++. We evaluate two Phoenix configurations and compare them against the closest corresponding SVF analyses: • Flow- and context-insensitive Andersen-style analysis (FICI). Phoenix-FICI is configured to match SVF’s Andersen-style analysis (denoted SVF-FICI). • Flow-sensitive, context-sensitive Andersen-style analysis (FSCS). Phoenix-FSCS targets a more precise setting than SVF’s commonly used flow-sensitive, context-insensitive configuration (denoted SVF-FSCI). 2 2 2 SVF does not contain an exhaustive, flow- and context-sensitive analysis. For Phoenix-FSCS, we configure Phoenix to use the 2-CFA variant of context sensitivity. We run both configurations on a suite of 28 GNU coreutils programs that exhibit diverse pointer behaviors. All experiments were conducted on a Linux server equipped with an Intel Xeon CPU and 512 GB RAM. Figures 2 and 3 summarize the runtime ratio Time(\text{SVF})/Time(\text{Phoenix}) . In the FICI setting (Figure 2 ), Phoenix outperforms SVF on essentially all benchmarks, typically by a large margin: most programs exhibit ratios well above 1 . In the FS setting (Figure 3 ), Phoenix-FSCS remains competitive overall and is often faster (ratios >1 ) despite operating in a strictly stronger precision regime than SVF-FSCI. While a subset of benchmarks falls below 1 —suggesting cases where Phoenix incurs additional cost for flow- and context-sensitive refinement—the slowdown is limited and does not dominate the suite. Taken together, the results indicate that Phoenix’s modular design does not impose a systematic runtime penalty. Compared to SVF, it delivers robust speedups in the baseline setting and maintains favorable performance in the more precise configuration. Figure 2 : Runtime comparison of SVF-FICI vs. Phoenix-FICI. We report the runtime ratio \text{Time}(\text{SVF})/\text{Time}(\text{Phoenix}) ; Values >1 indicate Phoenix is faster. Figure 3 : Runtime comparison of SVF-FSCI vs. Phoenix-FSCS. We report the runtime ratio \text{Time}(\text{SVF})/\text{Time}(\text{Phoenix}) ; Values >1 indicate Phoenix is faster. Real-World Effectiveness . As discussed in section 5.1 , Phoenix serves as the analysis substrate for several production-grade static analysis and fuzzing tools [ 18 , 53 , 19 , 41 ] , which have helped detect memory-safety violations and logic errors in large-scale open-source software. When deployed in a continuous analysis pipeline, they have collectively discovered hundreds of previously unknown bugs, many of which were assigned CVEs. A curated subset of these findings is available at https://tinyurl.com/3jwrev67 . Notably, the directed fuzzing tool has been successfully deployed at Huawei (a leading global provider of ICT infrastructure and smart devices) and has detected more than 1,000 bugs within the company. 7 Related Work Static Analysis Frameworks . Many research-oriented frameworks support static analysis of Java programs. Prominent examples include WALA [ 57 ] , Doop [ 1 ] , Soot [ 56 ] , SootUp [ 20 ] , OPAL [ 15 ] , and Taie [ 54 ] . Infer [ 13 ] supports both Java and C/C++, but lacks reusable interfaces for core analyses, such as answering points-to and slicing queries. Phasar [ 38 ] is an IFDS framework for LLVM IR, but relies on third-party alias analyses. Declarative frameworks based on Datalog have been widely used to express static analyses, particularly Java pointer analysis. However, most Datalog-based pointer analyses are flow-insensitive, as they typically abstract away control over execution order. In contrast, Phoenix provides a unified interface for a suite of alias analyses, enabling seamless composition and configuration to balance precision and performance. Pointer Analysis for C/C++ . Foundational pointer analyses for C/C++ include Andersen’s subset-based analysis and Steensgaard’s unification-based approach, with subsequent refinements for context, field, and flow sensitivity [ 26 , 10 ] . Demand-driven analyses restrict computation to query-relevant regions, but most prior work [ 14 , 37 , 64 , 60 , 40 , 30 , 47 , 6 ] is flow-insensitive and loses control-flow precision. Recent efforts [ 45 , 49 , 44 , 61 ] explore flow- and path-sensitive variants, but suffer from non-sparsity or aliasing-path explosion. Sparse analyses exploit SSA-style def-use chains to avoid unnecessary propagation. The staged sparse approaches [ 12 , 48 , 61 ] rely on imprecise pre-analyses, introducing spurious flows. On-the-fly sparse analyses [ 63 , 52 , 27 ] construct def-use chains during analysis; Spas [ 52 ] achieves path sensitivity but inherits the exhaustiveness of level-by-level analysis. Phoenix integrates multiple of these approaches, providing a unified platform for comparing and composing different analysis strategies. 8 Conclusion We introduced Phoenix, a modular and versatile framework for pointer analysis that unifies a broad class of state-of-the-art algorithms under a common interface. Its extensible architecture and clearly defined abstractions significantly reduce the engineering effort required to implement new analyses. By decoupling algorithmic concerns from infrastructure, Phoenix aims to accelerate both research prototyping and the development of production-grade tools for C/C++ programs. We are actively pursuing several extensions to the framework: • Path-Sensitive Pointer Analysis: We are developing a variant of Andersen-style analysis that incorporates path sensitivity, building on the authors’ recent work for path-sensitive data-dependence analysis [ 62 ] . • More Built-in Analysis Clients: We are expanding the suite of built-in downstream analyses, including support for the Weighted Pushdown System (WPDS)-based interprocedural dataflow analysis framework [ 35 ] and the Newtonian program analysis framework [ 36 ] for quantitative program analysis. • Dynamic Alias Analysis: We are developing a dynamic alias analysis component to complement the static analyses and improve precision in hybrid static-dynamic analysis settings.