• No results found

Model Inconsistency Management

N/A
N/A
Protected

Academic year: 2021

Share "Model Inconsistency Management"

Copied!
28
0
0

Loading.... (view fulltext now)

Full text

(1)

Tom

Mens (

[email protected]

)

Institut d’Informatique

Université de Mons-Hainaut

Belgium

Model Inconsistency Management

by means of

(2)

Acknowledgements

This talk reports on joint work with

Maja

D’Hondt

LIFL, Université des Sciences et des Technologies de Lille

Ragnhild

Van Der Straeten

(3)

Challenge: Model-driven evolution

Observation

Model-driven software engineering approaches do not

adequately address software evolution problems

(4)

Model inconsistency management

Goal

Specify model inconsistencies and their resolution

strategies as

graph transformation rules

Use this formalisation to

support the inconsistency

management process

Automate the

detection

of inconsistencies

Interactively support the

resolution

of inconsistencies

Analyse transformation dependencies to

optimise

this process

Detect

sequential dependencies

between resolution rules

Detect

parallel conflicts

between resolution rules that cannot

be applied together

Remove redundancy between resolution rules

Provide “optimal” resolution strategies

(5)

Model inconsistency management

Inconsistency management process

UML model detect inconsistencies in UML model inconsistency detection rules ? select inconsistencies to be resolved choose inconsistency resolution strategy inconsistency resolution rules ? apply inconsistency resolutions

annotate model with inconsistencies found

(6)

Experiment

Use

AGG

(version 1.4), a general-purpose

graph

transformation language

specify the

metamodel

as a

type graph

specify the

models

as

graphs

detect

model inconsistencies by means of

graph

transformation rules

resolve

model inconsistencies by means of

graph

transformation rules

detect parallel conflicts and sequential dependencies

between inconsistency resolutions by means of

critical

(7)

Step 1: Specify the metamodel

(8)

Example of a model inconsistency

Dangling operation reference

Using UML notation

Using graph notation

Class name=“ATM” isAbstract=false Operation name=“ejectCard” visibility=“public” nuOfPars=0 isAbstract=false InstanceSpecification instanceOf ConnectableElement LifeLine MessageOccurrenceSpecification MessageEvent contains Operation name=“retainCard” visibility=“public” nuOfPars=0 isAbstract=false Interaction represents represents calls contains contains

(9)

Step 2: Identify model inconsistencies

A transition does not have a referred operation attached to it. Transition Without

Operation

A state machine contains a transition that refers to an operation that does not belong to any class (or that belongs to a different class than the one whose behaviour is expressed by the state machine).

Dangling Operation Reference

A class contains at least one instance of its subclasses through a composition relationship that may lead to an infinite containment of instances of the affected classes.

Cyclic Composition

A state machine expresses the behaviour of an abstract class that does not have any concrete subclasses.

Abstract State Machine

An abstract operation is defined in a concrete class. Abstract

Operation

A model contains an instance specification that is an instance of an abstract class that does not have any concrete subclasses.

Abstract Object

A model contains an instance specification that is not linked to a class Classless Instance

An operation has one or more parameters whose types are not specified Dangling Type

(10)

Example of a model inconsistency

Dangling operation reference

Using UML notation

Using graph notation

Class name=“ATM” isAbstract=false Operation name=“ejectCard” visibility=“public” nuOfPars=0 isAbstract=false InstanceSpecification instanceOf ConnectableElement LifeLine MessageOccurrenceSpecification MessageEvent contains Operation name=“retainCard” visibility=“public” nuOfPars=0 isAbstract=false Interaction represents represents calls contains contains Conflict

(11)
(12)
(13)

Step 4: Identify inconsistency

resolutions

Res3 Res2 Res1 Res3 Res2 Res1 Res3 Res2 Res1

Change the abstract class into a concrete one. Abstract

Object

Add a concrete descendant of the abstract class, and redirect the outgoing instance-of relation of the instance specification to this concrete descendant.

Remove the instance specification.

Link the instance specification to a new class.

Link the instance specification to an existing class. Remove the instance specification.

Classless Instance

Assign a new class as the type of the previously undefined parameter. Assign an existing class as the type of the previously undefined

parameter.

Remove the parameter whose type is undefined. Dangling Type

(14)
(15)

Step 6: Detect parallel conflicts between

resolution rules

Some resolution rules cannot be jointly applied

(parallel conflict!)

Conflict graph can be generated in AGG by means of

(16)

Step 6: Detect parallel conflicts

Example of a

critical pair

representing a

conflict situation

(17)

Step 7: Detect sequential dependencies

Some resolution rules may give rise to new

opportunities for applying other resolution rules

(18)

Step 7: Detect sequential dependencies

Example of a

critical pair

representing a

sequential dependency

(19)

Step 7: Detect sequential dependencies

Some resolution rules may give rise to new

model inconsistencies

(20)

Step 8: Refactor resolution rules

Observation

Different resolution rules for the same model

inconsistency may be redundant

Different resolution rules for a different model

inconsistency may be redundant (even identical)

(21)

Res3 Res2 Res1 Res3 Res2 Res1 Res3 Res2 Res1

Change the abstract class into a concrete one. Abstract

Object

Add a concrete descendant of the abstract class, and redirect the outgoing instance-of relation of the instance specification to this concrete descendant.

Remove the instance specification.

Link the instance specification to a new class.

Link the instance specification to an existing class.

Remove the instance specification.

Classless Instance

Assign a new class as the type of the previously undefined parameter. Assign an existing class as the type of the previously undefined

parameter.

Remove the parameter whose type is undefined. Dangling Type

Reference

Step 8: Refactor resolution rules

(22)

Res3 Res2 Res1 Res3 Res2 Res1 Res3 Res2 Res1

Change the abstract class into a concrete one. Abstract

Object

Add a concrete descendant of the abstract class, and redirect the outgoing instance-of relation of the instance specification to this concrete descendant.

Remove the instance specification.

Link the instance specification to a new class.

Link the instance specification to an existing class.

Remove the instance specification. Classless

Instance

Assign a new class as the type of the previously undefined parameter. Assign an existing class as the type of the previously undefined

parameter.

Remove the parameter whose type is undefined. Dangling Type

Reference

Step 8: Refactor resolution rules

redundancy

(23)

Step 8: Refactor resolution rules

Goal (Future Work!)

Detect redundancy automatically

Based on the computed conflicts and dependencies between

resolution rules

Remove redundancy automatically

“Refactor” the resolution rules

Transform (i.e., refactor) the transformation rules

- Transformations need to be first class models

- Reflective transformation engine is needed

(24)

Tool Support

Integrate ideas into a modeling tool

Ongoing student project

export UML models from MagicDraw into AGG, detect and

resolve inconsistencies in AGG, and import back into

MagicDraw

Ongoing student project

Add interface on top of AGG to provide interactive support

for selecting and resolving inconsistencies based on detected

conflicts and dependencies

Future work

Integrate current work into existing RACOON tool

for model inconsistency management (based on

(25)

Discussion topics

Optimality

Expressiveness

Completeness

Compositionality

Termination

(26)

Discussion topics

Optimality

Find an “optimal way” to resolve model inconsistencies

How can we define “optimality”?

Use heuristics and resolution strategies, locally as

well as globally

Avoid resolution rules that introduce too many new

inconsistencies

Prefer resolution rules that add new model elements over

rules that remove model elements

Take into account, and “learn”, resolution rules preferred by

the user

(27)

Discussion topics

Expressiveness

Can all model inconsistencies be expressed?

Which types of model inconsistency can be expressed?

Structural? Behavioural?

Can all resolution rules be expressed?

Completeness

Are all possible ways to resolve a particular

inconsistency covered by the resolution rules?

(28)

Discussion topics

Compositionality

How to define resolution strategies as a composition

of primitive resolution rules?

Using sequencing, branching, looping constructs

Taking into account the computed dependency analysis

Termination

Given a set of resolution rules, can we prove that it

will resolve all detected inconsistencies and terminate

in a finite amount of time?

References

Related documents

(iii) General endorsement which requires a student to demonstrate proficient performance in a majority of the areas of the common core of knowledge and skills, which include

We amend the real EF data by generating a certain number of papers by author X and linking each of them with 35 randomly chosen users (35 is the average paper degree in the

Ada pengaruh pemberian pupuk bokashi batang pisang terhadap pertumbuhan dan produksi tanaman bayam hijau pada parameter tinggi tanaman dan jumlah daun 14 HST dan 21 HST serta

This exploratory research examined the degree of adoption and impact of the concepts of Building Information Model (BIM), Integrated Project Delivery (IPD), Integrated Design

As the structure of the fungal cell wall and the PAMPs exposed at the cell surface are genus-, species- and morphotype- dependent ( Brodaczewska et al., 2015 ), detailed studies

This chapter presents results and discussion of four sampling times that spanned almost a year for analysis of water quality parameters and heavy metals in

Identification with Continental logo RAL 1028 melon yellow, respectively on the long sides, left. pallet skid, according to TST N 00155.50-000, permanently

As early as the fourth century BCE, Greek teachers of rhetoric gave suggestions about how a person's character (Greek ethos) could be p u t to per- suasive uses, and