MCPcopy Create free account
hub / github.com/evalplus/evalplus / generate

Method generate

evalplus/gen/mut_gen.py:21–30  ·  view source on GitHub ↗
(self, num: int)

Source from the content-addressed store, hash-verified

19 pass
20
21 def generate(self, num: int) -> List[Any]:
22 while len(self.new_inputs) < num:
23 seed = self.seed_selection()
24 new_input = self.mutate(seed)
25 if hash(str(new_input)) not in self.seed_hash:
26 if trusted_check_exec(self.contract, [new_input], self.entry_point):
27 self.seed_pool.append(new_input)
28 self.seed_hash.add(hash(str(new_input)))
29 self.new_inputs.append(new_input)
30 return self.new_inputs[:num]

Callers

nothing calls this directly

Calls 3

seed_selectionMethod · 0.95
mutateMethod · 0.95
trusted_check_execFunction · 0.90

Tested by

no test coverage detected