summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2019-04-05 15:31:20 -0500
committerGitHub <noreply@github.com>2019-04-05 15:31:20 -0500
commit880f0b719479ff9f9b415749b2ccf9016274a99d (patch)
tree0dedb4e4d7cd427885a681259237b5ef3a8e2662 /src/theory/quantifiers
parentafc70ac962185b97e10f4e796f46c638ed1e18ab (diff)
Fix another corner case of datatypes+PBE (#2938)
Diffstat (limited to 'src/theory/quantifiers')
-rw-r--r--src/theory/quantifiers/sygus/sygus_unif_io.cpp31
-rw-r--r--src/theory/quantifiers/sygus/sygus_unif_io.h19
2 files changed, 34 insertions, 16 deletions
diff --git a/src/theory/quantifiers/sygus/sygus_unif_io.cpp b/src/theory/quantifiers/sygus/sygus_unif_io.cpp
index 7d51ec43a..207aa4c8e 100644
--- a/src/theory/quantifiers/sygus/sygus_unif_io.cpp
+++ b/src/theory/quantifiers/sygus/sygus_unif_io.cpp
@@ -458,25 +458,26 @@ void SubsumeTrie::getLeavesInternal(const std::vector<Node>& vals,
{
int new_status = status;
bool success = true;
- // if the current value is true, we must consider the value of this child
+ // If the current value is true, then this is a relevant point.
+ // We must consider the value of this child.
if (curr_val_true)
{
- if (status != 0)
+ if (it->first.isNull())
{
- if (it->first.isNull())
- {
- // The value of this child is unknown on this point, hence we
- // ignore it.
- success = false;
- }
- else
+ // The value of this child is unknown on this point, hence we
+ // do not recurse
+ success = false;
+ }
+ else if (status != 0)
+ {
+ // if the status is not zero (indicating that we have a mix of T/F),
+ // then we must compute the new status.
+ Assert(it->first.getType().isBoolean());
+ Assert(it->first.isConst());
+ new_status = (it->first.getConst<bool>() ? 1 : -1);
+ if (status != -2 && new_status != status)
{
- Assert(it->first.getType().isBoolean());
- new_status = (it->first.getConst<bool>() ? 1 : -1);
- if (status != -2 && new_status != status)
- {
- new_status = 0;
- }
+ new_status = 0;
}
}
}
diff --git a/src/theory/quantifiers/sygus/sygus_unif_io.h b/src/theory/quantifiers/sygus/sygus_unif_io.h
index 5d38ba827..fced29871 100644
--- a/src/theory/quantifiers/sygus/sygus_unif_io.h
+++ b/src/theory/quantifiers/sygus/sygus_unif_io.h
@@ -218,7 +218,24 @@ class SubsumeTrie
int status,
bool checkExistsOnly,
bool checkSubsume);
- /** helper function for above functions */
+ /** helper function for above functions
+ *
+ * This adds to v[-1], v[0], v[1] the children of the trie that occur
+ * along paths that contain only false (v[-1]), a mix of true/false (v[0]),
+ * and only true (v[1]) values for respectively for relevant points.
+ *
+ * vals/pol is used to determine the relevant points, which impacts which
+ * paths of the trie to traverse on this call.
+ * In particular, all points such that (pol ? vals[index] : !vals[index])
+ * are relevant.
+ *
+ * Paths that contain an unknown value for any relevant point are not
+ * traversed. In the larger picture, this ensures that terms are not used in a
+ * way such that their unknown value is relevant to the overall behavior of
+ * a synthesis solution.
+ *
+ * status holds the current value of v (0,1,-1) that we will be adding to.
+ */
void getLeavesInternal(const std::vector<Node>& vals,
bool pol,
std::map<int, std::vector<Node>>& v,
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback