paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Computation Against a Neighbour: Addressing Large-Scale Distribution and Adaptivity with Functional Programming and Scala

面向邻居的计算:用函数式编程与 Scala 应对大规模分布性与自适应性
LMCS vol.Volume 19, Issue 12023匹配度 1/10 · 论文聚焦于分布式聚合编程的形式化模型(neighbours calculus)与Scala DSL实现,属于编程语言与分布式系统交叉,但未涉及AI/ML、静态分析、浮点程序分析或贝叶斯程序分析等用户核心研究方向。引用 15 inbox
Giorgio Audrito, Roberto Casadei, Ferruccio Damiani, Mirko Viroli
crossref: 2026-09-10

AI 速览

一句话:提出 neighbours calculus 与“对邻居计算”概念,简化邻域交互的声明式表达,并以 Scala 实现 ScaFi。

面向 IoT 与大规模信息物理系统的聚合编程把设备集合视为整体,按时空全局行为编程,并借助 field calculus 等模型以“邻居场”刻画邻域交互。但邻居场需要专门机制才能与普通值顺畅组合,使聚合程序、库和领域特定语言变得复杂杂乱。本文提出“对邻居计算”(computation against a neighbour)的新概念:聚合程序中某些子表达式的求值会受到邻居中近期对应求值结果的影响。作者将该概念形式化为 neighbours calculus(NC),一种新的 field calculus 变体,并与经典 field calculus 进行细致比较。NC 能自然地支持邻域交互的声明式规范,也便于把场计算作为内部 DSL 嵌入通用编程语言,文中以 Scala 实现 ScaFi 为例,并通过一个边缘计算案例研究展示其表达力。

问题
在聚合编程与 field calculus 中,邻域交互需要通过“邻居场”这种专门结构表达,难以与普通值平滑组合,导致聚合程序、库和 DSL 冗杂且编程复杂。
方法
提出“对邻居计算”概念并形式化为 neighbours calculus(NC),一种新的 field calculus 变体;将其与经典 field calculus 系统对比,并在 Scala 中以内部 DSL 形式实现 ScaFi。
评估
通过对 NC 的形式化定义及其与经典 field calculus 的细致比较来评估模型特性,并用 ScaFi 开发边缘计算案例研究以展示其表达力。
原文摘要(Abstract)

Recent works in contexts like the Internet of Things (IoT) and large-scale Cyber-Physical Systems (CPS) propose the idea of programming distributed systems by focussing on their global behaviour across space and time. In this view, a potentially vast and heterogeneous set of devices is considered as an "aggregate" to be programmed as a whole, while abstracting away the details of individual behaviour and exchange of messages, which are expressed declaratively. One such a paradigm, known as aggregate programming, builds on computational models inspired by field-based coordination. Existing models such as the field calculus capture interaction with neighbours by a so-called "neighbouring field" (a map from neighbours to values). This requires ad-hoc mechanisms to smoothly compose with standard values, thus complicating programming and introducing clutter in aggregate programs, libraries and domain-specific languages (DSLs). To address this key issue we introduce the novel notion of "computation against a neighbour", whereby the evaluation of certain subexpressions of the aggregate program are affected by recent corresponding evaluations in neighbours. We capture this notion in the neighbours calculus (NC), a new field calculus variant which is shown to smoothly support declarative specification of interaction with neighbours, and correspondingly facilitate the embedding of field computations as internal DSLs in common general-purpose programming languages -- as exemplified by a Scala implementation, called ScaFi. This paper formalises NC, thoroughly compares it with respect to the classic field calculus, and shows its expressiveness by means of a case study in edge computing, developed in ScaFi.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2245,
  title = {Computation Against a Neighbour: Addressing Large-Scale Distribution and Adaptivity with Functional Programming and Scala},
  author = {Giorgio Audrito and Roberto Casadei and Ferruccio Damiani and Mirko Viroli},
  journal = {Logical Methods in Computer Science},
  volume = {Volume 19, Issue 1},
  year = {2023},
  doi = {10.46298/lmcs-19(1:6)2023}
}