English

Governed Metaprogramming for Intelligent Systems: Reclassifying Eval as a Governed Effect

Programming Languages 2026-05-27 v4 Artificial Intelligence

Abstract

AI systems increasingly synthesize executable structure at runtime: LLMs generate programs, agents construct workflows,self-improving systems modify their own behavior. In classical homoiconic and staged languages, the transition from code representation to execution is unrestricted. eval is a language primitive, not a governed operation. We argue that in governed intelligent systems, this transition is an authority amplification: it converts symbolic structure into executable authority and must be mediated like any other effect. We present governed metaprogramming, a language design where program representations (machine forms) are first-class values, form manipulation is pure computation, and materialization (the transition from form to executable machine) is a governed effect subject to structural inspection. The governance system analyzes the proposed program's capability requirements, policy compliance, and resource estimates before permitting execution. We formalize two judgments: pure form evaluation (which emits no directives) and governed materialization (which emits exactly one governed directive). We prove three properties: purity of form manipulation, the no-bypass theorem, and boundary preservation. We implement the design in mashinTalk, a DSL for AI workflows compiling to BEAM byte code, and report on integration with 454 existing machine-checked Rocq theorems. The central contribution is reclassifying eval from a language primitive into a governed effect.

Keywords

Cite

@article{arxiv.2605.05248,
  title  = {Governed Metaprogramming for Intelligent Systems: Reclassifying Eval as a Governed Effect},
  author = {Alan L. McCann},
  journal= {arXiv preprint arXiv:2605.05248},
  year   = {2026}
}

Comments

15 pages. Companion proofs: https://github.com/mashin-live/governance-proofs. Project: https://mashin.live. Update: Abstract typo fixes. Updated license

R2 v1 2026-07-01T12:53:22.863Z