mirror of
https://github.com/Z3Prover/z3
synced 2025-08-20 02:00:22 +00:00
- add sat.smt option to enable the new incremental core (it is not ready for mainstream consumption as cloning and other features are not implemented and it hasn't been tested in any detail yet). - move "name" into attribute on simplifier so it can be reused for diagnostics by the seq-simplifier.
43 lines
976 B
C++
43 lines
976 B
C++
/*++
|
|
Copyright (c) 2022 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
card2bv.h
|
|
|
|
Abstract:
|
|
|
|
convert cardinality constraints to bit-vectors
|
|
|
|
Author:
|
|
|
|
Nikolaj Bjorner (nbjorner) 2022-11-24
|
|
|
|
|
|
--*/
|
|
|
|
#pragma once
|
|
|
|
#include "ast/simplifiers/dependent_expr_state.h"
|
|
#include "ast/rewriter/th_rewriter.h"
|
|
|
|
|
|
class card2bv : public dependent_expr_simplifier {
|
|
|
|
struct stats {
|
|
unsigned m_num_rewrites = 0;
|
|
void reset() { memset(this, 0, sizeof(*this)); }
|
|
};
|
|
|
|
stats m_stats;
|
|
params_ref m_params;
|
|
|
|
public:
|
|
card2bv(ast_manager& m, params_ref const& p, dependent_expr_state& fmls);
|
|
char const* name() const override { return "card2bv"; }
|
|
void reduce() override;
|
|
void collect_statistics(statistics& st) const override;
|
|
void reset_statistics() override { m_stats.reset(); }
|
|
void updt_params(params_ref const& p) override { m_params.append(p); }
|
|
void collect_param_descrs(param_descrs& r) override;
|
|
};
|