GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/decision/decision_engine.cpp Lines: 18 18 100.0 %
Date: 2021-11-07 Branches: 2 4 50.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Kshitij Bansal, Aina Niemetz, Andrew Reynolds
4
 *
5
 * This file is part of the cvc5 project.
6
 *
7
 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8
 * in the top-level source directory and their institutional affiliations.
9
 * All rights reserved.  See the file COPYING in the top-level source
10
 * directory for licensing information.
11
 * ****************************************************************************
12
 *
13
 * Decision engine.
14
 */
15
#include "decision/decision_engine.h"
16
17
#include "decision/decision_engine_old.h"
18
#include "options/decision_options.h"
19
#include "prop/sat_solver.h"
20
#include "smt/env.h"
21
#include "util/resource_manager.h"
22
23
namespace cvc5 {
24
namespace decision {
25
26
15340
DecisionEngine::DecisionEngine(Env& env)
27
15340
    : EnvObj(env), d_cnfStream(nullptr), d_satSolver(nullptr)
28
{
29
15340
}
30
31
15340
void DecisionEngine::finishInit(CDCLTSatSolverInterface* ss, CnfStream* cs)
32
{
33
15340
  d_satSolver = ss;
34
15340
  d_cnfStream = cs;
35
15340
}
36
37
3454001
prop::SatLiteral DecisionEngine::getNext(bool& stopSearch)
38
{
39
3454001
  resourceManager()->spendResource(Resource::DecisionStep);
40
3454001
  return getNextInternal(stopSearch);
41
}
42
43
2583
DecisionEngineEmpty::DecisionEngineEmpty(Env& env) : DecisionEngine(env) {}
44
22333
bool DecisionEngineEmpty::isDone() { return false; }
45
155321
void DecisionEngineEmpty::addAssertion(TNode assertion, bool isLemma) {}
46
7416
void DecisionEngineEmpty::addSkolemDefinition(TNode lem,
47
                                              TNode skolem,
48
                                              bool isLemma)
49
{
50
7416
}
51
2020032
prop::SatLiteral DecisionEngineEmpty::getNextInternal(bool& stopSearch)
52
{
53
2020032
  return undefSatLiteral;
54
}
55
56
}  // namespace decision
57
31137
}  // namespace cvc5