1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Yoni Zohar, Mathias Preiner, 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 global_negate preprocessing pass. |
14 |
|
* |
15 |
|
* Updates a set of assertions to the negation of these assertions. |
16 |
|
* In detail, if assertions is: |
17 |
|
* F1, ..., Fn |
18 |
|
* then we update this vector to: |
19 |
|
* forall x1...xm. ~( F1 ^ ... ^ Fn ), true, ..., true |
20 |
|
* where x1...xm are the free variables of F1...Fn. |
21 |
|
* When this is done, d_globalNegation flag is marked, so that the solver |
22 |
|
* checks for unsat instead of sat. |
23 |
|
*/ |
24 |
|
|
25 |
|
#include "cvc5_private.h" |
26 |
|
|
27 |
|
#ifndef CVC5__PREPROCESSING__PASSES__GLOBAL_NEGATE_H |
28 |
|
#define CVC5__PREPROCESSING__PASSES__GLOBAL_NEGATE_H |
29 |
|
|
30 |
|
#include "expr/node.h" |
31 |
|
#include "preprocessing/preprocessing_pass.h" |
32 |
|
|
33 |
|
namespace cvc5 { |
34 |
|
namespace preprocessing { |
35 |
|
namespace passes { |
36 |
|
|
37 |
19706 |
class GlobalNegate : public PreprocessingPass |
38 |
|
{ |
39 |
|
public: |
40 |
|
GlobalNegate(PreprocessingPassContext* preprocContext); |
41 |
|
|
42 |
|
protected: |
43 |
|
PreprocessingPassResult applyInternal( |
44 |
|
AssertionPipeline* assertionsToPreprocess) override; |
45 |
|
|
46 |
|
private: |
47 |
|
Node simplify(const std::vector<Node>& assertions, NodeManager* nm); |
48 |
|
}; |
49 |
|
|
50 |
|
} // namespace passes |
51 |
|
} // namespace preprocessing |
52 |
|
} // namespace cvc5 |
53 |
|
|
54 |
|
#endif /* CVC5__PREPROCESSING_PASSES__GLOBAL_NEGATE_H */ |