Towards "learned rewrite" preprocessing pass / improvements to Int <-> BV.
{
}
-void LearnedLiteralManager::notifyLearnedLiteral(Node lit)
+void LearnedLiteralManager::notifyLearnedLiteral(TNode lit)
{
d_learnedLits.insert(lit);
Trace("pp-llm") << "LLM:notifyLearnedLiteral: " << lit << std::endl;
* It should be rewritten, and such that top level substitutions have
* been applied to it.
*/
- void notifyLearnedLiteral(Node lit);
+ void notifyLearnedLiteral(TNode lit);
/**
* Get learned literals, which returns the current set of learned literals
* provided to this class. These literals are refreshed so that the current
{
// Keep the literal
learned_literals[j++] = learned_literals[i];
+ // Its a literal that could not be processed as a substitution or
+ // conflict. In this case, we notify the context of the learned
+ // literal, which will process it with the learned literal manager.
+ d_preprocContext->notifyLearnedLiteral(learnedLiteral);
}
break;
}
: d_smt(smt),
d_env(env),
d_circuitPropagator(circuitPropagator),
+ d_llm(env.getTopLevelSubstitutions(),
+ env.getUserContext(),
+ env.getProofNodeManager()),
d_symsInAssertions(env.getUserContext())
{
}
}
}
+void PreprocessingPassContext::notifyLearnedLiteral(TNode lit)
+{
+ d_llm.notifyLearnedLiteral(lit);
+}
+
+std::vector<Node> PreprocessingPassContext::getLearnedLiterals()
+{
+ return d_llm.getLearnedLiterals();
+}
+
void PreprocessingPassContext::addSubstitution(const Node& lhs,
const Node& rhs,
ProofGenerator* pg)
#define CVC5__PREPROCESSING__PREPROCESSING_PASS_CONTEXT_H
#include "context/cdhashset.h"
+#include "preprocessing/learned_literal_manager.h"
#include "smt/smt_engine.h"
-#include "theory/trust_substitutions.h"
#include "util/resource_manager.h"
namespace cvc5 {
*/
void recordSymbolsInAssertions(const std::vector<Node>& assertions);
+ /**
+ * Notify learned literal. This method is called when a literal is
+ * entailed by the current set of assertions.
+ *
+ * It should be rewritten, and such that top level substitutions have
+ * been applied to it.
+ */
+ void notifyLearnedLiteral(TNode lit);
+ /**
+ * Get the learned literals
+ */
+ std::vector<Node> getLearnedLiterals();
/**
* Add substitution to the top-level substitutions, which also as a
* consequence is used by the theory model.
Env& d_env;
/** Instance of the circuit propagator */
theory::booleans::CircuitPropagator* d_circuitPropagator;
+ /**
+ * The learned literal manager
+ */
+ LearnedLiteralManager d_llm;
+
/**
* The (user-context-dependent) set of symbols that occur in at least one
* assertion in the current user context.