mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 00:55:31 +00:00
refactor closure code
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
58b16c5585
commit
06a858ef3d
6 changed files with 283 additions and 325 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "qe_util.h"
|
||||
#include "bool_rewriter.h"
|
||||
|
||||
namespace qe {
|
||||
void flatten_and(expr_ref_vector& result) {
|
||||
|
@ -113,4 +114,19 @@ namespace qe {
|
|||
result.push_back(fml);
|
||||
flatten_or(result);
|
||||
}
|
||||
|
||||
expr_ref mk_and(expr_ref_vector const& fmls) {
|
||||
ast_manager& m = fmls.get_manager();
|
||||
expr_ref result(m);
|
||||
bool_rewriter(m).mk_and(fmls.size(), fmls.c_ptr(), result);
|
||||
return result;
|
||||
}
|
||||
|
||||
expr_ref mk_or(expr_ref_vector const& fmls) {
|
||||
ast_manager& m = fmls.get_manager();
|
||||
expr_ref result(m);
|
||||
bool_rewriter(m).mk_or(fmls.size(), fmls.c_ptr(), result);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -33,5 +33,9 @@ namespace qe {
|
|||
|
||||
void flatten_or(expr* fml, expr_ref_vector& result);
|
||||
|
||||
expr_ref mk_and(expr_ref_vector const& fmls);
|
||||
|
||||
expr_ref mk_or(expr_ref_vector const& fmls);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue