Abstract
A key issue in maintaining Linux device drivers is the need to keep them up to date with respect to evolutions in Linux internal libraries. Currently, there is little tool support for performing and documenting such changes.
In this paper we present a tool, spdiff, that identifies common changes made in a set of files and their updated versions, and extracts a generic patch performing those changes. Library developers can use our tool to extract a generic patch based on the result of manually updating a few typical driver files, and then apply this generic patch to other drivers. Driver developers can use it to extract an abstract representation of the set of changes that others have made.
Our experiments on recent changes in Linux show that the inferred generic patches are more concise than the corresponding patches found in commits to the Linux source tree while being safe with respect to the changes performed in the provided driver files.
Article PDF
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Avoid common mistakes on your manuscript.
References
Andersen, J.: Semantic patch inference. Ph.D. dissertation, University of Copenhagen, Feb. 2010
Chawathe, S.S., Rajaraman, A., Garcia-Molina, H., Widom, J.: Change detection in hierarchically structured information. In: SIGMOD ’96: Proceedings of the 1996 ACM SIGMOD International Conference on Management of Data, pp. 493–504. ACM Press, New York (1996)
Conchon, S., Filliâtre, J.-C.: Type-safe modular hash-consing. In: ACM SIGPLAN Workshop on ML, Portland, Oregon, September 2006, supersedes (Filliâtre, 2000). [Online]. Available: http://www.lri.fr/filliatr/ftp/publis/hash-consing2.ps
Filliâtre, J.-C.: Hash consing in an ML framework. LRI, Université Paris Sud, Research Report 1368, September 2000. [Online]. Available: http://www.lri.fr/~filliatr/ftp/publis/hash-consing.ps.gz
Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C.V., Loingtier, J.-M., Irwin, J.: Aspect-oriented programming. In: ECOOP’97—Object-Oriented Programming, 11th European Conference. Jyväskylä, Finland. Lecture Notes in Computer Science, vol. 1241, pp. 220–242. Springer, Berlin (1997)
Kim, M., Notkin, D., Grossman, D.: Automatic inference of structural changes for matching across program versions. In: ICSE ’07: Proceedings of the 29th International Conference on Software Engineering, Washington, DC, USA, pp. 333–343. IEEE Computer Society, Los Alamitos (2007)
MacKenzie, D., Eggert, P., Stallman, R.: Comparing and Merging Files With Gnu Diff and Patch, Network Theory Ltd., Jan. 2003, unified Format section, http://www.gnu.org/software/diffutils/manual/html_node/Unified-Format.html
Neamtiu, I., Foster, J.S., Hicks, M.: Understanding source code evolution using abstract syntax tree matching. SIGSOFT Softw. Eng. Notes 30(4), 1–5 (2005)
Padioleau, Y., Lawall, J.L., Muller, G.: Understanding collateral evolution in Linux device drivers. In: The first ACM SIGOPS EuroSys Conference (EuroSys 2006), Leuven, Belgium, Apr. 2006, pp. 59–71
Padioleau, Y., Lawall, J., Hansen, R.R., Muller, G.: Documenting and automating collateral evolutions in Linux device drivers. In: Eurosys 2008, Glasgow, Scotland, Mar. 2008, pp. 247–260
Weissgerber, P., Diehl, S.: Identifying refactorings from source-code changes. In: ASE ’06: Proceedings of the 21st IEEE/ACM International Conference on Automated Software Engineering, Washington, DC, USA, pp. 231–240. IEEE Computer Society, Los Alamitos (2006)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Andersen, J., Lawall, J.L. Generic patch inference. Autom Softw Eng 17, 119–148 (2010). https://doi.org/10.1007/s10515-010-0062-z
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10515-010-0062-z