mirror of
https://github.com/Z3Prover/z3
synced 2026-07-03 22:06:11 +00:00
Convert internal class enums to enum class for type safety (#8158)
* Initial plan * Convert plain enums to enum class in EUF module - Convert eq_status in euf::ac_plugin to enum class - Convert undo_kind in euf::ac_plugin to enum class - Convert undo_t in euf::arith_plugin to enum class - Convert to_merge_t in euf::egraph to enum class - Update all usage sites to use scoped enum syntax Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Convert more plain enums to enum class - Convert state enum in substitution class - Convert instruction enum in generic_model_converter class - Convert eq_type enum in bit2int class - Update all usage sites to use scoped enum syntax Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
31122b0c10
commit
ee037dcafe
11 changed files with 54 additions and 54 deletions
|
|
@ -88,15 +88,15 @@ namespace euf {
|
|||
|
||||
typedef ptr_vector<trail> trail_stack;
|
||||
|
||||
enum to_merge_t { to_merge_plain, to_merge_comm, to_justified, to_add_literal };
|
||||
enum class to_merge_t { to_merge_plain, to_merge_comm, to_justified, to_add_literal };
|
||||
struct to_merge {
|
||||
enode* a, * b;
|
||||
to_merge_t t;
|
||||
justification j;
|
||||
bool commutativity() const { return t == to_merge_comm; }
|
||||
to_merge(enode* a, enode* b, bool c) : a(a), b(b), t(c ? to_merge_comm : to_merge_plain) {}
|
||||
to_merge(enode* a, enode* b, justification j): a(a), b(b), t(to_justified), j(j) {}
|
||||
to_merge(enode* p, enode* ante): a(p), b(ante), t(to_add_literal) {}
|
||||
bool commutativity() const { return t == to_merge_t::to_merge_comm; }
|
||||
to_merge(enode* a, enode* b, bool c) : a(a), b(b), t(c ? to_merge_t::to_merge_comm : to_merge_t::to_merge_plain) {}
|
||||
to_merge(enode* a, enode* b, justification j): a(a), b(b), t(to_merge_t::to_justified), j(j) {}
|
||||
to_merge(enode* p, enode* ante): a(p), b(ante), t(to_merge_t::to_add_literal) {}
|
||||
};
|
||||
|
||||
struct stats {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue