-
Notifications
You must be signed in to change notification settings - Fork 0
/
SMTLogic.java
73 lines (67 loc) · 1.62 KB
/
SMTLogic.java
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
/* FuzzSMT: Fuzzing tool for Satisfiablity Modulo Theories (SMT) benchmarks.
* Copyright (C) 2009 Robert Daniel Brummayer
*
* This file is part of FuzzSMT.
*
* FuzzSMT is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* FuzzSMT is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import java.util.*;
public enum SMTLogic
{
QF_BOOL,
QF_A,
QF_AX,
QF_BV,
QF_BVEQ,
QF_AUFBV,
QF_AUFLIA,
QF_IDL,
QF_LIA,
QF_LRA,
QF_NIA,
QF_NRA,
QF_RDL,
QF_UF,
QF_UFBV,
QF_UFIDL,
QF_UFLIA,
QF_UFLRA,
QF_UFNIA,
QF_UFNRA,
QF_UFRDL,
AUFLIA,
AUFLIRA,
AUFNIRA;
public final static HashMap<String, SMTLogic> stringToLogic;
static {
EnumSet<SMTLogic> set = EnumSet.range (QF_BOOL, AUFNIRA);
stringToLogic = new HashMap<String, SMTLogic>(AUFNIRA.ordinal());
for (SMTLogic logic : set)
stringToLogic.put (logic.toString(), logic);
}
/**
* Returns the best SMT2 logic that can cover the logic.
* @return
*/
public String toSMT2String() {
switch (this) {
case QF_BOOL:
return "QF_UF";
case QF_BVEQ:
return "QF_BV";
default:
return toString();
}
}
}