def _solve(self): z3_solution = cast_all_objects(self._solver.model()) #import pprint; pprint.pprint(z3_solution) self._solver.add( self._context.evaluate(self._as_constraint(z3_solution))) return self._extract_from(z3_solution)
def _find_atomic_changes(self): z3_solution = cast_all_objects(self._solver.model()) if not self._context.has_reference: self._context.mark_as_reference(z3_solution) self._solver.pop() self._solver.add( self._context.evaluate(self._as_constraint(z3_solution))) self._solver.push() self._solver.add(self._context.atomic_diff()) self._solver.push return self._extract_from(z3_solution)
def _cover(self): z3_solution = cast_all_objects(self._solver.model()) #import pprint; pprint.pprint(z3_solution) self._context.mark_as_covered(z3_solution) self._solver.pop() self._solver.push() self._solver.add(self._context.evaluate(self._as_constraint(z3_solution))) self._solver.push() self._solver.add(self._context.coverage_constraint()) self._solver.maximize(self._context.coverage_gain()) return self._extract_from(z3_solution)