File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
regression/cbmc/Float-smt2-1 Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ #include <assert.h>
2+
3+ int main (void ) {
4+ float f ;
5+
6+ assert (f * f > 28 );
7+
8+ return 0 ;
9+ }
10+
Original file line number Diff line number Diff line change 1+ CORE smt-backend
2+ main.c
3+ --smt2
4+ ^EXIT=10$
5+ ^SIGNAL=0$
6+ --
7+ Tests a floating-point operation encoding for SMT2 without --fpa.
8+ Owing to heavy use of sharing, this requires sharing-aware hashing.
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ Author: Daniel Kroening, kroening@kroening.com
1616#include < util/std_expr.h>
1717#include < util/byte_operators.h>
1818
19+ #ifndef HASH_CODE
20+ #include < util/irep_hash_container.h>
21+ #endif
22+
1923#include < solvers/prop/prop_conv.h>
2024#include < solvers/flattening/boolbv_width.h>
2125#include < solvers/flattening/pointer_logic.h>
@@ -181,7 +185,12 @@ class smt2_convt:public prop_convt
181185 symbol_exprt let_symbol;
182186 };
183187
188+ #ifdef HASH_CODE
184189 typedef std::unordered_map<exprt, let_count_idt, irep_hash> seen_expressionst;
190+ #else
191+ typedef irep_hash_mapt<exprt, let_count_idt> seen_expressionst;
192+ #endif
193+
185194 std::size_t let_id_count;
186195 static const std::size_t LET_COUNT = 2 ;
187196
You can’t perform that action at this time.
0 commit comments