On the Origins of Coccinelle

Author Julia Lawall

Thumbnail PDF


  • Filesize: 0.53 MB
  • 11 pages

Document Identifiers

Author Details

Julia Lawall
  • Inria, Paris, France


The author wishes to thank Gilles Muller for his collaboration on the design, application, and maintenance of Coccinelle. The author would also like to thank the anonymous reviewers for their helpful feedback, particularly on historical matters, and Olivier Danvy for help in improving the clarity of the presentation.

Cite AsGet BibTex

Julia Lawall. On the Origins of Coccinelle. In Eelco Visser Commemorative Symposium (EVCS 2023). Open Access Series in Informatics (OASIcs), Volume 109, pp. 18:1-18:11, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2023)


Coccinelle is a program-transformation system for C code. It has been under development since 2005 and has been extensively used on the Linux kernel. The design of Coccinelle was inspired in part by the author’s previous experience in using Stratego/XT, developed by Eelco Visser. This paper reflects on some of Coccinelle’s design choices and their relation to Eelco Visser’s work.

Subject Classification

ACM Subject Classification
  • Software and its engineering → Software evolution
  • Linux kernel
  • Coccinelle
  • Stratego/XT
  • program transformation


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Martin Bravenboer, Karl Trygve Kalleberg, Rob Vermaas, and Eelco Visser. Stratego/XT 0.17. A language and toolset for program transformation. Science of Computer Programming, 72(1-2):52-70, 2008. Google Scholar
  2. Neil Brown. Sparse: a look under the hood. Linux Weekly News, 2016. URL: https://lwn.net/Articles/689907/.
  3. Julien Brunel, Damien Doligez, René Rydhof Hansen, Julia L. Lawall, and Gilles Muller. A foundation for flow-based program matching: using temporal logic and model checking. In POPL, pages 114-126, 2009. Google Scholar
  4. Rod M. Burstall and John Darlington. A transformation system for developing recursive programs. J. ACM, 24(1):44-67, 1977. Google Scholar
  5. Yvonne Coady, Gregor Kiczales, Michael J. Feeley, and Greg Smolyn. Using AspectC to improve the modularity of path-specific customization in operating system code. In A Min Tjoa and Volker Gruhn, editors, ESEC/FSE, pages 88-98, 2001. Google Scholar
  6. Ferrous Systems & contributors. rust.analyzer, 2023. URL: https://rust-analyzer.github.io/.
  7. Dawson R. Engler, Benjamin Chelf, Andy Chou, and Seth Hallem. Checking system rules using system-specific, programmer-written compiler extensions. In OSDI, pages 1-16, 2000. Google Scholar
  8. Dawson R. Engler, David Yu Chen, and Andy Chou. Bugs as deviant behavior: A general approach to inferring errors in systems code. In SOSP, pages 57-72, 2001. Google Scholar
  9. Martin Fowler. Refactoring: Improving the Design of Existing Code. Addison-Wesley, 2002. Google Scholar
  10. Lennart C. L. Kats and Eelco Visser. The Spoofax language workbench: rules for declarative specification of languages and IDEs. In Object oriented programming systems languages and applications (OOPSLA), pages 444-463, October 201. Google Scholar
  11. Ted Kremenek, Paul Twohey, Godmar Back, Andrew Y. Ng, and Dawson R. Engler. From uncertainty to belief: Inferring the specification within. In OSDI, pages 161-176, 2006. Google Scholar
  12. David Lacey, Neil D. Jones, Eric Van Wyk, and Carl Christian Frederiksen. Proving correctness of compiler optimizations by temporal logic. In Principles of Programming Languages (POPL), pages 283-294. ACM, 2002. Google Scholar
  13. Julia Lawall, Ben Laurie, René Rydhof Hansen, Nicolas Palix, and Gilles Muller. Finding error handling bugs in OpenSSL using Coccinelle. In EDCC, pages 191-196, 2010. Google Scholar
  14. Julia Lawall and Gilles Muller. Coccinelle: 10 years of automated evolution in the Linux kernel. In USENIX ATC, pages 601-614, 2018. Google Scholar
  15. Julia Lawall and Gilles Muller. Automating program transformation with Coccinelle. In NASA Formal Methods (invited talk), volume 13260 of Lecture Notes in Computer Science, pages 71-87, 2022. Google Scholar
  16. Julia L. Lawall, Julien Brunel, Nicolas Palix, René Rydhof Hansen, Henrik Stuart, and Gilles Muller. WYSIWIB: exploiting fine-grained program structure in a scriptable API-usage protocol-finding process. Software: Practice and Experience, 43(1):67-92, 2013. Google Scholar
  17. David MacKenzie, Paul Eggert, and Richard Stallman. Comparing and Merging Files With Gnu Diff and Patch. Network Theory Ltd, January 2003. Google Scholar
  18. Michele Martone and Julia Lawall. Refactoring for performance with semantic patching: Case study with recipes. In High Performance Computing - ISC High Performance Digital 2021 International Workshops, volume 12761 of Lecture Notes in Computer Science, pages 226-232, 2021. Google Scholar
  19. Fabrice Mérillon, Laurent Réveillère, Charles Consel, Renaud Marlet, and Gilles Muller. Devil: An IDL for hardware programming. In OSDI, pages 17-30, 2000. Google Scholar
  20. George C. Necula, Scott McPeak, Shree Prakash Rahul, and Westley Weimer. CIL: intermediate language and tools for analysis and transformation of C programs. In Compiler Construction, volume 2304 of Lecture Notes in Computer Science, pages 213-228, 2002. Google Scholar
  21. Yoann Padioleau. Parsing C/C++ code without pre-processing. In Oege de Moor and Michael I. Schwartzbach, editors, Compiler Construction (CC), volume 5501 of Lecture Notes in Computer Science, pages 109-125. Springer, 2009. Google Scholar
  22. Yoann Padioleau, Julia Lawall, René Rydhof Hansen, and Gilles Muller. Documenting and automating collateral evolutions in Linux device drivers. In EuroSys, pages 247-260, 2008. Google Scholar
  23. Yoann Padioleau, Julia L. Lawall, and Gilles Muller. Understanding collateral evolution in Linux device drivers. In EuroSys, pages 59-71, 2006. Google Scholar
  24. Nicolas Palix, Gaël Thomas, Suman Saha, Christophe Calvès, Gilles Muller, and Julia Lawall. Faults in Linux 2.6. ACM Transactions on Computer Systems, 32(2):4:1-4:40, 2014. Google Scholar
  25. François Pottier and Yann Régis-Gianas. Menhir reference manual, February 2022. URL: http://gallium.inria.fr/~fpottier/menhir/.
  26. Laurent Réveillère and Gilles Muller. Improving driver robustness: An evaluation of the Devil approach. In DSN, pages 131-140, 2001. Google Scholar
  27. Luis R. Rodriguez and Julia Lawall. Increasing automation in the backporting of Linux drivers using Coccinelle. In EDCC, pages 132-143, 2015. Google Scholar
  28. Mark van den Brand, H. A. de Jong, Paul Klint, and Pieter A. Olivier. Efficient annotated terms. Software: Practice and Experience, 30(3):259-291, 2000. Google Scholar
  29. Arie van Deursen, Jan Heering, and Paul Klint. Language Prototyping: An Algebraic Specification Approach, volume 5 of AMAST Series in Computing. World Scientific, 1996. Google Scholar
  30. Eelco Visser. Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam, September 1997. Google Scholar
  31. Eelco Visser and Zine-El-Abidine Benaissa. A core language for rewriting. In International Workshop on Rewriting Logic and its Applications, (WRLA), volume 15 of Electronic Notes in Theoretical Computer Science, pages 422-441. Elsevier, 1998. Google Scholar
  32. Eelco Visser, Zine-El-Abidine Benaissa, and Andrew P. Tolmach. Building program optimizers with rewriting strategies. In International Conference on Functional Programming (ICFP), pages 13-26. ACM, 1998. Google Scholar
  33. Philip Wadler. Deforestation: Transforming programs to eliminate trees. Theoretical Computer Science, 73(2):231-248, 1990. Google Scholar
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail