CORTEXA
← Browse
arxivcs.SEcs.OScs.PL2026-07-30

From C to Idiomatic Rust: A Ship-of-Theseus Agentic Translation

Vasily A. Sartakov

C underpins operating systems, embedded platforms, and network infrastructure because its abstractions map directly to machine behaviour. Its explicit memory model, predictable data representations, and minimal runtime allow compilers to generate fast, deterministic code. These properties also leave correctness and memory safety entirely to the programmer, making undefined behaviour, pointer misuse, and lifetime errors persistent sources of defects and security vulnerabilities in long-lived C codebases. Rust eliminates most of failure modes through a static ownership and borrowing model that enforces memory safety and aliasing constraints at compile time. However, mature C systems cannot be translated directly: implicit layout assumptions, aliasing patterns, and undefined behaviour must be reconstructed before safe Rust can be produced. This paper presents a migration methodology that first generates a semantics-preserving, non-idiomatic Rust baseline and then incrementally rewrites it into idiomatic Rust using agentic AI, validating each step through compilation and behavioural testing. Applied to iodine (12.5k SLOC), the approach demonstrates that reliable C-to-Rust migration is a structured transformation workflow rather than a single translation step.

View free PDFSource page

Related papers

arxivcs.AIcs.PLcs.SE2026-07-09

Workflow as Knowledge: Semantic Persistence for LLM-Mediated Workflows

Emanuele Quinto, Carlo Andrea Rozzi, Francesco Zanitti

Large language model (LLM) applications increasingly use explicit workflows for tool use, retrieval, branching, checkpointing, and human approval. Existing workflow systems already address many execution concerns. This paper proposes a Lisp-inspired but language-independent conce…

View free PDFSource page
arxivcs.SEcs.AIcs.CRcs.PL2026-07-07

REFORGE: A Method for Benchmarking LLMs' Reverse Engineering Capabilities in Decompiled Binary Function Naming

Nicolas Koller, Andreas u. Schmidt

Large language models (LLMs) are increasingly applied to reverse-engineering tasks, and recent threat-intelligence reporting shows them operating inside live offensive-security workflows. Claims about their capability, however, outpace our ability to measure it. Existing benchmar…

View free PDFSource page
arxivcs.SEcs.AIcs.LGcs.PL2026-07-17

AoA: Theorem Proving Agent over Abstract Syntax Tree of Redesigned Language

Qiyuan Xu, Joshua Ong Jun Leang, Renxi Wang, Wenda Li, Haonan Li, Luke Ong, et al.

Interactive theorem proving (ITP) underpins program verification and formalized mathematics, but its manual effort limits scalability. LLM-based proof agents promise to ease this effort, but their heavy token consumption and API cost remain a major obstacle. We trace this cost to…

View free PDFSource page
arxivcs.SEcs.AIcs.OS2026-07-20

TRIM: Reducing AI-Generated CodeSlop via Agent Trajectory Minimization

Alex Mathai, Shobini Iyer, Aleksandr Nogikh, Petros Maniatis, Franjo Ivancic, Junfeng Yang, et al.

Coding agents are increasingly used to accelerate code generation in many downstream tasks, such as fixing bugs, building applications, and prototyping. However, despite their value as coding assistants, agent-generated code tends to be larger and more verbose than the correspond…

View free PDFSource page
arxivcs.SEcs.LGcs.PL2026-07-15

Quantize with Confidence? An Empirical Study of Quantization for Code Generation

Saima Afrin, Md. Zahidul Haque, Antonio Mastropaolo

The growing adoption of local inference frameworks such as Ollama has made it increasingly common for developers to run large code models on laptops and other resource-constrained hardware. In these settings, post-training quantization is essential for reducing memory footprint a…

View free PDFSource page
arxivcs.SEcs.AIcs.LOcs.PL2026-07-04

Why3-py: A Tool for Formal Verification of Hypothesis Testing and Meta-Analysis in Python

Akira Tanaka, Yusuke Kawamoto

The reproducibility crisis in scientific research has received widespread recognition, thereby increasing the importance of meta-analyses that integrate statistical analyses from multiple studies. However, statistical methods often have ambiguous and implicit underlying assumptio…

View free PDFSource page