mirror of
https://github.com/Z3Prover/z3
synced 2025-08-27 21:48:56 +00:00
* split sat2goal out of goal2sat These two classes need different things out of the sat::solver class, and separating them makes it easier to fiddle with their dependencies independently. I also fiddled with some headers to make it possible to include sat_solver_core.h instead of sat_solver.h. * limit solver_core methods to those needed by goal2sat And switch sat2goal and sat_tactic over to relying on the derived sat::solver class instead. There were no other uses of solver_core. I'm hoping this makes it feasible to reuse goal2sat's CNF conversion from places like the tseitin-cnf tactic, so they can be unified into a single implementation.
35 lines
818 B
C++
35 lines
818 B
C++
/*++
|
|
Copyright (c) 2020 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
sat_internalizer.h
|
|
|
|
Abstract:
|
|
|
|
Header for SMT theories over SAT solver
|
|
|
|
Author:
|
|
|
|
Nikolaj Bjorner (nbjorner) 2020-08-25
|
|
|
|
--*/
|
|
#pragma once
|
|
|
|
#include "util/sat_literal.h"
|
|
|
|
namespace sat {
|
|
class sat_internalizer {
|
|
public:
|
|
virtual ~sat_internalizer() {}
|
|
virtual bool is_bool_op(expr* e) const = 0;
|
|
virtual literal internalize(expr* e, bool learned) = 0;
|
|
virtual bool_var to_bool_var(expr* e) = 0;
|
|
virtual bool_var add_bool_var(expr* e) = 0;
|
|
virtual void cache(app* t, literal l) = 0;
|
|
virtual void uncache(literal l) = 0;
|
|
virtual void push() = 0;
|
|
virtual void pop(unsigned n) = 0;
|
|
virtual void set_expr2var_replay(obj_map<expr, sat::bool_var>* r) = 0;
|
|
};
|
|
}
|