Foundations for Model-Based Design Janos Sztipanovits ISIS, - - PowerPoint PPT Presentation

foundations for model based design
SMART_READER_LITE
LIVE PREVIEW

Foundations for Model-Based Design Janos Sztipanovits ISIS, - - PowerPoint PPT Presentation

Foundations for Model-Based Design Janos Sztipanovits ISIS, Vanderbilt University janos.sztipanovits@vanderbilt.edu MPSOC 2005 Margaux, France July 11, 2005 Content Introduction to model-based design System Composition Dimension


slide-1
SLIDE 1

Foundations for Model-Based Design

Janos Sztipanovits ISIS, Vanderbilt University

janos.sztipanovits@vanderbilt.edu MPSOC 2005 Margaux, France July 11, 2005

slide-2
SLIDE 2

Content

  • Introduction to model-based design
  • System Composition Dimension

– Layers – Approaches – Languages

  • Tool Composition Dimension

– Layers – Building Tool Chains

  • Metamodeling and Metaprogrammable

Tools

  • Semantics
slide-3
SLIDE 3

Goal and Approaches

  • Building increasingly complex networked

systems from components

– Naïve “plug-and-play” approach does not work in embedded systems (neither in larger non- embedded systems) – Model-based software design focuses on the formal representation, composition, analysis and manipulation of models during the design process.

  • Approaches with differences in focus and

details

– MDA: Model Driven Architecture – MDD: Model-Driven Design – MDE: Model-Driven Engineering – MIC: Model-Integrated Computing

slide-4
SLIDE 4

Two Dimensions of MIC

System Composition

(Product Models)

Heterogeneous Distributed Embedded Layered Composable Integrated Correct by construction

Tool Composition

(Design Process Models)

Customizable Frameworks Single Tools Composition Frameworks

Rational Rose

SL/SF VS

UPAAL

ECLIPSE TOOLS ESCHER TOOLS

www.escherinstitute.org

slide-5
SLIDE 5

Content

  • Introduction to model-based design
  • System Composition Dimension

– Layers – Approaches – Languages

  • Tool Composition Dimension

– Layers – Building Tool Chains

  • Metamodeling and Metaprogrammable

Tools

  • Semantics
slide-6
SLIDE 6

System Composition Dimension: Core Modeling Aspects

Component Behavior Structure Interaction Scheduling / Resource Allocation Modeled on different levels of abstraction:

  • Transition systems (FSM, Time Automata, Cont.

Dynamics, Hybrid), fundamental role of time models

  • Precise relationship among abstraction levels
  • Research: dynamic/adaptive behavior

Expressed as a system topology :

  • Module Interconnection (Nodes, Ports, Connections)
  • Hierarchy
  • Research: dynamic topology

Describes interaction patterns among components:

  • Set of well-defined Models of Computations (MoC)

(SR, SDF, DE,…)

  • Heterogeneous, but precisely defined interactions
  • Research: interface theory (time, resources,..)

Mapping/deploying components on platforms:

  • Dynamic Priority
  • Behavior guarantees
  • Research: composition of schedulers
slide-7
SLIDE 7

Examples for Research Approaches

Component Behavior Structure Interaction Scheduling / Resource Allocation Ptolemy II

(Lee, UCB)

Java Code/ Behavioral Models Hierarchical Module Interconnection Heterogeneous Models of Computation + Directors Metropolis

(ASV1, UCB)

Netlists (port, interface, connection) IF

(Sifakis, Verimag)

Process (Hierarchical Timed Automaton) Dynamically Created Channels Asynchronous Interactions:

  • P2P
  • Unicast
  • Multicast

Dynamic Priorities Process (Hierarchical, Active Components ) Medium (port, parameter, useport) Scheduler (port, parameter)

1 Alberto Sangiovanni-Vincentelli

slide-8
SLIDE 8

Modeling Formalisms Are Different

Ptolemy II Metropolis IF

slide-9
SLIDE 9

Emergence of Modeling Language Standards

  • SySML
  • Others (UML-2; RT-UML, SLML, AADL,…)
slide-10
SLIDE 10

Current Status of System/SW Modeling Languages

  • The number of new standards is growing driven

by competing consortiums and .org-s

  • Intended scope ranges from “unified” to

“specific”.

  • Many views them as programming languages

− Wait for the “Unified One” to ensure reusability of tools − Slow down deployment because of the lack of standards − Wait for executable models

  • Modeling and analysis tools are not integratable

(closed camps emerge protected by a “standard”).

  • Semantics is largely neglected or left to

undocumented interpretations of tool developers.

slide-11
SLIDE 11

Trends in Modeling Languages

  • Increasing acceptance of metamodeling and

Domain-Specific Modeling Languages based

  • n standard metamodels (Meta Object

Facility, MOF)

  • Emergence of metaprogrammable tools
  • Desire for solving the “semantics problem”
  • Better understanding of the role of

precise model transformations in model- based generators and in building domain- specific tool chains from reusable tools

slide-12
SLIDE 12

Content

  • Introduction to model-based design
  • System Composition Dimension

– Layers – Approaches – Languages

  • Tool Composition Dimension

– Layers – Building Tool Chains

  • Metamodeling and Metaprogrammable

Tools

  • Semantics
slide-13
SLIDE 13

Tool Composition Dimension: Core Modeling Aspects

doTr ansi t i on ( f sm as as FSM , s as as St at e, t as as Tr ansi t i on) = r equ r equi r i r e s. act i ve st ep st ep exi t St at e ( s) st ep st ep i i f t . out put Event <> nul l nul l t hen em i t Event ( f sm , t . out put Event ) st ep st ep act i vat eSt at e ( f sm , t . dst )

Semantic Foundation Libraries Domain-Specific Environments Metaprogrammable Tools, Environments

Modeling Domain Specific Design Flows: Examples in MIC:

  • ECSL - Automotive
  • ESML - Avionics
  • SPML - Signal Processing
  • CAPE/eLMS – Learning Technology

Metamodeling and Metaprogrammable Tools: (mature or in maturation program)

  • GME (Generic Model Editor)
  • GReAT (Model Transformation)
  • OTIF (Tool Integration Framework)
  • UDM (Universal Data Model)
  • DESERT (Design Space Exploration)
  • GME-MOF/Meta (Metamodeling Env-s)

Modeling Semantics (work in progress):

  • Semantic “Units”
  • Semantic Anchoring
slide-14
SLIDE 14

Interrelation with System Composition

Component Behavior Structure Interaction Scheduling / Resource Allocation

Domain-Specific Tools, Tool Chains Metaprogrammable Tools, Environments Semantic Foundation;

  • Set-Valued

Semantics

  • State Automaton
  • Timed Automaton
  • Hybrid Automaton
  • Tagged Signal Model
  • State Automaton
  • Timed Automaton
  • Transition Systems

With Priority Abstract Syntax + Semantic Anchoring Abstract Syntax + Semantic Anchoring Abstract Syntax + Semantic Anchoring Abstract Syntax + Semantic Anchoring Behavior Modeling View Structural Modeling Views Interaction Modeling Views Resource Access Modeling Views TOOLS COMPOSITION PLATFORMS METAPROGRAMMABLE TOOLS

slide-15
SLIDE 15

Example Tool Chain: Vehicle Control Platform (VCP)

Abstract Syntax and Transformations: Meta-Models Common Semantic Domain: Hybrid Automata Domain Models and Tool Interchange Formats: Tool Chains

DESERT PTOLEMY AIRES OSEK/ Code ECSL-DP GME Simulink Stateflow

SL/SF ECSL-DP ECSL-DP MOML ECSL-DP AIF SL/SF DSE EDP C

Vehicle Control Platform (VCP)

Behavior Model Component Structure Component Interaction Schedulability Analysis Behavior Simulation

slide-16
SLIDE 16

Constructing Tool Chains: Modeling and Transformations

ECSL-DP GME

SL/SF ECSL-DP

Simulink StateFlow

SL/SF DSE

Domain Models and Tool Interchange Formats

S C A

MC2 MS2

DSML-2

C S A

MC1 MS1

DSML-1

Transformation T

  • Large influence of

concrete syntax

  • No clear role of

semantics

  • It is not clear what are

we doing? Simulink StateFlow

ECSL-DP GME

DSML1DM DSML2DM

slide-17
SLIDE 17

Content

  • Introduction to model-based design
  • System Composition Dimension

– Layers – Approaches – Languages

  • Tool Composition Dimension

– Layers – Building Tool Chains

  • Metamodeling and Metaprogrammable

Tools

  • Semantics
slide-18
SLIDE 18

Metamodeling Layer Objectives

Semantic Domain: Set-Valued Domain models Interchange Formats Abstract Syntax Meta-models

MC MS

i nt er f ace i nt er f ace Event st r uct ur e st r uct ur e M

  • del Event

i m pl em ent s i m pl em ent s Event case case M

  • del Event 1

Structural Semantics

  • Metamodeling
  • Model Data Management
  • Model Transformation
  • Tool Integration
slide-19
SLIDE 19

Metamodeling and Domain Specific Modeling Languages

Domain Specific Modeling Language (DSML)

Semantic Domain S Abstract Syntax A Concrete Syntax C Parsing Semantic Mapping

Concepts Relations Well formed-ness rules Mathematical abstraction for specifying the meaning of models Notation for representing models

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

MS MC

  • Model: precise representation
  • f artifacts in a modeling language L
  • Modeling language: defined by

the notation (C), concepts/relations and integrity constraints (A), the semantic domain (S) and mapping among these.

  • Metamodel: formal (i.e. precise)

representation of the modeling language L using a metamodeling language LM.

slide-20
SLIDE 20

Modeling Example: Metamodel and Models

Metamodel:

  • Defines the set of

admissible models

  • “Metaprogramms” tool

Model:

  • Describes states and transitions
  • Modeling tool enforces constraints
slide-21
SLIDE 21

Metaprogrammable Modeling Tool: GME

– Configuration through UML and OCL-based metamodels – Extensible architecture through COM – Multiple standard backend support (ODBC, XML) – Multiple language support: C++, VB, Python, Java, C#

Decorator Decorator

GModel GMeta CORE

Metamodel

XML Paradigm Definition Storage Options

DB #n DB #1 XML … UML / OCL COM COM COM XML XML ODBC Constraint Manager

Browser

Translator(s) Add-On(s) GME Editor

GME Architecture

slide-22
SLIDE 22

Model Data Management: The UDM Goals

  • To have a conceptual view of data/metadata

that is independent of the storage format.

  • Such a conceptual view should be based on

standards such as UML.

  • Have uniform access to data/metadata such

that storage formats can be changed seamlessly at either design time or run time.

  • Generate a metadata/paradigm specific API to

access a particular class of data.

slide-23
SLIDE 23

Model Data Management: The UDM Tool Suite

GME UML GME/UML Interpreter UDM.exe XML (Meta)

<Uml.xsd>

.cpp .h .xsd User Program UDM Generated code API Meta-

  • bjects

XML data file Validates

UdmCopy XML MEM MGA GME Backends Binary file CORBA Network Generic API OCL Eval

slide-24
SLIDE 24

Model Transformation: The “Workhorse” of MIC

MDSML1,DSML2

MOFADSML1 MOFADSML2 MTLTDSML1,DSM2

MOF UMT MOF M12: MOFADSML1→MOFADSML2

S C A

MC2 MS2

DSML-2

C S A

MC1 MS1

DSML-1

DSML1DM DSML2DM

Transformation T

Rewrite Engine

Input Models Target Models Physical interface Physical interface

Input abstract syntax Output abstract syntax

Input Interface Output Interface

A P I A P I

UDM UDM GReAT GReAT Metamodel of Input Metamodel of Output Metamodel of Transformatio n Meta-level: Translator design Implementation: Execution

Relevant Use of Model Transformations:

  • Building integrated models by extracting

information from separate model databases

  • Generating models for simulation and

analysis tools

  • Defining semantics for DSML-s

MIC Model transformation technology is:

  • Based on graph transformation

semantics

  • Model transformations are specified

using metamodels and the code is automatically generated from the models.

slide-25
SLIDE 25

Model Transformation: The GReAT Tool Suite

MetaModel of Source Source Models Meta-Programmable Modeling Tool MetaModel of Target MetaModel of Domain-to-Target Mapping Meta-Programmable Transformation Tool Code Generator (Generated) Transformation Tool Debugger Target/Executable Models Target Platform

Meta-models Meta- programmable tools Models and applications Generated tool uses uses describes describes configures creates configures generates

GRE DEBUG C/G Tools: UMT Language, GRE (engine), C/G, GR-DEBUG Tools: UMT Language, GRE (engine), C/G, GR-DEBUG GME

slide-26
SLIDE 26

Open Tool Integration Framework: OTIF

BACKPLANE REGISTRATION/NOTIFICATION/TRANSFER SERVICES SEMANTIC TRANSLATOR SEMANTIC TRANSLATOR TOOL TOOL ADAPTOR TOOL TOOL ADAPTOR TOOL TOOL ADAPTOR MANAGER Standard interface/ Protocol METADATA Karsai, ISIS-Vanderbilt

  • Share models using Publish/Subscribe Metaphor
  • Status:

– Completed, tested in several tool chains – Protocols in OMG/CORBA – CORBA as a transport layer – Integration with ECLIPSE is in progress

  • Share models using Publish/Subscribe Metaphor
  • Status:

– Completed, tested in several tool chains – Protocols in OMG/CORBA – CORBA as a transport layer – Integration with ECLIPSE is in progress

RFP is Discussed at MIC PSIG OMG

http://www.isis.vanderbilt.edu/Projects/WOTIF/default.html

slide-27
SLIDE 27

MIC Metaprogrammable Tool Suite

Generic Model Editor GME UDM Persistency Service

  • Database
  • XML
  • C++ API

GReAT Analysis Tools

  • Simulators
  • Verifiers
  • Model Checkers

DESERT

Meta Language

Component Abstraction (TA) Design Space Modeling (MD) Design Space Encoding (TE) Design Space Pruning Design Decoding Component Reconstruction

Model Transformation Unified Data Model

GME, UDM, GREAT, DESERT

Completed tool suite, available through the ESCHER Quality Controlled Repository: http://escher.isis.vanderbilt.edu OTIF Design Space Exploration

slide-28
SLIDE 28

“Backplane View” of the VCP Tool Chain

Common Semantic Domain: Hybrid Automata Domain Models and Tool Interchange Formats: Tool Chains

DESERT PTOLEMY AIRES OSEK/ Code ECSL-DP GME Simulink Stateflow

SL/SF ECSL-DP ECSL-DP MOML ECSL-DP AIF SL/SF DSE EDP C

Vehicle Control Platform (VCP)

Abstract Syntax and Transformations: Meta-Models SL/SF Meta-Model ECSL-DP Meta-Model AIRES Meta-Model PTOLEMY (MOML) DESERT Meta-Model SFC Meta-Model ECSL-DP SFC SL/SF ECSL-DP ECSL-DP MOML ECSL-DP AIF SL/SF DESERT

slide-29
SLIDE 29

Content

  • Introduction to model-based design
  • System Composition Dimension

– Layers – Approaches – Languages

  • Tool Composition Dimension

– Layers – Building Tool Chains

  • Metamodeling and Metaprogrammable

Tools

  • Semantics
slide-30
SLIDE 30

doTr ansi t i on ( f sm as as FSM , s as as St at e, t as as Tr ansi t i on) =

Semantic Domain Meta-models Domain models Interchange Formats Abstract Syntax Meta-models

MC MS S C A

MC2 MS2

DSML-2

C S A

MC1 MS1

DSML-1

DSML1DM DSML2DM

Transformation T

MS1= MS2○ M12

MDSML1,DSML2

MOFADSML1 MOFADSML2 MTLTDSML1,DSM2

MOF MTL MOF M12: MOFADSML1→MOFADSML2 MS2: ADSML2→S MS1: ADSML1→S ?

Behavioral Semantics

How About Semantics?

Transformational Specification of Behavioral Semantics

slide-31
SLIDE 31

MDSMLi,SU

S C A

MC2 MSU

SU

C S A

MC1 MSi

DSML-i

MOFADSMLi MOFASU MTLTDSMLi,SU

MOF MTL MOF

Mi: MOFADSMLi→MOFASU

Transformation T MSU: ASU→S

MSi= MSU ○ Mi

Semantic “Units” DSML-i

doTr ansi t i on ( f sm as as FSM , s as as St at e, t as as Tr ansi t i on) =

Semantic Domain Meta-models Domain models Interchange Formats Abstract Syntax Meta-models

MC MS

Semantic Anchoring of DSML-s

  • The “Semantic Units” are

selected common semantics such as MoC-s

  • DSML-s or their aspects

are anchored to the common semantics using transformations

  • The “Semantic Units” are

specified in a formal framework

Semantic Anchoring

slide-32
SLIDE 32

Semantic Anchoring Infrastructure

  • Semantic Unit

– A well-defined operational semantics for core Models of Computation and Behaviors (e.g. FSM).

  • Semantic Anchoring

– Define the semantics a DSML through specifying the transformation specification to a semantic unit.

AsmL Behavioral Semantic Spec Transformational Specification Translator Engine DSML Metamodel

GME GME Toolset Toolset GReAT Tool GReAT Tool

Model Checker Model Simulator Test Case Generator Mc

XML Parser AsmL Spec AsmL Tools AsmL Tools

Instance Generate AsmL Metamodel AsmL Model (XML Format) AsmL Data Model Domain Model

slide-33
SLIDE 33

S C A

MC MS

MMM

MOFASU

MOF MS3: MOFADSML1→MOFASU MS: ASU→S

Common Semantic Domain

Simulator MTL Transformation T1

MS1= MDSML1,SU○ MS

C S A

MC1 MS1

DSML-1

MOFADSML1

MOF

DSML-1

MDSML1,SU

MTLTDSML1,SU DSML1DM

S C A

MS2 MC2

DSML-2

MOFADSML2

MOF

DSML-2

MTL Transformation T2 MSU,DSML2

MTLTSU,DSML2 DSML2DM

Semantic Integration of Tools

Analysis Tool Modeling Tool

MS= MSU, DSML2○ MS2

T1 T2

Obligation of DSML Developer Obligation of Tool Developer

slide-34
SLIDE 34

Summary

  • “Plug-and-Play” component technology is not

sufficient for embedded software of non- trivial size

  • Model-based design addresses core issues:

it integrates systems and software engineering

  • Active research programs in system and

tool chain composition have made significant progress in the past five years

  • New frontier: explicit semantics
slide-35
SLIDE 35

FSM Metamodel

slide-36
SLIDE 36

FSM Model

slide-37
SLIDE 37

Metamodel for AsmL Abstract Data Model

slide-38
SLIDE 38

AsmL Abstract Data Model

Abstract Model

slide-39
SLIDE 39

AsmL Behavioral Semantic Specifications

Behavior in Terms of Abstract Model

slide-40
SLIDE 40

Transformational Specifications

slide-41
SLIDE 41

AsmL Data Model in XML Format

slide-42
SLIDE 42

AsmL Data Model

Instance of the Abstract Model