43
Lub A language for Dynamic Context Oriented Programming Steven Costiou Mickaël Kerboeuf, Glenn Cavarlé, Alain Plantec UMR CNRS 6285, Lab-STICC/MOCS Université de Bretagne Occidentale

Lub: a DSL for Dynamic Context Oriented Programming

  • Upload
    esug

  • View
    109

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Lub: a DSL for Dynamic Context Oriented Programming

LubA language for Dynamic Context

Oriented Programming

Steven CostiouMickaël Kerboeuf, Glenn Cavarlé, Alain Plantec

UMR CNRS 6285, Lab-STICC/MOCSUniversité de Bretagne Occidentale

Page 2: Lub: a DSL for Dynamic Context Oriented Programming

Drone 1 + GPSDrone 2 + GPS

Target

Page 3: Lub: a DSL for Dynamic Context Oriented Programming

Drone 2 NO GPS

GPS loss

Drone 1 + GPS

Page 4: Lub: a DSL for Dynamic Context Oriented Programming

Unanticipated

Page 5: Lub: a DSL for Dynamic Context Oriented Programming

Unanticipated =

Not foreseen at design time

Page 6: Lub: a DSL for Dynamic Context Oriented Programming

Unanticipated =

Not foreseen at design time=

The behavior we need was not expected

Page 7: Lub: a DSL for Dynamic Context Oriented Programming

▪ Schéma 4 : Adaptation proposition

GPS sharing

Drone 1 + GPS

Drone 2 NO GPS

Page 8: Lub: a DSL for Dynamic Context Oriented Programming

Unanticipated behavior adaptation at runtime

Page 9: Lub: a DSL for Dynamic Context Oriented Programming

Minimal anticipation

Page 10: Lub: a DSL for Dynamic Context Oriented Programming

Minimal anticipation=

Anticipate the need to face unanticipated adaptation

Page 11: Lub: a DSL for Dynamic Context Oriented Programming

Minimal anticipation=

Anticipate the need to face unanticipated adaptation

=Build Support (frameworks)

Page 12: Lub: a DSL for Dynamic Context Oriented Programming

Dynamic context oriented programming (COP)

Page 13: Lub: a DSL for Dynamic Context Oriented Programming

What we adapt:Objects

Page 14: Lub: a DSL for Dynamic Context Oriented Programming

● Instance based adaptation

● Adapted object preserve their identity

Page 15: Lub: a DSL for Dynamic Context Oriented Programming

How do we adapt ?

Page 16: Lub: a DSL for Dynamic Context Oriented Programming

● Free adaptation strategy

● Easy and controlled behavior selection

Page 17: Lub: a DSL for Dynamic Context Oriented Programming

LUBAn extension of Pharo

Page 18: Lub: a DSL for Dynamic Context Oriented Programming

Behavior adaptation through dynamic lookup control

Page 19: Lub: a DSL for Dynamic Context Oriented Programming

#pinPoint

Page 20: Lub: a DSL for Dynamic Context Oriented Programming

Lookup base

#pinPoint

Page 21: Lub: a DSL for Dynamic Context Oriented Programming

Lookup starts in the object’s lookup base

Lookup

#pinPoint

Page 22: Lub: a DSL for Dynamic Context Oriented Programming
Page 23: Lub: a DSL for Dynamic Context Oriented Programming

New lookup base

Page 24: Lub: a DSL for Dynamic Context Oriented Programming

lub := LookupBase named: ‘PeerTrackerLookupBase’ targetClass: PeerPositionTracker

Page 25: Lub: a DSL for Dynamic Context Oriented Programming
Page 26: Lub: a DSL for Dynamic Context Oriented Programming

bind

Page 27: Lub: a DSL for Dynamic Context Oriented Programming

positionTracker lookupBase: lub.

positionTracker pinPoint

lub := LookupBase named: ‘PeerTrackerLookupBase’ targetClass: PeerPositionTracker

Page 28: Lub: a DSL for Dynamic Context Oriented Programming

#pinPoint

Page 29: Lub: a DSL for Dynamic Context Oriented Programming

#pinPoint

Page 30: Lub: a DSL for Dynamic Context Oriented Programming

does-not-understand

#pinPoint

Page 31: Lub: a DSL for Dynamic Context Oriented Programming

does-not-understand

#pinPoint

Page 32: Lub: a DSL for Dynamic Context Oriented Programming

Selection of the behavior to adapt ?

Page 33: Lub: a DSL for Dynamic Context Oriented Programming

lub := LookupBase named: ‘PeerTrackerLookupBase’ targetClass: PeerPositionTracker with: #(#pinPoint).

positionTracker lookupBase: lub.

positionTracker pinPoint.positionTracker position.

Page 34: Lub: a DSL for Dynamic Context Oriented Programming
Page 35: Lub: a DSL for Dynamic Context Oriented Programming

#pinPoint

Page 36: Lub: a DSL for Dynamic Context Oriented Programming

#position

Page 37: Lub: a DSL for Dynamic Context Oriented Programming

● Instance based adaptation

● Adapted object preserve their identity

Binding an object to a meta object that controls the lookup

● Free adaptation strategy

● Easy and controlled behavior selection

Page 38: Lub: a DSL for Dynamic Context Oriented Programming

Issues ?

Page 39: Lub: a DSL for Dynamic Context Oriented Programming

States consistency with an adaptation ?

Page 40: Lub: a DSL for Dynamic Context Oriented Programming

pinpoint^peerTracker pinPoint

Page 41: Lub: a DSL for Dynamic Context Oriented Programming

Validation and consistency of the adapted behavior ?

Page 42: Lub: a DSL for Dynamic Context Oriented Programming

Experiments on a physical device ?

Page 43: Lub: a DSL for Dynamic Context Oriented Programming

LubA language for Dynamic Context

Oriented Programming

Steven CostiouMickaël Kerboeuf, Glenn Cavarlé, Alain Plantec

UMR CNRS 6285, Lab-STICC/MOCSUniversité de Bretagne Occidentale