Lambdas at the Far Edge: a Tale of Flying Lambdas and Lambdas on Wheels
Authors: Giorgio Audrito, Daniele Bortoluzzi, Ferruccio Damiani, Giordano Scarso, Gianluca Torta, Andrea Basso, Monica Cochi, Lorenzo Gusman, Lorenzo Comba, Paolo Gay, Paola Dal Zovo, Giada Galati, Francesco Gallo, Aljaž Grdadolnik, Massimo Pescarollo, Paola Pisano
Organizations: Department of Computer Science · Department of Computer Science (DI), University of Turin, Turin, Italy · MITO Technology, Milan, Italy · Torino Airport · Torino Airport, Caselle Torinese (TO), Italy · Department of Agricultural, Forest and Food Sciences · Department of Agricultural, Forest and Food Sciences (DiSAFA), University of Turin, Turin, Italy · Concept Engineering Reply, Turin, Italy · Concept Engineering, Reply, Turin, Italy · Eurix, Turin, Italy · Faculty of Computer and Information Science University of Ljubljana, Ljubljana, Slovenia · Faculty of Computer and Information Science, University of Ljubljana, Ljubljana, Slovenia · Department of Economics and Statistics Cognetti de Martiis, University of Turin, Turin, Italy · Department of Economics and Statistics “Cognetti de Martiis”, University of Turin, Turin, Italy · Department of Economics and Statistics, Cognetti de Martiis, University of Turin, Turin, Italy
Aggregate Programming (AP) is a paradigm for programming the collective behaviour of sets of distributed devices, possibly situated at the network far edge, by relying on asynchronous proximity-based interactions. The eXchange Calculus (XC), a recently proposed foundational model for AP, is essentially a typed lambda calculus extended with an operator (the exchange operator) providing an implicit communication mechanism between neighbour devices. This paper provides a gentle introduction to XC and to its implementation as a C++ library, called FCPP. The FCPP library and toolchain has been mainly developed at the Department of Computer Science of the University of Turin, where Stefano Berardi spent most of his academic career conducting outstanding research about logical foundation of computer science and transmitting his passion for research to students and young researchers, often exploiting typed lambda calculi. An FCCP program is essentially a typed lambda term, and FCPP has been used to write code that has been deployed on devices at the far edge of the network, including rovers and (soon) Uncrewed Aerial Vehicles (UAVs); hence the title of the paper.
Figures & tables
Figure 6: XC: representation of a system execution (taken from [ 8 ] ).
Figure 7: XC alignment mechanism for Example 2.5 .
Figure 8: XC alignment mechanism with conditionals for Example 2.7 .
Figure 10: Left: An augmented event structure E=⟨E,⇝,d,s⟩ where E={ϵ00,...,ϵ40,ϵ01,...,ϵ51,ϵ02,...,ϵ42,ϵ03,...,ϵ33,ϵ04,...,ϵ54} consists of 24 events such that d(ϵji)=δi ; it depicts events (circle nodes), messaging relations (curly arrows), devices δ0,...,δ4 (y-axis) and each circle node is labelled with the depicted event of E . Colours denote the causal relation w.r.t. the reference event ϵ12 (doubly-circled, blue), partitioning events into causal past (red), causal future (green) and concurrent (non-ordered, in black). Right: A (possible) evolving network topology on devices which can give rise to E (assuming some selected messages to be dropped).
Figure 11: The Jackal (left) and Create3 (right) Robots equipped for RoboNG.
Figure 12: Frame processed by the RoboAPP CV pipeline.
Figure 13: A UGV (yellow) and a swarm of three drones (red) in a vineyard (from [ 46 ] .
Multi-robot systems are becoming increasingly relevant within diverse application domains, such as healthcare, exploration, and rescue missions. However, building such systems is still a significant challenge, since it adds the complexities of the physical nature of robots and their environments to those inherent in coordinating any distributed (multi-agent) system. Aggregate Programming (AP) has recently emerged as a promising approach to engineering resilient, distributed systems with proximity-based communication, and is notably supported by practical frameworks. In this paper we present a prototype of a multi-robot service system, which adopts AP for the design and implementation of its coordination software. The prototype has been validated both with simulations, and with tests in a University library.
Giorgio Audrito, Andrea Basso, Daniele Bortoluzzi +3
Dipartimento di Informatica, Universita' di Torino · Università di Torino, Turin, Italy · MITO Technology +1
Aggregate programming is a field-based coordination paradigm with over a decade of exploration and successful applications across domains including sensor networks, robotics, and IoT, with implementations in various programming languages, such as Protelis, ScaFi (Scala), and FCPP (C++). A recent research direction integrates machine learning with aggregate computing, aiming to support large-scale distributed learning and provide new abstractions for implementing learning algorithms. However, existing implementations do not target data science practitioners, who predominantly work in Python--the de facto language for data science and machine learning, with a rich and mature ecosystem. Python also offers advantages for other use cases, such as education and robotics (e.g., via ROS). To address this gap, we present Phyelds, a Python library for aggregate programming. Phyelds offers a fully featured yet lightweight implementation of the field calculus model of computation, featuring a Pythonic API and an architecture designed for seamless integration with Python's machine learning ecosystem. We describe the design and implementation of Phyelds and illustrate its versatility across domains, from well-known aggregate computing patterns to federated learning coordination and integration with a widely used multi-agent reinforcement learning simulator.
Gianluca Aguzzi, Davide Domini, Nicolas Farabegoli +1
Existing LLM agent frameworks lack formal semantics: there is no principled way to determine whether an agent configuration is well-formed or will terminate. We present λA, a typed lambda calculus for agent composition that extends the simply-typed lambda calculus with oracle calls, bounded fixpoints (the ReAct loop), probabilistic choice, and mutable environments. We prove type safety, termination of bounded fixpoints, and soundness of derived lint rules, with full Coq mechanization (1,519 lines, 42 theorems, 0 Admitted). As a practical application, we derive a lint tool that detects structural configuration errors directly from the operational semantics. An evaluation on 835 real-world GitHub agent configurations shows that 94.1% are structurally incomplete under λA, with YAML-only lint precision at 54%, rising to 96--100% under joint YAML+Python AST analysis on 175 samples. This gap quantifies, for the first time, the degree of semantic entanglement between declarative configuration and imperative code in the agent ecosystem. We further show that five mainstream paradigms (LangGraph, CrewAI, AutoGen, OpenAI SDK, Dify) embed as typed λA fragments, establishing λA as a unifying calculus for LLM agent composition.
Qin Liu
State Key Laboratory of Novel Software Technology, Nanjing University, Nanjing, Jiangsu, China · Software Institute, Nanjing University, Nanjing, Jiangsu, China