{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,30]],"date-time":"2026-11-30T21:09:38Z","timestamp":1796072978494,"version":"4.11.3"},"reference-count":0,"publisher":"Centre pour la Communication Scientifique Directe (CCSD)","license":[{"start":{"date-parts":[[2023,1,18]],"date-time":"2023-01-18T00:00:00Z","timestamp":1674000000000},"content-version":"am","delay-in-days":0,"URL":"https:\/\/spdx.org\/licenses\/CC-BY-4.0.html"},{"start":{"date-parts":[[2023,1,18]],"date-time":"2023-01-18T00:00:00Z","timestamp":1674000000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/spdx.org\/licenses\/CC-BY-4.0.html"},{"start":{"date-parts":[[2023,1,18]],"date-time":"2023-01-18T00:00:00Z","timestamp":1674000000000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/spdx.org\/licenses\/CC-BY-4.0.html"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":[],"accepted":{"date-parts":[[2022,10,17]]},"abstract":"<jats:p>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.<\/jats:p>","DOI":"10.46298\/lmcs-19(1:6)2023","type":"journal-article","created":{"date-parts":[[2023,1,19]],"date-time":"2023-01-19T10:28:50Z","timestamp":1674124130000},"source":"Crossref","is-referenced-by-count":13,"title":["Computation Against a Neighbour: Addressing Large-Scale Distribution and Adaptivity with Functional Programming and Scala"],"prefix":"10.46298","volume":"Volume 19, Issue 1","author":[{"given":"Giorgio","family":"Audrito","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Roberto","family":"Casadei","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Ferruccio","family":"Damiani","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Mirko","family":"Viroli","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"25203","published-online":{"date-parts":[[2023,1,18]]},"container-title":["Logical Methods in Computer Science"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/arxiv.org\/pdf\/2012.08626v5","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/arxiv.org\/pdf\/2012.08626v5","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,11,30]],"date-time":"2026-11-30T20:26:48Z","timestamp":1796070408000},"score":1,"resource":{"primary":{"URL":"http:\/\/lmcs.episciences.org\/6989"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,1,18]]},"references-count":0,"URL":"https:\/\/doi.org\/10.46298\/lmcs-19(1:6)2023","relation":{"has-preprint":[{"id-type":"arxiv","id":"2012.08626v3","asserted-by":"subject"},{"id-type":"arxiv","id":"2012.08626v2","asserted-by":"subject"},{"id-type":"arxiv","id":"2012.08626v1","asserted-by":"subject"}],"is-same-as":[{"id-type":"arxiv","id":"2012.08626","asserted-by":"subject"},{"id-type":"doi","id":"10.48550\/arXiv.2012.08626","asserted-by":"subject"}]},"ISSN":["1860-5974"],"issn-type":[{"value":"1860-5974","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,1,18]]},"article-number":"6989"}}