3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-11-03 13:07:53 +00:00

move sls core functionality to be independent of tactic

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2023-12-22 12:00:52 -08:00
parent 606a9a7409
commit e321643bf5
13 changed files with 60 additions and 56 deletions

View file

@ -1,47 +0,0 @@
/*++
Copyright (c) 2012 Microsoft Corporation
Module Name:
sls_powers.h
Abstract:
Power-of-2 module for SLS
Author:
Christoph (cwinter) 2012-02-29
Notes:
--*/
#pragma once
#include "util/mpz.h"
class powers : public u_map<mpz*> {
unsynch_mpz_manager & m;
public:
powers(unsynch_mpz_manager & m) : m(m) {}
~powers() {
for (iterator it = begin(); it != end(); it++) {
m.del(*it->m_value);
dealloc(it->m_value);
}
}
const mpz & operator()(unsigned n) {
u_map<mpz*>::iterator it = find_iterator(n);
if (it != end())
return *it->m_value;
else {
mpz * new_obj = alloc(mpz);
m.mul2k(m.mk_z(1), n, *new_obj);
insert(n, new_obj);
return *new_obj;
}
}
};