SlideShare a Scribd company logo
1 of 37
Download to read offline
FScaFi: A Core Calculus for Collective Adaptive
Systems Programming
Roberto Casadei1
, Mirko Viroli1
, Giorgio Audrito2
, Ferruccio Damiani2
1
ALMA MATER STUDIORUM–Università di Bologna, Cesena, Italy
2
Università di Torino, Turin, Italy
Rhodes, Greece
Talk @
ISoLA 2021
10th International Symposium on Leveraging Applications of Formal Methods,
Verification and Validation
Rigorous Engineering of Collective Adaptive Systems (REoCAS) Track
Outline
1 Background & Motivation
2 Contribution
3 Examples & More
4 Conclusion
Collective adaptive systems (CAS) programming
Focus: collectives and their global behaviour
∠ collective: a collection of individuals entities (members) held together by some “shared plan”
[1] R. Casadei, M. Viroli, G. Audrito, D. Pianini, and F. Damiani, “Engineering collective intelligence at the edge with aggregate processes,” Eng. Appl. Artif. Intell.,
2021
[2] T. D. Wolf and T. Holvoet, “Designing self-organising emergent systems based on information flows and feedback-loops,” in Proceedings of the First International
Conference on Self-Adaptive and Self-Organizing Systems, SASO 2007, Boston, MA, USA, July 9-11, 2007, IEEE Computer Society, 2007
[3] G. Audrito, R. Casadei, F. Damiani, and M. Viroli, “Compositional blocks for optimal self-healing gradients,” in 11th IEEE International Conference on Self-Adaptive
and Self-Organizing Systems, SASO 2017, Tucson, AZ, USA, September 18-22, 2017, IEEE Computer Society, 2017
R.Casadei Background & Motivation Contribution Examples & More Conclusion References 1/21
Collective adaptive systems (CAS) programming
Focus: collectives and their global behaviour
∠ collective: a collection of individuals entities (members) held together by some “shared plan”
Recurrent abstractions
∠ Ensembles & collective tasks [1]
∠ Self-organising information flows [2]
∠ Self-healing collective structures (e.g., gradients) [3]
[1] R. Casadei, M. Viroli, G. Audrito, D. Pianini, and F. Damiani, “Engineering collective intelligence at the edge with aggregate processes,” Eng. Appl. Artif. Intell.,
2021
[2] T. D. Wolf and T. Holvoet, “Designing self-organising emergent systems based on information flows and feedback-loops,” in Proceedings of the First International
Conference on Self-Adaptive and Self-Organizing Systems, SASO 2007, Boston, MA, USA, July 9-11, 2007, IEEE Computer Society, 2007
[3] G. Audrito, R. Casadei, F. Damiani, and M. Viroli, “Compositional blocks for optimal self-healing gradients,” in 11th IEEE International Conference on Self-Adaptive
and Self-Organizing Systems, SASO 2017, Tucson, AZ, USA, September 18-22, 2017, IEEE Computer Society, 2017
R.Casadei Background & Motivation Contribution Examples & More Conclusion References 1/21
Aggregate Computing (AC) paradigm for CAS [4]
“Self-organisation-like” computational/programming model
interaction: continuous communication with neighbours only (→ decentralisation)
behaviour: continuous execution of async rounds of sense – compute – (inter)act
[4] M. Viroli, J. Beal, F. Damiani, G. Audrito, R. Casadei, and D. Pianini, “From distributed coordination to field calculus and aggregate computing,” Journal of Logical
and Algebraic Methods in Programming, 2019
R.Casadei Background & Motivation Contribution Examples & More Conclusion References 2/21
Aggregate Computing (AC) paradigm for CAS [4]
“Self-organisation-like” computational/programming model
interaction: continuous communication with neighbours only (→ decentralisation)
behaviour: continuous execution of async rounds of sense – compute – (inter)act
abstraction: computational fields ( → field calculus)
paradigm: functional, macroprogramming
∠ an “aggregate program” as a “shared plan” expressed as composition of “collective behaviours”
neighborhood
device
source destination
gradient distance
gradient
<=
+
dilate
width
37
10
[4] M. Viroli, J. Beal, F. Damiani, G. Audrito, R. Casadei, and D. Pianini, “From distributed coordination to field calculus and aggregate computing,” Journal of Logical
and Algebraic Methods in Programming, 2019
R.Casadei Background & Motivation Contribution Examples & More Conclusion References 2/21
Aggregate programming as internal DSL
Problem: embedding aggregate programming into mainstream PLs
Namely, providing an implementation of the higher-order field calculus (HFC)
Previous languages were standalone DSLs (e.g., Protelis)
R.Casadei Background & Motivation Contribution Examples & More Conclusion References 3/21
Aggregate programming as internal DSL
Problem: embedding aggregate programming into mainstream PLs
Namely, providing an implementation of the higher-order field calculus (HFC)
Previous languages were standalone DSLs (e.g., Protelis)
Embedding as an internal DSL has benefits
- easier to implement, typically (assuming host PL is suitable)
- easier integration with host PL (and corresponding platform)
- more reuse—cf. knowledge (syntax, typing) and access to general purpose features/toolchains
, less flexibility (cf. syntactic/semantic constraints)
R.Casadei Background & Motivation Contribution Examples & More Conclusion References 3/21
Outline
1 Background & Motivation
2 Contribution
3 Examples & More
4 Conclusion
ScaFi & FScaFi
e We worked on an open-source Scala impl inspired by HFC
R.Casadei Background & Motivation Contribution Examples & More Conclusion References 4/21
ScaFi & FScaFi
e We worked on an open-source Scala impl inspired by HFC
ú ScaFi (Scala Fields) DSL
ú a variant calculus: FScaFi (Featherweight ScaFi)
R.Casadei Background & Motivation Contribution Examples & More Conclusion References 4/21
ScaFi & FScaFi
e We worked on an open-source Scala impl inspired by HFC
ú ScaFi (Scala Fields) DSL
ú a variant calculus: FScaFi (Featherweight ScaFi)
other tools (simulator, runtime etc.) provided to make ScaFi a comprehensive aggregate
programming toolkit: https://scafi.github.io
SCAFI-CORE
SPALA
(AC PLATFORM)
SCAFI-TESTS
AKKA-CORE AKKA-REMOTING
SCAFI-SIMULATOR
SCAFI-SIMULATOR-GUI
SCAFI-STDLIB-EXT
SCAFI-DISTRIBUTED
SCAFI-COMMONS
(space-time abstractions)
DEMOS
depends on
R.Casadei Background & Motivation Contribution Examples & More Conclusion References 4/21
Syntax
P ::= F e program
F ::= def d(x){e} function declaration
e ::= x
v
(x) => {e}
e(e)
expression
rep(e){e}
foldhood(e, e, e)
nbr{e}
v ::= c(v)
f value
f ::= b
d
(x) => {e} function value
R.Casadei Background & Motivation Contribution Examples & More Conclusion References 5/21
Syntax
P ::= F e program
F ::= def d(x){e} function declaration
e ::= x
v

More Related Content

What's hot

Recursive Autoencoders for Paraphrase Detection (Socher et al)
Recursive Autoencoders for Paraphrase Detection (Socher et al)Recursive Autoencoders for Paraphrase Detection (Socher et al)
Recursive Autoencoders for Paraphrase Detection (Socher et al)Feynman Liang
 
Topic model an introduction
Topic model an introductionTopic model an introduction
Topic model an introductionYueshen Xu
 
A Simple Introduction to Neural Information Retrieval
A Simple Introduction to Neural Information RetrievalA Simple Introduction to Neural Information Retrieval
A Simple Introduction to Neural Information RetrievalBhaskar Mitra
 
Deep Learning for Search
Deep Learning for SearchDeep Learning for Search
Deep Learning for SearchBhaskar Mitra
 
Adapt OWL as a Modular Ontology Language
Adapt OWL as a Modular Ontology LanguageAdapt OWL as a Modular Ontology Language
Adapt OWL as a Modular Ontology LanguageJie Bao
 
Representing and Reasoning with Modular Ontologies
Representing and Reasoning with Modular OntologiesRepresenting and Reasoning with Modular Ontologies
Representing and Reasoning with Modular OntologiesJie Bao
 
Latent Dirichlet Allocation
Latent Dirichlet AllocationLatent Dirichlet Allocation
Latent Dirichlet AllocationMarco Righini
 
Topic model, LDA and all that
Topic model, LDA and all thatTopic model, LDA and all that
Topic model, LDA and all thatZhibo Xiao
 
Deep Neural Methods for Retrieval
Deep Neural Methods for RetrievalDeep Neural Methods for Retrieval
Deep Neural Methods for RetrievalBhaskar Mitra
 
Sequence to sequence (encoder-decoder) learning
Sequence to sequence (encoder-decoder) learningSequence to sequence (encoder-decoder) learning
Sequence to sequence (encoder-decoder) learningRoberto Pereira Silveira
 
Neural Models for Information Retrieval
Neural Models for Information RetrievalNeural Models for Information Retrieval
Neural Models for Information RetrievalBhaskar Mitra
 
EDBT 12 - Top-k interesting phrase mining in ad-hoc collections using sequenc...
EDBT 12 - Top-k interesting phrase mining in ad-hoc collections using sequenc...EDBT 12 - Top-k interesting phrase mining in ad-hoc collections using sequenc...
EDBT 12 - Top-k interesting phrase mining in ad-hoc collections using sequenc...Chuancong Gao
 
Neural Models for Information Retrieval
Neural Models for Information RetrievalNeural Models for Information Retrieval
Neural Models for Information RetrievalBhaskar Mitra
 
TopicModels_BleiPaper_Summary.pptx
TopicModels_BleiPaper_Summary.pptxTopicModels_BleiPaper_Summary.pptx
TopicModels_BleiPaper_Summary.pptxKalpit Desai
 
Neural Models for Document Ranking
Neural Models for Document RankingNeural Models for Document Ranking
Neural Models for Document RankingBhaskar Mitra
 
Neural Information Retrieval: In search of meaningful progress
Neural Information Retrieval: In search of meaningful progressNeural Information Retrieval: In search of meaningful progress
Neural Information Retrieval: In search of meaningful progressBhaskar Mitra
 
Package-based Description Logics – Preliminary Results
Package-based Description Logics – Preliminary ResultsPackage-based Description Logics – Preliminary Results
Package-based Description Logics – Preliminary ResultsJie Bao
 
Modeling documents with Generative Adversarial Networks - John Glover
Modeling documents with Generative Adversarial Networks - John GloverModeling documents with Generative Adversarial Networks - John Glover
Modeling documents with Generative Adversarial Networks - John GloverSebastian Ruder
 
Conformer-Kernel with Query Term Independence @ TREC 2020 Deep Learning Track
Conformer-Kernel with Query Term Independence @ TREC 2020 Deep Learning TrackConformer-Kernel with Query Term Independence @ TREC 2020 Deep Learning Track
Conformer-Kernel with Query Term Independence @ TREC 2020 Deep Learning TrackBhaskar Mitra
 

What's hot (20)

Recursive Autoencoders for Paraphrase Detection (Socher et al)
Recursive Autoencoders for Paraphrase Detection (Socher et al)Recursive Autoencoders for Paraphrase Detection (Socher et al)
Recursive Autoencoders for Paraphrase Detection (Socher et al)
 
Topic model an introduction
Topic model an introductionTopic model an introduction
Topic model an introduction
 
A Simple Introduction to Neural Information Retrieval
A Simple Introduction to Neural Information RetrievalA Simple Introduction to Neural Information Retrieval
A Simple Introduction to Neural Information Retrieval
 
Deep Learning for Search
Deep Learning for SearchDeep Learning for Search
Deep Learning for Search
 
Adapt OWL as a Modular Ontology Language
Adapt OWL as a Modular Ontology LanguageAdapt OWL as a Modular Ontology Language
Adapt OWL as a Modular Ontology Language
 
Representing and Reasoning with Modular Ontologies
Representing and Reasoning with Modular OntologiesRepresenting and Reasoning with Modular Ontologies
Representing and Reasoning with Modular Ontologies
 
Latent Dirichlet Allocation
Latent Dirichlet AllocationLatent Dirichlet Allocation
Latent Dirichlet Allocation
 
Topic model, LDA and all that
Topic model, LDA and all thatTopic model, LDA and all that
Topic model, LDA and all that
 
Deep Neural Methods for Retrieval
Deep Neural Methods for RetrievalDeep Neural Methods for Retrieval
Deep Neural Methods for Retrieval
 
Topics Modeling
Topics ModelingTopics Modeling
Topics Modeling
 
Sequence to sequence (encoder-decoder) learning
Sequence to sequence (encoder-decoder) learningSequence to sequence (encoder-decoder) learning
Sequence to sequence (encoder-decoder) learning
 
Neural Models for Information Retrieval
Neural Models for Information RetrievalNeural Models for Information Retrieval
Neural Models for Information Retrieval
 
EDBT 12 - Top-k interesting phrase mining in ad-hoc collections using sequenc...
EDBT 12 - Top-k interesting phrase mining in ad-hoc collections using sequenc...EDBT 12 - Top-k interesting phrase mining in ad-hoc collections using sequenc...
EDBT 12 - Top-k interesting phrase mining in ad-hoc collections using sequenc...
 
Neural Models for Information Retrieval
Neural Models for Information RetrievalNeural Models for Information Retrieval
Neural Models for Information Retrieval
 
TopicModels_BleiPaper_Summary.pptx
TopicModels_BleiPaper_Summary.pptxTopicModels_BleiPaper_Summary.pptx
TopicModels_BleiPaper_Summary.pptx
 
Neural Models for Document Ranking
Neural Models for Document RankingNeural Models for Document Ranking
Neural Models for Document Ranking
 
Neural Information Retrieval: In search of meaningful progress
Neural Information Retrieval: In search of meaningful progressNeural Information Retrieval: In search of meaningful progress
Neural Information Retrieval: In search of meaningful progress
 
Package-based Description Logics – Preliminary Results
Package-based Description Logics – Preliminary ResultsPackage-based Description Logics – Preliminary Results
Package-based Description Logics – Preliminary Results
 
Modeling documents with Generative Adversarial Networks - John Glover
Modeling documents with Generative Adversarial Networks - John GloverModeling documents with Generative Adversarial Networks - John Glover
Modeling documents with Generative Adversarial Networks - John Glover
 
Conformer-Kernel with Query Term Independence @ TREC 2020 Deep Learning Track
Conformer-Kernel with Query Term Independence @ TREC 2020 Deep Learning TrackConformer-Kernel with Query Term Independence @ TREC 2020 Deep Learning Track
Conformer-Kernel with Query Term Independence @ TREC 2020 Deep Learning Track
 

Similar to FScaFi: A Core Calculus for Collective Adaptive Systems Programming

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...
Towards Automated Engineering for Collective Adaptive Systems: Vision and Res...Roberto Casadei
 
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...
Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P...Roberto Casadei
 
Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...
Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...
Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...Roberto Casadei
 
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...
Programming Distributed Collective Processes for Dynamic Ensembles and Collec...Roberto Casadei
 
Augmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
Augmented Collective Digital Twins for Self-Organising Cyber-Physical SystemsAugmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
Augmented Collective Digital Twins for Self-Organising Cyber-Physical SystemsRoberto Casadei
 
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...
Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac...Roberto Casadei
 
Aggregate Computing Research: an Overview
Aggregate Computing Research: an OverviewAggregate Computing Research: an Overview
Aggregate Computing Research: an OverviewRoberto Casadei
 
A Presentation of My Research Activity
A Presentation of My Research ActivityA Presentation of My Research Activity
A Presentation of My Research ActivityRoberto 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...
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...Roberto Casadei
 
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoTCollective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoTRoberto Casadei
 
Tuple-Based Coordination in Large-Scale Situated Systems
Tuple-Based Coordination in Large-Scale Situated SystemsTuple-Based Coordination in Large-Scale Situated Systems
Tuple-Based Coordination in Large-Scale Situated SystemsRoberto Casadei
 
On Context-Orientation in Aggregate Programming
On Context-Orientation in Aggregate ProgrammingOn Context-Orientation in Aggregate Programming
On Context-Orientation in Aggregate ProgrammingRoberto Casadei
 
Dedalo, looking for Cluster Explanations in a labyrinth of Linked Data
Dedalo, looking for Cluster Explanations in a labyrinth of Linked DataDedalo, looking for Cluster Explanations in a labyrinth of Linked Data
Dedalo, looking for Cluster Explanations in a labyrinth of Linked DataVrije Universiteit Amsterdam
 
Building data fusion surrogate models for spacecraft aerodynamic problems wit...
Building data fusion surrogate models for spacecraft aerodynamic problems wit...Building data fusion surrogate models for spacecraft aerodynamic problems wit...
Building data fusion surrogate models for spacecraft aerodynamic problems wit...Shinwoo Jang
 
A Programming Framework for Collective Adaptive Ecosystems
A Programming Framework for Collective Adaptive EcosystemsA Programming Framework for Collective Adaptive Ecosystems
A Programming Framework for Collective Adaptive EcosystemsRoberto Casadei
 
Engineering Resilient Collaborative Edge-enabled IoT
Engineering Resilient Collaborative Edge-enabled IoTEngineering Resilient Collaborative Edge-enabled IoT
Engineering Resilient Collaborative Edge-enabled IoTRoberto Casadei
 
EDBT 2015: Summer School Overview
EDBT 2015: Summer School OverviewEDBT 2015: Summer School Overview
EDBT 2015: Summer School Overviewdgarijo
 
3rd 3DDRESD: DRESD Future Plan 0809
3rd 3DDRESD: DRESD Future Plan 08093rd 3DDRESD: DRESD Future Plan 0809
3rd 3DDRESD: DRESD Future Plan 0809Marco Santambrogio
 
Coates p: the use of genetic programing in exploring 3 d design worlds
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 worldsArchiLab 7
 

Similar to FScaFi: A Core Calculus for Collective Adaptive Systems Programming (20)

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...
Towards Automated Engineering for Collective Adaptive Systems: Vision and Res...
 
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...
Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-P...
 
Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...
Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...
Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...
 
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...
Programming Distributed Collective Processes for Dynamic Ensembles and Collec...
 
Augmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
Augmented Collective Digital Twins for Self-Organising Cyber-Physical SystemsAugmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
Augmented Collective Digital Twins for Self-Organising Cyber-Physical Systems
 
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...
Collective Adaptive Systems as Coordination Media: The Case of Tuples in Spac...
 
Aggregate Computing Research: an Overview
Aggregate Computing Research: an OverviewAggregate Computing Research: an Overview
Aggregate Computing Research: an Overview
 
A Presentation of My Research Activity
A Presentation of My Research ActivityA Presentation of My Research Activity
A Presentation of My Research Activity
 
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...
Coordinating Computation at the Edge: a Decentralized, Self-organizing, Spati...
 
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoTCollective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
Collective Abstractions and Platforms for Large-Scale Self-Adaptive IoT
 
Tuple-Based Coordination in Large-Scale Situated Systems
Tuple-Based Coordination in Large-Scale Situated SystemsTuple-Based Coordination in Large-Scale Situated Systems
Tuple-Based Coordination in Large-Scale Situated Systems
 
On Context-Orientation in Aggregate Programming
On Context-Orientation in Aggregate ProgrammingOn Context-Orientation in Aggregate Programming
On Context-Orientation in Aggregate Programming
 
Dedalo, looking for Cluster Explanations in a labyrinth of Linked Data
Dedalo, looking for Cluster Explanations in a labyrinth of Linked DataDedalo, looking for Cluster Explanations in a labyrinth of Linked Data
Dedalo, looking for Cluster Explanations in a labyrinth of Linked Data
 
Building data fusion surrogate models for spacecraft aerodynamic problems wit...
Building data fusion surrogate models for spacecraft aerodynamic problems wit...Building data fusion surrogate models for spacecraft aerodynamic problems wit...
Building data fusion surrogate models for spacecraft aerodynamic problems wit...
 
HalifaxNGGs
HalifaxNGGsHalifaxNGGs
HalifaxNGGs
 
A Programming Framework for Collective Adaptive Ecosystems
A Programming Framework for Collective Adaptive EcosystemsA Programming Framework for Collective Adaptive Ecosystems
A Programming Framework for Collective Adaptive Ecosystems
 
Engineering Resilient Collaborative Edge-enabled IoT
Engineering Resilient Collaborative Edge-enabled IoTEngineering Resilient Collaborative Edge-enabled IoT
Engineering Resilient Collaborative Edge-enabled IoT
 
EDBT 2015: Summer School Overview
EDBT 2015: Summer School OverviewEDBT 2015: Summer School Overview
EDBT 2015: Summer School Overview
 
3rd 3DDRESD: DRESD Future Plan 0809
3rd 3DDRESD: DRESD Future Plan 08093rd 3DDRESD: DRESD Future Plan 0809
3rd 3DDRESD: DRESD Future Plan 0809
 
Coates p: the use of genetic programing in exploring 3 d design worlds
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
 

More from Roberto Casadei

Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...
Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...
Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...Roberto Casadei
 
Introduction to the 1st DISCOLI workshop on distributed collective intelligence
Introduction to the 1st DISCOLI workshop on distributed collective intelligenceIntroduction to the 1st DISCOLI workshop on distributed collective intelligence
Introduction to the 1st DISCOLI workshop on distributed collective intelligenceRoberto Casadei
 
6th eCAS workshop on Engineering Collective Adaptive Systems
6th eCAS workshop on Engineering Collective Adaptive Systems6th eCAS workshop on Engineering Collective Adaptive Systems
6th eCAS workshop on Engineering Collective Adaptive SystemsRoberto 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...
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...Roberto Casadei
 
Testing: an Introduction and Panorama
Testing: an Introduction and PanoramaTesting: an Introduction and Panorama
Testing: an Introduction and PanoramaRoberto Casadei
 
Aggregate Processes in Field Calculus
Aggregate Processes in Field CalculusAggregate Processes in Field Calculus
Aggregate Processes in Field CalculusRoberto Casadei
 
AWS and Serverless Computing
AWS and Serverless ComputingAWS and Serverless Computing
AWS and Serverless ComputingRoberto Casadei
 
The Rust Programming Language: an Overview
The Rust Programming Language: an OverviewThe Rust Programming Language: an Overview
The Rust Programming Language: an OverviewRoberto Casadei
 
Akka Remoting and Clustering: an Introduction
Akka Remoting and Clustering: an IntroductionAkka Remoting and Clustering: an Introduction
Akka Remoting and Clustering: an IntroductionRoberto Casadei
 
Akka Actors: an Introduction
Akka Actors: an IntroductionAkka Actors: an Introduction
Akka Actors: an IntroductionRoberto Casadei
 
Bridging the Pervasive Computing Gap: An Aggregate Perspective
Bridging the Pervasive Computing Gap: An Aggregate PerspectiveBridging the Pervasive Computing Gap: An Aggregate Perspective
Bridging the Pervasive Computing Gap: An Aggregate PerspectiveRoberto Casadei
 
From Field-based Coordination to Aggregate Computing
From Field-based Coordination to Aggregate ComputingFrom Field-based Coordination to Aggregate Computing
From Field-based Coordination to Aggregate ComputingRoberto Casadei
 
Spring Boot: a Quick Introduction
Spring Boot: a Quick IntroductionSpring Boot: a Quick Introduction
Spring Boot: a Quick IntroductionRoberto 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 ...
Introduction to cloud-native application development: with Heroku and Spring ...Roberto Casadei
 
Scafi: Scala with Computational Fields
Scafi: Scala with Computational FieldsScafi: Scala with Computational Fields
Scafi: Scala with Computational FieldsRoberto Casadei
 

More from Roberto Casadei (16)

Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...
Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...
Programming (and Learning) Self-Adaptive & Self-Organising Behaviour with Sca...
 
Introduction to the 1st DISCOLI workshop on distributed collective intelligence
Introduction to the 1st DISCOLI workshop on distributed collective intelligenceIntroduction to the 1st DISCOLI workshop on distributed collective intelligence
Introduction to the 1st DISCOLI workshop on distributed collective intelligence
 
6th eCAS workshop on Engineering Collective Adaptive Systems
6th eCAS workshop on Engineering Collective Adaptive Systems6th eCAS workshop on Engineering Collective Adaptive Systems
6th eCAS workshop on Engineering Collective Adaptive Systems
 
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...
Pulverisation in Cyber-Physical Systems: Engineering the Self-Organising Logi...
 
Testing: an Introduction and Panorama
Testing: an Introduction and PanoramaTesting: an Introduction and Panorama
Testing: an Introduction and Panorama
 
Aggregate Processes in Field Calculus
Aggregate Processes in Field CalculusAggregate Processes in Field Calculus
Aggregate Processes in Field Calculus
 
AWS and Serverless Computing
AWS and Serverless ComputingAWS and Serverless Computing
AWS and Serverless Computing
 
The Rust Programming Language: an Overview
The Rust Programming Language: an OverviewThe Rust Programming Language: an Overview
The Rust Programming Language: an Overview
 
Akka Remoting and Clustering: an Introduction
Akka Remoting and Clustering: an IntroductionAkka Remoting and Clustering: an Introduction
Akka Remoting and Clustering: an Introduction
 
Akka Actors: an Introduction
Akka Actors: an IntroductionAkka Actors: an Introduction
Akka Actors: an Introduction
 
Bridging the Pervasive Computing Gap: An Aggregate Perspective
Bridging the Pervasive Computing Gap: An Aggregate PerspectiveBridging the Pervasive Computing Gap: An Aggregate Perspective
Bridging the Pervasive Computing Gap: An Aggregate Perspective
 
From Field-based Coordination to Aggregate Computing
From Field-based Coordination to Aggregate ComputingFrom Field-based Coordination to Aggregate Computing
From Field-based Coordination to Aggregate Computing
 
NodeJS: an Introduction
NodeJS: an IntroductionNodeJS: an Introduction
NodeJS: an Introduction
 
Spring Boot: a Quick Introduction
Spring Boot: a Quick IntroductionSpring Boot: a Quick Introduction
Spring Boot: a Quick Introduction
 
Introduction to cloud-native application development: with Heroku and Spring ...
Introduction to cloud-native application development: with Heroku and Spring ...Introduction to cloud-native application development: with Heroku and Spring ...
Introduction to cloud-native application development: with Heroku and Spring ...
 
Scafi: Scala with Computational Fields
Scafi: Scala with Computational FieldsScafi: Scala with Computational Fields
Scafi: Scala with Computational Fields
 

Recently uploaded

Alternative method of dissolution in-vitro in-vivo correlation and dissolutio...
Alternative method of dissolution in-vitro in-vivo correlation and dissolutio...Alternative method of dissolution in-vitro in-vivo correlation and dissolutio...
Alternative method of dissolution in-vitro in-vivo correlation and dissolutio...Sahil Suleman
 
NuGOweek 2024 programme final FLYER short.pdf
NuGOweek 2024 programme final FLYER short.pdfNuGOweek 2024 programme final FLYER short.pdf
NuGOweek 2024 programme final FLYER short.pdfpablovgd
 
The Scientific names of some important families of Industrial plants .pdf
The Scientific names of some important families of Industrial plants .pdfThe Scientific names of some important families of Industrial plants .pdf
The Scientific names of some important families of Industrial plants .pdfMohamed Said
 
Mining Activity and Investment Opportunity in Myanmar.pptx
Mining Activity and Investment Opportunity in Myanmar.pptxMining Activity and Investment Opportunity in Myanmar.pptx
Mining Activity and Investment Opportunity in Myanmar.pptxKyawThanTint
 
PLANT DISEASE MANAGEMENT PRINCIPLES AND ITS IMPORTANCE
PLANT DISEASE MANAGEMENT PRINCIPLES AND ITS IMPORTANCEPLANT DISEASE MANAGEMENT PRINCIPLES AND ITS IMPORTANCE
PLANT DISEASE MANAGEMENT PRINCIPLES AND ITS IMPORTANCETALAPATI ARUNA CHENNA VYDYANAD
 
The solar dynamo begins near the surface
The solar dynamo begins near the surfaceThe solar dynamo begins near the surface
The solar dynamo begins near the surfaceSérgio Sacani
 
Molecular and Cellular Mechanism of Action of Hormones such as Growth Hormone...
Molecular and Cellular Mechanism of Action of Hormones such as Growth Hormone...Molecular and Cellular Mechanism of Action of Hormones such as Growth Hormone...
Molecular and Cellular Mechanism of Action of Hormones such as Growth Hormone...Ansari Aashif Raza Mohd Imtiyaz
 
In-pond Race way systems for Aquaculture (IPRS).pptx
In-pond Race way systems for Aquaculture (IPRS).pptxIn-pond Race way systems for Aquaculture (IPRS).pptx
In-pond Race way systems for Aquaculture (IPRS).pptxMAGOTI ERNEST
 
A Giant Impact Origin for the First Subduction on Earth
A Giant Impact Origin for the First Subduction on EarthA Giant Impact Origin for the First Subduction on Earth
A Giant Impact Origin for the First Subduction on EarthSérgio Sacani
 
Climate extremes likely to drive land mammal extinction during next supercont...
Climate extremes likely to drive land mammal extinction during next supercont...Climate extremes likely to drive land mammal extinction during next supercont...
Climate extremes likely to drive land mammal extinction during next supercont...Sérgio Sacani
 
TEST BANK for Organic Chemistry 6th Edition.pdf
TEST BANK for Organic Chemistry 6th Edition.pdfTEST BANK for Organic Chemistry 6th Edition.pdf
TEST BANK for Organic Chemistry 6th Edition.pdfmarcuskenyatta275
 
Tuberculosis (TB)-Notes.pdf microbiology notes
Tuberculosis (TB)-Notes.pdf microbiology notesTuberculosis (TB)-Notes.pdf microbiology notes
Tuberculosis (TB)-Notes.pdf microbiology notesjyothisaisri
 
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...Sérgio Sacani
 
Lubrication System in forced feed system
Lubrication System in forced feed systemLubrication System in forced feed system
Lubrication System in forced feed systemADB online India
 
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptx
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptxPlasmapheresis - Dr. E. Muralinath - Kalyan . C.pptx
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptxmuralinath2
 
Jet reorientation in central galaxies of clusters and groups: insights from V...
Jet reorientation in central galaxies of clusters and groups: insights from V...Jet reorientation in central galaxies of clusters and groups: insights from V...
Jet reorientation in central galaxies of clusters and groups: insights from V...Sérgio Sacani
 
Triploidy ...............................pptx
Triploidy ...............................pptxTriploidy ...............................pptx
Triploidy ...............................pptxCherry
 
Erythropoiesis- Dr.E. Muralinath-C Kalyan
Erythropoiesis- Dr.E. Muralinath-C KalyanErythropoiesis- Dr.E. Muralinath-C Kalyan
Erythropoiesis- Dr.E. Muralinath-C Kalyanmuralinath2
 
Emergent ribozyme behaviors in oxychlorine brines indicate a unique niche for...
Emergent ribozyme behaviors in oxychlorine brines indicate a unique niche for...Emergent ribozyme behaviors in oxychlorine brines indicate a unique niche for...
Emergent ribozyme behaviors in oxychlorine brines indicate a unique niche for...Sérgio Sacani
 
GBSN - Microbiology (Unit 6) Human and Microbial interaction
GBSN - Microbiology (Unit 6) Human and Microbial interactionGBSN - Microbiology (Unit 6) Human and Microbial interaction
GBSN - Microbiology (Unit 6) Human and Microbial interactionAreesha Ahmad
 

Recently uploaded (20)

Alternative method of dissolution in-vitro in-vivo correlation and dissolutio...
Alternative method of dissolution in-vitro in-vivo correlation and dissolutio...Alternative method of dissolution in-vitro in-vivo correlation and dissolutio...
Alternative method of dissolution in-vitro in-vivo correlation and dissolutio...
 
NuGOweek 2024 programme final FLYER short.pdf
NuGOweek 2024 programme final FLYER short.pdfNuGOweek 2024 programme final FLYER short.pdf
NuGOweek 2024 programme final FLYER short.pdf
 
The Scientific names of some important families of Industrial plants .pdf
The Scientific names of some important families of Industrial plants .pdfThe Scientific names of some important families of Industrial plants .pdf
The Scientific names of some important families of Industrial plants .pdf
 
Mining Activity and Investment Opportunity in Myanmar.pptx
Mining Activity and Investment Opportunity in Myanmar.pptxMining Activity and Investment Opportunity in Myanmar.pptx
Mining Activity and Investment Opportunity in Myanmar.pptx
 
PLANT DISEASE MANAGEMENT PRINCIPLES AND ITS IMPORTANCE
PLANT DISEASE MANAGEMENT PRINCIPLES AND ITS IMPORTANCEPLANT DISEASE MANAGEMENT PRINCIPLES AND ITS IMPORTANCE
PLANT DISEASE MANAGEMENT PRINCIPLES AND ITS IMPORTANCE
 
The solar dynamo begins near the surface
The solar dynamo begins near the surfaceThe solar dynamo begins near the surface
The solar dynamo begins near the surface
 
Molecular and Cellular Mechanism of Action of Hormones such as Growth Hormone...
Molecular and Cellular Mechanism of Action of Hormones such as Growth Hormone...Molecular and Cellular Mechanism of Action of Hormones such as Growth Hormone...
Molecular and Cellular Mechanism of Action of Hormones such as Growth Hormone...
 
In-pond Race way systems for Aquaculture (IPRS).pptx
In-pond Race way systems for Aquaculture (IPRS).pptxIn-pond Race way systems for Aquaculture (IPRS).pptx
In-pond Race way systems for Aquaculture (IPRS).pptx
 
A Giant Impact Origin for the First Subduction on Earth
A Giant Impact Origin for the First Subduction on EarthA Giant Impact Origin for the First Subduction on Earth
A Giant Impact Origin for the First Subduction on Earth
 
Climate extremes likely to drive land mammal extinction during next supercont...
Climate extremes likely to drive land mammal extinction during next supercont...Climate extremes likely to drive land mammal extinction during next supercont...
Climate extremes likely to drive land mammal extinction during next supercont...
 
TEST BANK for Organic Chemistry 6th Edition.pdf
TEST BANK for Organic Chemistry 6th Edition.pdfTEST BANK for Organic Chemistry 6th Edition.pdf
TEST BANK for Organic Chemistry 6th Edition.pdf
 
Tuberculosis (TB)-Notes.pdf microbiology notes
Tuberculosis (TB)-Notes.pdf microbiology notesTuberculosis (TB)-Notes.pdf microbiology notes
Tuberculosis (TB)-Notes.pdf microbiology notes
 
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
 
Lubrication System in forced feed system
Lubrication System in forced feed systemLubrication System in forced feed system
Lubrication System in forced feed system
 
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptx
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptxPlasmapheresis - Dr. E. Muralinath - Kalyan . C.pptx
Plasmapheresis - Dr. E. Muralinath - Kalyan . C.pptx
 
Jet reorientation in central galaxies of clusters and groups: insights from V...
Jet reorientation in central galaxies of clusters and groups: insights from V...Jet reorientation in central galaxies of clusters and groups: insights from V...
Jet reorientation in central galaxies of clusters and groups: insights from V...
 
Triploidy ...............................pptx
Triploidy ...............................pptxTriploidy ...............................pptx
Triploidy ...............................pptx
 
Erythropoiesis- Dr.E. Muralinath-C Kalyan
Erythropoiesis- Dr.E. Muralinath-C KalyanErythropoiesis- Dr.E. Muralinath-C Kalyan
Erythropoiesis- Dr.E. Muralinath-C Kalyan
 
Emergent ribozyme behaviors in oxychlorine brines indicate a unique niche for...
Emergent ribozyme behaviors in oxychlorine brines indicate a unique niche for...Emergent ribozyme behaviors in oxychlorine brines indicate a unique niche for...
Emergent ribozyme behaviors in oxychlorine brines indicate a unique niche for...
 
GBSN - Microbiology (Unit 6) Human and Microbial interaction
GBSN - Microbiology (Unit 6) Human and Microbial interactionGBSN - Microbiology (Unit 6) Human and Microbial interaction
GBSN - Microbiology (Unit 6) Human and Microbial interaction
 

FScaFi: A Core Calculus for Collective Adaptive Systems Programming

  • 1. FScaFi: A Core Calculus for Collective Adaptive Systems Programming Roberto Casadei1 , Mirko Viroli1 , Giorgio Audrito2 , Ferruccio Damiani2 1 ALMA MATER STUDIORUM–Università di Bologna, Cesena, Italy 2 Università di Torino, Turin, Italy Rhodes, Greece Talk @ ISoLA 2021 10th International Symposium on Leveraging Applications of Formal Methods, Verification and Validation Rigorous Engineering of Collective Adaptive Systems (REoCAS) Track
  • 2. Outline 1 Background & Motivation 2 Contribution 3 Examples & More 4 Conclusion
  • 3. Collective adaptive systems (CAS) programming Focus: collectives and their global behaviour ∠ collective: a collection of individuals entities (members) held together by some “shared plan” [1] R. Casadei, M. Viroli, G. Audrito, D. Pianini, and F. Damiani, “Engineering collective intelligence at the edge with aggregate processes,” Eng. Appl. Artif. Intell., 2021 [2] T. D. Wolf and T. Holvoet, “Designing self-organising emergent systems based on information flows and feedback-loops,” in Proceedings of the First International Conference on Self-Adaptive and Self-Organizing Systems, SASO 2007, Boston, MA, USA, July 9-11, 2007, IEEE Computer Society, 2007 [3] G. Audrito, R. Casadei, F. Damiani, and M. Viroli, “Compositional blocks for optimal self-healing gradients,” in 11th IEEE International Conference on Self-Adaptive and Self-Organizing Systems, SASO 2017, Tucson, AZ, USA, September 18-22, 2017, IEEE Computer Society, 2017 R.Casadei Background & Motivation Contribution Examples & More Conclusion References 1/21
  • 4. Collective adaptive systems (CAS) programming Focus: collectives and their global behaviour ∠ collective: a collection of individuals entities (members) held together by some “shared plan” Recurrent abstractions ∠ Ensembles & collective tasks [1] ∠ Self-organising information flows [2] ∠ Self-healing collective structures (e.g., gradients) [3] [1] R. Casadei, M. Viroli, G. Audrito, D. Pianini, and F. Damiani, “Engineering collective intelligence at the edge with aggregate processes,” Eng. Appl. Artif. Intell., 2021 [2] T. D. Wolf and T. Holvoet, “Designing self-organising emergent systems based on information flows and feedback-loops,” in Proceedings of the First International Conference on Self-Adaptive and Self-Organizing Systems, SASO 2007, Boston, MA, USA, July 9-11, 2007, IEEE Computer Society, 2007 [3] G. Audrito, R. Casadei, F. Damiani, and M. Viroli, “Compositional blocks for optimal self-healing gradients,” in 11th IEEE International Conference on Self-Adaptive and Self-Organizing Systems, SASO 2017, Tucson, AZ, USA, September 18-22, 2017, IEEE Computer Society, 2017 R.Casadei Background & Motivation Contribution Examples & More Conclusion References 1/21
  • 5. Aggregate Computing (AC) paradigm for CAS [4] “Self-organisation-like” computational/programming model interaction: continuous communication with neighbours only (→ decentralisation) behaviour: continuous execution of async rounds of sense – compute – (inter)act [4] M. Viroli, J. Beal, F. Damiani, G. Audrito, R. Casadei, and D. Pianini, “From distributed coordination to field calculus and aggregate computing,” Journal of Logical and Algebraic Methods in Programming, 2019 R.Casadei Background & Motivation Contribution Examples & More Conclusion References 2/21
  • 6. Aggregate Computing (AC) paradigm for CAS [4] “Self-organisation-like” computational/programming model interaction: continuous communication with neighbours only (→ decentralisation) behaviour: continuous execution of async rounds of sense – compute – (inter)act abstraction: computational fields ( → field calculus) paradigm: functional, macroprogramming ∠ an “aggregate program” as a “shared plan” expressed as composition of “collective behaviours” neighborhood device source destination gradient distance gradient <= + dilate width 37 10 [4] M. Viroli, J. Beal, F. Damiani, G. Audrito, R. Casadei, and D. Pianini, “From distributed coordination to field calculus and aggregate computing,” Journal of Logical and Algebraic Methods in Programming, 2019 R.Casadei Background & Motivation Contribution Examples & More Conclusion References 2/21
  • 7. Aggregate programming as internal DSL Problem: embedding aggregate programming into mainstream PLs Namely, providing an implementation of the higher-order field calculus (HFC) Previous languages were standalone DSLs (e.g., Protelis) R.Casadei Background & Motivation Contribution Examples & More Conclusion References 3/21
  • 8. Aggregate programming as internal DSL Problem: embedding aggregate programming into mainstream PLs Namely, providing an implementation of the higher-order field calculus (HFC) Previous languages were standalone DSLs (e.g., Protelis) Embedding as an internal DSL has benefits - easier to implement, typically (assuming host PL is suitable) - easier integration with host PL (and corresponding platform) - more reuse—cf. knowledge (syntax, typing) and access to general purpose features/toolchains , less flexibility (cf. syntactic/semantic constraints) R.Casadei Background & Motivation Contribution Examples & More Conclusion References 3/21
  • 9. Outline 1 Background & Motivation 2 Contribution 3 Examples & More 4 Conclusion
  • 10. ScaFi & FScaFi e We worked on an open-source Scala impl inspired by HFC R.Casadei Background & Motivation Contribution Examples & More Conclusion References 4/21
  • 11. ScaFi & FScaFi e We worked on an open-source Scala impl inspired by HFC ú ScaFi (Scala Fields) DSL ú a variant calculus: FScaFi (Featherweight ScaFi) R.Casadei Background & Motivation Contribution Examples & More Conclusion References 4/21
  • 12. ScaFi & FScaFi e We worked on an open-source Scala impl inspired by HFC ú ScaFi (Scala Fields) DSL ú a variant calculus: FScaFi (Featherweight ScaFi) other tools (simulator, runtime etc.) provided to make ScaFi a comprehensive aggregate programming toolkit: https://scafi.github.io SCAFI-CORE SPALA (AC PLATFORM) SCAFI-TESTS AKKA-CORE AKKA-REMOTING SCAFI-SIMULATOR SCAFI-SIMULATOR-GUI SCAFI-STDLIB-EXT SCAFI-DISTRIBUTED SCAFI-COMMONS (space-time abstractions) DEMOS depends on R.Casadei Background & Motivation Contribution Examples & More Conclusion References 4/21
  • 13. Syntax P ::= F e program F ::= def d(x){e} function declaration e ::= x
  • 14.
  • 15. v
  • 16.
  • 18.
  • 19. e(e)
  • 20.
  • 22.
  • 24.
  • 26.
  • 28.
  • 30.
  • 31. d
  • 32.
  • 33. (x) => {e} function value R.Casadei Background & Motivation Contribution Examples & More Conclusion References 5/21
  • 34. Syntax P ::= F e program F ::= def d(x){e} function declaration e ::= x
  • 35.
  • 36. v
  • 37.
  • 39.
  • 40. e(e)
  • 41.
  • 43.
  • 45.
  • 47.
  • 49.
  • 51.
  • 52. d
  • 53.
  • 54. (x) => {e} function value trait Constructs { // Key constructs def rep[A](init: => A)(fun: (A) => A): A def foldhood[A](init: => A)(aggr: (A, A) => A)(expr: => A): A def nbr[A](expr: => A): A def aggregate[A](b: => A): A // to wrap bodies of ordinary Scala functions // Abstract types: device identifiers and capability names type ID, CNAME; // Access to context def mid(): ID def sense[A](name: CNAME): A def nbrvar[A](name: CNAME): A } o Note: (1) no explicit fields in types; (2) nbr calls only within foldhoods (cf. by-name args) R.Casadei Background & Motivation Contribution Examples & More Conclusion References 5/21
  • 55. Semantics: two main pieces Device semantics (big-step op-sem) δ, δ0 ; Θ; σ ` e ⇓ θ “expression e evaluates to value-tree θ on device δ with respect to the neighbour δ0 , value-tree environment Θ and sensor state σ” ­ communication based on structural alignment of value-trees R.Casadei Background & Motivation Contribution Examples & More Conclusion References 6/21
  • 56. Semantics: two main pieces Device semantics (big-step op-sem) δ, δ0 ; Θ; σ ` e ⇓ θ “expression e evaluates to value-tree θ on device δ with respect to the neighbour δ0 , value-tree environment Θ and sensor state σ” ­ communication based on structural alignment of value-trees Network semantics (small-step op-sem) N act − − → N network evolves through ∠ act = δ+ (device computation) ∠ act = δ− (communication) ∠ act = env (environment evolution) See also: G. Audrito, R. Casadei, F. Damiani, and M. Viroli, “Computation against a neighbour,” CoRR, 2020. arXiv: 2012.08626 W R.Casadei Background & Motivation Contribution Examples & More Conclusion References 6/21
  • 57. Device semantics (big-step) Value-trees and value-tree environments: θ ::= vhθi value-tree Θ ::= δ 7→ θ value-tree environment Rules for expression evaluation: δ, δ 0 ; Θ; σ ` e ⇓ θ [E-VAL] δ, δ0; Θ; σ ` v ⇓ vhi [E-B-APP] δ, δ; π1(Θ); σ ` e ⇓ θ δ, δ0; πi+1(Θ); σ ` ei ⇓ θi for all i ∈ 1, . . . , n v = LbM πb(Θ),σ δ,δ0 (ρ(θ)) (b = ρ(θ) is not relational ) ∨ (δ0 ∈ dom(πb(Θ)) ∪ {δ}) δ, δ0; Θ; σ ` e(e) ⇓ vhθ, θ, vi [E-D-APP] δ, δ; π1(Θ); σ ` e ⇓ θ δ, δ0; πi+1(Θ); σ ` ei ⇓ θi for all i ∈ 1, . . . , n f = ρ(θ) is not a built-in δ, δ0; πf(Θ); σ ` body(f)[args(f) := ρ(θ)] ⇓ θ0 δ, δ0; Θ; σ ` e(e) ⇓ ρ(θ0)hθ, θ, θ0i [E-REP] δ, δ; π1(Θ); σ ` e1 ⇓ θ1 v1 = ρ(θ1) δ, δ; π2(Θ); σ ` e2(v0) ⇓ θ2 v2 = ρ(θ2) v0 = ρ(π2(Θ))(δ) if δ ∈ dom(Θ) v1 otherwise δ, δ0; Θ; σ ` rep(e1){e2} ⇓ v2hθ1, θ2i [E-NBR] δ 6= δ0 ∈ dom(Θ) θ = Θ(δ0) δ, δ0; Θ; σ ` nbr{e} ⇓ θ [E-NBR-LOC] δ, δ; π1(Θ); σ ` e ⇓ θ δ, δ; Θ; σ ` nbr{e} ⇓ ρ(θ)hθi [E-FOLD] δ, δ; π1(Θ); σ ` e1 ⇓ θ1 δ, δ; π2(Θ); σ ` e2 ⇓ θf f = ρ(θf ) δ1, . . . , δn = dom(Θ) {δ} n ≥ m ≥ 0, δ1, . . . , δm increasing, δ0 = δ δ, δi ; π3(Θ); σ ` e3 ⇓ θi for all i ∈ 0, ..., m δ, δj ; π3(Θ); σ ` e3 FAIL for all j ∈ m + 1, ..., n δ, δ; ∅; σ ` f(ρ(θi ), ρ(θi )) ⇓ θi+1 for all i ∈ 1, ..., m δ, δ0; Θ; σ ` foldhood(e1, e2, e3) ⇓ ρ(θm+1)hθ1, θf , θ0i R.Casadei Background Motivation Contribution Examples More Conclusion References 7/21
  • 58. Network semantics (small-step, SOS) System configurations and action labels: Ψ ::= δ 7→ Θ value-tree field α ::= δ 7→ a with a ∈ {false, true} activation predicate Stat ::= hΨ, αi status ::= hδ, δ 0 i topology Σ ::= δ 7→ σ sensor state Env ::= h, Σi environment N ::= hEnv; Stati network configuration act ::= δ+
  • 59.
  • 60. δ−
  • 61.
  • 62. env action label Environment well-formedness: WFE(h, Σi) holds iff {hδ, δi | δ ∈ D} ⊆ ⊆ D × D where D = dom(Σ) Transition rules for network evolution: N act − − → N [N-COMP] α(δ)=false Θ0 = Fδ(Ψ(δ)) δ, δ; Θ0 ; Σ(δ) ` emain ⇓ θ Θ=Θ0 [δ 7→ θ] hh, Σi; hΨ, αii δ+ − − → hh, Σi; hΨ[δ 7→ Θ], α[δ 7→ true]ii [N-SEND] α(δ)=true δ = δ0 | δ δ0 θ = Ψ(δ)(δ) Θ = δ 7→ θ hh, Σi; hΨ, αii δ− − − → hh, Σi; hΨJδ 7→ ΘK, α[δ 7→ false]ii [N-ENV] WFE(Env0 ) Env0 = h, δ 7→ σi Ψ0 = δ 7→ ∅ α0 = δ 7→ false hEnv; Ψ, αi env − − → hEnv0 ; Ψ0[Ψ], α0[α]i R.Casadei Background Motivation Contribution Examples More Conclusion References 8/21
  • 63. Outline 1 Background Motivation 2 Contribution 3 Examples More 4 Conclusion
  • 64. Examples Web playground: https://scafi.github.io/web/ [6] [6] G. Aguzzi, R. Casadei, N. Maltoni, D. Pianini, and M. Viroli, “Scafi-web: A web-based application for field-based coordination programming,” in Coordination Models and Languages - 23rd IFIP WG 6.1 International Conference, COORDINATION 2021, Held as Part of the 16th International Federated Conference on Distributed Computing Techniques, DisCoTec 2021, Valletta, Malta, June 14-18, 2021, Proceedings, F. Damiani and O. Dardha, Eds., ser. Lecture Notes in Computer Science, Springer, 2021 R.Casadei Background Motivation Contribution Examples More Conclusion References 9/21
  • 65. Examples: gradient [3] Gradient: resiliently build the field of shortest distances from a source area [3] G. Audrito, R. Casadei, F. Damiani, and M. Viroli, “Compositional blocks for optimal self-healing gradients,” in 11th IEEE International Conference on Self-Adaptive and Self-Organizing Systems, SASO 2017, Tucson, AZ, USA, September 18-22, 2017, IEEE Computer Society, 2017 R.Casadei Background Motivation Contribution Examples More Conclusion References 10/21
  • 66. Examples: channel (around obstacles) (1/3) Channel: resiliently define a domain of devices providing the shortest path from a source area to a destination area R.Casadei Background Motivation Contribution Examples More Conclusion References 11/21
  • 67. Examples: channel (around obstacles) (2/3) R.Casadei Background Motivation Contribution Examples More Conclusion References 12/21
  • 68. Examples: channel (around obstacles) (3/3) R.Casadei Background Motivation Contribution Examples More Conclusion References 13/21
  • 69. Examples: SCR pattern [7] Self-organising Coordination Regions (SCR) pattern: elect leaders → use gradients to define areas → spread collect info in those areas to support feedback loops [7] R. Casadei, D. Pianini, M. Viroli, and A. Natali, “Self-organising coordination regions: A pattern for edge computing,” in Coordination Models and Languages - 21st IFIP WG 6.1 International Conference, COORDINATION 2019, Held as Part of the 14th International Federated Conference on Distributed Computing Techniques, DisCoTec 2019, Kongens Lyngby, Denmark, June 17-21, 2019, Proceedings, H. R. Nielson and E. Tuosto, Eds., ser. Lecture Notes in Computer Science, Springer, 2019 R.Casadei Background Motivation Contribution Examples More Conclusion References 14/21
  • 70. From building blocks to applications ­ Applications are built by composing functions ∠ each function comprises behaviour + interaction ∠ each function generally steers some emergent collective behaviour ∠ output of a function (namely a field) becomes the input of another [8] J. Beal, D. Pianini, and M. Viroli, “Aggregate programming for the internet of things,” Computer, no. 9, 2015 [9] R. Casadei, M. Viroli, A. Ricci, and G. Audrito, “Tuple-based coordination in large-scale situated systems,” in Coordination Models and Languages - 23rd International Conference, COORDINATION 2021, Valletta, Malta, June 14-18, 2021, Proceedings, ser. LNCS, Springer, 2021 [1] R. Casadei, M. Viroli, G. Audrito, D. Pianini, and F. Damiani, “Engineering collective intelligence at the edge with aggregate processes,” Eng. Appl. Artif. Intell., 2021 [10] R. Casadei, D. Pianini, A. Placuzzi, M. Viroli, and D. Weyns, “Pulverization in cyber-physical systems: Engineering the self-organizing logic separated from deployment,” Future Internet, no. 11, 2020 [11] G. Audrito, R. Casadei, F. Damiani, V. Stolz, and M. Viroli, “Adaptive distributed monitors of spatial properties for cyber-physical systems,” J. Syst. Softw., 2021 R.Casadei Background Motivation Contribution Examples More Conclusion References 15/21
  • 71. From building blocks to applications ­ Applications are built by composing functions ∠ each function comprises behaviour + interaction ∠ each function generally steers some emergent collective behaviour ∠ output of a function (namely a field) becomes the input of another Examples ∠ crowd engineering [8] ∠ situated tuples [9] ∠ collective tasks [1] ∠ pollution-aware household heating control [10] ∠ monitors for runtime verification of spatial properties [11] [8] J. Beal, D. Pianini, and M. Viroli, “Aggregate programming for the internet of things,” Computer, no. 9, 2015 [9] R. Casadei, M. Viroli, A. Ricci, and G. Audrito, “Tuple-based coordination in large-scale situated systems,” in Coordination Models and Languages - 23rd International Conference, COORDINATION 2021, Valletta, Malta, June 14-18, 2021, Proceedings, ser. LNCS, Springer, 2021 [1] R. Casadei, M. Viroli, G. Audrito, D. Pianini, and F. Damiani, “Engineering collective intelligence at the edge with aggregate processes,” Eng. Appl. Artif. Intell., 2021 [10] R. Casadei, D. Pianini, A. Placuzzi, M. Viroli, and D. Weyns, “Pulverization in cyber-physical systems: Engineering the self-organizing logic separated from deployment,” Future Internet, no. 11, 2020 [11] G. Audrito, R. Casadei, F. Damiani, V. Stolz, and M. Viroli, “Adaptive distributed monitors of spatial properties for cyber-physical systems,” J. Syst. Softw., 2021 R.Casadei Background Motivation Contribution Examples More Conclusion References 15/21
  • 72. FScaFi vs. HFC From “neighbouring field” (HFC) to “computation against a neighbour” (FScaFi) FScaFi’ = HFC’ FScaFi HFC [12] G. Audrito, J. Beal, F. Damiani, and M. Viroli, “Space-time universality of field calculus,” in Coordination Models and Languages - 20th International Conference, COORDINATION 2018. Proceedings, ser. LNCS, Springer, 2018 [13] M. Viroli, G. Audrito, J. Beal, F. Damiani, and D. Pianini, “Engineering resilient collective adaptive systems by self-stabilisation,” ACM Trans. Model. Comput. Simul., no. 2, 2018 [5] G. Audrito, R. Casadei, F. Damiani, and M. Viroli, “Computation against a neighbour,” CoRR, 2020. arXiv: 2012.08626 R.Casadei Background Motivation Contribution Examples More Conclusion References 16/21
  • 73. FScaFi vs. HFC From “neighbouring field” (HFC) to “computation against a neighbour” (FScaFi) FScaFi’ = HFC’ FScaFi HFC FScaFi’ retains basic properties and guarantees, notably universality [12] and self-stabilisation [13]—see [5] W [12] G. Audrito, J. Beal, F. Damiani, and M. Viroli, “Space-time universality of field calculus,” in Coordination Models and Languages - 20th International Conference, COORDINATION 2018. Proceedings, ser. LNCS, Springer, 2018 [13] M. Viroli, G. Audrito, J. Beal, F. Damiani, and D. Pianini, “Engineering resilient collective adaptive systems by self-stabilisation,” ACM Trans. Model. Comput. Simul., no. 2, 2018 [5] G. Audrito, R. Casadei, F. Damiani, and M. Viroli, “Computation against a neighbour,” CoRR, 2020. arXiv: 2012.08626 R.Casadei Background Motivation Contribution Examples More Conclusion References 16/21
  • 74. Outline 1 Background Motivation 2 Contribution 3 Examples More 4 Conclusion
  • 75. Conclusion Contribution: FScaFi calculus for the ScaFi Scala-internal aggregate programming DSL ∠ Enable self-organisation programming for CAS by a macro-perspective R.Casadei Background Motivation Contribution Examples More Conclusion References 17/21
  • 76. Conclusion Contribution: FScaFi calculus for the ScaFi Scala-internal aggregate programming DSL ∠ Enable self-organisation programming for CAS by a macro-perspective ­ One insight: Variants of a core calculus may foster DSL embeddability while retaining key guarantees R.Casadei Background Motivation Contribution Examples More Conclusion References 17/21
  • 77. Conclusion Contribution: FScaFi calculus for the ScaFi Scala-internal aggregate programming DSL ∠ Enable self-organisation programming for CAS by a macro-perspective ­ One insight: Variants of a core calculus may foster DSL embeddability while retaining key guarantees Long-term: ScaFi provides practical tools for building aggregate computing CASs R.Casadei Background Motivation Contribution Examples More Conclusion References 17/21
  • 78. “Cyber-physical Collectives” Special Issue in Frontiers on Robotics AI (Scimago Q2, open-access journal) https://www.frontiersin.org/research-topics/24380/ mobile-cyber-physical-collectives Guest Editors: R. Casadei, L. Esterle, R. Gamble, P. Harvey, E. Wanner Abstract deadline: 26 November 2021 Manuscript deadline: 25 February 2022 R.Casadei Background Motivation Contribution Examples More Conclusion References 18/21
  • 79. Bibliography (1/3) [1] R. Casadei, M. Viroli, G. Audrito, D. Pianini, and F. Damiani, “Engineering collective intelligence at the edge with aggregate processes,” Eng. Appl. Artif. Intell., vol. 97, p. 104 081, 2021. DOI: 10.1016/j.engappai.2020.104081. [Online]. Available: https://doi.org/10.1016/j.engappai.2020.104081. [2] T. D. Wolf and T. Holvoet, “Designing self-organising emergent systems based on information flows and feedback-loops,” in Proceedings of the First International Conference on Self-Adaptive and Self-Organizing Systems, SASO 2007, Boston, MA, USA, July 9-11, 2007, IEEE Computer Society, 2007, pp. 295–298. DOI: 10.1109/SASO.2007.16. [Online]. Available: https://doi.org/10.1109/SASO.2007.16. [3] G. Audrito, R. Casadei, F. Damiani, and M. Viroli, “Compositional blocks for optimal self-healing gradients,” in 11th IEEE International Conference on Self-Adaptive and Self-Organizing Systems, SASO 2017, Tucson, AZ, USA, September 18-22, 2017, IEEE Computer Society, 2017, pp. 91–100. DOI: 10.1109/SASO.2017.18. [Online]. Available: http://doi.ieeecomputersociety.org/10.1109/SASO.2017.18. [4] M. Viroli, J. Beal, F. Damiani, G. Audrito, R. Casadei, and D. Pianini, “From distributed coordination to field calculus and aggregate computing,” Journal of Logical and Algebraic Methods in Programming, vol. 109, p. 100 486, 2019, ISSN: 2352-2208. DOI: 10.1016/j.jlamp.2019.100486. [5] G. Audrito, R. Casadei, F. Damiani, and M. Viroli, “Computation against a neighbour,” CoRR, vol. abs/2012.08626, 2020. arXiv: 2012.08626. [Online]. Available: https://arxiv.org/abs/2012.08626. R.Casadei Background Motivation Contribution Examples More Conclusion References 19/21
  • 80. Bibliography (2/3) [6] G. Aguzzi, R. Casadei, N. Maltoni, D. Pianini, and M. Viroli, “Scafi-web: A web-based application for field-based coordination programming,” in Coordination Models and Languages - 23rd IFIP WG 6.1 International Conference, COORDINATION 2021, Held as Part of the 16th International Federated Conference on Distributed Computing Techniques, DisCoTec 2021, Valletta, Malta, June 14-18, 2021, Proceedings, F. Damiani and O. Dardha, Eds., ser. Lecture Notes in Computer Science, vol. 12717, Springer, 2021, pp. 285–299. DOI: 10.1007/978-3-030-78142-2_18. [Online]. Available: https://doi.org/10.1007/978-3-030-78142-2_18. [7] R. Casadei, D. Pianini, M. Viroli, and A. Natali, “Self-organising coordination regions: A pattern for edge computing,” in Coordination Models and Languages - 21st IFIP WG 6.1 International Conference, COORDINATION 2019, Held as Part of the 14th International Federated Conference on Distributed Computing Techniques, DisCoTec 2019, Kongens Lyngby, Denmark, June 17-21, 2019, Proceedings, H. R. Nielson and E. Tuosto, Eds., ser. Lecture Notes in Computer Science, vol. 11533, Springer, 2019, pp. 182–199. DOI: 10.1007/978-3-030-22397-7_11. [Online]. Available: https://doi.org/10.1007/978-3-030-22397-7_11. [8] J. Beal, D. Pianini, and M. Viroli, “Aggregate programming for the internet of things,” Computer, vol. 48, no. 9, pp. 22–30, 2015. DOI: 10.1109/MC.2015.261. [Online]. Available: https://doi.org/10.1109/MC.2015.261. [9] R. Casadei, M. Viroli, A. Ricci, and G. Audrito, “Tuple-based coordination in large-scale situated systems,” in Coordination Models and Languages - 23rd International Conference, COORDINATION 2021, Valletta, Malta, June 14-18, 2021, Proceedings, ser. LNCS, vol. 12717, Springer, 2021, pp. 149–167. DOI: 10.1007/978-3-030-78142-2_10. [Online]. Available: https://doi.org/10.1007/978-3-030-78142-2_10. R.Casadei Background Motivation Contribution Examples More Conclusion References 20/21
  • 81. Bibliography (3/3) [10] R. Casadei, D. Pianini, A. Placuzzi, M. Viroli, and D. Weyns, “Pulverization in cyber-physical systems: Engineering the self-organizing logic separated from deployment,” Future Internet, vol. 12, no. 11, p. 203, 2020. DOI: 10.3390/fi12110203. [Online]. Available: https://doi.org/10.3390/fi12110203. [11] G. Audrito, R. Casadei, F. Damiani, V. Stolz, and M. Viroli, “Adaptive distributed monitors of spatial properties for cyber-physical systems,” J. Syst. Softw., vol. 175, p. 110 908, 2021. DOI: 10.1016/j.jss.2021.110908. [Online]. Available: https://doi.org/10.1016/j.jss.2021.110908. [12] G. Audrito, J. Beal, F. Damiani, and M. Viroli, “Space-time universality of field calculus,” in Coordination Models and Languages - 20th International Conference, COORDINATION 2018. Proceedings, ser. LNCS, vol. 10852, Springer, 2018, pp. 1–20. DOI: 10.1007/978-3-319-92408-3_1. [Online]. Available: https://doi.org/10.1007/978-3-319-92408-3_1. [13] M. Viroli, G. Audrito, J. Beal, F. Damiani, and D. Pianini, “Engineering resilient collective adaptive systems by self-stabilisation,” ACM Trans. Model. Comput. Simul., vol. 28, no. 2, 16:1–16:28, 2018. DOI: 10.1145/3177774. [Online]. Available: https://doi.org/10.1145/3177774. R.Casadei Background Motivation Contribution Examples More Conclusion References 21/21