3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-03 01:40:22 +00:00

re-organize proof and model converters to be associated with goals instead of external

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-11-18 16:33:54 -08:00
parent 00f5308a0e
commit 4bbece6616
118 changed files with 617 additions and 1070 deletions

View file

@ -19,10 +19,10 @@ Notes:
#ifndef MODEL_CONVERTER_H_
#define MODEL_CONVERTER_H_
#include "util/ref.h"
#include "ast/ast_pp_util.h"
#include "model/model.h"
#include "tactic/converter.h"
#include "util/ref.h"
class labels_vec : public svector<symbol> {};
class smt2_pp_environment;
@ -36,17 +36,11 @@ protected:
public:
model_converter(): m_env(0) {}
model_converter(): m_env(nullptr) {}
virtual void operator()(model_ref & m) {} // TODO: delete
virtual void operator()(model_ref & m) = 0;
virtual void operator()(model_ref & m, unsigned goal_idx) {
// TODO: make it virtual after the transition to goal/tactic/tactical is complete
SASSERT(goal_idx == 0);
operator()(m);
}
virtual void operator()(labels_vec & r, unsigned goal_idx) {}
virtual void operator()(labels_vec & r) {}
virtual model_converter * translate(ast_translation & translator) = 0;
@ -61,25 +55,18 @@ public:
};
typedef ref<model_converter> model_converter_ref;
typedef sref_vector<model_converter> model_converter_ref_vector;
typedef sref_buffer<model_converter> model_converter_ref_buffer;
model_converter * concat(model_converter * mc1, model_converter * mc2);
/**
\brief \c mc1 is the model converter for a sequence of subgoals of size \c num.
Given an i in [0, num), mc2s[i] is the model converter for subgoal i,
and num_subgoals[i] is the number of subgoals of subgoals[i].
*/
model_converter * concat(model_converter * mc1, unsigned num, model_converter * const * mc2s, unsigned * num_subgoals);
model_converter * model2model_converter(model * m);
model_converter * model_and_labels2model_converter(model * m, buffer<symbol> &r);
void model_converter2model(ast_manager & mng, model_converter * mc, model_ref & m);
void apply(model_converter_ref & mc, model_ref & m, unsigned gidx);
void apply(model_converter_ref & mc, model_ref & m);
typedef sref_vector<model_converter> model_converter_ref_vector;
typedef sref_buffer<model_converter> model_converter_ref_buffer;
#endif