summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2018-08-22 17:33:29 -0700
committerAndres Noetzli <andres.noetzli@gmail.com>2018-08-22 17:33:29 -0700
commit6ae7ae4f8a7ed8f6f0c290e383e7df95d41526ce (patch)
tree5210ef455f5b060d82835b06af78532de8de155b
parent923bd039728c972fef1bbf1a24f23f735e295bce (diff)
Avoid setting filename when set-info :name is used
Currently, `SmtEngine::setInfo()` changes `SmtEngine::d_filename` if it is called on `:name`. The SMT-LIB 2.6 standard, however, says that `:name` corresponds to the name of the solver. We are following the standard by returning the name of CVC4 when `(get-info :name)` is called (even after calling `(set-info :name ...)`), so changing `d_filename` is the wrong thing to do and a noop w.r.t. `(get-option :name)`. This commit removes the assignment that changes `d_filename`. Note that `SmtEngine::setInfo()` is only called from the SMT2 parser.
-rw-r--r--src/smt/smt_engine.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp
index f9ea2f1ac..4250f724d 100644
--- a/src/smt/smt_engine.cpp
+++ b/src/smt/smt_engine.cpp
@@ -2308,17 +2308,11 @@ void SmtEngine::setInfo(const std::string& key, const CVC4::SExpr& value)
}
// Check for standard info keys (SMT-LIB v1, SMT-LIB v2, ...)
- if (key == "source"
- || key == "category"
- || key == "difficulty"
- || key == "notes"
- || key == "license")
+ if (key == "source" || key == "category" || key == "difficulty"
+ || key == "notes" || key == "name" || key == "license")
{
// ignore these
return;
- } else if(key == "name") {
- d_filename = value.getValue();
- return;
}
else if (key == "smt-lib-version" && !options::inputLanguage.wasSetByUser())
{
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback