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

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

Recommandé

Programming Distributed Collective Processes for Dynamic Ensembles and Collec... par
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 vues37 diapositives
Towards Automated Engineering for Collective Adaptive Systems: Vision and Res... par
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 vues18 diapositives
Aggregate Computing Research: an Overview par
Aggregate Computing Research: an OverviewAggregate Computing Research: an Overview
Aggregate Computing Research: an OverviewRoberto Casadei
11 vues34 diapositives
Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P... par
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 vues36 diapositives
Scafi: Scala with Computational Fields par
Scafi: Scala with Computational FieldsScafi: Scala with Computational Fields
Scafi: Scala with Computational FieldsRoberto Casadei
131 vues73 diapositives
Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac... par
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 vues20 diapositives

Contenu connexe

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

Practical Aggregate Programming in Scala par
Practical Aggregate Programming in ScalaPractical Aggregate Programming in Scala
Practical Aggregate Programming in ScalaRoberto Casadei
1.1K vues34 diapositives
Augmented Collective Digital Twins for Self-Organising Cyber-Physical Systems par
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 vues25 diapositives
A Presentation of My Research Activity par
A Presentation of My Research ActivityA Presentation of My Research Activity
A Presentation of My Research ActivityRoberto Casadei
19 vues60 diapositives
On Execution Platforms for Large-Scale Aggregate Computing par
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 vues53 diapositives
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati... par
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 vues50 diapositives
Tuple-Based Coordination in Large-Scale Situated Systems par
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 vues19 diapositives

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

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

Plus de Roberto Casadei

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

Plus de Roberto Casadei(15)

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

Dernier

CSF -SHEEBA.D presentation.pptx par
CSF -SHEEBA.D presentation.pptxCSF -SHEEBA.D presentation.pptx
CSF -SHEEBA.D presentation.pptxSheebaD7
10 vues13 diapositives
Workshop Chemical Robotics ChemAI 231116.pptx par
Workshop Chemical Robotics ChemAI 231116.pptxWorkshop Chemical Robotics ChemAI 231116.pptx
Workshop Chemical Robotics ChemAI 231116.pptxMarco Tibaldi
90 vues41 diapositives
Batrachospermum.pptx par
Batrachospermum.pptxBatrachospermum.pptx
Batrachospermum.pptxnisarahmad632316
20 vues37 diapositives
Metatheoretical Panda-Samaneh Borji.pdf par
Metatheoretical Panda-Samaneh Borji.pdfMetatheoretical Panda-Samaneh Borji.pdf
Metatheoretical Panda-Samaneh Borji.pdfsamanehborji
16 vues29 diapositives
Pollination By Nagapradheesh.M.pptx par
Pollination By Nagapradheesh.M.pptxPollination By Nagapradheesh.M.pptx
Pollination By Nagapradheesh.M.pptxMNAGAPRADHEESH
12 vues9 diapositives
MODULE-9-Biotechnology, Genetically Modified Organisms, and Gene Therapy.pdf par
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.pdfKerryNuez1
19 vues5 diapositives

Dernier(20)

CSF -SHEEBA.D presentation.pptx par SheebaD7
CSF -SHEEBA.D presentation.pptxCSF -SHEEBA.D presentation.pptx
CSF -SHEEBA.D presentation.pptx
SheebaD710 vues
Workshop Chemical Robotics ChemAI 231116.pptx par Marco Tibaldi
Workshop Chemical Robotics ChemAI 231116.pptxWorkshop Chemical Robotics ChemAI 231116.pptx
Workshop Chemical Robotics ChemAI 231116.pptx
Marco Tibaldi90 vues
Metatheoretical Panda-Samaneh Borji.pdf par samanehborji
Metatheoretical Panda-Samaneh Borji.pdfMetatheoretical Panda-Samaneh Borji.pdf
Metatheoretical Panda-Samaneh Borji.pdf
samanehborji16 vues
MODULE-9-Biotechnology, Genetically Modified Organisms, and Gene Therapy.pdf par 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
KerryNuez119 vues
domestic waste_100013.pptx par padmasriv25
domestic waste_100013.pptxdomestic waste_100013.pptx
domestic waste_100013.pptx
padmasriv2510 vues
ENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptx par MN
ENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptxENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptx
ENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptx
MN6 vues
Women in the Workplace Industry Insights for Life Sciences par workplacesurvey
Women in the Workplace Industry Insights for Life SciencesWomen in the Workplace Industry Insights for Life Sciences
Women in the Workplace Industry Insights for Life Sciences
MSC III_Advance Forensic Serology_Final.pptx par Suchita Rawat
MSC III_Advance Forensic Serology_Final.pptxMSC III_Advance Forensic Serology_Final.pptx
MSC III_Advance Forensic Serology_Final.pptx
Suchita Rawat10 vues
Matthias Beller ChemAI 231116.pptx par Marco Tibaldi
Matthias Beller ChemAI 231116.pptxMatthias Beller ChemAI 231116.pptx
Matthias Beller ChemAI 231116.pptx
Marco Tibaldi82 vues
Distinct distributions of elliptical and disk galaxies across the Local Super... par Sérgio Sacani
Distinct distributions of elliptical and disk galaxies across the Local Super...Distinct distributions of elliptical and disk galaxies across the Local Super...
Distinct distributions of elliptical and disk galaxies across the Local Super...
Sérgio Sacani30 vues
Open Access Publishing in Astrophysics par Peter Coles
Open Access Publishing in AstrophysicsOpen Access Publishing in Astrophysics
Open Access Publishing in Astrophysics
Peter Coles380 vues
EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN... par gynomark
EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN...EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN...
EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN...
gynomark9 vues
Artificial Intelligence Helps in Drug Designing and Discovery.pptx par abhinashsahoo2001
Artificial Intelligence Helps in Drug Designing and Discovery.pptxArtificial Intelligence Helps in Drug Designing and Discovery.pptx
Artificial Intelligence Helps in Drug Designing and Discovery.pptx

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