summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2021-06-01 21:53:42 -0700
committerAndres Noetzli <andres.noetzli@gmail.com>2021-06-01 21:53:42 -0700
commit5f827e53d2dcd80a3cc679454de0b40108f01d93 (patch)
treef23de42aaa12d77e9ee7c5629f6efafa284624c9
parent245d3383c2f463b07987f2758af28871fe753de9 (diff)
Remove option to ignore negative memberships
Fixes #6661. The option `--strings-inm` could be used to ignore negative membership constraints. However, this option made the string solver model-unsound or produced incorrect models if the user provided a benchmark that actually contained negative membership constraints. The solver did not check for negative membership constraints and did not warn the user about them. Because the option is not really being used, this commit removes it.
-rw-r--r--src/options/strings_options.toml8
-rw-r--r--src/theory/strings/regexp_solver.cpp6
-rw-r--r--test/regress/regress1/strings/regexp002.smt24
3 files changed, 1 insertions, 17 deletions
diff --git a/src/options/strings_options.toml b/src/options/strings_options.toml
index 958136494..8ee25c265 100644
--- a/src/options/strings_options.toml
+++ b/src/options/strings_options.toml
@@ -26,14 +26,6 @@ name = "Strings Theory"
help = "strings eager check"
[[option]]
- name = "stringIgnNegMembership"
- category = "regular"
- long = "strings-inm"
- type = "bool"
- default = "false"
- help = "internal for strings: ignore negative membership constraints (fragment checking is needed, left to users for now)"
-
-[[option]]
name = "stringLazyPreproc"
category = "regular"
long = "strings-lazy-pp"
diff --git a/src/theory/strings/regexp_solver.cpp b/src/theory/strings/regexp_solver.cpp
index 164e4e1c0..18815c731 100644
--- a/src/theory/strings/regexp_solver.cpp
+++ b/src/theory/strings/regexp_solver.cpp
@@ -125,11 +125,7 @@ void RegExpSolver::check(const std::map<Node, std::vector<Node> >& mems)
{
for (const Node& m : mr.second)
{
- bool polarity = m.getKind() != NOT;
- if (polarity || !options::stringIgnNegMembership())
- {
- allMems[m] = mr.first;
- }
+ allMems[m] = mr.first;
}
}
diff --git a/test/regress/regress1/strings/regexp002.smt2 b/test/regress/regress1/strings/regexp002.smt2
index 35501ac10..7bb4e8aca 100644
--- a/test/regress/regress1/strings/regexp002.smt2
+++ b/test/regress/regress1/strings/regexp002.smt2
@@ -2,10 +2,6 @@
(set-logic QF_S)
(set-info :status sat)
(set-option :strings-exp true)
-; this option requires user to check whether the constraint is in the fragment
-; currently we do not provide only positive membership constraint checking
-; if users use this option but the constraint is not in this fragment, the result will fail
-(set-option :strings-inm true)
(declare-fun x () String)
(declare-fun y () String)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback