mirror of
https://github.com/Z3Prover/z3
synced 2025-10-03 22:43:56 +00:00
Add virtual translate method to solver_factory class (#7780)
* Initial plan * Add virtual translate method to solver_factory base class and all implementations Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Add documentation for the translate method in solver_factory Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
237891c901
commit
eb7fd9efaa
5 changed files with 32 additions and 0 deletions
|
@ -390,6 +390,11 @@ public:
|
|||
solver * operator()(ast_manager & m, params_ref const & p, bool proofs_enabled, bool models_enabled, bool unsat_core_enabled, symbol const & logic) override {
|
||||
return mk_tactic2solver(m, m_tactic.get(), p, proofs_enabled, models_enabled, unsat_core_enabled, logic);
|
||||
}
|
||||
|
||||
solver_factory* translate(ast_manager& m) override {
|
||||
tactic* translated_tactic = m_tactic->translate(m);
|
||||
return alloc(tactic2solver_factory, translated_tactic);
|
||||
}
|
||||
};
|
||||
|
||||
class tactic_factory2solver_factory : public solver_factory {
|
||||
|
@ -402,6 +407,10 @@ public:
|
|||
tactic * t = (*m_factory)(m, p);
|
||||
return mk_tactic2solver(m, t, p, proofs_enabled, models_enabled, unsat_core_enabled, logic);
|
||||
}
|
||||
|
||||
solver_factory* translate(ast_manager& m) override {
|
||||
return alloc(tactic_factory2solver_factory, m_factory);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue