ryo-executor 0.1.0

[experimental] Mutation execution engine for RYO - parallel execution, conflict detection, workspace management
Documentation
//! ASTRegApply implementations for basic mutations
//!
//! These implementations enable registry-based execution for mutations
//! defined in ryo-mutations.
//!
//! # Implementation Status
//!
//! | Mutation                   | V2 Status | Notes                              |
//! |----------------------------|-----------|-------------------------------------|
//! | AddField/RemoveField       | Done      | V1/V2 equivalent                   |
//! | AddDerive/RemoveDerive     | Done      | V1/V2 equivalent                   |
//! | AddVariant/RemoveVariant   | Done      | V1/V2 equivalent                   |
//! | AddMod/RemoveMod           | Done      | V1/V2 equivalent                   |
//! | AddItem/RemoveItem         | Done      | V2 function API                    |
//! | AddMethod/RemoveMethod     | Done      | V2 function API                    |
//! | CreateMod                  | Done      | V2 function API                    |
//! | Rename                     | Done      | V1/V2 equivalent                   |
//! | ChangeVisibility           | Done      | V1/V2 equivalent                   |
//! | AddMatchArm/RemoveMatchArm | Done      | V2-only (no V1 impl)              |
//! | AddStructLiteralField/...  | Done      | V1/V2 equivalent                   |
//! | OrganizeImports            | Done      | V2 via module_items               |
//! | AssignOp                   | Done      | Idiom: a = a + b → a += b         |
//! | BoolSimplify               | Done      | Idiom: x == true → x              |
//! | ComparisonToMethod         | Done      | Idiom: s == "" → s.is_empty()     |
//! | CollapsibleIf              | Done      | Idiom: nested if → if a && b      |
//! | RedundantClosure           | Done      | Idiom: \|x\| f(x) → f              |
//! | FilterNext                 | Done      | Idiom: .filter().next() → .find() |
//! | MapUnwrapOr                | Done      | Idiom: .map().unwrap_or() → .map_or() |
//! | CloneOnCopy                | Done      | Idiom: x.clone() → x (Copy types)  |
//! | LoopToIterator             | Done      | Idiom: for loop → iterator chain   |
//! | UnwrapToQuestion           | Done      | Idiom: .unwrap() → ?               |
//! | ManualMap                  | Done      | Idiom: match Some → .map()         |
//! | MatchToIfLet               | Done      | Idiom: match → if let              |
//! | IntroduceVariable          | Done      | Recursive expr replacement         |
//! | MergeImplBlocks            | N/A       | RegistryGenerator auto-merges      |
//! | ExtractTrait/InlineTrait   | Done      | Struct inherent impl ↔ trait       |
//! | ReplaceExpr                | Done      | Recursive expr replacement         |
//! | RemoveStatement            | Done      | Pattern-based stmt removal         |
//! | InsertStatement            | Done      | Position-based stmt insertion      |
//! | ReplaceStatement           | Done      | Stmt-to-stmt replacement           |
//! | Duplicate*                 | Done      | Via AddPureItemsMutation           |
//! | AddSpec                    | N/A       | Blueprint composition              |
//! | MoveItem                   | N/A       | Blueprint composition              |
//! | PluginTransform            | N/A       | WASM runtime, out of scope         |
//!
//! # Quality Policy
//!
//! See [`super::ast_reg_apply`] for the V2 implementation quality policy.
//!
//! Key points:
//! - Each implementation must work naturally with ASTRegistry
//! - Do NOT create hacky workarounds to make tests pass
//! - If V2 cannot handle cleanly, evaluate API extensions first

mod assign_op;
mod bool_simplify;
mod clone_on_copy;
mod collapsible_if;
mod comparison_to_method;
mod const_type;
pub mod create_mod;
mod derive;
mod enum_def;
mod field;
mod filter_next;
mod function;
mod impl_block;
pub mod item;
mod map_unwrap_or;
mod match_arm;
pub mod method;
mod mod_decl;
mod organize_imports;
mod redundant_closure;
mod rename;
mod struct_def;
mod struct_literal;
mod use_stmt;
mod variant;
mod visibility;

// Tier 2 Idiom mutations
mod loop_to_iter;
mod manual_map;
mod match_to_if_let;
mod noop_arm;
mod unwrap_to_question;

// Implemented
mod default;
mod introduce_variable;
mod placeholder;
mod stmt_ops;
mod trait_ops;
mod type_ops;

// AddExplicitType / AddMissingFields / FillMatchArms ASTRegApply impls were
// removed in v0.1.0 along with their Mutation structs; type-inference
// infrastructure is required before they can be reintroduced.
// debugger and lock still use todo!() and will be addressed alongside their
// Mutation crate counterparts.
mod debugger; // DbgWrap, InsertInspect, RemoveDebugLogs
mod lock; // LockScope, UseAtomic, UseRwLock

// Common utilities
pub(crate) mod utils;

// Re-export for convenience (implementations are automatically available via trait)
pub use create_mod::create_mod_v2;
pub use item::{add_item_v2, remove_item_v2};