3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

faster saturation without backwards subsumption and using SOS-style set

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2013-02-24 21:52:10 -08:00
parent 0aa8df98a1
commit 562ae7bec5
5 changed files with 607 additions and 45 deletions

View file

@ -4,7 +4,8 @@ struct unsigned_le {
static bool le(unsigned i, unsigned j) { return i <= j; }
};
typedef heap_trie<unsigned, unsigned_le, unsigned > heap_trie_t;
typedef heap_trie<unsigned, unsigned_le, unsigned_hash, unsigned > heap_trie_t;
static void find_le(heap_trie_t& ht, unsigned num_keys, unsigned const* keys) {
statistics st;

View file

@ -10,6 +10,9 @@
#include <time.h>
#include <sstream>
static bool g_use_ordered_support = false;
static bool g_use_ordered_subsumption = false;
static bool g_use_support = false;
class hilbert_basis_validate {
ast_manager& m;
@ -241,6 +244,9 @@ static void saturate_basis(hilbert_basis& hb) {
signal(SIGINT, on_ctrl_c);
g_hb = &hb;
g_start_time = static_cast<double>(clock());
hb.set_use_ordered_support(g_use_ordered_support);
hb.set_use_support(g_use_support);
hb.set_use_ordered_subsumption(g_use_ordered_subsumption);
lbool is_sat = hb.saturate();
switch(is_sat) {
@ -505,6 +511,10 @@ static void tst15() {
void tst_hilbert_basis() {
std::cout << "hilbert basis test\n";
// tst3();
// return;
g_use_ordered_support = true;
if (true) {
tst1();
@ -531,4 +541,14 @@ void tst_hilbert_basis() {
else {
gorrila_test(0, 10, 7, 20, 11);
}
return;
std::cout << "ordered support\n";
g_use_ordered_support = true;
tst4();
std::cout << "non-ordered support\n";
g_use_ordered_support = false;
tst4();
}