GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/builtin/theory_builtin.cpp Lines: 10 12 83.3 %
Date: 2021-03-22 Branches: 11 22 50.0 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file theory_builtin.cpp
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Andrew Reynolds, Mudathir Mohamed, Morgan Deters
6
 ** This file is part of the CVC4 project.
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.\endverbatim
11
 **
12
 ** \brief Implementation of the builtin theory.
13
 **
14
 ** Implementation of the builtin theory.
15
 **/
16
17
#include "theory/builtin/theory_builtin.h"
18
19
#include "expr/kind.h"
20
#include "expr/proof_node_manager.h"
21
#include "theory/builtin/theory_builtin_rewriter.h"
22
#include "theory/theory_model.h"
23
#include "theory/valuation.h"
24
25
using namespace std;
26
27
namespace CVC4 {
28
namespace theory {
29
namespace builtin {
30
31
8995
TheoryBuiltin::TheoryBuiltin(context::Context* c,
32
                             context::UserContext* u,
33
                             OutputChannel& out,
34
                             Valuation valuation,
35
                             const LogicInfo& logicInfo,
36
8995
                             ProofNodeManager* pnm)
37
8995
    : Theory(THEORY_BUILTIN, c, u, out, valuation, logicInfo, pnm)
38
{
39
8995
  ProofChecker* pc = pnm != nullptr ? pnm->getChecker() : nullptr;
40
8995
  if (pc != nullptr)
41
  {
42
    // add checkers
43
962
    d_bProofChecker.registerTo(pc);
44
  }
45
8995
}
46
47
std::string TheoryBuiltin::identify() const
48
{
49
  return std::string("TheoryBuiltin");
50
}
51
52
8995
void TheoryBuiltin::finishInit()
53
{
54
  // Notice that choice is an unevaluated kind belonging to this theory.
55
  // However, it should be set as an unevaluated kind where it is used, e.g.
56
  // in the quantifiers theory. This ensures that a logic like QF_LIA, which
57
  // includes the builtin theory, does not mark any kinds as unevaluated and
58
  // hence it is easy to check for illegal eliminations via TheoryModel
59
  // (see TheoryModel::isLegalElimination) since there are no unevaluated kinds
60
  // present.
61
8995
}
62
63
}  // namespace builtin
64
}  // namespace theory
65
26676
}  // namespace CVC4