Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and...

27
Ontologi es Reasonin g Component s Agents Simulatio ns An Overview of An Overview of Model-Driven Model-Driven Engineering Engineering and Architecture and Architecture Jacques Robin
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    216
  • download

    0

Transcript of Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and...

Page 1: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

OntologiesReasoningComponentsAgentsSimulations

An Overview of An Overview of Model-Driven Model-Driven EngineeringEngineering

and Architectureand Architecture

Jacques Robin

Page 2: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

OutlineOutline

What is MDA? MDA Principles MDA Process and Software Reuse OMG MDA standards Third party providers roles, standards and tools

Page 3: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

What is Model-Driven Architecture What is Model-Driven Architecture (MDA)?(MDA)?

An initiative from the Object Management Group (OMG) started in 1997, www.omg.org/mda/

New paradigm of software development Goals:

Maxime software reuse across platforms Solve the second order interoperability problem among different

middleware (which goal was to solve the first order interoperability problem among programming languages)

Raise the level of abstraction where most development effort is spent from code to model

Provide standards to automate the entire software development process through a model transformation approach

Reuses and extends previous standards Unified Modeling Language (UML), by OMG Meta-Object Facility (MOF), by OMG eXtensible Markup Language (XML), by W3C (World-Wide Web

Consortium, www.w3c.org/xml/)

Page 4: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

MDA PrinciplesMDA Principles

The most valuable, durable, reusable assets produced during the development process is not code but models

Far more significant and cost-effective quality gains are achievable by improving design and models than by improving code

Benefits from careful, detailed, explicit modeling is not limited to the application under development but extend to all the processes, artifacts, languages, tools and platforms used for this development

Page 5: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

MDA PrinciplesMDA Principles

A high degree of software process automation can be achieved by: Building a variety of models, each one with a different role in the

process, Making each of these models machine processable by expressing it

in a semi-formal notation devoid of natural language Defining this notation itself as an object-oriented model (called a

meta-model) Storing all models and meta-models with traceability links in a

repository accessible to model manipulation software Abstracting generic transformations between pairs of meta-models

that computationally codify the know how for one software process stage

Using model transformation engines to apply these transformations to the source model of a process stage and generate the target model of that stage

Define meta-models for the meta-modeling and model transformation notations

Page 6: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Abstraction

Executability

CurrentCurrentMainstreamMainstream

OOSEOOSE

Domain Modeling w/ UML or DSML CASE Tool

Domain/ Business Model: UML or DSML + Feature Tables + NL

Specification Model: (UML or DSML) + NL

Requirement Analysisw/ UML or DSML CASE Tool

High-Level Design Model: (UML or DSML) + NL

High-Level Design

Detail Design (Refinement)simultaneously with

Programming (Translation)with Execution Platform IDE

SourceCode

ExecutableCode

Source Codeto Executable Code

Translation

Page 7: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Abstraction

Executability

Manual Manual MDE:MDE:

Extreme Extreme ModelingModelingFully Refined Specification

Platform Independent Model (PIM): UML/OCL or DSPIML

Fully RefinedRequirement Analysis

w/ UML/OCL orDSPIML CASE Tool

High-Level Realization PIM:UML/OCL or DSPIML

High-LevelDesign

w/ UML/OCL orDSPIML CASE Tool

PSM MetaModeland/or UML Profile

PlatformSpecific

Model (PSM)Metamodeling

and/or Profiling

Fully Refined Realization PIM:

UML/OCL or DSPIML

DesignFull Refinement

w/ UML/OCLor DSPIML CASE Tool

PSM:Profiled

UML/OCLor DSPSML

PIM to PSMTranslation

SourceCode

PSM toSource CodeTranslation

PIM MetaModeland/or UML Profile

PlatformIndependentModel (PIM)

Metamodelingand/or Profiling

ExecutableCode

SourceCode to

ExecutableCode

Translation

Page 8: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Abstraction

Executability

Transformation Based MDE:Transformation Based MDE:UML ProgrammingUML Programming

Fully Refined SpecificationPlatform Independent Model (PIM):

UML/OCL or DSPIML

Fully RefinedRequirement Analysis

w/ UML/OCL orDSPIML CASE Tool

High-Level Realization PIM:UML/OCL or DSPIML

High-LevelDesign

w/ UML/OCL orDSPIML CASE Tool

Fully Refined Realization PIM:

UML/OCL or DSPIML

DesignFull Refinement

w/ UML/OCLor DSPIML CASE Tool

PSM:Profiled

UML/OCLor DSPSML

PIM to PSMTranslation

SourceCode

PSM toSource CodeTranslation

ExecutableCode

SourceCode to

ExecutableCode

Translation

PSM toSource CodeTranslation

TransformationBase

PSM toSource CodeTranslationTransformationDevelopment

PIM to PSMTranslation

TransformationBase

PIM to PSMTranslationTransformationDevelopment

Realization PIMRefinement

TransformationBase

Realization PIMRefinement

TransformationDevelopment

High-LevelRealization PIMTransformation

Base

High-LevelRealization PIMTransformationDevelopment

Page 9: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

MDA Software ProcessMDA Software Process

Application Requirement

Model

DomainComputationIndependent

Model

RequirementMeta-model

ApplicationPlatform

IndependentModel

CIMMeta-model

PIMMeta-model

Meta-Meta-Model

Platform Model

PlatformMeta-model

PSMMeta-model

ApplicationPlatformSpecificModel

ApplicationSourceCode

Source CodeMeta-Model

TestingModel

Testing CodeMeta-Model

TestingMeta-model

TestingCode

Textual Meta-Meta-Model

Page 10: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Artifact Reuse with MDA ProcessArtifact Reuse with MDA Process

DomainComputationIndependent

Model

Application ARequirement

Model

Application APlatform

IndependentModel

Platform P Model

Application APlatform P

SpecificModel

Application BPlatform

IndependentModel

Application BRequirement

Model

Application BPlatform P

SpecificModel

Platform Q Model

Application APlatform Q

SpecificModel

Application BPlatform Q

SpecificModel

TestingModel AP

TestingModel AQ

TestingModel BP

TestingModel BQ

Page 11: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Automated MDA Process: DesignAutomated MDA Process: Design

ModelTransformation

Engine

RequirementMeta-model

CIMMeta-model

PIMMeta-model

DesignTransformations

ModelTransformation

Meta-model

Application Requirement

Model

DomainComputationIndependent

Model

ApplicationPlatform

IndependentModel

Page 12: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Automated MDA Process: Automated MDA Process: ImplementationImplementation

ModelTransformation

Engine

PIMMeta-model

ModelTransformation

Meta-model

ApplicationPlatform

IndependentModel

PIM PSMTransformations

Platform Model

PlatformMeta-model

PSMMeta-model

ApplicationPlatformSpecificModel

Page 13: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Automated MDA Process: Automated MDA Process: Code GenerationCode Generation

ModelTransformation

Engine

ModelTransformation

Meta-model

PSMMeta-model

ApplicationPlatformSpecificModel

Code GenerationTransformations

SourceCode

Meta-Model

ApplicationSourceCode

Page 14: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Automated MDA Process: Automated MDA Process: Test GenerationTest Generation

ModelTransformation

Engine

ModelTransformation

Meta-model

PSMMeta-model

ApplicationPlatformSpecificModel

RequirementMeta-model

Application Requirement

Model

Test GenerationTransformations

TestingModel

TestingMeta-model

Page 15: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Automated MDA Process: Automated MDA Process: Reverse EngineeringReverse Engineering

ModelTransformation

Engine

PIMMeta-model

ModelTransformation

Meta-model

ApplicationPlatform

IndependentModel

PSM PIMReverse Engineering

Transformations

Platform Model

PlatformMeta-model

PSMMeta-model

ApplicationPlatformSpecificModel

Page 16: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Automated MDA Process: Automated MDA Process: PIM RefactoringPIM Refactoring

ModelTransformation

Engine

ModelTransformation

Meta-model

PIM RefactoringTransformations

PIMMeta-model

RefactoredPIM

PIMMeta-model

LegacyPIM

Page 17: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Automated MDA Process: Automated MDA Process: PSM RefactoringPSM Refactoring

ModelTransformation

Engine

ModelTransformation

Meta-model

PSM RefactoringTransformations

PSMMeta-model

RefactoredPSM

PSMMeta-model

LegacyPSM

Page 18: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Automated MDA Process: Automated MDA Process: Code RefactoringCode Refactoring

ModelTransformation

Engine

ModelTransformation

Meta-model

Code RefactoringTransformations

SourceCode

Meta-Model

RefactoredSourceCode

LegacySourceCode

SourceCode

Meta-Model

Page 19: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

OMG Tasks in MDA InitiativeOMG Tasks in MDA Initiative

Define meta-modeling standard: Meta-Object Facility (MOF) Define general-purpose visual modeling standard:

Unified Modeling Language (UML) Define complementary general-purpose, semi-formal textual

modeling standard to make both MOF metamodels and UML models more precise and devoid of natural language: Object Constraint Language (OCL)

Define general-purpose, both machine-processable and user-readable persistent textual format for both MOF meta-models and UML models: XML Model Interchange (XMI)

Define model manipulation standard: Query View Transform (QVT)

Each of these standards to be defined in terms of: Abstract syntax as a MOF meta-model Concrete syntax (visual or textual) Formal semantics (very partial up to now)

Page 20: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Relationships between Relationships between OMG’s MDA standardsOMG’s MDA standards

...

UML2 Infrastructure

ClassesAttributes

TypesPackages

...

Basic

Associations...

Constructs

...

UML2 Superstructure

ActivitiesActionsStates

Transitions...

Behavioral

ComponentsPorts

...

Structural

QVT

MOF2

EMOF CMOF

OCL

merge

XMI

mergemerge

merge

merge

DI

merge

merge

UML2

RAPI

Page 21: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Example Meta-ModelExample Meta-Model

system

+name

actor

+name

useCase

+title

*

0 ..1 1 ..*

extends

includes

OrderItem

ValidateCart

e-Store

UML Model: Use-Case Diagram

MOF Meta-Modelof Use-Cases

1 ..*

extends

Page 22: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Example Meta-Meta-ModelExample Meta-Meta-Model

system

+name

actor

+name

useCase

+title

1 .. *

0 ..1

1 ..*

extends

includes

MOFMeta-Modelof UML Use-Cases

MOF Meta-Modelof MOFMeta-Model

attribute+name+multi

parameter+direction

operation+name

class+name

associationEnd+name+multi

association+name

package+name

extends

1 ..*

Page 23: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Example of XMI EncodingExample of XMI Encoding

system+name

*

orderItem

validateCart

0 ..*extends

includes

useCase

+title

e-Store

0 ..1

actor+name

<umlModel> <useCase id = “oiuc”> <title,visib = pub> “orderItem” </title> </useCase> <useCase id = “vcuc”> <title,visib = pub> “validateCart” </title> </useCase> <actor id = “ca”> <name, visib = pub> “Client” </name> </actor> <system id = “ess”> <name, visib = pub> “e-Store” </name> </actor> <actor2useCase id = “ca2oiuc”> <in idref = “ca”/> <out idref = “oiuc”/> </actor2useCase> <actor2useCase id = “ca2vcuc”> <in idref = “ca”/> <out idref = “vcuc”/> </actor2useCase></umlModel>

Client

Page 24: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Other Stakeholders’ Tasks Other Stakeholders’ Tasks in MDA Initiativein MDA Initiative

Platform providers: Define platform model as UML Profile or PSM meta-model in MOF

Multiple domains or wide domain application providers: Use only standards defined by OMG and platform providers

Narrow domain application providers: Define special-purpose modeling languages in MOF

MDA CASE tool providers: Implement model base development and management services

such as edition, syntactic validation, import, export, persistence, query, access control, versioning and traceability for: Models in UML, OCL and MOF-specified user-defined languages MOF meta-models QVT and MOF-specified model transformation languages

Define APIs to program new model processing services on top of theses basic services

Implement model transformation engines based on MOF and QVT Implement code and test generation services from PSM

Page 25: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

MDA Third-Party Standards and ToolsMDA Third-Party Standards and Tools

Java Modeling Interface (JMI): Standard from Java Community Process (JCP) Defines a set of Java interfaces to process models represented as

Java objects: Reflective interfaces define general model manipulation operations that

are independent of the model’s meta-model Taylored interfaces define model manipulation operations that are

specific to models that follow a given meta-model Taylored interfaces can be automatically generated from a MOF meta-

model Eclipse Modeling Framework (EMF):

Standard from the Open Source Java-Based IDE project Eclipse (www.eclipse.org)

Plug-in for Eclipse IDE framework Implements similar reflective and taylored interfaces than JMI Implements generation of taylored interface from MOF meta-model Implements generation of Eclipse-integrated model editor from

MOF meta-model

Page 26: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Model representation as XML Model representation as XML document and Java Objectsdocument and Java Objects

Model

Meta-model

MOFMeta-model

(meta-meta-model)

File SystemMain Memory

XMLDocument

XMLSchema

XMISchema

textually represents

textually represents

textually represents

Java Objects

Java Taylored Interfaces

Java Reflective Interfaces

programmatically represents

programmatically represents

programmatically represents

import / export

generates

create / process

process

Page 27: Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.

Java Model Representation Java Model Representation vs.vs. Implementation Implementation

Java objects generated using the taylored and reflective interfaces of JMI or EMF merely represent model elements

They only provide a handle to process these elements using Java They are completely different from Java objects that implement

these model elements Though among many other uses, theses model representation

Java objects can be used as input to program in Java the generation of model implementing Java objects

But they could also be used to generate a C++ or Prolog implementation of the application or any other MDA service

Java model representation objects are useful for MDA CASE tools during the development process of an application, whereas Java model implementation objects are useful for this application

In one case, Java is used to implement CASE tools functionalities, in the second case, Java is used to implement application functionalities