./wip/coccinelle, Tool for writing and applying semantic patches

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]

Branch: CURRENT, Version: 1.0.6, Package name: coccinelle-1.0.6, Maintainer: pkgsrc-users

Coccinelle is a program matching and transformation engine which provides
the language SmPL (Semantic Patch Language) for specifying desired matches
and transformations in C code. Coccinelle was initially targeted towards
performing collateral evolutions in Linux. Such evolutions comprise the
changes that are needed in client code in response to evolutions in library
APIs, and may include modifications such as renaming a function, adding a
function argument whose value is somehow context-dependent, and reorganizing
a data structure. Beyond collateral evolutions, Coccinelle is successfully
used (by us and others) for finding and fixing bugs in systems code.

Required to run:
[lang/ocaml] [devel/pcre-ocaml] [devel/menhir] [lang/python27] [lang/camlp4]

Required to build:
[devel/ocaml-findlib] [pkgtools/cwrappers]

Master sites:

SHA1: a1c06d8acc7a34a943b3d72e0773cdf54e533bca
RMD160: f3cd1de8566936d867c1fab31f52071ec3b80d9c
Filesize: 6527.615 KB

Version history: (Expand)

CVS history: (Expand)

   2009-03-22 00:53:16 by Thomas Klausner | Files touched by this commit (6) | Package removed
Log message:
Remove coccinelle, imported to pkgsrc/devel.

   2009-03-21 20:38:52 by Thomas Klausner | Files touched by this commit (6) | Imported package
Log message:
Initial import of coccinelle-0.1.6:

Many self tests failed -- authors informed, waiting for feedback.
patch-aa sent upstream.

The Linux operating system (OS) is evolving rapidly to improve
performance and to provide new features. This evolution, however,
makes it difficult to maintain platform-specific code such as device
drivers. Indeed, an evolution in a driver support library often
triggers the need for multiple collateral evolutions in dependent
device drivers, to bring the drivers up to date with the new library
API. Currently, collateral evolutions are mostly done manually.
The large number of drivers, however, implies that this approach
is time-consuming and unreliable, leading to subtle errors when
modifications are not done consistently. Moreover, as these collateral
evolutions are often poorly documented, the resulting maintenance
is difficult and costly, frequently introducing errors. If a driver
maintainer becomes unavailable, the driver quickly falls behind
the rest of the OS.

In this project, we propose a language-based approach to address
the problem of collateral evolution in drivers. Specifically, we
are developing the development environment, Coccinelle, that provides
a transformation language for precisely expressing collateral
evolutions and an interactive transformation tool for applying
them. The key idea of Coccinelle is to shift the burden of collateral
evolution from the driver maintainer to the OS developer who performs
the original OS evolution, and who thus understands this evolution
best. In our vision, the OS developer first uses the Coccinelle
transformation language to write a semantic patch describing the
required collateral evolution in device drivers and then uses the
Coccinelle transformation tool to validate the semantic patch on
the drivers in the Linux source distribution. When he has confidence
in the correctness of the semantic patch, he distributes it for
use by the maintainers of other drivers. Overall, Coccinelle will
provide a means for formally documenting collateral evolutions and
for easing the application of these evolutions to driver code.