English

Correct-by-Construction G-Code Generation: A Neuro-Symbolic Approach via Separation Logic

Logic in Computer Science 2026-05-21 v3 Software Engineering

Abstract

This paper proposes a neuro-symbolic framework for G-code generation that seeks to integrate the neural generative capabilities of the GLLM method (Abdelaal et al., 2025) with formal verification via a Separation Logic (SL) prover. To establish a reliable physical baseline, the framework extracts deterministic boundary representations from 3D CAD models (STEP files) using the OpenCASCADE framework. This extracted geometric data supports a two-component architecture: the LLM serves as an initial code generator, while the SL Prover, utilizing a Spatial Heap model, evaluates the output. By conceptualizing physical collisions as logical Spatial Data Races -- violations of the separating conjunction in SL -- our framework translates proof failures into structured mathematical feedback. These failures are condensed into bounding boxes that serve as directives for the LLM's iterative self-correction. Ultimately, this work aims to develop a self-correcting system that reduces the need for human supervision, leading to safer and verified autonomous manufacturing.

Keywords

Cite

@article{arxiv.2605.10568,
  title  = {Correct-by-Construction G-Code Generation: A Neuro-Symbolic Approach via Separation Logic},
  author = {Yeonseok Lee},
  journal= {arXiv preprint arXiv:2605.10568},
  year   = {2026}
}

Comments

15 pages, 5 figures

R2 v1 2026-07-22T07:04:27.105Z