|国家预印本平台
首页|Automated Synthesis of Formally Verified Multi-Abstraction Function Summaries

Automated Synthesis of Formally Verified Multi-Abstraction Function Summaries

Automated Synthesis of Formally Verified Multi-Abstraction Function Summaries

来源:Arxiv_logoArxiv
英文摘要

Function summaries, which characterize the behavior of code segments (typically functions) through preconditions and postconditions, are essential for understanding, reusing, and verifying software, particularly in safety-critical domains like aerospace embedded systems. However, these mission-critical legacy code serving as a valuable reused asset often lacks formal specifications. It is challenging to automatically generate function summaries for C programs, due to the existence of complex features such as loops, nested function calls, pointer aliasing, and so on. Moreover, function summaries should support multiple abstraction levels to meet diverse requirements, e.g. precise summaries capturing full functionality for formal verification and intuitive summaries for human understanding. To address these challenges, we first propose a novel framework that combines symbolic execution, large language models (LLMs), and formal verification to generate Relatively Strongest Postconditions (RSPs) and build function summaries that fully capture program behavior. Our approach leverages VST-A's symbolic execution to precisely track program execution paths and state transitions, employs LLMs to infer loop invariants based on predefined templates, and uses Frama-C to guarantee soundness of generated summaries in an iterative refinement loop. Furthermore, from generated RSPs, we automatically synthesize strongest non-redundant postconditions expressed within given domain specific language. We compare our approach with existing work through extensive experiments.

Fanpeng Yang、Xu Ma、Shuling Wang、Xiong Xu、Qinxiang Cao、Naijun Zhan、Xiaofeng Li、Bin Gu

航空航天技术计算技术、计算机技术

Fanpeng Yang,Xu Ma,Shuling Wang,Xiong Xu,Qinxiang Cao,Naijun Zhan,Xiaofeng Li,Bin Gu.Automated Synthesis of Formally Verified Multi-Abstraction Function Summaries[EB/OL].(2025-06-11)[2025-06-29].https://arxiv.org/abs/2506.09550.点此复制

评论