Faculty of Computer Science, Institute for Software- and - - PowerPoint PPT Presentation

faculty of computer science institute for software and
SMART_READER_LITE
LIVE PREVIEW

Faculty of Computer Science, Institute for Software- and - - PowerPoint PPT Presentation

Faculty of Computer Science, Institute for Software- and Multimedia-Technology, Chair for Software Technology Matthias Bruer and Birgit Demuth Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics


slide-1
SLIDE 1

Model-Level Integration

  • f the

OCL Standard Library Using a Pivot Model with Generics Support

Ocl4All: Modelling Systems with OCL Workshop at MoDELS 2007 Nashville, 30 Sept. 2007

Faculty of Computer Science, Institute for Software- and Multimedia-Technology, Chair for Software Technology

Matthias Bräuer and Birgit Demuth

slide-2
SLIDE 2

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 2 OCL Expressions:

  • WFRs
  • Queries

Motivation

M3 M2 M1 M0 DSLs

Meta-Metamodels:

  • (E)MOF
  • Ecore
  • KM3

Metamodels:

  • UML
  • CWM
  • Custom

Models System:

  • Java
  • DB

OCL

Integration

OCL Engine:

  • Interpreter
  • Code Gen-

erator.

Execution

OCL

Definition

Standard Library

Metamodel:

  • Types
  • Expres-

sions Types Package

contains

Standard Library Model

reference

Standard Library Runtime

uses

Implementation

JMI, EMF

JAVA

OCL Engine Code

JAR

OCL Engine Library

slide-3
SLIDE 3

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 3 OCL Expressions:

  • WFRs
  • Queries

Motivation

M3 M2 M1 M0 DSLs

Meta-Metamodels:

  • (E)MOF
  • Ecore
  • KM3

Metamodels:

  • UML
  • CWM
  • Custom

Models System:

  • Java
  • DB

OCL

Integration

OCL Engine:

  • Interpreter
  • Code Gen-

erator.

Execution

OCL

Definition

Standard Library

Metamodel:

  • Types
  • Expres-

sions Types Package

contains

Standard Library Model

reference

Standard Library Runtime

uses

Implementation

JMI, EMF

JAVA

OCL Engine Code

JAR

OCL Engine Library

!

slide-4
SLIDE 4

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 4

Aims

integrate OCL

  • with

arbitrary domain-specific languages

  • n different meta

layers

detach OCL Standard Library from the language definition

slide-5
SLIDE 5

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 5 OCL Expressions:

  • WFRs
  • Queries

Integrate OCL metamodel

M3 M2 M1 M0 DSLs

Meta-Metamodels:

  • (E)MOF
  • Ecore
  • KM3

Metamodels:

  • UML
  • CWM
  • Custom

Models System:

  • Java
  • DB

OCL

Integration

OCL Engine:

  • Interpreter
  • Code Gen-

erator.

Execution

OCL

Definition

Standard Library

Metamodel:

  • Types
  • Expres-

sions Types Package

contains

Standard Library Model

reference

Standard Library Runtime

uses

Implementation

JMI, EMF

JAVA

OCL Engine Code

JAR

OCL Engine Library

slide-6
SLIDE 6

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 6

based

  • n

depends on based on forward

Integrate OCL metamodel with a pivot model

Pivot model

Dresden OCL TK Common Model Kent OCL Library Bridge EMOF EMF Ecore

OCL Engine OCL MM DSL MM Adapters

slide-7
SLIDE 7

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 7 OCL Expressions:

  • WFRs
  • Queries

Detach the standard library definition

M3 M2 M1 M0 DSLs

Meta-Metamodels:

  • (E)MOF
  • Ecore
  • KM3

Metamodels:

  • UML
  • CWM
  • Custom

Models System:

  • Java
  • DB

OCL

Integration

OCL Engine:

  • Interpreter
  • Code Gen-

erator.

Execution

OCL

Definition

Standard Library

Metamodel:

  • Types
  • Expres-

sions Types Package

contains

Standard Library Model

reference

Standard Library Runtime

uses

Implementation

JMI, EMF

JAVA

OCL Engine Code

JAR

OCL Engine Library

slide-8
SLIDE 8

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 8

deserialize serialize

OCL Standard Library as a pivot model instance

Pivot model Standard library model instance instance

  • f
  • f

OCL Engine XMI file OCL MM instance instance

  • f
  • f
slide-9
SLIDE 9

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 9

Modeling generics

inspired by Ecore 2.3 core idea: make generics a first-class modeling construct:

Generic types Type parameters Type arguments Generic methods

slide-10
SLIDE 10

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 10

access read bind

Binding generic types during parsing

OCL

OCL OCL expressions OCL parser OclLibrary interface let c : Collection(String) in … Collection<T> Generic Type getCollectionType(String) bindTypeParameter(T,String)

slide-11
SLIDE 11

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 11

Open issues

modeling iterator expressions binding of generic operations coupling model and instance level

slide-12
SLIDE 12

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 12 OCL Expressions:

  • WFRs
  • Queries

Provide domain-specific execution semantics

M3 M2 M1 M0 DSLs

Meta-Metamodels:

  • (E)MOF
  • Ecore
  • KM3

Metamodels:

  • UML
  • CWM
  • Custom

Models System:

  • Java
  • DB

OCL

Integration

OCL Engine:

  • Interpreter
  • Code Gen-

erator.

Execution

OCL

Definition

Standard Library

Metamodel:

  • Types
  • Expres-

sions Types Package

contains

Standard Library Model

reference

Standard Library Runtime

uses

Implementation

JMI, EMF

JAVA

OCL Engine Code

JAR

OCL Engine Library

slide-13
SLIDE 13

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 13

The end

Thank you for your attention! Questions, comments?

slide-14
SLIDE 14

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 14

slide-15
SLIDE 15

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 15

Pivot model

  • verview
slide-16
SLIDE 16

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 16

Generics meta model

slide-17
SLIDE 17

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 17

Generic types

slide-18
SLIDE 18

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support 18

The OclLibrary interface