SlideShare a Scribd company logo
Toward Approximate Stochastic Model Checking of
   Computational Fields for Pervasive Computing Systems

                                Matteo Casadei, Mirko Viroli
                           {m.casadei,mirko.viroli}@unibo.it

                            Alma Mater Studiorum—Universit` di Bologna
                                                          a


                                       WOA, 19/09/2012




Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields    WOA, 19/09/2012   1 / 17
Outline


 Preview
 Problem
  ⇒ tackling verification in field-based self-organising systems
 Goal
  ⇒ exploiting approximate stochastic model-checking and Prism
 Strategy
  ⇒ developing a high-level language translating to Prism
 Use
  ⇒ showing few example applications and results




Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   2 / 17
Motivating Setting

 An abstract network model for pervasive computing
     A set of interconnected nodes situated in space
        Each node asynchronously interacts with a small neighbourhood
        Topology can be very dynamic due to mobility and faults

 Example problem
        Node n advertises an event in a large locality L(n)
        An “annotation” (tuple, data) in m ∈ L(n) then moves towards n

 General application scenarios – many rooted in SAPERE
        Steering people in pervasive computing scenarios [6]
        Message routing in wireless sensor networks [2]
        Mobile robot applications [1]
Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   3 / 17
Motivating Setting

 An abstract network model for pervasive computing
     A set of interconnected nodes situated in space
        Each node asynchronously interacts with a small neighbourhood
        Topology can be very dynamic due to mobility and faults

 Example problem
        Node n advertises an event in a large locality L(n)
        An “annotation” (tuple, data) in m ∈ L(n) then moves towards n

 General application scenarios – many rooted in SAPERE
        Steering people in pervasive computing scenarios [6]
        Message routing in wireless sensor networks [2]
        Mobile robot applications [1]
Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   3 / 17
Motivating Setting

 An abstract network model for pervasive computing
     A set of interconnected nodes situated in space
        Each node asynchronously interacts with a small neighbourhood
        Topology can be very dynamic due to mobility and faults

 Example problem
        Node n advertises an event in a large locality L(n)
        An “annotation” (tuple, data) in m ∈ L(n) then moves towards n

 General application scenarios – many rooted in SAPERE
        Steering people in pervasive computing scenarios [6]
        Message routing in wireless sensor networks [2]
        Mobile robot applications [1]
Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   3 / 17
A solution by so-called “Computational Fields” [4]
 Mapping nodes to values (suggests a continuum space-time viewpoint)




Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   4 / 17
A solution by so-called “Computational Fields” [4]
 Mapping nodes to values (suggests a continuum space-time viewpoint)




Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   4 / 17
A solution by so-called “Computational Fields” [4]
 Mapping nodes to values (suggests a continuum space-time viewpoint)




Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   4 / 17
A solution by so-called “Computational Fields” [4]
 Mapping nodes to values (suggests a continuum space-time viewpoint)




 Other structures (channel, shrinking crown, partition, shadow)




Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   4 / 17
Computational Fields and emergence




Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   5 / 17
The predictability/controllability issue


 Any guarantee about “appropriateness”?
        Will the computational field stabilise? (or can it diverge?)
        Will the computational field have the proper shape?
        Will people be steered until eventually reaching the POI?

 Approaches to assess properties
     Formal proof: difficult to find, typically ad-hoc
        Simulation: the standard-de-facto, often hard to be fully trusted
        Automatic Verification (model-checking): shortly impractical




Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   6 / 17
The predictability/controllability issue


 Any guarantee about “appropriateness”?
        Will the computational field stabilise? (or can it diverge?)
        Will the computational field have the proper shape?
        Will people be steered until eventually reaching the POI?

 Approaches to assess properties
     Formal proof: difficult to find, typically ad-hoc
        Simulation: the standard-de-facto, often hard to be fully trusted
        Automatic Verification (model-checking): shortly impractical




Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   6 / 17
A solution between Simulation and Automatic Verification
 Approximate Stochastic Model Checking [3] (A-SMC)
 Tackle the state-space explosion, probabilistically:
        Explore a subset of state-space through a (possibly high) number of
        stochastic simulations (requires less time and less space than MC)
        Result: probability for the property to hold, with known confidence

 Three key parameters
    1   Number of independent simulation runs N
    2   Approximation : the desired precision on the obtained probability
    3   Confidence factor δ: probability that approximation is not met

  ⇒ (Definition of                and δ: Prob[|Mexact − Mapprox | ≤ ] ≥ 1 − δ)
  ⇒ Parameters are linked: N ≥ 4log ( 2 )/
                                      δ
                                                              2

  ⇒ Our choice:               = 0.01, δ = 0.01, N            90 000.
Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   7 / 17
A solution between Simulation and Automatic Verification
 Approximate Stochastic Model Checking [3] (A-SMC)
 Tackle the state-space explosion, probabilistically:
        Explore a subset of state-space through a (possibly high) number of
        stochastic simulations (requires less time and less space than MC)
        Result: probability for the property to hold, with known confidence

 Three key parameters
    1   Number of independent simulation runs N
    2   Approximation : the desired precision on the obtained probability
    3   Confidence factor δ: probability that approximation is not met

  ⇒ (Definition of                and δ: Prob[|Mexact − Mapprox | ≤ ] ≥ 1 − δ)
  ⇒ Parameters are linked: N ≥ 4log ( 2 )/
                                      δ
                                                              2

  ⇒ Our choice:               = 0.01, δ = 0.01, N            90 000.
Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   7 / 17
A solution between Simulation and Automatic Verification
 Approximate Stochastic Model Checking [3] (A-SMC)
 Tackle the state-space explosion, probabilistically:
        Explore a subset of state-space through a (possibly high) number of
        stochastic simulations (requires less time and less space than MC)
        Result: probability for the property to hold, with known confidence

 Three key parameters
    1   Number of independent simulation runs N
    2   Approximation : the desired precision on the obtained probability
    3   Confidence factor δ: probability that approximation is not met

  ⇒ (Definition of                and δ: Prob[|Mexact − Mapprox | ≤ ] ≥ 1 − δ)
  ⇒ Parameters are linked: N ≥ 4log ( 2 )/
                                      δ
                                                              2

  ⇒ Our choice:               = 0.01, δ = 0.01, N            90 000.
Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   7 / 17
PRISM (www.prismmodelchecker.org)

 The reference tool for A-SMC
     Widely used: biochemistry, games, protocols, coordination
        Support for Continuous Stochastic Logic (CSL) and CTMC

 The “module” linguistic construct in PRISM:
     State – A small set of bounded numerical variables
        Behaviour – A small set of condition-action transitions
        Network – Can write many modules, also by clone & rename
        Synchronisation – Can influence other modules via synch. transitions

 Limits of PRISM as front-end language to our ends
  ⇒ No first-class support for true (large, dynamic, ad-hoc) topologies
  ⇒ No first-class support for node-to-node communications

Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   8 / 17
PRISM (www.prismmodelchecker.org)

 The reference tool for A-SMC
     Widely used: biochemistry, games, protocols, coordination
        Support for Continuous Stochastic Logic (CSL) and CTMC

 The “module” linguistic construct in PRISM:
     State – A small set of bounded numerical variables
        Behaviour – A small set of condition-action transitions
        Network – Can write many modules, also by clone & rename
        Synchronisation – Can influence other modules via synch. transitions

 Limits of PRISM as front-end language to our ends
  ⇒ No first-class support for true (large, dynamic, ad-hoc) topologies
  ⇒ No first-class support for node-to-node communications

Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   8 / 17
A PRISM-based framework

 Three inputs
        Specification of a node (state + behaviour + interaction)
        Specification of a topology (grid, torus, ad-hoc, and the like)
        Specification of a formula to verify (CSL + node quantification)

 Two outputs
        (Big) PRISM specification (basically obtained by expansion)
        PRISM formula to verify

 Then..
     PRISM is used as usual to run modelchecking
        Specifying ,δ and N
        Charting probability of truth for different parameters
Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   9 / 17
The hop-count gradient case

 Node specification
 pump : [0..1]; field : [0..MAX];
 []     pump=1 & field>0 -- 1.0 --> field’= 0;
 [diff] pump=0           -- 1.0 --> field’= min[@.field]+1;


 Referencing neighbours
     min[@.field]: minimum value of field in neighbours

 An example on a “random torus”




Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   10 / 17
The hop-count gradient case
 Node specification
 pump : [0..1]; field : [0..MAX];
 []     pump=1 & field>0 -- 1.0 --> field’= 0;
 [diff] pump=0           -- 1.0 --> field’= min[@.field]+1;


 PRISM specification (grid topology, node 11, having neighbours 13,21,31)
 module node1_1
   pump1_1 : [0..1] init 1; field1_1 : [0..MAX] init MAX;
   [] pump1_1>0 & field1_1>0 -> 1.0 : field1_1’ = 0;
   [diff_1_1] pump1_1=0 -> 1.0 : field1_1’ = min(field1_3,field2_1,field3_1)+1;
 endmodule
 module node1_2=node1_1 [ diff_1_1=diff_1_2, pump1_1=pump1_2, ..] endmodule
 module node2_1=node1_1 [ diff_1_1=diff_2_1, ..] endmodule
 ...


 Property to verify and query (stabilisation within “k” time units)
 property "stab" = forall[(pump=0 & field=min(@.field)+1) | (pump=1 & field=0)];
 P=? [F<=k "stab"]   % F is bounded-eventually operator of temporal logics

Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   11 / 17
Simulation

 Charting probability of convergence within k time units




 ⇒ Result: stabilisation is reached linearly in the network diameter
 ⇒ This simulation takes about 2 hours on a 2.66 Ghz Dual-Core PC..
Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   12 / 17
A random walk – showing node synchronisation

 Node specification
 v : [0..1];
 [move] v=1 & N:=&any[@.v=0] -- 1.0 --> v’=0 & N.v’=1;


 Referencing neighbours
     any[@.v=0]: any neighbour having v set to 0

 PRISM specification (node 1, having neighbours 2,3)
 module node_1
   v_1 : [0..1] init 1;
  [move_1_2] v_1 = 1 & v_2 = 0 -> 1.0 : (v_1’=0); % one per outgoing neighbour
  [move_1_3] v_1 = 1 & v_3 = 0 -> 1.0 : (v_1’=0);
  [move_2_1] true -> 1.0 : (v_1’=1);              % one per incoming neighbour
  [move_3_1] true -> 1.0 : (v_1’=1);
 endmodule
 module node_2 .. endmodule
 module node_3 .. endmodule

Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   13 / 17
Language Syntax

 Module specification
 S   ::=   D T                               % Specification
 D   ::=   X : [n_l..n_u];                   % Variable def
 T   ::=   [L] P --e--> A;                   % Transition
 A   ::=   V’=e                              % Assignment
 P   ::=   b | M:=&f[e] | M:=&f[b]           % Precondition
 f   ::=   any | min | max                   % Selection function
 e   ::=   r | V | (e) | e+e | e-e | e*e | -e | f[e]    % exp
 b   ::=   e<=e | e<e | e>=e | e>e | e=e | e!=e         % bool exp
 V   ::=   X | M.X | @.X                               % Variable
 r   ::=   <real-num>                        % (real) Number
 n   ::=   <int-num>                         % (integer) Number
 L   ::=   <literal>                         % Label
 X   ::=   <literal>                         % Variable name
 M   ::=   <literal>                         % Node variable
Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   14 / 17
A more involved example – channel structure


 Node specification
 source : [0..1];    fs : [0..MAX];
 target : [0..1];    ft : [0..MAX];
 distance : [0..MAX]; range : [0..MAX];
 channel : [0..1];

 []          source=1 & fs>0 -- 100.0 --> fs’= 0 ;
 [sdiff]     source=0        -- 1.0 --> fs’= min[@.fs]+1;
 []          target=1 & ft>0 -- 100.0 --> ft’= 0 ;
 [tdiff]     target=0        -- 1.0 --> ft’= min[@.ft]+1;
 [dist]      source=1 & ft<MAX -- 1.0 --> distance’=ft;
 [goss]      N:=&any[@.distance>distance] -- 1.0 --> N.distance’=N.distance;
 [chn]       channel=0 & fs+ft<distance+range -- 1.0 --> channel’=1




Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   15 / 17
Conclusions

 Open issues
     Very hard to deal with network mobility, can simulate by:
          ⇒ translating links into modules
          ⇒ such modules activate/disactivate stochastically
        PRISM itself does not scale very well with size of the specification
        A-SMC is becoming popular in academia, but it is not yet a standard
        Can analyse topologies of few hundreds nodes

 Future works
     Improve the specification language – still very constrained by PRISM
        Integrating A-SMC in ad-hoc simulators (e.g. Alchemist [5])
        Find proof methodologies for certain classes of fields
        Incorporate a development methodology based on A-SMC in SAPERE

Matteo Casadei, Mirko Viroli (UNIBO)   A-SMC for Computational Fields   WOA, 19/09/2012   16 / 17
References I

 [1] Jonathan Bachrach, Jacob Beal, and James McLurkin.
     Composable continuous-space programs for robotic swarms.
     Neural Computing and Applications, 19(6):825–847, 2010.

 [2] Matteo Casadei, Mirko Viroli, and Luca Gardelli.
     On the collective sort problem for distributed tuple spaces.
     Sci. of Computer Programming, 74(9):702–722, 2009.

 [3] Thomas H´rault, Richard Lassaigne, Fr´d´ric Magniette, and Sylvain Peyronnet.
               e                           e e
     Approximate probabilistic model checking.
     In Bernhard Steffen and Giorgio Levi, editors, Proc. 5th International Conference on Verification, Model Checking and
     Abstract Interpretation (VMCAI’04), volume 2937 of Lecture Notes in Computer Science, pages 73–84. Springer, 2004.

 [4] Marco Mamei and Franco Zambonelli.
     Programming pervasive and mobile computing applications: The tota approach.
     ACM Trans. Softw. Eng. Methodol., 18(4):1–56, 2009.

 [5] Danilo Pianini, Sara Montagna, and Mirko Viroli.
     A chemical inspired simulation framework for pervasive services ecosystems.
     In Maria Ganzha, Leszek Maciaszek, and Marcin Paprzycki, editors, Proceedings of the Federated Conference on Computer
     Science and Information Systems, pages 675–682, Szczecin, Poland, 18-21 September 2011. IEEE Computer Society Press.
 [6] Mirko Viroli, Danilo Pianini, Sara Montagna, and Graeme Stevenson.
     Pervasive ecosystems: a coordination model based on semantic chemistry.
     In Sascha Ossowski, Paola Lecca, Chih-Cheng Hung, and Jiman Hong, editors, 27th Annual ACM Symposium on Applied
     Computing (SAC 2012), Riva del Garda, TN, Italy, 26-30 March 2012. ACM.




Matteo Casadei, Mirko Viroli (UNIBO)             A-SMC for Computational Fields                WOA, 19/09/2012        17 / 17

More Related Content

PDF
Semantic Video Segmentation with Using Ensemble of Particular Classifiers and...
PPTX
Semantic segmentation with Convolutional Neural Network Approaches
PDF
Image Segmentation (D3L1 2017 UPC Deep Learning for Computer Vision)
PDF
Attention Models (D3L6 2017 UPC Deep Learning for Computer Vision)
PDF
Perceptrons (D1L2 2017 UPC Deep Learning for Computer Vision)
PDF
Semantic Segmentation - Míriam Bellver - UPC Barcelona 2018
PDF
Deep 3D Visual Analysis - Javier Ruiz-Hidalgo - UPC Barcelona 2017
PDF
Manifold learning with application to object recognition
Semantic Video Segmentation with Using Ensemble of Particular Classifiers and...
Semantic segmentation with Convolutional Neural Network Approaches
Image Segmentation (D3L1 2017 UPC Deep Learning for Computer Vision)
Attention Models (D3L6 2017 UPC Deep Learning for Computer Vision)
Perceptrons (D1L2 2017 UPC Deep Learning for Computer Vision)
Semantic Segmentation - Míriam Bellver - UPC Barcelona 2018
Deep 3D Visual Analysis - Javier Ruiz-Hidalgo - UPC Barcelona 2017
Manifold learning with application to object recognition

What's hot (20)

PDF
Convolutional Neural Networks (D1L3 2017 UPC Deep Learning for Computer Vision)
PDF
crfasrnn_presentation
PDF
Deep 3D Analysis - Javier Ruiz-Hidalgo - UPC Barcelona 2018
PDF
NUMBER PLATE IMAGE DETECTION FOR FAST MOTION VEHICLES USING BLUR KERNEL ESTIM...
PDF
Joint unsupervised learning of deep representations and image clusters
PPTX
Introduction to Convolutional Neural Networks
PDF
Convolutional Neural Networks - Xavier Giro - UPC TelecomBCN Barcelona 2020
PDF
Transfer Learning and Domain Adaptation - Ramon Morros - UPC Barcelona 2018
PDF
Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018
PDF
The Gaussian Process Latent Variable Model (GPLVM)
PPT
Person re-identification, PhD Day 2011
PDF
Lifelong / Incremental Deep Learning - Ramon Morros - UPC Barcelona 2018
PDF
Simulated Annealing Algorithm for VLSI Floorplanning for Soft Blocks
PDF
Interpretability of Convolutional Neural Networks - Eva Mohedano - UPC Barcel...
PDF
#6 PyData Warsaw: Deep learning for image segmentation
PPTX
Dissimilarity-based people re-identification and search for intelligent video...
PDF
Deep Visual Saliency - Kevin McGuinness - UPC Barcelona 2017
PDF
Transfer Learning and Domain Adaptation (DLAI D5L2 2017 UPC Deep Learning for...
PDF
Steganographic Scheme Based on Message-Cover matching
PDF
Unsupervised Deep Learning (D2L1 Insight@DCU Machine Learning Workshop 2017)
Convolutional Neural Networks (D1L3 2017 UPC Deep Learning for Computer Vision)
crfasrnn_presentation
Deep 3D Analysis - Javier Ruiz-Hidalgo - UPC Barcelona 2018
NUMBER PLATE IMAGE DETECTION FOR FAST MOTION VEHICLES USING BLUR KERNEL ESTIM...
Joint unsupervised learning of deep representations and image clusters
Introduction to Convolutional Neural Networks
Convolutional Neural Networks - Xavier Giro - UPC TelecomBCN Barcelona 2020
Transfer Learning and Domain Adaptation - Ramon Morros - UPC Barcelona 2018
Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018
The Gaussian Process Latent Variable Model (GPLVM)
Person re-identification, PhD Day 2011
Lifelong / Incremental Deep Learning - Ramon Morros - UPC Barcelona 2018
Simulated Annealing Algorithm for VLSI Floorplanning for Soft Blocks
Interpretability of Convolutional Neural Networks - Eva Mohedano - UPC Barcel...
#6 PyData Warsaw: Deep learning for image segmentation
Dissimilarity-based people re-identification and search for intelligent video...
Deep Visual Saliency - Kevin McGuinness - UPC Barcelona 2017
Transfer Learning and Domain Adaptation (DLAI D5L2 2017 UPC Deep Learning for...
Steganographic Scheme Based on Message-Cover matching
Unsupervised Deep Learning (D2L1 Insight@DCU Machine Learning Workshop 2017)
Ad

Viewers also liked (7)

PDF
SAPERE Analysis tools
PDF
Software development made serious
PDF
Gradient-based Self-organisation Patterns of Anticipative Adaptation
PDF
Simulating Large-scale Aggregate MASs with Alchemist and Scala
PDF
Democratic process and electronic platforms: concerns of an engineer
PDF
Protelis: Practical Aggregate Programming - Symposium on Applied Computing (S...
PDF
Engineering Complex Computational Ecosystems (PhD defense)
SAPERE Analysis tools
Software development made serious
Gradient-based Self-organisation Patterns of Anticipative Adaptation
Simulating Large-scale Aggregate MASs with Alchemist and Scala
Democratic process and electronic platforms: concerns of an engineer
Protelis: Practical Aggregate Programming - Symposium on Applied Computing (S...
Engineering Complex Computational Ecosystems (PhD defense)
Ad

Similar to A Framework to Specify and Verify Computational Fields for Pervasive Computing Systems (20)

PDF
Distinguished Speakers - Professor Marta Kwiatkowska
PDF
Formal Verification
PDF
FScaFi: A Core Calculus for Collective Adaptive Systems Programming
PDF
Fault Tolerant Message Passing Distributed Systems An Algorithmic Approach Mi...
PDF
A Presentation of My Research Activity
ODP
From Simulation to Online Gaming: the need for adaptive solutions
PDF
Modularity for Accurate Static Analysis of Smart Contracts
PDF
Machine Learning Applications in Grid Computing
PDF
Poster chep2012 reduced_original1
PDF
Distributed Computing By Mobile Entities Current Research In Moving And Compu...
PDF
Introduction into Fault-tolerant Distributed Algorithms and their Modeling (P...
PPTX
20100522 software verification_sharygina_lecture01
PDF
overview.pdf
PPTX
High dependability of the automated systems
PDF
IMPROVEMENT OF FALSE REPORT DETECTION PERFORMANCE BASED ON INVALID DATA DETEC...
PDF
Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...
PPT
Proximity Detection in Distributed Simulation of Wireless Mobile Systems
PDF
Distributed Computing by Mobile Entities Current Research in Moving and Compu...
PDF
project(copy1)
PDF
An improvement in history based weighted voting algorithm for safety critical...
Distinguished Speakers - Professor Marta Kwiatkowska
Formal Verification
FScaFi: A Core Calculus for Collective Adaptive Systems Programming
Fault Tolerant Message Passing Distributed Systems An Algorithmic Approach Mi...
A Presentation of My Research Activity
From Simulation to Online Gaming: the need for adaptive solutions
Modularity for Accurate Static Analysis of Smart Contracts
Machine Learning Applications in Grid Computing
Poster chep2012 reduced_original1
Distributed Computing By Mobile Entities Current Research In Moving And Compu...
Introduction into Fault-tolerant Distributed Algorithms and their Modeling (P...
20100522 software verification_sharygina_lecture01
overview.pdf
High dependability of the automated systems
IMPROVEMENT OF FALSE REPORT DETECTION PERFORMANCE BASED ON INVALID DATA DETEC...
Self-Organisation Programming: a Functional Reactive Macro Approach (FRASP) [...
Proximity Detection in Distributed Simulation of Wireless Mobile Systems
Distributed Computing by Mobile Entities Current Research in Moving and Compu...
project(copy1)
An improvement in history based weighted voting algorithm for safety critical...

More from Danilo Pianini (18)

PDF
Towards adaptive trajectories for mixed autonomous and human-operated ships
PDF
Time fluid field-based Coordination
PDF
Engineering the Aggregate - Talk at Software Engineering for Intelligent and ...
PDF
Versioning and License selection
PDF
Continuous Integration
PDF
Enforce reproducibility: dependency management and build automation
PDF
Productive parallel teamwork: Decentralized Version Control Systems
PDF
Computational Fields meet Augmented Reality: Perspectives and Challenges
PDF
Practical Aggregate Programming with Protelis @ SASO2017
PDF
Towards a Foundational API for Resilient Distributed Systems Design
PDF
Continuous integration and delivery
PDF
Extending the Gillespie's Stochastic Simulation Algorithm for Integrating Dis...
PDF
Engineering computational ecosystems (2nd year PhD seminar)
PDF
From Engineer to Alchemist, There and Back Again: An Alchemist Tale
PDF
SAPERE WP1 Alchemist status at 02/2013
PDF
Engineering Computational Ecosystems
PDF
Recipes for Sabayon: cook your own Linux distro within two hours
PDF
Towards a comprehensive approach to spontaneous self-composition in pervasive...
Towards adaptive trajectories for mixed autonomous and human-operated ships
Time fluid field-based Coordination
Engineering the Aggregate - Talk at Software Engineering for Intelligent and ...
Versioning and License selection
Continuous Integration
Enforce reproducibility: dependency management and build automation
Productive parallel teamwork: Decentralized Version Control Systems
Computational Fields meet Augmented Reality: Perspectives and Challenges
Practical Aggregate Programming with Protelis @ SASO2017
Towards a Foundational API for Resilient Distributed Systems Design
Continuous integration and delivery
Extending the Gillespie's Stochastic Simulation Algorithm for Integrating Dis...
Engineering computational ecosystems (2nd year PhD seminar)
From Engineer to Alchemist, There and Back Again: An Alchemist Tale
SAPERE WP1 Alchemist status at 02/2013
Engineering Computational Ecosystems
Recipes for Sabayon: cook your own Linux distro within two hours
Towards a comprehensive approach to spontaneous self-composition in pervasive...

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPT
Teaching material agriculture food technology
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
cuic standard and advanced reporting.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Encapsulation_ Review paper, used for researhc scholars
MIND Revenue Release Quarter 2 2025 Press Release
20250228 LYD VKU AI Blended-Learning.pptx
Understanding_Digital_Forensics_Presentation.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Diabetes mellitus diagnosis method based random forest with bat algorithm
Chapter 3 Spatial Domain Image Processing.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Teaching material agriculture food technology
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
cuic standard and advanced reporting.pdf
Spectral efficient network and resource selection model in 5G networks
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Approach and Philosophy of On baking technology

A Framework to Specify and Verify Computational Fields for Pervasive Computing Systems

  • 1. Toward Approximate Stochastic Model Checking of Computational Fields for Pervasive Computing Systems Matteo Casadei, Mirko Viroli {m.casadei,mirko.viroli}@unibo.it Alma Mater Studiorum—Universit` di Bologna a WOA, 19/09/2012 Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 1 / 17
  • 2. Outline Preview Problem ⇒ tackling verification in field-based self-organising systems Goal ⇒ exploiting approximate stochastic model-checking and Prism Strategy ⇒ developing a high-level language translating to Prism Use ⇒ showing few example applications and results Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 2 / 17
  • 3. Motivating Setting An abstract network model for pervasive computing A set of interconnected nodes situated in space Each node asynchronously interacts with a small neighbourhood Topology can be very dynamic due to mobility and faults Example problem Node n advertises an event in a large locality L(n) An “annotation” (tuple, data) in m ∈ L(n) then moves towards n General application scenarios – many rooted in SAPERE Steering people in pervasive computing scenarios [6] Message routing in wireless sensor networks [2] Mobile robot applications [1] Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 3 / 17
  • 4. Motivating Setting An abstract network model for pervasive computing A set of interconnected nodes situated in space Each node asynchronously interacts with a small neighbourhood Topology can be very dynamic due to mobility and faults Example problem Node n advertises an event in a large locality L(n) An “annotation” (tuple, data) in m ∈ L(n) then moves towards n General application scenarios – many rooted in SAPERE Steering people in pervasive computing scenarios [6] Message routing in wireless sensor networks [2] Mobile robot applications [1] Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 3 / 17
  • 5. Motivating Setting An abstract network model for pervasive computing A set of interconnected nodes situated in space Each node asynchronously interacts with a small neighbourhood Topology can be very dynamic due to mobility and faults Example problem Node n advertises an event in a large locality L(n) An “annotation” (tuple, data) in m ∈ L(n) then moves towards n General application scenarios – many rooted in SAPERE Steering people in pervasive computing scenarios [6] Message routing in wireless sensor networks [2] Mobile robot applications [1] Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 3 / 17
  • 6. A solution by so-called “Computational Fields” [4] Mapping nodes to values (suggests a continuum space-time viewpoint) Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 4 / 17
  • 7. A solution by so-called “Computational Fields” [4] Mapping nodes to values (suggests a continuum space-time viewpoint) Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 4 / 17
  • 8. A solution by so-called “Computational Fields” [4] Mapping nodes to values (suggests a continuum space-time viewpoint) Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 4 / 17
  • 9. A solution by so-called “Computational Fields” [4] Mapping nodes to values (suggests a continuum space-time viewpoint) Other structures (channel, shrinking crown, partition, shadow) Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 4 / 17
  • 10. Computational Fields and emergence Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 5 / 17
  • 11. The predictability/controllability issue Any guarantee about “appropriateness”? Will the computational field stabilise? (or can it diverge?) Will the computational field have the proper shape? Will people be steered until eventually reaching the POI? Approaches to assess properties Formal proof: difficult to find, typically ad-hoc Simulation: the standard-de-facto, often hard to be fully trusted Automatic Verification (model-checking): shortly impractical Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 6 / 17
  • 12. The predictability/controllability issue Any guarantee about “appropriateness”? Will the computational field stabilise? (or can it diverge?) Will the computational field have the proper shape? Will people be steered until eventually reaching the POI? Approaches to assess properties Formal proof: difficult to find, typically ad-hoc Simulation: the standard-de-facto, often hard to be fully trusted Automatic Verification (model-checking): shortly impractical Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 6 / 17
  • 13. A solution between Simulation and Automatic Verification Approximate Stochastic Model Checking [3] (A-SMC) Tackle the state-space explosion, probabilistically: Explore a subset of state-space through a (possibly high) number of stochastic simulations (requires less time and less space than MC) Result: probability for the property to hold, with known confidence Three key parameters 1 Number of independent simulation runs N 2 Approximation : the desired precision on the obtained probability 3 Confidence factor δ: probability that approximation is not met ⇒ (Definition of and δ: Prob[|Mexact − Mapprox | ≤ ] ≥ 1 − δ) ⇒ Parameters are linked: N ≥ 4log ( 2 )/ δ 2 ⇒ Our choice: = 0.01, δ = 0.01, N 90 000. Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 7 / 17
  • 14. A solution between Simulation and Automatic Verification Approximate Stochastic Model Checking [3] (A-SMC) Tackle the state-space explosion, probabilistically: Explore a subset of state-space through a (possibly high) number of stochastic simulations (requires less time and less space than MC) Result: probability for the property to hold, with known confidence Three key parameters 1 Number of independent simulation runs N 2 Approximation : the desired precision on the obtained probability 3 Confidence factor δ: probability that approximation is not met ⇒ (Definition of and δ: Prob[|Mexact − Mapprox | ≤ ] ≥ 1 − δ) ⇒ Parameters are linked: N ≥ 4log ( 2 )/ δ 2 ⇒ Our choice: = 0.01, δ = 0.01, N 90 000. Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 7 / 17
  • 15. A solution between Simulation and Automatic Verification Approximate Stochastic Model Checking [3] (A-SMC) Tackle the state-space explosion, probabilistically: Explore a subset of state-space through a (possibly high) number of stochastic simulations (requires less time and less space than MC) Result: probability for the property to hold, with known confidence Three key parameters 1 Number of independent simulation runs N 2 Approximation : the desired precision on the obtained probability 3 Confidence factor δ: probability that approximation is not met ⇒ (Definition of and δ: Prob[|Mexact − Mapprox | ≤ ] ≥ 1 − δ) ⇒ Parameters are linked: N ≥ 4log ( 2 )/ δ 2 ⇒ Our choice: = 0.01, δ = 0.01, N 90 000. Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 7 / 17
  • 16. PRISM (www.prismmodelchecker.org) The reference tool for A-SMC Widely used: biochemistry, games, protocols, coordination Support for Continuous Stochastic Logic (CSL) and CTMC The “module” linguistic construct in PRISM: State – A small set of bounded numerical variables Behaviour – A small set of condition-action transitions Network – Can write many modules, also by clone & rename Synchronisation – Can influence other modules via synch. transitions Limits of PRISM as front-end language to our ends ⇒ No first-class support for true (large, dynamic, ad-hoc) topologies ⇒ No first-class support for node-to-node communications Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 8 / 17
  • 17. PRISM (www.prismmodelchecker.org) The reference tool for A-SMC Widely used: biochemistry, games, protocols, coordination Support for Continuous Stochastic Logic (CSL) and CTMC The “module” linguistic construct in PRISM: State – A small set of bounded numerical variables Behaviour – A small set of condition-action transitions Network – Can write many modules, also by clone & rename Synchronisation – Can influence other modules via synch. transitions Limits of PRISM as front-end language to our ends ⇒ No first-class support for true (large, dynamic, ad-hoc) topologies ⇒ No first-class support for node-to-node communications Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 8 / 17
  • 18. A PRISM-based framework Three inputs Specification of a node (state + behaviour + interaction) Specification of a topology (grid, torus, ad-hoc, and the like) Specification of a formula to verify (CSL + node quantification) Two outputs (Big) PRISM specification (basically obtained by expansion) PRISM formula to verify Then.. PRISM is used as usual to run modelchecking Specifying ,δ and N Charting probability of truth for different parameters Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 9 / 17
  • 19. The hop-count gradient case Node specification pump : [0..1]; field : [0..MAX]; [] pump=1 & field>0 -- 1.0 --> field’= 0; [diff] pump=0 -- 1.0 --> field’= min[@.field]+1; Referencing neighbours min[@.field]: minimum value of field in neighbours An example on a “random torus” Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 10 / 17
  • 20. The hop-count gradient case Node specification pump : [0..1]; field : [0..MAX]; [] pump=1 & field>0 -- 1.0 --> field’= 0; [diff] pump=0 -- 1.0 --> field’= min[@.field]+1; PRISM specification (grid topology, node 11, having neighbours 13,21,31) module node1_1 pump1_1 : [0..1] init 1; field1_1 : [0..MAX] init MAX; [] pump1_1>0 & field1_1>0 -> 1.0 : field1_1’ = 0; [diff_1_1] pump1_1=0 -> 1.0 : field1_1’ = min(field1_3,field2_1,field3_1)+1; endmodule module node1_2=node1_1 [ diff_1_1=diff_1_2, pump1_1=pump1_2, ..] endmodule module node2_1=node1_1 [ diff_1_1=diff_2_1, ..] endmodule ... Property to verify and query (stabilisation within “k” time units) property "stab" = forall[(pump=0 & field=min(@.field)+1) | (pump=1 & field=0)]; P=? [F<=k "stab"] % F is bounded-eventually operator of temporal logics Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 11 / 17
  • 21. Simulation Charting probability of convergence within k time units ⇒ Result: stabilisation is reached linearly in the network diameter ⇒ This simulation takes about 2 hours on a 2.66 Ghz Dual-Core PC.. Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 12 / 17
  • 22. A random walk – showing node synchronisation Node specification v : [0..1]; [move] v=1 & N:=&any[@.v=0] -- 1.0 --> v’=0 & N.v’=1; Referencing neighbours any[@.v=0]: any neighbour having v set to 0 PRISM specification (node 1, having neighbours 2,3) module node_1 v_1 : [0..1] init 1; [move_1_2] v_1 = 1 & v_2 = 0 -> 1.0 : (v_1’=0); % one per outgoing neighbour [move_1_3] v_1 = 1 & v_3 = 0 -> 1.0 : (v_1’=0); [move_2_1] true -> 1.0 : (v_1’=1); % one per incoming neighbour [move_3_1] true -> 1.0 : (v_1’=1); endmodule module node_2 .. endmodule module node_3 .. endmodule Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 13 / 17
  • 23. Language Syntax Module specification S ::= D T % Specification D ::= X : [n_l..n_u]; % Variable def T ::= [L] P --e--> A; % Transition A ::= V’=e % Assignment P ::= b | M:=&f[e] | M:=&f[b] % Precondition f ::= any | min | max % Selection function e ::= r | V | (e) | e+e | e-e | e*e | -e | f[e] % exp b ::= e<=e | e<e | e>=e | e>e | e=e | e!=e % bool exp V ::= X | M.X | @.X % Variable r ::= <real-num> % (real) Number n ::= <int-num> % (integer) Number L ::= <literal> % Label X ::= <literal> % Variable name M ::= <literal> % Node variable Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 14 / 17
  • 24. A more involved example – channel structure Node specification source : [0..1]; fs : [0..MAX]; target : [0..1]; ft : [0..MAX]; distance : [0..MAX]; range : [0..MAX]; channel : [0..1]; [] source=1 & fs>0 -- 100.0 --> fs’= 0 ; [sdiff] source=0 -- 1.0 --> fs’= min[@.fs]+1; [] target=1 & ft>0 -- 100.0 --> ft’= 0 ; [tdiff] target=0 -- 1.0 --> ft’= min[@.ft]+1; [dist] source=1 & ft<MAX -- 1.0 --> distance’=ft; [goss] N:=&any[@.distance>distance] -- 1.0 --> N.distance’=N.distance; [chn] channel=0 & fs+ft<distance+range -- 1.0 --> channel’=1 Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 15 / 17
  • 25. Conclusions Open issues Very hard to deal with network mobility, can simulate by: ⇒ translating links into modules ⇒ such modules activate/disactivate stochastically PRISM itself does not scale very well with size of the specification A-SMC is becoming popular in academia, but it is not yet a standard Can analyse topologies of few hundreds nodes Future works Improve the specification language – still very constrained by PRISM Integrating A-SMC in ad-hoc simulators (e.g. Alchemist [5]) Find proof methodologies for certain classes of fields Incorporate a development methodology based on A-SMC in SAPERE Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 16 / 17
  • 26. References I [1] Jonathan Bachrach, Jacob Beal, and James McLurkin. Composable continuous-space programs for robotic swarms. Neural Computing and Applications, 19(6):825–847, 2010. [2] Matteo Casadei, Mirko Viroli, and Luca Gardelli. On the collective sort problem for distributed tuple spaces. Sci. of Computer Programming, 74(9):702–722, 2009. [3] Thomas H´rault, Richard Lassaigne, Fr´d´ric Magniette, and Sylvain Peyronnet. e e e Approximate probabilistic model checking. In Bernhard Steffen and Giorgio Levi, editors, Proc. 5th International Conference on Verification, Model Checking and Abstract Interpretation (VMCAI’04), volume 2937 of Lecture Notes in Computer Science, pages 73–84. Springer, 2004. [4] Marco Mamei and Franco Zambonelli. Programming pervasive and mobile computing applications: The tota approach. ACM Trans. Softw. Eng. Methodol., 18(4):1–56, 2009. [5] Danilo Pianini, Sara Montagna, and Mirko Viroli. A chemical inspired simulation framework for pervasive services ecosystems. In Maria Ganzha, Leszek Maciaszek, and Marcin Paprzycki, editors, Proceedings of the Federated Conference on Computer Science and Information Systems, pages 675–682, Szczecin, Poland, 18-21 September 2011. IEEE Computer Society Press. [6] Mirko Viroli, Danilo Pianini, Sara Montagna, and Graeme Stevenson. Pervasive ecosystems: a coordination model based on semantic chemistry. In Sascha Ossowski, Paola Lecca, Chih-Cheng Hung, and Jiman Hong, editors, 27th Annual ACM Symposium on Applied Computing (SAC 2012), Riva del Garda, TN, Italy, 26-30 March 2012. ACM. Matteo Casadei, Mirko Viroli (UNIBO) A-SMC for Computational Fields WOA, 19/09/2012 17 / 17