pattern-based rewriting

Designs and implements systems that express and apply transformation rules triggered by structural patterns to rewrite terms, abstract syntax trees, graphs, or textual sequences; builds pattern matchers, rule application strategies, and transformation engines. Analyzes and verifies properties of such rewrite systems, including correctness, termination, confluence, and performance of pattern matching and rule scheduling.

pattern-basedrewriting

Recent Skill Trend

Momentum and market value over time
Trending
Score
No comparison yet
0.19
Oct 01, 2026Oct 01, 2026
Career
Value
No comparison yet
$209K/year
Oct 01, 2026Oct 01, 2026

Must-Read Papers

Most classic and influential ideas
View more

Automated Analysis of Logically Constrained Rewrite Systems using crest

Jan 09, 2025
JS
Jonas Schopf
🏛️ University of Innsbruck

This work addresses the automated verification of confluence (and non-confluence) and termination for Logic-Constrained Rewrite Systems (LCRSs). Methodologically, we propose CREST, a unified analysis framework integrating SMT solving, symbolic execution, and rewriting semantics to enable precise modeling and property derivation of rewrite rules under first-order logical constraints. Our key contribution is the first end-to-end automated verification framework capable of handling LCRSs with complex logical conditions—including inequalities and existential quantifiers—thereby overcoming the fundamental limitation of conventional rewriting tools, which only support unconstrained rules. Evaluated on diverse benchmarks, CREST achieves significantly higher accuracy, broader coverage, and superior scalability compared to state-of-the-art tools. It successfully verifies realistic LCRSs arising in program analysis and theorem prover preprocessing, demonstrating both practical applicability and theoretical advancement in constrained rewriting.

Automated DetectionRewriting Rule SystemsTermination Verification

Automated Strategy Invention for Confluence of Term Rewrite Systems

Nov 10, 2024
LZ
Liao Zhang
🏛️ University of Innsbruck | Czech Technical University in Prague | University of Melbourne

Automated confluence checking for term rewriting systems (TRSs) remains challenging due to the difficulty of automatically verifying confluence and the limitations of manually designed proof strategies. Method: This paper introduces the first machine learning–driven framework for automatic proof strategy invention. It pioneers the integration of reinforcement learning with symbolic reasoning, incorporating the CSI solver to autonomously explore and optimize within the strategy space. Additionally, it constructs the first large-scale, randomly generated benchmark dataset for TRS confluence evaluation. Contribution/Results: The framework breaks from traditional hand-crafted strategy paradigms by enabling end-to-end automatic strategy synthesis. It consistently outperforms state-of-the-art manual strategies on both the Cops benchmark and the new dataset, successfully resolving multiple long-standing TRS confluence problems previously unsolved by automated tools. This work establishes a novel paradigm for automation in formal verification and automated reasoning.

Automating strategy invention for term rewrite systemsEnhancing automatic confluence prover CSI's performanceImproving confluence proofs using machine learning

Rewriting Structured Cospans

Jun 13, 2019
DC
Daniel Cicala
🏛️ University of California, Riverside

Compositional systems lack a structured, rewriteable mathematical foundation. Method: This work proposes a category-theoretic rewriting framework wherein structured cospans serve as the fundamental syntactic units; it introduces, for the first time, the coupling of structured cospans with double-pushout (DPO) rewriting, yielding a unified theory supporting both traced and trace-free semantics. The framework enables inductive, structure-preserving decomposition of closed systems and establishes a sound correspondence between syntax (structured cospans) and semantics (DPO rewriting). Contribution/Results: It provides the first categorical integration of structured cospans with DPO rewriting; defines two distinct rewriting paradigms—traceable and trace-free; and delivers the first mathematically rigorous, compositional, and rewriteable foundation for systems science, enabling cross-disciplinary modeling and formal analysis of complex systems.

arXiv.org

Confluence of Conditional Rewriting Modulo

Apr 02, 2025
SL
Salvador Lucas
🏛️ Universitat Polit`ecnica de Val`encia

This paper addresses the decidability problem of confluence modulo an equational theory (E) (i.e., (E)-confluence) for conditional rewrite systems. To overcome the fundamental limitation of traditional approaches—which rely on enumerating infinitely many (E)-unifiers and thus fail to finitely characterize local peaks—we introduce *logical conditional critical pairs* and *parameterized conditional variable pairs*, thereby reducing (E)-confluence to a finite, decidable critical-pair analysis. Building upon the Jouannaud–Kirchner abstract rewriting framework, we integrate logical constraint solving, conditional term normalization, and equational reasoning to achieve, for the first time, a finite characterization of local peaks and a fully decidable verification procedure for (E)-confluence in conditional rewriting modulo theories. The resulting theory enables the construction of a finite critical pair set that uniformly covers major classes of conditional rewrite systems, providing a rigorous foundation for formal verification and automated theorem proving.

Defines conditional pairs to prove/disprove E-confluenceIntroduces Logic-based Conditional Critical Pairs for finite analysisInvestigates confluence of conditional rewriting modulo equations

GPC: A Pattern Calculus for Property Graphs

Oct 29, 2022
NF
Nadime Francis
🏛️ U Gustave Eiffel | IRIF, U Paris Cité, CNRS | U Edinburgh | University of Bayreuth | University of Warsaw | PUC Chile | IMFD | diiP, Inria | RelationalAI | ENS

This paper addresses the lack of a rigorous theoretical foundation for graph query languages (GQL and SQL/PGQ). To this end, it introduces the first lightweight graph pattern calculus (GPC) tailored to property graphs. GPC systematically abstracts the common semantic core of pattern matching across GQL and SQL/PGQ, achieving expressive power while enabling formal verification. The authors develop a sound and complete type system alongside both operational and denotational semantics, rigorously defining syntax, typing rules, and semantics. They establish key algebraic properties—including pattern equivalence and composability—thereby ensuring mathematical robustness. GPC provides a verifiable theoretical basis for correctness proofs, query optimization, and standardized language extensions, effectively bridging a critical gap in the formal modeling of industrial-grade graph query languages.

Creating a simplified calculus for complex pattern matching featuresDeveloping theoretical foundations for practical graph query languagesProviding rigorous tools for studying industry-standard graph queries

Latest Papers

What's happening recently
View more

Traditional query rewriting rules are tightly coupled with execution engines and lack formal correctness guarantees, making them difficult to port and error-prone. This work proposes Rulescript, an engine-agnostic domain-specific language that decouples rule specification from execution through a match-and-transform two-phase mechanism and automatically verifies semantic equivalence using a relational algebra core. Rulescript supports custom operators and, combined with lightweight adapters, enables cross-engine deployment. The authors experimentally reproduce 33 Apache Calcite rewrite rules and successfully migrate them to both CockroachDB and Apache DataFusion, demonstrating the feasibility of “write once, deploy anywhere.” To the best of our knowledge, this is the first extensible, verifiable, and cross-platform query rewriting framework.

engine-agnosticformal verificationlogical query plan

This work addresses the prevailing lack of systematic understanding of foundational formal theories in current AI compiler design, which hinders rigorous evaluation of the completeness and desirability of intermediate representations and compilation abstractions. For the first time, it systematically establishes precise correspondences between core mechanisms of MLIR—such as term rewriting systems, refinement calculi, and abstract interpretation—and classical formal theories. By grounding compiler abstractions in formal semantics, the paper clarifies the theoretical underpinnings of these constructs, articulates a precise notion of “design completeness,” and provides assessable criteria and guiding principles to navigate trade-offs between engineering pragmatism and theoretical ideals.

abstraction designAI model compilationcompiler infrastructure

This study addresses the challenge of efficiently compiling general rewrite rules with arbitrary regular-language context constraints into finite-state transducers, particularly in the presence of overlapping matches and complex contextual dependencies. The work proposes a compact compilation method based on a “worsening trick”: it first generates all valid rewrite candidates and then filters out suboptimal ones that admit better alternatives. This approach uniformly supports multiple contexts, arbitrary transformations, flag diacritics, directional rewriting, weighted rules, and parallel application. Formulated within a concise formal framework, the method reproduces classical results under semantic equivalence while significantly improving scalability and implementation simplicity. Experimental evaluation demonstrates that the generated transducers are functionally equivalent to those produced by foma across extensive grammatical and regression test suites, differing only in state numbering, thereby confirming both correctness and practical utility.

compilationcontext constraintsfinite-state transducers

TermCOMP currently lacks a standardized competition category supporting Nipkow’s higher-order rewriting systems (HRS), hindering fair comparisons among relevant tools. This work proposes a syntactically concise subclass of HRS benchmarks and formally establishes that, within this subclass, the standard semantics of HRS coincides with the beta-first reduction strategy employed in TermCOMP’s higher-order category. By proving this semantic equivalence, the study provides the first rigorous theoretical foundation for introducing an HRS subcategory into TermCOMP, thereby ensuring semantic consistency between the two frameworks over this specific subset. This advancement enables broader participation of HRS-compatible tools in unified benchmarking evaluations under TermCOMP.

benchmarkhigher-order rewritingHRS

Hot Scholars

YA

Yanhong A. Liu

Stony Brook University, State University of New York
Languages and AlgorithmsDesign and Optimization
ME

Murray Elder

Professor, University of Technology Sydney
Geometric group theoryautomata and language theorycomplexity theoryenumerative combinatorics
JW

Junjie Wu

Center for High Pressure Science & Technology Advanced Research
Physics
JO

Jan Otop

University of Wrocław
logic and automata