summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/sygus/term_database_sygus.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-05-24 17:28:59 -0500
committerHaniel Barbosa <hanielbbarbosa@gmail.com>2018-05-24 17:28:59 -0500
commitce4493598547a9ef013b7bb8d554c83bae478b1b (patch)
tree17d2eed4d6be1b8162dd095de3dc53bc8f9bef0e /src/theory/quantifiers/sygus/term_database_sygus.cpp
parent83b4e2ba719ddc410c125a7ef7ff49f39dc2a599 (diff)
Improve simple constant symmetry breaking for sygus (#1977)
Diffstat (limited to 'src/theory/quantifiers/sygus/term_database_sygus.cpp')
-rw-r--r--src/theory/quantifiers/sygus/term_database_sygus.cpp34
1 files changed, 20 insertions, 14 deletions
diff --git a/src/theory/quantifiers/sygus/term_database_sygus.cpp b/src/theory/quantifiers/sygus/term_database_sygus.cpp
index 121ee34f7..cd6c8bdec 100644
--- a/src/theory/quantifiers/sygus/term_database_sygus.cpp
+++ b/src/theory/quantifiers/sygus/term_database_sygus.cpp
@@ -881,37 +881,43 @@ bool TermDbSygus::isEnumerator(Node e) const
return d_enum_to_conjecture.find(e) != d_enum_to_conjecture.end();
}
-CegConjecture* TermDbSygus::getConjectureForEnumerator(Node e)
+CegConjecture* TermDbSygus::getConjectureForEnumerator(Node e) const
{
- std::map<Node, CegConjecture*>::iterator itm = d_enum_to_conjecture.find(e);
+ std::map<Node, CegConjecture*>::const_iterator itm =
+ d_enum_to_conjecture.find(e);
if (itm != d_enum_to_conjecture.end()) {
return itm->second;
- }else{
- return NULL;
}
+ return nullptr;
}
-Node TermDbSygus::getSynthFunForEnumerator(Node e)
+Node TermDbSygus::getSynthFunForEnumerator(Node e) const
{
- std::map<Node, Node>::iterator itsf = d_enum_to_synth_fun.find(e);
+ std::map<Node, Node>::const_iterator itsf = d_enum_to_synth_fun.find(e);
if (itsf != d_enum_to_synth_fun.end())
{
return itsf->second;
}
- else
- {
- return Node::null();
- }
+ return Node::null();
}
-Node TermDbSygus::getActiveGuardForEnumerator(Node e)
+Node TermDbSygus::getActiveGuardForEnumerator(Node e) const
{
- std::map<Node, Node>::iterator itag = d_enum_to_active_guard.find(e);
+ std::map<Node, Node>::const_iterator itag = d_enum_to_active_guard.find(e);
if (itag != d_enum_to_active_guard.end()) {
return itag->second;
- }else{
- return Node::null();
}
+ return Node::null();
+}
+
+bool TermDbSygus::usingSymbolicConsForEnumerator(Node e) const
+{
+ std::map<Node, bool>::const_iterator itus = d_enum_to_using_sym_cons.find(e);
+ if (itus != d_enum_to_using_sym_cons.end())
+ {
+ return itus->second;
+ }
+ return false;
}
void TermDbSygus::getEnumerators(std::vector<Node>& mts)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback