Expand description
§panproto-mig
Migration engine for panproto.
This crate computes and applies schema migrations, transforming instances from one schema version to another while preserving data integrity through theory morphisms.
The migration pipeline consists of:
-
Existence checking (
check_existence): Theory-derived validation that a migration is well-formed. The conditions checked depend on the protocol’s schema and instance theories. -
Compilation (
compile()): Pre-computes surviving vertex/edge sets and remapping tables for fast per-record application. -
Lifting (
lift_wtype,lift_functor): Applies a compiled migration to concrete instances, delegating topanproto-inst’s restrict operations. -
Composition (
compose()): Composes two sequential migrations into a single equivalent migration. -
Inversion (
invert()): Checks if a migration is invertible (bijective) and constructs the inverse if so.
Re-exports§
pub use cascade::induce_data_migration;pub use cascade::induce_migration_from_theory;pub use cascade::induce_schema_morphism;pub use chase::Atom;pub use chase::AtomTerm;pub use chase::ChaseBudget;pub use chase::ChaseError;pub use chase::ChaseOutcome;pub use chase::Dependency;pub use chase::EmbeddedDependency;pub use chase::chase;pub use chase::dependencies_from_schema;pub use chase::dependencies_from_theory;pub use chase::saturate_row_existence;pub use chase::term_dependencies_from_theory;pub use compile::compile;pub use compose::compose;pub use compose::ComposeReport;pub use compose::OnMissing;pub use compose::RelabelComposition;pub use compose::compose_relabeling;pub use compose::compose_with_report;pub use coverage::CoverageReport;pub use coverage::PartialFailure;pub use coverage::PartialReason;pub use coverage::check_coverage;pub use error::ComposeError;pub use error::ExistenceError;pub use error::InvertError;pub use error::LiftError;pub use error::MigError;pub use error::SpanError;pub use existence::ExistenceReport;pub use existence::check_existence;pub use hom_search::DomainConstraints;pub use hom_search::FoundMorphism;pub use hom_search::MorphismList;pub use hom_search::SearchOptions;pub use hom_search::find_best_morphism;pub use hom_search::find_best_morphism_budgeted;pub use hom_search::find_best_morphism_constrained;pub use hom_search::find_morphisms;pub use hom_search::find_morphisms_budgeted;pub use hom_search::find_morphisms_constrained;pub use hom_search::find_span;pub use hom_search::find_span_constrained;pub use hom_search::without_bottom;pub use invert::invert;pub use lift::lift_functor;pub use lift::lift_functor_pi;pub use lift::lift_functor_sigma;pub use lift::lift_wtype;pub use lift::lift_wtype_pi;pub use lift::lift_wtype_sigma;pub use migration::COERCION_INPUT;pub use migration::Migration;pub use migration::compose_coercions;pub use migration::invert_coercion;pub use overlap::discover_overlap;pub use schema_theory::check_migration_morphism;pub use schema_theory::induced_theory_morphism;pub use schema_theory::schema_to_theory;pub use align::AliasDict;pub use align::Anchor;pub use align::StrategyTag;pub use align::alias_anchors;pub use align::default_alias_dict;pub use align::exact_anchors;pub use align::token_anchors;pub use align::token_similarity;pub use align::token_similarity;pub use span::DEFAULT_OPTIMA_CAP;pub use span::EdgeImages;pub use span::LegShape;pub use span::SchemaSpan;pub use span::SpanCertificate;pub use span::SpanSearch;pub use solve::build::BuildError;pub use solve::build::Evidence;pub use solve::build::NoEvidence;pub use solve::cfn::Cfn;pub use solve::cfn::CfnBuilder;pub use solve::cfn::CfnError;pub use solve::cfn::CostFunction;pub use solve::cfn::Domain;pub use solve::cfn::DomainIter;pub use solve::cfn::Domains;pub use solve::cfn::Variable;pub use solve::cost::COST_SCALE;pub use solve::cost::Cost;pub use solve::cost::CostWeights;pub use solve::cost::CostWeightsError;pub use solve::cost::DEFAULT_WEIGHTS;pub use solve::cost::DROP_UNIT;pub use solve::cost::MAX_COVERAGE_RADIX;pub use solve::cost::coverage_radix;pub use solve::cost::quality_units;pub use solve::Assignment;pub use solve::IsoError;pub use solve::LimitKind;pub use solve::SearchBudget;pub use solve::SearchWarning;pub use solve::SolveOutcome;pub use solve::SolverPath;pub use solve::ValId;pub use solve::VarId;pub use coerce::SortLensWitness;pub use coerce::WitnessLibrary;pub use coerce::default_witness_library;pub use coerce::witness_forward_fails_on;pub use coerce::witness_satisfies_lens_laws;
Modules§
- align
- Protocol-agnostic alignment strategies for auto-lens generation.
- cascade
- The morphism tower: Theory → Schema → Instance.
- chase
- The chase for functor instances.
- coerce
- Sort coercion via witness lenses.
- compile
- Migration compilation for fast per-record application.
- compose
- Schema-level and data-level migration composition.
- coverage
- Coverage analysis for partial migrations.
- error
- Error types for migration operations.
- existence
- Existence checking gated by the well-known-sort convention.
- hom_
search - The public face of the schema morphism search.
- invert
- Invertibility check and inverse construction.
- lift
- Lift operations: applying compiled migrations to instances.
- migration
- Migration specification type.
- overlap
- Automatic overlap discovery between two schemas.
- quality
- The reference quality score, kept unchanged so the decomposition can be checked against it.
- schema_
theory - The GAT theory a schema induces, and the theory morphism a migration induces between two such theories.
- solve
- The schema morphism search, posed as a cost function network.
- span
- The span the schema morphism search returns, and the obligations it carries.