mirror of
https://github.com/Z3Prover/z3
synced 2026-02-18 06:34:22 +00:00
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
57 lines
1.5 KiB
C++
57 lines
1.5 KiB
C++
/*++
|
|
Copyright (c) 2020 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
sls_basic_plugin.h
|
|
|
|
Author:
|
|
|
|
Nikolaj Bjorner (nbjorner) 2024-07-05
|
|
|
|
--*/
|
|
#pragma once
|
|
|
|
#include "ast/sls/sls_context.h"
|
|
|
|
namespace sls {
|
|
|
|
class basic_plugin : public plugin {
|
|
expr_mark m_axiomatized;
|
|
|
|
bool is_basic(expr* e) const;
|
|
bool bval0(expr* e) const;
|
|
bool try_repair(app* e, unsigned i);
|
|
bool try_repair_xor(app* e, unsigned i);
|
|
bool try_repair_ite(app* e, unsigned i);
|
|
bool try_repair_distinct(app* e, unsigned i);
|
|
bool set_value(expr* e, bool b);
|
|
|
|
expr_ref eval_ite(app* e);
|
|
expr_ref eval_distinct(app* e);
|
|
expr_ref eval_xor(app* e);
|
|
|
|
public:
|
|
basic_plugin(context& ctx) :
|
|
plugin(ctx) {
|
|
m_fid = basic_family_id;
|
|
}
|
|
void register_term(expr* e) override;
|
|
expr_ref get_value(expr* e) override;
|
|
void initialize() override;
|
|
void propagate_literal(sat::literal lit) override;
|
|
bool propagate() override;
|
|
bool repair_down(app* e) override;
|
|
void repair_up(app* e) override;
|
|
void repair_literal(sat::literal lit) override;
|
|
bool is_sat() override;
|
|
|
|
void on_rescale() override {}
|
|
void on_restart() override {}
|
|
std::ostream& display(std::ostream& out) const override;
|
|
bool set_value(expr* e, expr* v) override;
|
|
void collect_statistics(statistics&) const override { }
|
|
void reset_statistics() override {}
|
|
};
|
|
|
|
}
|