skip to main content
research-article
Open Access
Artifacts Evaluated & Functional

Conflict resolution for structured merge via version space algebra

Published:24 October 2018Publication History
Skip Abstract Section

Abstract

Resolving conflicts is the main challenge for software merging. The existing merge tools usually rely on the developer to manually resolve conflicts. This is of course inefficient. We propose an interactive approach for resolving merge conflicts. To the best of our knowledge, this is the first attempt for conflict resolution of structured merge. To represent the possibly very large set of candidate programs, we propose an expressive and efficient representation by version space algebra. We also design a simple mechanism for ranking resolutions in the program space, such that the top-ranked resolution is very likely to meet the developer's expectation. We prototype our approach as a merge tool AutoMerge, and evaluate it on 244 real-world conflicts arising from 10 open-source projects. Results show great practicality of our approach.

References

  1. Sven Apel, Jörg Liebig, Benjamin Brandl, Christian Lengauer, and Christian Kästner. 2011. Semistructured Merge: Rethinking Merge in Revision Control Systems. In Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering (ESEC/FSE ’11). ACM, New York, NY, USA, 190–200. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Taweesup Apiwattanapong, Alessandro Orso, and Mary Jean Harrold. 2007. JDiff: A differencing technique and tool for objectoriented programs. Automated Software Engineering 14, 1 (01 Mar 2007), 3–36. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Shaon Barman, Sarah Chasins, Rastislav Bodik, and Sumit Gulwani. 2016. Ringer: web automation by demonstration. In Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM, 748–764. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. James Bornholt, Emina Torlak, Dan Grossman, and Luis Ceze. 2016. Optimizing Synthesis with Metasketches. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’16). ACM, 775–788. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Jim Buffenbarger. 1995. Syntactic software merging. In Software Configuration Management, Jacky Estublier (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 153–172. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Guilherme Cavalcanti, Paulo Borba, and Paola Accioly. 2017. Evaluating and Improving Semistructured Merge. Proc. ACM Program. Lang. 1, OOPSLA, Article 59 (Oct. 2017), 27 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Danny Dig, Kashif Manzoor, Ralph E. Johnson, and Tien N. Nguyen. 2008. Effective Software Merging in the Presence of Object-Oriented Refactorings. IEEE Trans. Softw. Eng. 34, 3 (May 2008), 321–335. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Georg Dotzler and Michael Philippsen. 2016. Move-optimized Source Code Tree Differencing. In Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering (ASE 2016). ACM, New York, NY, USA, 660–671. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. John K. Feser, Swarat Chaudhuri, and Isil Dillig. 2015. Synthesizing Data Structure Transformations from Input-output Examples. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’15). ACM, New York, NY, USA, 229–239. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Sumit Gulwani. 2011. Automating String Processing in Spreadsheets Using Input-output Examples. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’11). ACM, 317–330. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Sumit Gulwani, Javier Esparza, Orna Grumberg, and Salomon Sickert. 2016. Programming by Examples (and its applications in Data Wrangling). Verification and Synthesis of Correct and Secure Systems (2016).Google ScholarGoogle Scholar
  12. Björn Hartmann, Daniel MacDougall, Joel Brandt, and Scott R. Klemmer. 2010. What Would Other Programmers Do: Suggesting Solutions to Error Messages. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (CHI ’10). ACM, New York, NY, USA, 1019–1028. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D. Jackson and D. A. Ladd. 1994. Semantic Diff: a tool for summarizing the effects of modifications. In Proceedings 1994 International Conference on Software Maintenance. 243–252. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Dileep Kini and Sumit Gulwani. 2015. FlashNormalize: Programming by examples for text normalization. In Proceedings of the 24th International Conference on Artificial Intelligence. AAAI Press, 776–783. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Maximilian Koegel, Jonas Helming, and Stephan Seyboth. 2009. Operation-based Conflict Detection and Resolution. In Proceedings of the 2009 ICSE Workshop on Comparison and Versioning of Software Models (CVSM ’09). IEEE Computer Society, Washington, DC, USA, 43–48. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Tessa A. Lau, Pedro Domingos, and Daniel S. Weld. 2000. Version Space Algebra and Its Application to Programming by Demonstration. In Proceedings of the Seventeenth International Conference on Machine Learning (ICML ’00). Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 527–534. http://dl.acm.org/citation.cfm?id=645529.657973 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Vu Le and Sumit Gulwani. 2014. FlashExtract: A Framework for Data Extraction by Examples. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’14). ACM, 542–553. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. O. Leßenich, S. Apel, C. Kästner, G. Seibt, and J. Siegmund. 2017. Renaming and shifted code in structured merging: Looking ahead for precision and performance. In 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE). 543–553. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Olaf Leßenich, Sven Apel, and Christian Lengauer. 2015. Balancing precision and performance in structured merge. Automated Software Engineering 22, 3 (01 Sep 2015), 367–397. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Ernst Lippe and Norbert van Oosterom. 1992. Operation-based Merging. In Proceedings of the Fifth ACM SIGSOFT Symposium on Software Development Environments (SDE 5). ACM, New York, NY, USA, 78–87. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Fan Long and Martin Rinard. 2015. Staged program repair with condition synthesis. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering. ACM, 166–178. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Guido Malpohl, James J. Hunt, and Walter F. Tichy. 2003. Renaming Detection. Automated Software Engineering 10, 2 (01 Apr 2003), 183–202. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. T. Mens. 2002. A state-of-the-art survey on software merging. IEEE Transactions on Software Engineering 28, 5 (May 2002), 449–462. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Tom M. Mitchell. 1982. Generalization as search. Artificial Intelligence 18, 2 (1982), 203 – 226.Google ScholarGoogle ScholarCross RefCross Ref
  25. Hoan Anh Nguyen, Tung Thanh Nguyen, Gary Wilson, Jr., Anh Tuan Nguyen, Miryung Kim, and Tien N. Nguyen. 2010. A Graph-based Approach to API Usage Adaptation. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA ’10). ACM, New York, NY, USA, 302–321. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. N. Niu, F. Yang, J. R. C. Cheng, and S. Reddivari. 2013. Conflict resolution support for parallel software development. IET Software 7, 1 (February 2013), 1–11.Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Oleksandr Polozov and Sumit Gulwani. 2015. FlashMeta: A framework for inductive program synthesis. ACM SIGPLAN Notices 50, 10 (2015), 107–126. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Kyle Prete, Napol Rachatasumrit, Nikita Sudan, and Miryung Kim. 2010. Template-based Reconstruction of Complex Refactorings. In Proceedings of the 2010 IEEE International Conference on Software Maintenance (ICSM ’10). IEEE Computer Society, Washington, DC, USA, 1–10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Reudismam Rolim, Gustavo Soares, Loris D’Antoni, Oleksandr Polozov, Sumit Gulwani, Rohit Gheyi, Ryo Suzuki, and Björn Hartmann. 2017. Learning Syntactic Program Transformations from Examples. In Proceedings of the 39th International Conference on Software Engineering (ICSE ’17). IEEE Press, Piscataway, NJ, USA, 404–415. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Rishabh Singh and Sumit Gulwani. 2012. Learning Semantic String Transformations from Examples. Proc. VLDB Endow. 5, 8 (April 2012), 740–751. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Rishabh Singh, Sumit Gulwani, and Armando Solar-Lezama. 2013. Automated Feedback Generation for Introductory Programming Assignments. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’13). ACM, 15–26. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. P. Weissgerber and S. Diehl. 2006. Identifying Refactorings from Source-Code Changes. In 21st IEEE/ACM International Conference on Automated Software Engineering (ASE’06). 231–240. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Bernhard Westfechtel. 1991. Structure-oriented Merging of Revisions of Software Documents. In Proceedings of the 3rd International Workshop on Software Configuration Management (SCM ’91). ACM, New York, NY, USA, 68–79. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Navid Yaghmazadeh, Christian Klinger, Isil Dillig, and Swarat Chaudhuri. 2016. Synthesizing Transformations on Hierarchically Structured Data. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’16). ACM, 508–521. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Kaizhong Zhang and Tao Jiang. 1994. Some MAX SNP-hard Results Concerning Unordered Labeled Trees. Inf. Process. Lett. 49, 5 (March 1994), 249–254. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. T. Zimmermann. 2007. Mining Workspace Updates in CVS. In Fourth International Workshop on Mining Software Repositories (MSR’07:ICSE Workshops 2007). 11–11. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Conflict resolution for structured merge via version space algebra

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!