English

Array-Carrying Symbolic Execution for Function Contract Generation

Programming Languages 2026-03-02 v2 Logic in Computer Science Software Engineering

Abstract

Function contract generation is a classical problem in program analysis that targets the automated analysis of functions in a program with multiple procedures. The problem is fundamental in inter-procedural analysis where properties of functions are first obtained via the generation of function contracts and then the generated contracts are used as building blocks to analyze the whole program. Typical objectives in function contract generation include pre-/post-conditions and assigns information (that specifies the modification information over program variables and memory segments during function execution). In programs with array manipulations, a crucial point in function contract generation is the treatment of array segments that imposes challenges in inferring invariants and assigns information over such segments. To address this challenge, we propose a novel symbolic execution framework that carries invariants and assigns information over contiguous segments of arrays. We implement our framework as a prototype within LLVM, and further integrate our prototype with the ACSL assertion format and the Frama-C software verification platform. Experimental evaluation over a variety of benchmarks from the literature and functions from realistic libraries shows that our framework is capable of handling array manipulating functions that indeed involve the carry of array information and are beyond existing approaches.

Keywords

Cite

@article{arxiv.2602.23216,
  title  = {Array-Carrying Symbolic Execution for Function Contract Generation},
  author = {Weijie Lu and Jingyu Ke and Hongfei Fu and Zhouyue Sun and Yi Zhou and Guoqiang Li and Haokun Li},
  journal= {arXiv preprint arXiv:2602.23216},
  year   = {2026}
}

Comments

30 pages, 2 figures. To appear in the 27th International Symposium on Formal Methods (FM 2026)