SlideShare a Scribd company logo
1 of 35
Download to read offline
Self-Organisation Programming:
a Functional Reactive Macro Approach
Roberto Casadei, Francesco Dente,
Gianluca Aguzzi, Danilo Pianini, Mirko Viroli
Department of Computer Science and Engineering
ALMA MATER STUDIORUM – Università of Bologna
June 21st, 2023
ACSOS’23, Toronto, Canada
https://www.slideshare.net/RobertoCasadei
R. Casadei Motivation Contribution Wrap-up References 1/16
Outline
1 Motivation
2 Contribution
3 Wrap-up
Context and Goals
building collective intelligence [1] in large-scale artificial systems
e.g.: swarms, edge-cloud infrastructures, crowds of wearable-augmented people
[1] R. Casadei, “Artificial Collective Intelligence Engineering: A Survey of Concepts and Perspectives,” Artificial Life,
Jul. 2023
R. Casadei Motivation Contribution Wrap-up References 2/16
A key problem: self-organisation engineering
how to drive the (emergence of the) self-organisation in a
collection of agents or devices?
[2] G. Aguzzi, R. Casadei, and M. Viroli, “Towards reinforcement learning-based aggregate computing,” in
COORDINATION, ser. LNCS, Springer, 2022
[3] R. Casadei, “Macroprogramming: Concepts, state of the art, and opportunities of macroscopic behaviour
modelling,” ACM Comput. Surv., no. 13s, 2023
[4] J. Beal, D. Pianini, and M. Viroli, “Aggregate programming for the internet of things,” IEEE Computer, no. 9, 2015
R. Casadei Motivation Contribution Wrap-up References 3/16
A key problem: self-organisation engineering
how to drive the (emergence of the) self-organisation in a
collection of agents or devices?
self-organisation engineering
(semi-)automatic approaches
MARL Program Synthesis [2] ...
“manual” approaches
node-centric
TOTA (reactive tuples)
...
macro-programming [3]
aggregate computing [4]
[2] G. Aguzzi, R. Casadei, and M. Viroli, “Towards reinforcement learning-based aggregate computing,” in
COORDINATION, ser. LNCS, Springer, 2022
[3] R. Casadei, “Macroprogramming: Concepts, state of the art, and opportunities of macroscopic behaviour
modelling,” ACM Comput. Surv., no. 13s, 2023
[4] J. Beal, D. Pianini, and M. Viroli, “Aggregate programming for the internet of things,” IEEE Computer, no. 9, 2015
R. Casadei Motivation Contribution Wrap-up References 3/16
SotA: Aggregate Computing (AC) (in 1 Slide)
Self-org-like computational model
structure: graph w/ local neighbourhoods
interaction: repeated msg exchange with neighbours
behaviour: repeated execution of async rounds of sense
– compute – (inter)act (program maps context to act)
R. Casadei Motivation Contribution Wrap-up References 4/16
SotA: Aggregate Computing (AC) (in 1 Slide)
Self-org-like computational model
structure: graph w/ local neighbourhoods
interaction: repeated msg exchange with neighbours
behaviour: repeated execution of async rounds of sense
– compute – (inter)act (program maps context to act)
formal model of executions: event structures
δ0
δ1
δ2
δ3
δ4
device
time
0
0 0
1 0
2 0
3 0
4
1
0 1
1 1
2 1
3 1
4 1
5
2
0 2
1 2
2 2
3
3
0 3
1 3
2 3
3 3
4 3
5
4
0 4
1 4
2
m
e
s
s
a
g
e
self-message
reboot
R. Casadei Motivation Contribution Wrap-up References 4/16
SotA: Aggregate Computing (AC) (in 1 Slide)
Self-org-like computational model
structure: graph w/ local neighbourhoods
interaction: repeated msg exchange with neighbours
behaviour: repeated execution of async rounds of sense
– compute – (inter)act (program maps context to act)
abstraction: computational fields (dev/evt 7→ V)
formal core language: field calculus [5]
paradigm: functional, macro-programming
source destination
gradient distance
gradient
=
+
dilate
width
37
10
1 def channel(source: Boolean, destination:
2 Boolean, width: Double) =
3 dilate(gradient(source) + gradient(destination) =
4 distance(source, destination), width)
M. Viroli, J. Beal, F. Damiani, G. Audrito, R. Casadei, and D. Pianini, “From dis-
tributed coordination to field calculus and aggregate computing,” J. Log. Algebraic
Methods Program., 2019
formal model of executions: event structures
δ0
δ1
δ2
δ3
δ4
device
time
0
0 0
1 0
2 0
3 0
4
1
0 1
1 1
2 1
3 1
4 1
5
2
0 2
1 2
2 2
3
3
0 3
1 3
2 3
3 3
4 3
5
4
0 4
1 4
2
m
e
s
s
a
g
e
self-message
reboot
R. Casadei Motivation Contribution Wrap-up References 4/16
SotA: Aggregate Computing (AC) (in 1 Slide)
Self-org-like computational model
structure: graph w/ local neighbourhoods
interaction: repeated msg exchange with neighbours
behaviour: repeated execution of async rounds of sense
– compute – (inter)act (program maps context to act)
abstraction: computational fields (dev/evt 7→ V)
formal core language: field calculus [5]
paradigm: functional, macro-programming
source destination
gradient distance
gradient
=
+
dilate
width
37
10
1 def channel(source: Boolean, destination:
2 Boolean, width: Double) =
3 dilate(gradient(source) + gradient(destination) =
4 distance(source, destination), width)
M. Viroli, J. Beal, F. Damiani, G. Audrito, R. Casadei, and D. Pianini, “From dis-
tributed coordination to field calculus and aggregate computing,” J. Log. Algebraic
Methods Program., 2019
formal model of executions: event structures
δ0
δ1
δ2
δ3
δ4
device
time
0
0 0
1 0
2 0
3 0
4
1
0 1
1 1
2 1
3 1
4 1
5
2
0 2
1 2
2 2
3
3
0 3
1 3
2 3
3 3
4 3
5
4
0 4
1 4
2
m
e
s
s
a
g
e
self-message
reboot
sensors
local functions
actuators
Application
Code
Developer
APIs
Field Calculus
Constructs
Resilient
Coordination
Operators
Device
Capabilities
functions rep
nbr
T
G
C
functions
communication state
Perception
Perception
summarize
average
regionMax
…
Action
Action State
State
Collective Behavior
Collective Behavior
distanceTo
broadcast
partition
…
timer
lowpass
recentTrue
…
collectivePerception
collectiveSummary
managementRegions
…
Crowd Management
Crowd Management
dangerousDensity crowdTracking
crowdWarning safeDispersal
restriction
self­stabilisation
J. Beal, D. Pianini, and M. Viroli, “Aggregate programming for the internet of
things,” IEEE Computer, no. 9, 2015
R. Casadei Motivation Contribution Wrap-up References 4/16
Motivation: combining strengths from SotA approaches
Feature TOTA aggregate computing
programming
approach , local-to-global - global-to-local
complexity
management “ modularity - compositionality
declarativeness
- high - high
scheduling ap-
proach - reactive , periodic (round-based)
scheduling
granularity - fine-grained , coarse-grained
R. Casadei Motivation Contribution Wrap-up References 5/16
Motivation: combining strengths from SotA approaches
Feature TOTA aggregate com-
puting
FRASP
programming
approach , local-to-global - global-to-local - global-to-local
complexity
management “ modularity - compositionality - compositionality
declarativeness
- high - high - high
scheduling ap-
proach - reactive , periodic (round-
based)
- reactive
scheduling
granularity - fine-grained , coarse-grained - fine-grained
R. Casadei Motivation Contribution Wrap-up References 5/16
Outline
1 Motivation
2 Contribution
3 Wrap-up
FRASP
FRASP
is a
Functional Reactive Approach
to
Self-organisation Programming
R. Casadei Motivation Contribution Wrap-up References 6/16
FRASP
FRASP
is a
Functional Reactive Approach
to
Self-organisation Programming
designed by interpreting the aggregate programming model by a (distributed) functional
reactive programming (FRP) perspective [6]
impl as a Scala DSL using Sodium FRP library
R. Casadei Motivation Contribution Wrap-up References 6/16
FRASP
FRASP
is a
Functional Reactive Approach
to
Self-organisation Programming
designed by interpreting the aggregate programming model by a (distributed) functional
reactive programming (FRP) perspective [6]
impl as a Scala DSL using Sodium FRP library
FRP in a nutshell
FRP provides abstractions to express and combine time-varying values into a
dependency graph
1 val v1 = /* ... */ ;
2 val v2 = /* ... */ ;
3 val v3 = v1 + v2 ; // v3 gets updated upon change of v1 or v2
R. Casadei Motivation Contribution Wrap-up References 6/16
FRASP
FRASP
is a
Functional Reactive Approach
to
Self-organisation Programming
designed by interpreting the aggregate programming model by a (distributed) functional
reactive programming (FRP) perspective [6]
impl as a Scala DSL using Sodium FRP library
FRP in a nutshell
FRP provides abstractions to express and combine time-varying values into a
dependency graph
1 val v1 = /* ... */ ;
2 val v2 = /* ... */ ;
3 val v3 = v1 + v2 ; // v3 gets updated upon change of v1 or v2
AC + FRP: intuition
1 val selforgSubRes1 = f(/* ... */);
2 val selforgSubRes2 = g(/* ... */);
3 val selforgOutput = h(selforgSubRes1, selforgSubRes2); // h re-eval'ed iff inputs change
R. Casadei Motivation Contribution Wrap-up References 6/16
FRASP in a nutshell
Data types
Flow[T]: a reactive collective
sub-computation representing a
time-varying signal of Ts
­ distributed! each device get its own
“flow” for a single task; the system
behaviour/result for the task is given by
all these flows
NbrField[T]: a collection of data from
neighbours
Neighbouring sensors
1 def nbrRange(): Flow[NbrField[Double]] =
2 nbrSensor(nbrRange)
Stateful flow evolution
1 loop(0)(v = v + 1) // implicitly
throttling
mux: strict choice
1 mux(sensor(temperature)  THRESHOLD) {
2 constant(hot)
3 } {
4 constant(normal)
5 }
branch: non-strict choice
1 branch(sensor(color) == red){
2 nbr(constant(1)).sum // run by reds
3 } {
4 nbr(constant(1)).sum // run by blues
5 }
lift: combining flows
1 lift(nbr(mid(),nbrRange()){ (nId,nDst) =
2 s${nId} is at distance ${nDst}
3 }
R. Casadei Motivation Contribution Wrap-up References 7/16
Example: gradient
Code and graphical representation of execution https://youtu.be/3QIWfNq3yxU
1 def gradient(source: Flow[Boolean]): Flow[Double] =
2 loop(Double.PositiveInfinity) { g = {
3 mux(source) {
4 constant(0.0)
5 } {
6 lift(nbrRange(), nbr(g))(_ + _).withoutSelf.min
7 }
8 }
gradient: field of minimum distances from source
Notation
∠ blue shadow: source
∠ gray: obstacle (no gradient computation)
∠ hotter colours → lower distance to source
R. Casadei Motivation Contribution Wrap-up References 8/16
Example: gradient
Evaluation: correctness + efficiency
0 100 200 300
time
0.0
0.2
0.4
0.6
0.8
1.0
#
messages
1e6 mode = round
0 100 200 300
time
mode = reactive
0 100 200 300
time
mode = throttle
throttle
0.0
0.125
0.2
0.5
1.0
(a) Gradient: messages
0 100 200 300
time
0
2
4
6
8
output
(mean)
mode = round
0 100 200 300
time
mode = reactive
0 100 200 300
time
mode = throttle
throttle
0.0
0.125
0.2
0.5
1.0
(b) Gradient output
R. Casadei Motivation Contribution Wrap-up References 9/16
Example: self-healing channel
Code
source destination
gradient distance
gradient
=
+
dilate
width
37
10
1 def broadcast[T](source: Flow[Boolean], value: Flow[T]): Flow[T] =
2 // impl follows same scheme as gradient, using distance to choose a value
3
4 def distanceBetween(source: Flow[Boolean], destination: Flow[Boolean]): Flow[Double] =
5 broadcast(source, gradient(destination))
6
7 def channel(source: Flow[Boolean],
8 destination: Flow[Boolean],
9 width: Double): Flow[Boolean] =
10 lift(gradient(source), gradient(destination), distanceBetween(source, destination)) {
11 (distSource, distDest, distBetween) = distSource + distDest = distBetween + width
12 }
R. Casadei Motivation Contribution Wrap-up References 10/16
Example: self-healing channel
Graphical representation of dependencies among reactive self-organising computations
source destination
gradient distance
gradient
=
+
dilate
width
37
10
Channel
gradient
(source)
gradient
(destination)
distanceBetween
source destination
Sub-
computations
Computation
Sensors
nbrRange
Input
Width
Platform
Local sensors
Neighbour data
R. Casadei Motivation Contribution Wrap-up References 11/16
Example: self-healing channel
Reactive Dynamics https://youtu.be/j_JX5wW03-w
stabilised channel (connects source to destination via a path of devices)
R. Casadei Motivation Contribution Wrap-up References 12/16
Example: self-healing channel
Reactive Dynamics https://youtu.be/j_JX5wW03-w
a new potential destination appears
R. Casadei Motivation Contribution Wrap-up References 12/16
Example: self-healing channel
Reactive Dynamics https://youtu.be/j_JX5wW03-w
the channel gets recomputed
R. Casadei Motivation Contribution Wrap-up References 12/16
Example: self-healing channel
Reactive Dynamics https://youtu.be/j_JX5wW03-w
the channel gets recomputed
R. Casadei Motivation Contribution Wrap-up References 12/16
Example: self-healing channel
Reactive Dynamics https://youtu.be/j_JX5wW03-w
the channel gets recomputed
R. Casadei Motivation Contribution Wrap-up References 12/16
Example: self-healing channel
Reactive Dynamics https://youtu.be/j_JX5wW03-w
the channel re-stabilises
R. Casadei Motivation Contribution Wrap-up References 12/16
Example: self-healing channel
Evaluation (correctness + efficiency)
0 100 200 300
time
0
2
4
6
8
#
messages
1e5 mode = round
0 100 200 300
time
mode = reactive
0 100 200 300
time
mode = throttle
throttle
0.0
0.125
0.2
0.5
1.0
(c) Channel: messages
0 100 200 300
time
0
2
4
6
8
output
(mean)
mode = round
0 100 200 300
time
mode = reactive
0 100 200 300
time
mode = throttle
throttle
0.0
0.125
0.2
0.5
1.0
(d) Channel: output
R. Casadei Motivation Contribution Wrap-up References 13/16
Outline
1 Motivation
2 Contribution
3 Wrap-up
Conclusion
FRASP (Functional Reactive Approach to Self-Org Programming) re-interprets the
aggregate programming model by a functional reactive programming (FRP) perspective
R. Casadei Motivation Contribution Wrap-up References 14/16
Conclusion
FRASP (Functional Reactive Approach to Self-Org Programming) re-interprets the
aggregate programming model by a functional reactive programming (FRP) perspective
∠ and also provides an original flavour of distributed FRP
R. Casadei Motivation Contribution Wrap-up References 14/16
Conclusion
FRASP (Functional Reactive Approach to Self-Org Programming) re-interprets the
aggregate programming model by a functional reactive programming (FRP) perspective
∠ and also provides an original flavour of distributed FRP
Combines the benefits of existing approaches (cf. AC and TOTA)
∠ expressiveness and compositionality
∠ reactive execution (configurable)
∠ fine-grained reactive execution (not only the whole programs but parts of it)
R. Casadei Motivation Contribution Wrap-up References 14/16
Conclusion
FRASP (Functional Reactive Approach to Self-Org Programming) re-interprets the
aggregate programming model by a functional reactive programming (FRP) perspective
∠ and also provides an original flavour of distributed FRP
Combines the benefits of existing approaches (cf. AC and TOTA)
∠ expressiveness and compositionality
∠ reactive execution (configurable)
∠ fine-grained reactive execution (not only the whole programs but parts of it)
Future work
∠ libraries of reactive self-org blocks
∠ implementation of advanced self-org constructs like aggregate processes
R. Casadei Motivation Contribution Wrap-up References 14/16
Thanks!
Channel
gradient
(source)
gradient
(destination)
distanceBetween
source destination
Sub-
computations
Computation
Sensors
nbrRange
Input
Width
Platform
Local sensors
Neighbour data
0 100 200 300
time
0
2
4
6
8
#
messages
1e5 mode = round
0 100 200 300
time
mode = reactive
0 100 200 300
time
mode = throttle
throttle
0.0
0.125
0.2
0.5
1.0
(e) Channel: messages
0 100 200 300
time
0
2
4
6
8
output
(mean)
mode = round
0 100 200 300
time
mode = reactive
0 100 200 300
time
mode = throttle
throttle
0.0
0.125
0.2
0.5
1.0
(f) Channel: output
Feature TOTA aggregate
computing
FRASP
programming
approach , local-to-
global
- global-to-
local
- global-to-
local
complexity
management “ modularity - composi-
tionality
- composi-
tionality
declarativeness
- high - high - high
scheduling ap-
proach - reactive , periodic
(round-based)
- reactive
scheduling
granularity - fine-grained , coarse-
grained
- fine-grained
R. Casadei Motivation Contribution Wrap-up References 15/16
References (1/1)
[1] R. Casadei, “Artificial Collective Intelligence Engineering: A Survey of Concepts and Perspectives,”
Artificial Life, pp. 1–35, Jul. 2023, ISSN: 1064-5462. DOI: 10.1162/artl_a_00408.
[2] G. Aguzzi, R. Casadei, and M. Viroli, “Towards reinforcement learning-based aggregate computing,”
in COORDINATION, ser. LNCS, vol. 13271, Springer, 2022, pp. 72–91. DOI:
10.1007/978-3-031-08143-9_5.
[3] R. Casadei, “Macroprogramming: Concepts, state of the art, and opportunities of macroscopic
behaviour modelling,” ACM Comput. Surv., vol. 55, no. 13s, 2023, ISSN: 0360-0300. DOI:
10.1145/3579353.
[4] J. Beal, D. Pianini, and M. Viroli, “Aggregate programming for the internet of things,” IEEE Computer,
vol. 48, no. 9, pp. 22–30, 2015. DOI: 10.1109/MC.2015.261.
[5] M. Viroli, J. Beal, F. Damiani, G. Audrito, R. Casadei, and D. Pianini, “From distributed coordination to
field calculus and aggregate computing,” J. Log. Algebraic Methods Program., vol. 109, 2019. DOI:
10.1016/j.jlamp.2019.100486.
[6] E. Bainomugisha, A. L. Carreton, T. V. Cutsem, S. Mostinckx, and W. D. Meuter, “A survey on reactive
programming,” ACM Comput. Surv., vol. 45, no. 4, 52:1–52:34, 2013. DOI:
10.1145/2501654.2501666.
R. Casadei Motivation Contribution Wrap-up References 16/16

More Related Content

Similar to Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [Presentation at ACSOS'23]

Practical Aggregate Programming in Scala
Practical Aggregate Programming in ScalaPractical Aggregate Programming in Scala
Practical Aggregate Programming in Scala
Roberto Casadei
 
Augmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
Augmented Collective Digital Twins for Self-Organising Cyber-Physical SystemsAugmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
Augmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
Roberto Casadei
 
Tuple-Based Coordination in Large-Scale Situated Systems
Tuple-Based Coordination in Large-Scale Situated SystemsTuple-Based Coordination in Large-Scale Situated Systems
Tuple-Based Coordination in Large-Scale Situated Systems
Roberto Casadei
 
Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...
Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...
Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...
Yahoo Developer Network
 
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop ClustersHDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters
Xiao Qin
 
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoTCollective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
Roberto Casadei
 

Similar to Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [Presentation at ACSOS'23] (20)

Practical Aggregate Programming in Scala
Practical Aggregate Programming in ScalaPractical Aggregate Programming in Scala
Practical Aggregate Programming in Scala
 
Augmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
Augmented Collective Digital Twins for Self-Organising Cyber-Physical SystemsAugmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
Augmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
 
A Presentation of My Research Activity
A Presentation of My Research ActivityA Presentation of My Research Activity
A Presentation of My Research Activity
 
On Execution Platforms for Large-Scale Aggregate Computing
On Execution Platforms for Large-Scale Aggregate ComputingOn Execution Platforms for Large-Scale Aggregate Computing
On Execution Platforms for Large-Scale Aggregate Computing
 
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...
 
Embarrassingly/Delightfully Parallel Problems
Embarrassingly/Delightfully Parallel ProblemsEmbarrassingly/Delightfully Parallel Problems
Embarrassingly/Delightfully Parallel Problems
 
Tuple-Based Coordination in Large-Scale Situated Systems
Tuple-Based Coordination in Large-Scale Situated SystemsTuple-Based Coordination in Large-Scale Situated Systems
Tuple-Based Coordination in Large-Scale Situated Systems
 
Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...
Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...
Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...
 
A Programming Framework for Collective Adaptive Ecosystems
A Programming Framework for Collective Adaptive EcosystemsA Programming Framework for Collective Adaptive Ecosystems
A Programming Framework for Collective Adaptive Ecosystems
 
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop ClustersHDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters
 
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoTCollective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
 
Joey gonzalez, graph lab, m lconf 2013
Joey gonzalez, graph lab, m lconf 2013Joey gonzalez, graph lab, m lconf 2013
Joey gonzalez, graph lab, m lconf 2013
 
Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...
Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...
Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...
 
Aggregate Processes in Field Calculus
Aggregate Processes in Field CalculusAggregate Processes in Field Calculus
Aggregate Processes in Field Calculus
 
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
 
NGRX Apps in Depth
NGRX Apps in DepthNGRX Apps in Depth
NGRX Apps in Depth
 
Twitter Analysis of Road Traffic Congestion Severity Estimation
Twitter Analysis of Road Traffic Congestion Severity EstimationTwitter Analysis of Road Traffic Congestion Severity Estimation
Twitter Analysis of Road Traffic Congestion Severity Estimation
 
Distributed Deep Learning + others for Spark Meetup
Distributed Deep Learning + others for Spark MeetupDistributed Deep Learning + others for Spark Meetup
Distributed Deep Learning + others for Spark Meetup
 
Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...
Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...
Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...
 
SFSCON23 - Enrico Zanardo - Optimizing Software Performance with Inductive Lo...
SFSCON23 - Enrico Zanardo - Optimizing Software Performance with Inductive Lo...SFSCON23 - Enrico Zanardo - Optimizing Software Performance with Inductive Lo...
SFSCON23 - Enrico Zanardo - Optimizing Software Performance with Inductive Lo...
 

More from Roberto Casadei

Introduction to the 1st DISCOLI workshop on distributed collective intelligence
Introduction to the 1st DISCOLI workshop on distributed collective intelligenceIntroduction to the 1st DISCOLI workshop on distributed collective intelligence
Introduction to the 1st DISCOLI workshop on distributed collective intelligence
Roberto Casadei
 
Engineering Resilient Collaborative Edge-enabled IoT
Engineering Resilient Collaborative Edge-enabled IoTEngineering Resilient Collaborative Edge-enabled IoT
Engineering Resilient Collaborative Edge-enabled IoT
Roberto Casadei
 
Bridging the Pervasive Computing Gap: An Aggregate Perspective
Bridging the Pervasive Computing Gap: An Aggregate PerspectiveBridging the Pervasive Computing Gap: An Aggregate Perspective
Bridging the Pervasive Computing Gap: An Aggregate Perspective
Roberto Casadei
 

More from Roberto Casadei (15)

Introduction to the 1st DISCOLI workshop on distributed collective intelligence
Introduction to the 1st DISCOLI workshop on distributed collective intelligenceIntroduction to the 1st DISCOLI workshop on distributed collective intelligence
Introduction to the 1st DISCOLI workshop on distributed collective intelligence
 
6th eCAS workshop on Engineering Collective Adaptive Systems
6th eCAS workshop on Engineering Collective Adaptive Systems6th eCAS workshop on Engineering Collective Adaptive Systems
6th eCAS workshop on Engineering Collective Adaptive Systems
 
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...
 
Testing: an Introduction and Panorama
Testing: an Introduction and PanoramaTesting: an Introduction and Panorama
Testing: an Introduction and Panorama
 
On Context-Orientation in Aggregate Programming
On Context-Orientation in Aggregate ProgrammingOn Context-Orientation in Aggregate Programming
On Context-Orientation in Aggregate Programming
 
Engineering Resilient Collaborative Edge-enabled IoT
Engineering Resilient Collaborative Edge-enabled IoTEngineering Resilient Collaborative Edge-enabled IoT
Engineering Resilient Collaborative Edge-enabled IoT
 
AWS and Serverless Computing
AWS and Serverless ComputingAWS and Serverless Computing
AWS and Serverless Computing
 
The Rust Programming Language: an Overview
The Rust Programming Language: an OverviewThe Rust Programming Language: an Overview
The Rust Programming Language: an Overview
 
Akka Remoting and Clustering: an Introduction
Akka Remoting and Clustering: an IntroductionAkka Remoting and Clustering: an Introduction
Akka Remoting and Clustering: an Introduction
 
Akka Actors: an Introduction
Akka Actors: an IntroductionAkka Actors: an Introduction
Akka Actors: an Introduction
 
Bridging the Pervasive Computing Gap: An Aggregate Perspective
Bridging the Pervasive Computing Gap: An Aggregate PerspectiveBridging the Pervasive Computing Gap: An Aggregate Perspective
Bridging the Pervasive Computing Gap: An Aggregate Perspective
 
From Field-based Coordination to Aggregate Computing
From Field-based Coordination to Aggregate ComputingFrom Field-based Coordination to Aggregate Computing
From Field-based Coordination to Aggregate Computing
 
NodeJS: an Introduction
NodeJS: an IntroductionNodeJS: an Introduction
NodeJS: an Introduction
 
Spring Boot: a Quick Introduction
Spring Boot: a Quick IntroductionSpring Boot: a Quick Introduction
Spring Boot: a Quick Introduction
 
Introduction to cloud-native application development: with Heroku and Spring ...
Introduction to cloud-native application development: with Heroku and Spring ...Introduction to cloud-native application development: with Heroku and Spring ...
Introduction to cloud-native application development: with Heroku and Spring ...
 

Recently uploaded

Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
Sérgio Sacani
 
The solar dynamo begins near the surface
The solar dynamo begins near the surfaceThe solar dynamo begins near the surface
The solar dynamo begins near the surface
Sérgio Sacani
 
Isolation of AMF by wet sieving and decantation method pptx
Isolation of AMF by wet sieving and decantation method pptxIsolation of AMF by wet sieving and decantation method pptx
Isolation of AMF by wet sieving and decantation method pptx
GOWTHAMIM22
 
The importance of continents, oceans and plate tectonics for the evolution of...
The importance of continents, oceans and plate tectonics for the evolution of...The importance of continents, oceans and plate tectonics for the evolution of...
The importance of continents, oceans and plate tectonics for the evolution of...
Sérgio Sacani
 
Jet reorientation in central galaxies of clusters and groups: insights from V...
Jet reorientation in central galaxies of clusters and groups: insights from V...Jet reorientation in central galaxies of clusters and groups: insights from V...
Jet reorientation in central galaxies of clusters and groups: insights from V...
Sérgio Sacani
 

Recently uploaded (20)

Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
 
Cellular Communication and regulation of communication mechanisms to sing the...
Cellular Communication and regulation of communication mechanisms to sing the...Cellular Communication and regulation of communication mechanisms to sing the...
Cellular Communication and regulation of communication mechanisms to sing the...
 
GBSN - Microbiology (Unit 6) Human and Microbial interaction
GBSN - Microbiology (Unit 6) Human and Microbial interactionGBSN - Microbiology (Unit 6) Human and Microbial interaction
GBSN - Microbiology (Unit 6) Human and Microbial interaction
 
PLANT DISEASE MANAGEMENT PRINCIPLES AND ITS IMPORTANCE
PLANT DISEASE MANAGEMENT PRINCIPLES AND ITS IMPORTANCEPLANT DISEASE MANAGEMENT PRINCIPLES AND ITS IMPORTANCE
PLANT DISEASE MANAGEMENT PRINCIPLES AND ITS IMPORTANCE
 
GBSN - Biochemistry (Unit 4) Chemistry of Carbohydrates
GBSN - Biochemistry (Unit 4) Chemistry of CarbohydratesGBSN - Biochemistry (Unit 4) Chemistry of Carbohydrates
GBSN - Biochemistry (Unit 4) Chemistry of Carbohydrates
 
A Giant Impact Origin for the First Subduction on Earth
A Giant Impact Origin for the First Subduction on EarthA Giant Impact Origin for the First Subduction on Earth
A Giant Impact Origin for the First Subduction on Earth
 
GBSN - Microbiology Lab (Microbiology Lab Safety Procedures)
GBSN -  Microbiology Lab (Microbiology Lab Safety Procedures)GBSN -  Microbiology Lab (Microbiology Lab Safety Procedures)
GBSN - Microbiology Lab (Microbiology Lab Safety Procedures)
 
WASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 Rp
WASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 RpWASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 Rp
WASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 Rp
 
Virulence Analysis of Citrus canker caused by Xanthomonas axonopodis pv. citr...
Virulence Analysis of Citrus canker caused by Xanthomonas axonopodis pv. citr...Virulence Analysis of Citrus canker caused by Xanthomonas axonopodis pv. citr...
Virulence Analysis of Citrus canker caused by Xanthomonas axonopodis pv. citr...
 
Alternative method of dissolution in-vitro in-vivo correlation and dissolutio...
Alternative method of dissolution in-vitro in-vivo correlation and dissolutio...Alternative method of dissolution in-vitro in-vivo correlation and dissolutio...
Alternative method of dissolution in-vitro in-vivo correlation and dissolutio...
 
family therapy psychotherapy types .pdf
family therapy psychotherapy types  .pdffamily therapy psychotherapy types  .pdf
family therapy psychotherapy types .pdf
 
The solar dynamo begins near the surface
The solar dynamo begins near the surfaceThe solar dynamo begins near the surface
The solar dynamo begins near the surface
 
ERTHROPOIESIS: Dr. E. Muralinath & R. Gnana Lahari
ERTHROPOIESIS: Dr. E. Muralinath & R. Gnana LahariERTHROPOIESIS: Dr. E. Muralinath & R. Gnana Lahari
ERTHROPOIESIS: Dr. E. Muralinath & R. Gnana Lahari
 
Isolation of AMF by wet sieving and decantation method pptx
Isolation of AMF by wet sieving and decantation method pptxIsolation of AMF by wet sieving and decantation method pptx
Isolation of AMF by wet sieving and decantation method pptx
 
VILLAGE ATTACHMENT For rural agriculture PPT.pptx
VILLAGE ATTACHMENT For rural agriculture  PPT.pptxVILLAGE ATTACHMENT For rural agriculture  PPT.pptx
VILLAGE ATTACHMENT For rural agriculture PPT.pptx
 
The importance of continents, oceans and plate tectonics for the evolution of...
The importance of continents, oceans and plate tectonics for the evolution of...The importance of continents, oceans and plate tectonics for the evolution of...
The importance of continents, oceans and plate tectonics for the evolution of...
 
Triploidy ...............................pptx
Triploidy ...............................pptxTriploidy ...............................pptx
Triploidy ...............................pptx
 
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptx
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptxPlasmapheresis - Dr. E. Muralinath - Kalyan . C.pptx
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptx
 
Jet reorientation in central galaxies of clusters and groups: insights from V...
Jet reorientation in central galaxies of clusters and groups: insights from V...Jet reorientation in central galaxies of clusters and groups: insights from V...
Jet reorientation in central galaxies of clusters and groups: insights from V...
 
Molecular and Cellular Mechanism of Action of Hormones such as Growth Hormone...
Molecular and Cellular Mechanism of Action of Hormones such as Growth Hormone...Molecular and Cellular Mechanism of Action of Hormones such as Growth Hormone...
Molecular and Cellular Mechanism of Action of Hormones such as Growth Hormone...
 

Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [Presentation at ACSOS'23]

  • 1. Self-Organisation Programming: a Functional Reactive Macro Approach Roberto Casadei, Francesco Dente, Gianluca Aguzzi, Danilo Pianini, Mirko Viroli Department of Computer Science and Engineering ALMA MATER STUDIORUM – Università of Bologna June 21st, 2023 ACSOS’23, Toronto, Canada https://www.slideshare.net/RobertoCasadei R. Casadei Motivation Contribution Wrap-up References 1/16
  • 3. Context and Goals building collective intelligence [1] in large-scale artificial systems e.g.: swarms, edge-cloud infrastructures, crowds of wearable-augmented people [1] R. Casadei, “Artificial Collective Intelligence Engineering: A Survey of Concepts and Perspectives,” Artificial Life, Jul. 2023 R. Casadei Motivation Contribution Wrap-up References 2/16
  • 4. A key problem: self-organisation engineering how to drive the (emergence of the) self-organisation in a collection of agents or devices? [2] G. Aguzzi, R. Casadei, and M. Viroli, “Towards reinforcement learning-based aggregate computing,” in COORDINATION, ser. LNCS, Springer, 2022 [3] R. Casadei, “Macroprogramming: Concepts, state of the art, and opportunities of macroscopic behaviour modelling,” ACM Comput. Surv., no. 13s, 2023 [4] J. Beal, D. Pianini, and M. Viroli, “Aggregate programming for the internet of things,” IEEE Computer, no. 9, 2015 R. Casadei Motivation Contribution Wrap-up References 3/16
  • 5. A key problem: self-organisation engineering how to drive the (emergence of the) self-organisation in a collection of agents or devices? self-organisation engineering (semi-)automatic approaches MARL Program Synthesis [2] ... “manual” approaches node-centric TOTA (reactive tuples) ... macro-programming [3] aggregate computing [4] [2] G. Aguzzi, R. Casadei, and M. Viroli, “Towards reinforcement learning-based aggregate computing,” in COORDINATION, ser. LNCS, Springer, 2022 [3] R. Casadei, “Macroprogramming: Concepts, state of the art, and opportunities of macroscopic behaviour modelling,” ACM Comput. Surv., no. 13s, 2023 [4] J. Beal, D. Pianini, and M. Viroli, “Aggregate programming for the internet of things,” IEEE Computer, no. 9, 2015 R. Casadei Motivation Contribution Wrap-up References 3/16
  • 6. SotA: Aggregate Computing (AC) (in 1 Slide) Self-org-like computational model structure: graph w/ local neighbourhoods interaction: repeated msg exchange with neighbours behaviour: repeated execution of async rounds of sense – compute – (inter)act (program maps context to act) R. Casadei Motivation Contribution Wrap-up References 4/16
  • 7. SotA: Aggregate Computing (AC) (in 1 Slide) Self-org-like computational model structure: graph w/ local neighbourhoods interaction: repeated msg exchange with neighbours behaviour: repeated execution of async rounds of sense – compute – (inter)act (program maps context to act) formal model of executions: event structures δ0 δ1 δ2 δ3 δ4 device time 0 0 0 1 0 2 0 3 0 4 1 0 1 1 1 2 1 3 1 4 1 5 2 0 2 1 2 2 2 3 3 0 3 1 3 2 3 3 3 4 3 5 4 0 4 1 4 2 m e s s a g e self-message reboot R. Casadei Motivation Contribution Wrap-up References 4/16
  • 8. SotA: Aggregate Computing (AC) (in 1 Slide) Self-org-like computational model structure: graph w/ local neighbourhoods interaction: repeated msg exchange with neighbours behaviour: repeated execution of async rounds of sense – compute – (inter)act (program maps context to act) abstraction: computational fields (dev/evt 7→ V) formal core language: field calculus [5] paradigm: functional, macro-programming source destination gradient distance gradient = + dilate width 37 10 1 def channel(source: Boolean, destination: 2 Boolean, width: Double) = 3 dilate(gradient(source) + gradient(destination) = 4 distance(source, destination), width) M. Viroli, J. Beal, F. Damiani, G. Audrito, R. Casadei, and D. Pianini, “From dis- tributed coordination to field calculus and aggregate computing,” J. Log. Algebraic Methods Program., 2019 formal model of executions: event structures δ0 δ1 δ2 δ3 δ4 device time 0 0 0 1 0 2 0 3 0 4 1 0 1 1 1 2 1 3 1 4 1 5 2 0 2 1 2 2 2 3 3 0 3 1 3 2 3 3 3 4 3 5 4 0 4 1 4 2 m e s s a g e self-message reboot R. Casadei Motivation Contribution Wrap-up References 4/16
  • 9. SotA: Aggregate Computing (AC) (in 1 Slide) Self-org-like computational model structure: graph w/ local neighbourhoods interaction: repeated msg exchange with neighbours behaviour: repeated execution of async rounds of sense – compute – (inter)act (program maps context to act) abstraction: computational fields (dev/evt 7→ V) formal core language: field calculus [5] paradigm: functional, macro-programming source destination gradient distance gradient = + dilate width 37 10 1 def channel(source: Boolean, destination: 2 Boolean, width: Double) = 3 dilate(gradient(source) + gradient(destination) = 4 distance(source, destination), width) M. Viroli, J. Beal, F. Damiani, G. Audrito, R. Casadei, and D. Pianini, “From dis- tributed coordination to field calculus and aggregate computing,” J. Log. Algebraic Methods Program., 2019 formal model of executions: event structures δ0 δ1 δ2 δ3 δ4 device time 0 0 0 1 0 2 0 3 0 4 1 0 1 1 1 2 1 3 1 4 1 5 2 0 2 1 2 2 2 3 3 0 3 1 3 2 3 3 3 4 3 5 4 0 4 1 4 2 m e s s a g e self-message reboot sensors local functions actuators Application Code Developer APIs Field Calculus Constructs Resilient Coordination Operators Device Capabilities functions rep nbr T G C functions communication state Perception Perception summarize average regionMax … Action Action State State Collective Behavior Collective Behavior distanceTo broadcast partition … timer lowpass recentTrue … collectivePerception collectiveSummary managementRegions … Crowd Management Crowd Management dangerousDensity crowdTracking crowdWarning safeDispersal restriction self­stabilisation J. Beal, D. Pianini, and M. Viroli, “Aggregate programming for the internet of things,” IEEE Computer, no. 9, 2015 R. Casadei Motivation Contribution Wrap-up References 4/16
  • 10. Motivation: combining strengths from SotA approaches Feature TOTA aggregate computing programming approach , local-to-global - global-to-local complexity management “ modularity - compositionality declarativeness - high - high scheduling ap- proach - reactive , periodic (round-based) scheduling granularity - fine-grained , coarse-grained R. Casadei Motivation Contribution Wrap-up References 5/16
  • 11. Motivation: combining strengths from SotA approaches Feature TOTA aggregate com- puting FRASP programming approach , local-to-global - global-to-local - global-to-local complexity management “ modularity - compositionality - compositionality declarativeness - high - high - high scheduling ap- proach - reactive , periodic (round- based) - reactive scheduling granularity - fine-grained , coarse-grained - fine-grained R. Casadei Motivation Contribution Wrap-up References 5/16
  • 13. FRASP FRASP is a Functional Reactive Approach to Self-organisation Programming R. Casadei Motivation Contribution Wrap-up References 6/16
  • 14. FRASP FRASP is a Functional Reactive Approach to Self-organisation Programming designed by interpreting the aggregate programming model by a (distributed) functional reactive programming (FRP) perspective [6] impl as a Scala DSL using Sodium FRP library R. Casadei Motivation Contribution Wrap-up References 6/16
  • 15. FRASP FRASP is a Functional Reactive Approach to Self-organisation Programming designed by interpreting the aggregate programming model by a (distributed) functional reactive programming (FRP) perspective [6] impl as a Scala DSL using Sodium FRP library FRP in a nutshell FRP provides abstractions to express and combine time-varying values into a dependency graph 1 val v1 = /* ... */ ; 2 val v2 = /* ... */ ; 3 val v3 = v1 + v2 ; // v3 gets updated upon change of v1 or v2 R. Casadei Motivation Contribution Wrap-up References 6/16
  • 16. FRASP FRASP is a Functional Reactive Approach to Self-organisation Programming designed by interpreting the aggregate programming model by a (distributed) functional reactive programming (FRP) perspective [6] impl as a Scala DSL using Sodium FRP library FRP in a nutshell FRP provides abstractions to express and combine time-varying values into a dependency graph 1 val v1 = /* ... */ ; 2 val v2 = /* ... */ ; 3 val v3 = v1 + v2 ; // v3 gets updated upon change of v1 or v2 AC + FRP: intuition 1 val selforgSubRes1 = f(/* ... */); 2 val selforgSubRes2 = g(/* ... */); 3 val selforgOutput = h(selforgSubRes1, selforgSubRes2); // h re-eval'ed iff inputs change R. Casadei Motivation Contribution Wrap-up References 6/16
  • 17. FRASP in a nutshell Data types Flow[T]: a reactive collective sub-computation representing a time-varying signal of Ts ­ distributed! each device get its own “flow” for a single task; the system behaviour/result for the task is given by all these flows NbrField[T]: a collection of data from neighbours Neighbouring sensors 1 def nbrRange(): Flow[NbrField[Double]] = 2 nbrSensor(nbrRange) Stateful flow evolution 1 loop(0)(v = v + 1) // implicitly throttling mux: strict choice 1 mux(sensor(temperature) THRESHOLD) { 2 constant(hot) 3 } { 4 constant(normal) 5 } branch: non-strict choice 1 branch(sensor(color) == red){ 2 nbr(constant(1)).sum // run by reds 3 } { 4 nbr(constant(1)).sum // run by blues 5 } lift: combining flows 1 lift(nbr(mid(),nbrRange()){ (nId,nDst) = 2 s${nId} is at distance ${nDst} 3 } R. Casadei Motivation Contribution Wrap-up References 7/16
  • 18. Example: gradient Code and graphical representation of execution https://youtu.be/3QIWfNq3yxU 1 def gradient(source: Flow[Boolean]): Flow[Double] = 2 loop(Double.PositiveInfinity) { g = { 3 mux(source) { 4 constant(0.0) 5 } { 6 lift(nbrRange(), nbr(g))(_ + _).withoutSelf.min 7 } 8 } gradient: field of minimum distances from source Notation ∠ blue shadow: source ∠ gray: obstacle (no gradient computation) ∠ hotter colours → lower distance to source R. Casadei Motivation Contribution Wrap-up References 8/16
  • 19. Example: gradient Evaluation: correctness + efficiency 0 100 200 300 time 0.0 0.2 0.4 0.6 0.8 1.0 # messages 1e6 mode = round 0 100 200 300 time mode = reactive 0 100 200 300 time mode = throttle throttle 0.0 0.125 0.2 0.5 1.0 (a) Gradient: messages 0 100 200 300 time 0 2 4 6 8 output (mean) mode = round 0 100 200 300 time mode = reactive 0 100 200 300 time mode = throttle throttle 0.0 0.125 0.2 0.5 1.0 (b) Gradient output R. Casadei Motivation Contribution Wrap-up References 9/16
  • 20. Example: self-healing channel Code source destination gradient distance gradient = + dilate width 37 10 1 def broadcast[T](source: Flow[Boolean], value: Flow[T]): Flow[T] = 2 // impl follows same scheme as gradient, using distance to choose a value 3 4 def distanceBetween(source: Flow[Boolean], destination: Flow[Boolean]): Flow[Double] = 5 broadcast(source, gradient(destination)) 6 7 def channel(source: Flow[Boolean], 8 destination: Flow[Boolean], 9 width: Double): Flow[Boolean] = 10 lift(gradient(source), gradient(destination), distanceBetween(source, destination)) { 11 (distSource, distDest, distBetween) = distSource + distDest = distBetween + width 12 } R. Casadei Motivation Contribution Wrap-up References 10/16
  • 21. Example: self-healing channel Graphical representation of dependencies among reactive self-organising computations source destination gradient distance gradient = + dilate width 37 10 Channel gradient (source) gradient (destination) distanceBetween source destination Sub- computations Computation Sensors nbrRange Input Width Platform Local sensors Neighbour data R. Casadei Motivation Contribution Wrap-up References 11/16
  • 22. Example: self-healing channel Reactive Dynamics https://youtu.be/j_JX5wW03-w stabilised channel (connects source to destination via a path of devices) R. Casadei Motivation Contribution Wrap-up References 12/16
  • 23. Example: self-healing channel Reactive Dynamics https://youtu.be/j_JX5wW03-w a new potential destination appears R. Casadei Motivation Contribution Wrap-up References 12/16
  • 24. Example: self-healing channel Reactive Dynamics https://youtu.be/j_JX5wW03-w the channel gets recomputed R. Casadei Motivation Contribution Wrap-up References 12/16
  • 25. Example: self-healing channel Reactive Dynamics https://youtu.be/j_JX5wW03-w the channel gets recomputed R. Casadei Motivation Contribution Wrap-up References 12/16
  • 26. Example: self-healing channel Reactive Dynamics https://youtu.be/j_JX5wW03-w the channel gets recomputed R. Casadei Motivation Contribution Wrap-up References 12/16
  • 27. Example: self-healing channel Reactive Dynamics https://youtu.be/j_JX5wW03-w the channel re-stabilises R. Casadei Motivation Contribution Wrap-up References 12/16
  • 28. Example: self-healing channel Evaluation (correctness + efficiency) 0 100 200 300 time 0 2 4 6 8 # messages 1e5 mode = round 0 100 200 300 time mode = reactive 0 100 200 300 time mode = throttle throttle 0.0 0.125 0.2 0.5 1.0 (c) Channel: messages 0 100 200 300 time 0 2 4 6 8 output (mean) mode = round 0 100 200 300 time mode = reactive 0 100 200 300 time mode = throttle throttle 0.0 0.125 0.2 0.5 1.0 (d) Channel: output R. Casadei Motivation Contribution Wrap-up References 13/16
  • 30. Conclusion FRASP (Functional Reactive Approach to Self-Org Programming) re-interprets the aggregate programming model by a functional reactive programming (FRP) perspective R. Casadei Motivation Contribution Wrap-up References 14/16
  • 31. Conclusion FRASP (Functional Reactive Approach to Self-Org Programming) re-interprets the aggregate programming model by a functional reactive programming (FRP) perspective ∠ and also provides an original flavour of distributed FRP R. Casadei Motivation Contribution Wrap-up References 14/16
  • 32. Conclusion FRASP (Functional Reactive Approach to Self-Org Programming) re-interprets the aggregate programming model by a functional reactive programming (FRP) perspective ∠ and also provides an original flavour of distributed FRP Combines the benefits of existing approaches (cf. AC and TOTA) ∠ expressiveness and compositionality ∠ reactive execution (configurable) ∠ fine-grained reactive execution (not only the whole programs but parts of it) R. Casadei Motivation Contribution Wrap-up References 14/16
  • 33. Conclusion FRASP (Functional Reactive Approach to Self-Org Programming) re-interprets the aggregate programming model by a functional reactive programming (FRP) perspective ∠ and also provides an original flavour of distributed FRP Combines the benefits of existing approaches (cf. AC and TOTA) ∠ expressiveness and compositionality ∠ reactive execution (configurable) ∠ fine-grained reactive execution (not only the whole programs but parts of it) Future work ∠ libraries of reactive self-org blocks ∠ implementation of advanced self-org constructs like aggregate processes R. Casadei Motivation Contribution Wrap-up References 14/16
  • 34. Thanks! Channel gradient (source) gradient (destination) distanceBetween source destination Sub- computations Computation Sensors nbrRange Input Width Platform Local sensors Neighbour data 0 100 200 300 time 0 2 4 6 8 # messages 1e5 mode = round 0 100 200 300 time mode = reactive 0 100 200 300 time mode = throttle throttle 0.0 0.125 0.2 0.5 1.0 (e) Channel: messages 0 100 200 300 time 0 2 4 6 8 output (mean) mode = round 0 100 200 300 time mode = reactive 0 100 200 300 time mode = throttle throttle 0.0 0.125 0.2 0.5 1.0 (f) Channel: output Feature TOTA aggregate computing FRASP programming approach , local-to- global - global-to- local - global-to- local complexity management “ modularity - composi- tionality - composi- tionality declarativeness - high - high - high scheduling ap- proach - reactive , periodic (round-based) - reactive scheduling granularity - fine-grained , coarse- grained - fine-grained R. Casadei Motivation Contribution Wrap-up References 15/16
  • 35. References (1/1) [1] R. Casadei, “Artificial Collective Intelligence Engineering: A Survey of Concepts and Perspectives,” Artificial Life, pp. 1–35, Jul. 2023, ISSN: 1064-5462. DOI: 10.1162/artl_a_00408. [2] G. Aguzzi, R. Casadei, and M. Viroli, “Towards reinforcement learning-based aggregate computing,” in COORDINATION, ser. LNCS, vol. 13271, Springer, 2022, pp. 72–91. DOI: 10.1007/978-3-031-08143-9_5. [3] R. Casadei, “Macroprogramming: Concepts, state of the art, and opportunities of macroscopic behaviour modelling,” ACM Comput. Surv., vol. 55, no. 13s, 2023, ISSN: 0360-0300. DOI: 10.1145/3579353. [4] J. Beal, D. Pianini, and M. Viroli, “Aggregate programming for the internet of things,” IEEE Computer, vol. 48, no. 9, pp. 22–30, 2015. DOI: 10.1109/MC.2015.261. [5] M. Viroli, J. Beal, F. Damiani, G. Audrito, R. Casadei, and D. Pianini, “From distributed coordination to field calculus and aggregate computing,” J. Log. Algebraic Methods Program., vol. 109, 2019. DOI: 10.1016/j.jlamp.2019.100486. [6] E. Bainomugisha, A. L. Carreton, T. V. Cutsem, S. Mostinckx, and W. D. Meuter, “A survey on reactive programming,” ACM Comput. Surv., vol. 45, no. 4, 52:1–52:34, 2013. DOI: 10.1145/2501654.2501666. R. Casadei Motivation Contribution Wrap-up References 16/16