Throw logic exception for equality between regular expressions (#4505)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Thu, 21 May 2020 03:27:04 +0000 (22:27 -0500)
committerGitHub <noreply@github.com>
Thu, 21 May 2020 03:27:04 +0000 (22:27 -0500)
Fixes #4503.

src/theory/strings/term_registry.cpp

index 3d898b40b9879e45e9755df325ef1d2aa015ddcb..ec034b0c9964d4d7ae98849dced719f793a1481e 100644 (file)
@@ -88,6 +88,12 @@ void TermRegistry::preRegisterTerm(TNode n)
   }
   if (k == EQUAL)
   {
+    if (n[0].getType().isRegExp())
+    {
+      std::stringstream ss;
+      ss << "Equality between regular expressions is not supported";
+      throw LogicException(ss.str());
+    }
     d_ee.addTriggerEquality(n);
     return;
   }