Skip to main content

Crate airl_patch

Crate airl_patch 

Source
Expand description

AIRL Patch Engine - Semantic patch operations on IR graphs.

Provides the core editing interface for AI agents: instead of rewriting entire modules, agents produce small semantic patches that are validated, applied, and can be inverted.

§Key property

Every patch can be inverted exactly:

apply(inverse(p), apply(p, module)) == module

This is verified by property tests.

§Modules

  • opsPatch and PatchOp type definitions
  • apply — forward application of patches
  • inverse — compute undo patches before applying
  • validate — structural checks before application
  • traverse — IR tree walking helpers
  • impact — analysis of which functions a patch affects

Re-exports§

pub use apply::apply_patch;
pub use apply::PatchResult;
pub use impact::Impact;
pub use inverse::invert_patch;
pub use ops::Patch;
pub use ops::PatchOp;
pub use validate::validate_patch;

Modules§

apply
Patch application: transform a Module by applying a Patch.
impact
Impact analysis: determine which parts of a module are affected by a patch.
inverse
Patch inversion: generate an undo patch for any applied patch.
ops
Patch operation types and patch bundle structure.
traverse
Tree traversal utilities for AIRL IR nodes.
validate
Patch validation: verify a patch can be safely applied.

Enums§

PatchError
Errors that can occur during patch operations.