跳到正文
arXiv (AI + Vision + Imaging)· Huiri Tan, Yikun Wang, Puyang Zhang, Shangyu Li, Jiasi Shen·· 8 天前AI 评分18

ETAS:面向Agent系统的效应类型语言,编译器优化使执行时间降低23.2%

ETAS: An Effect-Typed Language for Agent Systems

AI 导读

研究者提出ETAS,一种将Agent、工具、工作流和行为规范提升为编译器可检查的一等构造的效应类型语言,并用Rust实现编译器、优化器和受检解释器。在编译器测试用例与ETAS编写的编码Agent场景中,ETAS对可调用边界、效应操作顺序和已处理效应请求可见性实现零失配。

正文 · 原文

arXiv:2607.17780v2 Announce Type: replace-cross Abstract: Agent systems are programs that coordinate language-model queries, tool calls, human approvals, and ordinary computation, yet existing frameworks wire them together as opaque library objects outside compiler analysis. Treating agent systems from a programming-language perspective, we present Etas, an effect-typed language that elevates agents, tools, workflows, and behavioral specifications to first-class, compiler-checked constructs. Crucially, Etas separates escaping effects from persistent effect request summaries: handlers change how an operation is interpreted without erasing its effect request from the summary, while trace specs constrain permitted effect requests and their order. The compiler composes effect request summaries across calls and handlers, discharging satisfied trace specs statically and keeping a residual monitor where dynamic paths remain uncertain. We formalize Core Etas with terminal handlers, a trace-spec monitor construction, and an abstract analysis over monitor states, proving preservation, progress, effect coverage, and trace-spec safety. We implement a compiler, an optimizer, and a checked interpreter using Rust. Across compiler fixtures and coding-agent scenarios written in Etas, Etas successfully enforces callable bounds, effect operation ordering, and handled effect request visibility with zero mismatches. The compiler also implements agent-specific optimizations that reduce execution time by 23.2%. Across 12 Etas workflows, the combined token optimization passes reduce input tokens by 67.8% on paired-correct executions. First-class agent abstractions also enable recursive self-evolution for Etas programs. Across five harness evolution iterations, task accuracy rises from 69.9% to 78.9%.

来源:arXiv (AI + Vision + Imaging) · arxiv.org