diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-08-25 19:04:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-25 19:04:39 -0500 |
commit | 34eac85599875517732d53a5cc1acd3ab60479d1 (patch) | |
tree | ebfa9e493b32aba67d85d6d0bb7a6b468fac5fd4 /src/parser/smt2/smt2.cpp | |
parent | c5eb77b96cd67b8d80ee8901a3f0b5ae7d54aab2 (diff) |
Replace Expr-level datatype with Node-level DType (#4875)
This PR makes two simultaneous changes:
The new API uses Node-level DType instead of Expr-level Datatype. This required converting 2 of the last remaining calls in the parser that used Expr to use the new API.
Internally constructed datatypes (e.g. for sygus) use Node-level DType instead of Expr-level Datatype. Note this required moving a block of code for handling a corner case of sygus from Datatype -> DType.
This PR removes :
ExprManger::mkDatatypeType.
The Expr-level datatype itself. This PR removes all references to its include file.
It also updates one remaining unit test from Expr -> Node.
This PR will enable further removal of other datatype-specific things in the Expr layer.
Diffstat (limited to 'src/parser/smt2/smt2.cpp')
-rw-r--r-- | src/parser/smt2/smt2.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/parser/smt2/smt2.cpp b/src/parser/smt2/smt2.cpp index fa0f8af43..1e5d2155a 100644 --- a/src/parser/smt2/smt2.cpp +++ b/src/parser/smt2/smt2.cpp @@ -1149,11 +1149,9 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector<api::Term>& args) ss << "tuple is of length " << length << "; cannot access index " << n; parseError(ss.str()); } - const Datatype& dt = ((DatatypeType)t.getType()).getDatatype(); - api::Term ret = - d_solver->mkTerm(api::APPLY_SELECTOR, - api::Term(d_solver, dt[0][n].getSelector()), - args[0]); + const api::Datatype& dt = t.getDatatype(); + api::Term ret = d_solver->mkTerm( + api::APPLY_SELECTOR, dt[0][n].getSelectorTerm(), args[0]); Debug("parser") << "applyParseOp: return selector " << ret << std::endl; return ret; } |