use crate::descriptor::SubjectRoute;
use crate::muterprater::{AlternativeId, MutationIdentity};
use crate::report::InvocationProfile;
use crate::runner::Selection;
#[path = "type_guard.rs"]
mod guard;
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct DiffPath(String);
#[must_use = "a refusal is the reason a diff path was not read"]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum DiffPathRefusal {
EmptyPath,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum ScopeShape {
SeamScoped {
route: SubjectRoute,
},
RepoWide,
DiffScoped {
touched: Vec<DiffPath>,
},
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct PressureBudget {
mutants: u32,
invocation: InvocationProfile,
}
#[must_use = "a refusal is the reason a budget was not declared"]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum BudgetRefusal {
ZeroMutants,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct ScopedInvocation {
scope: ScopeShape,
budget: PressureBudget,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum PressureLane {
CompiledMutation,
InterpretedMutation,
Fuzz,
Chaos,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum PlannedDamage {
BackendChosen,
Alternative(AlternativeId),
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct PlannedRun {
lane: PressureLane,
target: MutationIdentity,
damage: PlannedDamage,
selection: Selection,
budget: PressureBudget,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ProofPlan {
scope: ScopedInvocation,
runs: Vec<PlannedRun>,
}
#[must_use = "a refusal is the reason a proof plan was not built"]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum PlanRefusal {
NoRunPlanned,
BudgetOverspent {
admitted: u32,
planned: usize,
},
}