More cleanup of includes to reduce compilation times (#6037)
[cvc5.git] / src / preprocessing / passes / miplib_trick.h
1 /********************* */
2 /*! \file miplib_trick.h
3 ** \verbatim
4 ** Top contributors (to current version):
5 ** 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 MIPLIB trick preprocessing pass
13 **
14 **/
15
16 #include "cvc4_private.h"
17
18 #ifndef CVC4__PREPROCESSING__PASSES__MIPLIB_TRICK_H
19 #define CVC4__PREPROCESSING__PASSES__MIPLIB_TRICK_H
20
21 #include "expr/node.h"
22 #include "preprocessing/preprocessing_pass.h"
23
24 namespace CVC4 {
25 namespace preprocessing {
26 namespace passes {
27
28 class MipLibTrick : public PreprocessingPass, public NodeManagerListener
29 {
30 public:
31 MipLibTrick(PreprocessingPassContext* preprocContext);
32 ~MipLibTrick();
33
34 // NodeManagerListener callbacks to collect d_boolVars.
35 void nmNotifyNewVar(TNode n) override;
36 void nmNotifyNewSkolem(TNode n,
37 const std::string& comment,
38 uint32_t flags) override;
39
40 protected:
41 PreprocessingPassResult applyInternal(
42 AssertionPipeline* assertionsToPreprocess) override;
43
44 private:
45 struct Statistics
46 {
47 /** number of assertions removed by miplib pass */
48 IntStat d_numMiplibAssertionsRemoved;
49 Statistics();
50 ~Statistics();
51 };
52
53 Statistics d_statistics;
54
55 std::vector<Node> d_boolVars;
56 };
57
58 } // namespace passes
59 } // namespace preprocessing
60 } // namespace CVC4
61
62 #endif /* CVC4__PREPROCESSING__PASSES__MIPLIB_TRICK_H */