Example #1
0
    def restart_bunched_generator(self):
        # Book keeping
        if self.bunch_generator is not None:
            self.current_largest_term_size = max(
                self.current_largest_term_size,
                self.bunch_generator.current_object_size)

        # HACK HACK HACK: BunchGenerator bunch_size should be initialized properly.
        # If bunch_size is larger than the number of point_distinct predicates, it goes into an infinite loop
        #
        # print("restarting bunched_gen: {}".format(self.term_generator))
        self.bunch_generator = enumerators.BunchedGenerator(
            self.term_generator,
            # self.max_term_size, len(self.points) * 2)
            self.max_term_size,
            1)

        if self.stat_model is not None:
            self.bunch_generator_state = self.stat_model.generate(
                self.term_generator.factory._compute_signature, self.points)
        else:
            self.bunch_generator_state = self.bunch_generator.generate()
            # print("AAAA::::{}".format(self.bunch_generator_state))
        # clearning up for collecting data at next cegis iter
        if self.stat_model is not None:
            self.stat_model.clear_data()
Example #2
0
    def restart_bunched_generator(self):
        # Book keeping
        if self.bunch_generator is not None:
            self.current_largest_term_size = max(
                self.current_largest_term_size,
                self.bunch_generator.current_object_size)

        # HACK HACK HACK: BunchGenerator bunch_size should be initialized properly.
        # If bunch_size is larger than the number of point_distinct predicates, it goes into an infinite loop
        #
        self.bunch_generator = enumerators.BunchedGenerator(
            self.term_generator,
            # self.max_term_size, len(self.points) * 2)
            self.max_term_size,
            1)
        self.bunch_generator_state = self.bunch_generator.generate()