Scythe: Semantic-Aware Rewriting for Fast,Effective Program Reduction
Ioanna Moraiti, Charalambos Mitropoulos, Artem Anchikov, Sotirios Ioannidis, Dimitris Mitropoulos, Thodoris Sotiropoulos
Abstract
Automated program reduction shrinks a program into a smaller one that preserves a property of interest. Language-agnostic grammar-based reducers are easy to retarget across languages, but because they reason only about syntax, they cannot perform the coupled edits needed to remove whole declarations, e.g., a method cannot be deleted while it is still called. As a result, they waste oracle calls on edits that cannot succeed and often leave irrelevant declarations behind. We present SCYTHE, a fast, semantic-aware pre-processing step that runs in front of any grammar-based reducer without modifying it. SCYTHE encodes the program as a typed declaration dependency graph and applies a set of semantic-aware operators that decouple declarations from their use sites, making them removable while keeping the program well-typed. Fine-grained token-level minimization is then left to the downstream reducer. On 73 benchmarks across C, Java, and Solidity, combining SCYTHE with PERSES never yields a larger result than PERSES alone, and a strictly smaller one on 70 of 73 cases. On average, the combination produces programs 55.6% smaller (up to 95.5%) and is 2.3 faster (up to 7.4). SCYTHE also boosts LATRA, a reducer that, unlike the purely syntactic PERSES, also applies language-specific transformations: the combination produces programs 10.6% smaller (up to 61.8%) and is 2.4 faster on average. Video: https://youtu.be/uEq_YYU0zZw
Create a lesson
Related papers
Construction Contracts for Generated Embedded Domain-Specific Language Programs: A Measurement Protocol and a Conditional Effect
Shared title terminologycs.SEHaowen Guo, Yangzhao Huang
Generating Property-Based Regression Tests from Source Code Semantics
Shared title terminologycs.SEClemens Bauer, Johann Glock, Martin Pinzger
Interrupt-Aware Static Detection of Deadlocks in Rust Operating Systems
Shared title terminologycs.SEYuzhi Li, Hongliang Tian, Chengjun Chen et al.
Context-Aware Proactive Self-Adaptation: A Two-Layer Model Predictive Control Approach
Shared title terminologycs.SEZhengyin Chen, Jialong Li, Nianyu Li et al.
Admitted Is Not Effective: Lessons from a Notary-Gated Retrospective Loop in an Agentic Pipeline
Shared title terminologycs.SELo Gullstrand Heander, Emma Söderberg, Christofer Rydenfält
Jailbreaks Are Global or Regional? A Controlled Study of Scale and Geolocation Effects on LLM Safety Verification
Shared title terminologycs.SEAnidipta Pal