-
Software Engineering for Collective Cyber-Physical Ecosystems
Authors:
Roberto Casadei,
Gianluca Aguzzi,
Giorgio Audrito,
Ferruccio Damiani,
Danilo Pianini,
Giordano Scarso,
Gianluca Torta,
Mirko Viroli
Abstract:
Today's distributed and pervasive computing addresses large-scale cyber-physical ecosystems, characterised by dense and large networks of devices capable of computation, communication and interaction with the environment and people. While most research focusses on treating these systems as "composites" (i.e., heterogeneous functional complexes), recent developments in fields such as self-organisin…
▽ More
Today's distributed and pervasive computing addresses large-scale cyber-physical ecosystems, characterised by dense and large networks of devices capable of computation, communication and interaction with the environment and people. While most research focusses on treating these systems as "composites" (i.e., heterogeneous functional complexes), recent developments in fields such as self-organising systems and swarm robotics have opened up a complementary perspective: treating systems as "collectives" (i.e., uniform, collaborative, and self-organising groups of entities). This article explores the motivations, state of the art, and implications of this "collective computing paradigm" in software engineering, discusses its peculiar challenges, and outlines a path for future research, touching on aspects such as macroprogramming, collective intelligence, self-adaptive middleware, learning, synthesis, and experimentation of collective behaviour.
△ Less
Submitted 7 June, 2024;
originally announced June 2024.
-
Programming Distributed Collective Processes in the eXchange Calculus
Authors:
Giorgio Audrito,
Roberto Casadei,
Ferruccio Damiani,
Gianluca Torta,
Mirko Viroli
Abstract:
Recent trends like the Internet of Things (IoT) suggest a vision of dense and multi-scale deployments of computing devices in nearly all kinds of environments. A prominent engineering challenge revolves around programming the collective adaptive behaviour of such computational ecosystems. This requires abstractions able to capture concepts like ensembles (dynamic groups of cooperating devices) and…
▽ More
Recent trends like the Internet of Things (IoT) suggest a vision of dense and multi-scale deployments of computing devices in nearly all kinds of environments. A prominent engineering challenge revolves around programming the collective adaptive behaviour of such computational ecosystems. This requires abstractions able to capture concepts like ensembles (dynamic groups of cooperating devices) and collective tasks (joint activities carried out by ensembles). In this work, we consider collections of devices interacting with neighbours and that execute in nearly-synchronised sense-compute-interact rounds, where the computation is given by a single program map** sensing values and incoming messages to output and outcoming messages. To support programming whole computational collectives, we propose the abstraction of a distributed collective process, which can be used to define at once the ensemble formation logic and its collective task. We formalise the abstraction in the eXchange Calculus (XC), a core functional language based on neighbouring values (maps from neighbours to values) where state and interaction is handled through a single primitive, exchange, and provide a corresponding implementation in the FCPP language. Then, we exercise distributed collective processes using two case studies: multi-hop message propagation and distributed monitoring of spatial properties. Finally, we discuss the features of the abstraction and its suitability for different kinds of distributed computing applications.
△ Less
Submitted 20 January, 2024;
originally announced January 2024.
-
Predictive Semantics for Past-CTL Runtime Monitors
Authors:
Giorgio Audrito,
Volker Stolz,
Gianluca Torta
Abstract:
The distributed monitoring of swarms of devices cooperating to common global goals is becoming increasingly important, as such systems are employed for critical applications, e.g., in search and rescue missions during emergencies. In this paper, we target the distributed run-time verification of global properties of a swarm expressed as logical formulas in a temporal logic. In particular, for the…
▽ More
The distributed monitoring of swarms of devices cooperating to common global goals is becoming increasingly important, as such systems are employed for critical applications, e.g., in search and rescue missions during emergencies. In this paper, we target the distributed run-time verification of global properties of a swarm expressed as logical formulas in a temporal logic. In particular, for the implementation of decentralized monitors, we adopt the Field Calculus (FC) language, and exploit the results of previous works which have shown the possibility of automatically translating temporal logic formulas into FC programs. The main limitation of such works lies in the fact that the formulas are expressed in the past-CTL logic, which only features past modalities, and is therefore ineffective in predicting properties about the future evolution of a system. In this paper, we inject some limited prediction capability into the past-CTL logic by providing an extended semantics on a multi-valued logic, then assessing how this affects the automated translation into field calculus monitors.
△ Less
Submitted 1 September, 2022;
originally announced September 2022.
-
Aggregate Processes as Distributed Adaptive Services for the Industrial Internet of Things
Authors:
Lorenzo Testa,
Giorgio Audrito,
Ferruccio Damiani,
Gianluca Torta
Abstract:
The Industrial Internet of Things (IIoT) promises to bring many benefits, including increased productivity, reduced costs, and increased safety to new generation manufacturing plants. The main ingredients of IIoT are the connected, communicating devices directly located in the workshop floor (far edge devices), as well as edge gateways that connect such devices to the Internet and, in particular,…
▽ More
The Industrial Internet of Things (IIoT) promises to bring many benefits, including increased productivity, reduced costs, and increased safety to new generation manufacturing plants. The main ingredients of IIoT are the connected, communicating devices directly located in the workshop floor (far edge devices), as well as edge gateways that connect such devices to the Internet and, in particular, to cloud servers. The field of Edge Computing advocates that kee** computations as close as possible to the sources of data can be an effective means of reducing latency, preserving privacy, and improve the overall efficiency of the system, although building systems where (far) edge and cloud nodes cooperate is quite challenging. In the present work we propose the adoption of the Aggregate Programming (AP) paradigm (and, in particular, the "aggregate process" construct) as a way to simplify building distributed, intelligent services at the far edge of an IIoT architecture. We demonstrate the feasibility and efficacy of the approach with simulated experiments on FCPP (a C++ library for AP), and with some basic experiments on physical IIoT boards running an ad-hoc porting of FCPP.
△ Less
Submitted 1 April, 2022;
originally announced April 2022.
-
Monotonic Filtering for Distributed Collection
Authors:
Hunza Zainab,
Giorgio Audrito,
Soura Dasgupta,
Jacob Beal
Abstract:
Distributed data collection is a fundamental task in open systems. In such networks, data is aggregated across a network to produce a single aggregated result at a source device. Though self-stabilizing, algorithms performing data collection can produce large overestimates in the transient phase. For example, in [1] we demonstrated that in a line graph, a switch of sources after initial stabilizat…
▽ More
Distributed data collection is a fundamental task in open systems. In such networks, data is aggregated across a network to produce a single aggregated result at a source device. Though self-stabilizing, algorithms performing data collection can produce large overestimates in the transient phase. For example, in [1] we demonstrated that in a line graph, a switch of sources after initial stabilization may produce overestimates that are quadratic in the network diameter. We also proposed monotonic filtering as a strategy for removing such large overestimates. Monotonic filtering prevents the transfer of data from device A to device B unless the distance estimate at A is more than that at B at the previous iteration. For a line graph, [1] shows that monotonic filtering prevents quadratic overestimates. This paper analyzes monotonic filtering for an arbitrary graph topology, showing that for an N device network, the largest overestimate after switching sources is at most 2N.
△ Less
Submitted 12 July, 2021;
originally announced July 2021.
-
Computation Against a Neighbour: Addressing Large-Scale Distribution and Adaptivity with Functional Programming and Scala
Authors:
Giorgio Audrito,
Roberto Casadei,
Ferruccio Damiani,
Mirko Viroli
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 behavi…
▽ More
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.
△ Less
Submitted 17 January, 2023; v1 submitted 15 December, 2020;
originally announced December 2020.
-
Field-based Coordination with the Share Operator
Authors:
Giorgio Audrito,
Jacob Beal,
Ferruccio Damiani,
Danilo Pianini,
Mirko Viroli
Abstract:
Field-based coordination has been proposed as a model for coordinating collective adaptive systems, promoting a view of distributed computations as functions manipulating data structures spread over space and evolving over time, called computational fields. The field calculus is a formal foundation for field computations, providing specific constructs for evolution (time) and neighbor interaction…
▽ More
Field-based coordination has been proposed as a model for coordinating collective adaptive systems, promoting a view of distributed computations as functions manipulating data structures spread over space and evolving over time, called computational fields. The field calculus is a formal foundation for field computations, providing specific constructs for evolution (time) and neighbor interaction (space), which are handled by separate operators (called rep and nbr, respectively). This approach, however, intrinsically limits the speed of information propagation that can be achieved by their combined use. In this paper, we propose a new field-based coordination operator called share, which captures the space-time nature of field computations in a single operator that declaratively achieves: (i) observation of neighbors' values; (ii) reduction to a single local value; and (iii) update and converse sharing to neighbors of a local variable. We show that for an important class of self-stabilising computations, share can replace all occurrences of rep and nbr constructs. In addition to conceptual economy, use of the share operator also allows many prior field calculus algorithms to be greatly accelerated, which we validate empirically with simulations of frequently used network propagation and collection algorithms.
△ Less
Submitted 30 September, 2020; v1 submitted 7 October, 2019;
originally announced October 2019.
-
On Distributed Runtime Verification by Aggregate Computing
Authors:
Giorgio Audrito,
Ferruccio Damiani,
Volker Stolz,
Mirko Viroli
Abstract:
Runtime verification is a computing analysis paradigm based on observing a system at runtime (to check its expected behaviour) by means of monitors generated from formal specifications. Distributed runtime verification is runtime verification in connection with distributed systems: it comprises both monitoring of distributed systems and using distributed systems for monitoring. Aggregate computing…
▽ More
Runtime verification is a computing analysis paradigm based on observing a system at runtime (to check its expected behaviour) by means of monitors generated from formal specifications. Distributed runtime verification is runtime verification in connection with distributed systems: it comprises both monitoring of distributed systems and using distributed systems for monitoring. Aggregate computing is a programming paradigm based on a reference computing machine that is the aggregate collection of devices that cooperatively carry out a computational process: the details of behaviour, position and number of devices are largely abstracted away, to be replaced with a space-filling computational environment. In this position paper we argue, by means of simple examples, that aggregate computing is particularly well suited for implementing distributed monitors. Our aim is to foster further research on how to generate aggregate computing monitors from suitable formal specifications.
△ Less
Submitted 27 August, 2019;
originally announced August 2019.
-
Resilient Blocks for Summarising Distributed Data
Authors:
Giorgio Audrito,
Sergio Bergamini
Abstract:
Summarising distributed data is a central routine for parallel programming, lying at the core of widely used frameworks such as the map/reduce paradigm. In the IoT context it is even more crucial, being a privileged mean to allow long-range interactions: in fact, summarising is needed to avoid data explosion in each computational unit.
We introduce a new algorithm for dynamic summarising of dist…
▽ More
Summarising distributed data is a central routine for parallel programming, lying at the core of widely used frameworks such as the map/reduce paradigm. In the IoT context it is even more crucial, being a privileged mean to allow long-range interactions: in fact, summarising is needed to avoid data explosion in each computational unit.
We introduce a new algorithm for dynamic summarising of distributed data, weighted multi-path, improving over the state-of-the-art multi-path algorithm. We validate the new algorithm in an archetypal scenario, taking into account sources of volatility of many sorts and comparing it to other existing implementations. We thus show that weighted multi-path retains adequate accuracy even in high-variability scenarios where the other algorithms are diverging significantly from the correct values.
△ Less
Submitted 5 February, 2018;
originally announced February 2018.
-
Aggregate Graph Statistics
Authors:
Giorgio Audrito,
Ferruccio Damiani,
Mirko Viroli
Abstract:
Collecting statistic from graph-based data is an increasingly studied topic in the data mining community. We argue that these statistics have great value as well in dynamic IoT contexts: they can support complex computational activities involving distributed coordination and provision of situation recognition. We show that the HyperANF algorithm for calculating the neighbourhood function of verti…
▽ More
Collecting statistic from graph-based data is an increasingly studied topic in the data mining community. We argue that these statistics have great value as well in dynamic IoT contexts: they can support complex computational activities involving distributed coordination and provision of situation recognition. We show that the HyperANF algorithm for calculating the neighbourhood function of vertices of a graph naturally allows for a fully distributed and asynchronous implementation, thanks to a map** to the field calculus, a distribution model proposed for collective adaptive systems. This map** gives evidence that the field calculus framework is well-suited to accommodate massively parallel computations over graphs. Furthermore, it provides a new "self-stabilising" building block which can be used in aggregate computing in several contexts, there including improved leader election or network vulnerabilities detection.
△ Less
Submitted 5 February, 2018;
originally announced February 2018.
-
Engineering Resilient Collective Adaptive Systems by Self-Stabilisation
Authors:
Mirko Viroli,
Giorgio Audrito,
Jacob Beal,
Ferruccio Damiani,
Danilo Pianini
Abstract:
Collective adaptive systems are an emerging class of networked computational systems, particularly suited in application domains such as smart cities, complex sensor networks, and the Internet of Things. These systems tend to feature large scale, heterogeneity of communication model (including opportunistic peer-to-peer wireless interaction), and require inherent self-adaptiveness properties to ad…
▽ More
Collective adaptive systems are an emerging class of networked computational systems, particularly suited in application domains such as smart cities, complex sensor networks, and the Internet of Things. These systems tend to feature large scale, heterogeneity of communication model (including opportunistic peer-to-peer wireless interaction), and require inherent self-adaptiveness properties to address unforeseen changes in operating conditions. In this context, it is extremely difficult (if not seemingly intractable) to engineer reusable pieces of distributed behaviour so as to make them provably correct and smoothly composable.
Building on the field calculus, a computational model (and associated toolchain) capturing the notion of aggregate network-level computation, we address this problem with an engineering methodology coupling formal theory and computer simulation. On the one hand, functional properties are addressed by identifying the largest-to-date field calculus fragment generating self-stabilising behaviour, guaranteed to eventually attain a correct and stable final state despite any transient perturbation in state or topology, and including highly reusable building blocks for information spreading, aggregation, and time evolution. On the other hand, dynamical properties are addressed by simulation, empirically evaluating the different performances that can be obtained by switching between implementations of building blocks with provably equivalent functional properties. Overall, our methodology sheds light on how to identify core building blocks of collective behaviour, and how to select implementations that improve system performance while leaving overall system function and resiliency properties unchanged.
△ Less
Submitted 22 November, 2017;
originally announced November 2017.
-
A Higher-order Calculus of Computational Fields
Authors:
Mirko Viroli,
Giorgio Audrito,
Ferruccio Damiani,
Danilo Pianini,
Jacob Beal
Abstract:
The complexity of large-scale distributed systems, particularly when deployed in physical space, calls for new mechanisms to address composability and reusability of collective adaptive behaviour. Computational fields have been proposed as an effective abstraction to fill the gap between the macro-level of such systems (specifying a system's collective behaviour) and the micro-level (individual de…
▽ More
The complexity of large-scale distributed systems, particularly when deployed in physical space, calls for new mechanisms to address composability and reusability of collective adaptive behaviour. Computational fields have been proposed as an effective abstraction to fill the gap between the macro-level of such systems (specifying a system's collective behaviour) and the micro-level (individual devices' actions of computation and interaction to implement that collective specification), thereby providing a basis to better facilitate the engineering of collective APIs and complex systems at higher levels of abstraction. This paper proposes a full formal foundation for field computations, in terms of a core (higher-order) calculus of computational fields containing a few key syntactic constructs, and equipped with ty**, denotational and operational semantics. Critically, this allows formal establishment of a link between the micro- and macro-levels of collective adaptive systems, by a result of full abstraction and adequacy for the (aggregate) denotational semantics with respect to the (per-device) operational semantics.
△ Less
Submitted 25 October, 2016;
originally announced October 2016.
-
Enumeration of the adjunctive hierarchy of hereditarily finite sets
Authors:
Giorgio Audrito,
Alexandru I. Tomescu,
Stephan Wagner
Abstract:
Hereditarily finite sets (sets which are finite and have only hereditarily finite sets as members) are basic mathematical and computational objects, and also stand at the basis of some programming languages. This raises the need for efficient representation of such sets, for example by numbers. In 2008, Kirby proposed an adjunctive hierarchy of hereditarily finite sets, based on the fact that they…
▽ More
Hereditarily finite sets (sets which are finite and have only hereditarily finite sets as members) are basic mathematical and computational objects, and also stand at the basis of some programming languages. This raises the need for efficient representation of such sets, for example by numbers. In 2008, Kirby proposed an adjunctive hierarchy of hereditarily finite sets, based on the fact that they can also be seen as built up from the empty set by repeated adjunction, that is, by the addition of a new single element drawn from the already existing sets to an already existing set. Determining the cardinality $a_n$ of each level of this hierarchy, problem crucial in establishing whether the natural adjunctive hierarchy leads to an efficient encoding by numbers, was left open.
In this paper we solve this problem. Our results can be generalized to hereditarily finite sets with atoms, or can be further refined by imposing restrictions on rank, on cardinality, or on the maximum level from where the new adjoined element can be drawn. We also show that $a_n$ satisfies the asymptotic formula $a_n = C^{2^n} + O(C^{2^{n-1}})$, for a constant $C \approx 1.3399$, which is a too fast asymptotic growth for practical purposes. We thus propose a very natural variant of the adjunctive hierarchy, whose asymptotic behavior we prove to be $Θ(2^n)$. To our knowledge, this is the first result of this kind.
△ Less
Submitted 9 April, 2014; v1 submitted 10 September, 2013;
originally announced September 2013.