#include "expr/node_algorithm.h"
#include "smt/env.h"
+#include "smt/smt_engine.h"
#include "theory/theory_engine.h"
#include "theory/theory_model.h"
d_symsInAssertions(env.getUserContext())
{
}
-const Options& PreprocessingPassContext::getOptions()
+const Options& PreprocessingPassContext::getOptions() const
{
return d_env.getOptions();
}
-const LogicInfo& PreprocessingPassContext::getLogicInfo()
+const LogicInfo& PreprocessingPassContext::getLogicInfo() const
{
return d_env.getLogicInfo();
}
-theory::Rewriter* PreprocessingPassContext::getRewriter()
+theory::Rewriter* PreprocessingPassContext::getRewriter() const
{
return d_env.getRewriter();
}
theory::TrustSubstitutionMap&
-PreprocessingPassContext::getTopLevelSubstitutions()
+PreprocessingPassContext::getTopLevelSubstitutions() const
{
return d_env.getTopLevelSubstitutions();
}
-context::Context* PreprocessingPassContext::getUserContext()
+TheoryEngine* PreprocessingPassContext::getTheoryEngine() const
+{
+ return d_smt->getTheoryEngine();
+}
+prop::PropEngine* PreprocessingPassContext::getPropEngine() const
+{
+ return d_smt->getPropEngine();
+}
+context::Context* PreprocessingPassContext::getUserContext() const
{
return d_env.getUserContext();
}
-context::Context* PreprocessingPassContext::getDecisionContext()
+context::Context* PreprocessingPassContext::getDecisionContext() const
{
return d_env.getContext();
}
d_llm.notifyLearnedLiteral(lit);
}
-std::vector<Node> PreprocessingPassContext::getLearnedLiterals()
+std::vector<Node> PreprocessingPassContext::getLearnedLiterals() const
{
return d_llm.getLearnedLiterals();
}
getTopLevelSubstitutions().addSubstitution(lhs, rhs, id, {}, args);
}
-ProofNodeManager* PreprocessingPassContext::getProofNodeManager()
+ProofNodeManager* PreprocessingPassContext::getProofNodeManager() const
{
return d_env.getProofNodeManager();
}
#include "context/cdhashset.h"
#include "preprocessing/learned_literal_manager.h"
-#include "smt/smt_engine.h"
+#include "theory/logic_info.h"
#include "util/resource_manager.h"
namespace cvc5 {
+
+class Env;
class SmtEngine;
class TheoryEngine;
+
+namespace theory {
+class Rewriter;
+}
+
namespace theory::booleans {
class CircuitPropagator;
}
+
namespace prop {
class PropEngine;
}
+
namespace preprocessing {
class PreprocessingPassContext
{
public:
+ /** Constructor. */
PreprocessingPassContext(
SmtEngine* smt,
Env& env,
theory::booleans::CircuitPropagator* circuitPropagator);
- SmtEngine* getSmt() { return d_smt; }
- TheoryEngine* getTheoryEngine() { return d_smt->getTheoryEngine(); }
- prop::PropEngine* getPropEngine() { return d_smt->getPropEngine(); }
- context::Context* getUserContext();
- context::Context* getDecisionContext();
+ /** Get the associated SmtEngine. */
+ SmtEngine* getSmt() const { return d_smt; }
- theory::booleans::CircuitPropagator* getCircuitPropagator()
+ /** Get the associated TheoryEngine. */
+ TheoryEngine* getTheoryEngine() const;
+ /** Get the associated Propengine. */
+ prop::PropEngine* getPropEngine() const;
+ /** Get the current user context. */
+ context::Context* getUserContext() const;
+ /** Get the current decision context. */
+ context::Context* getDecisionContext() const;
+
+ /** Get the associated circuit propagator. */
+ theory::booleans::CircuitPropagator* getCircuitPropagator() const
{
return d_circuitPropagator;
}
- context::CDHashSet<Node>& getSymsInAssertions() { return d_symsInAssertions; }
+ /**
+ * Get the (user-context-dependent) set of symbols that occur in at least one
+ * assertion in the current user context.
+ */
+ const context::CDHashSet<Node>& getSymsInAssertions() const
+ {
+ return d_symsInAssertions;
+ }
+ /** Spend resource in the resource manager of the associated Env. */
void spendResource(Resource r);
/** Get the options of the environment */
- const Options& getOptions();
+ const Options& getOptions() const;
/** Get the current logic info of the environment */
- const LogicInfo& getLogicInfo();
+ const LogicInfo& getLogicInfo() const;
/** Get a pointer to the Rewriter owned by the associated Env. */
- theory::Rewriter* getRewriter();
+ theory::Rewriter* getRewriter() const;
/** Get a reference to the top-level substitution map */
- theory::TrustSubstitutionMap& getTopLevelSubstitutions();
+ theory::TrustSubstitutionMap& getTopLevelSubstitutions() const;
/** Record symbols in assertions
*
/**
* Get the learned literals
*/
- std::vector<Node> getLearnedLiterals();
+ std::vector<Node> getLearnedLiterals() const;
/**
* Add substitution to the top-level substitutions, which also as a
* consequence is used by the theory model.
const std::vector<Node>& args);
/** The the proof node manager associated with this context, if it exists */
- ProofNodeManager* getProofNodeManager();
+ ProofNodeManager* getProofNodeManager() const;
private:
/** Pointer to the SmtEngine that this context was created in. */