blob: a174451884cb492e62d3265363e844597c9df963 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
/********************* */
/*! \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, 2010, 2011 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 expression package options
**
** Custom handlers and predicates for expression package options.
**/
#include "cvc4_private.h"
#ifndef __CVC4__EXPR__OPTIONS_HANDLERS_H
#define __CVC4__EXPR__OPTIONS_HANDLERS_H
#include "util/output.h"
#include "util/dump.h"
namespace CVC4 {
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
}
inline void setDefaultDagThresh(std::string option, std::string optarg, SmtEngine* smt) {
int dag = atoi(optarg.c_str());
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);
}
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 */
#endif /* __CVC4__EXPR__OPTIONS_HANDLERS_H */
|