A conceptual framework for behavioural adaptation @ Leicester 2011
Upcoming SlideShare
Loading in...5
×
 

A conceptual framework for behavioural adaptation @ Leicester 2011

on

  • 1,741 views

Some thoughts about behavioural adaptation presented at the Department of Computer Science of the University of Leicester.

Some thoughts about behavioural adaptation presented at the Department of Computer Science of the University of Leicester.

Statistics

Views

Total Views
1,741
Slideshare-icon Views on SlideShare
461
Embed Views
1,280

Actions

Likes
1
Downloads
5
Comments
0

5 Embeds 1,280

http://www.albertolluch.com 1265
http://translate.googleusercontent.com 6
http://127.0.0.1 6
http://www.linkedin.com 2
http://webcache.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • One of our starting points was W4's definition of (behavioural) adaptation.
  • From the definition of adaption we derive the definition of “adaptability” (the ability of being adaptable).
  • 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).
  • 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).
  • 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.
  • 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).
  • 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).
  • This seems conformant with WP4's control loop patterns like the “external feedback loop” pattern.
  • ...or the “internal feedback loop” pattern
  • 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).
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • Such tower naturally fits in the hierarchical structure of the framework.
  • 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.
  • 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.
  • Adaptation is achieved by rules like this, which is essentially a specialisation of the abstract presentation of the “adaptation tower”.
  • 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.
  • 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”).
  • 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).
  • Many languages have been extended to adopt the context oriented paradigm.
  • In ContextJ, variations are specified with so-called “layers”. Essentially, they are specialized method implementations: one for each known layer.
  • Context-dependent computation is achieved with a sort of dynamic dispatching mechanism.
  • Context-dependent computation is achieved with a sort of dynamic dispatching mechanism.
  • 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.
  • 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.
  • 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.

A conceptual framework for behavioural adaptation @ Leicester 2011 A conceptual framework for behavioural adaptation @ Leicester 2011 Presentation Transcript

  • 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
  • layers as control data with(this.layers()){ go(); } darkness surface meteor_storm bot.set_layers(...);
  • MAPE-K in COP
  • ASCENS in a nutshell A framework for adaptation Reflective rule-based programming Context-oriented programming CONCLUSION 0 1 2 3 * ° ° ° °
  • summary
    • We have presented a conceptual framework for adaptation:
      • compositional (hierarchical);
      • explicit control-data;
      • MAPE-K “compliant”.
    • Assessment with foundational models and paradigms:
      • e.g. reflective logical frameworks;
      • e.g. context-oriented languages;
  • What's next?
  • formal components Knowledge Analyze Plan AUTONOMIC MANAGER MANAGED ELEMENT Control Data Control Data Control Monitor Execute model checking, logical inference
  • ? ? ... one idea “ Under which context conditions can I reach my goal?” … via model checking based on unification/narrowing. devise plans to reach context conditions (subgoals or requirements on collaborating components).
  • THANKS A LOT!
  • [email_address] linkedin.com/in/albertolluch