基于神经与结构方法的命令式程序图构建与匹配研究
Graph Construction and Matching for Imperative Programs using Neural and Structural Methods
AI 导读
一篇 arXiv 预印论文提出一条将命令式程序及其标注转换为带类型、带属性的图的流程,作为验证工件复用的基础步骤。流程结合抽象语法树解析与 SentenceTransformer、CodeBERT 等模型生成的语义嵌入,实验覆盖 C 配 ACSL、Java 配 JML 以及 Dafny 程序。结果显示可在不同语言和标注风格间构建一致的图表示,为后续语义增强与近似图匹配奠定基础。
正文 · 原文
Abstract:Reusing verification artefacts requires identifying structural and semantic similarities across programs and their specifications. In this paper, we focus on graph construction as a foundational step toward this goal. We present a pipeline that converts imperative programs and their annotations into typed, attributed graphs. Our experiments cover datasets including C with ACSL, Java with JML, and Dafny programs. The pipeline integrates abstract syntax tree parsing with semantic embeddings derived from models such as SentenceTransformer and CodeBERT. This enables the generation of graph representations that capture both structural relationships and semantic context. Our results show that consistent graph representations can be constructed across different languages and annotation styles. This work provides a practical basis for future steps in semantic enrichment and approximate graph matching for scalable verification artefact reuse.
| Comments: | 14 Pages. Preprint. July 2026 |
| Subjects: | Software Engineering (cs.SE); Artificial Intelligence (cs.AI) |
| ACM classes: | D.2.1; D.2.4; D.2.10; F.4.1; F.4.3 |
| Cite as: | arXiv:2604.26578 [cs.SE] |
| (or arXiv:2604.26578v4 [cs.SE] for this version) | |
| https://doi.org/10.48550/arXiv.2604.26578 arXiv-issued DOI via DataCite |
Submission history
From: Arshad Beg [view email]
[v1]
Wed, 29 Apr 2026 11:59:53 UTC (794 KB)
[v2]
Fri, 15 May 2026 15:29:14 UTC (794 KB)
[v3]
Sun, 12 Jul 2026 12:26:53 UTC (784 KB)
[v4]
Tue, 24 Nov 2026 00:27:37 UTC (785 KB)
来源:arXiv cs.AI · arxiv.org