GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/quantifiers/ematching/var_match_generator.h Lines: 1 1 100.0 %
Date: 2021-05-22 Branches: 0 0 0.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
 * Variable match generator class.
13
 */
14
15
#include "cvc5_private.h"
16
17
#ifndef CVC5__THEORY__QUANTIFIERS__VAR_MATCH_GENERATOR_H
18
#define CVC5__THEORY__QUANTIFIERS__VAR_MATCH_GENERATOR_H
19
20
#include "expr/node.h"
21
#include "theory/quantifiers/ematching/inst_match_generator.h"
22
23
namespace cvc5 {
24
namespace theory {
25
namespace quantifiers {
26
namespace inst {
27
28
/** match generator for purified terms
29
 * This handles the special case of invertible terms like x+1 (see
30
 * Trigger::getTermInversionVariable).
31
 */
32
16
class VarMatchGeneratorTermSubs : public InstMatchGenerator
33
{
34
 public:
35
  VarMatchGeneratorTermSubs(Trigger* tparent, Node var, Node subs);
36
37
  /** Reset */
38
  bool reset(Node eqc) override;
39
  /** Get the next match. */
40
  int getNextMatch(Node q, InstMatch& m) override;
41
42
 private:
43
  /** variable we are matching (x in the example x+1). */
44
  Node d_var;
45
  /** cache of d_var.getType() */
46
  TypeNode d_var_type;
47
  /** The substitution for what we match (x-1 in the example x+1). */
48
  Node d_subs;
49
  /** stores whether we have written a value for d_var in the current match. */
50
  bool d_rm_prev;
51
};
52
53
}  // namespace inst
54
}  // namespace quantifiers
55
}  // namespace theory
56
}  // namespace cvc5
57
58
#endif