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

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