Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Detecting Conflicts on the Level of Changes

qsoetens
March 17, 2012

Detecting Conflicts on the Level of Changes

Change is inevitable in software development. When several developers are working together on the same project it is possible for conflicts to occur. We propose to make changes explicit and use them to detect conflicts on a change level. We can do this by keeping changes as first class entities. Conflicts can then be detected by merging two sets of change objects and for each change checking if its preconditions are not violated by the changes in the other set.

qsoetens

March 17, 2012
Tweet

More Decks by qsoetens

Other Decks in Research

Transcript

  1. Ansymo Antwerp Systems and Software Modelling 16 December 2010 Quinten

    David Soetens Peter Ebraert Serge Demeyer Conflict Detection on the Level of Changes
  2. Version Control System r64 r65 r67 r69 r70 r66 Branch

    Merge Conflict r68 Version Control System r31 r32 r33 Alice Bob Change Update Commit Update Commit Conflict Merge Resolve Change Commit Problem 3
  3. Our Approach • Centralize Changes! (Change Oriented Programming) • Exploit

    dependencies between changes to discover inconsistencies in two sets of changes 4
  4. What is ChOP? • Change-Oriented Programming • Changes as First

    Class Entities • Change = Main development entity • Software System = Set of Changes • Software Evolution = Set of Changes 5
  5. ChOP 6 Change-Oriented Software Engineering Peter Ebraert, Jorge Antonio Vallejos

    Vargas, Pascal Costanza, Ellen Van Paesschen, Theo D'Hondt In "Proceedings of the 2007 International Conference on Dynamic Languages", published by ACM, 2007
  6. ChOP - Logging 7 class Buffer { } int buf

    = 0; int get() { } return( buf ); void set( int x ) { } buf = x; B2 B1 B3 B4 B5 B6 Buffer B1 B2 B3 B4 B5 B6
  7. Change Preconditions 8 • For each Change, there are Preconditions,

    that need to be true to apply the Change. • Preconditions are based on invariants of FAMIX model and/or language invariants. • Example: Preconditions for r :RemoveMethodChange(m) • ∃ a : AddMethodChange(m), • ∄ r’ :RemoveMethodChange(m), • ∀ c : Add...Change(s), c → a 㱻 ∃ Remove...Change(s)
  8. ChOP Applied to Conflicts 9 B3 B1 B2 B5 B4

    B6 Buffer R1 Restore B1 B2 B5 R3 R4 B5 R5 R6 R2 class Buffer { int buf = 0; int get(){ return (buf); } void set (int x){ buf = x; } } int back = 0; void restore() { set(back); } B1 B2 B3 B4 B6 B5 R1 R2 R3 R4 R5 R6 back = buf; CleanUp B3 B1 B2 B5 B4 B6 Buffer C1 C2 class Buffer { int buf = 0; int get() { return( buf ); } } B1 B2 B3 C1 B4 C2 B3 B1 B2 B5 B4 B6 Buffer R1 Restore R3 R4 R5 R6 R2 C1 C2 CleanUp
  9. Conclusions • ChOP = applicable in many areas of Software

    Development • Can be used to detect conflicts on the level of individual changes • Fine Grained (within statement level) 10