SlideShare a Scribd company logo
Alberto Lluch Lafuente,  Roberto Bruni, Andrea Corradini, Fabio Gadducci, Ugo Montanari, GianLuigi Ferrari, Andrea Vandin Leicester, September 21st, 2011 A conceptual framework for behavioural adaptation [email_address]
1 A framework for adaptation 2 Reflective rule-based programming 3 Context-oriented programming 0 ASCENS   in a nutshell ° ° ° °
ASCENS   in a nutshell A framework for adaptation Reflective rule-based programming Context-oriented programming 0 1 2 3 ° ° ° ° 0 ASCENS   in a nutshell ° ° ° °
a utonomic s ervice c omponent ens embles ° ° ° ° emergent behaviour, swarms, ... (  =  ) ° what is  ascens  ? European project on  ° ° ° °
ensembles “ ...open-ended, highly parallel, massively  distributed systems ... ...made of self-awaress,  self-adaptive , self-expressive, self-*, autonomic  components .” -  ascens-ist.eu
Robot Swarms E-vehicles
goal “ ...build ensembles in a way that combines  software engineering , formal methods   and autonomic,  adaptive , self-aware systems.” - ascens-ist.eu
ASCENS  in a nutshell A framework for adaptation Reflective Rule-based Programming Context-Oriented Programming 0 1 2 3 ° ° ° °
our sources of inspiration IBM's AC/MAPE-K MAUDE CONTEXT-ORIENTED PROGRAMMING EU Projects (S-CUBE, CASCADAS, ALLOW,...) SCEL (META)KLAIM SELF-ADAPTATION PATTERNS Architecture-Based Approach to Self-Adaptive Software (Medvidovic-Rosenblum)
3 ingredients of AC C Component-based approach S Separation of concerns R Reflective computation
adaptation “ The act of modifying behaviour...” - WP4, (c.f. “framework for self-adaptation and self-expression in ASCENS”)
adaptable “ Something whose behaviour can be modified” - WP2
adaptable  program = control + data CONTROL DATA
adaptable  program = control + data + control data CONTROL DATA CONTROL DATA MANAGER
which “control data”? rules? contexts? interactions? policies? etc. CONTROL CONTROL DATA
smells like control data... Models: HO  π-calculus, MetaKlaim, HO Petri nets,  Rewriting Logic, HO Graph Grammars,
Logic Programming, etc. Languages: reflection, aspects, monads,
effects, contexts, etc. etc.
desiderata 1: compositional ... C 0 CD 0 C 1 CD 1
internal feedback loops CONTROL CONTROL DATA INTERNAL MANAGER
external feedback loops CONTROL CD EXTERNAL CONTROLLER CD
(un)desiderata? reciprocal management? self management? (no separation of concerns) C CD C CD C CD
desiderata 2: MAPE-K compliance Knowledge Analyze Plan AUTONOMIC MANAGER MANAGED ELEMENT Control Data Control Data Control Monitor Execute
MAPE-K towers K A P MANAGED ELEMENT CD K A P CD K A P CD CD M E M E M E
ASCENS  in a nutshell A framework for adaptation Reflective rule-based programming Context-Oriented Programming 0 1 2 3 ° ° ° °
reflection tower
reflection tower
reflection tower
reflection tower
adaptation tower
adaptation tower
adaptation tower
the tower in the framework ...
http://www.springerlink.com/content/3lcycpvew20fcl9q/
mobility CONTROL DATA CONTROL DATA MANAGER
adaptation CONTROL DATA CONTROL DATA MANAGER
ASCENS  in a nutshell A framework for adaptation Reflective rule-based programming Context-oriented programming 0 1 2 3 ° ° ° °
http://arxiv.org/abs/1105.0069v1
context-oriented programming A A' A''
context-oriented languages Context L(isp)
Context Py(thon)
Context R(uby)
Context S(malltalk)
Context Scheme
Context J(ava)
Context Erlang
...
contextJ class bot { private void go(void);  void go(void){ set_speed(normal); } layer surface{ void go(void){ all_wheel_drive(); set_speed(fast); }} layer darkness{ void go(void){ proceed();  /* propagation */ turn_lights_on(); set_speed(slow); }} }
dynamic dispatching with(surface){ with(darkness){ with(meteor_storm){ go(); } } } Active Variation Stack darkness surface meteor_storm

More Related Content

PPTX
Convolution using Scilab
PDF
Modeling Count-based Raster Data with ArcGIS and R
PDF
Intro to Elixir
PPTX
PDF
Functional Scala
PPT
How Animals Adapt
PPTX
Convolution using Scilab
Modeling Count-based Raster Data with ArcGIS and R
Intro to Elixir
Functional Scala
How Animals Adapt

Similar to A conceptual framework for behavioural adaptation @ Leicester 2011 (20)

PDF
A conceptual framework for behavioural adaptation @ Meeting ASCENS 2011
PDF
A white-box perspective on self-adaptation and self-awareness
PDF
A White-box Perspective on Self-Adaptation and Self-Awareness (with a focus o...
PDF
Dynamically Adapting Software Components for the Grid
PDF
Adapting Software Components Dynamically for the Grid
PDF
Adapting Applications on the Fly
PPTX
Powerful software linkedin
PDF
Dynamic updating of component-based applications
PDF
PhD Thesis Defense
PPTX
Self Adaptive Systems
PDF
Self-adaptive Software Modeling Based on Contextual Requirements
PDF
Quality aware approach for engineering self-adaptive software systems
PPT
Autonomics Computing (with some of Adaptive Systems) and Requirements Enginee...
PPT
Bigdata processing with Spark
PDF
Design patterns for self adaptive systems
PDF
Context-Oriented Programming
PDF
QUALITY-AWARE APPROACH FOR ENGINEERING SELF-ADAPTIVE SOFTWARE SYSTEMS
KEY
Tapp11 presentation
PDF
IJSRED-V2I3P84
PDF
Big Data is changing abruptly, and where it is likely heading
A conceptual framework for behavioural adaptation @ Meeting ASCENS 2011
A white-box perspective on self-adaptation and self-awareness
A White-box Perspective on Self-Adaptation and Self-Awareness (with a focus o...
Dynamically Adapting Software Components for the Grid
Adapting Software Components Dynamically for the Grid
Adapting Applications on the Fly
Powerful software linkedin
Dynamic updating of component-based applications
PhD Thesis Defense
Self Adaptive Systems
Self-adaptive Software Modeling Based on Contextual Requirements
Quality aware approach for engineering self-adaptive software systems
Autonomics Computing (with some of Adaptive Systems) and Requirements Enginee...
Bigdata processing with Spark
Design patterns for self adaptive systems
Context-Oriented Programming
QUALITY-AWARE APPROACH FOR ENGINEERING SELF-ADAPTIVE SOFTWARE SYSTEMS
Tapp11 presentation
IJSRED-V2I3P84
Big Data is changing abruptly, and where it is likely heading
Ad

More from Alberto Lluch Lafuente (14)

PDF
Many-to-Many Information Flow Policies
PDF
Aggregate Programming through a Soft Modal Logic
PDF
A Semiring-valued Temporal Logic
PDF
Can we efficiently verify concurrent programs under relaxed memory models in ...
PDF
Collaborative Task Execution In Volunteer Clouds (or how to choose a sub-revi...
PDF
State Space C-Reductions @ ETAPS Workshop GRAPHITE 2013
PDF
Adaptable Transition Systems @ ASCENS Meeting Prague 2013
PDF
White Box Adaptation @ CINA Meeting 2013
PDF
State Space c-Reductions of Concurrent Systems in Rewriting Logic @ ETAPS Wor...
PDF
Evaluating the performance of model transformation styles with Maude @ Sympos...
PDF
Maude .:° ASCENS 2011
PDF
IMT Welcome Day 2011
PDF
A Graph Syntax for Processes and Services @ Workshop WS-FM 2009
PDF
An Algebra of Hierarchical Graphs
Many-to-Many Information Flow Policies
Aggregate Programming through a Soft Modal Logic
A Semiring-valued Temporal Logic
Can we efficiently verify concurrent programs under relaxed memory models in ...
Collaborative Task Execution In Volunteer Clouds (or how to choose a sub-revi...
State Space C-Reductions @ ETAPS Workshop GRAPHITE 2013
Adaptable Transition Systems @ ASCENS Meeting Prague 2013
White Box Adaptation @ CINA Meeting 2013
State Space c-Reductions of Concurrent Systems in Rewriting Logic @ ETAPS Wor...
Evaluating the performance of model transformation styles with Maude @ Sympos...
Maude .:° ASCENS 2011
IMT Welcome Day 2011
A Graph Syntax for Processes and Services @ Workshop WS-FM 2009
An Algebra of Hierarchical Graphs
Ad

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Cloud computing and distributed systems.
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Spectroscopy.pptx food analysis technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
KodekX | Application Modernization Development
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Big Data Technologies - Introduction.pptx
Programs and apps: productivity, graphics, security and other tools
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
MYSQL Presentation for SQL database connectivity
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Cloud computing and distributed systems.
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation_ Review paper, used for researhc scholars
The Rise and Fall of 3GPP – Time for a Sabbatical?
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Building Integrated photovoltaic BIPV_UPV.pdf
Unlocking AI with Model Context Protocol (MCP)
Understanding_Digital_Forensics_Presentation.pptx
Spectroscopy.pptx food analysis technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
MIND Revenue Release Quarter 2 2025 Press Release
KodekX | Application Modernization Development
NewMind AI Weekly Chronicles - August'25 Week I
Big Data Technologies - Introduction.pptx

A conceptual framework for behavioural adaptation @ Leicester 2011

Editor's Notes

  • #3: In this talk we present the framework and two paradigms for modelling and programming adaptive systems, discussing how they fit into the framework: 1) Rewriting systems with meta-programming facilities (reflection in this case). 2) Context-Oriented Programming.
  • #4: In this talk we present the framework and two paradigms for modelling and programming adaptive systems, discussing how they fit into the framework: 1) Rewriting systems with meta-programming facilities (reflection in this case). 2) Context-Oriented Programming.
  • #9: In this talk we present the framework and two paradigms for modelling and programming adaptive systems, discussing how they fit into the framework: 1) Rewriting systems with meta-programming facilities (reflection in this case). 2) Context-Oriented Programming.
  • #10: Our “framework” is the result of discussions, brainstorms, past ASCENS meetings, readings and all that (within WP2). Among the sources of inspiration we mention: IBM's AC/MAPE-K, Projects around “adaptation” (like S-CUBE, CASCADAS, ALLOW), programming paradigms (like context-oriented), foundational models (like rewriting logic), etc. And of course ASCENS stuff like SCEL (and its predecessors KLAIM, META-KLAIM), WP4 framework for adaptation patterns, Matthias thoughts on adaptation, etc.
  • #11: Our “framework” is the result of discussions, brainstorms, past ASCENS meetings, readings and all that (within WP2). Among the sources of inspiration we mention: IBM's AC/MAPE-K, Projects around “adaptation” (like S-CUBE, CASCADAS, ALLOW), programming paradigms (like context-oriented), foundational models (like rewriting logic), etc. And of course ASCENS stuff like SCEL (and its predecessors KLAIM, META-KLAIM), WP4 framework for adaptation patterns, Matthias thoughts on adaptation, etc.
  • #12: One of our starting points was W4's definition of (behavioural) adaptation.
  • #13: From the definition of adaption we derive the definition of “adaptability” (the ability of being adaptable).
  • #14: Into a “Adaptable Program = Control + Control Data + Data” paradigm, where part of the control logic is exhibited as “data” (the “control data”) that can be modified (e.g. by a “manager”). Of course any ordinary computational model or language can be used just by considering that part of the data governs the cotrol (e.g. “flag variables”). However a separation of concerns is fundamental to facilitate e.g. specification, analysis, development, etc. As an analogy think about the difference between OO languages (C++) and programming in OO-style in ordinary languages (e.g. C).
  • #15: Into a “Adaptable Program = Control + Control Data + Data” paradigm, where part of the control logic is exhibited as “data” (the “control data”) that can be modified (e.g. by a “manager”). Of course any ordinary computational model or language can be used just by considering that part of the data governs the cotrol (e.g. “flag variables”). However a separation of concerns is fundamental to facilitate e.g. specification, analysis, development, etc. As an analogy think about the difference between OO languages (C++) and programming in OO-style in ordinary languages (e.g. C).
  • #16: What is control data? This depends on the computational model or language. For instance, some natural choices might be “ rules” in rewrite systems “ contexts” in contex-oriented paradigms “ policies” in policy-driven approaches/SCEL? etc.
  • #17: Many foundational models have variants with meta/higher-order/reflective features where “control data” and “adaptation” are more naturally represented than in the “core” models. We mention some examples (connected to the expertise of WP2).
  • #18: Now, we have two main desiderata for the adaptation framework. The first one is that it should be “hierarchical” in the sense that “managers” should be adaptable themselves to allow building adaptation towers. Adaptation of the adaptation is what WP4 calls self-expression (if I understood well).
  • #19: This seems conformant with WP4's control loop patterns like the “external feedback loop” pattern.
  • #20: ...or the “internal feedback loop” pattern
  • #21: Now, we have two main desiderata for the adaptation framework. The first one is that it should be “hierarchical” in the sense that “managers” should be adaptable themselves to allow building adaptation towers. Adaptation of the adaptation is what WP4 calls self-expression (if I understood well).
  • #22: The second desiderata is that the framework should be flexible enough to capture/follow the MAPE-K scheme. Why? Since it is widely accepted as a scheme for autonomic computing and we have at the moment no argument against it.
  • #23: The second desiderata is that the framework should be flexible enough to capture/follow the MAPE-K scheme. Why? Since it is widely accepted as a scheme for autonomic computing and we have at the moment no argument against it.
  • #24: In this talk we present the framework and two paradigms for modelling and programming adaptive systems, discussing how they fit into the framework: 1) Rewriting systems with meta-programming facilities (reflection in this case). 2) Context-Oriented Programming.
  • #25: A rewriting framework like “rewriting logic” enjoys what is called “reflection tower”. At the ground level, a rewrite theory (e.g. software module) let us infer a computation step from a term (e.g. program state) t into t'. A universal theory U let us infer the computation at the “meta-level”, where theories and terms are meta-represented as terms. The process can be repeated again and again as U itself is a rewrite theory.
  • #26: A rewriting framework like “rewriting logic” enjoys what is called “reflection tower”. At the ground level, a rewrite theory (e.g. software module) let us infer a computation step from a term (e.g. program state) t into t'. A universal theory U let us infer the computation at the “meta-level”, where theories and terms are meta-represented as terms. The process can be repeated again and again as U itself is a rewrite theory.
  • #27: A rewriting framework like “rewriting logic” enjoys what is called “reflection tower”. At the ground level, a rewrite theory (e.g. software module) let us infer a computation step from a term (e.g. program state) t into t'. A universal theory U let us infer the computation at the “meta-level”, where theories and terms are meta-represented as terms. The process can be repeated again and again as U itself is a rewrite theory.
  • #28: A rewriting framework like “rewriting logic” enjoys what is called “reflection tower”. At the ground level, a rewrite theory (e.g. software module) let us infer a computation step from a term (e.g. program state) t into t'. A universal theory U let us infer the computation at the “meta-level”, where theories and terms are meta-represented as terms. The process can be repeated again and again as U itself is a rewrite theory.
  • #29: This suggests the following “adaptation tower”. At each level, theories are composed by some immutable part and some part subject to modification, i.e. the “control data”. A natural choice for control data are subsets of rules. At the level 1, computations steps can modify both the term t and the control data of level 0. Idem for higher levels.
  • #30: This suggests the following “adaptation tower”. At each level, theories are composed by some immutable part and some part subject to modification, i.e. the “control data”. A natural choice for control data are subsets of rules. At the level 1, computations steps can modify both the term t and the control data of level 0. Idem for higher levels.
  • #31: This suggests the following “adaptation tower”. At each level, theories are composed by some immutable part and some part subject to modification, i.e. the “control data”. A natural choice for control data are subsets of rules. At the level 1, computations steps can modify both the term t and the control data of level 0. Idem for higher levels.
  • #32: Such tower naturally fits in the hierarchical structure of the framework.
  • #33: We have applied the general schema to some toy examples, modelling them in Maude with some concrete syntax (object oriented/actor model). In the meantime we have discovered that there is a paper by José Meseguer and Carolyn Talcott which essentially coincides in main idea of using reflection to program adaptive systems. The coincidence suggests that this is indeed the natural way to program adaptive systems in Maude.
  • #34: The main ideas of Meseguer&Talcot approach is to follow a russian dolls approach (nested components) with logical reflection. This enables (in adition to adaptivity) the ability of modelling mobility, e.g. by sending meta-representation of objects around. The approach focuses on actor models which are not very dissimilar from the SCEL/KLAIM paradigms.
  • #35: Adaptation is achieved by rules like this, which is essentially a specialisation of the abstract presentation of the “adaptation tower”.
  • #36: In this talk we present the framework and two paradigms for modelling and programming adaptive systems, discussing how they fit into the framework: 1) Rewriting systems with meta-programming facilities (reflection in this case). 2) Context-Oriented Programming.
  • #37: GianLugi Ferrari (WP2 member) and his collaborators within WP1 have made some efforts to survey the paradigm with the purposes of 1) evaluate the key aspects to be integrated into SCEL, 2) asses the conceptual framework. The most insightful reading was Ghezzi's et al. paper “Context-Oriented Programming: A paradigm for Autonomic Computing”, where several approache/languagess to COP are discussed and compared to “aspect oriented” languages (another paradigm promoted as suitable for autonomic computing”).
  • #38: The main idea of COP is that computation depends on the context of execution, where “context” means any computationally accessible information (e.g. “enviromental data drawn from sensors”). In the figure we see that the computational entity A evolves into A' if under the blue context, while it would evolve into A'' if under the green context. The chunks of behaviours associated to contexts are called “variations”. Adaptation is achieved by activating or disactivating variations (e.g. in reaction to events).
  • #39: Many languages have been extended to adopt the context oriented paradigm.
  • #40: In ContextJ, variations are specified with so-called “layers”. Essentially, they are specialized method implementations: one for each known layer.
  • #41: Context-dependent computation is achieved with a sort of dynamic dispatching mechanism.
  • #42: Context-dependent computation is achieved with a sort of dynamic dispatching mechanism.
  • #43: The COP variant of ContextJ does also fit in the MAPE-K framework as explained by Ghezi et al., essentially thanks to a reflective API that allows to access the active variations.
  • #44: In this talk we present the framework and two paradigms for modelling and programming adaptive systems, discussing how they fit into the framework: 1) Rewriting systems with meta-programming facilities (reflection in this case). 2) Context-Oriented Programming.
  • #47: The second desiderata is that the framework should be flexible enough to capture/follow the MAPE-K scheme. Why? Since it is widely accepted as a scheme for autonomic computing and we have at the moment no argument against it.