SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
Explanation.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "NLSATStatistics.h"
4 
7 
8 namespace smtrat {
9 namespace mcsat {
10 namespace nlsat {
11 
12 struct Explanation {
13 
14 #ifdef SMTRAT_DEVOPTION_Statistics
15  NLSATStatistics& mStatistics = statistics_get<NLSATStatistics>("mcsat-explanation-nlsat");
16 #endif
17  /**
18  * We construct a formula 'E -> I', i.e. 'e1 & e2 ... en -> i', called "Explanation",
19  * in its clausal form '-e1 v -e2 ... en v i',
20  * where e1, e2.. are @p reason Atoms and CAD cell bound atoms, and i is the @p implication.
21  * It "explains" why the assignment point in @p data is inconsistent with the
22  * @p reason atoms/constraints and the implication in that it constructs a whole region
23  * of assignments points, which the assignment point in @p data is a part of.
24  *
25  * @param variableOrdering Determine the order of variables, e.g. x1, x2, .. x10
26  * @param data Represent the assigned variables and their assigned values in different representations.
27  * These are a prefix of the @p variableOrdering, e.g. x1, x2, .. x5
28  * @param var The smallest/first variable in the @p variableOrdering that is not assigned by @p data, e.g. x6
29  * @param reason A collection of atoms that are inconsistent together or imply the @p implication.
30  * These atoms mention only variables x1, x2.. x6 (some atom definitely mentions x6) and possibly
31  * x7..x10 if they are irrelevant and "vanish" under the assignment in @p data,
32  * e.g. x1*x7+x6=0 (for x1 := 0) or x6*(x7^2+1)>0 (equiv to x6>0, since x7^2+1 > 0)
33  */
34  std::optional<mcsat::Explanation> operator()(const mcsat::Bookkeeping& data, carl::Variable var, const FormulasT& reason, bool) const;
35 };
36 
37 } // namespace nlsat
38 } // namespace mcsat
39 } // namespace smtrat
Represent the trail, i.e.
Definition: Bookkeeping.h:19
int var(Lit p)
Definition: SolverTypes.h:64
Class to create the formulas for axioms.
carl::Formulas< Poly > FormulasT
Definition: types.h:39
std::optional< mcsat::Explanation > operator()(const mcsat::Bookkeeping &data, carl::Variable var, const FormulasT &reason, bool) const
We construct a formula 'E -> I', i.e.
Definition: Explanation.cpp:11