Title: Model-Based Design
1Model-Based Design
- DSML Composition
- Model Synthesis and
- Model Transformation
- Janos Sztipanovits and Gabor Karsai
- November 14,2002
2Model-Based Design andComposition
3Platforms(There are many)
Time-Triggered Architecture (distributed, hard
real-time, safe)
Servo Controller
Servo Controller
Servo Controller
Servo Controller
CNI
CNI
CNI
CNI
TTP Controller
TTP Controller
TTP Controller
TTP Controller
Control Data
Control Data
Processor
Control Data
Processor
Control Data
Processor
Processor
BG
BG
BG
BG
BG
BG
BG
BG
TTP Bus
Integration framework, composition mechanisms,
components
QoS Middleware (such as CORBA)
Application
Application
Application
QoS parameters
QoS Middleware
QoS Middleware
Control Algorithm
Operating System
Operating System
Strong isolation between SW and HW by Active
Control
Control vars.
Measured vars.
Hardware CPU, MEM, I/O
Hardware CPU, MEM, I/O
OS
4Challenges in Model-Based Design
Design
Model-Based Design
Model-Based Design of Embedded Systems
Pi-1
D S M L
Application Space
Application Models
Pi
Mapping
Gen./ Synth.
Pi1
D S M L
Implementation Space
Implement. Models
- Composition of
- Domain Specific Modeling Languages (DSML)
- Model Synthesis
- Model Transformation
5Specification of Domain Specific Modeling
Languages (DSML)
L lt C, A, S, MS, MCgt
Concepts Relations Well formed-nessrules
Abstract Syntax A
Semantic DomainS
MS
Mathematical abstraction for specifying the
meaning of models
Semantics
parses to
MC
Concrete Syntax C
Notation forrepresenting models
6Concrete Syntax and Abstract Syntax
Signal Flow Language (SF)
Abstract Syntax A
Semantic DomainS
MS
Semantics
parses to
Concrete Syntax C
MC
7Semantics via Meta-Modeling
Meta-modeling language with well-defined semantics
Abstract Syntax
Semantic Domain
Semantics
parses to
Concrete Syntax
Represented by Meta-model
Semantics
Abstract Syntax
Semantic Domain
Semantics
parses to
DSML
Concrete Syntax
8Semantics via Translation
Modeling language with well-defined semantics
Abstract Syntax
Semantics
Semantic Domain
parses to
Lee, Sangiovanni-Vincentelli
Concrete Syntax
Semantics
translator
Abstract Syntax
Semantic Domain
Semantics
parses to
Concrete Syntax
DSML
9DSML Composition
SDFCont.Dyn
HSF
Abstract Syntax
Semantic Domain
Semantic Domain
Semantics
Semantics
Abstract Syntax
translation
AL1
parses to
parses to
Concrete Syntax
Concrete Syntax
Structural Semantics
AL2
Abstract Syntax
Semantic Domain
Semantic Domain
Semantics
Semantics
Abstract Syntax
translation
parses to
parses to
Concrete Syntax
Concrete Syntax
CSP
FSM
10Simple Support for Compositional Meta-Modeling
Metamodel composition with GME
Composition Operators
11Research Agenda on DomainSpecific Modeling
Languages
- Precise, compositional meta-modeling
- Multiple aspect modeling in the compositional
meta-modeling framework - Practical issues
- Examples, meta-model libraries
- Meta-programmable tools
- Link to UML-2
12Model Synthesis and Transformations
Model-Based Design of Embedded Systems
Domain-Specific Modeling
Languages
Pi-1
Pi
Matlab Code-Gen.
Matlab Code-Gen.
Generator
Model-Based Generator Technology - Modeling
of generators - Generating generators
- Provably correct generators -
Embeddable generators
Pi1
if (inactiveInterval ! -1) int
thisInterval (int)(System.curren
tTimeMillis() - lastAccessed) / 1000
if (thisInterval gt inactiveInterval)
invalidate()
ServerSessionManager ssm
ServerSessionManager.getManager()
ssm.removeSession(this)
private long lastAccessedTime
creationTime / Return the last
time the client sent a request associated with
this session, as the number of
milliseconds since midnight, January 1, 1970
GMT. Actions that your application takes, such
as getting or setting a value associated
with the session, do not affect the access time.
/ public long getLastAccessedTime()
return (this.lastAccessedTime)
this.lastAccessedTime time /
Update the accessed time information for this
session. This method should be called by
the context when a request comes in for a
particular session, even if the
application does not reference it. /
public void access()
this.lastAccessedTime this.thisAccessedTime
this.thisAccessedTime System.currentTimeMil
lis() this.isNewfalse
lastAccessedTime 0L lastAccessedTime
((Long) stream.readObject()).longValue()
maxInactiveInterval ((Integer)
stream.readObject()).intValue() isNew
((Boolean) stream.readObject()).booleanValue()
- Model Synthesis
- Model Transformation
ConfigurationSpecification
Code
Analysis Tool
13Meta-generators Model Transformations in Tool
Integration
Domain-specific model
Meta- model for source
- Roles transformations play in model-based design
- Refining a design into an implementation
- Code generation
- PIM -gt PSM mapping
- Support for model interchange for tool integration
Meta- model for transform
Transformer
GEN
- Approach (Karsai) Meta-models for source and
target models plus transformations, then
generating the transformer
Target model
Meta- model for target
14Meta-generators Model Transformations in
Component Integration
Transformer
15Constraint-Based Model Synthesis
16Generative modeling Extensions to Meta-Modeling
Languages
- Iterative (for) and conditional
(if)constructs in models can greatly enhance
expressiveness while reducing complexity.
Input design with for loop
What it means
Replicate the middle of pipeline Order times!
Transformer
Order 3
17Other Uses of Transforms on Models Design
Patterns
- Design patterns capture prototypical solutions to
a design problem. As such, they are parametric
and reusable.
Input design
Design with pattern applied
Design pattern (as a transform)
Transformer
18Research Agenda on ModelTransformations
- Languages and tools for meta generators
- Model synthesis using explicit design patterns
- Model synthesis using constraint-based
design-space exploration - Generative modeling extensions to languages
- Embeddable generators