MCPcopy Create free account
hub / github.com/Z3Prover/z3 / tst_expr_arith

Function tst_expr_arith

src/test/expr_rand.cpp:19–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17static unsigned rand_seed = 1;
18
19void tst_expr_arith(unsigned num_files) {
20 ast_manager m;
21 reg_decl_plugins(m);
22
23 expr_rand er(m);
24 er.seed(rand_seed);
25 er.initialize_arith(20);
26
27 family_id fid = m.mk_family_id("arith");
28 sort* int_ty = m.mk_sort(fid, INT_SORT, 0, nullptr);
29 sort* real_ty = m.mk_sort(fid, REAL_SORT, 0, nullptr);
30
31 er.initialize_array(3, int_ty, int_ty);
32 er.initialize_array(3, int_ty, real_ty);
33
34 er.initialize_basic(20);
35
36 for (unsigned i = 0; i < num_files; ++i) {
37 expr_ref e(m);
38 er.get_next(m.mk_bool_sort(), e);
39 ast_smt_pp pp(m);
40
41 pp.set_logic(symbol("QF_AUFLIA"));
42 std::ostringstream buffer;
43 buffer << "random_arith_" << i << ".smt2";
44 std::cout << buffer.str() << "\n";
45 std::ofstream file(buffer.str());
46 pp.display_smt2(file, e.get());
47 file.close();
48 }
49
50}
51
52void tst_expr_rand(unsigned num_files) {
53 ast_manager m;

Callers 1

tst_expr_randFunction · 0.85

Calls 15

reg_decl_pluginsFunction · 0.85
seedMethod · 0.80
initialize_arithMethod · 0.80
initialize_arrayMethod · 0.80
initialize_basicMethod · 0.80
getMethod · 0.65
symbolClass · 0.50
mk_family_idMethod · 0.45
mk_sortMethod · 0.45
get_nextMethod · 0.45
mk_bool_sortMethod · 0.45
set_logicMethod · 0.45

Tested by

no test coverage detected