GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/ee_manager.cpp Lines: 12 13 92.3 %
Date: 2021-11-07 Branches: 10 18 55.6 %

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
15273
EqEngineManager::EqEngineManager(Env& env, TheoryEngine& te, SharedSolver& shs)
24
15273
    : EnvObj(env), d_te(te), d_sharedSolver(shs)
25
{
26
15273
}
27
28
198549
const EeTheoryInfo* EqEngineManager::getEeTheoryInfo(TheoryId tid) const
29
{
30
198549
  std::map<TheoryId, EeTheoryInfo>::const_iterator it = d_einfo.find(tid);
31
198549
  if (it != d_einfo.end())
32
  {
33
198549
    return &it->second;
34
  }
35
  return nullptr;
36
}
37
38
182844
eq::EqualityEngine* EqEngineManager::allocateEqualityEngine(EeSetupInfo& esi,
39
                                                            context::Context* c)
40
{
41
182844
  if (esi.d_notify != nullptr)
42
  {
43
    return new eq::EqualityEngine(
44
167571
        d_env, c, *esi.d_notify, esi.d_name, esi.d_constantsAreTriggers);
45
  }
46
  // the theory doesn't care about explicit notifications
47
  return new eq::EqualityEngine(
48
15273
      d_env, c, esi.d_name, esi.d_constantsAreTriggers);
49
}
50
51
}  // namespace theory
52
31137
}  // namespace cvc5