mirror of
https://github.com/Z3Prover/z3
synced 2025-08-11 05:30:51 +00:00
wip - adding context equation solver
the solve_eqs_tactic is to be replaced by a re-implementation that uses solve_eqs in the simplifiers directory. The re-implementation should address efficiency issues with the previous code. At this point it punts on low level proofs. The plan is to use coarser dependency tracking instead of low level proofs for pre-processing. Dependencies can be converted into a proof hint representation that can be checked using a stronger checker.
This commit is contained in:
parent
ae2672f132
commit
4d8860c0bc
15 changed files with 416 additions and 117 deletions
58
src/ast/simplifiers/solve_context_eqs.h
Normal file
58
src/ast/simplifiers/solve_context_eqs.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*++
|
||||
Copyright (c) 2022 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
solve_context_eqs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
simplifier for solving equations within a context
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2022-11-2.
|
||||
|
||||
--*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ast/simplifiers/dependent_expr_state.h"
|
||||
#include "ast/simplifiers/extract_eqs.h"
|
||||
|
||||
namespace euf {
|
||||
|
||||
class solve_eqs;
|
||||
|
||||
|
||||
class solve_context_eqs {
|
||||
|
||||
ast_manager& m;
|
||||
dependent_expr_state& m_fmls;
|
||||
solve_eqs& m_solve_eqs;
|
||||
expr_mark m_and_pos, m_and_neg, m_or_pos, m_or_neg;
|
||||
expr_mark m_contains_v;
|
||||
ptr_vector<expr> m_todo;
|
||||
|
||||
typedef svector<std::pair<bool, expr*>> signed_expressions;
|
||||
|
||||
bool contains_v(expr* f) const { return m_contains_v.is_marked(f); }
|
||||
bool is_safe_eq(expr* e);
|
||||
bool is_safe_eq(unsigned recursion_depth, expr* f, bool sign, expr* e);
|
||||
bool is_safe_eq(expr* f, expr* e) { return is_safe_eq(0, f, false, e); }
|
||||
bool is_disjunctively_safe(unsigned recursion_depth, expr* f, bool sign, expr* e);
|
||||
bool contains_conjunctively(expr* f, bool sign, expr* e, signed_expressions& conjuncts);
|
||||
|
||||
void collect_nested_equalities(dependent_expr const& f, expr_mark& visited, dep_eq_vector& eqs);
|
||||
void init_contains(expr* v);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
solve_context_eqs(solve_eqs& s);
|
||||
|
||||
void collect_nested_equalities(dep_eq_vector& eqs);
|
||||
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue