mirror of
https://github.com/Z3Prover/z3
synced 2025-12-01 01:37:13 +00:00
add sls-sms solver
This commit is contained in:
parent
586343ce64
commit
1cd95e9db4
3 changed files with 212 additions and 19 deletions
46
src/ast/sls/sls_smt_solver.h
Normal file
46
src/ast/sls/sls_smt_solver.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/*++
|
||||
Copyright (c) 2024 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
sls_smt_solver.h
|
||||
|
||||
Abstract:
|
||||
|
||||
A Stochastic Local Search (SLS) Solver.
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2024-07-10
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
#include "ast/sls/sls_context.h"
|
||||
#include "ast/sls/sat_ddfw.h"
|
||||
|
||||
|
||||
namespace sls {
|
||||
|
||||
class smt_solver {
|
||||
ast_manager& m;
|
||||
class solver_ctx;
|
||||
sat::ddfw m_ddfw;
|
||||
solver_ctx* m_solver_ctx = nullptr;
|
||||
expr_ref_vector m_assertions;
|
||||
statistics m_st;
|
||||
obj_map<expr, sat::bool_var> m_expr2var;
|
||||
|
||||
sat::literal mk_literal(expr* e);
|
||||
public:
|
||||
smt_solver(ast_manager& m, params_ref const& p);
|
||||
~smt_solver();
|
||||
void assert_expr(expr* e);
|
||||
lbool check();
|
||||
model_ref get_model();
|
||||
void updt_params(params_ref& p) {}
|
||||
void collect_statistics(statistics& st) { st.copy(m_st); }
|
||||
std::ostream& display(std::ostream& out);
|
||||
void reset_statistics() { m_st.reset(); }
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue