summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim King <taking@google.com>2015-12-03 23:46:48 -0500
committerTim King <taking@google.com>2015-12-03 23:46:48 -0500
commit079eb73aa49c1d5a4b9e7e6f3b500e4940408309 (patch)
tree0313913a6cce81cf776a1b08258474b0905b6854 /src
parent49bb2a27ec4b41c96fc3881f9a6d06c1ad17e180 (diff)
Reverting a previous change to the options_handlers.h. Using inline defintions again to better handle a circular dependency.
Diffstat (limited to 'src')
-rw-r--r--src/expr/Makefile.am4
-rw-r--r--src/expr/options_handlers.cpp66
-rw-r--r--src/expr/options_handlers.h42
3 files changed, 37 insertions, 75 deletions
diff --git a/src/expr/Makefile.am b/src/expr/Makefile.am
index 1dbb24e09..c5a032abc 100644
--- a/src/expr/Makefile.am
+++ b/src/expr/Makefile.am
@@ -37,9 +37,7 @@ libexpr_la_SOURCES = \
pickler.cpp \
node_self_iterator.h \
expr_stream.h \
- kind_map.h \
- options_handlers.h \
- options_handlers.cpp
+ kind_map.h
nodist_libexpr_la_SOURCES = \
kind.h \
diff --git a/src/expr/options_handlers.cpp b/src/expr/options_handlers.cpp
deleted file mode 100644
index 05fb8c203..000000000
--- a/src/expr/options_handlers.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/********************* */
-/*! \file options_handlers.cpp
- ** \verbatim
- ** Original author: Morgan Deters
- ** Major contributors: none
- ** Minor contributors (to current version): none
- ** This file is part of the CVC4 project.
- ** 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
- **
- ** \brief Custom handlers and predicates for expression package options
- **
- ** Custom handlers and predicates for expression package options.
- **/
-
-#include "cvc4_private.h"
-
-#include "expr/options_handlers.h"
-#include "util/dump.h"
-#include "util/output.h"
-
-namespace CVC4 {
-namespace expr {
-
-void setDefaultExprDepth(std::string option, int depth, SmtEngine* smt) {
- if(depth < -1) {
- throw OptionException("--default-expr-depth requires a positive argument, or -1.");
- }
-
- Debug.getStream() << Expr::setdepth(depth);
- Trace.getStream() << Expr::setdepth(depth);
- Notice.getStream() << Expr::setdepth(depth);
- Chat.getStream() << Expr::setdepth(depth);
- Message.getStream() << Expr::setdepth(depth);
- Warning.getStream() << Expr::setdepth(depth);
- // intentionally exclude Dump stream from this list
-}
-
-void setDefaultDagThresh(std::string option, int dag, SmtEngine* smt) {
- if(dag < 0) {
- throw OptionException("--default-dag-thresh requires a nonnegative argument.");
- }
-
- Debug.getStream() << Expr::dag(dag);
- Trace.getStream() << Expr::dag(dag);
- Notice.getStream() << Expr::dag(dag);
- Chat.getStream() << Expr::dag(dag);
- Message.getStream() << Expr::dag(dag);
- Warning.getStream() << Expr::dag(dag);
- Dump.getStream() << Expr::dag(dag);
-}
-
-void setPrintExprTypes(std::string option, SmtEngine* smt) {
- Debug.getStream() << Expr::printtypes(true);
- Trace.getStream() << Expr::printtypes(true);
- Notice.getStream() << Expr::printtypes(true);
- Chat.getStream() << Expr::printtypes(true);
- Message.getStream() << Expr::printtypes(true);
- Warning.getStream() << Expr::printtypes(true);
- // intentionally exclude Dump stream from this list
-}
-
-}/* CVC4::expr namespace */
-}/* CVC4 namespace */
-
diff --git a/src/expr/options_handlers.h b/src/expr/options_handlers.h
index 32735efa3..e2a92ade7 100644
--- a/src/expr/options_handlers.h
+++ b/src/expr/options_handlers.h
@@ -19,19 +19,49 @@
#ifndef __CVC4__EXPR__OPTIONS_HANDLERS_H
#define __CVC4__EXPR__OPTIONS_HANDLERS_H
-#include <string>
+#include "util/output.h"
+#include "util/dump.h"
namespace CVC4 {
-class SmtEngine;
-
namespace expr {
+inline void setDefaultExprDepth(std::string option, int depth, SmtEngine* smt) {
+ if(depth < -1) {
+ throw OptionException("--default-expr-depth requires a positive argument, or -1.");
+ }
+
+ Debug.getStream() << Expr::setdepth(depth);
+ Trace.getStream() << Expr::setdepth(depth);
+ Notice.getStream() << Expr::setdepth(depth);
+ Chat.getStream() << Expr::setdepth(depth);
+ Message.getStream() << Expr::setdepth(depth);
+ Warning.getStream() << Expr::setdepth(depth);
+ // intentionally exclude Dump stream from this list
+}
-void setDefaultExprDepth(std::string option, int depth, SmtEngine* smt);
+inline void setDefaultDagThresh(std::string option, int dag, SmtEngine* smt) {
+ if(dag < 0) {
+ throw OptionException("--default-dag-thresh requires a nonnegative argument.");
+ }
-void setDefaultDagThresh(std::string option, int dag, SmtEngine* smt);
+ Debug.getStream() << Expr::dag(dag);
+ Trace.getStream() << Expr::dag(dag);
+ Notice.getStream() << Expr::dag(dag);
+ Chat.getStream() << Expr::dag(dag);
+ Message.getStream() << Expr::dag(dag);
+ Warning.getStream() << Expr::dag(dag);
+ Dump.getStream() << Expr::dag(dag);
+}
-void setPrintExprTypes(std::string option, SmtEngine* smt);
+inline void setPrintExprTypes(std::string option, SmtEngine* smt) {
+ Debug.getStream() << Expr::printtypes(true);
+ Trace.getStream() << Expr::printtypes(true);
+ Notice.getStream() << Expr::printtypes(true);
+ Chat.getStream() << Expr::printtypes(true);
+ Message.getStream() << Expr::printtypes(true);
+ Warning.getStream() << Expr::printtypes(true);
+ // intentionally exclude Dump stream from this list
+}
}/* CVC4::expr namespace */
}/* CVC4 namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback