Graph Construction and Matching for Imperative Programs using Neural and Structural Methods
Arshad Beg, Diarmuid O'Donoghue, Rosemary Monahan

TL;DR
This paper introduces a pipeline that converts imperative programs and their annotations into typed, attributed graphs by combining syntax parsing with semantic embeddings, facilitating reuse of verification artifacts across languages.
Contribution
It presents a novel method integrating syntax and semantic embeddings to generate consistent graph representations for programs in multiple languages.
Findings
Graphs can be constructed across C, Java, and Dafny with consistent structure.
Semantic embeddings improve the quality of graph representations.
The approach enables scalable verification artifact reuse.
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 for C\#. 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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
