summaryrefslogtreecommitdiff
path: root/src/smt/command.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/smt/command.cpp')
-rw-r--r--src/smt/command.cpp36
1 files changed, 30 insertions, 6 deletions
diff --git a/src/smt/command.cpp b/src/smt/command.cpp
index a4f0c6320..82b494382 100644
--- a/src/smt/command.cpp
+++ b/src/smt/command.cpp
@@ -1353,9 +1353,6 @@ std::string GetQuantifierEliminationCommand::getCommandName() const throw() {
GetUnsatCoreCommand::GetUnsatCoreCommand() throw() {
}
-GetUnsatCoreCommand::GetUnsatCoreCommand(const std::map<Expr, std::string>& names) throw() : d_names(names) {
-}
-
void GetUnsatCoreCommand::invoke(SmtEngine* smtEngine) {
try {
d_result = smtEngine->getUnsatCore();
@@ -1371,7 +1368,7 @@ void GetUnsatCoreCommand::printResult(std::ostream& out, uint32_t verbosity) con
if(! ok()) {
this->Command::printResult(out, verbosity);
} else {
- d_result.toStream(out, d_names);
+ d_result.toStream(out);
}
}
@@ -1381,13 +1378,13 @@ const UnsatCore& GetUnsatCoreCommand::getUnsatCore() const throw() {
}
Command* GetUnsatCoreCommand::exportTo(ExprManager* exprManager, ExprManagerMapCollection& variableMap) {
- GetUnsatCoreCommand* c = new GetUnsatCoreCommand(d_names);
+ GetUnsatCoreCommand* c = new GetUnsatCoreCommand;
c->d_result = d_result;
return c;
}
Command* GetUnsatCoreCommand::clone() const {
- GetUnsatCoreCommand* c = new GetUnsatCoreCommand(d_names);
+ GetUnsatCoreCommand* c = new GetUnsatCoreCommand;
c->d_result = d_result;
return c;
}
@@ -1692,6 +1689,33 @@ std::string GetOptionCommand::getCommandName() const throw() {
return "get-option";
}
+
+/* class SetExpressionNameCommand */
+
+SetExpressionNameCommand::SetExpressionNameCommand(Expr expr, std::string name) throw() :
+d_expr(expr), d_name(name) {
+
+}
+
+void SetExpressionNameCommand::invoke(SmtEngine* smtEngine) {
+ smtEngine->setExpressionName(d_expr, d_name);
+ d_commandStatus = CommandSuccess::instance();
+}
+
+Command* SetExpressionNameCommand::exportTo(ExprManager* exprManager, ExprManagerMapCollection& variableMap) {
+ SetExpressionNameCommand* c = new SetExpressionNameCommand(d_expr.exportTo(exprManager, variableMap), d_name);
+ return c;
+}
+
+Command* SetExpressionNameCommand::clone() const {
+ SetExpressionNameCommand* c = new SetExpressionNameCommand(d_expr, d_name);
+ return c;
+}
+
+std::string SetExpressionNameCommand::getCommandName() const throw() {
+ return "set-expr-name";
+}
+
/* class DatatypeDeclarationCommand */
DatatypeDeclarationCommand::DatatypeDeclarationCommand(const DatatypeType& datatype) throw() :
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback