Enforcing the use of API functions in linux code

  • Authors:
  • Julia L. Lawall;Gilles Muller;Nicolas Palix

  • Affiliations:
  • University of Copenhagen, Copenhagen, Denmark;EMN/INRIA-Regal, Nantes and Paris, France;University of Copenhagen, Copenhagen, Denmark

  • Venue:
  • Proceedings of the 8th workshop on Aspects, components, and patterns for infrastructure software
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

In the Linux kernel source tree, header files typically define many small functions that have a simple behavior but are critical to ensure readability, correctness, and maintainability. We have observed, however, that some Linux code does not use these functions systematically. In this paper, we propose an approach combining rule-based program matching and transformation with generative programming to generate rules for finding and fixing code fragments that should use the functions defined in header files. We illustrate our approach using an in-depth study based on four typical functions defined in the header file include/linux/usb.h.