mirror of
https://github.com/Z3Prover/z3
synced 2026-02-22 00:07:36 +00:00
Merge pull request #8711 from Z3Prover/copilot/simplify-finite-set-plugin
Cleanup: finite set decl plugin cosmetic simplifications
This commit is contained in:
commit
33f76b839f
2 changed files with 4 additions and 7 deletions
|
|
@ -16,7 +16,7 @@ Author:
|
|||
Revision History:
|
||||
|
||||
--*/
|
||||
#include<sstream>
|
||||
#include <sstream>
|
||||
#include "ast/finite_set_decl_plugin.h"
|
||||
#include "ast/arith_decl_plugin.h"
|
||||
#include "ast/array_decl_plugin.h"
|
||||
|
|
@ -24,8 +24,7 @@ Revision History:
|
|||
#include "ast/ast_pp.h"
|
||||
#include "util/warning.h"
|
||||
|
||||
finite_set_decl_plugin::finite_set_decl_plugin():
|
||||
m_init(false) {
|
||||
finite_set_decl_plugin::finite_set_decl_plugin() {
|
||||
m_names.resize(LAST_FINITE_SET_OP, nullptr);
|
||||
m_names[OP_FINITE_SET_EMPTY] = "set.empty";
|
||||
m_names[OP_FINITE_SET_SINGLETON] = "set.singleton";
|
||||
|
|
@ -279,11 +278,11 @@ bool finite_set_decl_plugin::is_value(app * e) const {
|
|||
continue;
|
||||
}
|
||||
|
||||
// Check if it's a union, intersection, or difference
|
||||
bool is_setop =
|
||||
is_app_of(a, m_family_id, OP_FINITE_SET_UNION)
|
||||
|| is_app_of(a, m_family_id, OP_FINITE_SET_INTERSECT)
|
||||
|| is_app_of(a, m_family_id, OP_FINITE_SET_DIFFERENCE);
|
||||
// Check if it's a union
|
||||
if (is_setop) {
|
||||
// Add arguments to todo list
|
||||
for (auto arg : *a)
|
||||
|
|
@ -297,8 +296,6 @@ bool finite_set_decl_plugin::is_value(app * e) const {
|
|||
return false;
|
||||
continue;
|
||||
}
|
||||
|
||||
// can add also ranges where lo and hi are values.
|
||||
|
||||
// If it's none of the above, it's not a value
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ enum finite_set_op_kind {
|
|||
class finite_set_decl_plugin : public decl_plugin {
|
||||
ptr_vector<polymorphism::psig> m_sigs;
|
||||
svector<char const*> m_names;
|
||||
bool m_init = false;
|
||||
bool m_init{false};
|
||||
|
||||
void init();
|
||||
func_decl * mk_empty(sort* set_sort);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue