SlideShare a Scribd company logo
ASCENS: Towards
Systematically Engineering Ensembles
Martin Wirsing
LMU München
With contributions from Matthias Hölzl, Annabelle Klarl, Mirco
Tribastone, Franco Zambonelli
2Seite
Martin Wirsing
Goals of this Lecture
 Students should be able to understand
 a model-based development process of autonomic systems
 focusing on mathematically based modeling and analysis techniques
3Seite
Martin Wirsing
Autonomic Systems and Ensembles
 Autonomic systems are typically distributed computing systems
whose components act autonomously and can adapt to environment
changes.
 We call them ensembles if
they have the following
characteristics:
 Large numbers of nodes
 Heterogeneous
 Operating in open and non-
deterministic environments
 Complex interactions
between nodes and with
humans or other systems
 Dynamic adaptation to
changes in the environment
4Seite
Martin Wirsing
ASCENS Project
 Goal of ASCENS:
Develop methods, tools, and theories for
modeling and analysing
autonomic self-aware systems
that
 combine traditional SE approaches based on formal
methods with the flexibility of resources promised by
autonomic, adaptive, and self-aware systems
 Partners:
 LMU (Coordinator), U Pisa, U Firenze with ISTI Pisa,
Fraunhofer, Verimag, U Modena e Reggio Emilia, U
Libre de Bruxelles, EPFL, Volkswagen, Zimory GmbH,
U Limerick, Charles U Prague, IMT Lucca, Mobsya
 Case studies:
 Robotics, cloud computing, and energy saving e-
mobility
5Seite
Martin Wirsing
Engineering Autonomic systems
 Self-aware ensemble components are aware of their structure and their
aims
 Goals and models of ensemble components have to be available at runtime
 Autonomous components typically have internal models and goals
 For ensuring reliability and predictability of the ensemble and its
components important properties of the ensemble should be defined and
established at design time and maintained during runtime
 Analysis-driven development and execution
 Autonomic systems have to be able to adapt to dynamic changes of the
environment
 Even if the ensemble components are defined at design time, adaptation of
the ensemble components will happen at runtime
6Seite
Martin Wirsing
Ensemble Lifecycle:
Two-Wheels Approach
 Engineering an autonomic ensemble consists of an iterative agile
lifecycle
 Design time: Iteration of requirements engineering, modeling, validation
 Runtime: Awareness, adaptation, execution loop
 Design time and runtime loops connected by deployment and feedback
 Feedback leads to a better understanding and improvement of the system.
Deployment
Feedback
Design Runtime
7Seite
Martin Wirsing
Outline
For the sake of simplicity we restrict ourselves to a simple example
of autonomic robots and illustrate only the following first
development steps which happen at design time.
 Requirements specification with SOTA/GEM
 Coarse modeling by adaptation pattern selection
 Fine-grained modeling in Agamemnon/Poem
 Adaptation in nondeterministic environments through learning
 Abstract programming in SCEL
 Quantitative analysis of autonomic system behaviour using stochastic
methods
7
Case study
Hölzl & Klarl
Case study
Loreti
8Seite
Martin Wirsing
The Robot Case Study
 Swarm of garbage collecting robots
 Acting in a rectangular exhibition hall
 The hall is populated by visitors and exhibits
 Scenario
 Visitors drop garbage
 Robots move around the hall,
pick up the garbage and
move it to the service area
 Robots may rest in the service area in order
to not intervene too much with the visitors
and to save energy
8
service area
9Seite
Martin Wirsing
Domain and Requirements Modeling:
SOTA/GEM Framework
 An adaptive system can (should?) be expressed in terms of “goals” =
“states of the affairs” that an entity aims to achieve
 Without making assumptions on the actual design of the system
 It is a requirements engineering activity
 SOTA (“State of the Affairs”)/GEM Conceptual framework
 Goal-oriented modeling of self-adaptive systems
 Functional requirements representing the states of affairs that the system has
to achieve or maintain
 Utilities are non-functional requirements which do not have hard boundaries
and may be more or less desirable.
 GEM is the mathematical basis of the SOTA framework
9
10Seite
Martin Wirsing
SOTA/GEM:
Domain and Requirements Modeling
Domain modeling:
 State Of The Affairs Q = Q1 x … x Qn
 represents the state of all parameters that
 may affect the ensemble's behavior and
 are relevant to its capabilities
 Example: Robot Swarm State Of The Affairs
11Seite
Martin Wirsing
Ensemble and its Environment
 Environment
 For mathematical analysis we distinguish often between the ensemble and its
environment such that the whole system is a combination of both
 Adaptation Space
 The ensemble should work in a number of different environments
 The characteristics of all environments are described by the adaptation space
 Example Robot Swarm
 The state space of the robot ensemble is given by the state spaces all robots
where QRobot is given by the position and state of the robots
 The state space environment is given by the exhibition area, the list of
garbage items, and the value indicating whether the exhibition is open
 The adaptation space of the ensemble may be given by varying the size of the
arena, the dropping rate of garbage items, etc.
12Seite
Martin Wirsing
SOTA:
Requirements Modeling
 Goal-oriented requirements
modelling
 Goal = achievement of a given state
of the affairs
 Where the system should eventually
arrive in the phase space Qe,
 represented as a confined area in that
space (post-condition Gpost), and
 the goal can be activated in another
area of the space (pre-condition Gpre)
 Utility = how to reach a given state of
the affairs
 “maintain goal”: constraints on the
trajectory to follow in the phase
space Qe
 expressed as a subspace Gmaintain in
Qe
13Seite
Martin Wirsing
Robot Ensemble Goals and Utilities
 Example requirements:
 Goal G1
 Maintains < 300 garbage items
 as long as the exhibition is open
 i.e. (ob => g# < 300 until not ob)
 Further (adaptation) goals
 Keep energy consumption lower
than predefined threshold
 In resting area allow sleeping time
for each robot
 Adaptation Space
 Size of arena x garbage dropping
rate
14Seite
Martin Wirsing
Towards Design
 Further requirements modelling steps
 Check consistency of requirements
 Model the autonomic system in Agamemnon/Poem
 Select suitable adaptation patterns for ensemble design (see also lecture 08
on patterns)
 Model each component and the ensemble in Agamemnon
 Implement each component in Poem
 Provide abstractions for controlling adaptation
 e.g., by learning behaviours or reasoning
15Seite
Martin Wirsing
Adaptation Patterns
Component Patterns Ensemble Patterns
 Reactive Environment mediated (swarm)
Reactive
Component
Environment Environment
Event, pheromone, …
Internal Feedback
Goal
Action
Environment
 Internal feedback loop Negotiation/competition
 Further patterns: External feedback loop, norm-based ensembles, …
Interaction
between
components
16Seite
Martin Wirsing
Robot Ensemble Adaptation
 Reactive component pattern for implementing a single robot
 Environment mediated (swarm) pattern for the ensemble of
ineracting components
Reactive
Component
Environment Environment
17Seite
Martin Wirsing
What is Agamemnon?
Agamemnon is a modeling language based on the situation calculus
supporting the specification of domain theories and accompanying partial
programs.
 Domain models in UML class diagrams with the Aga-UML profile
 identification of components and the environment together with their
properties (=fluents) and actions
 Axiomatisation of the dynamic evolution of the world as a result to
action execution with a textual DSL based on the situation calculus
 introduced by John McCarty 1963: representing knowledge, actions with their
preconditions and effects, and dynamic domains in first-order logic.
 extended by concurrency, probability, time by Reiter 2001
 Behaviour specification in UML activity diagrams with the Aga-UML
profile
 stereotypes for the specification of partial programs and their computation via
learning or planning
18Seite
Martin Wirsing
AGAMEMNON Model: Domain Model
Model of components together with their properties (=fluents) and actions
Deterministic axiomatization of effects of actions e.g.
action Robot::stepNorth {
pre: true;
effects {
self.position.y := self.position.y@pre + 1;
}
}
precondition
effect:
move one cell to north
19Seite
Martin Wirsing
AGAMEMNON Model:
Robot Ensemble Behavior
20Seite
Martin Wirsing
AGAMEMNON Model: Robot Behaviour
non-deterministic choice
21Seite
Martin Wirsing
What is Poem?
[more in case study of Hölzl & Klarl]
 Poem is a LISP-like modeling/programming language that allows
developers to
 Define an adaptation space (i.e., possible worlds) in situation/fluent calculus
 Markov Decision Processes (MDPs) for probabilistic worlds
 Specify behaviours using partial programs
 Define mechanisms for state abstraction
 Iliad is an implementation that provides
 First-order reasoning
 Constraint solving
 Evaluation of partial programs using hierarchical reinforcement learning
[more in case study of Hölzl & Klarl]
 Reduces state space using state abstraction techniques
 Exploits locality and compositionality to keep search space manageable
 Poem/Iliad can be used to implement Agamemnon models
22Seite
Martin Wirsing
POEM Implementation
(defun waste-removal (robot)
"Repeatedly pick up waste and drop it off or sleep."
(loop
(choose choose-waste-removal-action
(call (pickup-waste robot))
(call (drop-waste robot))
(action sleep-action 'SLEEP robot))))
non-deterministic choice of behaviour
(can be learned)
23Seite
Martin Wirsing
Dealing with Nondeterministic
Environments
 But not always in the intended way
 E.g. with prob. 0.9 move to the intended direction
 In the failure case,
 remaining at same position has prob. 0.05
 any other possibility has prob. 0.025
 Environments are often non-
deterministic
⟹ Environment represented as
Markov Decision Problems
(MDPs)
 MDPs can be seen as abbreviations
for specifications in situation/fluent
calculus
 Components operate on the MDP
by performing actions
 Actions change the state of the MDP
24Seite
Martin Wirsing
Rewards
 Goals from the SOTA specification
are represented as numeric
rewards
 Each action performed by the
ensemble leads to a reward
 Positive reward for bringing an
item into the rest area,
 Negative -0.1 reward for each
move
 0 reward for sleeping
 A behavior is “good” if it achieves a
high reward over the ensemble’s
lifetime
 For ensembles with unbounded
lifetimes discounted rewards can be
used
25Seite
Martin Wirsing
Partial and Complete Behaviours
 Behaviour of components is represented
by so-called partial programs containing
 Non-deterministic choices
 Action executions
 The completion of a partial program
specifies how non-deterministic choices
are resolved
 Nondeterminism my arise at different
levels;
 E.g. pickup-waste is non-deterministic in
the MDP
 But appropriate completions can often
provide a deterministic high-level view of a
component’s behaviour
26Seite
Martin Wirsing
Planning/Learning
 Can we always find a completion of a program?
 Yes, any selection of non-deterministic choices leads to a completion. But
many completions do not reach the specified goals or perform well.
 Can we always find a good completion?
 One that maximizes the aggregated reward of a partial program in a given
environment.
 In certain cases: yes
 When we have a model of the environment’s dynamics (logical or MDP):
planning, dynamic programming can compute a maximal completion
 When we can explore the environment or a simulation of the environment and
obtain information about the reward of our actions: reinforcement learning
techniques provide a sequence of completions that converge to a maximal
completion
 But for many realistic problems these techniques are intractable
 Explosion of state and action spaces, slow convergence towards a solution
⟹ Abstraction of states and actions, compositional techniques
Approximation of the true solution
27Seite
Martin Wirsing
Learned Behaviour
 In the case study by Matthias & Annabelle you will learn to use POEM
and the Iliad system to find the following deterministic program of the
robot system using machine learning:
28Seite
Martin Wirsing
What is SCEL?
[More in case study of M. Loreti]
 The Service Component Ensemble
Language (SCEL) provides an abstract
ensemble programming framework by
offering primitives and constructs for the
following programming abstractions
 Knowledge: describe how data,
information and knowledge is manipulated
and shared
 Processes: describe how systems of
components progress
 Policies: deal with the way properties of
computations are represented and
enforced
 Systems: describe how different entities
are brought together to form components,
systems and, possibly, ensembles
SC SC
SC
SC
SC
Service component
Service component ensemble
29Seite
Martin Wirsing
The SCEL Syntax (in one slide)
 SCEL
 Parametrized by the knowledge tuple space and policies
 Predicate-based communication
 Processes interact with the tuple space by query and put actions
30Seite
Martin Wirsing
Robot Ensemble SCEL Design
 n robots Ri interacting with environment Env and other robots
R1 || … || Rn || Env
 Env is abstractly represented by a component
Ienv[.,., m]
keeping track of the total number of collected items
 Environment mediated robot ensemble
Environment
R1 R2 R3
31Seite
Martin Wirsing
Robot Ensemble SCEL Refinement
 Each robot Ri is of form Ri = I[.,.,pick[col[t]] ] where
 pick monitors the reactive robot behavior (searching for waste)
 col detects collisions,
 t controls the sleeping time
 E.g. monitoring the reactive behavior pick of a robot Ri for
performance analysis
 If Ri is picking up waste then
 if it encounters another robot or a wall, it changes direction and continues exploring
(“normal” moves and direction change abstracted in SCEL)
 if it encounters an item, the robot picks it up (abstracted in SCEL), informs the
environment env and starts returning to the service area
pick = get(collision)@self.pick + get(item)@self.inform
inform = get(items,!x)@env.inform1
ínform1 = put(items,x+1)@env.drop
. . .
Parallel
processes
Nondeter
ministic
choice
32Seite
Martin Wirsing
Validating Requirements:
Quantitative Analysis
 Validating the adaptation requirements includes the following steps:
 Ensemble simulation
 jRESP [see Michele Loreti‘s case study]
 or SCELua
 Study timing behaviour by abstracting SCEL models to
 Continuous-time Markov chains
 Ordinary differential equations
 Statistical modelchecking
 Validate performance model by comparing to simulation and
 Validate the adaptation requirements by sensitivity analysis
33Seite
Martin Wirsing
Sensitivity Analysis for Validating the Adaptation
Requirements
 Adaptation requirements
 Keep area clean (< 300 garbage items) while allowing sleeping time t (e.g.
<= 1000) for each robot
 Energy consumption lower than predefined threshold
 Sensitivity analysis of throughput
 where throughput = frequency of returning garbage items to service area
Martin Wirsing
Model prediction:
 Adaptation requirement is
satisfied
 Maximum allowed rest
time (whilst achieving the
maintain goal): 1580
34Seite
Martin Wirsing
Summary
 ASCENS is developing a systematic
approach for constructing Autonomic
Service-Component Ensembles
 A few development steps for a simple
example
 Iterative ensemble lifecycle
 Requirements specification with SOTA/GEM
 Selection of adaptation patterns
 Modeling and reasoning with
AGAMEMNON/POEM
[case study by Matthias and Annabelle]
 Unreliable environment represented as MDP
 Learning and reasoning for controlling
adaptation
 Abstract programming and simulation of
adaptive ensembles in SCEL
[case study by Michele ]
Deployment
Feedback
DesignRuntime
35Seite
Martin Wirsing
And More Research
 Modeling and formalising ensembles
 Knowledge representation and self-
awareness
 Adaptation and dynamic self-expression
patterns and mechanisms.
 Correctness, verification, and security of
ensembles
 Tools and methodologies for designing and
developing correct ensembles
 Experimentations with case studies

More Related Content

PPT
BIOMASS_E2ES_IGARSS2011.ppt
PPTX
All projects
PDF
Automated Demand Response Strategies for Market Participation and Grid Manage...
PDF
Self-Awareness in Self-Organising Institutions for Autonomic Power Systems Ma...
PDF
Capturing the Immune System: From the wet-­lab to the robot, building better ...
PDF
Industry Training: 01 Awareness Overview
PDF
Conceptual Map and Classification In Ensembles Of Autonomic Components: From ...
BIOMASS_E2ES_IGARSS2011.ppt
All projects
Automated Demand Response Strategies for Market Participation and Grid Manage...
Self-Awareness in Self-Organising Institutions for Autonomic Power Systems Ma...
Capturing the Immune System: From the wet-­lab to the robot, building better ...
Industry Training: 01 Awareness Overview
Conceptual Map and Classification In Ensembles Of Autonomic Components: From ...

Similar to Towards Systematically Engineering Ensembles - Martin Wirsing (20)

PDF
Academic Course: 07 Introduction to the Formal Engineering of Autonomic Systems
PDF
Reconciling self-adaptation and self-organization
PDF
Reconciling Self-adaptation and Self-organization
PDF
Motion Planning
PDF
Mission planning of autonomous quadrotors
PPT
AI Robotics
PPTX
August 31, Reactive Algorithms I
PDF
Machine Learning Meets Quantitative Planning: Enabling Self-Adaptation in Aut...
PDF
Artificial Inteligence for Games an Overview SBGAMES 2012
PDF
Engineering the software of robotic systems - 4 - Current results [ICSE 2017 ...
PDF
Academic Course: 03 Autonomic Multi-Agent Systems
PDF
Implementation of a Robot Behavior Learning Simulator.
PPTX
Swarm intelligence
PPTX
COMP 775 Motion planning paper presentation
ODP
Metron seas collaboration
PPTX
Blue_Futuristic_Technology_Presentation_(3)[1].pptx
PPT
Behavior-based robotics
PPT
Alumni
Academic Course: 07 Introduction to the Formal Engineering of Autonomic Systems
Reconciling self-adaptation and self-organization
Reconciling Self-adaptation and Self-organization
Motion Planning
Mission planning of autonomous quadrotors
AI Robotics
August 31, Reactive Algorithms I
Machine Learning Meets Quantitative Planning: Enabling Self-Adaptation in Aut...
Artificial Inteligence for Games an Overview SBGAMES 2012
Engineering the software of robotic systems - 4 - Current results [ICSE 2017 ...
Academic Course: 03 Autonomic Multi-Agent Systems
Implementation of a Robot Behavior Learning Simulator.
Swarm intelligence
COMP 775 Motion planning paper presentation
Metron seas collaboration
Blue_Futuristic_Technology_Presentation_(3)[1].pptx
Behavior-based robotics
Alumni
Ad

More from FET AWARE project - Self Awareness in Autonomic Systems (20)

PDF
Academic Course: 13 Applications of and Challenges in Self-Awareness
PDF
Academic Course: 12 Safety and Ethics
PDF
Academic Course: 08 Pattern-based design of autonomic systems
PDF
Academic Course: 06 Morphogenetic Engineering
PDF
Academic Course: 04 Introduction to complex systems and agent based modeling
PDF
Academic Course: 02 Self-organization and emergence in networked systems
PDF
Academic Course: 01 Self-awarenesss and Computational Self-awareness
PDF
PDF
Industry Training: 04 Awareness Applications
PDF
Industry Training: 03 Awareness Simulation
PDF
Industry Training: 02 Awareness Properties
PDF
Robot Swarms as Ensembles of Cooperating Components - Matthias Holzl
PDF
Underwater search and rescue in swarm robotics - Mark Read
PDF
Computational Self-awareness in Smart-Camera Networks - Lukas Esterle
PDF
Why Robots may need to be self-­‐aware, before we can really trust them - Ala...
PDF
Morphogenetic Engineering: Reconciling Architecture and Self-Organization Thr...
PDF
Ensemble-oriented programming of self-adaptive systems - Michele Loreti
PDF
Self-awareness and Adaptive Technologies: the Future of Operating Systems?
PDF
EnhancingWeb Process Self-Awareness with Context-Aware Service Composition
PDF
Testing cooperative autonomous systems for unwanted emergent behaviour and da...
Academic Course: 13 Applications of and Challenges in Self-Awareness
Academic Course: 12 Safety and Ethics
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 06 Morphogenetic Engineering
Academic Course: 04 Introduction to complex systems and agent based modeling
Academic Course: 02 Self-organization and emergence in networked systems
Academic Course: 01 Self-awarenesss and Computational Self-awareness
Industry Training: 04 Awareness Applications
Industry Training: 03 Awareness Simulation
Industry Training: 02 Awareness Properties
Robot Swarms as Ensembles of Cooperating Components - Matthias Holzl
Underwater search and rescue in swarm robotics - Mark Read
Computational Self-awareness in Smart-Camera Networks - Lukas Esterle
Why Robots may need to be self-­‐aware, before we can really trust them - Ala...
Morphogenetic Engineering: Reconciling Architecture and Self-Organization Thr...
Ensemble-oriented programming of self-adaptive systems - Michele Loreti
Self-awareness and Adaptive Technologies: the Future of Operating Systems?
EnhancingWeb Process Self-Awareness with Context-Aware Service Composition
Testing cooperative autonomous systems for unwanted emergent behaviour and da...
Ad

Recently uploaded (20)

PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Machine Learning_overview_presentation.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Big Data Technologies - Introduction.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Empathic Computing: Creating Shared Understanding
Group 1 Presentation -Planning and Decision Making .pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Machine Learning_overview_presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
MIND Revenue Release Quarter 2 2025 Press Release
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation_ Review paper, used for researhc scholars
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Dropbox Q2 2025 Financial Results & Investor Presentation
Reach Out and Touch Someone: Haptics and Empathic Computing
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Big Data Technologies - Introduction.pptx
Machine learning based COVID-19 study performance prediction
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Empathic Computing: Creating Shared Understanding

Towards Systematically Engineering Ensembles - Martin Wirsing

  • 1. ASCENS: Towards Systematically Engineering Ensembles Martin Wirsing LMU München With contributions from Matthias Hölzl, Annabelle Klarl, Mirco Tribastone, Franco Zambonelli
  • 2. 2Seite Martin Wirsing Goals of this Lecture  Students should be able to understand  a model-based development process of autonomic systems  focusing on mathematically based modeling and analysis techniques
  • 3. 3Seite Martin Wirsing Autonomic Systems and Ensembles  Autonomic systems are typically distributed computing systems whose components act autonomously and can adapt to environment changes.  We call them ensembles if they have the following characteristics:  Large numbers of nodes  Heterogeneous  Operating in open and non- deterministic environments  Complex interactions between nodes and with humans or other systems  Dynamic adaptation to changes in the environment
  • 4. 4Seite Martin Wirsing ASCENS Project  Goal of ASCENS: Develop methods, tools, and theories for modeling and analysing autonomic self-aware systems that  combine traditional SE approaches based on formal methods with the flexibility of resources promised by autonomic, adaptive, and self-aware systems  Partners:  LMU (Coordinator), U Pisa, U Firenze with ISTI Pisa, Fraunhofer, Verimag, U Modena e Reggio Emilia, U Libre de Bruxelles, EPFL, Volkswagen, Zimory GmbH, U Limerick, Charles U Prague, IMT Lucca, Mobsya  Case studies:  Robotics, cloud computing, and energy saving e- mobility
  • 5. 5Seite Martin Wirsing Engineering Autonomic systems  Self-aware ensemble components are aware of their structure and their aims  Goals and models of ensemble components have to be available at runtime  Autonomous components typically have internal models and goals  For ensuring reliability and predictability of the ensemble and its components important properties of the ensemble should be defined and established at design time and maintained during runtime  Analysis-driven development and execution  Autonomic systems have to be able to adapt to dynamic changes of the environment  Even if the ensemble components are defined at design time, adaptation of the ensemble components will happen at runtime
  • 6. 6Seite Martin Wirsing Ensemble Lifecycle: Two-Wheels Approach  Engineering an autonomic ensemble consists of an iterative agile lifecycle  Design time: Iteration of requirements engineering, modeling, validation  Runtime: Awareness, adaptation, execution loop  Design time and runtime loops connected by deployment and feedback  Feedback leads to a better understanding and improvement of the system. Deployment Feedback Design Runtime
  • 7. 7Seite Martin Wirsing Outline For the sake of simplicity we restrict ourselves to a simple example of autonomic robots and illustrate only the following first development steps which happen at design time.  Requirements specification with SOTA/GEM  Coarse modeling by adaptation pattern selection  Fine-grained modeling in Agamemnon/Poem  Adaptation in nondeterministic environments through learning  Abstract programming in SCEL  Quantitative analysis of autonomic system behaviour using stochastic methods 7 Case study Hölzl & Klarl Case study Loreti
  • 8. 8Seite Martin Wirsing The Robot Case Study  Swarm of garbage collecting robots  Acting in a rectangular exhibition hall  The hall is populated by visitors and exhibits  Scenario  Visitors drop garbage  Robots move around the hall, pick up the garbage and move it to the service area  Robots may rest in the service area in order to not intervene too much with the visitors and to save energy 8 service area
  • 9. 9Seite Martin Wirsing Domain and Requirements Modeling: SOTA/GEM Framework  An adaptive system can (should?) be expressed in terms of “goals” = “states of the affairs” that an entity aims to achieve  Without making assumptions on the actual design of the system  It is a requirements engineering activity  SOTA (“State of the Affairs”)/GEM Conceptual framework  Goal-oriented modeling of self-adaptive systems  Functional requirements representing the states of affairs that the system has to achieve or maintain  Utilities are non-functional requirements which do not have hard boundaries and may be more or less desirable.  GEM is the mathematical basis of the SOTA framework 9
  • 10. 10Seite Martin Wirsing SOTA/GEM: Domain and Requirements Modeling Domain modeling:  State Of The Affairs Q = Q1 x … x Qn  represents the state of all parameters that  may affect the ensemble's behavior and  are relevant to its capabilities  Example: Robot Swarm State Of The Affairs
  • 11. 11Seite Martin Wirsing Ensemble and its Environment  Environment  For mathematical analysis we distinguish often between the ensemble and its environment such that the whole system is a combination of both  Adaptation Space  The ensemble should work in a number of different environments  The characteristics of all environments are described by the adaptation space  Example Robot Swarm  The state space of the robot ensemble is given by the state spaces all robots where QRobot is given by the position and state of the robots  The state space environment is given by the exhibition area, the list of garbage items, and the value indicating whether the exhibition is open  The adaptation space of the ensemble may be given by varying the size of the arena, the dropping rate of garbage items, etc.
  • 12. 12Seite Martin Wirsing SOTA: Requirements Modeling  Goal-oriented requirements modelling  Goal = achievement of a given state of the affairs  Where the system should eventually arrive in the phase space Qe,  represented as a confined area in that space (post-condition Gpost), and  the goal can be activated in another area of the space (pre-condition Gpre)  Utility = how to reach a given state of the affairs  “maintain goal”: constraints on the trajectory to follow in the phase space Qe  expressed as a subspace Gmaintain in Qe
  • 13. 13Seite Martin Wirsing Robot Ensemble Goals and Utilities  Example requirements:  Goal G1  Maintains < 300 garbage items  as long as the exhibition is open  i.e. (ob => g# < 300 until not ob)  Further (adaptation) goals  Keep energy consumption lower than predefined threshold  In resting area allow sleeping time for each robot  Adaptation Space  Size of arena x garbage dropping rate
  • 14. 14Seite Martin Wirsing Towards Design  Further requirements modelling steps  Check consistency of requirements  Model the autonomic system in Agamemnon/Poem  Select suitable adaptation patterns for ensemble design (see also lecture 08 on patterns)  Model each component and the ensemble in Agamemnon  Implement each component in Poem  Provide abstractions for controlling adaptation  e.g., by learning behaviours or reasoning
  • 15. 15Seite Martin Wirsing Adaptation Patterns Component Patterns Ensemble Patterns  Reactive Environment mediated (swarm) Reactive Component Environment Environment Event, pheromone, … Internal Feedback Goal Action Environment  Internal feedback loop Negotiation/competition  Further patterns: External feedback loop, norm-based ensembles, … Interaction between components
  • 16. 16Seite Martin Wirsing Robot Ensemble Adaptation  Reactive component pattern for implementing a single robot  Environment mediated (swarm) pattern for the ensemble of ineracting components Reactive Component Environment Environment
  • 17. 17Seite Martin Wirsing What is Agamemnon? Agamemnon is a modeling language based on the situation calculus supporting the specification of domain theories and accompanying partial programs.  Domain models in UML class diagrams with the Aga-UML profile  identification of components and the environment together with their properties (=fluents) and actions  Axiomatisation of the dynamic evolution of the world as a result to action execution with a textual DSL based on the situation calculus  introduced by John McCarty 1963: representing knowledge, actions with their preconditions and effects, and dynamic domains in first-order logic.  extended by concurrency, probability, time by Reiter 2001  Behaviour specification in UML activity diagrams with the Aga-UML profile  stereotypes for the specification of partial programs and their computation via learning or planning
  • 18. 18Seite Martin Wirsing AGAMEMNON Model: Domain Model Model of components together with their properties (=fluents) and actions Deterministic axiomatization of effects of actions e.g. action Robot::stepNorth { pre: true; effects { self.position.y := self.position.y@pre + 1; } } precondition effect: move one cell to north
  • 20. 20Seite Martin Wirsing AGAMEMNON Model: Robot Behaviour non-deterministic choice
  • 21. 21Seite Martin Wirsing What is Poem? [more in case study of Hölzl & Klarl]  Poem is a LISP-like modeling/programming language that allows developers to  Define an adaptation space (i.e., possible worlds) in situation/fluent calculus  Markov Decision Processes (MDPs) for probabilistic worlds  Specify behaviours using partial programs  Define mechanisms for state abstraction  Iliad is an implementation that provides  First-order reasoning  Constraint solving  Evaluation of partial programs using hierarchical reinforcement learning [more in case study of Hölzl & Klarl]  Reduces state space using state abstraction techniques  Exploits locality and compositionality to keep search space manageable  Poem/Iliad can be used to implement Agamemnon models
  • 22. 22Seite Martin Wirsing POEM Implementation (defun waste-removal (robot) "Repeatedly pick up waste and drop it off or sleep." (loop (choose choose-waste-removal-action (call (pickup-waste robot)) (call (drop-waste robot)) (action sleep-action 'SLEEP robot)))) non-deterministic choice of behaviour (can be learned)
  • 23. 23Seite Martin Wirsing Dealing with Nondeterministic Environments  But not always in the intended way  E.g. with prob. 0.9 move to the intended direction  In the failure case,  remaining at same position has prob. 0.05  any other possibility has prob. 0.025  Environments are often non- deterministic ⟹ Environment represented as Markov Decision Problems (MDPs)  MDPs can be seen as abbreviations for specifications in situation/fluent calculus  Components operate on the MDP by performing actions  Actions change the state of the MDP
  • 24. 24Seite Martin Wirsing Rewards  Goals from the SOTA specification are represented as numeric rewards  Each action performed by the ensemble leads to a reward  Positive reward for bringing an item into the rest area,  Negative -0.1 reward for each move  0 reward for sleeping  A behavior is “good” if it achieves a high reward over the ensemble’s lifetime  For ensembles with unbounded lifetimes discounted rewards can be used
  • 25. 25Seite Martin Wirsing Partial and Complete Behaviours  Behaviour of components is represented by so-called partial programs containing  Non-deterministic choices  Action executions  The completion of a partial program specifies how non-deterministic choices are resolved  Nondeterminism my arise at different levels;  E.g. pickup-waste is non-deterministic in the MDP  But appropriate completions can often provide a deterministic high-level view of a component’s behaviour
  • 26. 26Seite Martin Wirsing Planning/Learning  Can we always find a completion of a program?  Yes, any selection of non-deterministic choices leads to a completion. But many completions do not reach the specified goals or perform well.  Can we always find a good completion?  One that maximizes the aggregated reward of a partial program in a given environment.  In certain cases: yes  When we have a model of the environment’s dynamics (logical or MDP): planning, dynamic programming can compute a maximal completion  When we can explore the environment or a simulation of the environment and obtain information about the reward of our actions: reinforcement learning techniques provide a sequence of completions that converge to a maximal completion  But for many realistic problems these techniques are intractable  Explosion of state and action spaces, slow convergence towards a solution ⟹ Abstraction of states and actions, compositional techniques Approximation of the true solution
  • 27. 27Seite Martin Wirsing Learned Behaviour  In the case study by Matthias & Annabelle you will learn to use POEM and the Iliad system to find the following deterministic program of the robot system using machine learning:
  • 28. 28Seite Martin Wirsing What is SCEL? [More in case study of M. Loreti]  The Service Component Ensemble Language (SCEL) provides an abstract ensemble programming framework by offering primitives and constructs for the following programming abstractions  Knowledge: describe how data, information and knowledge is manipulated and shared  Processes: describe how systems of components progress  Policies: deal with the way properties of computations are represented and enforced  Systems: describe how different entities are brought together to form components, systems and, possibly, ensembles SC SC SC SC SC Service component Service component ensemble
  • 29. 29Seite Martin Wirsing The SCEL Syntax (in one slide)  SCEL  Parametrized by the knowledge tuple space and policies  Predicate-based communication  Processes interact with the tuple space by query and put actions
  • 30. 30Seite Martin Wirsing Robot Ensemble SCEL Design  n robots Ri interacting with environment Env and other robots R1 || … || Rn || Env  Env is abstractly represented by a component Ienv[.,., m] keeping track of the total number of collected items  Environment mediated robot ensemble Environment R1 R2 R3
  • 31. 31Seite Martin Wirsing Robot Ensemble SCEL Refinement  Each robot Ri is of form Ri = I[.,.,pick[col[t]] ] where  pick monitors the reactive robot behavior (searching for waste)  col detects collisions,  t controls the sleeping time  E.g. monitoring the reactive behavior pick of a robot Ri for performance analysis  If Ri is picking up waste then  if it encounters another robot or a wall, it changes direction and continues exploring (“normal” moves and direction change abstracted in SCEL)  if it encounters an item, the robot picks it up (abstracted in SCEL), informs the environment env and starts returning to the service area pick = get(collision)@self.pick + get(item)@self.inform inform = get(items,!x)@env.inform1 ínform1 = put(items,x+1)@env.drop . . . Parallel processes Nondeter ministic choice
  • 32. 32Seite Martin Wirsing Validating Requirements: Quantitative Analysis  Validating the adaptation requirements includes the following steps:  Ensemble simulation  jRESP [see Michele Loreti‘s case study]  or SCELua  Study timing behaviour by abstracting SCEL models to  Continuous-time Markov chains  Ordinary differential equations  Statistical modelchecking  Validate performance model by comparing to simulation and  Validate the adaptation requirements by sensitivity analysis
  • 33. 33Seite Martin Wirsing Sensitivity Analysis for Validating the Adaptation Requirements  Adaptation requirements  Keep area clean (< 300 garbage items) while allowing sleeping time t (e.g. <= 1000) for each robot  Energy consumption lower than predefined threshold  Sensitivity analysis of throughput  where throughput = frequency of returning garbage items to service area Martin Wirsing Model prediction:  Adaptation requirement is satisfied  Maximum allowed rest time (whilst achieving the maintain goal): 1580
  • 34. 34Seite Martin Wirsing Summary  ASCENS is developing a systematic approach for constructing Autonomic Service-Component Ensembles  A few development steps for a simple example  Iterative ensemble lifecycle  Requirements specification with SOTA/GEM  Selection of adaptation patterns  Modeling and reasoning with AGAMEMNON/POEM [case study by Matthias and Annabelle]  Unreliable environment represented as MDP  Learning and reasoning for controlling adaptation  Abstract programming and simulation of adaptive ensembles in SCEL [case study by Michele ] Deployment Feedback DesignRuntime
  • 35. 35Seite Martin Wirsing And More Research  Modeling and formalising ensembles  Knowledge representation and self- awareness  Adaptation and dynamic self-expression patterns and mechanisms.  Correctness, verification, and security of ensembles  Tools and methodologies for designing and developing correct ensembles  Experimentations with case studies