GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/ee_manager.cpp Lines: 12 13 92.3 %
Date: 2021-03-23 Branches: 10 20 50.0 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file ee_manager.cpp
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Andrew Reynolds
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 Utilities for management of equality engines.
13
 **/
14
15
#include "theory/ee_manager.h"
16
17
#include "theory/theory_model.h"
18
19
namespace CVC4 {
20
namespace theory {
21
22
8997
EqEngineManager::EqEngineManager(TheoryEngine& te, SharedSolver& shs)
23
8997
    : d_te(te), d_sharedSolver(shs)
24
{
25
8997
}
26
27
116961
const EeTheoryInfo* EqEngineManager::getEeTheoryInfo(TheoryId tid) const
28
{
29
116961
  std::map<TheoryId, EeTheoryInfo>::const_iterator it = d_einfo.find(tid);
30
116961
  if (it != d_einfo.end())
31
  {
32
116961
    return &it->second;
33
  }
34
  return nullptr;
35
}
36
37
107921
eq::EqualityEngine* EqEngineManager::allocateEqualityEngine(EeSetupInfo& esi,
38
                                                            context::Context* c)
39
{
40
107921
  if (esi.d_notify != nullptr)
41
  {
42
    return new eq::EqualityEngine(
43
98924
        *esi.d_notify, c, esi.d_name, esi.d_constantsAreTriggers);
44
  }
45
  // the theory doesn't care about explicit notifications
46
8997
  return new eq::EqualityEngine(c, esi.d_name, esi.d_constantsAreTriggers);
47
}
48
49
}  // namespace theory
50
26685
}  // namespace CVC4