ABSTRACT
The development cycles in the software industry are shrinking due to the increasing demands for shorter time to market and the incremental development style of agile methodologies. Pragmatic software engineering approaches rely on careful product management, a strong versioning discipline, and a feature development strategy to avoid that newly merged code disrupts existing systems. Versioning is critical when managing software product lines and ensuring that all their variants are kept in operation amidst all the performed changes. Such methodologies enforce functional correctness through strong efforts in regression testing, with the associated exponential growth in complexity.
In this paper, we propose a language-based approach to software versioning. Unlike the traditional approach of mainstream VCS, where each evolution step is represented by a textual diff, we treat versions as first-class citizens. Each evolution step, merge operation, and version relationship, is represented as code in the program.
We extend prior work, Versioned Featherweight Java, to support a full-fledged version control system. First, we introduce multi-branching and merge operations, which allow for more advanced workflows. We also present a slicing procedure implemented in a compile-time tool that extracts well-typed Featherweight Java code for any single version out of a versioned codebase. We present formal soundness results that ensure that the sliced code for any version is well-behaved and has the same behaviour as the multi-version source code.
We believe that our developments effectively model relevant domains of software evolution, such as feature-oriented programming, software product lines, and continuous delivery scenarios. By lifting the versioning aspect, usually represented by text diffs, to the language level, we pave the way for tools that interact with software repositories (e.g. CI/CD, GitHub Actions) to have more insight regarding the evolution of the software semantics.
- [n.d.]. Semantic Release. https://semantic-release.gitbook.io/semantic-release/ [Accessed Feb. 15, 2021].Google Scholar
- Edward Amsden, Ryan Newton, and Jeremy Siek. 2014. Editing Functional Programs Without Breaking Them. In International Symposium on Implementation and Application of Functional Languages.Google Scholar
- Sven Apel and Delesley Hutchins. 2008. A calculus for uniform feature composition. ACM Transactions on Programming Languages and Systems (TOPLAS) 32, 5(2008), 1–33.Google ScholarDigital Library
- Moritz Beller, Georgios Gousios, and Andy Zaidman. 2017. Oops, My Tests Broke the Build: An Explorative Analysis of Travis CI with GitHub. In 2017 IEEE/ACM 14th International Conference on Mining Software Repositories (MSR). IEEE, Buenos Aires, Argentina, 356–367. https://doi.org/10.1109/MSR.2017.62Google ScholarDigital Library
- Keith H Bennett and Václav T Rajlich. 2000. Software maintenance and evolution: a roadmap. In Proceedings of the Conference on the Future of Software Engineering.Google ScholarDigital Library
- Luis Carvalho and João Costa Seco. 2019. Software Evolution with a Typeful Version Control System. In Software Engineering and Formal Methods - 17th International Conference, SEFM 2019, Oslo, Norway, September 18-20, 2019, Proceedings. 145–161. https://doi.org/10.1007/978-3-030-30446-1_8Google ScholarDigital Library
- Miguel Domingues and João Costa Seco. 2015. Type Safe Evolution of Live Systems. In Workshop on Reactive and Event-based Languages & Systems (REBLS’15).Google Scholar
- S. G. Eick, T. L. Graves, A. F. Karr, J. S. Marron, and A. Mockus. 2001. Does code decay? Assessing the evidence from change management data. IEEE Transactions on Software Engineering(2001).Google Scholar
- Martin Erwig and Deling Ren. 2002. A rule-based language for programming software updates. In Proceedings of the 2002 ACM SIGPLAN workshop on Rule-based programming - RULE ’02. Pittsburgh, Pennsylvania.Google ScholarDigital Library
- J Nathan Foster, Michael B Greenwald, Jonathan T Moore, Benjamin C Pierce, and Alan Schmitt. [n.d.]. Combinators for Bi-Directional Tree Transformations: A Linguistic Approach to the View Update Problem. ([n. d.]).Google Scholar
- Tim Freeman and Frank Pfenning. 1991. Refinement Types for ML. In Proceedings of the ACM SIGPLAN 1991 Conference on Programming Language Design and Implementation(PLDI ’91). Association for Computing Machinery, New York, NY, USA, 268–277. https://doi.org/10.1145/113445.113468Google ScholarDigital Library
- T.L. Graves, A.F. Karr, J.S. Marron, and H. Siy. 2000. Predicting fault incidence using software change history. IEEE Transactions on Software Engineering(2000).Google Scholar
- Neelam Gupta, Haifeng He, Xiangyu Zhang, and Rajiv Gupta. 2005. Locating faulty code using failure-inducing chops. In Proceedings of the 20th IEEE/ACM International Conference On Automated Software Engineering - ASE ’05. ACM Press, Long Beach, CA, USA, 263. https://doi.org/10.1145/1101908.1101948Google ScholarDigital Library
- P. Hosek and C. Cadar. 2013. Safe software updates via multiversion execution. In 2013 35th International Conference on Software Engineering (ICSE). https://doi.org/10.1109/ICSE.2013.6606607Google Scholar
- Atsushi Igarashi, Benjamin C. Pierce, and Philip Wadler. 2001. Featherweight Java: a minimal core calculus for Java and GJ. ACM Transactions on Programming Languages and Systems 23 (2001). https://doi.org/10.1145/503502.503505Google ScholarDigital Library
- C. Izurieta and J. M. Bieman. 2007. How Software Designs Decay: A Pilot Study of Pattern Evolution. In First International Symposium on Empirical Software Engineering and Measurement (ESEM 2007).Google Scholar
- J. Kim, Y. K. Malaiya, and I. Ray. 2007. Vulnerability Discovery in Multi-Version Software Systems. In 10th IEEE High Assurance Systems Engineering Symposium (HASE’07).Google Scholar
- Miryung Kim and David Notkin. 2006. Program element matching for multiversion program analyses. In Proceedings of the 2006 international workshop on Mining software repositories - MSR ’06.Google ScholarDigital Library
- Raghavan Komondoor and Susan Horwitz. 2001. Using Slicing to Identify Duplication in Source Code. In Static Analysis, Gerhard Goos, Juris Hartmanis, Jan van Leeuwen, and Patrick Cousot (Eds.). Vol. 2126. Springer Berlin Heidelberg, Berlin, Heidelberg, 40–56. https://doi.org/10.1007/3-540-47764-0_3Google Scholar
- Josip Maras, Jan Carlson, and Ivica Crnkovic. 2011. Client-side web application slicing. In 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011). IEEE, Lawrence, KS, USA, 504–507. https://doi.org/10.1109/ASE.2011.6100110Google ScholarDigital Library
- Katsuhisa Maruyama, Eijiro Kitsu, Takayuki Omori, and Shinpei Hayashi. 2012. Slicing and replaying code change history. In Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering. ACM, 246–249.Google ScholarDigital Library
- Stuart McIlroy, Nasir Ali, and Ahmed E. Hassan. 2016. Fresh Apps: An Empirical Study of Frequently-Updated Mobile Apps in the Google Play Store. Empirical Software Engineering 21, 3 (June 2016), 1346–1370. https://doi.org/10.1007/s10664-015-9388-2Google ScholarDigital Library
- Aleksandar Nanevski, Viktor Vafeiadis, and Josh Berdine. 2010. Structuring the Verification of Heap-Manipulating Programs. In Proceedings of the 37th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (Madrid, Spain) (POPL ’10). Association for Computing Machinery, New York, NY, USA, 261–274. https://doi.org/10.1145/1706299.1706331Google ScholarDigital Library
- Ansong Ni, Daniel Ramos, Aidan Yang, Inês Lynce, Vasco Manquinho, Ruben Martins, and Claire Le Goues. 2021. SOAR: A Synthesis Approach for Data Science API Refactoring. In ICSE ’20: 42nd International Conference on Software Engineering. To appear.Google ScholarDigital Library
- Cyrus Omar, Ian Voysey, Ravi Chugh, and Matthew A. Hammer. 2019. Live functional programming with typed holes. Proceedings of the ACM on Programming Languages (2019).Google ScholarDigital Library
- Cyrus Omar, Ian Voysey, Michael Hilton, Jonathan Aldrich, and Matthew A. Hammer. 2017. Hazelnut: A Bidirectionally Typed Structure Editor Calculus. ACM SIGPLAN Notices (2017).Google Scholar
- Malavika Samak, Deokhwan Kim, and Martin C. Rinard. 2020. Synthesizing replacement classes. Proceedings of the ACM on Programming Languages 4, POPL (Jan. 2020), 1–33. https://doi.org/10.1145/3371120Google ScholarDigital Library
- Ina Schaefer, Lorenzo Bettini, Viviana Bono, Ferruccio Damiani, and Nico Tanzarella. 2010. Delta-Oriented Programming of Software Product Lines. In Software Product Lines: Going Beyond. Springer Berlin Heidelberg, Berlin, Heidelberg.Google ScholarDigital Library
- Mojtaba Shahin, Muhammad Ali Babar, and Liming Zhu. 2017. Continuous Integration, Delivery and Deployment: A Systematic Review on Approaches, Tools, Challenges and Practices. IEEE Access 5(2017), 3909–3943. https://doi.org/10.1109/ACCESS.2017.2685629Google ScholarCross Ref
- Suriya Subramanian, Michael Hicks, and Kathryn S. McKinley. 2009. Dynamic Software Updates: A VM-centric Approach. SIGPLAN Not. 44, 6 (June 2009), 1–12. https://doi.org/10.1145/1543135.1542478Google ScholarDigital Library
- Tom Preston-Werner. [n.d.]. Semantic Versioning 2.0.0. https://semver.org/Google Scholar
- J. van Gurp, J. Bosch, and M. Svahnberg. 2001. On the notion of variability in software product lines. In Proceedings Working IEEE/IFIP Conference on Software Architecture. IEEE Comput. Soc, Amsterdam, Netherlands. https://doi.org/10.1109/WICSA.2001.948406Google ScholarDigital Library
- Rick Wash, Emilee Rader, Kami Vaniea, and Michelle Rizor. 2014. Out of the loop: How automated software updates cause unintended security consequences. In 10th Symposium On Usable Privacy and Security (SOUPS 2014).Google Scholar
- Mark Weiser. 1981. Program slicing. In Proceedings of the 5th international conference on Software engineering. IEEE Press, 439–449.Google ScholarDigital Library
- Andrew K. Wright and Matthias Felleisen. 1994. A Syntactic Approach to Type Soundness. Information and Computation 115 (1994).Google Scholar
- Fengmin Zhu and Fei He. 2018. Conflict Resolution for Structured Merge via Version Space Algebra. Proceedings of the ACM on Programming Languages 2, OOPSLA (Oct. 2018), 1–25. https://doi.org/10.1145/3276536Google ScholarDigital Library
- Thomas Zimmermann, Andreas Zeller, Peter Weissgerber, and Stephan Diehl. 2005. Mining version histories to guide software changes. IEEE Transactions on Software Engineering(2005).Google ScholarDigital Library
Recommendations
Putting the semantics into semantic versioning
Onward! 2020: Proceedings of the 2020 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and SoftwareThe long-standing aspiration for software reuse has made astonishing strides in the past few years. Many modern software development ecosystems now come with rich sets of publicly-available components contributed by the community. Downstream developers ...
Semantic Versioning for Python Programs
SPLASH 2023: Companion Proceedings of the 2023 ACM SIGPLAN International Conference on Systems, Programming, Languages, and Applications: Software for HumanityWe propose a language-based approach to software versioning. Unlike the traditional approach of mainstream version control systems, where each evolution step is represented by a textual diff, we treat versions as programming elements. Each ...
Versioning Systems for Evolution Research
IWPSE '05: Proceedings of the Eighth International Workshop on Principles of Software EvolutionResearch in evolution goes on par with the use of versioning systems by developers of the case studies. There is a great diversity of versioning systems with advantages and disadvantages both from the technical as well as from the conceptual point of ...
Comments