arXiv:2602.06934cs.PLcs.AI2026-02被引 3

用AI实现基于消息传递的分布式逻辑程序,支持高效多向通信。

Implementing Grassroots Logic Programs with Multiagent Transition Systems and AI (Full Version)

  • 通过全局链接模拟跨代理共享变量对,实现无冲突通信
  • 证明了确定性版本dGLP与madGLP在语义上正确一致
  • 使用AI生成Dart代码,适配桌面与移动端部署

Grassroots Logic Programs (GLP) 是一种并发逻辑编程语言,其逻辑变量分为成对的读写器。每个赋值仅由写者产生一次,由配对的读者最多消费一次,且可包含额外读写器,从而简洁表达丰富的多方向通信模式。本文从已有的并发(cGLP)和多代理(maGLP)语义出发,推导出两个新形式:(1) dGLP,cGLP的确定性对应物;(2) madGLP,maGLP的确定性版本,其中代理仅通过异步消息传递通信,并证明二者在抽象语义下正确。maGLP中跨代理的共享变量对可通过两个本地变量对经由全局链接连接实现,正确性源于不相交替换交换律(由GLP的单次出现不变量保证)。进一步证明madGLP具有根基性。这两个系统作为形式规范,支撑了一种端到端的AI驱动实现流程(数学 → 非正式规格 → Dart):基于dGLP,AI(Claude)开发了基于工作站的GLP Dart实现;基于madGLP,正在开发基于智能手机的多代理版本。

原文摘要 · Abstract (English)

Grassroots Logic Programs (GLP) is a concurrent logic programming language in which logic variables are partitioned into paired readers and writers. An assignment is produced at most once via a writer and consumed at most once via its paired reader, and may contain additional readers and/or writers. This enables the concise expression of rich multidirectional communication modalities. The language was introduced together with concurrent (cGLP) and multiagent (maGLP) operational semantics. Here, we derive from these (1) dGLP, a deterministic counterpart of cGLP, and (2) madGLP, a counterpart of maGLP in which deterministic agents communicate solely by asynchronous message passing, and prove them correct against their abstract counterparts. maGLP shared variable pairs spanning agents can be implemented by two local variable pairs joined by a \emph{global link}, with correctness following from disjoint substitution commutativity (a consequence of GLP's single-occurrence invariant). We further prove that madGLP is grassroots. Both dGLP and madGLP serve as formal specifications for an AI-driven implementation discipline (math $\to$ informal spec $\to$ Dart) employed and described here: from dGLP, AI (Claude) developed a workstation-based GLP implementation in Dart, and from madGLP it is developing a smartphone-based multiagent one.

逻辑编程多智能体AI生成代码

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。