pub struct CorpusEntry {
pub code: GeneratedCode,
pub coverage: CoverageMap,
pub energy: f64,
pub selection_count: usize,
pub ast: Option<PythonNode>,
}Expand description
Entry in the corpus of interesting inputs
Fields§
§code: GeneratedCodeThe generated code
coverage: CoverageMapCoverage achieved by this input
energy: f64Energy score (selection probability weight)
selection_count: usizeNumber of times this entry has been selected
ast: Option<PythonNode>AST representation for mutation
Implementations§
Source§impl CorpusEntry
impl CorpusEntry
Sourcepub fn new(code: GeneratedCode, coverage: CoverageMap) -> Self
pub fn new(code: GeneratedCode, coverage: CoverageMap) -> Self
Create a new corpus entry
Sourcepub fn with_ast(
code: GeneratedCode,
coverage: CoverageMap,
ast: PythonNode,
) -> Self
pub fn with_ast( code: GeneratedCode, coverage: CoverageMap, ast: PythonNode, ) -> Self
Create a corpus entry with AST
Sourcepub fn update_energy(&mut self, global_coverage: &CoverageMap)
pub fn update_energy(&mut self, global_coverage: &CoverageMap)
Update energy based on coverage potential
Trait Implementations§
Source§impl Clone for CorpusEntry
impl Clone for CorpusEntry
Source§fn clone(&self) -> CorpusEntry
fn clone(&self) -> CorpusEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CorpusEntry
impl RefUnwindSafe for CorpusEntry
impl Send for CorpusEntry
impl Sync for CorpusEntry
impl Unpin for CorpusEntry
impl UnsafeUnpin for CorpusEntry
impl UnwindSafe for CorpusEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more