Skip to content

Commit

Permalink
Interpret: Use the new TermPrinter for printing models and interpolants
Browse files Browse the repository at this point in the history
  • Loading branch information
aehyvari committed Feb 18, 2022
1 parent 4b31bef commit af164eb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/bin/Interpret.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "ArithLogic.h"
#include "LogicFactory.h"
#include "Substitutor.h"
#include "TermPrinter.h"

#include <string>
#include <sstream>
Expand Down Expand Up @@ -791,10 +792,10 @@ std::string Interpret::printDefinitionSmtlib(const TemplateFunction & templateFu
const vec<PTRef>& args = templateFun.getArgs();
for (int i = 0; i < args.size(); i++) {
auto sortString = logic->printSort(logic->getSortRef(args[i]));
ss << "(" << logic->pp(args[i]) << " " << sortString << ")" << (i == args.size()-1 ? "" : " ");
ss << "(" << TermPrinter(*logic).print(args[i]) << " " << sortString << ")" << (i == args.size()-1 ? "" : " ");
}
ss << ")" << " " << logic->printSort(templateFun.getRetSort()) << "\n";
ss << " " << logic->pp(templateFun.getBody()) << ")\n";
ss << " " << TermPrinter(*logic).print(templateFun.getBody()) << ")\n";
return ss.str();
}

Expand Down Expand Up @@ -1284,7 +1285,7 @@ void Interpret::getInterpolants(const ASTNode& n)
}

for (int j = 0; j < itps.size(); j++) {
auto itp = logic->pp(itps[j]);
auto itp = TermPrinter(*logic).print(itps[j]);
notify_formatted(false, "%s%s%s",
(j == 0 ? "(" : " "), itp.c_str(), (j == itps.size() - 1 ? ")" : ""));
}
Expand Down

0 comments on commit af164eb

Please sign in to comment.