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

Method save_program

src/deopt.rs:530–540  ·  view source on GitHub ↗

Save the seed programs into disk.

(&self, program: &Program)

Source from the content-addressed store, hash-verified

528
529 // Save the seed programs into disk.
530 pub fn save_program(&self, program: &Program) -> Result<PathBuf> {
531 let seed_path = self.get_seed_path_by_id(program.id)?;
532 let content = [
533 utils::format_library_header_strings(self).to_string(),
534 program.serialize(),
535 ]
536 .concat();
537 std::fs::write(&seed_path, content)?;
538 remove_duplicate_definition(&seed_path)?;
539 Ok(seed_path)
540 }
541
542 pub fn save_succ_program(&self, program: &Program) -> Result<PathBuf> {
543 let seed_path = self.get_succ_seed_path_by_id(program.id)?;

Callers 6

select_seed_excludeMethod · 0.80
update_seed_queueMethod · 0.80
test_update_prompt_queueFunction · 0.80

Calls 4

get_seed_path_by_idMethod · 0.80
serializeMethod · 0.45

Tested by 1

test_update_prompt_queueFunction · 0.64