3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

working on new parameter framework

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-12-01 15:54:34 -08:00
parent be5f933201
commit 589f096e6e
36 changed files with 436 additions and 377 deletions

View file

@ -17,6 +17,7 @@ Revision History:
--*/
#include"proto_model.h"
#include"model_params.hpp"
#include"ast_pp.h"
#include"ast_ll_pp.h"
#include"var_subst.h"
@ -26,15 +27,16 @@ Revision History:
#include"model_v2_pp.h"
#include"basic_simplifier_plugin.h"
proto_model::proto_model(ast_manager & m, simplifier & s, model_params const & p):
proto_model::proto_model(ast_manager & m, simplifier & s, params_ref const & p):
model_core(m),
m_params(p),
m_asts(m),
m_simplifier(s),
m_afid(m.get_family_id(symbol("array"))) {
register_factory(alloc(basic_factory, m));
m_user_sort_factory = alloc(user_sort_factory, m);
register_factory(m_user_sort_factory);
m_model_partial = model_params(p).partial();
}
void proto_model::reset_finterp() {
@ -620,7 +622,7 @@ void proto_model::complete_partial_func(func_decl * f) {
\brief Set the (else) field of function interpretations...
*/
void proto_model::complete_partial_funcs() {
if (m_params.m_model_partial)
if (m_model_partial)
return;
// m_func_decls may be "expanded" when we invoke get_some_value.

View file

@ -29,16 +29,15 @@ Revision History:
#define _PROTO_MODEL_H_
#include"model_core.h"
#include"model_params.h"
#include"value_factory.h"
#include"plugin_manager.h"
#include"simplifier.h"
#include"arith_decl_plugin.h"
#include"func_decl_dependencies.h"
#include"model.h"
#include"params.h"
class proto_model : public model_core {
model_params const & m_params;
ast_ref_vector m_asts;
plugin_manager<value_factory> m_factories;
user_sort_factory * m_user_sort_factory;
@ -47,6 +46,8 @@ class proto_model : public model_core {
func_decl_set m_aux_decls;
ptr_vector<expr> m_tmp;
bool m_model_partial;
void reset_finterp();
expr * mk_some_interp_for(func_decl * d);
@ -60,11 +61,9 @@ class proto_model : public model_core {
public:
proto_model(ast_manager & m, simplifier & s, model_params const & p);
proto_model(ast_manager & m, simplifier & s, params_ref const & p = params_ref());
virtual ~proto_model();
model_params const & get_model_params() const { return m_params; }
void register_factory(value_factory * f) { m_factories.register_plugin(f); }
bool eval(expr * e, expr_ref & result, bool model_completion = false);

View file

@ -48,7 +48,8 @@ namespace smt {
void model_generator::init_model() {
SASSERT(!m_model);
m_model = alloc(proto_model, m_manager, m_context->get_simplifier(), m_context->get_fparams());
// PARAM-TODO
m_model = alloc(proto_model, m_manager, m_context->get_simplifier()); // , m_context->get_fparams());
ptr_vector<theory>::const_iterator it = m_context->begin_theories();
ptr_vector<theory>::const_iterator end = m_context->end_theories();
for (; it != end; ++it) {