Keywords

1 Background

Aggregate computing [6] is a paradigm aiming to address the complexity of large-scale distributed systems, by means of the notion of computational field [15] (or simply field): this is a collective, distributed map from computational events (when and where a device executes a computational action, also called a round) to computational objects (data values of any sort, including higher-order objects such as functions and processes) representing the result of computation at that event. Computing with fields means computing such global data structures, and defining a reusable block of behaviour means to define a reusable computation from fields to fields. This functional view holds at any level of abstraction, from low-level mechanisms of the language up to whole applications, which ultimately work by getting input fields from sensors and processing them to produce output fields for actuators. Most importantly, computing with fields is functional and hence declarative: (i) the designer focusses on the intended global goal of system behaviour, while the dynamics of interactions is left to the underlying platform (i.e., semantics); and (ii) one can scale with complexity by relying on functional composition: libraries of reusable building blocks can be constructed, and successive layering can be used to bottom-up derive whole applications.

The field calculus [11] is a tiny functional language providing basic constructs to work with fields.Footnote 1 It provides a unifying approach to understanding and analysing the wide range of approaches to distributed systems engineering that make use of computational fields [5, 21]. The operational semantics of field calculus [11] can act as a blueprint for actual implementations where myriad devices interact via proximity-based broadcasts. More recently, the field calculus has been used to investigate formal properties of resiliency to environment changes [18, 20] and to device distribution [7]. Its expressiveness has been investigated by introducing the cone Turing Machine [1].

The higher-order field calculus [12] combines self-organisation and code mobility by extending the field calculus with a semantics for distributed first-class functions. It allows self-organisation code to be naturally handled like any other data, e.g., dynamically constructed, compared, spread across devices, and executed in safely encapsulated distributed scopes. Ultimately, this calculus provides programmers with a novel first class abstraction, a “distributed function field”. This is a dynamically evolving map from a network of devices to a set of executing distributed processes: in each space-time region where the proces is the same, devices form a coalition collectively carrying on that process in isolation.

2 Contributions of [3]

This paper presents syntax and operational semantics of the higher-order field calculus together with new contributions: a type system for the higher-order version of the calculus, a denotational semantics, and associated properties. The new, enhanced syntax is parametric in the set of the modeled data values (in [12] Booleans, numbers, and pairs were explicitly modeled). Moreover, the if construct has been removed by encapsulating its branching capability into function calls, which now take the form of a function field applied to arguments, implicitly enacting branching. Then, a novel key insight and technical result of this paper is that the notoriously difficult problem of reconciling local and global behaviour in a complex adaptive system [20] can be connected to a well-known problem in programming languages: correspondence between denotational and operational semantics. On the one hand, denotational semantics can be used to characterise computations in terms of their collective effect across space (available devices) and time (device computation events)—i.e., the macro level. On the other hand, operational semantics gives a transition system dictating each device’s individual and local computing/interactive behaviour—i.e., the micro level. Correspondence between the two, formally proved in this paper via computational adequacy and a form of abstraction (c.f. [10, 19]) that we call computational abstraction, thus provides a formal micro–macro connection: one designs a system considering the denotational semantics of programming constructs, and an underlying platform running the distributed interpreter defined by the operational semantics guarantees a consistent execution. This is a significant step towards effective methods for the engineering of self-adaptive systems, achieved thanks to the standard theory and framework of programming languages.

3 Conclusions, Related and Future Work

The work presented in this paper builds on a sizable body of prior work, for which the field calculus can somewhat act as a lingua franca: foundational approaches to group interaction (ambients [8], shared-spaces [22]), device abstraction languages (TOTA [15], Hood [23]), pattern languages [16], information movement languages [17], and spatial computing languages (MGS [13] and Proto [4]). Accordingly, future plans include consolidation of this work to investigate variants of the field calculus [2], to support an analytical methodology and a practical toolchain for system development, and to isolate fragments of the calculus that satisfy behavioural properties such as self-stabilisation developed in [20].