A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-November/094315.html below:

[Python-Dev] Static analysis of CPython using coccinelle/spatch

[Python-Dev] Static analysis of CPython using coccinelle/spatchTerry Reedy tjreedy at udel.edu
Wed Nov 18 01:45:20 CET 2009
A.M. Kuchling wrote:
> On Mon, Nov 16, 2009 at 03:27:53PM -0500, David Malcolm wrote:
>> Has anyone else looked at using Coccinelle/spatch[1] on CPython source
>> code?
> 
> For an excellent explanation of Coccinelle, see
> <http://lwn.net/Articles/315686/>.

For those who have not looked, Coccinelle means ladybug (a bug-eating 
bug ;-) in French. Its principle use to to take C code and a SmPl file 
of high-level patch descriptions (fixers, in 2to3 talk) and produce a 
standard diff file. I wonder if this could be used to help people 
migrate C extensions to 3.1, by developing a SmPl file with the needed 
changes dictated by API changes. This is similar to its motivating 
application to Linux. From

http://coccinelle.lip6.fr/

"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. "

As I understand it, the problem with C extensions and 3.1 is the current 
lack of a "collateral evolution" tool like 2to3 for Python code.

Terry Jan Reedy




More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4