mirror of
https://github.com/Z3Prover/z3
synced 2025-08-02 01:13:18 +00:00
introduce globally visible macro for controlling use of ternary, turn them off
This commit is contained in:
parent
c62c5e9d23
commit
154fed7783
7 changed files with 55 additions and 6 deletions
|
@ -125,8 +125,10 @@ namespace sat {
|
|||
in_coi |= m_in_coi.contains(lit.index());
|
||||
else if (js.is_binary_clause())
|
||||
in_coi = m_in_coi.contains(js.get_literal().index());
|
||||
#if ENABLE_TERNARY
|
||||
else if (js.is_ternary_clause())
|
||||
in_coi = m_in_coi.contains(js.get_literal1().index()) || m_in_coi.contains(js.get_literal2().index());
|
||||
#endif
|
||||
else
|
||||
UNREACHABLE(); // approach does not work for external justifications
|
||||
|
||||
|
@ -224,10 +226,12 @@ namespace sat {
|
|||
case justification::BINARY:
|
||||
add_dependency(j.get_literal());
|
||||
break;
|
||||
#if ENABLE_TERNARY
|
||||
case justification::TERNARY:
|
||||
add_dependency(j.get_literal1());
|
||||
add_dependency(j.get_literal2());
|
||||
break;
|
||||
#endif
|
||||
case justification::CLAUSE:
|
||||
for (auto lit : s.get_clause(j))
|
||||
if (s.value(lit) == l_false)
|
||||
|
@ -258,11 +262,13 @@ namespace sat {
|
|||
m_clause.push_back(l);
|
||||
m_clause.push_back(j.get_literal());
|
||||
break;
|
||||
#if ENABLE_TERNARY
|
||||
case justification::TERNARY:
|
||||
m_clause.push_back(l);
|
||||
m_clause.push_back(j.get_literal1());
|
||||
m_clause.push_back(j.get_literal2());
|
||||
break;
|
||||
#endif
|
||||
case justification::CLAUSE:
|
||||
s.get_clause(j).mark_used();
|
||||
IF_VERBOSE(3, verbose_stream() << "add core " << s.get_clause(j) << "\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue