summaryrefslogtreecommitdiff
path: root/src/expr/command.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/command.cpp')
-rw-r--r--src/expr/command.cpp31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/expr/command.cpp b/src/expr/command.cpp
index 9f502c2ea..16484a320 100644
--- a/src/expr/command.cpp
+++ b/src/expr/command.cpp
@@ -5,7 +5,7 @@
** Major contributors: none
** Minor contributors (to current version): Kshitij Bansal, Dejan Jovanovic, Andrew Reynolds, Francois Bobot
** This file is part of the CVC4 project.
- ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** Copyright (c) 2009-2014 New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.\endverbatim
**
@@ -519,7 +519,9 @@ std::string DeclarationDefinitionCommand::getSymbol() const throw() {
DeclareFunctionCommand::DeclareFunctionCommand(const std::string& id, Expr func, Type t) throw() :
DeclarationDefinitionCommand(id),
d_func(func),
- d_type(t) {
+ d_type(t),
+ d_printInModel(true),
+ d_printInModelSetByUser(false){
}
Expr DeclareFunctionCommand::getFunction() const throw() {
@@ -530,18 +532,37 @@ Type DeclareFunctionCommand::getType() const throw() {
return d_type;
}
+bool DeclareFunctionCommand::getPrintInModel() const throw() {
+ return d_printInModel;
+}
+
+bool DeclareFunctionCommand::getPrintInModelSetByUser() const throw() {
+ return d_printInModelSetByUser;
+}
+
+void DeclareFunctionCommand::setPrintInModel( bool p ) {
+ d_printInModel = p;
+ d_printInModelSetByUser = true;
+}
+
void DeclareFunctionCommand::invoke(SmtEngine* smtEngine) throw() {
d_commandStatus = CommandSuccess::instance();
}
Command* DeclareFunctionCommand::exportTo(ExprManager* exprManager,
ExprManagerMapCollection& variableMap) {
- return new DeclareFunctionCommand(d_symbol, d_func.exportTo(exprManager, variableMap),
- d_type.exportTo(exprManager, variableMap));
+ DeclareFunctionCommand * dfc = new DeclareFunctionCommand(d_symbol, d_func.exportTo(exprManager, variableMap),
+ d_type.exportTo(exprManager, variableMap));
+ dfc->d_printInModel = d_printInModel;
+ dfc->d_printInModelSetByUser = d_printInModelSetByUser;
+ return dfc;
}
Command* DeclareFunctionCommand::clone() const {
- return new DeclareFunctionCommand(d_symbol, d_func, d_type);
+ DeclareFunctionCommand * dfc = new DeclareFunctionCommand(d_symbol, d_func, d_type);
+ dfc->d_printInModel = d_printInModel;
+ dfc->d_printInModelSetByUser = d_printInModelSetByUser;
+ return dfc;
}
std::string DeclareFunctionCommand::getCommandName() const throw() {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback