AI & ML
AGDecode: Semantic Attribute Grammar Derivatives for Safety-Constrained Decoding of Large Language Models
arXiv cs.SE0 views
arXiv:2610.36105v1 Announce Type: new Abstract: Large language models (LLMs) are increasingly used for code generation, motivating techniques that guarantee the structural and semantic correctness of generated programs. Constrained decoding enforces correctness during generation by restricting token choices to those that admit at least one valid completion. While existing approaches can enforce syntactic constraints and selected semantic properties such as type safety, they either target specific properties or rely on operational pruning mechanisms that are difficult to generalize to data-dependent, inductive program properties. We present AGDecode, a programmable framework for semantic constrained decoding based on least-fixed-point semantics. AGDecode extends attribute grammars to partially constructed syntax trees, and reduces semantic constrained decoding to a realizability problem over such trees. The framework compiles semantic specifications into systems of relational constraints that are discharged by external verification oracles, such as SMT and CHC solvers, cleanly separating language semantics from constraint-solving machinery. We prove that our approach is sound and complete relative to an ideal verification oracle. In practice, solvers inevitably encounter uncertain queries; conservatively, our system can reject tokens for soundness or speculatively continue to generate until later queries resolve the entire generation. We mechanize the core metatheory in Rocq and evaluate the framework on semantic-constrained generation of C programs, enforcing path-sensitive safety properties including null-pointer safety, division-by-zero freedom, and initialized-variable usage. Our results demonstrate that solver-backed semantic constrained decoding can enforce rich semantic guarantees while incurring modest computational overhead at regular program boundaries.
Source:https://arxiv.org/abs/2610.36105PreviousDo Coding Agents Still Need a Debugger? Frontier-Model-Based Fault Localization at the Accuracy CeilingNextContext Is a Pipeline, Not a Window: Information Attrition in LLM Agent Harnesses
Related posts
BeeTalk 群主必备:AI 群管机器人 AIGB 免费解决垃圾信息问题
0dev.to AI
I Open-Sourced a Free YouTube Shorts Factory. The Money Isn't in the Shorts.
0dev.to AI
Priced per TB/s, the H200 beats the H100 at 6 of 7 providers
0dev.to Python
Daily Dose of DevOps — Telemetry design: for platform operations teams
0dev.to DevOps

Israeli startup 42AI, which is developing a "behavioral world model" that tries to predict human behavior, emerges from stealth with a $62.5M seed (Ram Iyer/TechCrunch)
0Techmeme

Anthropic confirms new Claude Code limits "to steer it away from recreating someone else's specific game", saying IP infringement violates its usage policy (Bruno Ferreira/Tom's Hardware)
0Techmeme