5 रिपॉजिटरी
Replacing matched AST nodes with new code using a string-like syntax that ignores formatting differences.
Distinct from Code Transformation Tools: Distinct from Code Transformation Tools: focuses on pattern-based replacement with formatting-agnostic syntax rather than general AST manipulation.
Explore 5 awesome GitHub repositories matching software engineering & architecture · Pattern-Based Replacements. Refine with filters or upvote what's useful.
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
Replaces matched AST nodes with new code using a string-like syntax that ignores formatting differences.
Shellharden is a shell script hardening tool and linter designed to improve the security and reliability of Bash scripts. It functions as an automated utility that rewrites scripts to follow industry standards for quoting and security practices. The project provides an optimizer and standardizer that replaces unsafe patterns and aliases with safer functional equivalents. It includes a syntax highlighter that uses visual markers and colorization to indicate vulnerabilities and areas where quoting corrections are required. The tool covers a broad range of capabilities including automated safet
Replaces unsafe shell scripting patterns with industry-standard equivalents using automated text rewriting.
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 कंप्यूटेशन ग्राफ़ की जटिलता को कम करने के लिए डिज़ाइन किया गया है। यह एक मॉडल कंप्रेसर के रूप में कार्य करता है जो परिचालन ओवरहेड को कम करने के लिए जटिल ऑपरेटर अनुक्रमों को सरलीकृत निरंतर आउटपुट के साथ बदल देता है। यह प्रोजेक्ट निरंतर फोल्डिंग इन्फरेंस के माध्यम से सरलीकरण प्राप्त करता है, जो निरंतर ऑपरेटरों के सबग्राफ़ को पूर्व-गणना किए गए निरंतर टेंसर के साथ बदल देता है। यह अनावश्यक नोड्स या अप्राप्य ऑपरेशनों की पहचान करने और उन्हें हटाने के लिए पैटर्न-आधारित ग्राफ़ रीराइटिंग और स्टेटिक कंप्यूटेशन ग्राफ़ विश्लेषण का उपयोग करता है। यह टूल ऑपरेटर अतिरेक उन्मूलन (redundancy elimination) और अनावश्यक रीशेप या आइडेंटिटी नोड्स को हटाने सहित व्यापक मॉडल ऑप्टिमाइज़ेशन क्षमताओं को कवर करता है। ये प्रक्रियाएं निष्पादन प्रवाह को सुव्यवस्थित करती हैं और मॉडल के मेमोरी फ़ुटप्रिंट को कम करती हैं।
Uses pattern-based rewriting to replace operator sequences with simplified equivalent structures.
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.