mirror of
https://github.com/Z3Prover/z3
synced 2026-03-12 00:00:33 +00:00
plugin setting allows adding equality saturation within the E-graph propagation without involving externalizing theory solver dispatch. It makes equality saturation independent of SAT integration. Add a special relation operator to support ad-hoc AC symbols.
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
/*++
|
|
Copyright (c) 2020 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
euf_justification.cpp
|
|
|
|
Abstract:
|
|
|
|
justification structure for euf
|
|
|
|
Author:
|
|
|
|
Nikolaj Bjorner (nbjorner) 2020-08-23
|
|
|
|
--*/
|
|
|
|
|
|
#include "ast/euf/euf_justification.h"
|
|
#include "ast/euf/euf_enode.h"
|
|
|
|
namespace euf {
|
|
|
|
|
|
std::ostream& justification::display(std::ostream& out, std::function<void (std::ostream&, void*)> const& ext) const {
|
|
switch (m_kind) {
|
|
case kind_t::external_t:
|
|
if (ext)
|
|
ext(out, m_external);
|
|
else
|
|
out << "external";
|
|
return out;
|
|
case kind_t::axiom_t:
|
|
return out << "axiom";
|
|
case kind_t::congruence_t:
|
|
return out << "congruence";
|
|
case kind_t::dependent_t: {
|
|
vector<justification, false> js;
|
|
out << "dependent";
|
|
for (auto const& j : dependency_manager::s_linearize(m_dependency, js))
|
|
j.display(out << " ", ext);
|
|
return out;
|
|
}
|
|
case kind_t::equality_t:
|
|
return out << "equality #" << m_n1->get_id() << " == #" << m_n2->get_id();
|
|
|
|
default:
|
|
UNREACHABLE();
|
|
return out;
|
|
}
|
|
return out;
|
|
}
|
|
|
|
}
|