A Modular Framework for Stack-Heap and Value Abstractions (Extended Version)

πŸ“… 2026-07-17
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
Static program analysis faces significant challenges in uniformly modeling stack/heap memory behaviors and value semantics across multiple programming languages, which hinders precise detection of memory safety issues such as buffer overflows and null pointer dereferences. To address this limitation, this work proposes a generic memory analysis framework grounded in abstract interpretation. The framework introduces a novel, parameterizable partitioned state abstraction mechanism that decouples value analysis from memory structure analysis, enabling flexible and modular composition of stack and heap modeling through customizable abstract domains. Formally rigorous and language-agnostic by design, the framework has been implemented to provide unified support for C/C++, Java, and Python, substantially enhancing static detection capabilities for a broad range of memory-related errors.
πŸ“ Abstract
Advanced static program analysis requires reasoning on the semantics of non-trivial program behaviors (e.g., pointers and complex data structures such as lists and sets, functions, and objects) and how they affect the memory. In most programming languages, static and dynamic allocations are typically managed by the stack and the heap, respectively. However, how allocations behave and how the memory is managed at runtime can vary significantly depending on the programming language being analyzed. Proper handling of these aspects is essential, as an accurate memory model enables the detection of critical issues such as buffer overflows and underflows, use-after-free errors, and null pointer exceptions prior to execution, that is, before such erroneous behaviors occur. In this paper, we propose and formalize a generic memory framework to handle stack and heap memory during the analysis, that is able to support various behaviors from different programming languages (e.g., C, C++, Java, and Python), while remaining parametric, allowing different memory and value analyses to be independently chosen and combined. It relies on the Abstract Interpretation theory and enables sound approximation of different memory models and program behaviors. We introduce a split state abstraction that separates value and memory analyses into two modular abstract domains. These domains interact through a set of memory identifiers, along with a set of operations defined by the domains to manipulate them, allowing the framework to capture both value information and structural memory relationships.
Problem

Research questions and friction points this paper is trying to address.

static program analysis
memory model
stack-heap abstraction
Abstract Interpretation
memory safety
Innovation

Methods, ideas, or system contributions that make the work stand out.

modular abstraction
stack-heap modeling
abstract interpretation
split state abstraction
memory analysis