GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/quantifiers/ematching/var_match_generator.h Lines: 1 1 100.0 %
Date: 2021-03-23 Branches: 0 0 0.0 %

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