MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / update_seed_unique_branches

Method update_seed_unique_branches

src/deopt.rs:93–102  ·  view source on GitHub ↗

Update the quality (especially the unique branches) of seeds in prompt queue according the incoming new code coverage.

(&mut self, coverage: &CodeCoverage)

Source from the content-addressed store, hash-verified

91
92 // Update the quality (especially the unique branches) of seeds in prompt queue according the incoming new code coverage.
93 pub fn update_seed_unique_branches(&mut self, coverage: &CodeCoverage) {
94 log::debug!("Update prompt queue according the incoming code coverage");
95 let coming_branches = Observer::get_program_branches(coverage, self);
96 for seed in self.seed_queue.iter_mut() {
97 seed.update_unique_branches(&coming_branches);
98 }
99 for seed in self.seed_queue.iter() {
100 self.save_program(seed).unwrap();
101 }
102 }
103
104 /// get current working directory of this crate.
105 pub fn get_crate_dir() -> Result<&'static str> {

Callers 2

update_seed_queueMethod · 0.80
test_update_prompt_queueFunction · 0.80

Calls 2

save_programMethod · 0.80

Tested by 1

test_update_prompt_queueFunction · 0.64