Skip to content
SPECIFICTION
Get listed

Coccinelle vs PolyglotPiranha

Coccinelle

coccinelle.gitlabpages.inria.fr

PolyglotPiranha

github.com

Side by side

FigureCoccinellePolyglotPiranha
Price fromFree—
Free planYes—
Free trial——
Open source——
macOSYesYes
LinuxYesYes
iOS—Yes
API—Yes
Self-hosted—Yes
Plans published10
Spec score · Code Refactoring Tools7.9 (#9)7.2 (#19)
PurposeCoccinelle is a program matching and transformation engine that uses SmPL to specify desired matches and transformations in C code.Polyglot Piranha is a lightweight code transformation toolset for automating large scale changes and is used at Uber mostly to clean up stale feature flags.
SecurityThe official pages opened for this research do not state security certifications, compliance claims, or a security program.The repository identifies the project as provided as-is and does not state security certifications or compliance claims.
SupportQuestions can be sent to the [email protected] mailing list, which is moderated for non-members; contributions are preferred via the list and may also be submitted on GitHub.Users with questions or bug reports are directed to open a GitHub issue.

Plans

Coccinelle

  • CoccinelleFree

Coccinelle pricing →

PolyglotPiranha

No plans published.

PolyglotPiranha pricing →

In their own words

Coccinelle

Coccinelle is a free program matching and transformation engine for working with C code. It uses SmPL to describe code patterns and the transformations to apply when matches are found. A single semantic patch can change code at many sites across hundreds of files while allowing for differences in spacing, variable names, irrelevant code, and coding style. The project describes uses including automating collateral changes after library API evolution and finding and fixing bugs in systems code. Coccinelle semantic patches and bug fixes have been integrated into the official Linux tree, and semantic patches are available in the Linux scripts directory for use with coccicheck. It supports C and C++, with C++ mode invoked using --c++; the project says its C++ support is still being extended, including for high performance computing. The download page lists version 1.3.3, dated September 2, 2026, with source code and precompiled spatch builds. It is available for Linux and macOS as desktop software. Source builds require OCaml, with Python and Menhir needed in specified cases.

Visit coccinelle.gitlabpages.inria.fr

PolyglotPiranha

PolyglotPiranha is a free, multilingual structural search-and-replace engine for code cleanup. It can refactor stale feature-flag code when given a flag name, expected behavior, and configured feature-flag API rules. Rules can form graphs, and built-in language-specific cleanups include simplifying boolean expressions and if-else statements, removing empty declarations and files, and inlining local variables. Queries and filters may use Tree-sitter queries, regular expressions, or Piranha’s concrete syntax. The project is available as a Python library and command-line tool, with the Python API wrapping the CLI. The CLI lists Java, Swift, Python, Kotlin, Go, TSX, and TypeScript as target languages. Dry runs prevent in-place rewriting and produce summaries of matches, rewrites, and resulting file content. API configuration requires code path, configuration path, target language, and substitutions, with optional rules.toml and edges.toml files. Python installation uses pip; the CLI can be built with Rust and Cargo or obtained from releases. Piranha is Apache 2.0, provided as is, and not an official Uber product.

Visit github.com