Model-Based Design - Ptolemy Project

嚜燐odel-Based Design

Edited and Presented by

Janos Sztipanovits, Co-PI

ISIS, Vanderbilt University

Chess Review

November 18, 2004

Berkeley, CA

Model-Based Design

Model-based design focuses on the formal

representation, composition, and

manipulation of models during the design

process.

Chess Review, November 18, 2004 2

1

Domain Specific Modeling

Languages (DSML)

L = < C, A, S, MS, MC>

Abstract

Syntax

A

Concepts

Relations

Well formed-ness

rules

MC

Parsing

Domain models

Interchange Formats

Notation for

representing models

Semantic

Mapping

MS

Concrete

Syntax

C

MC

Semantic

Domain

S

Abstract Syntax

Meta-models

Mathematical

abstraction for

specifying the

meaning of models

MS

DSML-s are the foundations

for model-based design

doTransition (fsm as FSM, s as

State, t as Transition) =

require s.active

step exitState (s)

step if t.outputEvent null

then emitEvent (fsm, t.outputEvent)

step activateState (fsm, t.dst)

Semantic Domain

Meta-models

Chess Review, November 18, 2004 3

Tool Chain Example

Common Semantic Domain: Hybrid Automata

Abstract Syntax: Meta-Models

Domain Models and Tool Interchange Formats

AIRES

EC

? SL A I DP

F

Vehicle Control Platform Tool Chain

Simulink

StateFlow

SL/SF ?

ECSL-DP

ECSL-DP

GME

SL/SF

? DSE

EDP

?C

DESERT

OSEK/

Code

ECSL-DP

? MOML

PTOLEMY

Chess Review, November 18, 2004 4

2

Research Agenda in

Model-Based Design

1. Composition of Domain Specific

Modeling Languages

2. Model Transformation

3. Model Synthesis

Chess Review, November 18, 2004 5

Constructing Design Flow:

Modeling and Transformations

Domain Models and Tool Interchange Formats

Simulink

StateFlow

SL/SF ?

ECSL-DP

ECSL-DP

GME

SL/SF

? DSE

DSML1DM

S

- Large influence of

concrete syntax

- No clear role of

semantics

- It is not clear what are

we doing?

DSML-1

MC1

MS1

A

C

DSML2DM

Transformation

T

C

DSML-2

MC2

S

MS2

A

Chess Review, November 18, 2004 6

3

Abstract Syntax Metamodeling

Domain

Models

and

Tool Interchange Formats

Abstract

Syntax:

Meta-Models

SL/SF

Simulink

Meta-Model

StateFlow

ECSL-DP

ECSL-DP

Meta-Model

GME

SL/SF?

SL/SF ?

ECSLECSL-DP

DP

SL/SF

? DSE

SL/SF?

DESERT

DSML1DM

S

DSML-1

- Set-valued Semantic

Domain for the metamodels

and transformations

Transformation

T

C

C

DSML-2

MC2

MC1

MS1

- Gives structural semantics

for the models

DSML2DM

A

MDSML1,DSML2

A

MOFADSML1

MTLTDSML1,DSM2

MOFADSML2

MTL

MOF

MOF

S

MS2

M12: MOFADSML1↙MOFADSML2

Chess Review, November 18, 2004 7

Metamodeling Languages

Metamodeling of DSML

Using MOF

DSML

MOFADSML

Metamodeling of MOF

Using MetaGME

MOF

T1

GME-DSML

Meta

GME

T1

T2

MetaGMEADSML

MetaGMEAMOF

GME-MOF

GME/

Meta

Changing from GMEMeta to MOF

GME/

Meta

Chess Review, November 18, 2004 8

4

UMT:

A Simple Model Transformation Language

1.Pattern specification

每 Pattern variables are typed with their UML

classes

每 Cardinality of association-ends is checked

每 Extra (OCL) constraints define guard conditions

2.Graph transformation and rewrite

每 Create new/delete/modify objects

每 Attribute mapping (procedural)

每 ※Cross-links§: edges between old/new objects

每 Input/output ports: pre-bound pattern variables

3.※High-level§ control flow over the rules

每 Port connections imply ※data flow§ and control

flow

每 Hierarchy/Sequencing/Recursion/Branching

Chess Review, November 18, 2004 9

Results: MIC Metaprogrammable Tool

Meta-Model of StateFlow using uml/OCL

as meta modeling language.

DOMAIN-MODEL

Input

Interface

GReAT

UDM

A

P

I

Physical interface

Rewrite

Engine

A

P

I

Metamodel of

Output

Output abstract syntax

Input

Models

Input abstract syntax

Meta-model

Metamodel of

Transformatio

n

Metamodel of

Input

Physical interface

DSML:

StateFlow

Implementation:

Execution

Meta-level: Translator

design

META-MODEL

Target

Models

Output Interface

GME, UDM & GREAT

Completed tool suite, available

through the ESCHER Repository

Chess Review, November 18, 2004 10

5

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download