All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cvc5-cvc5-1.2.0.src.decision.decision_engine.cpp Maven / Gradle / Ivy

The newest version!
/******************************************************************************
 * Top contributors (to current version):
 *   Andrew Reynolds, Aina Niemetz
 *
 * This file is part of the cvc5 project.
 *
 * Copyright (c) 2009-2024 by the authors listed in the file AUTHORS
 * in the top-level source directory and their institutional affiliations.
 * All rights reserved.  See the file COPYING in the top-level source
 * directory for licensing information.
 * ****************************************************************************
 *
 * Decision engine.
 */
#include "decision/decision_engine.h"

#include "util/resource_manager.h"

namespace cvc5::internal {
namespace decision {

DecisionEngine::DecisionEngine(Env& env,
                               prop::CDCLTSatSolver* ss,
                               prop::CnfStream* cs)
    : EnvObj(env), d_satSolver(ss), d_cnfStream(cs)
{
}

prop::SatLiteral DecisionEngine::getNext(bool& stopSearch)
{
  resourceManager()->spendResource(Resource::DecisionStep);
  return getNextInternal(stopSearch);
}

DecisionEngineEmpty::DecisionEngineEmpty(Env& env)
    : DecisionEngine(env, nullptr, nullptr)
{
}
bool DecisionEngineEmpty::isDone() { return false; }
void DecisionEngineEmpty::addAssertions(const std::vector& lems) {}
prop::SatLiteral DecisionEngineEmpty::getNextInternal(bool& stopSearch)
{
  return prop::undefSatLiteral;
}

}  // namespace decision
}  // namespace cvc5::internal




© 2015 - 2024 Weber Informatics LLC | Privacy Policy