GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/preprocessing/passes/theory_rewrite_eq.h Lines: 1 1 100.0 %
Date: 2021-09-10 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
 *
13
 * The TheoryRewriteEq preprocessing pass.
14
 */
15
16
#include "cvc5_private.h"
17
18
#ifndef CVC5__PREPROCESSING__PASSES__THEORY_REWRITE_EQ_H
19
#define CVC5__PREPROCESSING__PASSES__THEORY_REWRITE_EQ_H
20
21
#include "expr/node.h"
22
#include "preprocessing/preprocessing_pass.h"
23
#include "proof/trust_node.h"
24
25
namespace cvc5 {
26
namespace preprocessing {
27
namespace passes {
28
29
/**
30
 * Implements the preprocessing pass for called ppRewrite on all equalities
31
 * in the input. This is required to be a preprocessing pass since it is not
32
 * recommended that ppRewrite is called on equalities generated in lemmas (e.g.
33
 * it may interfere with equality splitting in theory combination).
34
 */
35
19820
class TheoryRewriteEq : public PreprocessingPass
36
{
37
 public:
38
  TheoryRewriteEq(PreprocessingPassContext* preprocContext);
39
40
 protected:
41
  PreprocessingPassResult applyInternal(
42
      AssertionPipeline* assertionsToPreprocess) override;
43
  /**
44
   * Rewrite the assertion based on rewriting equalities based on theory
45
   * specific rewriting.
46
   * An example is removing arithmetic equalities via:
47
   *   (= x y) ---> (and (>= x y) (<= x y))
48
   * Returns the trust node corresponding to the rewrite.
49
   */
50
  TrustNode rewriteAssertion(TNode assertion);
51
};
52
53
}  // namespace passes
54
}  // namespace preprocessing
55
}  // namespace cvc5
56
57
#endif /* CVC5__PREPROCESSING__PASSES__THEORY_REWRITE_EQ_H */