summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/sygus/term_database_sygus.h
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-05-21 14:09:12 -0500
committerAndres Noetzli <andres.noetzli@gmail.com>2018-05-21 22:09:12 +0300
commitcaf65a13994dc1d39cc31a8cea76c6a7fddb338c (patch)
tree2c52e2a6b9a06be048d111d267923778d9789c39 /src/theory/quantifiers/sygus/term_database_sygus.h
parentc975ef8d15438e151f94a0a7f3d1adb6ac7918dc (diff)
Refactor sygus eval unfold (#1946)
Diffstat (limited to 'src/theory/quantifiers/sygus/term_database_sygus.h')
-rw-r--r--src/theory/quantifiers/sygus/term_database_sygus.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/theory/quantifiers/sygus/term_database_sygus.h b/src/theory/quantifiers/sygus/term_database_sygus.h
index d53e436e0..9f370cd15 100644
--- a/src/theory/quantifiers/sygus/term_database_sygus.h
+++ b/src/theory/quantifiers/sygus/term_database_sygus.h
@@ -20,6 +20,7 @@
#include <unordered_set>
#include "theory/quantifiers/extended_rewrite.h"
+#include "theory/quantifiers/sygus/sygus_eval_unfold.h"
#include "theory/quantifiers/sygus/sygus_explain.h"
#include "theory/quantifiers/term_database.h"
@@ -52,6 +53,8 @@ class TermDbSygus {
SygusExplain* getExplain() { return d_syexp.get(); }
/** get the extended rewrite utility */
ExtendedRewriter* getExtRewriter() { return d_ext_rw.get(); }
+ /** evaluation unfolding utility */
+ SygusEvalUnfold* getEvalUnfold() { return d_eval_unfold.get(); }
//------------------------------end utilities
//------------------------------enumerators
@@ -210,8 +213,10 @@ class TermDbSygus {
//------------------------------utilities
/** sygus explanation */
std::unique_ptr<SygusExplain> d_syexp;
- /** sygus explanation */
+ /** extended rewriter */
std::unique_ptr<ExtendedRewriter> d_ext_rw;
+ /** evaluation function unfolding utility */
+ std::unique_ptr<SygusEvalUnfold> d_eval_unfold;
//------------------------------end utilities
//------------------------------enumerators
@@ -344,21 +349,7 @@ public: // for symmetry breaking
bool considerConst( TypeNode tn, TypeNode tnp, Node c, Kind pk, int arg );
bool considerConst( const Datatype& pdt, TypeNode tnp, Node c, Kind pk, int arg );
int solveForArgument( TypeNode tnp, unsigned cindex, unsigned arg );
-
-//for eager instantiation
- // TODO (as part of #1235) move some of these functions to sygus_explain.h
- private:
- /** the set of evaluation terms we have already processed */
- std::unordered_set<Node, NodeHashFunction> d_eval_processed;
- std::map< Node, std::map< Node, bool > > d_subterms;
- std::map< Node, std::vector< Node > > d_evals;
- std::map< Node, std::vector< std::vector< Node > > > d_eval_args;
- std::map< Node, std::vector< bool > > d_eval_args_const;
- std::map< Node, std::map< Node, unsigned > > d_node_mv_args_proc;
-
public:
- void registerEvalTerm( Node n );
- void registerModelValue( Node n, Node v, std::vector< Node >& exps, std::vector< Node >& terms, std::vector< Node >& vals );
Node unfold( Node en, std::map< Node, Node >& vtm, std::vector< Node >& exp, bool track_exp = true );
Node unfold( Node en ){
std::map< Node, Node > vtm;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback