13 个仓库
Utilities that perform structural code modifications by parsing language grammars.
Distinguishing note: Focuses on AST-based manipulation rather than simple text search-and-replace.
Explore 13 awesome GitHub repositories matching software engineering & architecture · Code Transformation Tools. Refine with filters or upvote what's useful.
Jadx is a comprehensive Java decompilation suite designed to transform compiled binary application files into readable source code. It functions as a static analysis workbench, providing a graphical interface for navigating, searching, and inspecting the internal logic of complex software packages. By utilizing a bytecode-to-Java pipeline, the project reconstructs high-level logical structures from low-level binary instructions, making it a primary tool for Android application reverse engineering. The project distinguishes itself through a sophisticated control flow reconstruction engine and
Provides automated manipulation of intermediate code representations to simplify logic and remove redundancies.
Helix is a terminal-based modal text editor designed for efficient code manipulation and navigation. It centers on a selection-first editing model, where operations are performed on active ranges rather than individual cursor positions, allowing for precise control over text and code structures. The editor distinguishes itself through deep integration with structural parsing and language intelligence. By utilizing an incremental parsing library, it builds concrete syntax trees that enable advanced features like structural code navigation, intelligent indentation, and syntax-aware text object
Performing precise text operations by leveraging structural tree parsing to select, move, and modify code blocks based on language grammar.
Rector is an automated PHP refactoring and modernization tool designed to upgrade language versions and modernize syntax using predefined rules. It functions as a static analysis engine that inspects code structures and types to identify refactoring targets without executing the code. The project provides a framework for defining custom transformation logic to automate project-specific changes. It distinguishes itself by offering specialized capabilities for migrating legacy or custom frameworks to modern alternatives and converting docblock annotations into native language attributes. The s
Implements structural code modifications by parsing PHP grammars into abstract syntax trees.
GoGoCode is an AST-based code transformation toolkit that enables developers to query, match, and rewrite JavaScript source code using jQuery-style selectors and wildcard patterns. At its core, it provides a programmatic code refactoring library that manipulates parsed AST nodes, allowing precise structural modifications without worrying about formatting differences. The toolkit also functions as a JavaScript AST query engine, finding code patterns through snippet-based matching with wildcards that capture unknown or variable-length fragments. What distinguishes GoGoCode is its callback-drive
Accepts callback functions that receive matched wildcard values and return context-aware replacement code.
Doctrine Collections is a PHP library that provides object-oriented abstractions for managing and manipulating groups of objects with array-like functionality. It wraps native PHP arrays in an object-oriented interface, enabling cleaner data manipulation through methods for filtering, mapping, and iteration. The library supports callback-driven transformation, applying a callback to every element and returning a new collection with the transformed values. It also enables criteria expression querying, allowing selection of matching elements by applying a criteria object with comparison express
Ships a callback-driven map operation that transforms every element in a collection.
xmltodict 是一个 Python 库,提供 XML 文档与字典之间的双向序列化功能。它既是一个将标记化输入转换为键值对的解析器,也是一个将字典转换回结构化 XML 文档的序列化工具。 该项目包含一个增量流处理器,使用基于深度的回调来处理大型 XML 文件,同时保持恒定的内存占用。它具有用于映射前缀和声明的命名空间管理器,以及一个安全清理器,可阻止外部实体扩展并验证元素名称以防止注入攻击。 该库提供了数据类型强制功能,例如强制将特定元素表示为列表(无论子元素数量如何)。它还支持通过用户定义的回调进行数据后处理,并为转换过程中的命名空间扩展、折叠或跳过提供了可配置的控制选项。
Provides user-defined callbacks to transform XML values or attributes on the fly during conversion.
Shellharden 是一个 Shell 脚本加固工具和 linter,旨在提高 Bash 脚本的安全性和可靠性。它作为一个自动化工具,重写脚本以遵循行业标准的引用和安全实践。 该项目提供了一个优化器和标准化工具,用更安全的函数等效项替换不安全的模式和别名。它包含一个语法高亮器,使用视觉标记和颜色来指示漏洞以及需要进行引用修正的区域。 该工具涵盖了广泛的功能,包括自动安全修复、漏洞检测和脚本错误检测。这些功能通过自动重写和结构化语法验证确保脚本的一致性。
Replaces unsafe shell scripting patterns with industry-standard equivalents using automated text rewriting.
FUXA is a web-based SCADA system and industrial HMI software designed for monitoring and controlling industrial hardware. It functions as an industrial protocol gateway and data historian, enabling the ingestion of telemetry from programmable logic controllers and sensors through standard industrial communication protocols. The project features a flow-based automation engine that allows for the construction of complex operational logic using a visual node-and-edge environment. It utilizes SVG-based rendering for its graphical interfaces, allowing users to develop custom HMI widgets and dashbo
Executes user-defined functions during read and write operations to convert raw device values into usable formats.
c2rust is a source-to-source translation suite and C-to-Rust transpiler designed to convert C source code and libraries into functionally equivalent unsafe Rust code. It operates as a pipeline that preserves original behavior and data structures, producing translated code that compiles as compatible shared libraries or Rust crates. The system includes an automated Rust refactoring framework that uses pattern-based AST rewriting to transform unsafe Rust into safe, idiomatic constructs. It utilizes an ownership inference engine to determine when raw pointers can be converted into safe reference
Replaces matched statements or expressions with new syntax produced by a callback or a pattern template.
onnxsim 是一个深度学习图优化器和模型简化器,旨在降低 ONNX 计算图的复杂度。它充当模型压缩器,用简化的常量输出替换复杂的算子序列,以减少操作开销。 该项目通过常量折叠推理实现简化,将常量算子的子图替换为预计算的常量张量。它利用基于模式的图重写和静态计算图分析来识别并删除冗余节点或不可达操作。 该工具涵盖了广泛的模型优化功能,包括算子冗余消除以及删除不必要的 reshape 或 identity 节点。这些过程简化了执行流程并减少了模型的内存占用。
Uses pattern-based rewriting to replace operator sequences with simplified equivalent structures.
Codemod 是一套用于执行结构化源代码转换的软件工具。它作为一个自动化代码库迁移工具,利用抽象语法树操作而非简单的正则表达式,在多个文件之间执行大规模重构。 该项目通过一个提供彩色差异的交互式转换界面脱颖而出,允许用户手动审查、接受或修改每个匹配项。它还支持分布式重构工作流,能够将代码库分割成指定的任务块,以便在多个贡献者之间分配迁移任务。 该工具集涵盖了脚本化转换逻辑、模式匹配搜索引擎以及基于扩展的文件过滤功能,以将操作限制在项目的特定子集中。
Provides utilities for structural code modifications based on language grammars and AST manipulation.
Capnweb is a distributed object communication library and Cap'n Proto RPC framework. It enables type-safe remote procedure calls between clients and servers using shared schemas and generated stubs to invoke methods on remote objects as if they were local. The project utilizes an object-capability security model to govern access to remote resources through unforgeable tokens. It provides a bidirectional network layer that multiplexes asynchronous calls and data streams over persistent WebSocket connections and includes a remote resource lifecycle manager that uses reference counting to automa
Allows executing server-side callbacks to modify values before transmission, minimizing the amount of data transferred over the network.
OpenRewrite is an automated refactoring engine and source-to-source migration framework. It uses a lossless semantic tree parser to represent source code as type-aware trees that preserve original whitespace and formatting, enabling precise and deterministic modifications. The project utilizes a declarative refactoring pipeline where sequences of transformations are defined in YAML to resolve breaking changes and technical debt. It features type-aware pattern matching and cross-language model mapping to apply similar refactoring patterns across different programming languages. The framework
Swaps expressions or statements using type-aware templates that leverage compiler information for accurate replacement.