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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
/********************* */
/** smt2.h
** Original author: cconway
** Major contributors:
** Minor contributors (to current version): none
** This file is part of the CVC4 prototype.
** Copyright (c) 2009, 2010 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.
**
** Definitions of SMT2 constants.
**/
#include "cvc4parser_private.h"
#ifndef __CVC4__PARSER__SMT2_H
#define __CVC4__PARSER__SMT2_H
#include <ext/hash_map>
namespace std { using namespace __gnu_cxx; }
#include "util/hash.h"
#include "parser/parser.h"
namespace CVC4 {
class SExpr;
namespace parser {
class Smt2 : public Parser {
friend class ParserBuilder;
public:
enum Logic {
AUFLIA,
AUFLIRA,
AUFNIRA,
QF_AUFBV,
QF_AUFLIA,
QF_AX,
QF_BV,
QF_IDL,
QF_LIA,
QF_LRA,
QF_NIA,
QF_RDL,
QF_UF,
QF_UFIDL
};
enum Theory {
THEORY_ARRAYS,
THEORY_BITVECTORS,
THEORY_CORE,
THEORY_INTS,
THEORY_REALS,
THEORY_REALS_INTS,
};
private:
bool d_logicSet;
Logic d_logic;
protected:
Smt2(ExprManager* exprManager, Input* input, bool strictMode = false);
public:
/**
* Add theory symbols to the parser state.
*
* @param parser the CVC4 Parser object
* @param theory the theory to open (e.g., Core, Ints)
*/
void
addTheory(Theory theory);
bool
logicIsSet();
/**
* Sets the logic for the current benchmark. Declares any logic and theory symbols.
*
* @param parser the CVC4 Parser object
* @param name the name of the logic (e.g., QF_UF, AUFLIA)
*/
void
setLogic(const std::string& name);
void
setInfo(const std::string& flag, const SExpr& sexpr);
static Logic toLogic(const std::string& name);
private:
void addArithmeticOperators();
static std::hash_map<const std::string, Logic, CVC4::StringHashFunction> newLogicMap();
};
}/* CVC4::parser namespace */
}/* CVC4 namespace */
#endif /* __CVC4__PARSER__SMT2_INPUT_H */
|