summaryrefslogtreecommitdiff
path: root/src/printer/options_handlers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/printer/options_handlers.h')
-rw-r--r--src/printer/options_handlers.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/printer/options_handlers.h b/src/printer/options_handlers.h
new file mode 100644
index 000000000..dea5a383c
--- /dev/null
+++ b/src/printer/options_handlers.h
@@ -0,0 +1,56 @@
+/********************* */
+/*! \file options_handlers.h
+ ** \verbatim
+ ** Original author: mdeters
+ ** Major contributors: none
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 prototype.
+ ** Copyright (c) 2009-2012 The Analysis of Computer Systems Group (ACSys)
+ ** Courant Institute of Mathematical Sciences
+ ** New York University
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief Custom handlers and predicates for printer options
+ **
+ ** Custom handlers and predicates for printer options.
+ **/
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__PRINTER__OPTIONS_HANDLERS_H
+#define __CVC4__PRINTER__OPTIONS_HANDLERS_H
+
+#include "printer/model_format_mode.h"
+
+namespace CVC4 {
+namespace printer {
+
+static const std::string modelFormatHelp = "\
+Model format modes currently supported by the --model-format option:\n\
+\n\
+default \n\
++ Print model as expressions in the output language format.\n\
+\n\
+table\n\
++ Print functional expressions over finite domains in a table format.\n\
+";
+
+inline ModelFormatMode stringToModelFormatMode(std::string option, std::string optarg, SmtEngine* smt) throw(OptionException) {
+ if(optarg == "default") {
+ return MODEL_FORMAT_MODE_DEFAULT;
+ } else if(optarg == "table") {
+ return MODEL_FORMAT_MODE_TABLE;
+ } else if(optarg == "help") {
+ puts(modelFormatHelp.c_str());
+ exit(1);
+ } else {
+ throw OptionException(std::string("unknown option for --model-format: `") +
+ optarg + "'. Try --model-format help.");
+ }
+}
+
+}/* CVC4::printer namespace */
+}/* CVC4 namespace */
+
+#endif /* __CVC4__PRINTER__OPTIONS_HANDLERS_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback