Coccinelle: Impact and Internals
summary
Coccinelle is a pattern-based matcher and transformer for C that turns semantic patches into CTL checks over a per-function control-flow graph and produces token-level edits so unchanged code keeps original spacing. It parses >99% of Linux source without full preprocessing, drove ~9,000 kernel commits, and automates large refactorings (e.g. init_timer→setup_timer: 300/800 then 808/828 matches after rule tuning). The tool outputs patches (spatch) for review or in-place edits.
AI-written summary · about
chapters (8)
- 0:00Coccinelle introduction
- 12:49Why Coccinelle was created
- 22:21Semantic patching example
- 37:56Handling multiple rules
- 41:06Parsing Linux kernel
- 55:39Code generation & transformations
- 1:04:12Coccinelle's Linux impact
- 1:08:49Q&A on language & future
related talks
56mKeynote: Inside the Mind of a Coccinelle Programmer
29mMy Little Parser: Tooling is Magic
39mBytecode Pattern Matching
01h 02mMelocoton: A Program Logic for Verified Interoperability Between OCaml and C (I...
22mBoosting Compiler Testing by Injecting Real-World Code
23mTargeted Static Analysis for OCaml C Stubs: Eliminating gremlins from the code
14mOn-Stack Replacement for Program Generators and Source-to-Source Compilers
37mTCO
