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

Roberto Casadei
Roberto CasadeiPhD Student in CS&Eng @ Unibo um Università di Bologna
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
1 von 35

Recomendados

Programming Distributed Collective Processes for Dynamic Ensembles and Collec... von
Programming Distributed Collective Processes for Dynamic Ensembles and Collec...Programming Distributed Collective Processes for Dynamic Ensembles and Collec...
Programming Distributed Collective Processes for Dynamic Ensembles and Collec...Roberto Casadei
26 views37 Folien
Towards Automated Engineering for Collective Adaptive Systems: Vision and Res... von
Towards Automated Engineering for Collective Adaptive Systems: Vision and Res...Towards Automated Engineering for Collective Adaptive Systems: Vision and Res...
Towards Automated Engineering for Collective Adaptive Systems: Vision and Res...Roberto Casadei
12 views18 Folien
Aggregate Computing Research: an Overview von
Aggregate Computing Research: an OverviewAggregate Computing Research: an Overview
Aggregate Computing Research: an OverviewRoberto Casadei
11 views34 Folien
Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P... von
Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P...Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P...
Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P...Roberto Casadei
92 views36 Folien
Scafi: Scala with Computational Fields von
Scafi: Scala with Computational FieldsScafi: Scala with Computational Fields
Scafi: Scala with Computational FieldsRoberto Casadei
131 views73 Folien
Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac... von
Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac...Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac...
Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac...Roberto Casadei
94 views20 Folien

Más contenido relacionado

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

Practical Aggregate Programming in Scala von
Practical Aggregate Programming in ScalaPractical Aggregate Programming in Scala
Practical Aggregate Programming in ScalaRoberto Casadei
1.1K views34 Folien
Augmented Collective Digital Twins for Self-Organising Cyber-Physical Systems von
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 SystemsRoberto Casadei
89 views25 Folien
A Presentation of My Research Activity von
A Presentation of My Research ActivityA Presentation of My Research Activity
A Presentation of My Research ActivityRoberto Casadei
20 views60 Folien
On Execution Platforms for Large-Scale Aggregate Computing von
On Execution Platforms for Large-Scale Aggregate ComputingOn Execution Platforms for Large-Scale Aggregate Computing
On Execution Platforms for Large-Scale Aggregate ComputingRoberto Casadei
708 views53 Folien
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati... von
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...Roberto Casadei
448 views50 Folien
Tuple-Based Coordination in Large-Scale Situated Systems von
Tuple-Based Coordination in Large-Scale Situated SystemsTuple-Based Coordination in Large-Scale Situated Systems
Tuple-Based Coordination in Large-Scale Situated SystemsRoberto Casadei
82 views19 Folien

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

Practical Aggregate Programming in Scala von Roberto Casadei
Practical Aggregate Programming in ScalaPractical Aggregate Programming in Scala
Practical Aggregate Programming in Scala
Roberto Casadei1.1K views
Augmented Collective Digital Twins for Self-Organising Cyber-Physical Systems von Roberto Casadei
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 Casadei89 views
A Presentation of My Research Activity von Roberto Casadei
A Presentation of My Research ActivityA Presentation of My Research Activity
A Presentation of My Research Activity
Roberto Casadei20 views
On Execution Platforms for Large-Scale Aggregate Computing von Roberto Casadei
On Execution Platforms for Large-Scale Aggregate ComputingOn Execution Platforms for Large-Scale Aggregate Computing
On Execution Platforms for Large-Scale Aggregate Computing
Roberto Casadei708 views
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati... von Roberto Casadei
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...
Roberto Casadei448 views
Tuple-Based Coordination in Large-Scale Situated Systems von Roberto Casadei
Tuple-Based Coordination in Large-Scale Situated SystemsTuple-Based Coordination in Large-Scale Situated Systems
Tuple-Based Coordination in Large-Scale Situated Systems
Roberto Casadei82 views
Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm... von Yahoo Developer Network
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 von Roberto Casadei
A Programming Framework for Collective Adaptive EcosystemsA Programming Framework for Collective Adaptive Ecosystems
A Programming Framework for Collective Adaptive Ecosystems
Roberto Casadei46 views
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters von Xiao Qin
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 Qin2.4K views
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoT von Roberto Casadei
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 Casadei83 views
Joey gonzalez, graph lab, m lconf 2013 von MLconf
Joey gonzalez, graph lab, m lconf 2013Joey gonzalez, graph lab, m lconf 2013
Joey gonzalez, graph lab, m lconf 2013
MLconf3.2K views
Aggregate Processes in Field Calculus von Roberto Casadei
Aggregate Processes in Field CalculusAggregate Processes in Field Calculus
Aggregate Processes in Field Calculus
Roberto Casadei151 views
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016 von Trayan Iliev
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
Trayan Iliev985 views
Twitter Analysis of Road Traffic Congestion Severity Estimation von Gaurav Singh
Twitter Analysis of Road Traffic Congestion Severity EstimationTwitter Analysis of Road Traffic Congestion Severity Estimation
Twitter Analysis of Road Traffic Congestion Severity Estimation
Gaurav Singh97 views
Conducting Experiments on the Software Architecture of Robotic Systems (QRARS... von Ivano Malavolta
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...
Ivano Malavolta87 views
Coates p: the use of genetic programing in exploring 3 d design worlds von ArchiLab 7
Coates p: the use of genetic programing in exploring 3 d design worldsCoates p: the use of genetic programing in exploring 3 d design worlds
Coates p: the use of genetic programing in exploring 3 d design worlds
ArchiLab 7769 views
Engineering Resilient Collaborative Edge-enabled IoT von Roberto Casadei
Engineering Resilient Collaborative Edge-enabled IoTEngineering Resilient Collaborative Edge-enabled IoT
Engineering Resilient Collaborative Edge-enabled IoT
Roberto Casadei153 views
High-Performance Graph Analysis and Modeling von Nesreen K. Ahmed
High-Performance Graph Analysis and ModelingHigh-Performance Graph Analysis and Modeling
High-Performance Graph Analysis and Modeling
Nesreen K. Ahmed200 views

Más de Roberto Casadei

Introduction to the 1st DISCOLI workshop on distributed collective intelligence von
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 intelligenceRoberto Casadei
14 views6 Folien
6th eCAS workshop on Engineering Collective Adaptive Systems von
6th eCAS workshop on Engineering Collective Adaptive Systems6th eCAS workshop on Engineering Collective Adaptive Systems
6th eCAS workshop on Engineering Collective Adaptive SystemsRoberto Casadei
73 views8 Folien
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi... von
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...Roberto Casadei
45 views17 Folien
Testing: an Introduction and Panorama von
Testing: an Introduction and PanoramaTesting: an Introduction and Panorama
Testing: an Introduction and PanoramaRoberto Casadei
124 views28 Folien
On Context-Orientation in Aggregate Programming von
On Context-Orientation in Aggregate ProgrammingOn Context-Orientation in Aggregate Programming
On Context-Orientation in Aggregate ProgrammingRoberto Casadei
140 views48 Folien
AWS and Serverless Computing von
AWS and Serverless ComputingAWS and Serverless Computing
AWS and Serverless ComputingRoberto Casadei
231 views28 Folien

Más de Roberto Casadei(15)

Introduction to the 1st DISCOLI workshop on distributed collective intelligence von Roberto Casadei
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 Casadei14 views
6th eCAS workshop on Engineering Collective Adaptive Systems von Roberto Casadei
6th eCAS workshop on Engineering Collective Adaptive Systems6th eCAS workshop on Engineering Collective Adaptive Systems
6th eCAS workshop on Engineering Collective Adaptive Systems
Roberto Casadei73 views
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi... von Roberto Casadei
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...
Roberto Casadei45 views
Testing: an Introduction and Panorama von Roberto Casadei
Testing: an Introduction and PanoramaTesting: an Introduction and Panorama
Testing: an Introduction and Panorama
Roberto Casadei124 views
On Context-Orientation in Aggregate Programming von Roberto Casadei
On Context-Orientation in Aggregate ProgrammingOn Context-Orientation in Aggregate Programming
On Context-Orientation in Aggregate Programming
Roberto Casadei140 views
The Rust Programming Language: an Overview von Roberto Casadei
The Rust Programming Language: an OverviewThe Rust Programming Language: an Overview
The Rust Programming Language: an Overview
Roberto Casadei964 views
Akka Remoting and Clustering: an Introduction von Roberto Casadei
Akka Remoting and Clustering: an IntroductionAkka Remoting and Clustering: an Introduction
Akka Remoting and Clustering: an Introduction
Roberto Casadei442 views
Bridging the Pervasive Computing Gap: An Aggregate Perspective von Roberto Casadei
Bridging the Pervasive Computing Gap: An Aggregate PerspectiveBridging the Pervasive Computing Gap: An Aggregate Perspective
Bridging the Pervasive Computing Gap: An Aggregate Perspective
Roberto Casadei46 views
From Field-based Coordination to Aggregate Computing von Roberto Casadei
From Field-based Coordination to Aggregate ComputingFrom Field-based Coordination to Aggregate Computing
From Field-based Coordination to Aggregate Computing
Roberto Casadei245 views
Introduction to cloud-native application development: with Heroku and Spring ... von Roberto Casadei
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 ...
Roberto Casadei261 views
Aggregate Computing Platforms: Bridging the Gaps von Roberto Casadei
Aggregate Computing Platforms: Bridging the GapsAggregate Computing Platforms: Bridging the Gaps
Aggregate Computing Platforms: Bridging the Gaps
Roberto Casadei124 views

Último

Bacterial Reproduction.pdf von
Bacterial Reproduction.pdfBacterial Reproduction.pdf
Bacterial Reproduction.pdfNandadulalSannigrahi
35 views32 Folien
ZEBRA FISH: as model organism.pptx von
ZEBRA FISH: as model organism.pptxZEBRA FISH: as model organism.pptx
ZEBRA FISH: as model organism.pptxmahimachoudhary0807
12 views17 Folien
Effect of Integrated Nutrient Management on Growth and Yield of Solanaceous F... von
Effect of Integrated Nutrient Management on Growth and Yield of Solanaceous F...Effect of Integrated Nutrient Management on Growth and Yield of Solanaceous F...
Effect of Integrated Nutrient Management on Growth and Yield of Solanaceous F...SwagatBehera9
5 views36 Folien
IMMUNODIAGNOSTICS KITS.pdf von
IMMUNODIAGNOSTICS KITS.pdfIMMUNODIAGNOSTICS KITS.pdf
IMMUNODIAGNOSTICS KITS.pdfvetrivel303632
20 views10 Folien
Best Hybrid Event Platform.pptx von
Best Hybrid Event Platform.pptxBest Hybrid Event Platform.pptx
Best Hybrid Event Platform.pptxHarriet Davis
10 views13 Folien
DNA manipulation Enzymes 2.pdf von
DNA manipulation Enzymes 2.pdfDNA manipulation Enzymes 2.pdf
DNA manipulation Enzymes 2.pdfNetHelix
6 views42 Folien

Último(20)

Effect of Integrated Nutrient Management on Growth and Yield of Solanaceous F... von SwagatBehera9
Effect of Integrated Nutrient Management on Growth and Yield of Solanaceous F...Effect of Integrated Nutrient Management on Growth and Yield of Solanaceous F...
Effect of Integrated Nutrient Management on Growth and Yield of Solanaceous F...
SwagatBehera95 views
Best Hybrid Event Platform.pptx von Harriet Davis
Best Hybrid Event Platform.pptxBest Hybrid Event Platform.pptx
Best Hybrid Event Platform.pptx
Harriet Davis10 views
DNA manipulation Enzymes 2.pdf von NetHelix
DNA manipulation Enzymes 2.pdfDNA manipulation Enzymes 2.pdf
DNA manipulation Enzymes 2.pdf
NetHelix6 views
selection of preformed arch wires during the alignment stage of preadjusted o... von MaherFouda1
selection of preformed arch wires during the alignment stage of preadjusted o...selection of preformed arch wires during the alignment stage of preadjusted o...
selection of preformed arch wires during the alignment stage of preadjusted o...
MaherFouda17 views
Small ruminant keepers’ knowledge, attitudes and practices towards peste des ... von ILRI
Small ruminant keepers’ knowledge, attitudes and practices towards peste des ...Small ruminant keepers’ knowledge, attitudes and practices towards peste des ...
Small ruminant keepers’ knowledge, attitudes and practices towards peste des ...
ILRI6 views
Determination of color fastness to rubbing(wet and dry condition) by crockmeter. von ShadmanSakib63
Determination of color fastness to rubbing(wet and dry condition) by crockmeter.Determination of color fastness to rubbing(wet and dry condition) by crockmeter.
Determination of color fastness to rubbing(wet and dry condition) by crockmeter.
ShadmanSakib636 views
INTRODUCTION TO PLANT SYSTEMATICS.pptx von RASHMI M G
INTRODUCTION TO PLANT SYSTEMATICS.pptxINTRODUCTION TO PLANT SYSTEMATICS.pptx
INTRODUCTION TO PLANT SYSTEMATICS.pptx
RASHMI M G 5 views
Presentation on experimental laboratory animal- Hamster von Kanika13641
Presentation on experimental laboratory animal- HamsterPresentation on experimental laboratory animal- Hamster
Presentation on experimental laboratory animal- Hamster
Kanika136416 views
Note on the Riemann Hypothesis von vegafrank2
Note on the Riemann HypothesisNote on the Riemann Hypothesis
Note on the Riemann Hypothesis
vegafrank28 views
Vegetable grafting: A new crop improvement approach.pptx von Himul Suthar
Vegetable grafting: A new crop improvement approach.pptxVegetable grafting: A new crop improvement approach.pptx
Vegetable grafting: A new crop improvement approach.pptx
Himul Suthar8 views
2. Natural Sciences and Technology Author Siyavula.pdf von ssuser821efa
2. Natural Sciences and Technology Author Siyavula.pdf2. Natural Sciences and Technology Author Siyavula.pdf
2. Natural Sciences and Technology Author Siyavula.pdf
ssuser821efa12 views
Ellagic Acid and Its Metabolites as Potent and Selective Allosteric Inhibitor... von Trustlife
Ellagic Acid and Its Metabolites as Potent and Selective Allosteric Inhibitor...Ellagic Acid and Its Metabolites as Potent and Selective Allosteric Inhibitor...
Ellagic Acid and Its Metabolites as Potent and Selective Allosteric Inhibitor...
Trustlife154 views

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