Skip to main content

StructuralConfig

Struct StructuralConfig 

Source
pub struct StructuralConfig {
    pub min_clone_tokens: u32,
    pub candidate: CandidateConfig,
    pub near_match: NearMatchConfig,
    pub control_flow: ControlFlowConfig,
    pub maximal: MaximalConfig,
    pub literals: LiteralNorm,
    pub verify: VerifyConfig,
    pub verification_budget: usize,
    pub max_shape_divergence: f64,
    pub grouping: GroupingConfig,
    pub siblings: SiblingConfig,
}
Expand description

Tuning for a whole structural run: one config per stage.

Fields§

§min_clone_tokens: u32

Smallest whole-unit or statement-run clone length, in parsed tokens, that the structural pipeline reports.

Candidate extraction can still see shorter code so its other funnel counters describe the full search space. Short candidates leave before precise verification and are accounted for in StructuralStats.

§candidate: CandidateConfig

Exact-seed candidate extraction.

§near_match: NearMatchConfig

MinHash/LSH near-match extraction.

§control_flow: ControlFlowConfig

Control-flow skeleton extraction.

§maximal: MaximalConfig

Folding seed matches into maximal shared runs.

§literals: LiteralNorm

Literal strategy the duplicated runs are confirmed under: it decides whether two runs differing only in literal values are the same run.

§verify: VerifyConfig

Precise verification.

§verification_budget: usize

Upper bound on distinct unit pairs passed to precise verification.

Pairs are ordered canonically before this budget is spent, so lowering it changes coverage deterministically and is reported in the funnel.

§max_shape_divergence: f64

How far apart two units’ shape mixes may be and still be worth verifying; see shape_divergence.

§grouping: GroupingConfig

Medoid grouping.

§siblings: SiblingConfig

Bounded post-grouping search for incomplete copies beside an established group. This never changes primary group membership.

Trait Implementations§

Source§

impl Clone for StructuralConfig

Source§

fn clone(&self) -> StructuralConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StructuralConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StructuralConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for StructuralConfig

Source§

fn eq(&self, other: &StructuralConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for StructuralConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.