__init__.py
 1  import copy
 2  from typing import Any, List
 3  
 4  
 5  class BaseGen(object):
 6      def __init__(self, inputs: List[Any], entry_point: str, contract: str):
 7          """Initializing a input mutator.
 8  
 9          Args:
10              inputs (List[Any]): The set of initial inputs (i.e., seeds)
11              entry_point (str): The function name to invoke with the input
12              contract (str): The contract to verify input validity
13          """
14          self.contract = contract
15          self.entry_point = entry_point
16          self.seed_pool: List[Any] = copy.deepcopy(inputs)
17          self.new_inputs = []
18          self.seed_hash = set([hash(str(x)) for x in self.seed_pool])
19  
20      def generate(self, num: int) -> List[Any]:
21          raise NotImplementedError