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 |
|
* Preprocess equality rewriter for arithmetic |
14 |
|
*/ |
15 |
|
|
16 |
|
#include "cvc5_private.h" |
17 |
|
|
18 |
|
#ifndef CVC5__THEORY__ARITH__PP_REWRITE_EQ__H |
19 |
|
#define CVC5__THEORY__ARITH__PP_REWRITE_EQ__H |
20 |
|
|
21 |
|
#include "context/context.h" |
22 |
|
#include "expr/node.h" |
23 |
|
#include "proof/eager_proof_generator.h" |
24 |
|
#include "proof/proof_node_manager.h" |
25 |
|
|
26 |
|
namespace cvc5 { |
27 |
|
namespace theory { |
28 |
|
namespace arith { |
29 |
|
|
30 |
|
/** |
31 |
|
* This class is responsible for rewriting arithmetic equalities based on the |
32 |
|
* current options. |
33 |
|
* |
34 |
|
* In particular, we may rewrite (= x y) to (and (>= x y) (<= x y)). |
35 |
|
*/ |
36 |
|
class PreprocessRewriteEq |
37 |
|
{ |
38 |
|
public: |
39 |
|
PreprocessRewriteEq(context::Context* c, ProofNodeManager* pnm); |
40 |
9851 |
~PreprocessRewriteEq() {} |
41 |
|
/** |
42 |
|
* Preprocess equality, applies ppRewrite for equalities. This method is |
43 |
|
* distinct from ppRewrite since it is not allowed to construct lemmas. |
44 |
|
*/ |
45 |
|
TrustNode ppRewriteEq(TNode eq); |
46 |
|
|
47 |
|
private: |
48 |
|
/** Are proofs enabled? */ |
49 |
|
bool proofsEnabled() const; |
50 |
|
/** Used to prove pp-rewrites */ |
51 |
|
EagerProofGenerator d_ppPfGen; |
52 |
|
/** Proof node manager */ |
53 |
|
ProofNodeManager* d_pnm; |
54 |
|
}; |
55 |
|
|
56 |
|
} // namespace arith |
57 |
|
} // namespace theory |
58 |
|
} // namespace cvc5 |
59 |
|
|
60 |
|
#endif |