summaryrefslogtreecommitdiff
path: root/src/preprocessing/passes/miplib_trick.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/preprocessing/passes/miplib_trick.h')
-rw-r--r--src/preprocessing/passes/miplib_trick.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/preprocessing/passes/miplib_trick.h b/src/preprocessing/passes/miplib_trick.h
new file mode 100644
index 000000000..7e75372a8
--- /dev/null
+++ b/src/preprocessing/passes/miplib_trick.h
@@ -0,0 +1,62 @@
+/********************* */
+/*! \file miplib_trick.h
+ ** \verbatim
+ ** Top contributors (to current version):
+ ** Mathias Preiner
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2018 by the authors listed in the file AUTHORS
+ ** in the top-level source directory) and their institutional affiliations.
+ ** All rights reserved. See the file COPYING in the top-level source
+ ** directory for licensing information.\endverbatim
+ **
+ ** \brief The MIPLIB trick preprocessing pass
+ **
+ **/
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__PREPROCESSING__PASSES__MIPLIB_TRICK_H
+#define __CVC4__PREPROCESSING__PASSES__MIPLIB_TRICK_H
+
+#include "preprocessing/preprocessing_pass.h"
+#include "preprocessing/preprocessing_pass_context.h"
+
+namespace CVC4 {
+namespace preprocessing {
+namespace passes {
+
+class MipLibTrick : public PreprocessingPass, public NodeManagerListener
+{
+ public:
+ MipLibTrick(PreprocessingPassContext* preprocContext);
+ ~MipLibTrick();
+
+ // NodeManagerListener callbacks to collect d_boolVars.
+ void nmNotifyNewVar(TNode n, uint32_t flags) override;
+ void nmNotifyNewSkolem(TNode n,
+ const std::string& comment,
+ uint32_t flags) override;
+
+ protected:
+ PreprocessingPassResult applyInternal(
+ AssertionPipeline* assertionsToPreprocess) override;
+
+ private:
+ struct Statistics
+ {
+ /** number of assertions removed by miplib pass */
+ IntStat d_numMiplibAssertionsRemoved;
+ Statistics();
+ ~Statistics();
+ };
+
+ Statistics d_statistics;
+
+ std::vector<Node> d_boolVars;
+};
+
+} // namespace passes
+} // namespace preprocessing
+} // namespace CVC4
+
+#endif /* __CVC4__PREPROCESSING__PASSES__MIPLIB_TRICK_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback