From cb772cc2c03f41747169d9fbc2b1fa503104df43 Mon Sep 17 00:00:00 2001
From: "Hsieh, Chiao" <chsieh16@illinois.edu>
Date: Thu, 1 Sep 2022 22:49:02 -0500
Subject: [PATCH] Remove spurious cex validation

---
 dtree_synth.py               | 2 +-
 dtree_teacher_gem_stanley.py | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dtree_synth.py b/dtree_synth.py
index ad916d3..4605108 100755
--- a/dtree_synth.py
+++ b/dtree_synth.py
@@ -91,7 +91,7 @@ def synth_dtree(learner: Learner, teacher: Teacher, num_max_iterations: int = 10
             assert len(negative_examples) > 0
             print(f"negative examples: {negative_examples}")
 
-            assert validate_cexs(teacher.state_dim, teacher.perc_dim, candidate, negative_examples)
+            # assert validate_cexs(teacher.state_dim, teacher.perc_dim, candidate, negative_examples)
 
             learner.add_negative_examples(*negative_examples)
             continue
diff --git a/dtree_teacher_gem_stanley.py b/dtree_teacher_gem_stanley.py
index 212f123..934a774 100644
--- a/dtree_teacher_gem_stanley.py
+++ b/dtree_teacher_gem_stanley.py
@@ -72,7 +72,7 @@ class DTreeGEMStanleyGurobiTeacher(GEMStanleyGurobiTeacher):
                 else:  # !(lhs <= rhs) <=> (lhs > rhs) => lhs >= rhs + ð
                     cons = (lhs >= rhs + self.PRECISION)
             else:
-                raise RuntimeError(f"Unsupprted atomic predicate expression {pred}")
+                raise RuntimeError(f"Unsupported atomic predicate expression {pred}")
 
             gp_cons = self._gp_model.addConstr(cons)
             self._prev_candidate_constr.append(gp_cons)
@@ -138,7 +138,8 @@ class DTreeGEMStanleyGurobiTeacher(GEMStanleyGurobiTeacher):
                 if filtered_cex_list:
                     self._cexs.extend(filtered_cex_list)
                 else:
-                    raise RuntimeError(f"Only found spurious cexs {cex_list} for the conjuct {conjunct}.")
+                    # raise RuntimeError(f"Only found spurious cexs {cex_list} for the conjuct {conjunct}.")
+                    pass
 
             elif self._gp_model.status == gp.GRB.INFEASIBLE:
                 continue
-- 
GitLab