summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/sygus/sygus_grammar_norm.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-07-14 14:12:18 -0500
committerGitHub <noreply@github.com>2020-07-14 14:12:18 -0500
commit14d32d598e9daa97cf1a29ff893caac2989baec4 (patch)
treef37a48a15db69e6423a3149c1a2e91687b870542 /src/theory/quantifiers/sygus/sygus_grammar_norm.cpp
parent455fed0b388ff9c534391eb88f8c2a336fa42f07 (diff)
Remove sygus print callback (#4727)
This removes sygus print callbacks, since they are no longer necessary to support the sygus v1 parser. This involved generalizing the scope of the datatype utility sygusToBuiltin. Now, printing "as sygus" simply is accomplished by doing sygusToBuiltin conversion and then calling the printer on the builtin term. This is required for further work towards eliminating the Expr layer. FYI @4tXJ7f
Diffstat (limited to 'src/theory/quantifiers/sygus/sygus_grammar_norm.cpp')
-rw-r--r--src/theory/quantifiers/sygus/sygus_grammar_norm.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/theory/quantifiers/sygus/sygus_grammar_norm.cpp b/src/theory/quantifiers/sygus/sygus_grammar_norm.cpp
index 819dd6de9..939256b2b 100644
--- a/src/theory/quantifiers/sygus/sygus_grammar_norm.cpp
+++ b/src/theory/quantifiers/sygus/sygus_grammar_norm.cpp
@@ -18,7 +18,6 @@
#include "expr/datatype.h"
#include "expr/node_manager_attributes.h" // for VarNameAttr
#include "options/quantifiers_options.h"
-#include "printer/sygus_print_callback.h"
#include "smt/smt_engine.h"
#include "smt/smt_engine_scope.h"
#include "theory/datatypes/theory_datatypes_utils.h"
@@ -84,8 +83,7 @@ SygusGrammarNorm::TypeObject::TypeObject(TypeNode src_tn, TypeNode unres_tn)
void SygusGrammarNorm::TypeObject::addConsInfo(
SygusGrammarNorm* sygus_norm,
- const DTypeConstructor& cons,
- std::shared_ptr<SygusPrintCallback> spc)
+ const DTypeConstructor& cons)
{
Trace("sygus-grammar-normalize") << "...for " << cons.getName() << "\n";
/* Recover the sygus operator to not lose reference to the original
@@ -107,7 +105,7 @@ void SygusGrammarNorm::TypeObject::addConsInfo(
}
d_sdt.addConstructor(
- sygus_op, cons.getName(), consTypes, spc, cons.getWeight());
+ sygus_op, cons.getName(), consTypes, cons.getWeight());
}
void SygusGrammarNorm::TypeObject::initializeDatatype(
@@ -225,7 +223,6 @@ void SygusGrammarNorm::TransfChain::buildType(SygusGrammarNorm* sygus_norm,
to.d_sdt.addConstructor(iden_op,
"id",
ctypes,
- printer::SygusEmptyPrintCallback::getEmptyPC(),
0);
Trace("sygus-grammar-normalize-chain")
<< "\tAdding " << t << " to " << to.d_unres_tn << "\n";
@@ -267,7 +264,6 @@ void SygusGrammarNorm::TransfChain::buildType(SygusGrammarNorm* sygus_norm,
to.d_sdt.addConstructor(iden_op,
"id_next",
ctypes,
- printer::SygusEmptyPrintCallback::getEmptyPC(),
0);
}
@@ -472,7 +468,7 @@ TypeNode SygusGrammarNorm::normalizeSygusRec(TypeNode tn,
{
unsigned oi = op_pos[i];
Assert(oi < dt.getNumConstructors());
- to.addConsInfo(this, dt[oi], dtt[oi].getSygusPrintCallback());
+ to.addConsInfo(this, dt[oi]);
}
/* Build normalize datatype */
if (Trace.isOn("sygus-grammar-normalize"))
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback