summaryrefslogtreecommitdiff
path: root/src/theory/ee_setup_info.h
blob: 130241c4a9ab0903bf4221616da24fcfec80fb63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/******************************************************************************
 * Top contributors (to current version):
 *   Andrew Reynolds
 *
 * This file is part of the cvc5 project.
 *
 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
 * in the top-level source directory and their institutional affiliations.
 * All rights reserved.  See the file COPYING in the top-level source
 * directory for licensing information.
 * ****************************************************************************
 *
 * Setup information for an equality engine.
 */

#include "cvc5_private.h"

#ifndef CVC5__THEORY__EE_SETUP_INFO__H
#define CVC5__THEORY__EE_SETUP_INFO__H

#include <string>

namespace cvc5 {
namespace theory {

namespace eq {
class EqualityEngineNotify;
}

/**
 * This is a helper class that encapsulates instructions for how a Theory
 * wishes to initialize and setup notifications with its official equality
 * engine, e.g. via a notification class (eq::EqualityEngineNotify).
 *
 * This includes (at a basic level) the arguments to the equality engine
 * constructor that theories may wish to modify. This information is determined
 * by the Theory during needsEqualityEngine.
 */
struct EeSetupInfo
{
  EeSetupInfo()
      : d_notify(nullptr),
        d_constantsAreTriggers(true),
        d_notifyNewClass(false),
        d_notifyMerge(false),
        d_notifyDisequal(false),
        d_useMaster(false)
  {
  }
  /** The notification class of the theory */
  eq::EqualityEngineNotify* d_notify;
  /** The name of the equality engine */
  std::string d_name;
  /** Constants are triggers */
  bool d_constantsAreTriggers;
  //-------------------------- fine grained notifications
  /** Whether we need to be notified of new equivalence classes */
  bool d_notifyNewClass;
  /** Whether we need to be notified of merged equivalence classes */
  bool d_notifyMerge;
  /** Whether we need to be notified of disequal equivalence classes */
  bool d_notifyDisequal;
  //-------------------------- end fine grained notifications
  /**
   * Whether we want our state to use the master equality engine. This should
   * be true exclusively for the theory of quantifiers.
   */
  bool d_useMaster;
  /** Does it need notifications when equivalence classes are created? */
  bool needsNotifyNewClass() const { return d_notifyNewClass; }
  /** Does it need notifications when equivalence classes are merged? */
  bool needsNotifyMerge() const { return d_notifyMerge; }
  /** Does it need notifications when disequalities are generated? */
  bool needsNotifyDisequal() const { return d_notifyDisequal; }
};

}  // namespace theory
}  // namespace cvc5

#endif /* CVC5__THEORY__EE_SETUP_INFO__H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback