quancol . ........ . . . ... ... ... ... ... ... ... - - PowerPoint PPT Presentation

quan col
SMART_READER_LITE
LIVE PREVIEW

quancol . ........ . . . ... ... ... ... ... ... ... - - PowerPoint PPT Presentation

Modelling and analysis of collective adaptive systems Michele Loreti quancol . ........ . . . ... ... ... ... ... ... ... Based on joint work with Yehia Abd Alrahman, Rocco De Nicola, Jane Hillston Annual Meeting of IFIP Working


slide-1
SLIDE 1

Modelling and analysis of collective adaptive systems

Michele Loreti

quancol . ........ . . . ... ... ... ... ... ... ...

Based on joint work with Yehia Abd Alrahman, Rocco De Nicola, Jane Hillston Annual Meeting of IFIP Working Group 2.2 Singapore, 12-16 September 2016

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 1 / 34

slide-2
SLIDE 2

Collective Systems

We are surrounded by examples of collective systems:

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 2 / 34

slide-3
SLIDE 3

Collective Systems

We are surrounded by examples of collective systems: in the natural world ....

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 2 / 34

slide-4
SLIDE 4

Collective Systems

We are surrounded by examples of collective systems: .... and in the man-made world

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 2 / 34

slide-5
SLIDE 5

Collective Systems

We are surrounded by examples of collective systems: .... and in the man-made world

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 2 / 34

slide-6
SLIDE 6

Collective Adaptive Systems

From a computer science perspective these systems can be viewed as being made up of a large number of interacting entities.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 3 / 34

slide-7
SLIDE 7

Collective Adaptive Systems

From a computer science perspective these systems can be viewed as being made up of a large number of interacting entities. Each entity may have its own properties, objectives and actions.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 3 / 34

slide-8
SLIDE 8

Collective Adaptive Systems

From a computer science perspective these systems can be viewed as being made up of a large number of interacting entities. Each entity may have its own properties, objectives and actions. At the system level these combine to create the collective behaviour.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 3 / 34

slide-9
SLIDE 9

Collective Adaptive Systems

The behaviour of the system is thus dependent on the behaviour of the individual entities.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 4 / 34

slide-10
SLIDE 10

Collective Adaptive Systems

The behaviour of the system is thus dependent on the behaviour of the individual entities.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 4 / 34

slide-11
SLIDE 11

Collective Adaptive Systems

The behaviour of the system is thus dependent on the behaviour of the individual entities.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 4 / 34

slide-12
SLIDE 12

Collective Adaptive Systems

The behaviour of the system is thus dependent on the behaviour of the individual entities. And the behaviour of the individuals will be influenced by the state of the

  • verall system.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 4 / 34

slide-13
SLIDE 13

Collective Adaptive Systems

CAS are often embedded in our environment and need to operate without centralised control or direction.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 5 / 34

slide-14
SLIDE 14

Collective Adaptive Systems

CAS are often embedded in our environment and need to operate without centralised control or direction. Moreover when conditions within the system change it may not be feasible to have human intervention to adjust behaviour appropriately.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 5 / 34

slide-15
SLIDE 15

Collective Adaptive Systems

CAS are often embedded in our environment and need to operate without centralised control or direction. Moreover when conditions within the system change it may not be feasible to have human intervention to adjust behaviour appropriately. Thus systems must be able to autonomously adapt.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 5 / 34

slide-16
SLIDE 16

Challenges for modelling CAS

Works on Process Algebra provide a solid basic framework for modelling CAS but there remain a number of challenges:

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 6 / 34

slide-17
SLIDE 17

Challenges for modelling CAS

Works on Process Algebra provide a solid basic framework for modelling CAS but there remain a number of challenges: Richer forms of interaction

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 6 / 34

slide-18
SLIDE 18

Challenges for modelling CAS

Works on Process Algebra provide a solid basic framework for modelling CAS but there remain a number of challenges: Richer forms of interaction Capturing adaptivity

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 6 / 34

slide-19
SLIDE 19

Challenges for modelling CAS

Works on Process Algebra provide a solid basic framework for modelling CAS but there remain a number of challenges: Richer forms of interaction Capturing adaptivity The influence of environment on behaviour

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 6 / 34

slide-20
SLIDE 20

Modelling and analysis of CAS

Our goal is to develop a coherent, integrated set of linguistic primitives, methods and tools to build systems that can operate in open-ended, unpredictable environments.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 7 / 34

slide-21
SLIDE 21

Modelling and analysis of CAS

Our goal is to develop a coherent, integrated set of linguistic primitives, methods and tools to build systems that can operate in open-ended, unpredictable environments.

In this talk:

1 attribute based communication for modelling interactions in CAS; 2 Carma: a language for modelling CAS; 3 a simple example.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 7 / 34

slide-22
SLIDE 22

Attribute-based communication

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 8 / 34

slide-23
SLIDE 23

Attribute-based communication

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 8 / 34

slide-24
SLIDE 24

Attribute-based communication

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 8 / 34

slide-25
SLIDE 25

Attribute-based communication

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 8 / 34

slide-26
SLIDE 26

Attribute-based communication

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 8 / 34

slide-27
SLIDE 27

Attribute-based communication

Abd Alrahman et al.1 presented a general theory for attribute based communication: AbC, a calculus for attribute-based communication; encoding of classical interaction patterns via attribute based communications; a behavioural theory for AbC.

1Yehia Abd Alrahman, Rocco De Nicola, and Michele Loreti. “On the Power of

Attribute-Based Communication”. In: FORTE 2016, Proceedings. Ed. by Elvira Albert and Ivan Lanese. Vol. 9688. Lecture Notes in Computer Science. Springer, 2016,

  • pp. 1–18.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 9 / 34

slide-28
SLIDE 28

Attribute-based communication

Abd Alrahman et al.1 presented a general theory for attribute based communication: AbC, a calculus for attribute-based communication; encoding of classical interaction patterns via attribute based communications; a behavioural theory for AbC. This work is focussed on qualitative aspects of CAS. In this talk we will focus on quantitative aspects.

1Yehia Abd Alrahman, Rocco De Nicola, and Michele Loreti. “On the Power of

Attribute-Based Communication”. In: FORTE 2016, Proceedings. Ed. by Elvira Albert and Ivan Lanese. Vol. 9688. Lecture Notes in Computer Science. Springer, 2016,

  • pp. 1–18.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 9 / 34

slide-29
SLIDE 29

Interaction patterns in CAS

Typically, CAS exhibit two kinds of interaction pattern:

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 10 / 34

slide-30
SLIDE 30

Interaction patterns in CAS

Typically, CAS exhibit two kinds of interaction pattern:

1 Spreading: one agent spreads relevant information to a given group

  • f other agents

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 10 / 34

slide-31
SLIDE 31

Interaction patterns in CAS

Typically, CAS exhibit two kinds of interaction pattern:

1 Spreading: one agent spreads relevant information to a given group

  • f other agents

Spreading: 1-to-many

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 10 / 34

slide-32
SLIDE 32

Interaction patterns in CAS

Typically, CAS exhibit two kinds of interaction pattern:

1 Spreading: one agent spreads relevant information to a given group

  • f other agents

Spreading: 1-to-many

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 10 / 34

slide-33
SLIDE 33

Interaction patterns in CAS

Typically, CAS exhibit two kinds of interaction pattern:

1 Spreading: one agent spreads relevant information to a given group

  • f other agents

Spreading: 1-to-many

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 10 / 34

slide-34
SLIDE 34

Interaction patterns in CAS

Typically, CAS exhibit two kinds of interaction pattern:

1 Spreading: one agent spreads relevant information to a given group

  • f other agents

Spreading: 1-to-many

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 10 / 34

slide-35
SLIDE 35

Interaction patterns in CAS

Typically, CAS exhibit two kinds of interaction pattern:

1 Spreading: one agent spreads relevant information to a given group

  • f other agents

2 Collecting: one agent changes its behaviour according to data

collected from one agent belonging to a given group of agents.

Spreading: 1-to-many Collecting: 1-to-1

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 10 / 34

slide-36
SLIDE 36

Interaction patterns in CAS

Typically, CAS exhibit two kinds of interaction pattern:

1 Spreading: one agent spreads relevant information to a given group

  • f other agents

2 Collecting: one agent changes its behaviour according to data

collected from one agent belonging to a given group of agents.

Spreading: 1-to-many Collecting: 1-to-1

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 10 / 34

slide-37
SLIDE 37

Interaction patterns in CAS

Typically, CAS exhibit two kinds of interaction pattern:

1 Spreading: one agent spreads relevant information to a given group

  • f other agents

2 Collecting: one agent changes its behaviour according to data

collected from one agent belonging to a given group of agents.

Spreading: 1-to-many Collecting: 1-to-1

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 10 / 34

slide-38
SLIDE 38

Interaction patterns in CAS

Typically, CAS exhibit two kinds of interaction pattern:

1 Spreading: one agent spreads relevant information to a given group

  • f other agents

2 Collecting: one agent changes its behaviour according to data

collected from one agent belonging to a given group of agents.

Spreading: 1-to-many Collecting: 1-to-1

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 10 / 34

slide-39
SLIDE 39

Interaction primitives for CAS

The following interaction primitives, all based on attribute oriented communication, can be considered for CAS:

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 11 / 34

slide-40
SLIDE 40

Interaction primitives for CAS

The following interaction primitives, all based on attribute oriented communication, can be considered for CAS: Broadcast output: a message is sent to all the components satisfying a predicate π; Broadcast input: a process is willing to receive a broadcast message from a component satisfying a predicate π;

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 11 / 34

slide-41
SLIDE 41

Interaction primitives for CAS

The following interaction primitives, all based on attribute oriented communication, can be considered for CAS: Broadcast output: a message is sent to all the components satisfying a predicate π; Broadcast input: a process is willing to receive a broadcast message from a component satisfying a predicate π; Unicast output: a message is sent to one of the components satisfying a predicate π; Unicast input: a process is willing to receive a message from a component satisfying a predicate π.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 11 / 34

slide-42
SLIDE 42

Carma: a process specification language for CAS

To support design of CAS we introduced Carma2 (Collective Adaptive Resource-sharing Markovian Agents). This is a process specification language which handles:

2Michele Loreti and Jane Hillston. “Modelling and Analysis of Collective Adaptive

Systems with CARMA and its Tools”. In: SFM 2016. Vol. 9700. Lecture Notes in Computer Science. Springer, 2016, pp. 83–119.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 12 / 34

slide-43
SLIDE 43

Carma: a process specification language for CAS

To support design of CAS we introduced Carma2 (Collective Adaptive Resource-sharing Markovian Agents). This is a process specification language which handles:

1 The behaviours of agents and their interactions;

2Michele Loreti and Jane Hillston. “Modelling and Analysis of Collective Adaptive

Systems with CARMA and its Tools”. In: SFM 2016. Vol. 9700. Lecture Notes in Computer Science. Springer, 2016, pp. 83–119.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 12 / 34

slide-44
SLIDE 44

Carma: a process specification language for CAS

To support design of CAS we introduced Carma2 (Collective Adaptive Resource-sharing Markovian Agents). This is a process specification language which handles:

1 The behaviours of agents and their interactions; 2 The global knowledge of the system and that of its agents;

2Michele Loreti and Jane Hillston. “Modelling and Analysis of Collective Adaptive

Systems with CARMA and its Tools”. In: SFM 2016. Vol. 9700. Lecture Notes in Computer Science. Springer, 2016, pp. 83–119.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 12 / 34

slide-45
SLIDE 45

Carma: a process specification language for CAS

To support design of CAS we introduced Carma2 (Collective Adaptive Resource-sharing Markovian Agents). This is a process specification language which handles:

1 The behaviours of agents and their interactions; 2 The global knowledge of the system and that of its agents; 3 The environment where agents operate. . .

2Michele Loreti and Jane Hillston. “Modelling and Analysis of Collective Adaptive

Systems with CARMA and its Tools”. In: SFM 2016. Vol. 9700. Lecture Notes in Computer Science. Springer, 2016, pp. 83–119.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 12 / 34

slide-46
SLIDE 46

Carma: a process specification language for CAS

To support design of CAS we introduced Carma2 (Collective Adaptive Resource-sharing Markovian Agents). This is a process specification language which handles:

1 The behaviours of agents and their interactions; 2 The global knowledge of the system and that of its agents; 3 The environment where agents operate. . .

taking into account open ended-ness and adaptation;

2Michele Loreti and Jane Hillston. “Modelling and Analysis of Collective Adaptive

Systems with CARMA and its Tools”. In: SFM 2016. Vol. 9700. Lecture Notes in Computer Science. Springer, 2016, pp. 83–119.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 12 / 34

slide-47
SLIDE 47

Carma: a process specification language for CAS

To support design of CAS we introduced Carma2 (Collective Adaptive Resource-sharing Markovian Agents). This is a process specification language which handles:

1 The behaviours of agents and their interactions; 2 The global knowledge of the system and that of its agents; 3 The environment where agents operate. . .

taking into account open ended-ness and adaptation; taking into account resources, locations and visibility/reachability issues.

2Michele Loreti and Jane Hillston. “Modelling and Analysis of Collective Adaptive

Systems with CARMA and its Tools”. In: SFM 2016. Vol. 9700. Lecture Notes in Computer Science. Springer, 2016, pp. 83–119.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 12 / 34

slide-48
SLIDE 48

Carma: a process specification language for CAS

To support design of CAS we introduced Carma2 (Collective Adaptive Resource-sharing Markovian Agents). This is a process specification language which handles:

1 The behaviours of agents and their interactions; 2 The global knowledge of the system and that of its agents; 3 The environment where agents operate. . .

taking into account open ended-ness and adaptation; taking into account resources, locations and visibility/reachability issues.

In Carma the execution of an action takes an exponentially distributed time; the rate of each action is determined by the environment.

2Michele Loreti and Jane Hillston. “Modelling and Analysis of Collective Adaptive

Systems with CARMA and its Tools”. In: SFM 2016. Vol. 9700. Lecture Notes in Computer Science. Springer, 2016, pp. 83–119.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 12 / 34

slide-49
SLIDE 49

CAS: Carma perspective

Collective

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 13 / 34

slide-50
SLIDE 50

CAS: Carma perspective

Collective Environment

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 13 / 34

slide-51
SLIDE 51

CAS: Carma perspective

Collective Environment Attributes

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 13 / 34

slide-52
SLIDE 52

CARMA

A Carma system consists of

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 14 / 34

slide-53
SLIDE 53

CARMA

A Carma system consists of a collective (N). . .

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 14 / 34

slide-54
SLIDE 54

CARMA

A Carma system consists of a collective (N). . . . . . operating in an environment (E ).

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 14 / 34

slide-55
SLIDE 55

CARMA

A Carma system consists of a collective (N). . . . . . operating in an environment (E ).

  • Collective. . .

is composed by a set of components, i.e. the Markovian agents that compete and/or cooperate to achieve a set of given tasks models the behavioural part of a system

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 14 / 34

slide-56
SLIDE 56

CARMA

A Carma system consists of a collective (N). . . . . . operating in an environment (E ).

  • Collective. . .

is composed by a set of components, i.e. the Markovian agents that compete and/or cooperate to achieve a set of given tasks models the behavioural part of a system

  • Environment. . .

models the rules intrinsic to the context where agents operate; mediates and regulates agent interactions.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 14 / 34

slide-57
SLIDE 57

Components

Agents in Carma are defined as components C of the form (P,γ)

  • where. . .

P is a process, representing agent behaviour; γ is a store, modelling agent knowledge.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 15 / 34

slide-58
SLIDE 58

Components

Agents in Carma are defined as components C of the form (P,γ)

  • where. . .

P is a process, representing agent behaviour; γ is a store, modelling agent knowledge.

Process Syntax:

P,Q ::= nil | act.P | P +Q | P | Q | [π]P | kill | A

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 15 / 34

slide-59
SLIDE 59

Components

Agents in Carma are defined as components C of the form (P,γ)

  • where. . .

P is a process, representing agent behaviour; γ is a store, modelling agent knowledge.

Process Syntax:

P,Q ::= nil | act.P | P +Q | P | Q | [π]P | kill | A Store γ is a mapping from attribute names to values.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 15 / 34

slide-60
SLIDE 60

Interaction primitives

Syntax

act ::= α⋆[π]− → e σ Broadcast output | α⋆[π](− → x )σ Broadcast input | α[π]− → e σ Unicast output | α[π](− → x )σ Unicast input α is an action type; π is a predicate; σ is the effect of the action on the store.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 16 / 34

slide-61
SLIDE 61

Updating the store

After the execution of an action, a process can update the component store: σ denotes a function mapping each γ to a probability distribution

  • ver possible stores.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 17 / 34

slide-62
SLIDE 62

Updating the store

After the execution of an action, a process can update the component store: σ denotes a function mapping each γ to a probability distribution

  • ver possible stores.

move⋆[π]v{x := x +U(−1,+1)}

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 17 / 34

slide-63
SLIDE 63

Updating the store

After the execution of an action, a process can update the component store: σ denotes a function mapping each γ to a probability distribution

  • ver possible stores.

move⋆[π]v{x := x +U(−1,+1)}

Remark:

Processes running in the same component can implicitly interact via the local store; Updates are instantaneous.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 17 / 34

slide-64
SLIDE 64

More on synchronisation

Predicates regulating broadcast/unicast inputs can refer also to the received values.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 18 / 34

slide-65
SLIDE 65

More on synchronisation

Predicates regulating broadcast/unicast inputs can refer also to the received values.

Example:

A value greater than 0 is expected from a component with a trust level less than 3: α⋆[(x > 0)∧(trust level < 3)](x)σ.P

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 18 / 34

slide-66
SLIDE 66

More on synchronisation

Predicates regulating broadcast/unicast inputs can refer also to the received values.

Example:

A value greater than 0 is expected from a component with a trust level less than 3: α⋆[(x > 0)∧(trust level < 3)](x)σ.P Pattern matching can be encoded in Carma.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 18 / 34

slide-67
SLIDE 67

Examples of interactions. . .

Broadcast synchronisation:

( stop⋆[bl < 5%]vσ1.P ,{role = “master”}) ( stop⋆[role = “master”](x)σ2 .Q1 ,{bl = 4%}) ( stop⋆[role = “super”](x)σ3.Q2 ,{bl = 2%}) ( stop⋆[⊤](x)σ4.Q3 ,{bl = 2%})

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 19 / 34

slide-68
SLIDE 68

Examples of interactions. . .

Broadcast synchronisation:

( stop⋆[bl < 5%]vσ1.P ,{role = “master”}) ( stop⋆[role = “master”](x)σ2 .Q1 ,{bl = 4%}) ( stop⋆[role = “super”](x)σ3.Q2 ,{bl = 2%}) ( stop⋆[⊤](x)σ4.Q3 ,{bl = 2%})

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 19 / 34

slide-69
SLIDE 69

Examples of interactions. . .

Broadcast synchronisation:

( stop⋆[bl < 5%]vσ1.P ,{role = “master”}) ( stop⋆[role = “master”](x)σ2 .Q1 ,{bl = 4%}) ( stop⋆[role = “super”](x)σ3.Q2 ,{bl = 2%}) ( stop⋆[⊤](x)σ4.Q3 ,{bl = 2%})

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 19 / 34

slide-70
SLIDE 70

Examples of interactions. . .

Broadcast synchronisation:

( stop⋆[bl < 5%]vσ1.P ,{role = “master”}) ( stop⋆[role = “master”](x)σ2 .Q1 ,{bl = 4%}) ( stop⋆[role = “super”](x)σ3.Q2 ,{bl = 2%}) ( stop⋆[⊤](x)σ4.Q3 ,{bl = 2%}) ⇓ (P,σ1({role = “master”})) (Q1[v/x],σ2({bl = 4%})) (stop⋆[role = “super”](x)σ3.Q2,{bl = 2%}) (Q3[v/x],σ4({bl = 2%}))

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 19 / 34

slide-71
SLIDE 71

Examples of interactions. . .

Broadcast synchronisation:

(stop⋆[bl < 5%]vσ1.P,{role = “master”}) (stop⋆[role = “master”](x)σ2.Q1,{bl = 45%}) (stop⋆[role = “super”](x)σ3.Q2,{bl = 2%}) (stop⋆[⊤](x)σ4.Q3,{bl = 25%})

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 20 / 34

slide-72
SLIDE 72

Examples of interactions. . .

Broadcast synchronisation:

(stop⋆[bl < 5%]vσ1.P,{role = “master”}) (stop⋆[role = “master”](x)σ2.Q1,{bl = 45%}) (stop⋆[role = “super”](x)σ3.Q2,{bl = 2%}) (stop⋆[⊤](x)σ4.Q3,{bl = 25%})

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 20 / 34

slide-73
SLIDE 73

Examples of interactions. . .

Broadcast synchronisation:

(stop⋆[bl < 5%]vσ1.P,{role = “master”}) (stop⋆[role = “master”](x)σ2.Q1,{bl = 45%}) (stop⋆[role = “super”](x)σ3.Q2,{bl = 2%}) (stop⋆[⊤](x)σ4.Q3,{bl = 25%}) ⇓ (P,σ1({role = “master”})) (stop⋆[role = “master”](x)σ2.Q1,{bl = 45%}) (stop⋆[role = “super”](x)σ3.Q2,{bl = 2%}) (stop⋆[⊤](x)σ4.Q3,{bl = 25%})

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 20 / 34

slide-74
SLIDE 74

Examples of interactions. . .

Unicast synchronisation:

(stop[bl < 5%]•σ1.P,{role = “master”}) (stop[role = “master”](x)σ2.Q1,{bl = 4%}) (stop[role = “super”](x)σ3.Q2,{bl = 2%}) (stop[⊤](x)σ4.Q3,{bl = 2%})

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 21 / 34

slide-75
SLIDE 75

Examples of interactions. . .

Unicast synchronisation:

(stop[bl < 5%]•σ1.P,{role = “master”}) (stop[role = “master”](x)σ2.Q1,{bl = 4%}) (stop[role = “super”](x)σ3.Q2,{bl = 2%}) (stop[⊤](x)σ4.Q3,{bl = 2%})

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 21 / 34

slide-76
SLIDE 76

Examples of interactions. . .

Unicast synchronisation:

(stop[bl < 5%]•σ1.P,{role = “master”}) (stop[role = “master”](x)σ2.Q1,{bl = 4%}) (stop[role = “super”](x)σ3.Q2,{bl = 2%}) (stop[⊤](x)σ4.Q3,{bl = 2%})

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 21 / 34

slide-77
SLIDE 77

Examples of interactions. . .

Unicast synchronisation:

(stop[bl < 5%]•σ1.P,{role = “master”}) (stop[role = “master”](x)σ2.Q1,{bl = 4%}) (stop[role = “super”](x)σ3.Q2,{bl = 2%}) (stop[⊤](x)σ4.Q3,{bl = 2%}) ⇓ (P,σ1({role = “master”})) (stop[role = “master”](x)σ2.Q1,{bl = 4%}) (stop[role = “super”](x)σ3.Q2,{bl = 2%}) (Q3,σ4({bl = 2%}))

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 21 / 34

slide-78
SLIDE 78

Modelling the environment

Interactions between components can be affected by the environment: a wall can inhibit wireless interactions; two components are too distant to interact; . . .

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 22 / 34

slide-79
SLIDE 79

Modelling the environment

Interactions between components can be affected by the environment: a wall can inhibit wireless interactions; two components are too distant to interact; . . . The environment. . . is used to model the intrinsic rules that govern the physical context;

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 22 / 34

slide-80
SLIDE 80

Modelling the environment

Interactions between components can be affected by the environment: a wall can inhibit wireless interactions; two components are too distant to interact; . . . The environment. . . is used to model the intrinsic rules that govern the physical context; consists of a pair (γ,ρ):

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 22 / 34

slide-81
SLIDE 81

Modelling the environment

Interactions between components can be affected by the environment: a wall can inhibit wireless interactions; two components are too distant to interact; . . . The environment. . . is used to model the intrinsic rules that govern the physical context; consists of a pair (γ,ρ):

a global store γ, that models the overall state of the system;

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 22 / 34

slide-82
SLIDE 82

Modelling the environment

Interactions between components can be affected by the environment: a wall can inhibit wireless interactions; two components are too distant to interact; . . . The environment. . . is used to model the intrinsic rules that govern the physical context; consists of a pair (γ,ρ):

a global store γ, that models the overall state of the system; an evolution rule ρ that regulates component interactions (receiving probabilities, action rates,. . . ).

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 22 / 34

slide-83
SLIDE 83

The evolution rule

It is assumed that all actions in Carma take some time complete and that this duration is governed by an exponential distribution.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 23 / 34

slide-84
SLIDE 84

The evolution rule

It is assumed that all actions in Carma take some time complete and that this duration is governed by an exponential distribution. However the action descriptions do not include any information about the timing (unlike many other stochastic process algebras).

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 23 / 34

slide-85
SLIDE 85

The evolution rule

It is assumed that all actions in Carma take some time complete and that this duration is governed by an exponential distribution. However the action descriptions do not include any information about the timing (unlike many other stochastic process algebras). We also do not assume perfect communication, i.e. there may be a probability that an interaction will fail to complete even between components with appropriately match attributes.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 23 / 34

slide-86
SLIDE 86

The evolution rule

It is assumed that all actions in Carma take some time complete and that this duration is governed by an exponential distribution. However the action descriptions do not include any information about the timing (unlike many other stochastic process algebras). We also do not assume perfect communication, i.e. there may be a probability that an interaction will fail to complete even between components with appropriately match attributes. The environment manages these aspects of system behaviour, and others in the evolution rule.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 23 / 34

slide-87
SLIDE 87

The evolution rule ρ

ρ is a function, dependent on current time, the global store and the current state of the collective, returns a tuple of functions ε = µp,µw,µr,µu known as the evaluation context µp(γs,γr,α): the probability that a component with store γr can receive a broadcast message α from a component with store γs; µw(γs,γr,α): the weight to be used to compute the probability that a component with store γr can receive a unicast message α from a component with store γs; µr(γs,α) computes the execution rate of action α executed at a component with store γs; µu(γs,α) determines the updates on the environment (global store and collective) induced by the execution of action α at a component with store γs.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 24 / 34

slide-88
SLIDE 88

Carma Operational Semantics

The operational semantics of Carma specifications is defined in terms of three functions that compute the possible next states of a component, a collective and a system:

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 25 / 34

slide-89
SLIDE 89

Carma Operational Semantics

The operational semantics of Carma specifications is defined in terms of three functions that compute the possible next states of a component, a collective and a system:

1 the function C that describes the behaviour of a single component;

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 25 / 34

slide-90
SLIDE 90

Carma Operational Semantics

The operational semantics of Carma specifications is defined in terms of three functions that compute the possible next states of a component, a collective and a system:

1 the function C that describes the behaviour of a single component; 2 the function Nε builds on C to describe the behaviour of collectives;

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 25 / 34

slide-91
SLIDE 91

Carma Operational Semantics

The operational semantics of Carma specifications is defined in terms of three functions that compute the possible next states of a component, a collective and a system:

1 the function C that describes the behaviour of a single component; 2 the function Nε builds on C to describe the behaviour of collectives; 3 the function St that shows how Carma systems evolve.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 25 / 34

slide-92
SLIDE 92

Quantitative Analysis

The semantics of carma gives rise to a Continuous Time Markov Chain (CTMC). This can be analysed by by numerical analysis of the CTMC for small systems; by stochastic simulation of the CTMC; by fluid approximation of the CTMC under certain restrictions (particularly on the environment).

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 26 / 34

slide-93
SLIDE 93

A running example. . .

Bike Sharing System. . .

We want to use Carma to model a bike sharing system where: bikes are made available in a number of stations that are placed in various areas of a city; Users that plan to use a bike for a short trip

can pick up a bike at a suitable origin station return it to any other station close to their planned destination.

we assume that the city is partitioned in homogeneous zones. . .

and that all the stations in the same zone can be equivalently used by any user in that zone.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 27 / 34

slide-94
SLIDE 94

CaSL: Component Prototypes

The BSS scenario. . .

Two kinds of components, one for each of the two groups of agents involved in our BSS, can be considered: parking stations; users.

PS attributes:

zone: indicates where the station is located; capacity: the number of slots installed in the station; available: the number of available bikes.

User attributes:

zone: current user location; dest: user destination.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 28 / 34

slide-95
SLIDE 95

The Carma Eclipse Plug-in

http://quanticol.sourceforge.net/

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 29 / 34

slide-96
SLIDE 96

CaSL: BSS Analysis

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 30 / 34

slide-97
SLIDE 97

CaSL: BSS Analysis

In this scenario the use of stations is not well balanced!

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 30 / 34

slide-98
SLIDE 98

CaSL: an alternative model for BSS

To overcome this problem we can consider a model where stations located at the same zone do not compete but cooperate.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 31 / 34

slide-99
SLIDE 99

CaSL: an alternative model for BSS

To overcome this problem we can consider a model where stations located at the same zone do not compete but cooperate. We consider a variant of stations that, when located at the same zone, interact to avoid unbalanced use of resources.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 31 / 34

slide-100
SLIDE 100

CaSL: an alternative model for BSS

To overcome this problem we can consider a model where stations located at the same zone do not compete but cooperate. We consider a variant of stations that, when located at the same zone, interact to avoid unbalanced use of resources. Each station can use broadcast to advertise other agents about the use of resources!

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 31 / 34

slide-101
SLIDE 101

CaSL: modified BSS model Analysis

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 32 / 34

slide-102
SLIDE 102

Concluding remarks

Collective Systems are an interesting and challenging class of systems to design and construct.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 33 / 34

slide-103
SLIDE 103

Concluding remarks

Collective Systems are an interesting and challenging class of systems to design and construct. Their role within infrastructure, such as within smart cities, make it essential that quantitative aspects of behaviour are taken into consideration, as well as functional correctness.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 33 / 34

slide-104
SLIDE 104

Concluding remarks

Collective Systems are an interesting and challenging class of systems to design and construct. Their role within infrastructure, such as within smart cities, make it essential that quantitative aspects of behaviour are taken into consideration, as well as functional correctness. The complexity of these systems poses challenges both for model construction and model analysis.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 33 / 34

slide-105
SLIDE 105

Concluding remarks

Collective Systems are an interesting and challenging class of systems to design and construct. Their role within infrastructure, such as within smart cities, make it essential that quantitative aspects of behaviour are taken into consideration, as well as functional correctness. The complexity of these systems poses challenges both for model construction and model analysis. carma aims to address many of these challenges, supporting rich forms of interaction, using attributes to capture explicit locations and the environment to allow adaptivity.

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 33 / 34

slide-106
SLIDE 106

Michele Loreti (UniFi) Modelling and analysis of CAS IFIP WG 2.2 34 / 34