Csüllög, Benedek Szabolcs and Tejfel, Máté (2025) Using GNN for refactoring P4 programs. ANNALES MATHEMATICAE ET INFORMATICAE, 61. pp. 55-67. ISSN 1787-6117
|
Text
55_67_csüllög.pdf - Published Version Download (492kB) | Preview |
Abstract
P4 [2] is a domain specific language for programming the data plane of network devices in a protocol independent manner. To analyze and transform Programming Protocol Independent Packet Processors (P4) programs, we use P4Query[5], a tool that performs both syntactic and semantic analyses and represents P4 source code as abstract syntax trees (ASTs) in the form of directed graphs. In this paper, we explore how Graph Neural Networks (GNNs) can be applied to these graph structured ASTs to learn high-level code transformations. We introduce and evaluate three models: a variable renamer that learns to propagate identifier changes across the AST, a parameter reorderer that predicts function argument permutations, and a detector for semantically empty else branches. These tasks demonstrate the effectiveness of GNNs in understanding and transforming P4 code structures. Such models can support code optimization and standardization efforts by automating repetitive or error-prone transformations in P4 programs.
| Item Type: | Article |
|---|---|
| Uncontrolled Keywords: | P4, P4Query, GNN, networks |
| Subjects: | Q Science / természettudomány > QA Mathematics / matematika > QA75 Electronic computers. Computer science / számítástechnika, számítógéptudomány |
| Depositing User: | Tibor Gál |
| Date Deposited: | 11 Nov 2025 10:18 |
| Last Modified: | 11 Nov 2025 10:18 |
| URI: | https://real.mtak.hu/id/eprint/228831 |
Actions (login required)
![]() |
Edit Item |




