68
WHITE BOX ADAPTATION -- Roberto Bruni, UNIPI -- Andrea Corradini, UNIPI -- Fabio Gadducci, UNIPI -- Alberto Lluch Lafuente, IMT -- Andrea Vandin, IMT ´ ´

White Box Adaptation @ CINA Meeting 2013

Embed Size (px)

Citation preview

Page 1: White Box Adaptation @ CINA Meeting 2013

WHITE BOX ADAPTATION-- Roberto Bruni, UNIPI

-- Andrea Corradini, UNIPI

-- Fabio Gadducci, UNIPI

-- Alberto Lluch Lafuente, IMT

-- Andrea Vandin, IMT

´ ´

Page 2: White Box Adaptation @ CINA Meeting 2013
Page 3: White Box Adaptation @ CINA Meeting 2013

Andrea VandinIMT Lucca

Roberto BruniUniversity of Pisa

Andrea CorradiniUniversity of Pisa

Fabio GadducciUniversity of Pisa

What isADAPTATION?

Page 4: White Box Adaptation @ CINA Meeting 2013

Russian dolls & robots

Adaptable transition systems

White box adaptation1

2

3

OUTLINE

Page 5: White Box Adaptation @ CINA Meeting 2013

1

2

3

A conceptual framework for adaptation [FASE 2012]

Modelling and Analyzing Adaptive Self-assembly Strategies with Maude [WRLA 2012]

Adaptable Transition Systems [WADT 2012]

OUTLINE

Page 6: White Box Adaptation @ CINA Meeting 2013

Russian dolls & robots

Adaptable transition systems

White box adaptation1

2

3

OUTLINE

Page 7: White Box Adaptation @ CINA Meeting 2013

What isAdaptation?

Page 8: White Box Adaptation @ CINA Meeting 2013

Lotfi A. Zadeh,Proc. IEEE, 1963

Page 9: White Box Adaptation @ CINA Meeting 2013

“... a software system self-adaptive if modifies its own behavior in response to ...”

[*] Oreizy, P., Gorlick, M.M., Taylor, R.N., Heimbigner, D., Johnson, G., Medvidovic, N.,

Quilici, A., Rosenblum, D.S., Wolf, A.L.: An architecture-based approach to self-

adaptive software. Intelligent Systems and their Applications 14(3), 54–62 (1999)

[*] Robertson, P., Shrobe, H.E., Laddaga, R.: Introduction to self-adaptive software:

Applications. In: Robertson, P., Shrobe, H.E., Laddaga, R. (eds.) IWSAS. LNCS, vol.

1936, pp. 1–5. Springer (2001)

[*] Self-Adaptive Software: Landscape and Research Challenges, Mazeiar Salehie,

Ladan Tahvildari, ACM Transactions on Autonomous and Adaptive Systems 4, 2.

Page 10: White Box Adaptation @ CINA Meeting 2013

...if p(x) thendo_this;

elsedo_that;

endif...

IS THIS ADAPTATION?

Page 11: White Box Adaptation @ CINA Meeting 2013

“if the hill is too steep then assemble with other robots and try again”

IS THIS ADAPTATION?

Page 12: White Box Adaptation @ CINA Meeting 2013

“Obstacle avoidance may count as adaptive behaviour if […] obstacles appear rarely. [...]

If the ‘normal’ environment is […] obstacle-rich, then avoidance becomes [...] “normal” behaviour rather than an adaptation.”

- Ezequiel di Paolo, course on “Adaptive Systems”,

University of Sussex, Spring 2006.

is obstacle avoidance adaptation?

Page 13: White Box Adaptation @ CINA Meeting 2013

BLACK-BOX ADAPTATION

Page 14: White Box Adaptation @ CINA Meeting 2013

White boxadaptation

Page 15: White Box Adaptation @ CINA Meeting 2013

“program = control + data”

- Niklaus Wirth, “Algorithms + Data Structures = Programs”,Prentice-Hall (1976)

WHAT IS A PROGRAM?

Page 16: White Box Adaptation @ CINA Meeting 2013

“adaptable program = control + data

WHAT IS AN ADAPTABLE PROGRAM?

Page 17: White Box Adaptation @ CINA Meeting 2013

“adaptable program = control + data

control data + the rest ”

WHAT IS AN ADAPTABLE PROGRAM?

Page 18: White Box Adaptation @ CINA Meeting 2013
Page 19: White Box Adaptation @ CINA Meeting 2013
Page 20: White Box Adaptation @ CINA Meeting 2013
Page 21: White Box Adaptation @ CINA Meeting 2013

CONTROL

OTHER DATA

“adaptation is the run-time modification of control data”

WHAT IS AN ADAPTABLE PROGRAM?

CONTROL DATA

Page 22: White Box Adaptation @ CINA Meeting 2013

Monitor ExecuteKnowledge

Analyze Plan

AUTONOMIC MANAGER

CONTROLDATA

EFFECTORMANAGED ELEMENT

Page 23: White Box Adaptation @ CINA Meeting 2013

“...adaptable if it has a distinguished collection of CD that can be modified at runtime.”

“...adaptive if its control data is modified at runtime for some computation.”

“...self-adaptive if it modifies its own control data at runtime.”

A PROGRAM IS...

Page 24: White Box Adaptation @ CINA Meeting 2013

CONTROL DATA

configuration variables programs

aspects

contexts

policies

rules

EXAMPLES OF CONTROL DATA

plans

Page 25: White Box Adaptation @ CINA Meeting 2013

“an excellent discussion of the precise meaning of the term adaptive software.”

- Carlo Ghezzi, Evolution, Adaptation, and the

Quest for Incrementality, LNCS 7539/2012,

Page 26: White Box Adaptation @ CINA Meeting 2013

Russian dolls & robots

Adaptable transition systems

White box adaptation1

2

3

Page 27: White Box Adaptation @ CINA Meeting 2013

“if the hill is too steep then assemble with other robots and try again”

SELF-ASSEMBLING ROBOTS

Page 28: White Box Adaptation @ CINA Meeting 2013

- J. Meseguer et al., “Semantic models for distributed object reflection”, ECOOP 2002, LNCS 2374. Springer, 1–36.

Page 29: White Box Adaptation @ CINA Meeting 2013

RRDs IN A NUTSHELL

Nested configurationsof interacting objects

Reflection (meta-programming)

Page 30: White Box Adaptation @ CINA Meeting 2013

state rules

interpreter

state rules

manager

REFLECTIVE COMPONENTS

Page 31: White Box Adaptation @ CINA Meeting 2013

interpreter

state rules

manager

(white-box component)

“self-awareness means that the system is aware of its self states and behaviors. ”

- M.G. Hinchey, et al, “Self-managing software”. IEEE Computer 39(2) 107–109, 2006.

SELF-AWARENESS

Page 32: White Box Adaptation @ CINA Meeting 2013

0 3 6 90

0.2

0.4

0.6

0.8

1

Specification in Maude

Statistical Model Checking

Page 33: White Box Adaptation @ CINA Meeting 2013

0 3 6 90

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

any shapeanyshape, no double-griplinequasi-orthogonal line

% of robots crossing the hole

number of robots in the scenario

Page 34: White Box Adaptation @ CINA Meeting 2013

Russian dolls & robots

Adaptable transition systems

White box adaptation1

2

3

Page 35: White Box Adaptation @ CINA Meeting 2013

D{}[t] D{}[tt]

U{}[] U{}[t] U{}[tt]

U{t}[] U{t}[t]

task?

down!

finish!finish!

up!up!

task?

schedule! schedule!

task? task?

D{}[]

task?

Page 36: White Box Adaptation @ CINA Meeting 2013

D{}[] D{}[t] D{}[tt]

U{}[] U{}[t] U{}[tt]

U{t}[] U{t}[t]

task?

finish!finish!

task?

schedule! schedule!

task? task?Is it self

adaptive?

down! up!up!

task?

Page 37: White Box Adaptation @ CINA Meeting 2013

D{}[] D{}[t] D{}[tt]

U{}[] U{}[t] U{}[tt]

U{t}[] U{t}[t]

task?

finish!finish!

task?

schedule! schedule!

task? task?

down! up!up!

task?

Page 38: White Box Adaptation @ CINA Meeting 2013

D{}[] D{}[t] D{}[tt]

U{}[] U{}[t] U{}[tt]

U{t}[] U{t}[t]

task?

finish!finish!

task?

schedule! schedule!

task? task?

down! up!up!

task?

Page 39: White Box Adaptation @ CINA Meeting 2013

D{}[] D{}[t] D{}[tt]

U{}[] U{}[t] U{}[tt]

U{t}[] U{t}[t]

task?

finish!finish!

task?

schedule! schedule!

task? task?

down! up!up!

B8= 4,140 different

interpretations!

task?

Page 40: White Box Adaptation @ CINA Meeting 2013

AdaptableInterfaceautomata

Page 41: White Box Adaptation @ CINA Meeting 2013
Page 42: White Box Adaptation @ CINA Meeting 2013

task?

finish!finish!

task?

schedule! schedule!

task? task?

down! up!up!

IA = Automata + Interface (i/o distinction)

task

Page 43: White Box Adaptation @ CINA Meeting 2013

task?

finish!finish!

task?

schedule! schedule!

task? task?

down! up!up!

IA = Automata + Interface (i/o distinction)

task?

Page 44: White Box Adaptation @ CINA Meeting 2013

task?

finish!finish!

task?

schedule! schedule!

task? task?

down! up!up!

task?

AIA = IA + control propositions (colors)

Page 45: White Box Adaptation @ CINA Meeting 2013

task?

finish!finish!

task?

schedule! schedule!

task? task?

down! up!up!

AIA = IA + control propositions (colors)task?

Page 46: White Box Adaptation @ CINA Meeting 2013

Now what?

Page 47: White Box Adaptation @ CINA Meeting 2013

Monitor ExecuteKnowledge

Analyze Plan

AUTONOMIC MANAGER

MANAGED COMPONENT

D{}[] D{}[t] D{}[tt]

U{}[] U{}[t] U{}[tt]

U{t}[] U{t}[t]

task?

finish!finish!

task?

schedule! schedule!

task? task?

down! up!up!

task?

Page 48: White Box Adaptation @ CINA Meeting 2013

some behavioural relation

Page 49: White Box Adaptation @ CINA Meeting 2013

i.e. normal output actions become inputsi.e. M “listens” outputs of B

Page 50: White Box Adaptation @ CINA Meeting 2013

D{}[] D{}[t] D{}[tt]

U{}[] U{}[t] U{}[tt]

U{t}[] U{t}[t]

task?

finish!finish?

task?

schedule! schedule!

task? task?

down! up!up!

task?

Page 51: White Box Adaptation @ CINA Meeting 2013

D{}[] D{}[t] D{}[tt]

U{}[] U{}[t] U{}[tt]

U{t}[] U{t}[t]

task?

finish?finish?

task?

schedule? schedule?

task? task?

down! up!up!

task?

Page 52: White Box Adaptation @ CINA Meeting 2013

i.e. control output actions become inputsi.e. B “obeys” outputs of M

Page 53: White Box Adaptation @ CINA Meeting 2013

D{}[] D{}[t] D{}[tt]

U{}[] U{}[t] U{}[tt]

U{t}[] U{t}[t]

task?

finish!finish!

task?

schedule! schedule!

task? task?

down! up!up!

task?

Page 54: White Box Adaptation @ CINA Meeting 2013

D{}[] D{}[t] D{}[tt]

U{}[] U{}[t] U{}[tt]

U{t}[] U{t}[t]

task?

finish!finish!

task?

schedule! schedule!

task? task?

down? up?up?

task?

Page 55: White Box Adaptation @ CINA Meeting 2013

ISO(for deterministic AIA)

Page 56: White Box Adaptation @ CINA Meeting 2013

Beyondisomorhism

Page 57: White Box Adaptation @ CINA Meeting 2013

i.e. control output actions become inputsi.e. B “obeys” outputs of M

i.e. collapse transitions labelled with Bi.e. M “ignores” B-moves

Page 58: White Box Adaptation @ CINA Meeting 2013

D{}[] D{}[t] D{}[tt]

U{}[] U{}[t] U{}[tt]

U{t}[] U{t}[t]

task?

finish?finish?

task?

schedule? schedule?

task? task?

down! up!up!

task?

Page 59: White Box Adaptation @ CINA Meeting 2013

D{}[] D{}[t] D{}[tt]

U{}[] U{}[t] U{}[tt]

task?

finish?finish?

task?

task? task?

Page 60: White Box Adaptation @ CINA Meeting 2013
Page 61: White Box Adaptation @ CINA Meeting 2013

alternating simulation

Page 62: White Box Adaptation @ CINA Meeting 2013

(for deterministic IA)

Page 63: White Box Adaptation @ CINA Meeting 2013

D{}[] D{}[t] D{}[tt]

U{}[] U{}[t] U{}[tt]

U{t}[] U{t}[t]

task?

finish!finish!

task?

schedule! schedule!

task? task?

down? up!up?

task?

Page 64: White Box Adaptation @ CINA Meeting 2013

Russian dolls & robots

Adaptable transition systems

White box adaptation1

2

3

Page 65: White Box Adaptation @ CINA Meeting 2013
Page 66: White Box Adaptation @ CINA Meeting 2013
Page 67: White Box Adaptation @ CINA Meeting 2013

Study cina's adaptation

Apply our ideas to scel

Keep working on what we saw1

2

3

Page 68: White Box Adaptation @ CINA Meeting 2013