26
Business Informatics Group Institute of Software Technology and Interactive Systems Vienna University of Technology Favoritenstraße 9-11/188-3, 1040 Vienna, Austria phone: +43 (1) 58801-18804 (secretary), fax: +43 (1) 58801-18896 [email protected], www.big.tuwien.ac.at Concurrent Modeling in the Early Phases of the Software Development Life Cycle Petra Brosch, Philip Langer, Martina Seidl, Konrad Wieland, and Manuel Wimmer CRIWG 2010, Sept. 20-23, 2010, Maastricht, The Netherlands Konrad Wieland www.modelversioning.org

Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Business Informatics GroupInstitute of Software Technology and Interactive Systems Vienna University of TechnologyFavoritenstraße 9-11/188-3, 1040 Vienna, Austriaphone: +43 (1) 58801-18804 (secretary), fax: +43 (1) [email protected], www.big.tuwien.ac.at

Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Petra Brosch, Philip Langer, Martina Seidl, Konrad Wieland, and Manuel Wimmer

CRIWG 2010, Sept. 20-23, 2010, Maastricht, The Netherlands

Konrad Wielandwww.modelversioning.org

Page 2: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Reality vs. Truth

2

Modeler D Modeler C

Modeler B

Modeler AModeler E

Page 3: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

The Elephant and the Blind WoMen

3Copyright: John Godfrey Saxe „The Elephant and the Blind Men“Picture: G.R. Guzlas

Page 4: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Common Knowledge Base

4

?

Modeler D Modeler C

Modeler B

Modeler AModeler E

Page 5: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Tool SupportOptimistic Model Versioning Systems

5

Model Repository

Sally

Harry Version 0

Version 0

t1

Version 1

Version 2

t2 t3

Check Out

Check Out

Check In

Check In

Fron

t End

Fron

t End

Back

End

t0

Merge

Com

parison

Conflict

Detection

Conflict

Resolution

Page 6: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Issues of Serial Versioning

6

Modeler A Modeler B Modeler C Modeler D

C C C C

C … Changes

It‘s a Fan! It‘s a Spear!

It‘s a Rope!

It‘s a Tree!

Page 7: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Tool Support Needed…

7

Modeler D Modeler C

Modeler B

Modeler A

Modeler E

to assist a collaborative process of modeling to allow integrating different points of view to promote multilateral perspectives for conflict resolution

Page 8: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Issues of Standard Merge Scenario

8

PassportPerson

passNonamebday

V1

Alice

PassportPerson

passNohashcitizen

namebirthday

V1a

Harry

PassportPerson

namedoB

V1c

*passNoexpiry

Joey

Person

namebirthdaypassNohashcitizen

V2

SallyPerson

namebdaypassNo

V1b

Sally

Model stored in the Repository

Passport as part of one

Person

One class for efficient querying

Severalpersons in

one passport

Delete/Update Conflict!

Page 9: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Issues of Standard Merge Scenario

9

PassportPerson

passNonamebday

V1

Alice

PassportPerson

passNohashcitizen

namebirthday

V1a

Harry

PassportPerson

namedoB

V1c

*expirypassNo

Joey

Person

namebirthdaypassNohashcitizen

V2

SallyPerson

namebdaypassNo

V1b

Sally

PassportPerson

namedoBhashcitizen

V3

*expiry

Joey

passNo

Delete/Update Conflict!

Update/Update Conflict!

Page 10: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Issues of Standard Merge Scenario

Only one modeler is responsible for conflict resolution Nearly impossible to divine the reasons behind the changes Own point of view would always be prioritized

Final version does not reflect all intentions of the modelers Conflicts are considered to be negative

Conflict Avoidance Synchronous modeling or locking

Conflict Resolution Often error-prone and time-consuming task

Conflicts are not subject of discussion

10

Page 11: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Conflict-tolerant Merge

To avoid conflict resolution during check-in To distribute the responsibility when merging To avoid loss of information To create a basis for discussion and consolidation (early project

phases!)

Merge incorporates ALL changes

Changes are represented in an unified view

Potential conflicts have to be marked, tracked, and managed later on in a collaborative setting

11 Conflict-tolerant Merge

Page 12: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Conflict-tolerant Merge

12

PassportPerson

passNonamebday

V1

Alice

PassportPerson

passNohashcitizen

namebirthday

V1a

Harry

PassportPerson

namedoB

V1c

*passNoexpiry

Joe

Person

namebdaypassNo

V1b

Sally

PassportPerson

hashcitizen

namebirthdaypassNo

V2

PassportPerson

namedoB

V3*

passNoexpiryhashcitizen

12

12

3

45

Delete/Update

Delete/Update

Violation

Update/UpdateUpdate/Update

Model stored in theRepository

Page 13: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Metadata Annotations

13

<<Delete/Update Conflict>>

--User related MetadataUser_del = SallyUser_upd = HarryUser_upd = JoeOwner = Alice

--Involved Model ElementsDel_Elements = {Passport}Upd_Elements = {expiry, hash, citizen}

--Time related MetadataRevision_del = 3Revision_upd = 2Revision_upd = 4

1

<<Update/Update Conflict>>

--User related MetadataUser_upd = HarryUser_upd = JoeOwner = Alice

--Involved Model ElementsUpd_Element = {doB}Upd_Feature = Attribute.nameUpd_Values = {Joe:doB,

Harry:birthday}

--Time related MetadataRevision_upd = 2Revision_upd = 4 5

<<Update/Update Conflict>>

--analogous to 2……

4

<<Delete/Update Conflict>>

--analogous to 1……

2

PassportPersonnamedoB

*passNoexpiryhashcitizen

1

2

3

45

3

<<Violation>>

--User related MetadataUser_upd = HarryUser_upd = JoeOwner = Alice

--Involved Model ElementsUpd_Elements = {Composition1}Upd_Elements = {Multiplicity *}

--Time related MetadataRevision_upd = 2Revision_upd = 4

Page 14: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Consolidation

14

PassportPersonnamedoB

*passNoexpiryhashcitizen

1

2

4

3

Delete/UpdateDelete/Update

Violation

Update/Update

Update/Update

birthday5

PassportPerson

namedoBhashcitizen

*passNoexpiry

Result of Standard Versioning Process

Joe

Sally

Joe

Harry

Alice

Page 15: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Realization

Conflict-tolerant merge algorithm Extension of standard versioning systems

Provision of conflict model Allows to store conflicts explicitly

UML Profile for conflict visualization Allows for reusing standard UML modeling editors

15

Page 16: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Conflict-tolerant Merge Algorithm 1/2

16

OriginModel V0 HeadModel

RevisedModel

apply Changesand annotations

MergedModel

V0+ +

Central Repositoryapply Changes

MergedModel(delta1+delta2(originModel))

without conflict resolution

Modeler B

Modeler A

copy

1

2

1 2

Page 17: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Conflict-tolerant Merge Algorithm 2/2Input: originModel, revisedModel, headModelOutput: mergedModel

mergedModel = headModel.clone()

ChangeSet c = calculateChanges(originModel, revisedModel)for c ∈ changeSet do

element = mergedModel.getElementById(c.getElement().getId())if c instanceof Insert then

container = mergedModel.getElementById(c.getElement().getContainer().getId())if container.isDeleted() then

container.annotate(new DeleteUpdate(c))endmergedModel.apply(c)

else if c instanceof Delete thenif mergedModel.getElementById(c.getElement().getId()).isUpdated()then

element.annotate(new DeleteUpdate(c))endelement.markAsDeleted()element.addMetaInfo(createMetaInfo(c))

else if c instanceof Update thenif element.isDeleted() then

element.annotate(new DeleteUpdate(c))endfeature = c.getUpdatedFeature()if element.isUpdated(feature) then

element.annotate(new UpdateUpdate(c), feature)element.addMetaInfo(createMetaInfo(c))

endmergedModel.apply(c)

endend...

17

Create a copy of the headModel as basis for the new

mergedModel

Add all inserted elementsincluding annotations if Delete/Update Conflict

Calculate change set between origin and revised

model

Do NOT apply deletions, just annotate element

Also store the updated feature.

Apply all updatesValidate merged model

Page 18: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Model-based for Conflict Representation

18

leftChange

rightChange

Update/UpdateConflict

PostMergeViolation

Constraint

1

*

violated

ConflictReportChangeReport

Change

Conflict

Change ReportConflict Report

AdditionalSpecification

dependsOn

*

1

1

*

*

Delete/UpdateConflict

ContradictingChange

*

Page 19: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

UML Profile for Conflict Visualization

Representation and visualization of conflicts with UML Profile Light-weight extension of UML Stereotypes are used to extend standard UML metaclasses Apply stereotypes to instances of the extended metaclasses Tagged values provide additional information Syntactic sugar (e.g., icons) for defined stereotypes may be configured to

improve visualization

Profile is used as follows Stereotypes mark added, deleted, updated model elements Stereotypes mark update/delete and update/update conflicts as well as

violations Tagged values contain additional information like conflict metadata Involved user Revision number etc.

19

Page 20: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Turning Conflicts into CollaborationTool Support in Eclipse

20

Page 21: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Benefits of Realization

UML-conform models Profiled models are still compliant to UML Are handled by most UML tools

No editor modifications Modification of graphical editors of UML tools are not necessary

User-friendly visualization Merge conflicts in concrete syntax

Integrated view One single diagram to provide a complete overview of conflicts

Model-based representation Conflict information is not lost when importing/exporting the model Resolve conflicts at a later time Different diagram filters based on stereotypes

21

Page 22: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Conclusions

Conflicts are not considered as negative results of collaboration All opinions and intentions are covered Important in early phases of the software lifecycle

When a general agreement has not been established At this time, design flaws are cheap to correct

Novel kind of thinking for the modelers Models containing different points of view explicitly

Conflicts may serve as a basis for finding differences in stakeholder goals for detecting critical parts of models for improving the software development process

22

Page 23: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Ongoing Work

UI is of huge importance Models might grow big with many conflicting modifications Filters and strategies to guide the modelers

Language-independent annotations Model extensions for each Ecore-based model

Empirical Study with our students

23

Page 24: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Thank you for your attention!Questions?

• http://www.modelversioning.org

The End

Page 25: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Backup

25

Page 26: Concurrent Modeling in the Early Phases of the Software Development Life Cycle

Conflict Profile in EA

26