Changing bv_to_int options (#4721)
[cvc5.git] / src / preprocessing / passes / global_negate.h
1 /********************* */
2 /*! \file global_negate.h
3 ** \verbatim
4 ** Top contributors (to current version):
5 ** Yoni Zohar, Mathias Preiner
6 ** This file is part of the CVC4 project.
7 ** Copyright (c) 2009-2020 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 the global_negate preprocessing pass
13 * Updates a set of assertions to the negation of
14 * these assertions. In detail, if assertions is:
15 * F1, ..., Fn
16 * then we update this vector to:
17 * forall x1...xm. ~( F1 ^ ... ^ Fn ), true, ..., true
18 * where x1...xm are the free variables of F1...Fn.
19 * When this is done, d_globalNegation flag is marked, so that the solver checks
20 *for unsat instead of sat.
21 **/
22
23 #include "cvc4_private.h"
24
25 #ifndef CVC4__PREPROCESSING__PASSES__GLOBAL_NEGATE_H
26 #define CVC4__PREPROCESSING__PASSES__GLOBAL_NEGATE_H
27
28 #include "preprocessing/preprocessing_pass.h"
29 #include "preprocessing/preprocessing_pass_context.h"
30
31 namespace CVC4 {
32 namespace preprocessing {
33 namespace passes {
34
35 class GlobalNegate : public PreprocessingPass
36 {
37 public:
38 GlobalNegate(PreprocessingPassContext* preprocContext);
39
40 protected:
41 PreprocessingPassResult applyInternal(
42 AssertionPipeline* assertionsToPreprocess) override;
43
44 private:
45 Node simplify(std::vector<Node>& assertions, NodeManager* nm);
46 };
47
48 } // namespace passes
49 } // namespace preprocessing
50 } // namespace CVC4
51
52 #endif /* CVC4__PREPROCESSING_PASSES__GLOBAL_NEGATE_H */