File tree Expand file tree Collapse file tree 5 files changed +55
-27
lines changed Expand file tree Collapse file tree 5 files changed +55
-27
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,7 @@ SRC = $(BOOLEFORCE_SRC) \
185
185
sat/resolution_proof.cpp \
186
186
smt2/smt2_conv.cpp \
187
187
smt2/smt2_dec.cpp \
188
+ smt2/smt2_format.cpp \
188
189
smt2/smt2_parser.cpp \
189
190
smt2/smt2_tokenizer.cpp \
190
191
smt2/smt2irep.cpp \
Original file line number Diff line number Diff line change
1
+ /* ******************************************************************\
2
+
3
+ Module:
4
+
5
+ Author: Daniel Kroening, [email protected]
6
+
7
+ \*******************************************************************/
8
+
9
+ #include " smt2_format.h"
10
+
11
+ #include < util/std_types.h>
12
+
13
+ std::ostream &operator <<(std::ostream &out, const smt2_format &f)
14
+ {
15
+ if (f.type .id () == ID_unsignedbv)
16
+ out << " (_ BitVec " << to_unsignedbv_type (f.type ).get_width () << ' )' ;
17
+ else if (f.type .id () == ID_bool)
18
+ out << " Bool" ;
19
+ else if (f.type .id () == ID_integer)
20
+ out << " Int" ;
21
+ else if (f.type .id () == ID_real)
22
+ out << " Real" ;
23
+ else
24
+ out << " ? " << f.type .id ();
25
+
26
+ return out;
27
+ }
Original file line number Diff line number Diff line change
1
+ /* ******************************************************************\
2
+
3
+ Module:
4
+
5
+ Author: Daniel Kroening, [email protected]
6
+
7
+ \*******************************************************************/
8
+
9
+ #ifndef CPROVER_SOLVERS_SMT2_SMT2_FORMAT_H
10
+ #define CPROVER_SOLVERS_SMT2_SMT2_FORMAT_H
11
+
12
+ #include < util/type.h>
13
+
14
+ struct smt2_format
15
+ {
16
+ explicit smt2_format (const typet &_type) : type(_type)
17
+ {
18
+ }
19
+
20
+ const typet &type;
21
+ };
22
+
23
+ std::ostream &operator <<(std::ostream &, const smt2_format &);
24
+
25
+ #endif // CPROVER_SOLVERS_SMT2_SMT2_FORMAT_H
Original file line number Diff line number Diff line change 8
8
9
9
#include " smt2_parser.h"
10
10
11
- #include < util/arith_tools.h>
12
-
13
- std::ostream &operator <<(std::ostream &out, const smt2_parsert::smt2_format &f)
14
- {
15
- if (f.type .id () == ID_unsignedbv)
16
- out << " (_ BitVec " << to_unsignedbv_type (f.type ).get_width () << ' )' ;
17
- else if (f.type .id () == ID_bool)
18
- out << " Bool" ;
19
- else if (f.type .id () == ID_integer)
20
- out << " Int" ;
21
- else if (f.type .id () == ID_real)
22
- out << " Real" ;
23
- else
24
- out << " ? " << f.type .id ();
11
+ #include " smt2_format.h"
25
12
26
- return out;
27
- }
13
+ #include < util/arith_tools.h>
28
14
29
15
void smt2_parsert::command_sequence ()
30
16
{
Original file line number Diff line number Diff line change @@ -43,15 +43,6 @@ class smt2_parsert:public smt2_tokenizert
43
43
using id_mapt=std::map<irep_idt, idt>;
44
44
id_mapt id_map;
45
45
46
- struct smt2_format
47
- {
48
- explicit smt2_format (const typet &_type) : type(_type)
49
- {
50
- }
51
-
52
- const typet type;
53
- };
54
-
55
46
protected:
56
47
bool exit;
57
48
void command_sequence ();
@@ -91,6 +82,4 @@ class smt2_parsert:public smt2_tokenizert
91
82
exprt cast_bv_to_unsigned (const exprt &);
92
83
};
93
84
94
- std::ostream &operator <<(std::ostream &, const smt2_parsert::smt2_format &);
95
-
96
85
#endif // CPROVER_SOLVERS_SMT2_SMT2_PARSER_H
You can’t perform that action at this time.
0 commit comments