Coccinelle for QEMU/KVM ======================= - Goal: Automatically find code (also, fix) containing bugs or defects, or requiring evolutions - Ability to abstract over irrelevant information - Ability to transform code fragments - Ability to match scattered code fragments - Coccinelle - Program matching & transofrmation for unpreprocessed C code. - Fits w/ the existing habits of C programmers - Semantic patch language (SmPL). - Metavariables for abstracting over subterms that you're not interested in. - Bulding a semantic patch - Select some model code fragments - Add metavariable declarations To check that a semantic patch is valid: $ spatch --parse-cocci mysp.cocci To run: $ spatch --sp-file mysp.cocci file.c $ spatch --sp-file mysp.cocci --dir directory - Practical issues