// This example builds a simple parameterized list of sort T, with one
// constructor "cons".
Sort sort = slv.mkParamSort("T");
- DatatypeDecl paramConsListSpec("paramlist",
- sort); // give the datatype a name
+ DatatypeDecl paramConsListSpec =
+ slv.mkDatatypeDecl("paramlist",
+ sort); // give the datatype a name
DatatypeConstructorDecl paramCons("cons");
DatatypeConstructorDecl paramNil("nil");
DatatypeSelectorDecl paramHead("head", sort);
// Second, it is "resolved" to an actual sort, at which point function
// symbols are assigned to its constructors, selectors, and testers.
- DatatypeDecl consListSpec("list"); // give the datatype a name
+ DatatypeDecl consListSpec =
+ slv.mkDatatypeDecl("list"); // give the datatype a name
DatatypeConstructorDecl cons("cons");
DatatypeSelectorDecl head("head", slv.getIntegerSort());
DatatypeSelectorDecl tail("tail", DatatypeDeclSelfSort());
// is specified. Second, it is "resolved"---at which point function
// symbols are assigned to its constructors, selectors, and testers.
- Datatype consListSpec("list"); // give the datatype a name
+ Datatype consListSpec(&em, "list"); // give the datatype a name
DatatypeConstructor cons("cons");
cons.addArg("head", em.integerType());
cons.addArg("tail", DatatypeSelfType()); // a list
// This example builds a simple parameterized list of sort T, with one
// constructor "cons".
Type sort = em.mkSort("T", ExprManager::SORT_FLAG_PLACEHOLDER);
- Datatype paramConsListSpec("list", std::vector<Type>{sort});
+ Datatype paramConsListSpec(&em, "list", std::vector<Type>{sort});
DatatypeConstructor paramCons("cons");
DatatypeConstructor paramNil("nil");
paramCons.addArg("head", sort);
// is specified. Second, it is "resolved"---at which point function
// symbols are assigned to its constructors, selectors, and testers.
- Datatype consListSpec = new Datatype("list"); // give the datatype a name
+ Datatype consListSpec = new Datatype(em, "list"); // give a name
DatatypeConstructor cons = new DatatypeConstructor("cons");
cons.addArg("head", em.integerType());
cons.addArg("tail", new DatatypeSelfType()); // a list
/* DatatypeDecl ------------------------------------------------------------- */
-DatatypeDecl::DatatypeDecl(const std::string& name, bool isCoDatatype)
- : d_dtype(new CVC4::Datatype(name, isCoDatatype))
+DatatypeDecl::DatatypeDecl(const Solver* s,
+ const std::string& name,
+ bool isCoDatatype)
+ : d_dtype(new CVC4::Datatype(s->getExprManager(), name, isCoDatatype))
{
}
-DatatypeDecl::DatatypeDecl(const std::string& name,
+DatatypeDecl::DatatypeDecl(const Solver* s,
+ const std::string& name,
Sort param,
bool isCoDatatype)
- : d_dtype(new CVC4::Datatype(
- name, std::vector<Type>{*param.d_type}, isCoDatatype))
+ : d_dtype(new CVC4::Datatype(s->getExprManager(),
+ name,
+ std::vector<Type>{*param.d_type},
+ isCoDatatype))
{
}
-DatatypeDecl::DatatypeDecl(const std::string& name,
+DatatypeDecl::DatatypeDecl(const Solver* s,
+ const std::string& name,
const std::vector<Sort>& params,
bool isCoDatatype)
{
tparams.push_back(*s.d_type);
}
d_dtype = std::shared_ptr<CVC4::Datatype>(
- new CVC4::Datatype(name, tparams, isCoDatatype));
+ new CVC4::Datatype(s->getExprManager(), name, tparams, isCoDatatype));
}
DatatypeDecl::~DatatypeDecl() {}
CVC4_API_SOLVER_TRY_CATCH_END;
}
+/* Create datatype declarations */
+/* -------------------------------------------------------------------------- */
+
+DatatypeDecl Solver::mkDatatypeDecl(const std::string& name, bool isCoDatatype)
+{
+ return DatatypeDecl(this, name, isCoDatatype);
+}
+
+DatatypeDecl Solver::mkDatatypeDecl(const std::string& name,
+ Sort param,
+ bool isCoDatatype)
+{
+ return DatatypeDecl(this, name, param, isCoDatatype);
+}
+
+DatatypeDecl Solver::mkDatatypeDecl(const std::string& name,
+ const std::vector<Sort>& params,
+ bool isCoDatatype)
+{
+ return DatatypeDecl(this, name, params, isCoDatatype);
+}
+
/* Create terms */
/* -------------------------------------------------------------------------- */
{
CVC4_API_ARG_CHECK_EXPECTED(ctors.size() > 0, ctors)
<< "a datatype declaration with at least one constructor";
- DatatypeDecl dtdecl(symbol);
+ DatatypeDecl dtdecl(this, symbol);
for (const DatatypeConstructorDecl& ctor : ctors)
{
dtdecl.addConstructor(ctor);
std::shared_ptr<CVC4::DatatypeConstructor> d_ctor;
};
+class Solver;
/**
* A CVC4 datatype declaration.
*/
{
friend class DatatypeConstructorArg;
friend class Solver;
-
public:
- /**
- * Constructor.
- * @param name the name of the datatype
- * @param isCoDatatype true if a codatatype is to be constructed
- * @return the DatatypeDecl
- */
- DatatypeDecl(const std::string& name, bool isCoDatatype = false);
-
- /**
- * Constructor for parameterized datatype declaration.
- * Create sorts parameter with Solver::mkParamSort().
- * @param name the name of the datatype
- * @param param the sort parameter
- * @param isCoDatatype true if a codatatype is to be constructed
- */
- DatatypeDecl(const std::string& name, Sort param, bool isCoDatatype = false);
-
- /**
- * Constructor for parameterized datatype declaration.
- * Create sorts parameter with Solver::mkParamSort().
- * @param name the name of the datatype
- * @param params a list of sort parameters
- * @param isCoDatatype true if a codatatype is to be constructed
- */
- DatatypeDecl(const std::string& name,
- const std::vector<Sort>& params,
- bool isCoDatatype = false);
-
/**
* Destructor.
*/
const CVC4::Datatype& getDatatype(void) const;
private:
+ /**
+ * Constructor.
+ * @param s the solver that created this datatype declaration
+ * @param name the name of the datatype
+ * @param isCoDatatype true if a codatatype is to be constructed
+ * @return the DatatypeDecl
+ */
+ DatatypeDecl(const Solver* s,
+ const std::string& name,
+ bool isCoDatatype = false);
+
+ /**
+ * Constructor for parameterized datatype declaration.
+ * Create sorts parameter with Solver::mkParamSort().
+ * @param s the solver that created this datatype declaration
+ * @param name the name of the datatype
+ * @param param the sort parameter
+ * @param isCoDatatype true if a codatatype is to be constructed
+ */
+ DatatypeDecl(const Solver* s,
+ const std::string& name,
+ Sort param,
+ bool isCoDatatype = false);
+
+ /**
+ * Constructor for parameterized datatype declaration.
+ * Create sorts parameter with Solver::mkParamSort().
+ * @param s the solver that created this datatype declaration
+ * @param name the name of the datatype
+ * @param params a list of sort parameters
+ * @param isCoDatatype true if a codatatype is to be constructed
+ */
+ DatatypeDecl(const Solver* s,
+ const std::string& name,
+ const std::vector<Sort>& params,
+ bool isCoDatatype = false);
/* The internal (intermediate) datatype wrapped by this datatype
* declaration
* This is a shared_ptr rather than a unique_ptr since CVC4::Datatype is
*/
Term mkVar(Sort sort, const std::string& symbol = std::string()) const;
+ /* .................................................................... */
+ /* Create datatype declarations */
+ /* .................................................................... */
+
+ /**
+ * Create a datatype declaration.
+ * @param name the name of the datatype
+ * @param isCoDatatype true if a codatatype is to be constructed
+ * @return the DatatypeDecl
+ */
+ DatatypeDecl mkDatatypeDecl(const std::string& name,
+ bool isCoDatatype = false);
+
+ /**
+ * Create a datatype declaration.
+ * Create sorts parameter with Solver::mkParamSort().
+ * @param name the name of the datatype
+ * @param param the sort parameter
+ * @param isCoDatatype true if a codatatype is to be constructed
+ * @return the DatatypeDecl
+ */
+ DatatypeDecl mkDatatypeDecl(const std::string& name,
+ Sort param,
+ bool isCoDatatype = false);
+
+ /**
+ * Create a datatype declaration.
+ * Create sorts parameter with Solver::mkParamSort().
+ * @param name the name of the datatype
+ * @param params a list of sort parameters
+ * @param isCoDatatype true if a codatatype is to be constructed
+ * @return the DatatypeDecl
+ */
+ DatatypeDecl mkDatatypeDecl(const std::string& name,
+ const std::vector<Sort>& params,
+ bool isCoDatatype = false);
+
/* .................................................................... */
/* Formula Handling */
/* .................................................................... */
typedef expr::Attribute<expr::attr::DatatypeUFiniteTag, bool> DatatypeUFiniteAttr;
typedef expr::Attribute<expr::attr::DatatypeUFiniteComputedTag, bool> DatatypeUFiniteComputedAttr;
-Datatype::Datatype(std::string name, bool isCo)
- : d_internal(nullptr), // until the Node-level datatype API is activated
+Datatype::Datatype(ExprManager* em, std::string name, bool isCo)
+ : d_em(em),
d_name(name),
d_params(),
d_isCo(isCo),
{
}
-Datatype::Datatype(std::string name,
+Datatype::Datatype(ExprManager* em,
+ std::string name,
const std::vector<Type>& params,
bool isCo)
- : d_internal(nullptr), // until the Node-level datatype API is activated
+ : d_em(em),
d_name(name),
d_params(params),
d_isCo(isCo),
typedef DatatypeConstructorIterator const_iterator;
/** Create a new Datatype of the given name. */
- explicit Datatype(std::string name, bool isCo = false);
+ explicit Datatype(ExprManager* em, std::string name, bool isCo = false);
/**
* Create a new Datatype of the given name, with the given
* parameterization.
*/
- Datatype(std::string name,
+ Datatype(ExprManager* em,
+ std::string name,
const std::vector<Type>& params,
bool isCo = false);
void toStream(std::ostream& out) const;
private:
+ /** The expression manager that created this datatype */
+ ExprManager* d_em;
/** The internal representation */
std::shared_ptr<DType> d_internal;
/** name of this datatype */
for (unsigned i = 0; i < types.size(); ++ i) {
sst << "_" << types[i];
}
- Datatype dt(sst.str());
+ Datatype dt(nm->toExprManager(), sst.str());
dt.setTuple();
std::stringstream ssc;
ssc << sst.str() << "_ctor";
for(Record::FieldVector::const_iterator i = fields.begin(); i != fields.end(); ++i) {
sst << "_" << (*i).first << "_" << (*i).second;
}
- Datatype dt(sst.str());
+ Datatype dt(nm->toExprManager(), sst.str());
dt.setRecord();
std::stringstream ssc;
ssc << sst.str() << "_ctor";
namespace CVC4 {
-SygusDatatype::SygusDatatype(const std::string& name) : d_dt(Datatype(name)) {}
+SygusDatatype::SygusDatatype(const std::string& name)
+ : d_dt(Datatype(NodeManager::currentNM()->toExprManager(), name))
+{
+}
std::string SygusDatatype::getName() const { return d_dt.getName(); }
params.push_back( t ); }
)* RBRACKET
)?
- { datatypes.push_back(Datatype(id, params, false));
+ { datatypes.push_back(Datatype(EXPR_MANAGER, id, params, false));
if(!PARSER_STATE->isUnresolvedType(id)) {
// if not unresolved, must be undeclared
PARSER_STATE->checkDeclaration(id, CHECK_UNDECLARED, SYM_SORT);
std::stringstream ss;
ss << "dt_" << fun << "_" << i.first;
std::string dname = ss.str();
- datatypes.push_back(Datatype(dname));
+ datatypes.push_back(Datatype(EXPR_MANAGER, dname));
// make its unresolved type, used for referencing the final version of
// the datatype
PARSER_STATE->checkDeclaration(dname, CHECK_UNDECLARED, SYM_SORT);
PARSER_STATE->parseError("Wrong number of parameters for datatype.");
}
Debug("parser-dt") << params.size() << " parameters for " << dnames[dts.size()] << std::endl;
- dts.push_back(Datatype(dnames[dts.size()],params,isCo));
+ dts.push_back(Datatype(EXPR_MANAGER, dnames[dts.size()],params,isCo));
}
LPAREN_TOK
( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+
PARSER_STATE->parseError("No parameters given for datatype.");
}
Debug("parser-dt") << params.size() << " parameters for " << dnames[dts.size()] << std::endl;
- dts.push_back(Datatype(dnames[dts.size()],params,isCo));
+ dts.push_back(Datatype(EXPR_MANAGER, dnames[dts.size()],params,isCo));
}
( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+
)
params.push_back( t ); }
)* ']'
)?*/ //AJR: this isn't necessary if we use z3's style
- { datatypes.push_back(Datatype(id,params,isCo));
+ { datatypes.push_back(Datatype(EXPR_MANAGER, id, params, isCo));
if(!PARSER_STATE->isUnresolvedType(id)) {
// if not unresolved, must be undeclared
PARSER_STATE->checkDeclaration(id, CHECK_UNDECLARED, SYM_SORT);
std::vector< bool >& allow_const,
std::vector< std::vector< std::string > >& unresolved_gterm_sym ){
sorts.push_back(t);
- datatypes.push_back(Datatype(dname));
+ datatypes.push_back(Datatype(getExprManager(), dname));
ops.push_back(std::vector<Expr>());
cnames.push_back(std::vector<std::string>());
cargs.push_back(std::vector<std::vector<CVC4::Type> >());
CVC4::Type& ret,
bool isNested = false);
- static bool pushSygusDatatypeDef( Type t, std::string& dname,
- std::vector< CVC4::Datatype >& datatypes,
- std::vector< CVC4::Type>& sorts,
- std::vector< std::vector<CVC4::Expr> >& ops,
- std::vector< std::vector<std::string> >& cnames,
- std::vector< std::vector< std::vector< CVC4::Type > > >& cargs,
- std::vector< bool >& allow_const,
- std::vector< std::vector< std::string > >& unresolved_gterm_sym );
-
- static bool popSygusDatatypeDef( std::vector< CVC4::Datatype >& datatypes,
- std::vector< CVC4::Type>& sorts,
- std::vector< std::vector<CVC4::Expr> >& ops,
- std::vector< std::vector<std::string> >& cnames,
- std::vector< std::vector< std::vector< CVC4::Type > > >& cargs,
- std::vector< bool >& allow_const,
- std::vector< std::vector< std::string > >& unresolved_gterm_sym );
+ bool pushSygusDatatypeDef(
+ Type t,
+ std::string& dname,
+ std::vector<CVC4::Datatype>& datatypes,
+ std::vector<CVC4::Type>& sorts,
+ std::vector<std::vector<CVC4::Expr>>& ops,
+ std::vector<std::vector<std::string>>& cnames,
+ std::vector<std::vector<std::vector<CVC4::Type>>>& cargs,
+ std::vector<bool>& allow_const,
+ std::vector<std::vector<std::string>>& unresolved_gterm_sym);
+
+ bool popSygusDatatypeDef(
+ std::vector<CVC4::Datatype>& datatypes,
+ std::vector<CVC4::Type>& sorts,
+ std::vector<std::vector<CVC4::Expr>>& ops,
+ std::vector<std::vector<std::string>>& cnames,
+ std::vector<std::vector<std::vector<CVC4::Type>>>& cargs,
+ std::vector<bool>& allow_const,
+ std::vector<std::vector<std::string>>& unresolved_gterm_sym);
void setSygusStartIndex(const std::string& fun,
int startIndex,
void DatatypeBlack::testMkDatatypeSort()
{
- DatatypeDecl dtypeSpec("list");
+ DatatypeDecl dtypeSpec = d_solver.mkDatatypeDecl("list");
DatatypeConstructorDecl cons("cons");
DatatypeSelectorDecl head("head", d_solver.getIntegerSort());
cons.addSelector(head);
void SolverBlack::testMkDatatypeSort()
{
- DatatypeDecl dtypeSpec("list");
+ DatatypeDecl dtypeSpec = d_solver->mkDatatypeDecl("list");
DatatypeConstructorDecl cons("cons");
DatatypeSelectorDecl head("head", d_solver->getIntegerSort());
cons.addSelector(head);
DatatypeConstructorDecl nil("nil");
dtypeSpec.addConstructor(nil);
TS_ASSERT_THROWS_NOTHING(d_solver->mkDatatypeSort(dtypeSpec));
- DatatypeDecl throwsDtypeSpec("list");
+ DatatypeDecl throwsDtypeSpec = d_solver->mkDatatypeDecl("list");
TS_ASSERT_THROWS(d_solver->mkDatatypeSort(throwsDtypeSpec),
CVC4ApiException&);
}
// list datatype
Sort sort = d_solver->mkParamSort("T");
- DatatypeDecl listDecl("paramlist", sort);
+ DatatypeDecl listDecl = d_solver->mkDatatypeDecl("paramlist", sort);
DatatypeConstructorDecl cons("cons");
DatatypeConstructorDecl nil("nil");
DatatypeSelectorDecl head("head", sort);
TS_ASSERT_EQUALS(exta.getOp(), ext);
// Test Datatypes -- more complicated
- DatatypeDecl consListSpec("list");
+ DatatypeDecl consListSpec = d_solver->mkDatatypeDecl("list");
DatatypeConstructorDecl cons("cons");
DatatypeSelectorDecl head("head", d_solver->getIntegerSort());
DatatypeSelectorDecl tail("tail", DatatypeDeclSelfSort());
Sort uSort = d_solver->mkUninterpretedSort("u");
Sort funSort1 = d_solver->mkFunctionSort({bvSort, bvSort}, bvSort);
Sort funSort2 = d_solver->mkFunctionSort(uSort, d_solver->getIntegerSort());
- DatatypeDecl consListSpec("list");
+ DatatypeDecl consListSpec = d_solver->mkDatatypeDecl("list");
DatatypeConstructorDecl cons("cons");
DatatypeSelectorDecl head("head", d_solver->getIntegerSort());
DatatypeSelectorDecl tail("tail", DatatypeDeclSelfSort());
void SortBlack::testGetDatatype()
{
// create datatype sort, check should not fail
- DatatypeDecl dtypeSpec("list");
+ DatatypeDecl dtypeSpec = d_solver.mkDatatypeDecl("list");
DatatypeConstructorDecl cons("cons");
DatatypeSelectorDecl head("head", d_solver.getIntegerSort());
cons.addSelector(head);
{
// instantiate parametric datatype, check should not fail
Sort sort = d_solver.mkParamSort("T");
- DatatypeDecl paramDtypeSpec("paramlist", sort);
+ DatatypeDecl paramDtypeSpec = d_solver.mkDatatypeDecl("paramlist", sort);
DatatypeConstructorDecl paramCons("cons");
DatatypeConstructorDecl paramNil("nil");
DatatypeSelectorDecl paramHead("head", sort);
TS_ASSERT_THROWS_NOTHING(
paramDtypeSort.instantiate(std::vector<Sort>{d_solver.getIntegerSort()}));
// instantiate non-parametric datatype sort, check should fail
- DatatypeDecl dtypeSpec("list");
+ DatatypeDecl dtypeSpec = d_solver.mkDatatypeDecl("list");
DatatypeConstructorDecl cons("cons");
DatatypeSelectorDecl head("head", d_solver.getIntegerSort());
cons.addSelector(head);
{
// create parametric datatype, check should not fail
Sort sort = d_solver.mkParamSort("T");
- DatatypeDecl paramDtypeSpec("paramlist", sort);
+ DatatypeDecl paramDtypeSpec = d_solver.mkDatatypeDecl("paramlist", sort);
DatatypeConstructorDecl paramCons("cons");
DatatypeConstructorDecl paramNil("nil");
DatatypeSelectorDecl paramHead("head", sort);
Sort paramDtypeSort = d_solver.mkDatatypeSort(paramDtypeSpec);
TS_ASSERT_THROWS_NOTHING(paramDtypeSort.getDatatypeParamSorts());
// create non-parametric datatype sort, check should fail
- DatatypeDecl dtypeSpec("list");
+ DatatypeDecl dtypeSpec = d_solver.mkDatatypeDecl("list");
DatatypeConstructorDecl cons("cons");
DatatypeSelectorDecl head("head", d_solver.getIntegerSort());
cons.addSelector(head);
void SortBlack::testGetDatatypeArity()
{
// create datatype sort, check should not fail
- DatatypeDecl dtypeSpec("list");
+ DatatypeDecl dtypeSpec = d_solver.mkDatatypeDecl("list");
DatatypeConstructorDecl cons("cons");
DatatypeSelectorDecl head("head", d_solver.getIntegerSort());
cons.addSelector(head);
TS_ASSERT(!null->isConst());
// more complicated "constants" exist in datatypes and arrays theories
- Datatype list("list");
+ Datatype list(d_em, "list");
DatatypeConstructor consC("cons");
consC.addArg("car", d_em->integerType());
consC.addArg("cdr", DatatypeSelfType());
}
void testDatatypesFinite() {
- Datatype dt("Colors");
+ Datatype dt(d_em, "Colors");
dt.addConstructor(DatatypeConstructor("red"));
dt.addConstructor(DatatypeConstructor("orange"));
dt.addConstructor(DatatypeConstructor("yellow"));
}
void testDatatypesInfinite1() {
- Datatype colors("Colors");
+ Datatype colors(d_em, "Colors");
colors.addConstructor(DatatypeConstructor("red"));
colors.addConstructor(DatatypeConstructor("orange"));
colors.addConstructor(DatatypeConstructor("yellow"));
colors.addConstructor(DatatypeConstructor("blue"));
colors.addConstructor(DatatypeConstructor("violet"));
TypeNode colorsType = TypeNode::fromType(d_em->mkDatatypeType(colors));
- Datatype listColors("ListColors");
+ Datatype listColors(d_em, "ListColors");
DatatypeConstructor consC("cons");
consC.addArg("car", colorsType.toType());
consC.addArg("cdr", DatatypeSelfType());
}
void testEnumeration() {
- Datatype colors("colors");
+ Datatype colors(d_em, "colors");
DatatypeConstructor yellow("yellow", "is_yellow");
DatatypeConstructor blue("blue", "is_blue");
}
void testNat() {
- Datatype nat("nat");
+ Datatype nat(d_em, "nat");
DatatypeConstructor succ("succ", "is_succ");
succ.addArg("pred", DatatypeSelfType());
}
void testTree() {
- Datatype tree("tree");
+ Datatype tree(d_em, "tree");
Type integerType = d_em->integerType();
DatatypeConstructor node("node", "is_node");
}
void testListInt() {
- Datatype list("list");
+ Datatype list(d_em, "list");
Type integerType = d_em->integerType();
DatatypeConstructor cons("cons", "is_cons");
}
void testListReal() {
- Datatype list("list");
+ Datatype list(d_em, "list");
Type realType = d_em->realType();
DatatypeConstructor cons("cons", "is_cons");
}
void testListBoolean() {
- Datatype list("list");
+ Datatype list(d_em, "list");
Type booleanType = d_em->booleanType();
DatatypeConstructor cons("cons", "is_cons");
* list = cons(car: tree, cdr: list) | nil
* END;
*/
- Datatype tree("tree");
+ Datatype tree(d_em, "tree");
DatatypeConstructor node("node", "is_node");
node.addArg("left", DatatypeSelfType());
node.addArg("right", DatatypeSelfType());
Debug("datatypes") << tree << std::endl;
- Datatype list("list");
+ Datatype list(d_em, "list");
DatatypeConstructor cons("cons", "is_cons");
cons.addArg("car", DatatypeUnresolvedType("tree"));
cons.addArg("cdr", DatatypeSelfType());
}
void testMutualListTrees2()
{
- Datatype tree("tree");
+ Datatype tree(d_em, "tree");
DatatypeConstructor node("node", "is_node");
node.addArg("left", DatatypeSelfType());
node.addArg("right", DatatypeSelfType());
leaf.addArg("leaf", DatatypeUnresolvedType("list"));
tree.addConstructor(leaf);
- Datatype list("list");
+ Datatype list(d_em, "list");
DatatypeConstructor cons("cons", "is_cons");
cons.addArg("car", DatatypeUnresolvedType("tree"));
cons.addArg("cdr", DatatypeSelfType());
}
void testNotSoWellFounded() {
- Datatype tree("tree");
+ Datatype tree(d_em, "tree");
DatatypeConstructor node("node", "is_node");
node.addArg("left", DatatypeSelfType());
Type t1, t2;
v.push_back(t1 = d_em->mkSort("T1"));
v.push_back(t2 = d_em->mkSort("T2"));
- Datatype pair("pair", v);
+ Datatype pair(d_em, "pair", v);
DatatypeConstructor mkpair("mk-pair");
mkpair.addArg("first", t1);