Update the quality (especially the unique branches) of seeds in prompt queue according the incoming new code coverage.
(&mut self, coverage: &CodeCoverage)
| 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> { |