formal techniques in software engineering 3de bac informatica

14
Universiteit Antwerpen Introduction 1.1 Formal Techniques in Software Engineering Formal Techniques in Software Engineering 3de BAC Informatica Chapter 1 Introduction

Upload: ryder-hardin

Post on 31-Dec-2015

17 views

Category:

Documents


0 download

DESCRIPTION

Formal Techniques in Software Engineering 3de BAC Informatica. Chapter 1 Introduction. Contents. Manual Coding vs. Code Generation MDA vs. MDE Terminology Transformations Tool architecture Properties Meta Modeling 4-layer metamodeling architecture. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Formal Techniques in Software Engineering 3de BAC Informatica

Universiteit Antwerpen

Introduction

1.1Formal Techniques in Software Engineering

Formal Techniques in Software Engineering

3de BAC Informatica

Chapter 1Introduction

Page 2: Formal Techniques in Software Engineering 3de BAC Informatica

Universiteit Antwerpen

Introduction

1.2Formal Techniques in Software Engineering

Contents• Manual Coding vs. Code Generation

• MDA vs. MDE• Terminology• Transformations

– Tool architecture– Properties

• Meta Modeling– 4-layer metamodeling architecture

Based on "MDA Explained — The Model Driven Architecture: Practice and Promise" (Anneke Kleppe, Jos Warmer and Wim Bast)

Page 3: Formal Techniques in Software Engineering 3de BAC Informatica

Universiteit Antwerpen

Introduction

1.3Formal Techniques in Software Engineering

Manual Codingrequirements

analysis

design

coding

testing

deployment

• Platform– Multiple targets– Rapidly evolving

• Portability ?• Interoperability

?

• Manual steps– shortcuts

• Traceability ?

Page 4: Formal Techniques in Software Engineering 3de BAC Informatica

Universiteit Antwerpen

Introduction

1.4Formal Techniques in Software Engineering

Code Generationrequirements

analysis

design

coding

testing

deployment

• Automatic– parameters– currently

semi-automatic In theory …• Traceability• Portability• Interoperabi

lity

Page 5: Formal Techniques in Software Engineering 3de BAC Informatica

Universiteit Antwerpen

Introduction

1.5Formal Techniques in Software Engineering

Target Software Systems• Enterprise Information System

– reusable components• customer database, order-processing, bookkeeping, …

• parametrisation !– large scale

• interoperability

• Web-based systems– rapidly evolving targets

• portability

• …

Page 6: Formal Techniques in Software Engineering 3de BAC Informatica

Universiteit Antwerpen

Introduction

1.6Formal Techniques in Software Engineering

MDA vs. MDEMDA

• = Model Driven Architecture

• Industrial Standard– Object Management Group– OMG = tool vendor

organization !

• UML at the core– standardization– PIM

• Platform independent model

– PSM• Platform specific model

MDE• = Model Driven Engineering• Community of model-centric

development• Model can be any formalism

– classes, entity-relationship

– petri-nets, state machines– ...

• Also verification

• Transformation can be anything– Rewrite rules

• Graph rewriting

Page 7: Formal Techniques in Software Engineering 3de BAC Informatica

Universiteit Antwerpen

Introduction

1.7Formal Techniques in Software Engineering

Model• "Model" is overloaded

– example for artist– person posing for artist

– person showing clothes (catwalk)

– replica of item on smaller scale (miniature)

– drawing of an item(design of a house, ...)

– mathematical formulas for prediction/estimation

– …

• All models share properties– an abstraction of a subject that exists in reality

– model ≠ the subject it models• leave out details, scale, ...

– model can be used to produce something in reality• especially in engineering disciplines

Page 8: Formal Techniques in Software Engineering 3de BAC Informatica

Universiteit Antwerpen

Introduction

1.8Formal Techniques in Software Engineering

Software Model• In software engineering

– model = abstraction of (software) system– description of system in language with well-defined syntax and well-defined semantics• Well-defined ? Suitable for automated interpretation

model

system

lang-

uage

is written

in describes

Page 9: Formal Techniques in Software Engineering 3de BAC Informatica

Universiteit Antwerpen

Introduction

1.9Formal Techniques in Software Engineering

Transformation• Transformation

= automatic generation of target model from a source model, accoding to a transformation definition

• Transformation Definition= a set of transformation rules that describe how to translate a model in a source language into a model in the target language• Requires control over which rules to apply

• Transformation Rule= a description of how to map one or more constructs in the source language into one or more constructs in the target language

PIM PSM Code

Page 10: Formal Techniques in Software Engineering 3de BAC Informatica

Universiteit Antwerpen

Introduction

1.10Formal Techniques in Software Engineering

Tool Architecture

repository

modelstransformationdefinitions

modeleditor

modelvalidator

codeparser

codegenerator

codeeditor

transformationdefinitioneditor

modeltransformer

code files

Page 11: Formal Techniques in Software Engineering 3de BAC Informatica

Universiteit Antwerpen

Introduction

1.11Formal Techniques in Software Engineering

Transformations — Properties• Control

– conditions, looping– parameters– prompting the user

• Traceability– generate links

• source to target• target to source

– ripple changes over traceability links

• Incremental Consistency– small change=> small regeneration

• Bidirectionality– forward and reverse generation• code reverse engineering

Page 12: Formal Techniques in Software Engineering 3de BAC Informatica

Universiteit Antwerpen

Introduction

1.12Formal Techniques in Software Engineering

Meta Modeling

model

system

lang-

uage

is written

indescribes

• model written in language with well-defined syntax and semantics– suitable for automated interpretation ?

=> model transformation !

is defined

by

metamodel

metalang-

uageis

written in

Page 13: Formal Techniques in Software Engineering 3de BAC Informatica

Universiteit Antwerpen

Introduction

1.13Formal Techniques in Software Engineering

The 4-layer metamodel architecture

Layer Description Example

m3: meta-metamodel

The infrastructure for a metamodeling architecture. Defines the language for specifying metamodels

MetaClass, MetaAttribute, MetaOperation

M2: meta model

An instance of a meta-metamodel.Defines the language for specifying a model.

UMLClass, UMLAttribute, UMLOperation

M1: model An instance of a metamodel.Defines a language to describe an information domain.

Customer, Order

M0: user objects

An instance of a model.Defines a specific information domain

<Customer> "Joe Nobody",<Order> "200604"

Page 14: Formal Techniques in Software Engineering 3de BAC Informatica

Universiteit Antwerpen

Introduction

1.14Formal Techniques in Software Engineering

The MDA Framework

PIM PSM

lang-

uage

is written

inmodel

transformer

lang-

uage

is written

in

transformation

definition

is defined by

meta language

is written

in

transformation definition language

is written

in

is written

in

extends