Ensemble-oriented programming of self-adaptive
systems
Michele Loreti
Dipartimento di Statistica, Informatica, Applicazioni
Universit`a degli Studi di Firenze
AWASS 2013, Lucca, June 24-28, 2013
www.ascens-ist.eu
Ensemble-oriented programming of self-adaptive
systems: the E-Vehicle Case Study
Michele Loreti
Dipartimento di Statistica, Informatica, Applicazioni
Universit`a degli Studi di Firenze
AWASS 2013, Lucca, June 24-28, 2013
www.ascens-ist.eu
Outline. . .
Michele Loreti 2
Outline. . .
Motivations;
Michele Loreti 2
Outline. . .
Motivations;
E-Vehicle Case Study: a short overview;
Michele Loreti 2
Outline. . .
Motivations;
E-Vehicle Case Study: a short overview;
Basic ingredients of:
Michele Loreti 2
Outline. . .
Motivations;
E-Vehicle Case Study: a short overview;
Basic ingredients of:
SCEL, a Service Component Ensemble Langugage;
Michele Loreti 2
Outline. . .
Motivations;
E-Vehicle Case Study: a short overview;
Basic ingredients of:
SCEL, a Service Component Ensemble Langugage;
jRESP, a framework for executing SCEL applications in Java;
Michele Loreti 2
Outline. . .
Motivations;
E-Vehicle Case Study: a short overview;
Basic ingredients of:
SCEL, a Service Component Ensemble Langugage;
jRESP, a framework for executing SCEL applications in Java;
E-Vehicle Case Study in SCEL and jRESP: a tentative roadmap.
Michele Loreti 2
Challenges of Ensembles Programming
Michele Loreti 3
Challenges of Ensembles Programming
Ensembles are software-intensive systems featuring
massive numbers of components
complex interactions among components, and with other systems
operating in open and non-deterministic environments
dynamically adapting to new requirements, technologies and
environmental conditions
From the final report of: IST Coordinated Action InterLink [2007].
Michele Loreti 3
Challenges of Ensembles Programming
Ensembles are software-intensive systems featuring
massive numbers of components
complex interactions among components, and with other systems
operating in open and non-deterministic environments
dynamically adapting to new requirements, technologies and
environmental conditions
From the final report of: IST Coordinated Action InterLink [2007].
Challenges for software development for ensembles
Michele Loreti 3
Challenges of Ensembles Programming
Ensembles are software-intensive systems featuring
massive numbers of components
complex interactions among components, and with other systems
operating in open and non-deterministic environments
dynamically adapting to new requirements, technologies and
environmental conditions
From the final report of: IST Coordinated Action InterLink [2007].
Challenges for software development for ensembles
the dimension of the systems
Michele Loreti 3
Challenges of Ensembles Programming
Ensembles are software-intensive systems featuring
massive numbers of components
complex interactions among components, and with other systems
operating in open and non-deterministic environments
dynamically adapting to new requirements, technologies and
environmental conditions
From the final report of: IST Coordinated Action InterLink [2007].
Challenges for software development for ensembles
the dimension of the systems
the need to adapt to changing environments and requirements
Michele Loreti 3
Challenges of Ensembles Programming
Ensembles are software-intensive systems featuring
massive numbers of components
complex interactions among components, and with other systems
operating in open and non-deterministic environments
dynamically adapting to new requirements, technologies and
environmental conditions
From the final report of: IST Coordinated Action InterLink [2007].
Challenges for software development for ensembles
the dimension of the systems
the need to adapt to changing environments and requirements
the emergent behaviour resulting from complex interactions
Michele Loreti 3
Challenges of Ensembles Programming
Ensembles are software-intensive systems featuring
massive numbers of components
complex interactions among components, and with other systems
operating in open and non-deterministic environments
dynamically adapting to new requirements, technologies and
environmental conditions
From the final report of: IST Coordinated Action InterLink [2007].
Challenges for software development for ensembles
the dimension of the systems
the need to adapt to changing environments and requirements
the emergent behaviour resulting from complex interactions
the uncertainty during design-time and run-time
Michele Loreti 3
Component Ensembles and Awareness
Michele Loreti 4
Component Ensembles and Awareness
Components and Ensembles
Service components (SCs) and service-component ensembles (SCEs)
permit to dynamically structure independent, distributed entities that can
cooperate, with different roles, in open and non-deterministic environments
Michele Loreti 4
Component Ensembles and Awareness
Components and Ensembles
Service components (SCs) and service-component ensembles (SCEs)
permit to dynamically structure independent, distributed entities that can
cooperate, with different roles, in open and non-deterministic environments
Awareness
Awareness of Service Components is achieved by
Michele Loreti 4
Component Ensembles and Awareness
Components and Ensembles
Service components (SCs) and service-component ensembles (SCEs)
permit to dynamically structure independent, distributed entities that can
cooperate, with different roles, in open and non-deterministic environments
Awareness
Awareness of Service Components is achieved by
equipping SCs with information about their own state
Michele Loreti 4
Component Ensembles and Awareness
Components and Ensembles
Service components (SCs) and service-component ensembles (SCEs)
permit to dynamically structure independent, distributed entities that can
cooperate, with different roles, in open and non-deterministic environments
Awareness
Awareness of Service Components is achieved by
equipping SCs with information about their own state
enabling SCs to get information on their working environment
Michele Loreti 4
Component Ensembles and Awareness
Components and Ensembles
Service components (SCs) and service-component ensembles (SCEs)
permit to dynamically structure independent, distributed entities that can
cooperate, with different roles, in open and non-deterministic environments
Awareness
Awareness of Service Components is achieved by
equipping SCs with information about their own state
enabling SCs to get information on their working environment
allowing SCs to use this information for restructuring and adapting
Michele Loreti 4
Component Ensembles and Awareness
Components and Ensembles
Service components (SCs) and service-component ensembles (SCEs)
permit to dynamically structure independent, distributed entities that can
cooperate, with different roles, in open and non-deterministic environments
Awareness
Awareness of Service Components is achieved by
equipping SCs with information about their own state
enabling SCs to get information on their working environment
allowing SCs to use this information for restructuring and adapting
Awareness makes SCs adaptable, connectable and composeable.
Michele Loreti 4
Case study: E-Vehicle Case Study
Michele Loreti 5
Case study: E-Vehicle Case Study
We consider a car pooling system where motorized mobility for users and
privately owned vehicles have to be coordinated in order to satisfy user
requirements and to guarantee an (possibly) optimal allocation of
resources.
Michele Loreti 5
Case study: E-Vehicle Case Study
We consider a car pooling system where motorized mobility for users and
privately owned vehicles have to be coordinated in order to satisfy user
requirements and to guarantee an (possibly) optimal allocation of
resources.
We will use SCEL to specify system behaviour while jRESP, its runtime
environment, will be used to develop a prototype implementation in Java.
Michele Loreti 5
E-Vehicle Case Study. . .
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
User:
A user is an active unit of the system. Given its daily calendar of activities
a user:
plans its journey
books parking lots/charging stations
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
User:
A user is an active unit of the system. Given its daily calendar of activities
a user:
plans its journey
books parking lots/charging stations
this task is performed in collaboration with the associated vehicle.
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
vehicles;
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
vehicles;
Vehicle:
A vehicle can:
move towards destinations,
use the vehicle travel planner to plan the journey,
book parking lots and charging stations.
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
vehicles;
A vehicle also monitors:
the current traffic and road feasibility,
fuel consumption,
and parking lot/charging station availability.
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
vehicles;
parking lots;
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
vehicles;
parking lots;
Parking lots
A parking lot is an infrastructure unit of the system:
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
vehicles;
parking lots;
Parking lots
A parking lot is an infrastructure unit of the system:
It can be booked (and unbooked) by vehicles.
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
vehicles;
parking lots;
Parking lots
A parking lot is an infrastructure unit of the system:
It can be booked (and unbooked) by vehicles.
A single parking lot can be booked by a single vehicle at a time.
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
vehicles;
parking lots;
charging stations.
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
vehicles;
parking lots;
charging stations.
Charging stations:
A charging station is an infrastructure unit of the system:
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
vehicles;
parking lots;
charging stations.
Charging stations:
A charging station is an infrastructure unit of the system:
It is used by electric vehicles in order to recharge their batteries.
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
vehicles;
parking lots;
charging stations.
Charging stations:
A charging station is an infrastructure unit of the system:
It is used by electric vehicles in order to recharge their batteries.
A single charging station can be booked by a single vehicle at a time.
Michele Loreti 6
E-Vehicle Case Study. . .
In the E-Vehicle Case Study the following entities cooperate:
users;
vehicles;
parking lots;
charging stations.
Charging stations:
A charging station is an infrastructure unit of the system:
It is used by electric vehicles in order to recharge their batteries.
A single charging station can be booked by a single vehicle at a time.
Similar to the booking of parking lots, it is usually possible for vehicles
to book a charging station in advance.
Michele Loreti 6
E-Vehicle Case Study. . .
2
Main Success Scenario
P1
P2
P3
P4
P5
POI1
POI2
POI3
POI4
POI2
POI1
POI3
Calendar
9:00
10:00
12:00
14:00
16:00
POIj = j-th point of interest Pi
P1
= i-th parking lot
Michele Loreti 7
Programming Ensembles. . .
Michele Loreti 8
Programming Ensembles. . .
SCEL is a speficiation/programming language equipped with
Michele Loreti 8
Programming Ensembles. . .
SCEL is a speficiation/programming language equipped with
programming abstractions necessary for
directly representing Knowledge, Behaviors and Aggregations according
to specific Policies
naturally programming interaction, adaptation and self- and context-
awareness
Michele Loreti 8
Programming Ensembles. . .
SCEL is a speficiation/programming language equipped with
programming abstractions necessary for
directly representing Knowledge, Behaviors and Aggregations according
to specific Policies
naturally programming interaction, adaptation and self- and context-
awareness
linguistic primitives with solid semantic grounds
To develop logics, tools and methodologies for formal reasoning on
systems behavior
to establish qualitative and quantitative properties of both the
individual components and the ensembles
Michele Loreti 8
SCEL: programming abstractions
The Service-Component Ensemble Language (SCEL) currently provides
primitives and constructs for dealing with:
Michele Loreti 9
SCEL: programming abstractions
The Service-Component Ensemble Language (SCEL) currently provides
primitives and constructs for dealing with:
1 Knowledge: to describe how data, information and (local and global)
knowledge is managed
Michele Loreti 9
SCEL: programming abstractions
The Service-Component Ensemble Language (SCEL) currently provides
primitives and constructs for dealing with:
1 Knowledge: to describe how data, information and (local and global)
knowledge is managed
2 Behaviours: to describe how systems of components progress
Michele Loreti 9
SCEL: programming abstractions
The Service-Component Ensemble Language (SCEL) currently provides
primitives and constructs for dealing with:
1 Knowledge: to describe how data, information and (local and global)
knowledge is managed
2 Behaviours: to describe how systems of components progress
3 Aggregations: to describe how different entities are brought together
to form components, systems and ensembles
Michele Loreti 9
SCEL: programming abstractions
The Service-Component Ensemble Language (SCEL) currently provides
primitives and constructs for dealing with:
1 Knowledge: to describe how data, information and (local and global)
knowledge is managed
2 Behaviours: to describe how systems of components progress
3 Aggregations: to describe how different entities are brought together
to form components, systems and ensembles
4 Policies: to model and enforce the wanted evolutions of computations.
Michele Loreti 9
A SCEL component
Knowledge
K
Processes
P
I Interface
Π
Policies
Michele Loreti 10
A SCEL component
Knowledge
K
Processes
P
I Interface
Π
Policies
Component interface provides information about the component itself.
This information is rendered as a set of attributes whose values can be
derived from the knowledge.
Michele Loreti 10
Predicate-based ensembles
In order to guarantee the maximum degree of flexibility, ensembles are
rendered in terms of predicate-based communication primitives that select
the targets among those enjoying specific properties.
Michele Loreti 11
Predicate-based ensembles
In order to guarantee the maximum degree of flexibility, ensembles are
rendered in terms of predicate-based communication primitives that select
the targets among those enjoying specific properties.
Michele Loreti 11
E-Vehicle Case Study (in SCEL). . .
Michele Loreti 12
E-Vehicle Case Study (in SCEL). . .
9
Parking Lots close to
POIs as Ensembles
POI1
POI2
POI3
POI2
POI1
POI3
Calendar
9:00
10:00
12:00
14:00
16:00
P1
P2
P3
P5
ATTRIBUTES
●
type: parking lot component
●
position: position of the park
●
...
Michele Loreti 12
E-Vehicle Case Study (in SCEL). . .
Michele Loreti 13
jRESP
A Run-time Environment for SCEL Programs
Basic design principles. . .
1 no centralized control
2 heavy use of recurrent patterns to simply the development of specific
knowledge
a single interface that contains basic methods to interact with
knowledge
policies
based on the pattern composite (policies are structured as a stack)
. . .
3 use of open technologies to support the integration with other
tools/frameworks or with alternative implementations of SCEL
Michele Loreti 14
SCEL component
Hardware/Virtual Machine
Networks
Input devices/Sensors
(GPS, Temperature, Battery level,CPU load. . . )
Output devices/Actuators
SCEL Processes (Threads)
Policies
Knowledge
Attr.
Ports
Michele Loreti 15
E-Vehicle Case Study in SCEL
A possible roadmap. . .
Michele Loreti 16
E-Vehicle Case Study in SCEL
A possible roadmap. . .
1 Identify basic information elements (attributes) to use for
coordinating the interactions among components;
Michele Loreti 16
E-Vehicle Case Study in SCEL
A possible roadmap. . .
1 Identify basic information elements (attributes) to use for
coordinating the interactions among components;
2 Design component behaviours in terms of SCEL processes;
Michele Loreti 16
E-Vehicle Case Study in SCEL
A possible roadmap. . .
1 Identify basic information elements (attributes) to use for
coordinating the interactions among components;
2 Design component behaviours in terms of SCEL processes;
3 Develop a jRESP application for supporting/controlling activities of
involved agents;
Michele Loreti 16
E-Vehicle Case Study in SCEL
A possible roadmap. . .
1 Identify basic information elements (attributes) to use for
coordinating the interactions among components;
2 Design component behaviours in terms of SCEL processes;
3 Develop a jRESP application for supporting/controlling activities of
involved agents;
4 Present the obtained results in a simulation environment.
Michele Loreti 16
Good work!
Michele Loreti 17

Ensemble-oriented programming of self-adaptive systems - Michele Loreti

  • 1.
    Ensemble-oriented programming ofself-adaptive systems Michele Loreti Dipartimento di Statistica, Informatica, Applicazioni Universit`a degli Studi di Firenze AWASS 2013, Lucca, June 24-28, 2013 www.ascens-ist.eu
  • 2.
    Ensemble-oriented programming ofself-adaptive systems: the E-Vehicle Case Study Michele Loreti Dipartimento di Statistica, Informatica, Applicazioni Universit`a degli Studi di Firenze AWASS 2013, Lucca, June 24-28, 2013 www.ascens-ist.eu
  • 3.
  • 4.
  • 5.
    Outline. . . Motivations; E-VehicleCase Study: a short overview; Michele Loreti 2
  • 6.
    Outline. . . Motivations; E-VehicleCase Study: a short overview; Basic ingredients of: Michele Loreti 2
  • 7.
    Outline. . . Motivations; E-VehicleCase Study: a short overview; Basic ingredients of: SCEL, a Service Component Ensemble Langugage; Michele Loreti 2
  • 8.
    Outline. . . Motivations; E-VehicleCase Study: a short overview; Basic ingredients of: SCEL, a Service Component Ensemble Langugage; jRESP, a framework for executing SCEL applications in Java; Michele Loreti 2
  • 9.
    Outline. . . Motivations; E-VehicleCase Study: a short overview; Basic ingredients of: SCEL, a Service Component Ensemble Langugage; jRESP, a framework for executing SCEL applications in Java; E-Vehicle Case Study in SCEL and jRESP: a tentative roadmap. Michele Loreti 2
  • 10.
    Challenges of EnsemblesProgramming Michele Loreti 3
  • 11.
    Challenges of EnsemblesProgramming Ensembles are software-intensive systems featuring massive numbers of components complex interactions among components, and with other systems operating in open and non-deterministic environments dynamically adapting to new requirements, technologies and environmental conditions From the final report of: IST Coordinated Action InterLink [2007]. Michele Loreti 3
  • 12.
    Challenges of EnsemblesProgramming Ensembles are software-intensive systems featuring massive numbers of components complex interactions among components, and with other systems operating in open and non-deterministic environments dynamically adapting to new requirements, technologies and environmental conditions From the final report of: IST Coordinated Action InterLink [2007]. Challenges for software development for ensembles Michele Loreti 3
  • 13.
    Challenges of EnsemblesProgramming Ensembles are software-intensive systems featuring massive numbers of components complex interactions among components, and with other systems operating in open and non-deterministic environments dynamically adapting to new requirements, technologies and environmental conditions From the final report of: IST Coordinated Action InterLink [2007]. Challenges for software development for ensembles the dimension of the systems Michele Loreti 3
  • 14.
    Challenges of EnsemblesProgramming Ensembles are software-intensive systems featuring massive numbers of components complex interactions among components, and with other systems operating in open and non-deterministic environments dynamically adapting to new requirements, technologies and environmental conditions From the final report of: IST Coordinated Action InterLink [2007]. Challenges for software development for ensembles the dimension of the systems the need to adapt to changing environments and requirements Michele Loreti 3
  • 15.
    Challenges of EnsemblesProgramming Ensembles are software-intensive systems featuring massive numbers of components complex interactions among components, and with other systems operating in open and non-deterministic environments dynamically adapting to new requirements, technologies and environmental conditions From the final report of: IST Coordinated Action InterLink [2007]. Challenges for software development for ensembles the dimension of the systems the need to adapt to changing environments and requirements the emergent behaviour resulting from complex interactions Michele Loreti 3
  • 16.
    Challenges of EnsemblesProgramming Ensembles are software-intensive systems featuring massive numbers of components complex interactions among components, and with other systems operating in open and non-deterministic environments dynamically adapting to new requirements, technologies and environmental conditions From the final report of: IST Coordinated Action InterLink [2007]. Challenges for software development for ensembles the dimension of the systems the need to adapt to changing environments and requirements the emergent behaviour resulting from complex interactions the uncertainty during design-time and run-time Michele Loreti 3
  • 17.
    Component Ensembles andAwareness Michele Loreti 4
  • 18.
    Component Ensembles andAwareness Components and Ensembles Service components (SCs) and service-component ensembles (SCEs) permit to dynamically structure independent, distributed entities that can cooperate, with different roles, in open and non-deterministic environments Michele Loreti 4
  • 19.
    Component Ensembles andAwareness Components and Ensembles Service components (SCs) and service-component ensembles (SCEs) permit to dynamically structure independent, distributed entities that can cooperate, with different roles, in open and non-deterministic environments Awareness Awareness of Service Components is achieved by Michele Loreti 4
  • 20.
    Component Ensembles andAwareness Components and Ensembles Service components (SCs) and service-component ensembles (SCEs) permit to dynamically structure independent, distributed entities that can cooperate, with different roles, in open and non-deterministic environments Awareness Awareness of Service Components is achieved by equipping SCs with information about their own state Michele Loreti 4
  • 21.
    Component Ensembles andAwareness Components and Ensembles Service components (SCs) and service-component ensembles (SCEs) permit to dynamically structure independent, distributed entities that can cooperate, with different roles, in open and non-deterministic environments Awareness Awareness of Service Components is achieved by equipping SCs with information about their own state enabling SCs to get information on their working environment Michele Loreti 4
  • 22.
    Component Ensembles andAwareness Components and Ensembles Service components (SCs) and service-component ensembles (SCEs) permit to dynamically structure independent, distributed entities that can cooperate, with different roles, in open and non-deterministic environments Awareness Awareness of Service Components is achieved by equipping SCs with information about their own state enabling SCs to get information on their working environment allowing SCs to use this information for restructuring and adapting Michele Loreti 4
  • 23.
    Component Ensembles andAwareness Components and Ensembles Service components (SCs) and service-component ensembles (SCEs) permit to dynamically structure independent, distributed entities that can cooperate, with different roles, in open and non-deterministic environments Awareness Awareness of Service Components is achieved by equipping SCs with information about their own state enabling SCs to get information on their working environment allowing SCs to use this information for restructuring and adapting Awareness makes SCs adaptable, connectable and composeable. Michele Loreti 4
  • 24.
    Case study: E-VehicleCase Study Michele Loreti 5
  • 25.
    Case study: E-VehicleCase Study We consider a car pooling system where motorized mobility for users and privately owned vehicles have to be coordinated in order to satisfy user requirements and to guarantee an (possibly) optimal allocation of resources. Michele Loreti 5
  • 26.
    Case study: E-VehicleCase Study We consider a car pooling system where motorized mobility for users and privately owned vehicles have to be coordinated in order to satisfy user requirements and to guarantee an (possibly) optimal allocation of resources. We will use SCEL to specify system behaviour while jRESP, its runtime environment, will be used to develop a prototype implementation in Java. Michele Loreti 5
  • 27.
    E-Vehicle Case Study.. . Michele Loreti 6
  • 28.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: Michele Loreti 6
  • 29.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; Michele Loreti 6
  • 30.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; User: A user is an active unit of the system. Given its daily calendar of activities a user: plans its journey books parking lots/charging stations Michele Loreti 6
  • 31.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; User: A user is an active unit of the system. Given its daily calendar of activities a user: plans its journey books parking lots/charging stations this task is performed in collaboration with the associated vehicle. Michele Loreti 6
  • 32.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; vehicles; Michele Loreti 6
  • 33.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; vehicles; Vehicle: A vehicle can: move towards destinations, use the vehicle travel planner to plan the journey, book parking lots and charging stations. Michele Loreti 6
  • 34.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; vehicles; A vehicle also monitors: the current traffic and road feasibility, fuel consumption, and parking lot/charging station availability. Michele Loreti 6
  • 35.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; vehicles; parking lots; Michele Loreti 6
  • 36.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; vehicles; parking lots; Parking lots A parking lot is an infrastructure unit of the system: Michele Loreti 6
  • 37.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; vehicles; parking lots; Parking lots A parking lot is an infrastructure unit of the system: It can be booked (and unbooked) by vehicles. Michele Loreti 6
  • 38.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; vehicles; parking lots; Parking lots A parking lot is an infrastructure unit of the system: It can be booked (and unbooked) by vehicles. A single parking lot can be booked by a single vehicle at a time. Michele Loreti 6
  • 39.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; vehicles; parking lots; charging stations. Michele Loreti 6
  • 40.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; vehicles; parking lots; charging stations. Charging stations: A charging station is an infrastructure unit of the system: Michele Loreti 6
  • 41.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; vehicles; parking lots; charging stations. Charging stations: A charging station is an infrastructure unit of the system: It is used by electric vehicles in order to recharge their batteries. Michele Loreti 6
  • 42.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; vehicles; parking lots; charging stations. Charging stations: A charging station is an infrastructure unit of the system: It is used by electric vehicles in order to recharge their batteries. A single charging station can be booked by a single vehicle at a time. Michele Loreti 6
  • 43.
    E-Vehicle Case Study.. . In the E-Vehicle Case Study the following entities cooperate: users; vehicles; parking lots; charging stations. Charging stations: A charging station is an infrastructure unit of the system: It is used by electric vehicles in order to recharge their batteries. A single charging station can be booked by a single vehicle at a time. Similar to the booking of parking lots, it is usually possible for vehicles to book a charging station in advance. Michele Loreti 6
  • 44.
    E-Vehicle Case Study.. . 2 Main Success Scenario P1 P2 P3 P4 P5 POI1 POI2 POI3 POI4 POI2 POI1 POI3 Calendar 9:00 10:00 12:00 14:00 16:00 POIj = j-th point of interest Pi P1 = i-th parking lot Michele Loreti 7
  • 45.
    Programming Ensembles. .. Michele Loreti 8
  • 46.
    Programming Ensembles. .. SCEL is a speficiation/programming language equipped with Michele Loreti 8
  • 47.
    Programming Ensembles. .. SCEL is a speficiation/programming language equipped with programming abstractions necessary for directly representing Knowledge, Behaviors and Aggregations according to specific Policies naturally programming interaction, adaptation and self- and context- awareness Michele Loreti 8
  • 48.
    Programming Ensembles. .. SCEL is a speficiation/programming language equipped with programming abstractions necessary for directly representing Knowledge, Behaviors and Aggregations according to specific Policies naturally programming interaction, adaptation and self- and context- awareness linguistic primitives with solid semantic grounds To develop logics, tools and methodologies for formal reasoning on systems behavior to establish qualitative and quantitative properties of both the individual components and the ensembles Michele Loreti 8
  • 49.
    SCEL: programming abstractions TheService-Component Ensemble Language (SCEL) currently provides primitives and constructs for dealing with: Michele Loreti 9
  • 50.
    SCEL: programming abstractions TheService-Component Ensemble Language (SCEL) currently provides primitives and constructs for dealing with: 1 Knowledge: to describe how data, information and (local and global) knowledge is managed Michele Loreti 9
  • 51.
    SCEL: programming abstractions TheService-Component Ensemble Language (SCEL) currently provides primitives and constructs for dealing with: 1 Knowledge: to describe how data, information and (local and global) knowledge is managed 2 Behaviours: to describe how systems of components progress Michele Loreti 9
  • 52.
    SCEL: programming abstractions TheService-Component Ensemble Language (SCEL) currently provides primitives and constructs for dealing with: 1 Knowledge: to describe how data, information and (local and global) knowledge is managed 2 Behaviours: to describe how systems of components progress 3 Aggregations: to describe how different entities are brought together to form components, systems and ensembles Michele Loreti 9
  • 53.
    SCEL: programming abstractions TheService-Component Ensemble Language (SCEL) currently provides primitives and constructs for dealing with: 1 Knowledge: to describe how data, information and (local and global) knowledge is managed 2 Behaviours: to describe how systems of components progress 3 Aggregations: to describe how different entities are brought together to form components, systems and ensembles 4 Policies: to model and enforce the wanted evolutions of computations. Michele Loreti 9
  • 54.
    A SCEL component Knowledge K Processes P IInterface Π Policies Michele Loreti 10
  • 55.
    A SCEL component Knowledge K Processes P IInterface Π Policies Component interface provides information about the component itself. This information is rendered as a set of attributes whose values can be derived from the knowledge. Michele Loreti 10
  • 56.
    Predicate-based ensembles In orderto guarantee the maximum degree of flexibility, ensembles are rendered in terms of predicate-based communication primitives that select the targets among those enjoying specific properties. Michele Loreti 11
  • 57.
    Predicate-based ensembles In orderto guarantee the maximum degree of flexibility, ensembles are rendered in terms of predicate-based communication primitives that select the targets among those enjoying specific properties. Michele Loreti 11
  • 58.
    E-Vehicle Case Study(in SCEL). . . Michele Loreti 12
  • 59.
    E-Vehicle Case Study(in SCEL). . . 9 Parking Lots close to POIs as Ensembles POI1 POI2 POI3 POI2 POI1 POI3 Calendar 9:00 10:00 12:00 14:00 16:00 P1 P2 P3 P5 ATTRIBUTES ● type: parking lot component ● position: position of the park ● ... Michele Loreti 12
  • 60.
    E-Vehicle Case Study(in SCEL). . . Michele Loreti 13
  • 61.
    jRESP A Run-time Environmentfor SCEL Programs Basic design principles. . . 1 no centralized control 2 heavy use of recurrent patterns to simply the development of specific knowledge a single interface that contains basic methods to interact with knowledge policies based on the pattern composite (policies are structured as a stack) . . . 3 use of open technologies to support the integration with other tools/frameworks or with alternative implementations of SCEL Michele Loreti 14
  • 62.
    SCEL component Hardware/Virtual Machine Networks Inputdevices/Sensors (GPS, Temperature, Battery level,CPU load. . . ) Output devices/Actuators SCEL Processes (Threads) Policies Knowledge Attr. Ports Michele Loreti 15
  • 63.
    E-Vehicle Case Studyin SCEL A possible roadmap. . . Michele Loreti 16
  • 64.
    E-Vehicle Case Studyin SCEL A possible roadmap. . . 1 Identify basic information elements (attributes) to use for coordinating the interactions among components; Michele Loreti 16
  • 65.
    E-Vehicle Case Studyin SCEL A possible roadmap. . . 1 Identify basic information elements (attributes) to use for coordinating the interactions among components; 2 Design component behaviours in terms of SCEL processes; Michele Loreti 16
  • 66.
    E-Vehicle Case Studyin SCEL A possible roadmap. . . 1 Identify basic information elements (attributes) to use for coordinating the interactions among components; 2 Design component behaviours in terms of SCEL processes; 3 Develop a jRESP application for supporting/controlling activities of involved agents; Michele Loreti 16
  • 67.
    E-Vehicle Case Studyin SCEL A possible roadmap. . . 1 Identify basic information elements (attributes) to use for coordinating the interactions among components; 2 Design component behaviours in terms of SCEL processes; 3 Develop a jRESP application for supporting/controlling activities of involved agents; 4 Present the obtained results in a simulation environment. Michele Loreti 16
  • 68.