mirror of
https://github.com/Z3Prover/z3
synced 2025-08-16 16:27:11 +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:
parent
00f5308a0e
commit
4bbece6616
118 changed files with 617 additions and 1070 deletions
|
@ -24,8 +24,6 @@ Notes:
|
|||
#include "tactic/goal.h"
|
||||
#include "util/params.h"
|
||||
#include "util/statistics.h"
|
||||
#include "tactic/model_converter.h"
|
||||
#include "tactic/proof_converter.h"
|
||||
#include "tactic/tactic_exception.h"
|
||||
#include "util/lbool.h"
|
||||
|
||||
|
@ -50,19 +48,7 @@ public:
|
|||
|
||||
The list of resultant subgoals is stored in \c result.
|
||||
The content of \c in may be destroyed during the operation.
|
||||
|
||||
The resultant model converter \c mc can be used to convert a model for one of the returned subgoals
|
||||
into a model for \in. If mc == 0, then model construction is disabled or any model for a subgoal
|
||||
of \c in is also a model for \c in.
|
||||
If \c result is decided_sat (i.e., it contains a single empty subgoal), then
|
||||
the model converter is just wrapping the model.
|
||||
|
||||
The resultant proof converter \c pc can be used to convert proofs for each subgoal in \c result
|
||||
into a proof for \c in. If pc == 0, then one of the following conditions should hold:
|
||||
1- proof construction is disabled,
|
||||
2- result contains a single subgoal, and any proof of unsatisfiability for this subgoal is a proof for \c in.
|
||||
3- result is an decided_unsat (i.e., it contains a single unsat subgoal). The actual proof can be extracted from this goal.
|
||||
|
||||
|
||||
The output parameter \c core is used to accumulate the unsat core of closed subgoals.
|
||||
It must be 0 if dependency tracking is disabled, or the result is decided unsat, or
|
||||
no tagged assertions were used to close any subgoal.
|
||||
|
@ -77,7 +63,6 @@ public:
|
|||
*/
|
||||
virtual void operator()(/* in */ goal_ref const & in,
|
||||
/* out */ goal_ref_buffer & result,
|
||||
/* out */ model_converter_ref & mc,
|
||||
/* out */ expr_dependency_ref & core) = 0;
|
||||
|
||||
virtual void collect_statistics(statistics & st) const {}
|
||||
|
@ -118,9 +103,9 @@ void report_tactic_progress(char const * id, unsigned val);
|
|||
|
||||
class skip_tactic : public tactic {
|
||||
public:
|
||||
virtual void operator()(goal_ref const & in, goal_ref_buffer & result, model_converter_ref & mc, expr_dependency_ref & core);
|
||||
virtual void cleanup() {}
|
||||
virtual tactic * translate(ast_manager & m) { return this; }
|
||||
void operator()(goal_ref const & in, goal_ref_buffer & result, expr_dependency_ref & core) override;
|
||||
void cleanup() override {}
|
||||
tactic * translate(ast_manager & m) override { return this; }
|
||||
};
|
||||
|
||||
tactic * mk_skip_tactic();
|
||||
|
@ -151,8 +136,8 @@ public:
|
|||
|
||||
#define MK_SIMPLE_TACTIC_FACTORY(NAME, ST) MK_TACTIC_FACTORY(NAME, return ST;)
|
||||
|
||||
void exec(tactic & t, goal_ref const & in, goal_ref_buffer & result, model_converter_ref & mc, expr_dependency_ref & core);
|
||||
lbool check_sat(tactic & t, goal_ref & g, model_ref & md, model_converter_ref& mc, labels_vec & labels, proof_ref & pr, expr_dependency_ref & core, std::string & reason_unknown);
|
||||
void exec(tactic & t, goal_ref const & in, goal_ref_buffer & result, expr_dependency_ref & core);
|
||||
lbool check_sat(tactic & t, goal_ref & g, model_ref & md, labels_vec & labels, proof_ref & pr, expr_dependency_ref & core, std::string & reason_unknown);
|
||||
|
||||
// Throws an exception if goal \c in requires proof generation.
|
||||
void fail_if_proof_generation(char const * tactic_name, goal_ref const & in);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue