+ All Categories
Home > Software > The Behavioral Coordination Operator Language (BCOoL)

The Behavioral Coordination Operator Language (BCOoL)

Date post: 16-Jan-2017
Category:
Upload: benoit-combemale
View: 218 times
Download: 0 times
Share this document with a friend
49
The Behavioral Coordination Operator Language Gemoc Final Workshop, March 17 th , 2016 Julien Deantoni University of Nice, I3S CNRS, INRIA AOSTE [email protected]
Transcript

The Behavioral Coordination Operator Language

Gemoc Final Workshop, March 17th, 2016

Julien DeantoniUniversity of Nice, I3S CNRS, INRIA [email protected]

2

Conforms To

xDSML 1xDSML 1

Discrete Time Behavior

ADAPTIVE CRUISE

CONTROL SYSTEM

3

Conforms To

xDSML 1xDSML 1

Conforms To

xDSML 2xDSML 2

Conforms To

xDSML 3xDSML 3

Heterogeneous models and languages

Emerging System Behavior difficult to apprehend

Discrete Time Behavior

BATTERYCONTROL

ADAPTIVE CRUISE

CONTROL SYSTEM

GPS TRACKING

4

Conforms To

xDSML 1xDSML 1

Heterogeneous models and languages

Emerging System Behavior difficult to apprehend

Discrete Time Behavior

BATTERYCONTROL

ADAPTIVE CRUISE

CONTROL SYSTEM

GPS TRACKING

Coordinationof Behavioral

Models

Know-how

System Designer

Conforms To

xDSML 2xDSML 2

Conforms To

xDSML 3xDSML 3

5

Outline

● State of the Art:– Coordination Languages and ADLs– Coordination Frameworks

● Our proposal: – The Behavioral Coordination Operator Language

● Conclusion

6

Running Example: the Coffee MachineTimed Finite State Machine (TFSM)

Conforms To

when coin / !selectCoffee;

when releaseCoffee / doLock

Conforms To

Activity

State-based language

Action-based language

7

Running Example: the Coffee MachineTimed Finite State Machine (TFSM)

Conforms To

when coin / !selectCoffee;

when releaseCoffee / doLock

Conforms To

Activity

?

State-based language

Action-based language

8

Running Example: the Coffee MachineTimed Finite State Machine (TFSM)

Conforms To

when coin / !selectCoffee;

when releaseCoffee / doLock

Conforms To

Activity

?

State-based language

Action-based language

e.g.,When the event selectCoffee occurs, the Action selectCoffee is started

9

Coordination Languages & ADLs

defines

Know-how

System Designer

Model ofCoordination

TFSM

when coin / !selectCoffee;

when releaseCoffee / doLock

Conforms ToConforms To

Activity

Coordination Languages proposed to model the coordination by using a dedicated Language, e.g., Linda or Esper.

ADLs proposed component based languages to coordinate, possibly heterogeneous behaviors, e.g., Wright, Rapide or MetaH.

10

Coordination Languages & ADLs

defines

Know-how

System Designer

Model ofCoordination

TFSM

when coin / !selectCoffee;

when releaseCoffee / doLock

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

Conforms To Conforms To

Activity

Coordination Languages proposed to model the coordination by using a dedicated Language, e.g., Linda or Esper.

ADLs proposed component based languages to coordinate, possibly heterogeneous behaviors, e.g., Wright, Rapide or MetaH.

11

Coordination Languages & ADLs

Know-how

System Designer

Model ofCoordination

TFSM

when coin / !selectCoffee;

when releaseCoffee / doLock

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

Glue

Conforms To Conforms To

Activity

Coordination Languages proposed to model the coordination by using a dedicated Language, e.g., Linda or Esper.

ADLs proposed component based languages to coordinate, possibly heterogeneous behaviors, e.g., Wright, Rapide or MetaH.

SelectCoffee: Event

Rapide:CoffeeCoin.selectCoffee => CoffeeAlgorithm.selectCoffee

SelectCoffee: Action

defines

12

Coordination Languages & ADLs

Know-how

System Designer

Model ofCoordination

TFSM

when coin / !selectCoffee;

when releaseCoffee / doLock

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

Glue

Conforms To Conforms To

Activity

Coordination Languages proposed to model the coordination by using a dedicated Language, e.g., Linda or Esper.

ADLs proposed component based languages to coordinate, possibly heterogeneous behaviors, e.g., Wright or MetaH.

SelectCoffee: Event

Rapide:CoffeeCoin.selectCoffee => CoffeeAlgorithm.selectCoffee

SelectCoffee: Action

defines

The coordination is modeled explicitly

The coordination is defined rule by rule

13

Coordination Patterns

defines

Know-how

System Designer

Model ofCoordination

TFSM

when coin / !selectCoffee;

when releaseCoffee / doLock

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

What?, When?,How?

Conforms To Conforms To

Activity

14

Coordination Frameworks

Know-how

System Designer

Model ofCoordination

Coordination frameworks identified a systematic way to coordinate models, i.e., a coordination pattern.

CoordinationFrameworks

e.g. Ptolemy

enco

des

TFSM

when coin / !selectCoffee;

when releaseCoffee / doLock

Conforms To Conforms To

Activity

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

15

Coordination Frameworks

Know-how

System Designer

Model ofCoordination

Coordination frameworks identified a systematic way to coordinate models, i.e., a coordination pattern.

CoordinationFrameworks

e.g. Ptolemy

encodes

TFSM

when coin / !selectCoffee;

when releaseCoffee / doLock

Conforms To Conforms To

Activity

16

Coordination Frameworks

Know-how

System Designer

Model ofCoordination

Coordination frameworks identified a systematic way to coordinate models, i.e., a coordination pattern.

CoordinationFrameworks

e.g. Ptolemy

encodes

TFSM

when coin / !selectCoffee;

when releaseCoffee / doLock

Conforms To Conforms To

Activity

17

Coordination Frameworks

Know-how

System Designer

Model ofCoordination

Coordination frameworks identified a systematic way to coordinate models, i.e., a coordination pattern.

CoordinationFrameworks

e.g. Ptolemy

encodes

TFSM

when coin / !selectCoffee;

when releaseCoffee / doLock

Conforms To Conforms To

Activity

18

Coordination Frameworks

Know-how

System Designer

Model ofCoordination

Coordination frameworks identified a systematic way to coordinate models, i.e., a coordination pattern.

CoordinationFrameworks

e.g. Ptolemy

encodes

TFSM

when coin / !selectCoffee;

when releaseCoffee / doLock

Conforms To Conforms To

Activity

19

Conforms ToConforms To

e

ncodes

Coordination Frameworks

Know-how

System Designer

CoordinationFrameworks

e.g. Ptolemy

TFSM

when coin / !selectCoffee;

when releaseCoffee / doLock

Syntax BehavioralSemantics

Director: TFSM

SyntaxBehavioralSemantics

Director: Activity

LanguageBehavioralInterface

LanguageBehavioralInterface

LanguageBehavioralInterface

LanguageBehavioralInterface

Activity

Model ofCoordination

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

generates

20

Conforms ToConforms To

e

ncodes

Coordination Frameworks

Know-how

System Designer

CoordinationFrameworks

e.g. Ptolemy

TFSM

when coin / !selectCoffee;

when releaseCoffee / doLock

Syntax BehavioralSemantics

Director: TFSM

SyntaxBehavioralSemantics

Director: Activity

LanguageBehavioralInterface

LanguageBehavioralInterface

LanguageBehavioralInterface

LanguageBehavioralInterface

Activity

Model ofCoordination

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

generates

Coordination frameworks identified a systematic way to coordinate models, i.e., a coordination pattern.

What?, When? and How? the methods from the semantics

Interfaces are invoked (Java)

21

Conforms ToConforms To

e

ncodes

Coordination Frameworks

Know-how

System Designer

CoordinationFrameworks

e.g. Ptolemy

TFSM

when coin / !selectCoffee;

when releaseCoffee / doLock

Syntax BehavioralSemantics

Director: TFSM

SyntaxBehavioralSemantics

Director: Activity

LanguageBehavioralInterface

LanguageBehavioralInterface

LanguageBehavioralInterface

LanguageBehavioralInterface

Activity

Model ofCoordination

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

generates

Coordination frameworks identified a systematic way to coordinate models, i.e., a coordination pattern.

The coordination is generated automatically

The coordination pattern is hidden/encoded in the tool in a GPL

22

Take-Away Lessons

● Coordination Languages & ADLs:

● Coordination Frameworks:

The coordination is modeled explicitly

The coordination is defined rule by rule

The coordination is generated automatically based on a coordination pattern

The coordination pattern is hidden/encoded in the tool in a GPL

23

Outline

● State of the Art– Coordination Languages

– Coordination Frameworks

● Our proposal: – The Behavioral Coordination Operator Language

● Conclusion

24

Model ofCoordination

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

ModelBehavioralInterface

Know-how

System Designer

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

<<Conforms To>>TFSM

Syntax BehavioralSemantics

LanguageBehavioralInterface

LanguageBehavioralInterface

SyntaxBehavioralSemantics

LanguageBehavioralInterface

LanguageBehavioralInterface

Activity

defin

es

System Designer

when coin / !selectCoffee;

when releaseCoffee / doLock

generates

25

Model ofCoordination

ModelBehavioralInterface

ModelBehavioralInterface

Know-how

System Designer

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

<<Conforms To>>

defin

es

System Designer

when coin / !selectCoffee;

when releaseCoffee / doLock

generates

ModelBehavioralInterface

ModelBehavioralInterface

26

ModelBehavioralInterface

ModelBehavioralInterface

Model ofCoordination

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

<<Conforms To>>

generates

ModelBehavioralInterface

ModelBehavioralInterface

when coin / !selectCoffee;

when releaseCoffee / doLock

27

ModelBehavioralInterface

ModelBehavioralInterface

Model ofCoordination

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

<<Conforms To>>

generates

ModelBehavioralInterface

ModelBehavioralInterface

when coin / !selectCoffee;

when releaseCoffee / doLock

State::entering

State::leaving

FSMEvent::occurs

28

ModelBehavioralInterface

ModelBehavioralInterface

Model ofCoordination

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

<<Conforms To>>

generates

ModelBehavioralInterface

ModelBehavioralInterface

when coin / !selectCoffee;

when releaseCoffee / doLock

State::entering

State::leaving

FSMEvent::occurs

Alternates

29

ModelBehavioralInterface

ModelBehavioralInterface

Model ofCoordination

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

<<Conforms To>>

generates

ModelBehavioralInterface

ModelBehavioralInterface

when coin / !selectCoffee;

when releaseCoffee / doLock

State::entering

State::leaving

FSMEvent::occurs

Alternates

releaseCoffee:occurs

Locked:entering

Locked:leaving

selectCoffee:occurs

Locked:entering

Locked:leaving

30

ModelBehavioralInterface

ModelBehavioralInterface

Model ofCoordination

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

<<Conforms To>>

generates

ModelBehavioralInterface

ModelBehavioralInterface

when coin / !selectCoffee;

when releaseCoffee / doLock

State::entering

State::leaving

FSMEvent::occurs

Alternates

a1:Alternates

a2:Alternates

releaseCoffee:occurs

Locked:entering

Locked:leaving

selectCoffee:occurs

Locked:entering

Locked:leaving

31

ModelBehavioralInterface

ModelBehavioralInterface

Model ofCoordination

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

<<Conforms To>>

generates

ModelBehavioralInterface

ModelBehavioralInterface

Action::startAction

Action::finishAction

when coin / !selectCoffee;

when releaseCoffee / doLock

State::entering

State::leaving

FSMEvent::occurs

Alternates

a1:Alternates

a2:Alternates

releaseCoffee:occurs

Locked:entering

Locked:leaving

selectCoffee:occurs

Locked:entering

Locked:leaving

32

Model ofCoordination

Know-how

System Designer

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

<<Conforms To>>

defin

es

System Designer

when coin / !selectCoffee;

when releaseCoffee / doLock

generates

33

Model ofCoordination

Know-how

System Designer

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

<<Conforms To>>

defin

es

System Designer

when coin / !selectCoffee;

when releaseCoffee / doLock

generates

34

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

TFSM

Syntax BehavioralSemantics

Action::startActionFSMEvent::occurs

BCOoL Metamodel SyncFSMEventsAndActions.bcool

<<Conforms To>>

35

BCOoL Metamodel SyncFSMEventsAndActions.bcoolImportInterface tfsm;ImportInterface Activity;

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

TFSM

Syntax BehavioralSemantics

Action::startActionFSMEvent::occurs

<<Conforms To>>

36

BCOoL Metamodel SyncFSMEventsAndActions.bcoolImportInterface tfsm;ImportInterface Activity;

Operator RendezVousWhenSameName (FSMEvent::occurs,Action::startAction)

End Operator;

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

TFSM

Syntax BehavioralSemantics

Action::startActionFSMEvent::occurs

<<Conforms To>>

37

BCOoL Metamodel SyncFSMEventsAndActions.bcoolImportInterface tfsm;ImportInterface Activity;

Operator RendezVousWhenSameName (FSMEvent::occurs,Action::startAction)      When(occurs.name = startAction.name);

End Operator;

OCL Boolean Expression between model elements

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

TFSM

Syntax BehavioralSemantics

Action::startActionFSMEvent::occurs

<<Conforms To>>

38

BCOoL Metamodel SyncFSMEventsAndActions.bcoolImportInterface tfsm;ImportInterface Activity;

Operator RendezVousWhenSameName (FSMEvent::occurs,Action::startAction)     When(occurs.name = startAction.name);

  CoordinationRule: RendezVous (occurs, startAction)

End Operator;

Causal and Temporal relations between Events

e.g., Rendezvous, Precedes, etc.

EventType

EventTypes

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

TFSM

Syntax BehavioralSemantics

Action::startActionFSMEvent::occurs

<<Conforms To>>

39

BCOoL Metamodel SyncFSMEventsAndActions.bcool

EventType

EventTypes

ImportInterface tfsm;ImportInterface Activity;

Operator RendezVousWhenSameName (FSMEvent::occurs,Action::startAction)     When(occurs.name = startAction.name);

  CoordinationRule: RendezVous (occurs, startAction)

End Operator;

Defined in MoCCML(Model of Concurrency and

Communication Modeling Language)

BCOoLBCOoL

BCOoLSpecification

BCOoLSpecification

TFSM

Syntax BehavioralSemantics

Action::startActionFSMEvent::occurs

<<Conforms To>>

40

BCOoLSpecification

BCOoLSpecification

BCOoLSpecification

BCOoLSpecificationImportInterface tfsm;

ImportInterface Activity;

Operator FSMEventsandActions (FSMEvent::occurs, Action::startAction)  When(occurs.name = startAction.name);CoordinationRule: 

Rendezvous (occurs, startAction)End Operator;

SyncFSMEventsAndActions.bcool

when coin / !selectCoffee;

when releaseCoffee / doLock

selectCoffee:startAction

makeCoffee:startAction

releaseCoffee:startAction

releaseCoffee:finishAction

makeCoffee:finishAction

Conforms ToConforms To

releaseCoffee:occurs

Locked:entering

Locked:leaving

selectCoffee:occurs

Locked:entering

Locked:leaving

BCOoLBCOoL

TFSM

Syntax BehavioralSemantics

Action::startActionFSMEvent::occurs

<<Conforms To>>

41

when coin / !selectCoffee;

when releaseCoffee / doLock

selectCoffee:occurs

releaseCoffee:occurs

selectCoffee:startAction

makeCoffee:startAction

releaseCoffee:startAction

Conforms ToConforms To

BCOoLSpecification

BCOoLSpecification

BCOoLSpecification

BCOoLSpecification

SyncFSMEventsAndActions.bcool

BCOoLBCOoL

TFSM

Syntax BehavioralSemantics

Action::startActionFSMEvent::occurs

<<Conforms To>>

ImportInterface tfsm;ImportInterface Activity;

Operator FSMEventsandActions (FSMEvent::occurs, Action::startAction)  When(occurs.name = startAction.name);CoordinationRule: 

Rendezvous (occurs, startAction)End Operator;

42

when coin / !selectCoffee;

when releaseCoffee / doLock

selectCoffee:occurs

releaseCoffee:occurs

selectCoffee:startAction

makeCoffee:startAction

releaseCoffee:startAction

Conforms ToConforms ToConforms To

BCOoLSpecification

BCOoLSpecification

BCOoLSpecification

BCOoLSpecification

SyncFSMEventsAndActions.bcool

BCOoLBCOoL

TFSM

Syntax BehavioralSemantics

Action::startActionFSMEvent::occurs

<<Conforms To>>

ImportInterface tfsm;ImportInterface Activity;

Operator FSMEventsandActions (FSMEvent::occurs, Action::startAction)  When(occurs.name = startAction.name);CoordinationRule: 

Rendezvous (occurs, startAction)End Operator;

43

when coin / !selectCoffee;

when releaseCoffee / doLock

selectCoffee:occurs

releaseCoffee:occurs

selectCoffee:startAction

releaseCoffee:startAction

Conforms ToConforms To

BCOoLSpecification

BCOoLSpecification

BCOoLSpecification

BCOoLSpecification

SyncFSMEventsAndActions.bcool

BCOoLBCOoL

TFSM

Syntax BehavioralSemantics

Action::startActionFSMEvent::occurs

<<Conforms To>>

ImportInterface tfsm;ImportInterface Activity;

Operator FSMEventsandActions (FSMEvent::occurs, Action::startAction)  When(occurs.name = startAction.name);CoordinationRule: 

Rendezvous (occurs, startAction)End Operator;

44

when coin / !selectCoffee;

when releaseCoffee / doLock

selectCoffee:occurs

releaseCoffee:occurs

selectCoffee:startAction

releaseCoffee:startAction

Conforms To

Rendezvous

Rendezvous

Conforms To

BCOoLSpecification

BCOoLSpecification

BCOoLSpecification

BCOoLSpecification

SyncFSMEventsAndActions.bcool

BCOoLBCOoL

TFSM

Syntax BehavioralSemantics

Action::startActionFSMEvent::occurs

<<Conforms To>>

ImportInterface tfsm;ImportInterface Activity;

Operator FSMEventsandActions (FSMEvent::occurs, Action::startAction)  When(occurs.name = startAction.name);CoordinationRule: 

Rendezvous (occurs, startAction)End Operator;

45

when coin / !selectCoffee;

when releaseCoffee / doLock

selectCoffee:occurs

releaseCoffee:occurs

selectCoffee:startAction

releaseCoffee:startAction

Conforms To

Rendezvous

Rendezvous

Conforms To

BCOoLSpecification

BCOoLSpecification

BCOoLSpecification

BCOoLSpecification

SyncFSMEventsAndActions.bcool

BCOoLBCOoL

TFSM

Syntax BehavioralSemantics

Action::startActionFSMEvent::occurs

<<Conforms To>>

ImportInterface tfsm;ImportInterface Activity;

Operator FSMEventsandActions (FSMEvent::occurs, Action::startAction)  When(occurs.name = startAction.name);CoordinationRule: 

Rendezvous (occurs, startAction)End Operator;

Heterogeneous Execution

In the GEMOC Studio

Implemented into the GEMOC studio

Editing facilitiesby using XtextEditing facilitiesby using Xtext

Implemented into the GEMOC studio

Coordinated HeterogeneousExecutionCoordinated HeterogeneousExecution

Schedule space explorationSchedule space exploration

Conclusion

● BCOoL is a dedicated metalanguage to capture coordination patterns.

● It automates the coordination of models by relying on a formal language.

● It is associated to the GEMOC language/modeling workbench to execute and analyze the coordinated system.

➔ Future work:– Using the explicit coordination to generate master on co-simulation bus

– Understanding the interconnection with physical model (continuous time)

1http://timesquare.inria.fr/BCOoL

Thanks

http://timesquare.inria.fr/BCOoL

http://gemoc.org/ins


Recommended