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

Roberto Casadei
Roberto CasadeiPhD Student in CS&Eng @ Unibo
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 de 35

Recomendados

Programming Distributed Collective Processes for Dynamic Ensembles and Collec... por
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 vistas37 diapositivas
Towards Automated Engineering for Collective Adaptive Systems: Vision and Res... por
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 vistas18 diapositivas
Aggregate Computing Research: an Overview por
Aggregate Computing Research: an OverviewAggregate Computing Research: an Overview
Aggregate Computing Research: an OverviewRoberto Casadei
11 vistas34 diapositivas
Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P... por
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 vistas36 diapositivas
Scafi: Scala with Computational Fields por
Scafi: Scala with Computational FieldsScafi: Scala with Computational Fields
Scafi: Scala with Computational FieldsRoberto Casadei
131 vistas73 diapositivas
Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac... por
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 vistas20 diapositivas

Más contenido relacionado

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

Practical Aggregate Programming in Scala por
Practical Aggregate Programming in ScalaPractical Aggregate Programming in Scala
Practical Aggregate Programming in ScalaRoberto Casadei
1.1K vistas34 diapositivas
Augmented Collective Digital Twins for Self-Organising Cyber-Physical Systems por
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 vistas25 diapositivas
A Presentation of My Research Activity por
A Presentation of My Research ActivityA Presentation of My Research Activity
A Presentation of My Research ActivityRoberto Casadei
20 vistas60 diapositivas
On Execution Platforms for Large-Scale Aggregate Computing por
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 vistas53 diapositivas
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati... por
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 vistas50 diapositivas
Tuple-Based Coordination in Large-Scale Situated Systems por
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 vistas19 diapositivas

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

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

Más de Roberto Casadei

Introduction to the 1st DISCOLI workshop on distributed collective intelligence por
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 vistas6 diapositivas
6th eCAS workshop on Engineering Collective Adaptive Systems por
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 vistas8 diapositivas
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi... por
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 vistas17 diapositivas
Testing: an Introduction and Panorama por
Testing: an Introduction and PanoramaTesting: an Introduction and Panorama
Testing: an Introduction and PanoramaRoberto Casadei
124 vistas28 diapositivas
On Context-Orientation in Aggregate Programming por
On Context-Orientation in Aggregate ProgrammingOn Context-Orientation in Aggregate Programming
On Context-Orientation in Aggregate ProgrammingRoberto Casadei
140 vistas48 diapositivas
AWS and Serverless Computing por
AWS and Serverless ComputingAWS and Serverless Computing
AWS and Serverless ComputingRoberto Casadei
231 vistas28 diapositivas

Más de Roberto Casadei(15)

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

Último

A Ready-to-Analyze High-Plex Spatial Signature Development Workflow for Cance... por
A Ready-to-Analyze High-Plex Spatial Signature Development Workflow for Cance...A Ready-to-Analyze High-Plex Spatial Signature Development Workflow for Cance...
A Ready-to-Analyze High-Plex Spatial Signature Development Workflow for Cance...InsideScientific
49 vistas62 diapositivas
Experimental animal Guinea pigs.pptx por
Experimental animal Guinea pigs.pptxExperimental animal Guinea pigs.pptx
Experimental animal Guinea pigs.pptxMansee Arya
15 vistas16 diapositivas
Ecology por
Ecology Ecology
Ecology Abhijith Raj.R
7 vistas10 diapositivas
How to be(come) a successful PhD student por
How to be(come) a successful PhD studentHow to be(come) a successful PhD student
How to be(come) a successful PhD studentTom Mens
473 vistas62 diapositivas
1978 NASA News Release Log por
1978 NASA News Release Log1978 NASA News Release Log
1978 NASA News Release Logpurrterminator
9 vistas146 diapositivas
RemeOs science and clinical evidence por
RemeOs science and clinical evidenceRemeOs science and clinical evidence
RemeOs science and clinical evidencePetrusViitanen1
36 vistas96 diapositivas

Último(20)

A Ready-to-Analyze High-Plex Spatial Signature Development Workflow for Cance... por InsideScientific
A Ready-to-Analyze High-Plex Spatial Signature Development Workflow for Cance...A Ready-to-Analyze High-Plex Spatial Signature Development Workflow for Cance...
A Ready-to-Analyze High-Plex Spatial Signature Development Workflow for Cance...
InsideScientific49 vistas
Experimental animal Guinea pigs.pptx por Mansee Arya
Experimental animal Guinea pigs.pptxExperimental animal Guinea pigs.pptx
Experimental animal Guinea pigs.pptx
Mansee Arya15 vistas
How to be(come) a successful PhD student por Tom Mens
How to be(come) a successful PhD studentHow to be(come) a successful PhD student
How to be(come) a successful PhD student
Tom Mens473 vistas
RemeOs science and clinical evidence por PetrusViitanen1
RemeOs science and clinical evidenceRemeOs science and clinical evidence
RemeOs science and clinical evidence
PetrusViitanen136 vistas
MODULE-9-Biotechnology, Genetically Modified Organisms, and Gene Therapy.pdf por KerryNuez1
MODULE-9-Biotechnology, Genetically Modified Organisms, and Gene Therapy.pdfMODULE-9-Biotechnology, Genetically Modified Organisms, and Gene Therapy.pdf
MODULE-9-Biotechnology, Genetically Modified Organisms, and Gene Therapy.pdf
KerryNuez124 vistas
PRINCIPLES-OF ASSESSMENT por rbalmagro
PRINCIPLES-OF ASSESSMENTPRINCIPLES-OF ASSESSMENT
PRINCIPLES-OF ASSESSMENT
rbalmagro12 vistas
application of genetic engineering 2.pptx por SankSurezz
application of genetic engineering 2.pptxapplication of genetic engineering 2.pptx
application of genetic engineering 2.pptx
SankSurezz9 vistas
Guinea Pig as a Model for Translation Research por PervaizDar1
Guinea Pig as a Model for Translation ResearchGuinea Pig as a Model for Translation Research
Guinea Pig as a Model for Translation Research
PervaizDar111 vistas
Conventional and non-conventional methods for improvement of cucurbits.pptx por gandhi976
Conventional and non-conventional methods for improvement of cucurbits.pptxConventional and non-conventional methods for improvement of cucurbits.pptx
Conventional and non-conventional methods for improvement of cucurbits.pptx
gandhi97618 vistas
Open Access Publishing in Astrophysics por Peter Coles
Open Access Publishing in AstrophysicsOpen Access Publishing in Astrophysics
Open Access Publishing in Astrophysics
Peter Coles808 vistas
ENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptx por MN
ENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptxENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptx
ENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptx
MN7 vistas

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