arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2603.08755cs.PLcs.AIcs.SE
收藏

Turn:一种用于代理计算的语言

Turn: A Language for Agentic Computation

Turn Lang(Turn语言);Prescott Data(Prescott数据)

Muyukani Kizito

AI总结:

Turn是一种用于代理计算的编译型语言,通过类型安全、能力身份系统和编译时模式吸收等机制,实现对大型语言模型推断的可靠控制和安全管理。

摘要:

我们介绍了Turn,一种编译型、基于演员的编程语言——静态类型用于模式推断,动态类型在值层面——用于代理软件:能够通过将推断委托给大型语言模型(LLMs)来自主推理和行动的程序。现有方法通过通用编程语言添加框架,将关键不变量(上下文边界、类型推断输出、凭证隔离、持久状态)作为应用级约定而非语言保证来编码。Turn引入了五个语言层面的构造来解决这一差距。认知类型安全使LLM推断成为类型化的原语:编译器从结构定义生成JSON Schema,虚拟机在绑定前验证模型输出。信心运算符使确定性控制流能够基于模型确定性进行控制。Turn的基于演员的过程模型源自Erlang,为每个代理提供隔离的上下文窗口、持久内存和邮箱。基于能力的身份系统返回不可伪造的句柄,确保原始凭证从不进入代理内存。最后,编译时模式吸收(use schema::<protocol>)在编译时从外部规范合成类型化的API绑定;openapi适配器随附graphql、fhir和mcp正在开发中。我们描述了语言设计、类型规则、模式语义以及基于Rust的字节码虚拟机,并评估Turn对代表性的代理工作负载。Turn在https://github.com/ekizito96/Turn上开源。

英文摘要:

We present \textbf{Turn}, a compiled, actor-based programming language -- statically typed for schema inference, dynamically typed at the value level -- for agentic software: programs that reason and act autonomously by delegating inference to large language models (LLMs). Existing approaches augment general-purpose languages with frameworks, encoding critical invariants (bounded context, typed inference output, credential isolation, durable state) as application-level conventions rather than language guarantees. Turn introduces five language-level constructs that address this gap. \emph{Cognitive Type Safety} makes LLM inference a typed primitive: the compiler generates a JSON Schema from a struct definition and the VM validates model output before binding. The \emph{confidence operator} enables deterministic control flow gated on model certainty. Turn's \emph{actor-based process model}, derived from Erlang, gives each agent an isolated context window, persistent memory, and mailbox. A \emph{capability-based identity system} returns opaque, unforgeable handles from the VM host, ensuring raw credentials never enter agent memory. Finally, \emph{compile-time schema absorption} (\texttt{use schema::<protocol>}) synthesizes typed API bindings from external specifications at compile time; the \texttt{openapi} adapter is shipped with \texttt{graphql}, \texttt{fhir}, and \texttt{mcp} in active development. We describe the language design, type rules, schema semantics, and a Rust-based bytecode VM, and evaluate Turn against representative agentic workloads. Turn is open source at https://github.com/ekizito96/Turn.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑