summaryrefslogtreecommitdiff
path: root/src/preprocessing/passes/global_negate.h
diff options
context:
space:
mode:
authoryoni206 <yoni206@users.noreply.github.com>2018-08-22 21:13:46 -0700
committerAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-08-22 23:13:46 -0500
commitac7db6796f2255678d3b2e2e87940211f162223e (patch)
treec5857619f46843e8d77093e5b1f468ff2d340535 /src/preprocessing/passes/global_negate.h
parent83d07f5d7662557f2087136563606872b217511a (diff)
global-negate preprocessing pass (#2317)
Diffstat (limited to 'src/preprocessing/passes/global_negate.h')
-rw-r--r--src/preprocessing/passes/global_negate.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/preprocessing/passes/global_negate.h b/src/preprocessing/passes/global_negate.h
new file mode 100644
index 000000000..0330aa10e
--- /dev/null
+++ b/src/preprocessing/passes/global_negate.h
@@ -0,0 +1,52 @@
+/********************* */
+/*! \file global_negate.h
+ ** \verbatim
+ ** Top contributors (to current version):
+ ** Andrew Reynolds
+ ** 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 global_negate preprocessing pass
+ * Updates a set of assertions to the negation of
+ * these assertions. In detail, if assertions is:
+ * F1, ..., Fn
+ * then we update this vector to:
+ * forall x1...xm. ~( F1 ^ ... ^ Fn ), true, ..., true
+ * where x1...xm are the free variables of F1...Fn.
+ * When this is done, d_globalNegation flag is marked, so that the solver checks
+ *for unsat instead of sat.
+**/
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__PREPROCESSING__PASSES__GLOBAL_NEGATE_H
+#define __CVC4__PREPROCESSING__PASSES__GLOBAL_NEGATE_H
+
+#include "preprocessing/preprocessing_pass.h"
+#include "preprocessing/preprocessing_pass_context.h"
+
+namespace CVC4 {
+namespace preprocessing {
+namespace passes {
+
+class GlobalNegate : public PreprocessingPass
+{
+ public:
+ GlobalNegate(PreprocessingPassContext* preprocContext);
+
+ protected:
+ PreprocessingPassResult applyInternal(
+ AssertionPipeline* assertionsToPreprocess) override;
+
+ private:
+ Node simplify(std::vector<Node>& assertions, NodeManager* nm);
+};
+
+} // namespace passes
+} // namespace preprocessing
+} // namespace CVC4
+
+#endif /* __CVC4__PREPROCESSING_PASSES__GLOBAL_NEGATE_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback