Beispiel #1
0
 def perf(self, prog_t, prog_r):
     prog_t_text = LangUtil.dicts_to_text(prog_t)
     prog_r_text = LangUtil.dicts_to_text(prog_r)
     running_time_diff = self.analyzer.find_running_time(prog_r_text)\
                         - self.analyzer.find_running_time(prog_t_text)
     collision_penalty = self.collisions(
         prog_r_text) * self.COLLISION_PENALTY
     return running_time_diff + collision_penalty
Beispiel #2
0
 def eq(self, prog_t, prog_r):
     prog_t_text = LangUtil.dicts_to_text(prog_t)
     prog_r_text = LangUtil.dicts_to_text(prog_r)
     return self.analyzer.check_equivalent_nosmt(prog_t_text, prog_r_text)
Beispiel #3
0
 def curr_rewrite(self):
     return LangUtil.dicts_to_text(self.prog_rp)