mirror of
https://github.com/Z3Prover/z3
synced 2025-11-03 21:09:11 +00:00
Revert "Add finite_set_value_factory for creating finite set values in model …"
This reverts commit 05ffc0a77b.
This commit is contained in:
parent
05ffc0a77b
commit
858a3134fa
4 changed files with 0 additions and 91 deletions
|
|
@ -2,7 +2,6 @@ z3_add_component(model
|
||||||
SOURCES
|
SOURCES
|
||||||
array_factory.cpp
|
array_factory.cpp
|
||||||
datatype_factory.cpp
|
datatype_factory.cpp
|
||||||
finite_set_value_factory.cpp
|
|
||||||
func_interp.cpp
|
func_interp.cpp
|
||||||
model2expr.cpp
|
model2expr.cpp
|
||||||
model_core.cpp
|
model_core.cpp
|
||||||
|
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
/*++
|
|
||||||
Copyright (c) 2025 Microsoft Corporation
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
finite_set_value_factory.cpp
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Factory for creating finite set values
|
|
||||||
|
|
||||||
--*/
|
|
||||||
#include "model/finite_set_value_factory.h"
|
|
||||||
#include "model/model_core.h"
|
|
||||||
|
|
||||||
finite_set_value_factory::finite_set_value_factory(ast_manager & m, family_id fid, model_core & md):
|
|
||||||
struct_factory(m, fid, md),
|
|
||||||
u(m) {
|
|
||||||
}
|
|
||||||
|
|
||||||
expr * finite_set_value_factory::get_some_value(sort * s) {
|
|
||||||
// Check if we already have a value for this sort
|
|
||||||
value_set * set = nullptr;
|
|
||||||
SASSERT(u.is_finite_set(s));
|
|
||||||
#if 0
|
|
||||||
if (m_sort2value_set.find(s, set) && !set->empty())
|
|
||||||
return *(set->begin());
|
|
||||||
#endif
|
|
||||||
return u.mk_empty(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr * finite_set_value_factory::get_fresh_value(sort * s) {
|
|
||||||
sort* elem_sort = nullptr;
|
|
||||||
VERIFY(u.is_finite_set(s, elem_sort));
|
|
||||||
// Get a fresh value for a finite set sort
|
|
||||||
|
|
||||||
return nullptr;
|
|
||||||
#if 0
|
|
||||||
value_set * set = get_value_set(s);
|
|
||||||
|
|
||||||
// If no values have been generated yet, use get_some_value
|
|
||||||
if (set->empty()) {
|
|
||||||
auto r = u.mk_empty(s);
|
|
||||||
register_value(r);
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
auto e = md.get_fresh_value(elem_sort);
|
|
||||||
if (e) {
|
|
||||||
auto r = u.mk_singleton(e);
|
|
||||||
register_value(r);
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
// For finite domains, we may not be able to generate fresh values
|
|
||||||
// if all values have been exhausted
|
|
||||||
return nullptr;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
/*++
|
|
||||||
Copyright (c) 2025 Microsoft Corporation
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
finite_set_value_factory.h
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Factory for creating finite set values
|
|
||||||
|
|
||||||
--*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "model/struct_factory.h"
|
|
||||||
#include "ast/finite_set_decl_plugin.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Factory for finite set values.
|
|
||||||
*/
|
|
||||||
class finite_set_value_factory : public struct_factory {
|
|
||||||
finite_set_util u;
|
|
||||||
public:
|
|
||||||
finite_set_value_factory(ast_manager & m, family_id fid, model_core & md);
|
|
||||||
|
|
||||||
expr * get_some_value(sort * s) override;
|
|
||||||
|
|
||||||
expr * get_fresh_value(sort * s) override;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
@ -40,7 +40,6 @@ Revision History:
|
||||||
#include "model/numeral_factory.h"
|
#include "model/numeral_factory.h"
|
||||||
#include "model/fpa_factory.h"
|
#include "model/fpa_factory.h"
|
||||||
#include "model/char_factory.h"
|
#include "model/char_factory.h"
|
||||||
#include "model/finite_set_value_factory.h"
|
|
||||||
|
|
||||||
|
|
||||||
model::model(ast_manager & m):
|
model::model(ast_manager & m):
|
||||||
|
|
@ -112,7 +111,6 @@ value_factory* model::get_factory(sort* s) {
|
||||||
m_factories.register_plugin(alloc(arith_factory, m));
|
m_factories.register_plugin(alloc(arith_factory, m));
|
||||||
m_factories.register_plugin(alloc(seq_factory, m, su.get_family_id(), *this));
|
m_factories.register_plugin(alloc(seq_factory, m, su.get_family_id(), *this));
|
||||||
m_factories.register_plugin(alloc(fpa_value_factory, m, fu.get_family_id()));
|
m_factories.register_plugin(alloc(fpa_value_factory, m, fu.get_family_id()));
|
||||||
m_factories.register_plugin(alloc(finite_set_value_factory, m, m.mk_family_id("finite_set"), *this));
|
|
||||||
//m_factories.register_plugin(alloc(char_factory, m, char_decl_plugin(m).get_family_id());
|
//m_factories.register_plugin(alloc(char_factory, m, char_decl_plugin(m).get_family_id());
|
||||||
}
|
}
|
||||||
family_id fid = s->get_family_id();
|
family_id fid = s->get_family_id();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue