dlinear  0.0.1
Delta-complete SMT solver for linear programming
Loading...
Searching...
No Matches
Logic.cpp
1
6#include "Logic.h"
7
8#include "dlinear/util/exception.h"
9
10namespace dlinear {
11
12Logic parseLogic(const std::string &s) {
13 if (s == "QF_NRA") return Logic::QF_NRA;
14 if (s == "QF_NRA_ODE") return Logic::QF_NRA_ODE;
15 if (s == "QF_LRA") return Logic::QF_LRA;
16 if (s == "QF_RDL") return Logic::QF_RDL;
17 if (s == "QF_LIA") return Logic::QF_LIA;
18 if (s == "LRA") return Logic::LRA;
19 DLINEAR_RUNTIME_ERROR_FMT("set-logic '{}' is not supported", s);
20}
21
22std::ostream &operator<<(std::ostream &os, const Logic &logic) {
23 switch (logic) {
24 case Logic::QF_NRA:
25 return os << "QF_NRA";
27 return os << "QF_NRA_ODE";
28 case Logic::QF_LRA:
29 return os << "QF_LRA";
30 case Logic::QF_RDL:
31 return os << "QF_RDL";
32 case Logic::QF_LIA:
33 return os << "QF_LIA";
34 case Logic::LRA:
35 return os << "LRA";
36 default:
37 DLINEAR_UNREACHABLE();
38 }
39}
40
41} // namespace dlinear
Global namespace for the dlinear library.
Logic
The SMT-LIB logic the SMT2 file is using.
Definition Logic.h:17
@ QF_RDL
Quantifier free real difference logic.
@ QF_NRA
Quantifier free non-linear real arithmetic.
@ QF_LRA
Quantifier free linear real arithmetic. It is the only one dlinear supports.
@ QF_LIA
Quantifier free linear integer arithmetic.
@ LRA
Linear real arithmetic.
@ QF_NRA_ODE
Quantifier free non-linear real arithmetic with ODEs.
Logic parseLogic(const std::string &s)
Parse the logic from a string.
Definition Logic.cpp:12