summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlianah <lianahady@gmail.com>2013-03-13 13:44:33 -0400
committerlianah <lianahady@gmail.com>2013-03-13 13:44:33 -0400
commit3fcdb18fe92e5213aa708285c0d7d5e55633492b (patch)
treebbbd57efd9a8063a976a55afa7c384fb67db9b17
parent267ad0ceb6808bd4c05d7c4bb04a7886efc19eab (diff)
parent9817df56827b4ee0ee67a33361f8619c5d1df6ed (diff)
post failed attempts at getting the incremental solver to work
-rw-r--r--COPYING6
-rw-r--r--Makefile.builds.in8
-rw-r--r--NEWS9
-rwxr-xr-xcontrib/configure-in-place16
-rwxr-xr-xcontrib/get-authors10
-rwxr-xr-xcontrib/mac-build1
-rwxr-xr-xcontrib/update-copyright.pl30
-rw-r--r--examples/api/java/Combination.java2
-rw-r--r--src/Makefile.am49
-rw-r--r--src/compat/cvc3_compat.cpp2
-rw-r--r--src/context/cdinsert_hashmap.h2
-rw-r--r--src/context/cdtrail_hashmap.h4
-rw-r--r--src/decision/decision_engine.cpp2
-rw-r--r--src/decision/decision_strategy.h2
-rw-r--r--src/decision/justification_heuristic.cpp585
-rw-r--r--src/decision/justification_heuristic.h139
-rw-r--r--src/expr/command.cpp8
-rw-r--r--src/expr/command.h2
-rw-r--r--src/expr/expr_template.h17
-rwxr-xr-xsrc/expr/mkexpr7
-rwxr-xr-xsrc/expr/mkkind7
-rwxr-xr-xsrc/expr/mkmetakind7
-rw-r--r--src/expr/node_builder.h25
-rw-r--r--src/expr/node_manager.cpp3
-rw-r--r--src/expr/options4
-rw-r--r--src/expr/options_handlers.h3
-rw-r--r--src/expr/type.i18
-rw-r--r--src/main/command_executor.cpp4
-rw-r--r--src/main/driver_unified.cpp40
-rw-r--r--src/main/main.cpp1
-rw-r--r--src/main/main.h4
-rw-r--r--src/main/options2
-rw-r--r--src/main/options_handlers.h12
-rw-r--r--src/main/util.cpp10
-rwxr-xr-xsrc/options/mkoptions10
-rw-r--r--src/parser/bounded_token_buffer.cpp2
-rw-r--r--src/parser/cvc/Cvc.g11
-rw-r--r--src/parser/smt1/Smt1.g17
-rw-r--r--src/parser/smt2/Smt2.g6
-rw-r--r--src/parser/smt2/smt2_input.h2
-rw-r--r--src/parser/tptp/Tptp.g6
-rw-r--r--src/parser/tptp/tptp.cpp2
-rw-r--r--src/printer/cvc/cvc_printer.cpp53
-rw-r--r--src/printer/smt2/smt2_printer.cpp46
-rw-r--r--src/proof/sat_proof.h4
-rw-r--r--src/prop/bvminisat/Makefile4
-rw-r--r--src/smt/boolean_terms.cpp18
-rw-r--r--src/smt/options2
-rw-r--r--src/smt/smt_engine.cpp569
-rw-r--r--src/smt/smt_engine.h2
-rw-r--r--src/theory/arith/arith_static_learner.cpp131
-rw-r--r--src/theory/arith/arith_static_learner.h18
-rw-r--r--src/theory/arith/constraint.cpp20
-rw-r--r--src/theory/arith/constraint.h8
-rw-r--r--src/theory/arith/delta_rational.h2
-rw-r--r--src/theory/arith/options8
-rw-r--r--src/theory/arith/options_handlers.h2
-rw-r--r--src/theory/arrays/theory_arrays.cpp6
-rw-r--r--src/theory/arrays/theory_arrays_model.cpp2
-rw-r--r--src/theory/arrays/theory_arrays_model.h100
-rw-r--r--src/theory/arrays/theory_arrays_rewriter.h11
-rw-r--r--src/theory/booleans/circuit_propagator.h18
-rw-r--r--src/theory/bv/bitblast_strategies.cpp102
-rw-r--r--src/theory/bv/bv_subtheory.h24
-rw-r--r--src/theory/bv/bv_subtheory_bitblast.cpp25
-rw-r--r--src/theory/bv/bv_subtheory_bitblast.h2
-rw-r--r--src/theory/bv/bv_subtheory_core.cpp102
-rw-r--r--src/theory/bv/bv_subtheory_core.h11
-rw-r--r--src/theory/bv/bv_subtheory_eq.cpp4
-rw-r--r--src/theory/bv/cd_set_collection.h8
-rw-r--r--src/theory/bv/slicer.cpp15
-rw-r--r--src/theory/bv/slicer.h54
-rw-r--r--src/theory/bv/theory_bv.cpp30
-rw-r--r--src/theory/bv/theory_bv.h6
-rw-r--r--src/theory/bv/theory_bv_rewrite_rules.h6
-rw-r--r--src/theory/bv/theory_bv_rewrite_rules_constant_evaluation.h46
-rw-r--r--src/theory/bv/theory_bv_rewrite_rules_core.h26
-rw-r--r--src/theory/bv/theory_bv_rewrite_rules_normalization.h36
-rw-r--r--src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h38
-rw-r--r--src/theory/bv/theory_bv_rewrite_rules_simplification.h76
-rw-r--r--src/theory/bv/theory_bv_utils.h6
-rw-r--r--src/theory/datatypes/theory_datatypes_type_rules.h4
-rw-r--r--src/theory/datatypes/type_enumerator.h90
-rwxr-xr-xsrc/theory/mkrewriter7
-rwxr-xr-xsrc/theory/mktheorytraits7
-rw-r--r--src/theory/model.cpp3
-rw-r--r--src/theory/model.h2
-rw-r--r--[-rwxr-xr-x]src/theory/quantifiers/inst_gen.cpp594
-rw-r--r--[-rwxr-xr-x]src/theory/quantifiers/inst_gen.h120
-rw-r--r--src/theory/quantifiers/inst_match.cpp12
-rw-r--r--src/theory/quantifiers/inst_match.h2
-rw-r--r--[-rwxr-xr-x]src/theory/quantifiers/inst_match_generator.cpp1322
-rw-r--r--[-rwxr-xr-x]src/theory/quantifiers/inst_match_generator.h386
-rw-r--r--[-rwxr-xr-x]src/theory/quantifiers/inst_strategy_cbqi.cpp810
-rw-r--r--[-rwxr-xr-x]src/theory/quantifiers/inst_strategy_cbqi.h218
-rw-r--r--[-rwxr-xr-x]src/theory/quantifiers/inst_strategy_e_matching.cpp754
-rw-r--r--[-rwxr-xr-x]src/theory/quantifiers/inst_strategy_e_matching.h272
-rw-r--r--src/theory/quantifiers/instantiation_engine.cpp22
-rw-r--r--[-rwxr-xr-x]src/theory/quantifiers/macros.cpp750
-rw-r--r--[-rwxr-xr-x]src/theory/quantifiers/macros.h124
-rw-r--r--src/theory/quantifiers/model_builder.cpp29
-rw-r--r--src/theory/quantifiers/model_builder.h2
-rw-r--r--src/theory/quantifiers/model_engine.cpp17
-rw-r--r--src/theory/quantifiers/options12
-rw-r--r--[-rwxr-xr-x]src/theory/quantifiers/quant_util.cpp290
-rw-r--r--[-rwxr-xr-x]src/theory/quantifiers/quant_util.h198
-rw-r--r--src/theory/quantifiers/quantifiers_attributes.cpp68
-rw-r--r--src/theory/quantifiers/quantifiers_attributes.h88
-rw-r--r--src/theory/quantifiers/quantifiers_rewriter.cpp211
-rw-r--r--src/theory/quantifiers/quantifiers_rewriter.h6
-rw-r--r--src/theory/quantifiers/term_database.cpp47
-rw-r--r--src/theory/quantifiers/term_database.h4
-rw-r--r--src/theory/quantifiers/theory_quantifiers.cpp6
-rw-r--r--src/theory/quantifiers/trigger.cpp91
-rw-r--r--src/theory/quantifiers/trigger.h4
-rw-r--r--src/theory/quantifiers_engine.cpp117
-rw-r--r--src/theory/quantifiers_engine.h13
-rw-r--r--src/theory/rep_set.cpp443
-rw-r--r--src/theory/rep_set.h210
-rw-r--r--[-rwxr-xr-x]src/theory/rewriterules/efficient_e_matching.cpp1372
-rw-r--r--[-rwxr-xr-x]src/theory/rewriterules/efficient_e_matching.h900
-rw-r--r--src/theory/rewriterules/rr_candidate_generator.h4
-rw-r--r--src/theory/rewriterules/rr_inst_match.h6
-rw-r--r--src/theory/rewriterules/rr_trigger.h1
-rw-r--r--src/theory/substitutions.cpp37
-rw-r--r--src/theory/substitutions.h6
-rw-r--r--src/theory/theory_engine.cpp14
-rw-r--r--src/theory/theory_engine.h30
-rw-r--r--src/theory/uf/options6
-rw-r--r--src/theory/uf/theory_uf.cpp12
-rw-r--r--src/theory/uf/theory_uf.h8
-rw-r--r--src/theory/uf/theory_uf_strong_solver.cpp807
-rw-r--r--src/theory/uf/theory_uf_strong_solver.h156
-rw-r--r--src/util/configuration.cpp29
-rw-r--r--src/util/configuration.h10
-rw-r--r--src/util/configuration_private.h7
-rw-r--r--src/util/integer.h.in2
-rw-r--r--src/util/rational.h.in2
-rw-r--r--[-rwxr-xr-x]src/util/sort_inference.cpp836
-rw-r--r--[-rwxr-xr-x]src/util/sort_inference.h148
-rw-r--r--src/util/tls.h.in2
-rw-r--r--test/regress/regress0/Makefile.am7
-rw-r--r--test/regress/regress0/arith/Makefile.am16
-rw-r--r--test/regress/regress0/arith/miplib-opt1217--27.smt4669
-rw-r--r--test/regress/regress0/arith/miplib-opt1217--27.smt.expect3
-rw-r--r--test/regress/regress0/arith/miplib-opt1217--27.smt21550
-rw-r--r--test/regress/regress0/arith/miplib-pp08a-3000.smt1427
-rw-r--r--test/regress/regress0/arith/miplib-pp08a-3000.smt.expect3
-rw-r--r--test/regress/regress0/arith/miplib-pp08a-3000.smt2330
-rw-r--r--test/regress/regress0/arith/miplib.cvc29
-rw-r--r--test/regress/regress0/arith/miplib2.cvc33
-rw-r--r--test/regress/regress0/arith/miplib3.cvc34
-rw-r--r--test/regress/regress0/arith/miplib4.cvc13
-rw-r--r--test/regress/regress0/aufbv/bug493.smt54
-rw-r--r--test/regress/regress0/bug484.smt2111
-rw-r--r--test/regress/regress0/datatypes/Makefile.am1
-rw-r--r--test/regress/regress0/datatypes/tuple-model.cvc6
-rw-r--r--test/regress/regress0/quantifiers/Makefile.am6
-rw-r--r--test/regress/regress1/arith/Makefile8
-rw-r--r--test/unit/expr/node_manager_white.h19
160 files changed, 15940 insertions, 6867 deletions
diff --git a/COPYING b/COPYING
index 5016b3fbd..38196791a 100644
--- a/COPYING
+++ b/COPYING
@@ -1,5 +1,5 @@
-CVC4 is copyright (C) 2009, 2010, 2011, 2012 New York University and
-The University of Iowa. All rights reserved.
+CVC4 is copyright (C) 2009, 2010, 2011, 2012, 2013 New York University
+and The University of Iowa. All rights reserved.
CVC4 is open-source; distribution is under the terms of the modified BSD
license. However, certain builds of CVC4 link against GPLed libraries,
@@ -19,7 +19,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- Morgan Deters <mdeters@cs.nyu.edu> Fri, 04 Feb 2011 14:56:41 -0500
+-- Morgan Deters <mdeters@cs.nyu.edu> Mon, 28 Jan 2013 17:22:36 -0500
CVC4 incorporates MiniSat code, excluded from the above copyright.
See src/sat/minisat. Its copyright:
diff --git a/Makefile.builds.in b/Makefile.builds.in
index 9f83ba5dc..33df24f95 100644
--- a/Makefile.builds.in
+++ b/Makefile.builds.in
@@ -138,8 +138,8 @@ else
done
endif
# set up builds/$(CURRENT_BUILD)/bin and builds/$(CURRENT_BUILD)/lib
- $(AM_V_at)test -e $(CURRENT_BUILD)/lib || ln -sf "$(abs_builddir)$(libdir)" $(CURRENT_BUILD)/lib
- $(AM_V_at)test -e $(CURRENT_BUILD)/bin || ln -sf "$(abs_builddir)$(bindir)" $(CURRENT_BUILD)/bin
+ rm -f $(CURRENT_BUILD)/lib; ln -sf "$(abs_builddir)$(libdir)" $(CURRENT_BUILD)/lib
+ rm -f $(CURRENT_BUILD)/bin; ln -sf "$(abs_builddir)$(bindir)" $(CURRENT_BUILD)/bin
# set up builds/...prefix.../bin and builds/...prefix.../lib
$(AM_V_mkdir) ".$(bindir)"
$(AM_V_mkdir) ".$(libdir)"
@@ -185,8 +185,8 @@ else
done
endif
# set up builds/bin and builds/lib
- $(AM_V_at)test -e lib || ln -sf ".$(libdir)" lib
- $(AM_V_at)test -e bin || ln -sf ".$(bindir)" bin
+ rm -f lib; ln -sf ".$(libdir)" lib
+ rm -f bin; ln -sf ".$(bindir)" bin
rm -f doc; ln -sf "$(CURRENT_BUILD)/doc" doc
rm -f examples; ln -sf "$(CURRENT_BUILD)/examples" examples
diff --git a/NEWS b/NEWS
index c25f09f5a..ba396ad0c 100644
--- a/NEWS
+++ b/NEWS
@@ -7,5 +7,12 @@ Changes since 1.0
* user patterns are now supported in the SMT-LIBv1.2 parser
* SMT-LIB get-model output now is easier to machine-parse: contains (model...)
* Win32 support via mingw
+* for printing commands as they're invoked from the driver, you now need
+ verbosity of 3 or higher (e.g. -vvv) instead of verbosity 1 or higher (-v).
+ This allows tracing the solver's activities without having too much output.
+* To make CVC4 quieter in abnormal (e.g., "warning" conditions), you can
+ use -q. Previously, this would silence all output (including "sat" or
+ "unsat") as well. Now, single -q silences messages and warnings, and
+ double -qq silences all output (except on exception or signal).
--- Morgan Deters <mdeters@cs.nyu.edu> Mon, 28 Jan 2013 15:26:24 -0500
+-- Morgan Deters <mdeters@cs.nyu.edu> Wed, 20 Feb 2013 18:31:50 -0500
diff --git a/contrib/configure-in-place b/contrib/configure-in-place
index 9da584d36..81517cfe4 100755
--- a/contrib/configure-in-place
+++ b/contrib/configure-in-place
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash -ex
#
# configure-in-place
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2010, 2011 The CVC4 Project
+# Copyright (c) 2010-2013 The CVC4 Project
#
# usage: configure-in-place [ arguments... ]
#
@@ -10,9 +10,9 @@
# should be invoked).
#
-if [ -e .svn ]; then
+if [ -e .git ] && ! [ x"$1" = x-f ]; then
echo
- echo "DO NOT USE THIS IN SUBVERSION WORKING DIRECTORIES!"
+ echo "DO NOT USE THIS IN GIT WORKING DIRECTORIES!"
echo
echo "You might accidentally commit Makefiles in the source directories"
echo "improperly, since they exist in the source directory for"
@@ -21,6 +21,10 @@ if [ -e .svn ]; then
exit 1
fi
+if [ x"$1" = x-f ]; then
+ shift
+fi
+
./configure "$@"
-. builds/current
-builds/$(CURRENT_BUILD)/config.status
+CURRENT_BUILD="$(grep '^CURRENT_BUILD *= *' builds/current | awk 'BEGIN {FS=" *= *"} {print$2}')"
+builds/$CURRENT_BUILD/config.status
diff --git a/contrib/get-authors b/contrib/get-authors
index ef6abff8e..118ca4466 100755
--- a/contrib/get-authors
+++ b/contrib/get-authors
@@ -2,13 +2,15 @@
#
# get-authors
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2009, 2010, 2011 The CVC4 Project
+# Copyright (c) 2009-2013 The CVC4 Project
#
# usage: get-authors [ files... ]
#
-# This script uses svn to get the original author
+# This script uses git to get the original author
#
+gituser="`git config user.name` <`git config user.email`>"
+
while [ $# -gt 0 ]; do
f=$1
shift
@@ -16,8 +18,8 @@ while [ $# -gt 0 ]; do
major_contributors=
minor_contributors=
total_lines=`wc -l "$f" | awk '{print$1}'`
- original_author=`svn log -q --incremental "$f" | tail -1 | awk '{print$3}'`
- svn blame "$f" | awk '{print$2}' | sort | uniq -c | sort -n |
+ original_author=`git log --pretty="format:%aN <%aE>" "$f" | tail -1`
+ git blame --incremental "$f" | gawk '/^[0-9a-f]+ [0-9]+ [0-9]+ [0-9]+$/ {nl=$4;} /^author / {$1=""; author=$0;} /^author-mail / {mail=$2} /^filename / {while(nl--) {print author,mail}}' | sed "s,Not Committed Yet <not.committed.yet>,$gituser," | sort | uniq -c | sort -n |
( while read lines author; do
pct=$((100*$lines/$total_lines))
if [ "$author" != "$original_author" ]; then
diff --git a/contrib/mac-build b/contrib/mac-build
index 834191a0c..2501b667d 100755
--- a/contrib/mac-build
+++ b/contrib/mac-build
@@ -16,6 +16,7 @@ if [ $# -ne 0 ]; then
echo "MacPorts must be installed (but this script installs prerequisite port" >&2
echo "packages for CVC4). If this script is successful, it prints a configure" >&2
echo "line that you can use to configure CVC4." >&2
+ exit 1
fi
function reporterror {
diff --git a/contrib/update-copyright.pl b/contrib/update-copyright.pl
index 8ac920bbf..4811a4bbe 100755
--- a/contrib/update-copyright.pl
+++ b/contrib/update-copyright.pl
@@ -2,7 +2,7 @@
#
# update-copyright.pl
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2009-2012 The CVC4 Project
+# Copyright (c) 2009-2013 The CVC4 Project
#
# usage: update-copyright [-m] [files/directories...]
# update-copyright [-h | --help]
@@ -16,15 +16,17 @@
# the CVC4 source tree, that means src/ in the CVC4 source tree.
#
# If -m is specified as the first argument, all files and directories
-# are scanned, but only ones modifed in the current working directory
-# are modified (i.e., those that have status M in "svn status").
+# are scanned, but only ones modified in the index or working tree
+# are modified (i.e., those that have at least one status M in
+# "git status -s").
#
# It ignores any file/directory not starting with [a-zA-Z]
-# (so, this includes . and .., vi swaps, .svn meta-info,
+# (so, this includes . and .., vi swaps, .git meta-info,
# .deps, etc.)
#
# It ignores any file not ending with one of:
# .c .cc .cpp .C .h .hh .hpp .H .y .yy .ypp .Y .l .ll .lpp .L .g
+# [ or those with ".in" also suffixed, e.g., .cpp.in ]
# (so, this includes emacs ~-backups, CVS detritus, etc.)
#
# It ignores any directory matching $excluded_directories
@@ -37,17 +39,17 @@ my $excluded_paths = '^(src/parser/antlr_input_imports.cpp|src/bindings/compat/.
# Years of copyright for the template. E.g., the string
# "1985, 1987, 1992, 1997, 2008" or "2006-2009" or whatever.
-my $years = '2009-2012';
+my $years = '2009-2013';
my $standard_template = <<EOF;
- ** This file is part of the CVC4 prototype.
+ ** This file is part of the CVC4 project.
** Copyright (c) $years New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.\\endverbatim
EOF
my $public_template = <<EOF;
- ** This file is part of the CVC4 prototype.
+ ** This file is part of the CVC4 project.
** Copyright (c) $years New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.\\endverbatim
@@ -71,7 +73,7 @@ if($#ARGV >= 0 && $ARGV[0] eq '-h' || $ARGV[0] eq '--help') {
exit;
}
-# whether we ONLY process files with svn status "M"
+# whether we ONLY process files with git status "M"
my $modonly = 0;
if($#ARGV >= 0 && $ARGV[0] eq '-m') {
@@ -87,11 +89,12 @@ if($#ARGV == -1) {
print <<EOF;
Warning: this script is dangerous. It will overwrite the header comments in your
source files to match the template in the script, attempting to retain file-specific
-comments, but this isn't guaranteed. You should run this in an svn working directory
-and run "svn diff" after to ensure everything was correctly rewritten.
+comments, but this isn't guaranteed. You should run this in a git working tree
+and run "git diff" after to ensure everything was correctly rewritten.
The directories in which to search for and change sources is:
$pwd/src
+ $pwd/examples
$pwd/test
Continue? y or n:
@@ -101,7 +104,8 @@ EOF
die 'aborting operation' if !( $_ eq 'y' || $_ eq 'yes' || $_ eq 'Y' || $_ eq 'YES' );
$searchdirs[0] = 'src';
- $searchdirs[1] = 'test';
+ $searchdirs[1] = 'examples';
+ $searchdirs[2] = 'test';
} else {
@searchdirs = @ARGV;
}
@@ -129,9 +133,9 @@ while($#searchdirs >= 0) {
sub handleFile {
my ($srcdir, $file) = @_;
- return if !($file =~ /\.(c|cc|cpp|C|h|hh|hpp|H|y|yy|ypp|Y|l|ll|lpp|L|g|java)$/);
+ return if !($file =~ /\.(c|cc|cpp|C|h|hh|hpp|H|y|yy|ypp|Y|l|ll|lpp|L|g|java)(\.in)?$/);
return if ($srcdir.'/'.$file) =~ /$excluded_paths/;
- return if $modonly &&`svn status "$srcdir/$file" 2>/dev/null` !~ /^M/;
+ return if $modonly && `git status -s "$srcdir/$file" 2>/dev/null` !~ /^(M|.M)/;
print "$srcdir/$file...";
my $infile = $srcdir.'/'.$file;
my $outfile = $srcdir.'/#'.$file.'.tmp';
diff --git a/examples/api/java/Combination.java b/examples/api/java/Combination.java
index d45a8ad16..0af8da640 100644
--- a/examples/api/java/Combination.java
+++ b/examples/api/java/Combination.java
@@ -1,5 +1,5 @@
/********************* */
-/*! \file Combination.cpp
+/*! \file Combination.java
** \verbatim
** Original author: mdeters
** Major contributors: none
diff --git a/src/Makefile.am b/src/Makefile.am
index 40d3823e9..c9f928ba8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,8 +30,8 @@ libcvc4_la_LDFLAGS = -version-info $(LIBCVC4_VERSION)
# as a C library, which messes up exception handling support)
nodist_EXTRA_libcvc4_noinst_la_SOURCES = dummy.cpp
nodist_EXTRA_libcvc4_la_SOURCES = dummy.cpp
-libcvc4_noinst_la_SOURCES = subversion_versioninfo.cpp
-libcvc4_la_SOURCES = subversion_versioninfo.cpp
+libcvc4_noinst_la_SOURCES = git_versioninfo.cpp svn_versioninfo.cpp
+libcvc4_la_SOURCES = git_versioninfo.cpp svn_versioninfo.cpp
libcvc4_la_LIBADD = \
@builddir@/options/liboptions.la \
@builddir@/util/libutil.la \
@@ -67,9 +67,12 @@ libcvc4_noinst_la_LIBADD += \
endif
CLEANFILES = \
- subversion_versioninfo.cpp \
+ svn_versioninfo.cpp \
svninfo.tmp \
- svninfo
+ svninfo \
+ git_versioninfo.cpp \
+ gitinfo.tmp \
+ gitinfo
EXTRA_DIST = \
include/cvc4_private_library.h \
@@ -80,13 +83,13 @@ EXTRA_DIST = \
include/cvc4.h \
cvc4.i
-subversion_versioninfo.cpp: svninfo
+svn_versioninfo.cpp: svninfo
$(AM_V_GEN)( \
if test -s svninfo; then \
issvn=true; \
branch=`grep '^URL: ' svninfo | sed 's,.*/cvc4/,,'`; \
rev=`grep '^Revision: ' svninfo | awk '{print$$2}'`; \
- mods=`grep '^Modifications: ' svninfo | awk '{print$$2}'`; \
+ mods=`grep '^Modifications: ' svninfo | awk '{print$$2} END { if(!NR) print "false" }'`; \
else \
issvn=false; \
branch=unknown; \
@@ -108,6 +111,34 @@ svninfo: svninfo.tmp
svninfo.tmp:
$(AM_V_GEN)(cd "$(top_srcdir)" && svn info && echo "Modifications: `test -z \"\`svn status -q\`\" && echo false || echo true`") >"$@" 2>/dev/null || true
+git_versioninfo.cpp: gitinfo
+ $(AM_V_GEN)( \
+ if test -s gitinfo; then \
+ isgit=true; \
+ branch=`head -1 gitinfo`; \
+ rev=`head -2 gitinfo | tail -1 | awk '{print$$1}'`; \
+ mods=`grep '^Modifications: ' gitinfo | awk '{print$$2} END { if(!NR) print "false" }'`; \
+ else \
+ isgit=false; \
+ branch=unknown; \
+ rev=unknown; \
+ mods=false; \
+ fi; \
+ echo "#include \"util/configuration.h\""; \
+ echo "const bool ::CVC4::Configuration::IS_GIT_BUILD = $$isgit;"; \
+ echo "const char* const ::CVC4::Configuration::GIT_BRANCH_NAME = \"$$branch\";"; \
+ echo "const char* const ::CVC4::Configuration::GIT_COMMIT = \"$$rev\";"; \
+ echo "const bool ::CVC4::Configuration::GIT_HAS_MODIFICATIONS = $$mods;"; \
+ ) >"$@"
+# This .tmp business is to keep from having to re-compile options.cpp
+# (and then re-link the libraries) if nothing has changed.
+gitinfo: gitinfo.tmp
+ $(AM_V_GEN)diff -q gitinfo.tmp gitinfo &>/dev/null || mv gitinfo.tmp gitinfo || true
+# .PHONY ensures the .tmp version is always rebuilt (to check for any changes)
+.PHONY: gitinfo.tmp
+gitinfo.tmp:
+ $(AM_V_GEN)(cd "$(top_srcdir)" && sed 's,^ref: refs/heads/,,' .git/HEAD && git show-ref refs/heads/`sed 's,^ref: refs/heads/,,' .git/HEAD` && echo "Modifications: `test -z \"\`git status -s -uno\`\" && echo false || echo true`") >"$@" 2>/dev/null || true
+
install-data-local:
(echo include/cvc4.h; \
echo include/cvc4_public.h; \
@@ -120,7 +151,7 @@ install-data-local:
(cd "$(srcdir)" && find * -name '*.h' | \
xargs grep -l '^# *include *"cvc4.*_public\.h"')) | \
while read f; do \
- if expr "$$f" : ".*_\(template\|private\|test_utils\)\.h$$" &>/dev/null; then \
+ if expr "$$f" : ".*_\(template\|private\|private_library\|test_utils\)\.h$$" &>/dev/null; then \
continue; \
fi; \
d="$$(echo "$$f" | sed 's,^include/,,')"; \
@@ -150,7 +181,7 @@ uninstall-local:
(cd "$(srcdir)" && find * -name '*.h' | \
xargs grep -l '^# *include *"cvc4.*_public\.h"')) | \
while read f; do \
- if expr "$$f" : ".*_\(template\|private\|test_utils\)\.h$$" &>/dev/null; then \
+ if expr "$$f" : ".*_\(template\|private\|private_library\|test_utils\)\.h$$" &>/dev/null; then \
continue; \
fi; \
d="$$(echo "$$f" | sed 's,^include/,,')"; \
@@ -175,7 +206,7 @@ mostlyclean-local:
(cd "$(srcdir)" && find * -name '*.h' | \
xargs grep -l '^# *include *"cvc4.*_public\.h"')) | \
while read f; do \
- if expr "$$f" : ".*_\(template\|private\|test_utils\)\.h$$" &>/dev/null; then \
+ if expr "$$f" : ".*_\(template\|private\|private_library\|test_utils\)\.h$$" &>/dev/null; then \
continue; \
fi; \
d="$$(echo "$$f" | sed 's,^include/,,')"; \
diff --git a/src/compat/cvc3_compat.cpp b/src/compat/cvc3_compat.cpp
index 2a8673451..0cd35ce0d 100644
--- a/src/compat/cvc3_compat.cpp
+++ b/src/compat/cvc3_compat.cpp
@@ -1075,7 +1075,7 @@ Type ValidityChecker::subrangeType(const Expr& l, const Expr& r) {
}
Type ValidityChecker::subtypeType(const Expr& pred, const Expr& witness) {
- Unimplemented("Records not supported by CVC4 yet (sorry!)");
+ Unimplemented("Predicate subtyping not supported by CVC4 yet (sorry!)");
/*
if(witness.isNull()) {
return d_em->mkPredicateSubtype(pred);
diff --git a/src/context/cdinsert_hashmap.h b/src/context/cdinsert_hashmap.h
index 0c84eda80..74e2fcf28 100644
--- a/src/context/cdinsert_hashmap.h
+++ b/src/context/cdinsert_hashmap.h
@@ -392,7 +392,7 @@ class CDInsertHashMap <TNode, Data, HashFcn > : public ContextObj {
* If the key is a TNode and the backing (the hard node reference)
* for the key in another data structure removes the key at the same context
* the ref count could drop to 0. The key would then not be eligible to be
- * hashed. Getting the order right with a guarentee is to hard.
+ * hashed. Getting the order right with a guarantee is too hard.
*/
BOOST_STATIC_ASSERT(sizeof(Data) == 0);
diff --git a/src/context/cdtrail_hashmap.h b/src/context/cdtrail_hashmap.h
index 5f090341d..2d2020a16 100644
--- a/src/context/cdtrail_hashmap.h
+++ b/src/context/cdtrail_hashmap.h
@@ -540,7 +540,7 @@ public:
return d_trailMap->find(k);
}
- /** Returns an iterator to the begining of the map. */
+ /** Returns an iterator to the beginning of the map. */
const_iterator begin() const{
return d_trailMap->begin();
}
@@ -561,7 +561,7 @@ class CDTrailHashMap <TNode, Data, HashFcn > : public ContextObj {
* If the key is a TNode and the backing (the hard node reference)
* for the key in another data structure removes the key at the same context
* the ref count could drop to 0. The key would then not be eligible to be
- * hashed. Getting the order right with a guarentee is to hard.
+ * hashed. Getting the order right with a guarantee is too hard.
*/
BOOST_STATIC_ASSERT(sizeof(Data) == 0);
diff --git a/src/decision/decision_engine.cpp b/src/decision/decision_engine.cpp
index 9e8add752..08a3e49d0 100644
--- a/src/decision/decision_engine.cpp
+++ b/src/decision/decision_engine.cpp
@@ -96,7 +96,7 @@ bool DecisionEngine::isRelevant(SatVariable var)
SatValue DecisionEngine::getPolarity(SatVariable var)
{
- Debug("decision") << "getPolariry(" << var <<")" << std::endl;
+ Debug("decision") << "getPolarity(" << var <<")" << std::endl;
if(d_relevancyStrategy != NULL) {
Assert(isRelevant(var));
return d_relevancyStrategy->getPolarity( d_cnfStream->getNode(SatLiteral(var)) );
diff --git a/src/decision/decision_strategy.h b/src/decision/decision_strategy.h
index a3c0d1684..a2fda44fe 100644
--- a/src/decision/decision_strategy.h
+++ b/src/decision/decision_strategy.h
@@ -9,7 +9,7 @@
** See the file COPYING in the top-level source directory for licensing
** information.\endverbatim
**
- ** \brief Decision stategy
+ ** \brief Decision strategy
**
** Decision strategy
**/
diff --git a/src/decision/justification_heuristic.cpp b/src/decision/justification_heuristic.cpp
index 46ec6f09f..0b63dfbe1 100644
--- a/src/decision/justification_heuristic.cpp
+++ b/src/decision/justification_heuristic.cpp
@@ -16,25 +16,6 @@
**
** It needs access to the simplified but non-clausal formula.
**/
-/*****************************************************************************/
-/*!
- * file search_sat.cpp
- * brief Implementation of Search engine with generic external sat solver
- *
- * Author: Clark Barrett
- *
- * Created: Wed Dec 7 21:00:24 2005
- *
- * <hr>
- *
- * License to use, copy, modify, sell and/or distribute this software
- * and its documentation for any purpose is hereby granted without
- * royalty, subject to the terms and conditions defined in the \ref
- * LICENSE file provided with this distribution.
- *
- * <hr>
- */
-/*****************************************************************************/
#include "justification_heuristic.h"
@@ -43,7 +24,158 @@
#include "theory/rewriter.h"
#include "util/ite_removal.h"
-// JustificationHeuristic stuff
+
+using namespace CVC4;
+
+JustificationHeuristic::JustificationHeuristic(CVC4::DecisionEngine* de,
+ context::Context *uc,
+ context::Context *c):
+ ITEDecisionStrategy(de, c),
+ d_justified(c),
+ d_prvsIndex(c, 0),
+ d_helfulness("decision::jh::helpfulness", 0),
+ d_giveup("decision::jh::giveup", 0),
+ d_timestat("decision::jh::time"),
+ d_assertions(uc),
+ d_iteAssertions(uc),
+ d_iteCache(),
+ d_visited(),
+ d_visitedComputeITE(),
+ d_curDecision() {
+ StatisticsRegistry::registerStat(&d_helfulness);
+ StatisticsRegistry::registerStat(&d_giveup);
+ StatisticsRegistry::registerStat(&d_timestat);
+ Trace("decision") << "Justification heuristic enabled" << std::endl;
+}
+
+JustificationHeuristic::~JustificationHeuristic() {
+ StatisticsRegistry::unregisterStat(&d_helfulness);
+ StatisticsRegistry::unregisterStat(&d_giveup);
+ StatisticsRegistry::unregisterStat(&d_timestat);
+}
+
+CVC4::prop::SatLiteral JustificationHeuristic::getNext(bool &stopSearch) {
+ Trace("decision") << "JustificationHeuristic::getNext()" << std::endl;
+ TimerStat::CodeTimer codeTimer(d_timestat);
+
+ d_visited.clear();
+
+ if(Trace.isOn("justified")) {
+ for(JustifiedSet::key_iterator i = d_justified.key_begin();
+ i != d_justified.key_end(); ++i) {
+ TNode n = *i;
+ SatLiteral l = d_decisionEngine->hasSatLiteral(n) ?
+ d_decisionEngine->getSatLiteral(n) : -1;
+ SatValue v = tryGetSatValue(n);
+ Trace("justified") <<"{ "<<l<<"}" << n <<": "<<v << std::endl;
+ }
+ }
+
+ for(unsigned i = d_prvsIndex; i < d_assertions.size(); ++i) {
+ Debug("decision") << "---" << std::endl << d_assertions[i] << std::endl;
+
+ // Sanity check: if it was false, aren't we inconsistent?
+ Assert( tryGetSatValue(d_assertions[i]) != SAT_VALUE_FALSE);
+
+ SatValue desiredVal = SAT_VALUE_TRUE;
+ SatLiteral litDecision;
+
+ litDecision = findSplitter(d_assertions[i], desiredVal);
+
+ if(litDecision != undefSatLiteral) {
+ d_prvsIndex = i;
+ return litDecision;
+ }
+ }
+
+ Trace("decision") << "jh: Nothing to split on " << std::endl;
+
+#if defined CVC4_DEBUG
+ bool alljustified = true;
+ for(unsigned i = 0 ; i < d_assertions.size() && alljustified ; ++i) {
+ TNode curass = d_assertions[i];
+ while(curass.getKind() == kind::NOT)
+ curass = curass[0];
+ alljustified &= checkJustified(curass);
+
+ if(Debug.isOn("decision")) {
+ if(!checkJustified(curass))
+ Debug("decision") << "****** Not justified [i="<<i<<"]: "
+ << d_assertions[i] << std::endl;
+ }
+ }
+ Assert(alljustified);
+#endif
+
+ // SAT solver can stop...
+ stopSearch = true;
+ d_decisionEngine->setResult(SAT_VALUE_TRUE);
+ return prop::undefSatLiteral;
+}
+
+
+inline void computeXorIffDesiredValues
+(Kind k, SatValue desiredVal, SatValue &desiredVal1, SatValue &desiredVal2)
+{
+ Assert(k == kind::IFF || k == kind::XOR);
+
+ bool shouldInvert =
+ (desiredVal == SAT_VALUE_TRUE && k == kind::IFF) ||
+ (desiredVal == SAT_VALUE_FALSE && k == kind::XOR);
+
+ if(desiredVal1 == SAT_VALUE_UNKNOWN &&
+ desiredVal2 == SAT_VALUE_UNKNOWN) {
+ // CHOICE: pick one of them arbitarily
+ desiredVal1 = SAT_VALUE_FALSE;
+ }
+
+ if(desiredVal2 == SAT_VALUE_UNKNOWN) {
+ desiredVal2 = shouldInvert ? invertValue(desiredVal1) : desiredVal1;
+ } else if(desiredVal1 == SAT_VALUE_UNKNOWN) {
+ desiredVal1 = shouldInvert ? invertValue(desiredVal2) : desiredVal2;
+ }
+}
+
+
+
+void JustificationHeuristic::addAssertions
+(const std::vector<Node> &assertions,
+ unsigned assertionsEnd,
+ IteSkolemMap iteSkolemMap) {
+
+ Trace("decision")
+ << "JustificationHeuristic::addAssertions()"
+ << " size = " << assertions.size()
+ << " assertionsEnd = " << assertionsEnd
+ << std::endl;
+
+ // Save the 'real' assertions locally
+ for(unsigned i = 0; i < assertionsEnd; ++i)
+ d_assertions.push_back(assertions[i]);
+
+ // Save mapping between ite skolems and ite assertions
+ for(IteSkolemMap::iterator i = iteSkolemMap.begin();
+ i != iteSkolemMap.end(); ++i) {
+
+ Trace("decision::jh::ite")
+ << " jh-ite: " << (i->first) << " maps to "
+ << assertions[(i->second)] << std::endl;
+ Assert(i->second >= assertionsEnd && i->second < assertions.size());
+
+ d_iteAssertions[i->first] = assertions[i->second];
+ }
+}
+
+SatLiteral JustificationHeuristic::findSplitter(TNode node,
+ SatValue desiredVal)
+{
+ d_curDecision = undefSatLiteral;
+ if(findSplitterRec(node, desiredVal)) {
+ ++d_helfulness;
+ }
+ return d_curDecision;
+}
+
void JustificationHeuristic::setJustified(TNode n)
{
@@ -67,9 +199,25 @@ SatValue JustificationHeuristic::tryGetSatValue(Node n)
}//end of else
}
+const JustificationHeuristic::IteList&
+JustificationHeuristic::getITEs(TNode n)
+{
+ IteCache::iterator it = d_iteCache.find(n);
+ if(it != d_iteCache.end()) {
+ return it->second;
+ } else {
+ // Compute the list of ITEs
+ // TODO: optimize by avoiding multiple lookup for d_iteCache[n]
+ d_iteCache[n] = IteList();
+ d_visitedComputeITE.clear();
+ computeITEs(n, d_iteCache[n]);
+ return d_iteCache[n];
+ }
+}
+
void JustificationHeuristic::computeITEs(TNode n, IteList &l)
{
- Trace("jh-ite") << " computeITEs( " << n << ", &l)\n";
+ Trace("decision::jh::ite") << " computeITEs( " << n << ", &l)\n";
d_visitedComputeITE.insert(n);
for(unsigned i=0; i<n.getNumChildren(); ++i) {
SkolemMap::iterator it2 = d_iteAssertions.find(n[i]);
@@ -84,35 +232,19 @@ void JustificationHeuristic::computeITEs(TNode n, IteList &l)
}
}
-const JustificationHeuristic::IteList& JustificationHeuristic::getITEs(TNode n)
-{
- IteCache::iterator it = d_iteCache.find(n);
- if(it != d_iteCache.end()) {
- return it->second;
- } else {
- // Compute the list of ITEs
- // TODO: optimize by avoiding multiple lookup for d_iteCache[n]
- d_iteCache[n] = IteList();
- d_visitedComputeITE.clear();
- computeITEs(n, d_iteCache[n]);
- return d_iteCache[n];
- }
-}
-
bool JustificationHeuristic::findSplitterRec(TNode node,
- SatValue desiredVal,
- SatLiteral* litDecision)
+ SatValue desiredVal)
{
/**
* Main idea
*
* Given a boolean formula "node", the goal is to try to make it
- * evaluate to "desiredVal" (true/false). for instance if "node" is a AND
+ * evaluate to "desiredVal" (true/false). for instance if "node" is a OR
* formula we want to make it evaluate to true, we'd like one of the
* children to be true. this is done recursively.
*/
- Trace("jh-findSplitterRec")
+ Trace("decision::jh")
<< "findSplitterRec(" << node << ", "
<< desiredVal << ", .. )" << std::endl;
@@ -122,13 +254,9 @@ bool JustificationHeuristic::findSplitterRec(TNode node,
node = node[0];
}
- if(Debug.isOn("decision")) {
- if(checkJustified(node))
- Debug("decision") << " justified, returning" << std::endl;
- }
-
/* Base case */
if (checkJustified(node)) {
+ Debug("decision::jh") << " justified, returning" << std::endl;
return false;
}
@@ -141,7 +269,6 @@ bool JustificationHeuristic::findSplitterRec(TNode node,
Debug("decision") << "no sat literal for this node" << std::endl;
}
}
- //Assert(litPresent); -- fails
#endif
// Get value of sat literal for the node, if there is one
@@ -151,11 +278,6 @@ bool JustificationHeuristic::findSplitterRec(TNode node,
Assert(desiredVal != SAT_VALUE_UNKNOWN, "expected known value");
/* Good luck, hope you can get what you want */
- // if(not (litVal == desiredVal || litVal == SAT_VALUE_UNKNOWN)) {
- // Warning() << "WARNING: IMPORTANT: Please look into this. Sat solver is asking for a decision" << std::endl
- // << "when the assertion we are trying to justify is already unsat. OR there is a bug" << std::endl;
- // GiveUpException();
- // }
Assert(litVal == desiredVal || litVal == SAT_VALUE_UNKNOWN,
"invariant violated");
@@ -164,247 +286,192 @@ bool JustificationHeuristic::findSplitterRec(TNode node,
theory::TheoryId tId = theory::kindToTheoryId(k);
/* Some debugging stuff */
- Debug("jh-findSplitterRec") << "kind = " << k << std::endl;
- Debug("jh-findSplitterRec") << "theoryId = " << tId << std::endl;
- Debug("jh-findSplitterRec") << "node = " << node << std::endl;
- Debug("jh-findSplitterRec") << "litVal = " << litVal << std::endl;
+ Debug("decision::jh") << "kind = " << k << std::endl
+ << "theoryId = " << tId << std::endl
+ << "node = " << node << std::endl
+ << "litVal = " << litVal << std::endl;
/**
- * If not in theory of booleans, and not a "boolean" EQUAL (IFF),
- * then check if this is something to split-on.
+ * If not in theory of booleans, check if this is something to split-on.
*/
- if(tId != theory::THEORY_BOOL
- // && !(k == kind::EQUAL && node[0].getType().isBoolean())
- ) {
-
- // if node has embedded ites -- which currently happens iff it got
- // replaced during ite removal -- then try to resolve that first
- const IteList& l = getITEs(node);
- Trace("jh-ite") << " ite size = " << l.size() << std::endl;
- /*d_visited.insert(node);*/
- for(IteList::const_iterator i = l.begin(); i != l.end(); ++i) {
- if(d_visited.find(i->first) == d_visited.end()) {
- d_visited.insert(i->first);
- Debug("jh-ite") << "jh-ite: adding visited " << i->first << std::endl;
- if(findSplitterRec(i->second, SAT_VALUE_TRUE, litDecision))
- return true;
- Debug("jh-ite") << "jh-ite: removing visited " << i->first << std::endl;
- d_visited.erase(i->first);
- } else {
- Debug("jh-ite") << "jh-ite: already visited " << i->first << std::endl;
- }
- }
+ if(tId != theory::THEORY_BOOL) {
+
+ // if node has embedded ites, resolve that first
+ if(handleEmbeddedITEs(node))
+ return true;
if(litVal != SAT_VALUE_UNKNOWN) {
setJustified(node);
return false;
- } else {
- Assert(d_decisionEngine->hasSatLiteral(node));
- /* if(not d_decisionEngine->hasSatLiteral(node))
- throw GiveUpException(); */
+ }
+ else {
Assert(d_decisionEngine->hasSatLiteral(node));
- SatVariable v = d_decisionEngine->getSatLiteral(node).getSatVariable();
- *litDecision = SatLiteral(v, desiredVal != SAT_VALUE_TRUE );
- Trace("decision") << "decision " << *litDecision << std::endl;
- Trace("decision") << "Found something to split. Glad to be able to serve you." << std::endl;
+ SatVariable v =
+ d_decisionEngine->getSatLiteral(node).getSatVariable();
+ d_curDecision = SatLiteral(v, desiredVal != SAT_VALUE_TRUE );
return true;
}
}
- SatValue valHard = SAT_VALUE_FALSE;
+ bool ret = false;
switch (k) {
case kind::CONST_BOOLEAN:
Assert(node.getConst<bool>() == false || desiredVal == SAT_VALUE_TRUE);
- Assert(node.getConst<bool>() == true || desiredVal == SAT_VALUE_FALSE);
- setJustified(node);
- return false;
+ Assert(node.getConst<bool>() == true || desiredVal == SAT_VALUE_FALSE);
+ break;
case kind::AND:
- valHard = SAT_VALUE_TRUE;
+ if (desiredVal == SAT_VALUE_FALSE)
+ ret = handleAndOrEasy(node, desiredVal);
+ else
+ ret = handleAndOrHard(node, desiredVal);
+ break;
case kind::OR:
- if (desiredVal == valHard) {
- int n = node.getNumChildren();
- for(int i = 0; i < n; ++i) {
- if (findSplitterRec(node[i], valHard, litDecision)) {
- return true;
- }
- }
- Assert(litPresent == false || litVal == valHard,
- "Output should be justified");
- setJustified(node);
- return false;
- }
- else {
- SatValue valEasy = invertValue(valHard);
- int n = node.getNumChildren();
- for(int i = 0; i < n; ++i) {
- Debug("jh-findSplitterRec") << " node[i] = " << node[i] << " "
- << tryGetSatValue(node[i]) << std::endl;
- if ( tryGetSatValue(node[i]) != valHard) {
- Debug("jh-findSplitterRec") << "hi"<< std::endl;
- if (findSplitterRec(node[i], valEasy, litDecision)) {
- return true;
- }
- Assert(litPresent == false || litVal == valEasy, "Output should be justified");
- setJustified(node);
- return false;
- }
- }
- if(Debug.isOn("jh-findSplitterRec")) {
- Debug("jh-findSplitterRec") << " * ** " << std::endl;
- Debug("jh-findSplitterRec") << node.getKind() << " "
- << node << std::endl;
- for(unsigned i = 0; i < node.getNumChildren(); ++i)
- Debug("jh-findSplitterRec") << "child: " << tryGetSatValue(node[i])
- << std::endl;
- Debug("jh-findSplitterRec") << "node: " << tryGetSatValue(node)
- << std::endl;
- }
- Assert(false, "No controlling input found (2)");
- }
+ if (desiredVal == SAT_VALUE_FALSE)
+ ret = handleAndOrHard(node, desiredVal);
+ else
+ ret = handleAndOrEasy(node, desiredVal);
break;
case kind::IMPLIES:
- //throw GiveUpException();
- Assert(node.getNumChildren() == 2, "Expected 2 fanins");
- if (desiredVal == SAT_VALUE_FALSE) {
- if (findSplitterRec(node[0], SAT_VALUE_TRUE, litDecision)) {
- return true;
- }
- if (findSplitterRec(node[1], SAT_VALUE_FALSE, litDecision)) {
- return true;
- }
- Assert(litPresent == false || litVal == SAT_VALUE_FALSE,
- "Output should be justified");
- setJustified(node);
- return false;
- }
- else {
- if (tryGetSatValue(node[0]) != SAT_VALUE_TRUE) {
- if (findSplitterRec(node[0], SAT_VALUE_FALSE, litDecision)) {
- return true;
- }
- Assert(litPresent == false || litVal == SAT_VALUE_TRUE,
- "Output should be justified");
- setJustified(node);
- return false;
- }
- if (tryGetSatValue(node[1]) != SAT_VALUE_FALSE) {
- if (findSplitterRec(node[1], SAT_VALUE_TRUE, litDecision)) {
- return true;
- }
- Assert(litPresent == false || litVal == SAT_VALUE_TRUE,
- "Output should be justified");
- setJustified(node);
- return false;
- }
- Assert(false, "No controlling input found (3)");
- }
- break;
-
- case kind::IFF:
- //throw GiveUpException();
- {
- SatValue val = tryGetSatValue(node[0]);
- if (val != SAT_VALUE_UNKNOWN) {
- if (findSplitterRec(node[0], val, litDecision)) {
- return true;
- }
- if (desiredVal == SAT_VALUE_FALSE) val = invertValue(val);
+ if (desiredVal == SAT_VALUE_FALSE)
+ ret = handleBinaryHard(node[0], SAT_VALUE_TRUE,
+ node[1], SAT_VALUE_FALSE);
- if (findSplitterRec(node[1], val, litDecision)) {
- return true;
- }
- Assert(litPresent == false || litVal == desiredVal,
- "Output should be justified");
- setJustified(node);
- return false;
- }
- else {
- val = tryGetSatValue(node[1]);
- if (val == SAT_VALUE_UNKNOWN) val = SAT_VALUE_FALSE;
- if (desiredVal == SAT_VALUE_FALSE) val = invertValue(val);
- if (findSplitterRec(node[0], val, litDecision)) {
- return true;
- }
- Assert(false, "Unable to find controlling input (4)");
- }
+ else
+ ret = handleBinaryEasy(node[0], SAT_VALUE_FALSE,
+ node[1], SAT_VALUE_TRUE);
break;
- }
-
- case kind::XOR:
- //throw GiveUpException();
- {
- SatValue val = tryGetSatValue(node[0]);
- if (val != SAT_VALUE_UNKNOWN) {
- if (findSplitterRec(node[0], val, litDecision)) {
- return true;
- }
- if (desiredVal == SAT_VALUE_TRUE) val = invertValue(val);
- if (findSplitterRec(node[1], val, litDecision)) {
- return true;
- }
- Assert(litPresent == false || litVal == desiredVal,
- "Output should be justified");
- setJustified(node);
- return false;
- }
- else {
- SatValue val = tryGetSatValue(node[1]);
- if (val == SAT_VALUE_UNKNOWN) val = SAT_VALUE_FALSE;
- if (desiredVal == SAT_VALUE_TRUE) val = invertValue(val);
- if (findSplitterRec(node[0], val, litDecision)) {
- return true;
- }
- Assert(false, "Unable to find controlling input (5)");
- }
+ case kind::XOR:
+ case kind::IFF: {
+ SatValue desiredVal1 = tryGetSatValue(node[0]);
+ SatValue desiredVal2 = tryGetSatValue(node[1]);
+ computeXorIffDesiredValues(k, desiredVal, desiredVal1, desiredVal2);
+ ret = handleBinaryHard(node[0], desiredVal1,
+ node[1], desiredVal2);
break;
}
- case kind::ITE: {
- //[0]: if, [1]: then, [2]: else
- SatValue ifVal = tryGetSatValue(node[0]);
- if (ifVal == SAT_VALUE_UNKNOWN) {
-
- // are we better off trying false? if not, try true
- SatValue ifDesiredVal =
- (tryGetSatValue(node[2]) == desiredVal ||
- tryGetSatValue(node[1]) == invertValue(desiredVal))
- ? SAT_VALUE_FALSE : SAT_VALUE_TRUE;
-
- if(findSplitterRec(node[0], ifDesiredVal, litDecision)) {
- return true;
- }
- Assert(false, "No controlling input found (6)");
- } else {
-
- // Try to justify 'if'
- if (findSplitterRec(node[0], ifVal, litDecision)) {
- return true;
- }
-
- // If that was successful, we need to go into only one of 'then'
- // or 'else'
- int ch = (ifVal == SAT_VALUE_TRUE) ? 1 : 2;
- int chVal = tryGetSatValue(node[ch]);
- if( (chVal == SAT_VALUE_UNKNOWN || chVal == desiredVal)
- && findSplitterRec(node[ch], desiredVal, litDecision) ) {
- return true;
- }
- }
- Assert(litPresent == false || litVal == desiredVal,
- "Output should be justified");
- setJustified(node);
- return false;
- }
+ case kind::ITE:
+ ret = handleITE(node, desiredVal);
+ break;
default:
Assert(false, "Unexpected Boolean operator");
break;
}//end of switch(k)
- Unreachable();
+ if(ret == false) {
+ Assert(litPresent == false || litVal == desiredVal,
+ "Output should be justified");
+ setJustified(node);
+ }
+ return ret;
}/* findRecSplit method */
+
+bool JustificationHeuristic::handleAndOrEasy(TNode node,
+ SatValue desiredVal)
+{
+ Assert( (node.getKind() == kind::AND and desiredVal == SAT_VALUE_FALSE) or
+ (node.getKind() == kind::OR and desiredVal == SAT_VALUE_TRUE) );
+
+ int numChildren = node.getNumChildren();
+ SatValue desiredValInverted = invertValue(desiredVal);
+ for(int i = 0; i < numChildren; ++i)
+ if ( tryGetSatValue(node[i]) != desiredValInverted )
+ return findSplitterRec(node[i], desiredVal);
+ Assert(false, "handleAndOrEasy: No controlling input found");
+ return false;
+}
+
+bool JustificationHeuristic::handleAndOrHard(TNode node,
+ SatValue desiredVal) {
+ Assert( (node.getKind() == kind::AND and desiredVal == SAT_VALUE_TRUE) or
+ (node.getKind() == kind::OR and desiredVal == SAT_VALUE_FALSE) );
+
+ int numChildren = node.getNumChildren();
+ for(int i = 0; i < numChildren; ++i)
+ if (findSplitterRec(node[i], desiredVal))
+ return true;
+ return false;
+}
+
+bool JustificationHeuristic::handleBinaryEasy(TNode node1,
+ SatValue desiredVal1,
+ TNode node2,
+ SatValue desiredVal2)
+{
+ if ( tryGetSatValue(node1) != invertValue(desiredVal1) )
+ return findSplitterRec(node1, desiredVal1);
+ if ( tryGetSatValue(node2) != invertValue(desiredVal2) )
+ return findSplitterRec(node2, desiredVal2);
+ Assert(false, "handleBinaryEasy: No controlling input found");
+ return false;
+}
+
+bool JustificationHeuristic::handleBinaryHard(TNode node1,
+ SatValue desiredVal1,
+ TNode node2,
+ SatValue desiredVal2)
+{
+ if( findSplitterRec(node1, desiredVal1) )
+ return true;
+ return findSplitterRec(node2, desiredVal2);
+}
+
+bool JustificationHeuristic::handleITE(TNode node, SatValue desiredVal)
+{
+ Debug("decision::jh") << " handleITE (" << node << ", "
+ << desiredVal << std::endl;
+
+ //[0]: if, [1]: then, [2]: else
+ SatValue ifVal = tryGetSatValue(node[0]);
+ if (ifVal == SAT_VALUE_UNKNOWN) {
+
+ // are we better off trying false? if not, try true [CHOICE]
+ SatValue ifDesiredVal =
+ (tryGetSatValue(node[2]) == desiredVal ||
+ tryGetSatValue(node[1]) == invertValue(desiredVal))
+ ? SAT_VALUE_FALSE : SAT_VALUE_TRUE;
+
+ if(findSplitterRec(node[0], ifDesiredVal)) return true;
+
+ Assert(false, "No controlling input found (6)");
+ } else {
+ // Try to justify 'if'
+ if(findSplitterRec(node[0], ifVal)) return true;
+
+ // If that was successful, we need to go into only one of 'then'
+ // or 'else'
+ int ch = (ifVal == SAT_VALUE_TRUE) ? 1 : 2;
+
+ // STALE code: remove after tests or mar 2013, whichever earlier
+ // int chVal = tryGetSatValue(node[ch]);
+ // Assert(chVal == SAT_VALUE_UNKNOWN || chVal == desiredVal);
+ // end STALE code: remove
+
+ if( findSplitterRec(node[ch], desiredVal) ) {
+ return true;
+ }
+ }// else (...ifVal...)
+ return false;
+}
+
+bool JustificationHeuristic::handleEmbeddedITEs(TNode node)
+{
+ const IteList& l = getITEs(node);
+ Trace("decision::jh::ite") << " ite size = " << l.size() << std::endl;
+
+ for(IteList::const_iterator i = l.begin(); i != l.end(); ++i) {
+ if(d_visited.find(i->first) == d_visited.end()) {
+ d_visited.insert(i->first);
+ if(findSplitterRec(i->second, SAT_VALUE_TRUE))
+ return true;
+ d_visited.erase(i->first);
+ }
+ }
+ return false;
+}
diff --git a/src/decision/justification_heuristic.h b/src/decision/justification_heuristic.h
index ea67fee29..91c21d981 100644
--- a/src/decision/justification_heuristic.h
+++ b/src/decision/justification_heuristic.h
@@ -36,13 +36,6 @@ namespace CVC4 {
namespace decision {
-class GiveUpException : public Exception {
-public:
- GiveUpException() :
- Exception("justification heuristic: giving up") {
- }
-};/* class GiveUpException */
-
class JustificationHeuristic : public ITEDecisionStrategy {
typedef std::vector<pair<TNode,TNode> > IteList;
typedef hash_map<TNode,IteList,TNodeHashFunction> IteCache;
@@ -84,130 +77,29 @@ class JustificationHeuristic : public ITEDecisionStrategy {
* function
*/
hash_set<TNode,TNodeHashFunction> d_visitedComputeITE;
+
+ /** current decision for the recursive call */
+ SatLiteral d_curDecision;
public:
JustificationHeuristic(CVC4::DecisionEngine* de,
context::Context *uc,
- context::Context *c):
- ITEDecisionStrategy(de, c),
- d_justified(c),
- d_prvsIndex(c, 0),
- d_helfulness("decision::jh::helpfulness", 0),
- d_giveup("decision::jh::giveup", 0),
- d_timestat("decision::jh::time"),
- d_assertions(uc),
- d_iteAssertions(uc) {
- StatisticsRegistry::registerStat(&d_helfulness);
- StatisticsRegistry::registerStat(&d_giveup);
- StatisticsRegistry::registerStat(&d_timestat);
- Trace("decision") << "Justification heuristic enabled" << std::endl;
- }
- ~JustificationHeuristic() {
- StatisticsRegistry::unregisterStat(&d_helfulness);
- StatisticsRegistry::unregisterStat(&d_giveup);
- StatisticsRegistry::unregisterStat(&d_timestat);
- }
- prop::SatLiteral getNext(bool &stopSearch) {
- Trace("decision") << "JustificationHeuristic::getNext()" << std::endl;
- TimerStat::CodeTimer codeTimer(d_timestat);
-
- d_visited.clear();
-
- if(Trace.isOn("justified")) {
- for(JustifiedSet::key_iterator i = d_justified.key_begin();
- i != d_justified.key_end(); ++i) {
- TNode n = *i;
- SatLiteral l = d_decisionEngine->hasSatLiteral(n) ?
- d_decisionEngine->getSatLiteral(n) : -1;
- SatValue v = tryGetSatValue(n);
- Trace("justified") <<"{ "<<l<<"}" << n <<": "<<v << std::endl;
- }
- }
-
- for(unsigned i = d_prvsIndex; i < d_assertions.size(); ++i) {
- Debug("decision") << "---" << std::endl << d_assertions[i] << std::endl;
-
- // Sanity check: if it was false, aren't we inconsistent?
- Assert( tryGetSatValue(d_assertions[i]) != SAT_VALUE_FALSE);
-
- SatValue desiredVal = SAT_VALUE_TRUE;
- SatLiteral litDecision;
- try {
- litDecision = findSplitter(d_assertions[i], desiredVal);
- }catch(GiveUpException &e) {
- return prop::undefSatLiteral;
- }
-
- if(litDecision != undefSatLiteral)
- return litDecision;
- }
-
- Trace("decision") << "jh: Nothing to split on " << std::endl;
-
-#if defined CVC4_DEBUG
- bool alljustified = true;
- for(unsigned i = 0 ; i < d_assertions.size() && alljustified ; ++i) {
- TNode curass = d_assertions[i];
- while(curass.getKind() == kind::NOT)
- curass = curass[0];
- alljustified &= checkJustified(curass);
-
- if(Debug.isOn("decision")) {
- if(!checkJustified(curass))
- Debug("decision") << "****** Not justified [i="<<i<<"]: "
- << d_assertions[i] << std::endl;
- }
- }
- Assert(alljustified);
-#endif
-
- // SAT solver can stop...
- stopSearch = true;
- d_decisionEngine->setResult(SAT_VALUE_TRUE);
- return prop::undefSatLiteral;
- }
+ context::Context *c);
+
+ ~JustificationHeuristic();
+
+ prop::SatLiteral getNext(bool &stopSearch);
void addAssertions(const std::vector<Node> &assertions,
unsigned assertionsEnd,
- IteSkolemMap iteSkolemMap) {
- Trace("decision")
- << "JustificationHeuristic::addAssertions()"
- << " size = " << assertions.size()
- << " assertionsEnd = " << assertionsEnd
- << std::endl;
-
- // Save the 'real' assertions locally
- for(unsigned i = 0; i < assertionsEnd; ++i)
- d_assertions.push_back(assertions[i]);
-
- // Save mapping between ite skolems and ite assertions
- for(IteSkolemMap::iterator i = iteSkolemMap.begin();
- i != iteSkolemMap.end(); ++i) {
- Trace("jh-ite") << " jh-ite: " << (i->first) << " maps to "
- << assertions[(i->second)] << std::endl;
- Assert(i->second >= assertionsEnd && i->second < assertions.size());
- d_iteAssertions[i->first] = assertions[i->second];
- }
- }
+ IteSkolemMap iteSkolemMap);
private:
- SatLiteral findSplitter(TNode node, SatValue desiredVal)
- {
- bool ret;
- SatLiteral litDecision;
- ret = findSplitterRec(node, desiredVal, &litDecision);
- if(ret == true) {
- Debug("decision") << "Yippee!!" << std::endl;
- ++d_helfulness;
- return litDecision;
- } else {
- return undefSatLiteral;
- }
- }
+ SatLiteral findSplitter(TNode node, SatValue desiredVal);
/**
* Do all the hard work.
*/
- bool findSplitterRec(TNode node, SatValue value, SatLiteral* litDecision);
+ bool findSplitterRec(TNode node, SatValue value);
/* Helper functions */
void setJustified(TNode);
@@ -222,6 +114,15 @@ private:
/* Compute all term-ITEs in a node recursively */
void computeITEs(TNode n, IteList &l);
+
+ bool handleAndOrEasy(TNode node, SatValue desiredVal);
+ bool handleAndOrHard(TNode node, SatValue desiredVal);
+ bool handleBinaryEasy(TNode node1, SatValue desiredVal1,
+ TNode node2, SatValue desiredVal2);
+ bool handleBinaryHard(TNode node1, SatValue desiredVal1,
+ TNode node2, SatValue desiredVal2);
+ bool handleITE(TNode node, SatValue desiredVal);
+ bool handleEmbeddedITEs(TNode node);
};/* class JustificationHeuristic */
}/* namespace decision */
diff --git a/src/expr/command.cpp b/src/expr/command.cpp
index fa2a8d1f2..9edc77e39 100644
--- a/src/expr/command.cpp
+++ b/src/expr/command.cpp
@@ -703,8 +703,12 @@ Expr SimplifyCommand::getTerm() const throw() {
}
void SimplifyCommand::invoke(SmtEngine* smtEngine) throw() {
- d_result = smtEngine->simplify(d_term);
- d_commandStatus = CommandSuccess::instance();
+ try {
+ d_result = smtEngine->simplify(d_term);
+ d_commandStatus = CommandSuccess::instance();
+ } catch(exception& e) {
+ d_commandStatus = new CommandFailure(e.what());
+ }
}
Expr SimplifyCommand::getResult() const throw() {
diff --git a/src/expr/command.h b/src/expr/command.h
index 342aec5ff..9877044fb 100644
--- a/src/expr/command.h
+++ b/src/expr/command.h
@@ -401,7 +401,7 @@ public:
/**
* The command when an attribute is set by a user. In SMT-LIBv2 this is done
- * via the syntax (! expr :atrr)
+ * via the syntax (! expr :attr)
*/
class CVC4_PUBLIC SetUserAttributeCommand : public Command {
protected:
diff --git a/src/expr/expr_template.h b/src/expr/expr_template.h
index b353ec5dc..f5df63f8c 100644
--- a/src/expr/expr_template.h
+++ b/src/expr/expr_template.h
@@ -654,6 +654,11 @@ public:
l = options::defaultExprDepth();
}
if(l == 0) {
+ // if called from outside the library, we may not have options
+ // available to us at this point (or perhaps the output language
+ // is not set in Options). Default to something reasonable, but
+ // don't set "l" since that would make it "sticky" for this
+ // stream.
return s_defaultPrintDepth;
}
}
@@ -797,7 +802,17 @@ public:
if(l == 0) {
// set the default dag setting on this ostream
// (offset by one to detect whether default has been set yet)
- l = s_defaultDag + 1;
+ if(&Options::current() != NULL) {
+ l = options::defaultDagThresh() + 1;
+ }
+ if(l == 0) {
+ // if called from outside the library, we may not have options
+ // available to us at this point (or perhaps the output language
+ // is not set in Options). Default to something reasonable, but
+ // don't set "l" since that would make it "sticky" for this
+ // stream.
+ return s_defaultDag + 1;
+ }
}
return static_cast<size_t>(l - 1);
}
diff --git a/src/expr/mkexpr b/src/expr/mkexpr
index 5134d561e..ca89dfc91 100755
--- a/src/expr/mkexpr
+++ b/src/expr/mkexpr
@@ -2,7 +2,7 @@
#
# mkexpr
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2010-2012 The CVC4 Project
+# Copyright (c) 2010-2013 The CVC4 Project
#
# The purpose of this script is to create {expr,expr_manager}.{h,cpp}
# from template files and a list of theory kinds. Basically it just
@@ -15,7 +15,7 @@
# Output is to standard out.
#
-copyright=2010-2012
+copyright=2010-2013
filename=`basename "$1" | sed 's,_template,,'`
@@ -23,7 +23,8 @@ cat <<EOF
/********************* */
/** $filename
**
- ** Copyright $copyright The AcSys Group, New York University, and as below.
+ ** Copyright $copyright New York University and The University of Iowa,
+ ** and as below.
**
** This file automatically generated by:
**
diff --git a/src/expr/mkkind b/src/expr/mkkind
index 786d6187b..f8432466d 100755
--- a/src/expr/mkkind
+++ b/src/expr/mkkind
@@ -2,7 +2,7 @@
#
# mkkind
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2010-2012 The CVC4 Project
+# Copyright (c) 2010-2013 The CVC4 Project
#
# The purpose of this script is to create kind.h (and also
# type_properties.h) from a template and a list of theory kinds.
@@ -14,7 +14,7 @@
# Output is to standard out.
#
-copyright=2010-2012
+copyright=2010-2013
filename=`basename "$1" | sed 's,_template,,'`
@@ -22,7 +22,8 @@ cat <<EOF
/********************* */
/** $filename
**
- ** Copyright $copyright The AcSys Group, New York University, and as below.
+ ** Copyright $copyright New York University and The University of Iowa,
+ ** and as below.
**
** This header file automatically generated by:
**
diff --git a/src/expr/mkmetakind b/src/expr/mkmetakind
index 47ffc77f9..160a74eac 100755
--- a/src/expr/mkmetakind
+++ b/src/expr/mkmetakind
@@ -2,7 +2,7 @@
#
# mkmetakind
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2010-2012 The CVC4 Project
+# Copyright (c) 2010-2013 The CVC4 Project
#
# The purpose of this script is to create metakind.h from a template
# and a list of theory kinds.
@@ -17,13 +17,14 @@
# Output is to standard out.
#
-copyright=2010-2012
+copyright=2010-2013
cat <<EOF
/********************* */
/** metakind.h
**
- ** Copyright $copyright The AcSys Group, New York University, and as below.
+ ** Copyright $copyright New York University and The University of Iowa,
+ ** and as below.
**
** This header file automatically generated by:
**
diff --git a/src/expr/node_builder.h b/src/expr/node_builder.h
index f6aa1920d..5f813dbe8 100644
--- a/src/expr/node_builder.h
+++ b/src/expr/node_builder.h
@@ -1,11 +1,11 @@
/********************* */
/*! \file node_builder.h
** \verbatim
- ** Original author: mdeters
- ** Major contributors: dejan
- ** Minor contributors (to current version): taking, cconway
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
+ ** Original author: Dejan Jovanović <dejan.jovanovic@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): Tim King <taking@cs.nyu.edu>, Christopher L. Conway <christopherleeconway@gmail.com>
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.\endverbatim
**
@@ -277,7 +277,9 @@ class NodeBuilder {
* double-decremented later (on destruction/clear).
*/
inline void realloc() {
- realloc(d_nvMaxChildren * 2);
+ size_t newSize = 2 * size_t(d_nvMaxChildren);
+ size_t hardLimit = (1lu << __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN) - 1;
+ realloc(EXPECT_FALSE( newSize > hardLimit ) ? hardLimit : newSize);
}
/**
@@ -662,6 +664,7 @@ public:
expr::NodeValue* nv = n.d_nv;
nv->inc();
d_nv->d_children[d_nv->d_nchildren++] = nv;
+ Assert(d_nv->d_nchildren <= d_nvMaxChildren);
return *this;
}
@@ -674,6 +677,7 @@ public:
expr::NodeValue* nv = typeNode.d_nv;
nv->inc();
d_nv->d_children[d_nv->d_nchildren++] = nv;
+ Assert(d_nv->d_nchildren <= d_nvMaxChildren);
return *this;
}
@@ -771,6 +775,9 @@ template <unsigned nchild_thresh>
void NodeBuilder<nchild_thresh>::realloc(size_t toSize) {
Assert( toSize > d_nvMaxChildren,
"attempt to realloc() a NodeBuilder to a smaller/equal size!" );
+ Assert( toSize < (1lu << __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN),
+ "attempt to realloc() a NodeBuilder to size %u (beyond hard limit of %u)",
+ toSize, (1lu << __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN) - 1 );
if(EXPECT_FALSE( nvIsAllocated() )) {
// Ensure d_nv is not modified on allocation failure
@@ -783,6 +790,7 @@ void NodeBuilder<nchild_thresh>::realloc(size_t toSize) {
throw std::bad_alloc();
}
d_nvMaxChildren = toSize;
+ Assert(d_nvMaxChildren == toSize);//overflow check
// Here, the copy (between two heap-allocated buffers) has already
// been done for us by the std::realloc().
d_nv = newBlock;
@@ -795,6 +803,7 @@ void NodeBuilder<nchild_thresh>::realloc(size_t toSize) {
throw std::bad_alloc();
}
d_nvMaxChildren = toSize;
+ Assert(d_nvMaxChildren == toSize);//overflow check
d_nv = newBlock;
d_nv->d_id = d_inlineNv.d_id;
@@ -1276,10 +1285,14 @@ void NodeBuilder<nchild_thresh>::internalCopy(const NodeBuilder<N>& nb) {
return;
}
+ bool realloced CVC4_UNUSED = false;
if(nb.d_nvMaxChildren > d_nvMaxChildren) {
+ realloced = true;
realloc(nb.d_nvMaxChildren);
}
+ Assert(nb.d_nvMaxChildren <= d_nvMaxChildren);
+ Assert(nb.d_nv->nv_end() - nb.d_nv->nv_begin() <= d_nvMaxChildren, "realloced:%s, d_nvMax:%u, size:%u, nc:%u", realloced ? "true" : "false", d_nvMaxChildren, nb.d_nv->nv_end() - nb.d_nv->nv_begin(), nb.d_nv->getNumChildren());
std::copy(nb.d_nv->nv_begin(),
nb.d_nv->nv_end(),
d_nv->nv_begin());
diff --git a/src/expr/node_manager.cpp b/src/expr/node_manager.cpp
index 59d23c6ea..a3c968158 100644
--- a/src/expr/node_manager.cpp
+++ b/src/expr/node_manager.cpp
@@ -412,6 +412,7 @@ TypeNode NodeManager::getDatatypeForTupleRecord(TypeNode t) {
dt.addConstructor(c);
dtt = TypeNode::fromType(toExprManager()->mkDatatypeType(dt));
Debug("tuprec") << "REWROTE " << t << " to " << dtt << std::endl;
+ dtt.setAttribute(DatatypeTupleAttr(), t);
} else {
const Record& rec = t.getRecord();
Datatype dt("__cvc4_record");
@@ -422,8 +423,8 @@ TypeNode NodeManager::getDatatypeForTupleRecord(TypeNode t) {
dt.addConstructor(c);
dtt = TypeNode::fromType(toExprManager()->mkDatatypeType(dt));
Debug("tuprec") << "REWROTE " << t << " to " << dtt << std::endl;
+ dtt.setAttribute(DatatypeRecordAttr(), t);
}
- dtt.setAttribute(DatatypeRecordAttr(), t);
} else {
Debug("tuprec") << "REUSING cached " << t << ": " << dtt << std::endl;
}
diff --git a/src/expr/options b/src/expr/options
index cd59e4875..223189d1b 100644
--- a/src/expr/options
+++ b/src/expr/options
@@ -5,9 +5,9 @@
module EXPR "expr/options.h" Expression package
-option defaultExprDepth --default-expr-depth=N int :predicate CVC4::expr::setDefaultExprDepth :predicate-include "expr/options_handlers.h"
+option defaultExprDepth --default-expr-depth=N int :default 0 :predicate CVC4::expr::setDefaultExprDepth :predicate-include "expr/options_handlers.h"
print exprs to depth N (0 == default, -1 == no limit)
-option - default-dag-thresh --default-dag-thresh=N argument :handler CVC4::expr::setDefaultDagThresh :handler-include "expr/options_handlers.h"
+option defaultDagThresh default-dag-thresh --default-dag-thresh=N int :default 1 :predicate CVC4::expr::setDefaultDagThresh :predicate-include "expr/options_handlers.h"
dagify common subexprs appearing > N times (1 == default, 0 == don't dagify)
option - --print-expr-types void :handler CVC4::expr::setPrintExprTypes :handler-include "expr/options_handlers.h"
print types with variables when printing exprs
diff --git a/src/expr/options_handlers.h b/src/expr/options_handlers.h
index 7a1d73c36..57c4d1aa4 100644
--- a/src/expr/options_handlers.h
+++ b/src/expr/options_handlers.h
@@ -39,8 +39,7 @@ inline void setDefaultExprDepth(std::string option, int depth, SmtEngine* smt) {
// intentionally exclude Dump stream from this list
}
-inline void setDefaultDagThresh(std::string option, std::string optarg, SmtEngine* smt) {
- int dag = atoi(optarg.c_str());
+inline void setDefaultDagThresh(std::string option, int dag, SmtEngine* smt) {
if(dag < 0) {
throw OptionException("--default-dag-thresh requires a nonnegative argument.");
}
diff --git a/src/expr/type.i b/src/expr/type.i
index 870cb228c..e227cca23 100644
--- a/src/expr/type.i
+++ b/src/expr/type.i
@@ -14,24 +14,6 @@
%rename(greater) CVC4::Type::operator>(const Type&) const;
%rename(greaterEqual) CVC4::Type::operator>=(const Type&) const;
-%rename(toBooleanType) CVC4::Type::operator BooleanType() const;
-%rename(toIntegerType) CVC4::Type::operator IntegerType() const;
-%rename(toRealType) CVC4::Type::operator RealType() const;
-%rename(toStringType) CVC4::Type::operator StringType() const;
-%rename(toBitVectorType) CVC4::Type::operator BitVectorType() const;
-%rename(toFunctionType) CVC4::Type::operator FunctionType() const;
-%rename(toTupleType) CVC4::Type::operator TupleType() const;
-%rename(toSExprType) CVC4::Type::operator SExprType() const;
-%rename(toArrayType) CVC4::Type::operator ArrayType() const;
-%rename(toDatatypeType) CVC4::Type::operator DatatypeType() const;
-%rename(toConstructorType) CVC4::Type::operator ConstructorType() const;
-%rename(toSelectorType) CVC4::Type::operator SelectorType() const;
-%rename(toTesterType) CVC4::Type::operator TesterType() const;
-%rename(toSortType) CVC4::Type::operator SortType() const;
-%rename(toSortConstructorType) CVC4::Type::operator SortConstructorType() const;
-%rename(toPredicateSubtype) CVC4::Type::operator PredicateSubtype() const;
-%rename(toSubrangeType) CVC4::Type::operator SubrangeType() const;
-
namespace CVC4 {
namespace expr {
%ignore exportTypeInternal;
diff --git a/src/main/command_executor.cpp b/src/main/command_executor.cpp
index 14625f1d8..6a4e18b5b 100644
--- a/src/main/command_executor.cpp
+++ b/src/main/command_executor.cpp
@@ -48,7 +48,7 @@ bool CommandExecutor::doCommand(Command* cmd)
return status;
} else {
- if(d_options[options::verbosity] > 0) {
+ if(d_options[options::verbosity] > 2) {
*d_options[options::out] << "Invoking: " << *cmd << std::endl;
}
@@ -59,7 +59,7 @@ bool CommandExecutor::doCommand(Command* cmd)
bool CommandExecutor::doCommandSingleton(Command *cmd)
{
bool status = true;
- if(d_options[options::verbosity] >= 0) {
+ if(d_options[options::verbosity] >= -1) {
status = smtEngineInvoke(&d_smtEngine, cmd, d_options[options::out]);
} else {
status = smtEngineInvoke(&d_smtEngine, cmd, NULL);
diff --git a/src/main/driver_unified.cpp b/src/main/driver_unified.cpp
index b429ad0c2..9fa40d3ab 100644
--- a/src/main/driver_unified.cpp
+++ b/src/main/driver_unified.cpp
@@ -26,6 +26,7 @@
#include "cvc4autoconfig.h"
#include "main/main.h"
#include "main/interactive_shell.h"
+#include "main/options.h"
#include "parser/parser.h"
#include "parser/parser_builder.h"
#include "parser/parser_exception.h"
@@ -43,6 +44,7 @@
#include "util/output.h"
#include "util/dump.h"
#include "util/result.h"
+#include "util/statistics_registry.h"
using namespace std;
using namespace CVC4;
@@ -63,6 +65,9 @@ namespace CVC4 {
/** A pointer to the CommandExecutor (the signal handlers need it) */
CVC4::main::CommandExecutor* pExecutor = NULL;
+ /** A pointer to the totalTime driver stat (the signal handlers need it) */
+ CVC4::TimerStat* pTotalTime = NULL;
+
}/* CVC4::main namespace */
}/* CVC4 namespace */
@@ -84,8 +89,8 @@ void printUsage(Options& opts, bool full) {
int runCvc4(int argc, char* argv[], Options& opts) {
// Timer statistic
- TimerStat s_totalTime("totalTime");
- s_totalTime.start();
+ pTotalTime = new TimerStat("totalTime");
+ pTotalTime->start();
// For the signal handlers' benefit
pOptions = &opts;
@@ -183,17 +188,22 @@ int runCvc4(int argc, char* argv[], Options& opts) {
DumpChannel.getStream() << Expr::setlanguage(opts[options::outputLanguage]);
// Create the expression manager using appropriate options
+ ExprManager* exprMgr;
# ifndef PORTFOLIO_BUILD
- ExprManager* exprMgr = new ExprManager(opts);
-# else
- vector<Options> threadOpts = parseThreadSpecificOptions(opts);
- ExprManager* exprMgr = new ExprManager(threadOpts[0]);
-# endif
-
-# ifndef PORTFOLIO_BUILD
+ exprMgr = new ExprManager(opts);
pExecutor = new CommandExecutor(*exprMgr, opts);
# else
- pExecutor = new CommandExecutorPortfolio(*exprMgr, opts, threadOpts);
+ vector<Options> threadOpts = parseThreadSpecificOptions(opts);
+ if(opts[options::incrementalSolving] && !opts[options::incrementalParallel]) {
+ Notice() << "Notice: In --incremental mode, using the sequential solver unless forced by...\n"
+ << "Notice: ...the experimental --incremental-parallel option.\n";
+ exprMgr = new ExprManager(opts);
+ pExecutor = new CommandExecutor(*exprMgr, opts);
+ }
+ else {
+ exprMgr = new ExprManager(threadOpts[0]);
+ pExecutor = new CommandExecutorPortfolio(*exprMgr, opts, threadOpts);
+ }
# endif
Parser* replayParser = NULL;
@@ -216,7 +226,7 @@ int runCvc4(int argc, char* argv[], Options& opts) {
int returnValue = 0;
{
// Timer statistic
- RegisterStatistic statTotalTime(&pExecutor->getStatisticsRegistry(), &s_totalTime);
+ RegisterStatistic statTotalTime(&pExecutor->getStatisticsRegistry(), pTotalTime);
// Filename statistics
ReferenceStat< const char* > s_statFilename("filename", filename);
@@ -229,7 +239,9 @@ int runCvc4(int argc, char* argv[], Options& opts) {
InteractiveShell shell(*exprMgr, opts);
Message() << Configuration::getPackageName()
<< " " << Configuration::getVersionString();
- if(Configuration::isSubversionBuild()) {
+ if(Configuration::isGitBuild()) {
+ Message() << " [" << Configuration::getGitId() << "]";
+ } else if(Configuration::isSubversionBuild()) {
Message() << " [" << Configuration::getSubversionId() << "]";
}
Message() << (Configuration::isDebugBuild() ? " DEBUG" : "")
@@ -304,7 +316,7 @@ int runCvc4(int argc, char* argv[], Options& opts) {
ReferenceStat< Result > s_statSatResult("sat/unsat", result);
RegisterStatistic statSatResultReg(&pExecutor->getStatisticsRegistry(), &s_statSatResult);
- s_totalTime.stop();
+ pTotalTime->stop();
// Set the global executor pointer to NULL first. If we get a
// signal while dumping statistics, we don't want to try again.
@@ -334,9 +346,11 @@ int runCvc4(int argc, char* argv[], Options& opts) {
// On exceptional exit, these are leaked, but that's okay... they
// need to be around in that case for main() to print statistics.
+ delete pTotalTime;
delete pExecutor;
delete exprMgr;
+ pTotalTime = NULL;
pExecutor = NULL;
return returnValue;
diff --git a/src/main/main.cpp b/src/main/main.cpp
index 3e45b4f14..a83baf45f 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -66,6 +66,7 @@ int main(int argc, char* argv[]) {
#endif
*opts[options::err] << "CVC4 Error:" << endl << e << endl;
if(opts[options::statistics] && pExecutor != NULL) {
+ pTotalTime->stop();
pExecutor->flushStatistics(*opts[options::err]);
}
}
diff --git a/src/main/main.h b/src/main/main.h
index 5b202c532..56cd866da 100644
--- a/src/main/main.h
+++ b/src/main/main.h
@@ -23,6 +23,7 @@
#include "util/exception.h"
#include "util/statistics.h"
#include "util/tls.h"
+#include "util/statistics_registry.h"
#include "cvc4autoconfig.h"
#ifndef __CVC4__MAIN__MAIN_H
@@ -42,6 +43,9 @@ extern const char* progName;
/** A reference for use by the signal handlers to print statistics */
extern CVC4::main::CommandExecutor* pExecutor;
+/** A reference for use by the signal handlers to print statistics */
+extern CVC4::TimerStat* pTotalTime;
+
/**
* If true, will not spin on segfault even when CVC4_DEBUG is on.
* Useful for nightly regressions, noninteractive performance runs
diff --git a/src/main/options b/src/main/options
index 53c04a2c4..caea63f5a 100644
--- a/src/main/options
+++ b/src/main/options
@@ -37,6 +37,8 @@ option sharingFilterByLength --filter-lemma-length=N int :default -1 :read-write
don't share (among portfolio threads) lemmas strictly longer than N
option fallbackSequential --fallback-sequential bool :default false
Switch to sequential mode (instead of printing an error) if it can't be solved in portfolio mode
+option incrementalParallel --incremental-parallel bool :default false :link --incremental
+ Use parallel solver even in incremental mode (may print 'unknown's at times)
expert-option waitToJoin --wait-to-join bool :default true
wait for other threads to join before quitting
diff --git a/src/main/options_handlers.h b/src/main/options_handlers.h
index c2eb489ed..f14a67d5f 100644
--- a/src/main/options_handlers.h
+++ b/src/main/options_handlers.h
@@ -26,14 +26,20 @@ inline void showConfiguration(std::string option, SmtEngine* smt) {
fputs(Configuration::about().c_str(), stdout);
printf("\n");
printf("version : %s\n", Configuration::getVersionString().c_str());
- if(Configuration::isSubversionBuild()) {
- printf("subversion : yes [%s r%u%s]\n",
+ if(Configuration::isGitBuild()) {
+ printf("scm : git [%s %s%s]\n",
+ Configuration::getGitBranchName(),
+ std::string(Configuration::getGitCommit()).substr(0, 8).c_str(),
+ Configuration::hasGitModifications() ?
+ " (with modifications)" : "");
+ } else if(Configuration::isSubversionBuild()) {
+ printf("scm : svn [%s r%u%s]\n",
Configuration::getSubversionBranchName(),
Configuration::getSubversionRevision(),
Configuration::hasSubversionModifications() ?
" (with modifications)" : "");
} else {
- printf("subversion : %s\n", Configuration::isSubversionBuild() ? "yes" : "no");
+ printf("scm : no\n");
}
printf("\n");
printf("library : %u.%u.%u\n",
diff --git a/src/main/util.cpp b/src/main/util.cpp
index 9ade23630..a6fcddf3b 100644
--- a/src/main/util.cpp
+++ b/src/main/util.cpp
@@ -65,6 +65,7 @@ void* cvc4StackBase;
void timeout_handler(int sig, siginfo_t* info, void*) {
fprintf(stderr, "CVC4 interrupted by timeout.\n");
if((*pOptions)[options::statistics] && pExecutor != NULL) {
+ pTotalTime->stop();
pExecutor->flushStatistics(cerr);
}
abort();
@@ -74,6 +75,7 @@ void timeout_handler(int sig, siginfo_t* info, void*) {
void sigint_handler(int sig, siginfo_t* info, void*) {
fprintf(stderr, "CVC4 interrupted by user.\n");
if((*pOptions)[options::statistics] && pExecutor != NULL) {
+ pTotalTime->stop();
pExecutor->flushStatistics(cerr);
}
abort();
@@ -99,6 +101,7 @@ void segv_handler(int sig, siginfo_t* info, void* c) {
if(segvNoSpin) {
fprintf(stderr, "No-spin requested, aborting...\n");
if((*pOptions)[options::statistics] && pExecutor != NULL) {
+ pTotalTime->stop();
pExecutor->flushStatistics(cerr);
}
abort();
@@ -119,6 +122,7 @@ void segv_handler(int sig, siginfo_t* info, void* c) {
cerr << "Looks like a NULL pointer was dereferenced." << endl;
}
if((*pOptions)[options::statistics] && pExecutor != NULL) {
+ pTotalTime->stop();
pExecutor->flushStatistics(cerr);
}
abort();
@@ -132,6 +136,7 @@ void ill_handler(int sig, siginfo_t* info, void*) {
if(segvNoSpin) {
fprintf(stderr, "No-spin requested, aborting...\n");
if((*pOptions)[options::statistics] && pExecutor != NULL) {
+ pTotalTime->stop();
pExecutor->flushStatistics(cerr);
}
abort();
@@ -145,6 +150,7 @@ void ill_handler(int sig, siginfo_t* info, void*) {
#else /* CVC4_DEBUG */
fprintf(stderr, "CVC4 executed an illegal instruction.\n");
if((*pOptions)[options::statistics] && pExecutor != NULL) {
+ pTotalTime->stop();
pExecutor->flushStatistics(cerr);
}
abort();
@@ -171,6 +177,7 @@ void cvc4unexpected() {
if(segvNoSpin) {
fprintf(stderr, "No-spin requested.\n");
if((*pOptions)[options::statistics] && pExecutor != NULL) {
+ pTotalTime->stop();
pExecutor->flushStatistics(cerr);
}
set_terminate(default_terminator);
@@ -184,6 +191,7 @@ void cvc4unexpected() {
#else /* CVC4_DEBUG */
fprintf(stderr, "CVC4 threw an \"unexpected\" exception.\n");
if((*pOptions)[options::statistics] && pExecutor != NULL) {
+ pTotalTime->stop();
pExecutor->flushStatistics(cerr);
}
set_terminate(default_terminator);
@@ -197,6 +205,7 @@ void cvc4terminate() {
"Perhaps an exception was thrown during stack unwinding. "
"(Don't do that.)\n");
if((*pOptions)[options::statistics] && pExecutor != NULL) {
+ pTotalTime->stop();
pExecutor->flushStatistics(cerr);
}
default_terminator();
@@ -205,6 +214,7 @@ void cvc4terminate() {
"CVC4 was terminated by the C++ runtime.\n"
"Perhaps an exception was thrown during stack unwinding.\n");
if((*pOptions)[options::statistics] && pExecutor != NULL) {
+ pTotalTime->stop();
pExecutor->flushStatistics(cerr);
}
default_terminator();
diff --git a/src/options/mkoptions b/src/options/mkoptions
index 0632cb3f9..fa6c4c260 100755
--- a/src/options/mkoptions
+++ b/src/options/mkoptions
@@ -2,7 +2,7 @@
#
# mkoptions
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2011-2012 The CVC4 Project
+# Copyright (c) 2011-2013 The CVC4 Project
#
# The purpose of this script is to create options.{h,cpp}
# from template files and a list of options.
@@ -12,7 +12,7 @@
# mkoptions (template-file output-file)+ -t options.h-template options.cpp-template (options-file output-dir)+
#
-copyright=2011-2012
+copyright=2011-2013
me=$(basename "$0")
@@ -1314,7 +1314,8 @@ function output_module {
/********************* */
/** $filename
**
- ** Copyright $copyright The AcSys Group, New York University, and as below.
+ ** Copyright $copyright New York University and The University of Iowa,
+ ** and as below.
**
** This file automatically generated by:
**
@@ -1496,7 +1497,8 @@ cat <<EOF
/********************* */
/** $filename
**
- ** Copyright $copyright The AcSys Group, New York University, and as below.
+ ** Copyright $copyright New York University and The University of Iowa,
+ ** and as below.
**
** This file automatically generated by:
**
diff --git a/src/parser/bounded_token_buffer.cpp b/src/parser/bounded_token_buffer.cpp
index 904f9a7fa..6a6ae8609 100644
--- a/src/parser/bounded_token_buffer.cpp
+++ b/src/parser/bounded_token_buffer.cpp
@@ -512,7 +512,7 @@ static pANTLR3_COMMON_TOKEN nextToken(pBOUNDED_TOKEN_BUFFER buffer) {
}
-/// Return a string that represents the name assoicated with the input source
+/// Return a string that represents the name associated with the input source
///
/// /param[in] is The ANTLR3_INT_STREAM interface that is representing this token stream.
///
diff --git a/src/parser/cvc/Cvc.g b/src/parser/cvc/Cvc.g
index d0fe9036b..b8ec160e8 100644
--- a/src/parser/cvc/Cvc.g
+++ b/src/parser/cvc/Cvc.g
@@ -416,10 +416,8 @@ Expr addNots(ExprManager* em, size_t n, Expr e) {
@header {
/**
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys)
- ** Courant Institute of Mathematical Sciences
- ** New York University
+ ** This file is part of CVC4.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.
**/
@@ -742,10 +740,7 @@ mainCommand[CVC4::Command*& cmd]
| ECHO_TOK
( simpleSymbolicExpr[sexpr]
- { std::stringstream ss;
- ss << sexpr;
- cmd = new EchoCommand(ss.str());
- }
+ { cmd = new EchoCommand(sexpr.getValue()); }
| { cmd = new EchoCommand(); }
)
diff --git a/src/parser/smt1/Smt1.g b/src/parser/smt1/Smt1.g
index 0f76baace..f8331c899 100644
--- a/src/parser/smt1/Smt1.g
+++ b/src/parser/smt1/Smt1.g
@@ -1,3 +1,4 @@
+/* ******************* */
/*! \file Smt1.g
** \verbatim
** Original author: cconway
@@ -30,10 +31,8 @@ options {
@header {
/**
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys)
- ** Courant Institute of Mathematical Sciences
- ** New York University
+ ** This file is part of CVC4.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.
**/
@@ -783,7 +782,15 @@ FLET_IDENTIFIER
*/
userValue[std::string& s]
: USER_VALUE
- { s = AntlrInput::tokenText($USER_VALUE); }
+ { s = AntlrInput::tokenText($USER_VALUE);
+ assert(*s.begin() == '{');
+ assert(*s.rbegin() == '}');
+ // trim whitespace
+ s.erase(s.begin(), s.begin() + 1);
+ s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
+ s.erase(s.end() - 1);
+ s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
+ }
;
PATTERN_ANNOTATION_BEGIN
diff --git a/src/parser/smt2/Smt2.g b/src/parser/smt2/Smt2.g
index 648666091..1ee288aa4 100644
--- a/src/parser/smt2/Smt2.g
+++ b/src/parser/smt2/Smt2.g
@@ -31,10 +31,8 @@ options {
@header {
/**
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 The Analysis of Computer Systems Group (ACSys)
- ** Courant Institute of Mathematical Sciences
- ** New York University
+ ** This file is part of CVC4.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.
**/
diff --git a/src/parser/smt2/smt2_input.h b/src/parser/smt2/smt2_input.h
index 62ed33632..62959c766 100644
--- a/src/parser/smt2/smt2_input.h
+++ b/src/parser/smt2/smt2_input.h
@@ -41,7 +41,7 @@ class Smt2Input : public AntlrInput {
/** The ANTLR3 SMT2 lexer for the input. */
pSmt2Lexer d_pSmt2Lexer;
- /** The ANTLR3 CVC parser for the input. */
+ /** The ANTLR3 SMT2 parser for the input. */
pSmt2Parser d_pSmt2Parser;
/**
diff --git a/src/parser/tptp/Tptp.g b/src/parser/tptp/Tptp.g
index 2180255ca..ec6868c5b 100644
--- a/src/parser/tptp/Tptp.g
+++ b/src/parser/tptp/Tptp.g
@@ -32,10 +32,8 @@ options {
@header {
/**
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys)
- ** Courant Institute of Mathematical Sciences
- ** New York University
+ ** This file is part of CVC4.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.
**/
diff --git a/src/parser/tptp/tptp.cpp b/src/parser/tptp/tptp.cpp
index 1e40ea63f..59b1d205b 100644
--- a/src/parser/tptp/tptp.cpp
+++ b/src/parser/tptp/tptp.cpp
@@ -151,7 +151,7 @@ void Tptp::includeFile(std::string fileName){
if( d_tptpDir.empty() ){
parseError("Couldn't open included file: " + fileName
- + " at " + currentDirFileName + " and the TPTP directory is not specified (environnement variable TPTP)");
+ + " at " + currentDirFileName + " and the TPTP directory is not specified (environment variable TPTP)");
};
std::string tptpDirFileName = d_tptpDir + fileName;
diff --git a/src/printer/cvc/cvc_printer.cpp b/src/printer/cvc/cvc_printer.cpp
index e0d4656f4..0206c4252 100644
--- a/src/printer/cvc/cvc_printer.cpp
+++ b/src/printer/cvc/cvc_printer.cpp
@@ -21,7 +21,9 @@
#include "expr/command.h"
#include "theory/substitutions.h"
#include "smt/smt_engine.h"
+#include "smt/options.h"
#include "theory/model.h"
+#include "theory/arrays/theory_arrays_rewriter.h"
#include <iostream>
#include <vector>
@@ -813,21 +815,34 @@ void CvcPrinter::toStream(std::ostream& out, Model& m, const Command* c) const t
theory::TheoryModel& tm = (theory::TheoryModel&) m;
if(dynamic_cast<const DeclareTypeCommand*>(c) != NULL) {
TypeNode tn = TypeNode::fromType( ((const DeclareTypeCommand*)c)->getType() );
- if( tn.isSort() ){
- // print the cardinality
- if( tm.d_rep_set.d_type_reps.find( tn )!=tm.d_rep_set.d_type_reps.end() ){
- out << "; cardinality of " << tn << " is " << (*tm.d_rep_set.d_type_reps.find(tn)).second.size() << std::endl;
+ if( options::modelUninterpDtEnum() && tn.isSort() &&
+ tm.d_rep_set.d_type_reps.find( tn )!=tm.d_rep_set.d_type_reps.end() ){
+ out << "DATATYPE " << std::endl;
+ out << " " << dynamic_cast<const DeclareTypeCommand*>(c)->getSymbol() << " = ";
+ for( size_t i=0; i<(*tm.d_rep_set.d_type_reps.find(tn)).second.size(); i++ ){
+ if (i>0) {
+ out << "| ";
+ }
+ out << (*tm.d_rep_set.d_type_reps.find(tn)).second[i] << " ";
}
- }
- out << c << std::endl;
- if( tn.isSort() ){
- // print the representatives
- if( tm.d_rep_set.d_type_reps.find( tn )!=tm.d_rep_set.d_type_reps.end() ){
- for( size_t i=0; i<(*tm.d_rep_set.d_type_reps.find(tn)).second.size(); i++ ){
- if( (*tm.d_rep_set.d_type_reps.find(tn)).second[i].isVar() ){
- out << (*tm.d_rep_set.d_type_reps.find(tn)).second[i] << " : " << tn << ";" << std::endl;
- }else{
- out << "% rep: " << (*tm.d_rep_set.d_type_reps.find(tn)).second[i] << std::endl;
+ out << std::endl << "END;" << std::endl;
+ } else {
+ if( tn.isSort() ){
+ // print the cardinality
+ if( tm.d_rep_set.d_type_reps.find( tn )!=tm.d_rep_set.d_type_reps.end() ){
+ out << "% cardinality of " << tn << " is " << (*tm.d_rep_set.d_type_reps.find(tn)).second.size() << std::endl;
+ }
+ }
+ out << c << std::endl;
+ if( tn.isSort() ){
+ // print the representatives
+ if( tm.d_rep_set.d_type_reps.find( tn )!=tm.d_rep_set.d_type_reps.end() ){
+ for( size_t i=0; i<(*tm.d_rep_set.d_type_reps.find(tn)).second.size(); i++ ){
+ if( (*tm.d_rep_set.d_type_reps.find(tn)).second[i].isVar() ){
+ out << (*tm.d_rep_set.d_type_reps.find(tn)).second[i] << " : " << tn << ";" << std::endl;
+ }else{
+ out << "% rep: " << (*tm.d_rep_set.d_type_reps.find(tn)).second[i] << std::endl;
+ }
}
}
}
@@ -850,7 +865,15 @@ void CvcPrinter::toStream(std::ostream& out, Model& m, const Command* c) const t
}else{
out << tn;
}
- out << " = " << Node::fromExpr(tm.getSmtEngine()->getValue(n.toExpr())) << ";" << std::endl;
+ Node val = Node::fromExpr(tm.getSmtEngine()->getValue(n.toExpr()));
+ if( options::modelUninterpDtEnum() && val.getKind() == kind::STORE ) {
+ TypeNode tn = val[1].getType();
+ if (tn.isSort() && tm.d_rep_set.d_type_reps.find( tn )!=tm.d_rep_set.d_type_reps.end() ){
+ Cardinality indexCard((*tm.d_rep_set.d_type_reps.find(tn)).second.size());
+ val = theory::arrays::TheoryArraysRewriter::normalizeConstant( val, indexCard );
+ }
+ }
+ out << " = " << val << ";" << std::endl;
/*
//for table format (work in progress)
diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp
index 000fd2fbf..8541ca6ae 100644
--- a/src/printer/smt2/smt2_printer.cpp
+++ b/src/printer/smt2/smt2_printer.cpp
@@ -27,8 +27,10 @@
#include "theory/substitutions.h"
#include "util/language.h"
#include "smt/smt_engine.h"
+#include "smt/options.h"
#include "theory/model.h"
+#include "theory/arrays/theory_arrays_rewriter.h"
using namespace std;
@@ -552,21 +554,30 @@ void Smt2Printer::toStream(std::ostream& out, Model& m, const Command* c) const
theory::TheoryModel& tm = (theory::TheoryModel&) m;
if(dynamic_cast<const DeclareTypeCommand*>(c) != NULL) {
TypeNode tn = TypeNode::fromType( ((const DeclareTypeCommand*)c)->getType() );
- if( tn.isSort() ){
- //print the cardinality
- if( tm.d_rep_set.d_type_reps.find( tn )!=tm.d_rep_set.d_type_reps.end() ){
- out << "; cardinality of " << tn << " is " << (*tm.d_rep_set.d_type_reps.find(tn)).second.size() << std::endl;
+ if( options::modelUninterpDtEnum() && tn.isSort() &&
+ tm.d_rep_set.d_type_reps.find( tn )!=tm.d_rep_set.d_type_reps.end() ){
+ out << "(declare-datatypes () ((" << dynamic_cast<const DeclareTypeCommand*>(c)->getSymbol() << " ";
+ for( size_t i=0; i<(*tm.d_rep_set.d_type_reps.find(tn)).second.size(); i++ ){
+ out << "(" << (*tm.d_rep_set.d_type_reps.find(tn)).second[i] << ")";
}
- }
- out << c << std::endl;
- if( tn.isSort() ){
- //print the representatives
- if( tm.d_rep_set.d_type_reps.find( tn )!=tm.d_rep_set.d_type_reps.end() ){
- for( size_t i=0; i<(*tm.d_rep_set.d_type_reps.find(tn)).second.size(); i++ ){
- if( (*tm.d_rep_set.d_type_reps.find(tn)).second[i].isVar() ){
- out << "(declare-fun " << (*tm.d_rep_set.d_type_reps.find(tn)).second[i] << " () " << tn << ")" << std::endl;
- }else{
- out << "; rep: " << (*tm.d_rep_set.d_type_reps.find(tn)).second[i] << std::endl;
+ out << ")))" << std::endl;
+ } else {
+ if( tn.isSort() ){
+ //print the cardinality
+ if( tm.d_rep_set.d_type_reps.find( tn )!=tm.d_rep_set.d_type_reps.end() ){
+ out << "; cardinality of " << tn << " is " << (*tm.d_rep_set.d_type_reps.find(tn)).second.size() << std::endl;
+ }
+ }
+ out << c << std::endl;
+ if( tn.isSort() ){
+ //print the representatives
+ if( tm.d_rep_set.d_type_reps.find( tn )!=tm.d_rep_set.d_type_reps.end() ){
+ for( size_t i=0; i<(*tm.d_rep_set.d_type_reps.find(tn)).second.size(); i++ ){
+ if( (*tm.d_rep_set.d_type_reps.find(tn)).second[i].isVar() ){
+ out << "(declare-fun " << (*tm.d_rep_set.d_type_reps.find(tn)).second[i] << " () " << tn << ")" << std::endl;
+ }else{
+ out << "; rep: " << (*tm.d_rep_set.d_type_reps.find(tn)).second[i] << std::endl;
+ }
}
}
}
@@ -583,6 +594,13 @@ void Smt2Printer::toStream(std::ostream& out, Model& m, const Command* c) const
<< " " << n.getType().getRangeType()
<< " " << val[1] << ")" << std::endl;
} else {
+ if( options::modelUninterpDtEnum() && val.getKind() == kind::STORE ) {
+ TypeNode tn = val[1].getType();
+ if (tn.isSort() && tm.d_rep_set.d_type_reps.find( tn )!=tm.d_rep_set.d_type_reps.end() ){
+ Cardinality indexCard((*tm.d_rep_set.d_type_reps.find(tn)).second.size());
+ val = theory::arrays::TheoryArraysRewriter::normalizeConstant( val, indexCard );
+ }
+ }
out << "(define-fun " << n << " () "
<< n.getType() << " " << val << ")" << std::endl;
}
diff --git a/src/proof/sat_proof.h b/src/proof/sat_proof.h
index 324988585..ccbde6e80 100644
--- a/src/proof/sat_proof.h
+++ b/src/proof/sat_proof.h
@@ -160,8 +160,8 @@ protected:
* Does a depth first search on removed literals and adds the literals
* to be removed in the proper order to the stack.
*
- * @param lit the literal we are recusing on
- * @param removedSet the previously computed set of redundantant literals
+ * @param lit the literal we are recursing on
+ * @param removedSet the previously computed set of redundant literals
* @param removeStack the stack of literals in reverse order of resolution
*/
void removedDfs(::Minisat::Lit lit, LitSet* removedSet, LitVector& removeStack, LitSet& inClause, LitSet& seen);
diff --git a/src/prop/bvminisat/Makefile b/src/prop/bvminisat/Makefile
new file mode 100644
index 000000000..71888016d
--- /dev/null
+++ b/src/prop/bvminisat/Makefile
@@ -0,0 +1,4 @@
+topdir = ../../..
+srcdir = src/prop/bvminisat
+
+include $(topdir)/Makefile.subdir
diff --git a/src/smt/boolean_terms.cpp b/src/smt/boolean_terms.cpp
index 696622cfe..262244f42 100644
--- a/src/smt/boolean_terms.cpp
+++ b/src/smt/boolean_terms.cpp
@@ -39,6 +39,13 @@ static inline bool isBoolean(TNode top, unsigned i) {
case kind::IMPLIES:
case kind::OR:
case kind::XOR:
+ case kind::FORALL:
+ case kind::EXISTS:
+ case kind::REWRITE_RULE:
+ case kind::RR_REWRITE:
+ case kind::RR_DEDUCTION:
+ case kind::RR_REDUCTION:
+ case kind::INST_PATTERN:
return true;
case kind::ITE:
@@ -289,13 +296,16 @@ Node BooleanTermConverter::rewriteBooleanTerms(TNode top, bool boolParent) throw
}
switch(k) {
case kind::LAMBDA:
- case kind::FORALL:
- case kind::EXISTS:
+ Unreachable("not expecting a LAMBDA in boolean-term conversion: %s", top.toString().c_str());
+
+ case kind::BOUND_VAR_LIST:
+ return top;
+
case kind::REWRITE_RULE:
case kind::RR_REWRITE:
- case kind::RR_REDUCTION:
case kind::RR_DEDUCTION:
- //Assert(false, "not yet supported");
+ case kind::RR_REDUCTION:
+ // not yet supported
return top;
default:
diff --git a/src/smt/options b/src/smt/options
index fc5ccf4c4..2680f4105 100644
--- a/src/smt/options
+++ b/src/smt/options
@@ -54,6 +54,8 @@ common-option incrementalSolving incremental -i --incremental bool
option abstractValues abstract-values --abstract-values bool :default false
in models, output arrays (and in future, maybe others) using abstract values, as required by the SMT-LIB standard
+option modelUninterpDtEnum --model-u-dt-enum bool :default false
+ in models, output uninterpreted sorts as datatype enumerations
option - regular-output-channel argument :handler CVC4::smt::setRegularOutputChannel :handler-include "smt/options_handlers.h"
set the regular output channel of the solver
diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp
index 1d98ce115..8eb6664ca 100644
--- a/src/smt/smt_engine.cpp
+++ b/src/smt/smt_engine.cpp
@@ -36,6 +36,7 @@
#include "expr/metakind.h"
#include "expr/node_builder.h"
#include "expr/node.h"
+#include "expr/node_self_iterator.h"
#include "prop/prop_engine.h"
#include "smt/modal_exception.h"
#include "smt/smt_engine.h"
@@ -111,7 +112,11 @@ struct SmtEngineStatistics {
TimerStat d_rewriteBooleanTermsTime;
/** time spent in non-clausal simplification */
TimerStat d_nonclausalSimplificationTime;
- /** Num of constant propagations found during nonclausal simp */
+ /** time spent in miplib pass */
+ TimerStat d_miplibPassTime;
+ /** number of assertions removed by miplib pass */
+ IntStat d_numMiplibAssertionsRemoved;
+ /** number of constant propagations found during nonclausal simp */
IntStat d_numConstantProps;
/** time spent in static learning */
TimerStat d_staticLearningTime;
@@ -136,6 +141,8 @@ struct SmtEngineStatistics {
d_definitionExpansionTime("smt::SmtEngine::definitionExpansionTime"),
d_rewriteBooleanTermsTime("smt::SmtEngine::rewriteBooleanTermsTime"),
d_nonclausalSimplificationTime("smt::SmtEngine::nonclausalSimplificationTime"),
+ d_miplibPassTime("smt::SmtEngine::miplibPassTime"),
+ d_numMiplibAssertionsRemoved("smt::SmtEngine::numMiplibAssertionsRemoved", 0),
d_numConstantProps("smt::SmtEngine::numConstantProps", 0),
d_staticLearningTime("smt::SmtEngine::staticLearningTime"),
d_simpITETime("smt::SmtEngine::simpITETime"),
@@ -150,6 +157,8 @@ struct SmtEngineStatistics {
StatisticsRegistry::registerStat(&d_definitionExpansionTime);
StatisticsRegistry::registerStat(&d_rewriteBooleanTermsTime);
StatisticsRegistry::registerStat(&d_nonclausalSimplificationTime);
+ StatisticsRegistry::registerStat(&d_miplibPassTime);
+ StatisticsRegistry::registerStat(&d_numMiplibAssertionsRemoved);
StatisticsRegistry::registerStat(&d_numConstantProps);
StatisticsRegistry::registerStat(&d_staticLearningTime);
StatisticsRegistry::registerStat(&d_simpITETime);
@@ -166,6 +175,8 @@ struct SmtEngineStatistics {
StatisticsRegistry::unregisterStat(&d_definitionExpansionTime);
StatisticsRegistry::unregisterStat(&d_rewriteBooleanTermsTime);
StatisticsRegistry::unregisterStat(&d_nonclausalSimplificationTime);
+ StatisticsRegistry::unregisterStat(&d_miplibPassTime);
+ StatisticsRegistry::unregisterStat(&d_numMiplibAssertionsRemoved);
StatisticsRegistry::unregisterStat(&d_numConstantProps);
StatisticsRegistry::unregisterStat(&d_staticLearningTime);
StatisticsRegistry::unregisterStat(&d_simpITETime);
@@ -210,6 +221,8 @@ class SmtEnginePrivate : public NodeManagerListener {
/** A circuit propagator for non-clausal propositional deduction */
booleans::CircuitPropagator d_propagator;
+ bool d_propagatorNeedsFinish;
+ std::vector<Node> d_boolVars;
/** Assertions to push to sat */
vector<Node> d_assertionsToCheck;
@@ -333,6 +346,14 @@ private:
void constrainSubtypes(TNode n, std::vector<Node>& assertions)
throw();
+ // trace nodes back to their assertions using CircuitPropagator's BackEdgesMap
+ void traceBackToAssertions(const std::vector<Node>& nodes, std::vector<TNode>& assertions);
+ // remove conjuncts in toRemove from conjunction n; return # of removed conjuncts
+ size_t removeFromConjunction(Node& n, const std::hash_set<unsigned>& toRemove);
+
+ // scrub miplib encodings
+ void doMiplibTrick();
+
/**
* Perform non-clausal simplification of a Node. This involves
* Theory implementations, but does NOT involve the SAT solver in
@@ -351,6 +372,7 @@ public:
d_realAssertionsEnd(0),
d_booleanTermConverter(d_smt),
d_propagator(d_nonClausalLearnedLiterals, true, true),
+ d_propagatorNeedsFinish(false),
d_assertionsToCheck(),
d_fakeContext(),
d_abstractValueMap(&d_fakeContext),
@@ -365,6 +387,14 @@ public:
d_smt.d_nodeManager->subscribeEvents(this);
}
+ ~SmtEnginePrivate() {
+ if(d_propagatorNeedsFinish) {
+ d_propagator.finish();
+ d_propagatorNeedsFinish = false;
+ }
+ d_smt.d_nodeManager->unsubscribeEvents(this);
+ }
+
void nmNotifyNewSort(TypeNode tn) {
DeclareTypeCommand c(tn.getAttribute(expr::VarNameAttr()),
0,
@@ -389,10 +419,13 @@ public:
n.toExpr(),
n.getType().toType());
d_smt.addToModelCommandAndDump(c, isGlobal);
+ if(n.getType().isBoolean() && !options::incrementalSolving()) {
+ d_boolVars.push_back(n);
+ }
}
void nmNotifyNewSkolem(TNode n, const std::string& comment, bool isGlobal) {
- std::string id = n.getAttribute(expr::VarNameAttr());
+ string id = n.getAttribute(expr::VarNameAttr());
DeclareFunctionCommand c(id,
n.toExpr(),
n.getType().toType());
@@ -400,6 +433,9 @@ public:
Dump("skolems") << CommentCommand(id + " is " + comment);
}
d_smt.addToModelCommandAndDump(c, isGlobal, false, "skolems");
+ if(n.getType().isBoolean() && !options::incrementalSolving()) {
+ d_boolVars.push_back(n);
+ }
}
Node applySubstitutions(TNode node) const {
@@ -506,8 +542,6 @@ public:
}/* namespace CVC4::smt */
-using namespace CVC4::smt;
-
SmtEngine::SmtEngine(ExprManager* em) throw() :
d_context(em->getContext()),
d_userLevels(),
@@ -623,17 +657,17 @@ void SmtEngine::finalOptionsAreSet() {
if(options::checkModels()) {
if(! options::produceModels()) {
- Notice() << "SmtEngine: turning on produce-models to support check-model" << std::endl;
+ Notice() << "SmtEngine: turning on produce-models to support check-model" << endl;
setOption("produce-models", SExpr("true"));
}
if(! options::interactive()) {
- Notice() << "SmtEngine: turning on interactive-mode to support check-model" << std::endl;
+ Notice() << "SmtEngine: turning on interactive-mode to support check-model" << endl;
setOption("interactive-mode", SExpr("true"));
}
}
if(options::produceAssignments() && !options::produceModels()) {
- Notice() << "SmtEngine: turning on produce-models to support produce-assignments" << std::endl;
+ Notice() << "SmtEngine: turning on produce-models to support produce-assignments" << endl;
setOption("produce-models", SExpr("true"));
}
@@ -784,15 +818,15 @@ void SmtEngine::setLogicInternal() throw() {
// by default, symmetry breaker is on only for QF_UF
if(! options::ufSymmetryBreaker.wasSetByUser()) {
bool qf_uf = d_logic.isPure(THEORY_UF) && !d_logic.isQuantified();
- Trace("smt") << "setting uf symmetry breaker to " << qf_uf << std::endl;
+ Trace("smt") << "setting uf symmetry breaker to " << qf_uf << endl;
options::ufSymmetryBreaker.set(qf_uf);
}
// by default, nonclausal simplification is off for QF_SAT and for quantifiers
if(! options::simplificationMode.wasSetByUser()) {
bool qf_sat = d_logic.isPure(THEORY_BOOL) && !d_logic.isQuantified();
bool quantifiers = d_logic.isQuantified();
- Trace("smt") << "setting simplification mode to <" << d_logic.getLogicString() << "> " << (!qf_sat && !quantifiers) << std::endl;
- //simplifaction=none works better for SMT LIB benchmarks with quantifiers, not others
+ Trace("smt") << "setting simplification mode to <" << d_logic.getLogicString() << "> " << (!qf_sat && !quantifiers) << endl;
+ //simplification=none works better for SMT LIB benchmarks with quantifiers, not others
//options::simplificationMode.set(qf_sat || quantifiers ? SIMPLIFICATION_MODE_NONE : SIMPLIFICATION_MODE_BATCH);
options::simplificationMode.set(qf_sat ? SIMPLIFICATION_MODE_NONE : SIMPLIFICATION_MODE_BATCH);
}
@@ -808,14 +842,14 @@ void SmtEngine::setLogicInternal() throw() {
bool iteSimp = !d_logic.isQuantified() &&
((d_logic.isPure(THEORY_ARITH) && d_logic.isLinear() && !d_logic.isDifferenceLogic() && !d_logic.areRealsUsed()) ||
(d_logic.isTheoryEnabled(THEORY_ARRAY) && d_logic.isTheoryEnabled(THEORY_UF) && d_logic.isTheoryEnabled(THEORY_BV)));
- Trace("smt") << "setting ite simplification to " << iteSimp << std::endl;
+ Trace("smt") << "setting ite simplification to " << iteSimp << endl;
options::doITESimp.set(iteSimp);
}
// Turn on multiple-pass non-clausal simplification for QF_AUFBV
if(! options::repeatSimp.wasSetByUser()) {
bool repeatSimp = !d_logic.isQuantified() &&
(d_logic.isTheoryEnabled(THEORY_ARRAY) && d_logic.isTheoryEnabled(THEORY_UF) && d_logic.isTheoryEnabled(THEORY_BV));
- Trace("smt") << "setting repeat simplification to " << repeatSimp << std::endl;
+ Trace("smt") << "setting repeat simplification to " << repeatSimp << endl;
options::repeatSimp.set(repeatSimp);
}
// Turn on unconstrained simplification for QF_AUFBV
@@ -824,24 +858,24 @@ void SmtEngine::setLogicInternal() throw() {
// bool uncSimp = false && !qf_sat && !options::incrementalSolving();
bool uncSimp = !options::incrementalSolving() && !d_logic.isQuantified() && !options::produceModels() && !options::checkModels() &&
(d_logic.isTheoryEnabled(THEORY_ARRAY) && d_logic.isTheoryEnabled(THEORY_BV));
- Trace("smt") << "setting unconstrained simplification to " << uncSimp << std::endl;
+ Trace("smt") << "setting unconstrained simplification to " << uncSimp << endl;
options::unconstrainedSimp.set(uncSimp);
}
// Unconstrained simp currently does *not* support model generation
if (options::unconstrainedSimp.wasSetByUser() && options::unconstrainedSimp()) {
if (options::produceModels()) {
- Notice() << "SmtEngine: turning off produce-models to support unconstrainedSimp" << std::endl;
+ Notice() << "SmtEngine: turning off produce-models to support unconstrainedSimp" << endl;
setOption("produce-models", SExpr("false"));
}
if (options::checkModels()) {
- Notice() << "SmtEngine: turning off check-models to support unconstrainedSimp" << std::endl;
+ Notice() << "SmtEngine: turning off check-models to support unconstrainedSimp" << endl;
setOption("check-models", SExpr("false"));
}
}
// Turn on arith rewrite equalities only for pure arithmetic
if(! options::arithRewriteEq.wasSetByUser()) {
bool arithRewriteEq = d_logic.isPure(THEORY_ARITH) && !d_logic.isQuantified();
- Trace("smt") << "setting arith rewrite equalities " << arithRewriteEq << std::endl;
+ Trace("smt") << "setting arith rewrite equalities " << arithRewriteEq << endl;
options::arithRewriteEq.set(arithRewriteEq);
}
if(! options::arithHeuristicPivots.wasSetByUser()) {
@@ -853,7 +887,7 @@ void SmtEngine::setLogicInternal() throw() {
heuristicPivots = 0;
}
}
- Trace("smt") << "setting arithHeuristicPivots " << heuristicPivots << std::endl;
+ Trace("smt") << "setting arithHeuristicPivots " << heuristicPivots << endl;
options::arithHeuristicPivots.set(heuristicPivots);
}
if(! options::arithPivotThreshold.wasSetByUser()){
@@ -863,7 +897,7 @@ void SmtEngine::setLogicInternal() throw() {
pivotThreshold = 16;
}
}
- Trace("smt") << "setting arith arithPivotThreshold " << pivotThreshold << std::endl;
+ Trace("smt") << "setting arith arithPivotThreshold " << pivotThreshold << endl;
options::arithPivotThreshold.set(pivotThreshold);
}
if(! options::arithStandardCheckVarOrderPivots.wasSetByUser()){
@@ -871,7 +905,7 @@ void SmtEngine::setLogicInternal() throw() {
if(d_logic.isPure(THEORY_ARITH) && !d_logic.isQuantified()){
varOrderPivots = 200;
}
- Trace("smt") << "setting arithStandardCheckVarOrderPivots " << varOrderPivots << std::endl;
+ Trace("smt") << "setting arithStandardCheckVarOrderPivots " << varOrderPivots << endl;
options::arithStandardCheckVarOrderPivots.set(varOrderPivots);
}
// Turn off early theory preprocessing if arithRewriteEq is on
@@ -930,7 +964,7 @@ void SmtEngine::setLogicInternal() throw() {
? true : false
);
- Trace("smt") << "setting decision mode to " << decMode << std::endl;
+ Trace("smt") << "setting decision mode to " << decMode << endl;
options::decisionMode.set(decMode);
options::decisionStopOnly.set(stoponly);
}
@@ -938,7 +972,7 @@ void SmtEngine::setLogicInternal() throw() {
//for finite model finding
if( ! options::instWhenMode.wasSetByUser()){
if( options::fmfInstEngine() ){
- Trace("smt") << "setting inst when mode to LAST_CALL" << std::endl;
+ Trace("smt") << "setting inst when mode to LAST_CALL" << endl;
options::instWhenMode.set( INST_WHEN_LAST_CALL );
}
}
@@ -951,11 +985,11 @@ void SmtEngine::setLogicInternal() throw() {
}
else if (options::minisatUseElim()) {
if (options::produceModels()) {
- Notice() << "SmtEngine: turning off produce-models to support minisatUseElim" << std::endl;
+ Notice() << "SmtEngine: turning off produce-models to support minisatUseElim" << endl;
setOption("produce-models", SExpr("false"));
}
if (options::checkModels()) {
- Notice() << "SmtEngine: turning off check-models to support minisatUseElim" << std::endl;
+ Notice() << "SmtEngine: turning off check-models to support minisatUseElim" << endl;
setOption("check-models", SExpr("false"));
}
}
@@ -970,11 +1004,11 @@ void SmtEngine::setLogicInternal() throw() {
if (d_logic.isTheoryEnabled(theory::THEORY_ARITH) &&
!d_logic.isLinear()) {
if (options::produceModels()) {
- Warning() << "SmtEngine: turning off produce-models because unsupported for nonlinear arith" << std::endl;
+ Warning() << "SmtEngine: turning off produce-models because unsupported for nonlinear arith" << endl;
setOption("produce-models", SExpr("false"));
}
if (options::checkModels()) {
- Warning() << "SmtEngine: turning off check-models because unsupported for nonlinear arith" << std::endl;
+ Warning() << "SmtEngine: turning off check-models because unsupported for nonlinear arith" << endl;
setOption("check-models", SExpr("false"));
}
}
@@ -995,7 +1029,7 @@ void SmtEngine::setInfo(const std::string& key, const CVC4::SExpr& value)
Trace("smt") << "SMT setInfo(" << key << ", " << value << ")" << endl;
if(Dump.isOn("benchmark")) {
if(key == "status") {
- std::string s = value.getValue();
+ string s = value.getValue();
BenchmarkStatus status =
(s == "sat") ? SMT_SATISFIABLE :
((s == "unsat") ? SMT_UNSATISFIABLE : SMT_UNKNOWN);
@@ -1175,7 +1209,7 @@ void SmtEngine::defineFunction(Expr func,
// Permit (check-sat) (define-fun ...) (get-value ...) sequences.
// Otherwise, (check-sat) (get-value ((! foo :named bar))) breaks
// d_haveAdditions = true;
- Debug("smt") << "definedFunctions insert " << funcNode << " " << formNode << std::endl;
+ Debug("smt") << "definedFunctions insert " << funcNode << " " << formNode << endl;
d_definedFunctions->insert(funcNode, def);
}
@@ -1185,7 +1219,7 @@ Node SmtEnginePrivate::getBVDivByZero(Kind k, unsigned width) {
if (k == kind::BITVECTOR_UDIV) {
if (d_BVDivByZero.find(width) == d_BVDivByZero.end()) {
// lazily create the function symbols
- std::ostringstream os;
+ ostringstream os;
os << "BVUDivByZero_" << width;
Node divByZero = nm->mkSkolem(os.str(),
nm->mkFunctionType(nm->mkBitVectorType(width), nm->mkBitVectorType(width)),
@@ -1196,7 +1230,7 @@ Node SmtEnginePrivate::getBVDivByZero(Kind k, unsigned width) {
}
else if (k == kind::BITVECTOR_UREM) {
if (d_BVRemByZero.find(width) == d_BVRemByZero.end()) {
- std::ostringstream os;
+ ostringstream os;
os << "BVURemByZero_" << width;
Node divByZero = nm->mkSkolem(os.str(),
nm->mkFunctionType(nm->mkBitVectorType(width), nm->mkBitVectorType(width)),
@@ -1236,7 +1270,7 @@ Node SmtEnginePrivate::expandDefinitions(TNode n, hash_map<Node, Node, NodeHashF
if(i != d_smt.d_definedFunctions->end()) {
// replacement must be closed
if((*i).second.getFormals().size() > 0) {
- throw TypeCheckingException(n.toExpr(), std::string("Defined function requires arguments: `") + n.toString() + "'");
+ throw TypeCheckingException(n.toExpr(), string("Defined function requires arguments: `") + n.toString() + "'");
}
// don't bother putting in the cache
return (*i).second.getFormula();
@@ -1265,9 +1299,9 @@ Node SmtEnginePrivate::expandDefinitions(TNode n, hash_map<Node, Node, NodeHashF
break;
}
- case kind::BITVECTOR_UDIV:
- case kind::BITVECTOR_UREM: {
- node = expandBVDivByZero(node);
+ case kind::BITVECTOR_UDIV:
+ case kind::BITVECTOR_UREM: {
+ node = expandBVDivByZero(node);
break;
}
case kind::DIVISION: {
@@ -1339,7 +1373,7 @@ Node SmtEnginePrivate::expandDefinitions(TNode n, hash_map<Node, Node, NodeHashF
Debug("expand") << " : \"" << name << "\"" << endl;
}
if(i == d_smt.d_definedFunctions->end()) {
- throw TypeCheckingException(n.toExpr(), std::string("Undefined function: `") + func.toString() + "'");
+ throw TypeCheckingException(n.toExpr(), string("Undefined function: `") + func.toString() + "'");
}
if(Debug.isOn("expand")) {
Debug("expand") << " defn: " << def.getFunction() << endl
@@ -1408,16 +1442,16 @@ static bool containsQuantifiers(Node n) {
}
Node SmtEnginePrivate::preSkolemizeQuantifiers( Node n, bool polarity, std::vector< Node >& fvs ){
- Trace("pre-sk") << "Pre-skolem " << n << " " << polarity << " " << fvs.size() << std::endl;
+ Trace("pre-sk") << "Pre-skolem " << n << " " << polarity << " " << fvs.size() << endl;
if( n.getKind()==kind::NOT ){
Node nn = preSkolemizeQuantifiers( n[0], !polarity, fvs );
return nn.negate();
}else if( n.getKind()==kind::FORALL ){
if( polarity ){
- std::vector< Node > children;
+ vector< Node > children;
children.push_back( n[0] );
//add children to current scope
- std::vector< Node > fvss;
+ vector< Node > fvss;
fvss.insert( fvss.begin(), fvs.begin(), fvs.end() );
for( int i=0; i<(int)n[0].getNumChildren(); i++ ){
fvss.push_back( n[0][i] );
@@ -1433,13 +1467,13 @@ Node SmtEnginePrivate::preSkolemizeQuantifiers( Node n, bool polarity, std::vect
//process body
Node nn = preSkolemizeQuantifiers( n[1], polarity, fvs );
//now, substitute skolems for the variables
- std::vector< TypeNode > argTypes;
+ vector< TypeNode > argTypes;
for( int i=0; i<(int)fvs.size(); i++ ){
argTypes.push_back( fvs[i].getType() );
}
//calculate the variables and substitution
- std::vector< Node > vars;
- std::vector< Node > subs;
+ vector< Node > vars;
+ vector< Node > subs;
for( int i=0; i<(int)n[0].getNumChildren(); i++ ){
vars.push_back( n[0][i] );
}
@@ -1452,7 +1486,7 @@ Node SmtEnginePrivate::preSkolemizeQuantifiers( Node n, bool polarity, std::vect
TypeNode typ = NodeManager::currentNM()->mkFunctionType( argTypes, n[0][i].getType() );
Node op = NodeManager::currentNM()->mkSkolem( "skop_$$", typ, "op created during pre-skolemization" );
//DOTHIS: set attribute on op, marking that it should not be selected as trigger
- std::vector< Node > funcArgs;
+ vector< Node > funcArgs;
funcArgs.push_back( op );
funcArgs.insert( funcArgs.end(), fvs.begin(), fvs.end() );
subs.push_back( NodeManager::currentNM()->mkNode( kind::APPLY_UF, funcArgs ) );
@@ -1492,7 +1526,7 @@ Node SmtEnginePrivate::preSkolemizeQuantifiers( Node n, bool polarity, std::vect
return preSkolemizeQuantifiers( nn, polarity, fvs );
}else{
Assert( n.getKind() == kind::AND || n.getKind() == kind::OR );
- std::vector< Node > children;
+ vector< Node > children;
for( int i=0; i<(int)n.getNumChildren(); i++ ){
children.push_back( preSkolemizeQuantifiers( n[i], polarity, fvs ) );
}
@@ -1541,7 +1575,7 @@ void SmtEnginePrivate::staticLearning() {
static void dumpAssertions(const char* key,
const std::vector<Node>& assertionList) {
if( Dump.isOn("assertions") &&
- Dump.isOn(std::string("assertions:") + key) ) {
+ Dump.isOn(string("assertions:") + key) ) {
// Push the simplified assertions to the dump output stream
for(unsigned i = 0; i < assertionList.size(); ++ i) {
TNode n = assertionList[i];
@@ -1558,6 +1592,10 @@ bool SmtEnginePrivate::nonClausalSimplify() {
Trace("simplify") << "SmtEnginePrivate::nonClausalSimplify()" << endl;
+ if(d_propagatorNeedsFinish) {
+ d_propagator.finish();
+ d_propagatorNeedsFinish = false;
+ }
d_propagator.initialize();
// Assert all the assertions to the propagator
@@ -1577,7 +1615,7 @@ bool SmtEnginePrivate::nonClausalSimplify() {
<< "conflict in non-clausal propagation" << endl;
d_assertionsToPreprocess.clear();
d_assertionsToCheck.push_back(NodeManager::currentNM()->mkConst<bool>(false));
- d_propagator.finish();
+ d_propagatorNeedsFinish = true;
return false;
}
@@ -1612,7 +1650,7 @@ bool SmtEnginePrivate::nonClausalSimplify() {
<< d_nonClausalLearnedLiterals[i] << endl;
d_assertionsToPreprocess.clear();
d_assertionsToCheck.push_back(NodeManager::currentNM()->mkConst<bool>(false));
- d_propagator.finish();
+ d_propagatorNeedsFinish = true;
return false;
}
}
@@ -1644,7 +1682,7 @@ bool SmtEnginePrivate::nonClausalSimplify() {
<< learnedLiteral << endl;
d_assertionsToPreprocess.clear();
d_assertionsToCheck.push_back(NodeManager::currentNM()->mkConst<bool>(false));
- d_propagator.finish();
+ d_propagatorNeedsFinish = true;
return false;
default:
if (d_doConstantProp && learnedLiteral.getKind() == kind::EQUAL && (learnedLiteral[0].isConst() || learnedLiteral[1].isConst())) {
@@ -1714,6 +1752,17 @@ bool SmtEnginePrivate::nonClausalSimplify() {
// Resize the learnt
d_nonClausalLearnedLiterals.resize(j);
+ //must add substitutions to model
+ TheoryModel* m = d_smt.d_theoryEngine->getModel();
+ if(m != NULL) {
+ for( SubstitutionMap::iterator pos = d_topLevelSubstitutions.begin(); pos != d_topLevelSubstitutions.end(); ++pos) {
+ Node n = (*pos).first;
+ Node v = (*pos).second;
+ Trace("model") << "Add substitution : " << n << " " << v << std::endl;
+ m->addSubstitution( n, v );
+ }
+ }
+
hash_set<TNode, TNodeHashFunction> s;
for (unsigned i = 0; i < d_assertionsToPreprocess.size(); ++ i) {
Node assertion = d_assertionsToPreprocess[i];
@@ -1812,7 +1861,7 @@ bool SmtEnginePrivate::nonClausalSimplify() {
Rewriter::rewrite(Node(learnedBuilder));
}
- d_propagator.finish();
+ d_propagatorNeedsFinish = true;
return true;
}
@@ -1894,6 +1943,366 @@ void SmtEnginePrivate::constrainSubtypes(TNode top, std::vector<Node>& assertion
} while(! worklist.empty());
}
+void SmtEnginePrivate::traceBackToAssertions(const std::vector<Node>& nodes, std::vector<TNode>& assertions) {
+ const booleans::CircuitPropagator::BackEdgesMap& backEdges = d_propagator.getBackEdges();
+ for(vector<Node>::const_iterator i = nodes.begin(); i != nodes.end(); ++i) {
+ booleans::CircuitPropagator::BackEdgesMap::const_iterator j = backEdges.find(*i);
+ // term must appear in map, otherwise how did we get here?!
+ Assert(j != backEdges.end());
+ // if term maps to empty, that means it's a top-level assertion
+ if(!(*j).second.empty()) {
+ traceBackToAssertions((*j).second, assertions);
+ } else {
+ assertions.push_back(*i);
+ }
+ }
+}
+
+size_t SmtEnginePrivate::removeFromConjunction(Node& n, const std::hash_set<unsigned>& toRemove) {
+ Assert(n.getKind() == kind::AND);
+ Node trueNode = NodeManager::currentNM()->mkConst(true);
+ size_t removals = 0;
+ for(Node::iterator j = n.begin(); j != n.end(); ++j) {
+ size_t subremovals = 0;
+ Node sub = *j;
+ if(toRemove.find(sub.getId()) != toRemove.end() ||
+ (sub.getKind() == kind::AND && (subremovals = removeFromConjunction(sub, toRemove)) > 0)) {
+ NodeBuilder<> b(kind::AND);
+ b.append(n.begin(), j);
+ if(subremovals > 0) {
+ removals += subremovals;
+ b << sub;
+ } else {
+ ++removals;
+ }
+ for(++j; j != n.end(); ++j) {
+ if(toRemove.find((*j).getId()) != toRemove.end()) {
+ ++removals;
+ } else if((*j).getKind() == kind::AND) {
+ sub = *j;
+ if((subremovals = removeFromConjunction(sub, toRemove)) > 0) {
+ removals += subremovals;
+ b << sub;
+ } else {
+ b << *j;
+ }
+ } else {
+ b << *j;
+ }
+ }
+ if(b.getNumChildren() == 0) {
+ n = trueNode;
+ b.clear();
+ } else if(b.getNumChildren() == 1) {
+ n = b[0];
+ b.clear();
+ } else {
+ n = b;
+ }
+ n = Rewriter::rewrite(n);
+ return removals;
+ }
+ }
+
+ Assert(removals == 0);
+ return 0;
+}
+
+void SmtEnginePrivate::doMiplibTrick() {
+ Assert(d_assertionsToPreprocess.empty());
+ Assert(d_realAssertionsEnd == d_assertionsToCheck.size());
+ Assert(!options::incrementalSolving());
+
+ const booleans::CircuitPropagator::BackEdgesMap& backEdges = d_propagator.getBackEdges();
+ hash_set<unsigned> removeAssertions;
+
+ NodeManager* nm = NodeManager::currentNM();
+ Node zero = nm->mkConst(Rational(0)), one = nm->mkConst(Rational(1));
+
+ hash_map<TNode, Node, TNodeHashFunction> intVars;
+ for(vector<Node>::const_iterator i = d_boolVars.begin(); i != d_boolVars.end(); ++i) {
+ if(d_propagator.isAssigned(*i)) {
+ Debug("miplib") << "ineligible: " << *i << " because assigned " << d_propagator.getAssignment(*i) << endl;
+ continue;
+ }
+
+ vector<TNode> assertions;
+ booleans::CircuitPropagator::BackEdgesMap::const_iterator j = backEdges.find(*i);
+ // if not in back edges map, the bool var is unconstrained, showing up in no assertions.
+ // if maps to an empty vector, that means the bool var was asserted itself.
+ if(j != backEdges.end()) {
+ if(!(*j).second.empty()) {
+ traceBackToAssertions((*j).second, assertions);
+ } else {
+ assertions.push_back(*i);
+ }
+ }
+ Debug("miplib") << "for " << *i << endl;
+ bool eligible = true;
+ map<pair<Node, Node>, uint64_t> marks;
+ map<pair<Node, Node>, vector<Rational> > coef;
+ map<pair<Node, Node>, vector<Rational> > checks;
+ map<pair<Node, Node>, vector<TNode> > asserts;
+ for(vector<TNode>::const_iterator j = assertions.begin(); j != assertions.end(); ++j) {
+ Debug("miplib") << " found: " << *j << endl;
+ if((*j).getKind() != kind::IMPLIES) {
+ eligible = false;
+ Debug("miplib") << " -- INELIGIBLE -- (not =>)" << endl;
+ break;
+ }
+ Node conj = BooleanSimplification::simplify((*j)[0]);
+ if(conj.getKind() == kind::AND && conj.getNumChildren() > 6) {
+ eligible = false;
+ Debug("miplib") << " -- INELIGIBLE -- (N-ary /\\ too big)" << endl;
+ break;
+ }
+ if(conj.getKind() != kind::AND && !conj.isVar() && !(conj.getKind() == kind::NOT && conj[0].isVar())) {
+ eligible = false;
+ Debug("miplib") << " -- INELIGIBLE -- (not /\\ or literal)" << endl;
+ break;
+ }
+ if((*j)[1].getKind() != kind::EQUAL ||
+ !( ( (*j)[1][0].isVar() &&
+ (*j)[1][1].getKind() == kind::CONST_RATIONAL ) ||
+ ( (*j)[1][0].getKind() == kind::CONST_RATIONAL &&
+ (*j)[1][1].isVar() ) )) {
+ eligible = false;
+ Debug("miplib") << " -- INELIGIBLE -- (=> (and X X) X)" << endl;
+ break;
+ }
+ if(conj.getKind() == kind::AND) {
+ vector<Node> posv;
+ bool found_x = false;
+ map<TNode, bool> neg;
+ for(Node::iterator ii = conj.begin(); ii != conj.end(); ++ii) {
+ if((*ii).isVar()) {
+ posv.push_back(*ii);
+ neg[*ii] = false;
+ found_x = found_x || *i == *ii;
+ } else if((*ii).getKind() == kind::NOT && (*ii)[0].isVar()) {
+ posv.push_back((*ii)[0]);
+ neg[(*ii)[0]] = true;
+ found_x = found_x || *i == (*ii)[0];
+ } else {
+ eligible = false;
+ Debug("miplib") << " -- INELIGIBLE -- (non-var: " << *ii << ")" << endl;
+ break;
+ }
+ if(d_propagator.isAssigned(posv.back())) {
+ eligible = false;
+ Debug("miplib") << " -- INELIGIBLE -- (" << posv.back() << " asserted)" << endl;
+ break;
+ }
+ }
+ if(!eligible) {
+ break;
+ }
+ if(!found_x) {
+ eligible = false;
+ Debug("miplib") << " --INELIGIBLE -- (couldn't find " << *i << " in conjunction)" << endl;
+ break;
+ }
+ sort(posv.begin(), posv.end());
+ const Node pos = NodeManager::currentNM()->mkNode(kind::AND, posv);
+ const TNode var = ((*j)[1][0].getKind() == kind::CONST_RATIONAL) ? (*j)[1][1] : (*j)[1][0];
+ const pair<Node, Node> pos_var(pos, var);
+ const Rational& constant = ((*j)[1][0].getKind() == kind::CONST_RATIONAL) ? (*j)[1][0].getConst<Rational>() : (*j)[1][1].getConst<Rational>();
+ uint64_t mark = 0;
+ unsigned countneg = 0, thepos = 0;
+ for(unsigned ii = 0; ii < pos.getNumChildren(); ++ii) {
+ if(neg[pos[ii]]) {
+ ++countneg;
+ } else {
+ thepos = ii;
+ mark |= (0x1 << ii);
+ }
+ }
+ if((marks[pos_var] & (1lu << mark)) != 0) {
+ eligible = false;
+ Debug("miplib") << " -- INELIGIBLE -- (remarked)" << endl;
+ break;
+ }
+ Debug("miplib") << "mark is " << mark << " -- " << (1lu << mark) << endl;
+ marks[pos_var] |= (1lu << mark);
+ Debug("miplib") << "marks[" << pos << "," << var << "] now " << marks[pos_var] << endl;
+ if(countneg == pos.getNumChildren()) {
+ if(constant != 0) {
+ eligible = false;
+ Debug("miplib") << " -- INELIGIBLE -- (nonzero constant)" << endl;
+ break;
+ }
+ } else if(countneg == pos.getNumChildren() - 1) {
+ Assert(coef[pos_var].size() <= 6 && thepos < 6);
+ coef[pos_var].resize(6);
+ coef[pos_var][thepos] = constant;
+ } else {
+ if(checks[pos_var].size() <= mark) {
+ checks[pos_var].resize(mark + 1);
+ }
+ checks[pos_var][mark] = constant;
+ }
+ asserts[pos_var].push_back(*j);
+ } else {
+ TNode x = conj;
+ if(x != *i && x != (*i).notNode()) {
+ eligible = false;
+ Debug("miplib") << " -- INELIGIBLE -- (x not present where I expect it)" << endl;
+ break;
+ }
+ const bool xneg = (x.getKind() == kind::NOT);
+ x = xneg ? x[0] : x;
+ Debug("miplib") << " x:" << x << " " << xneg << endl;
+ const TNode var = ((*j)[1][0].getKind() == kind::CONST_RATIONAL) ? (*j)[1][1] : (*j)[1][0];
+ const pair<Node, Node> x_var(x, var);
+ const Rational& constant = ((*j)[1][0].getKind() == kind::CONST_RATIONAL) ? (*j)[1][0].getConst<Rational>() : (*j)[1][1].getConst<Rational>();
+ unsigned mark = (xneg ? 0 : 1);
+ if((marks[x_var] & (1u << mark)) != 0) {
+ eligible = false;
+ Debug("miplib") << " -- INELIGIBLE -- (remarked)" << endl;
+ break;
+ }
+ marks[x_var] |= (1u << mark);
+ if(xneg) {
+ if(constant != 0) {
+ eligible = false;
+ Debug("miplib") << " -- INELIGIBLE -- (nonzero constant)" << endl;
+ break;
+ }
+ } else {
+ Assert(coef[x_var].size() <= 6);
+ coef[x_var].resize(6);
+ coef[x_var][0] = constant;
+ if(checks[x_var].size() <= mark) {
+ checks[x_var].resize(mark + 1);
+ }
+ checks[x_var][mark] = constant;
+ }
+ asserts[x_var].push_back(*j);
+ }
+ }
+ if(eligible) {
+ for(map<pair<Node, Node>, uint64_t>::const_iterator j = marks.begin(); j != marks.end(); ++j) {
+ const TNode pos = (*j).first.first;
+ const TNode var = (*j).first.second;
+ const pair<Node, Node>& pos_var = (*j).first;
+ const uint64_t mark = (*j).second;
+ const unsigned numVars = pos.getKind() == kind::AND ? pos.getNumChildren() : 1;
+ uint64_t expected = (uint64_t(1) << (1 << numVars)) - 1;
+ expected = (expected == 0) ? -1 : expected;// fix for overflow
+ Debug("miplib") << "[" << pos << "] => " << hex << mark << " expect " << expected << dec << endl;
+ Assert(pos.getKind() == kind::AND || pos.isVar());
+ if(mark != expected) {
+ Debug("miplib") << " -- INELIGIBLE " << pos << " -- (insufficiently marked, got " << mark << " for " << numVars << " vars, expected " << expected << endl;
+ } else {
+ if(false) { //checks[pos] != coef[pos][0] + coef[pos][1]) {
+ Debug("miplib") << " -- INELIGIBLE " << pos << " -- (not linear combination)" << endl;
+ } else {
+ Debug("miplib") << " -- ELIGIBLE " << *i << " , " << pos << " --" << endl;
+ vector<Node> newVars;
+ expr::NodeSelfIterator ii, iiend;
+ if(pos.getKind() == kind::AND) {
+ ii = pos.begin();
+ iiend = pos.end();
+ } else {
+ ii = expr::NodeSelfIterator::self(pos);
+ iiend = expr::NodeSelfIterator::selfEnd(pos);
+ }
+ for(; ii != iiend; ++ii) {
+ Node& varRef = intVars[*ii];
+ if(varRef.isNull()) {
+ stringstream ss;
+ ss << "mipvar_" << *ii;
+ Node newVar = nm->mkSkolem(ss.str(), nm->integerType(), "a variable introduced due to scrubbing a miplib encoding", NodeManager::SKOLEM_EXACT_NAME);
+ Node geq = Rewriter::rewrite(nm->mkNode(kind::GEQ, newVar, zero));
+ Node leq = Rewriter::rewrite(nm->mkNode(kind::LEQ, newVar, one));
+ d_assertionsToCheck.push_back(Rewriter::rewrite(geq.andNode(leq)));
+ SubstitutionMap nullMap(&d_fakeContext);
+ Theory::PPAssertStatus status CVC4_UNUSED;// just for assertions
+ status = d_smt.d_theoryEngine->solve(geq, nullMap);
+ Assert(status == Theory::PP_ASSERT_STATUS_UNSOLVED,
+ "unexpected solution from arith's ppAssert()");
+ Assert(nullMap.empty(),
+ "unexpected substitution from arith's ppAssert()");
+ status = d_smt.d_theoryEngine->solve(leq, nullMap);
+ Assert(status == Theory::PP_ASSERT_STATUS_UNSOLVED,
+ "unexpected solution from arith's ppAssert()");
+ Assert(nullMap.empty(),
+ "unexpected substitution from arith's ppAssert()");
+ d_smt.d_theoryEngine->getModel()->addSubstitution(*ii, newVar.eqNode(one));
+ newVars.push_back(newVar);
+ varRef = newVar;
+ } else {
+ newVars.push_back(varRef);
+ }
+ if(!d_smt.d_logic.areIntegersUsed()) {
+ d_smt.d_logic = d_smt.d_logic.getUnlockedCopy();
+ d_smt.d_logic.enableIntegers();
+ d_smt.d_logic.lock();
+ }
+ }
+ Node sum;
+ if(pos.getKind() == kind::AND) {
+ NodeBuilder<> sumb(kind::PLUS);
+ for(size_t ii = 0; ii < pos.getNumChildren(); ++ii) {
+ sumb << nm->mkNode(kind::MULT, nm->mkConst(coef[pos_var][ii]), newVars[ii]);
+ }
+ sum = sumb;
+ } else {
+ sum = nm->mkNode(kind::MULT, nm->mkConst(coef[pos_var][0]), newVars[0]);
+ }
+ Debug("miplib") << "vars[] " << var << endl
+ << " eq " << Rewriter::rewrite(sum) << endl;
+ Node newAssertion = var.eqNode(Rewriter::rewrite(sum));
+ if(d_topLevelSubstitutions.hasSubstitution(newAssertion[0])) {
+ //Warning() << "RE-SUBSTITUTION " << newAssertion[0] << endl;
+ //Warning() << "REPLACE " << newAssertion[1] << endl;
+ //Warning() << "ORIG " << d_topLevelSubstitutions.getSubstitution(newAssertion[0]) << endl;
+ Assert(d_topLevelSubstitutions.getSubstitution(newAssertion[0]) == newAssertion[1]);
+ } else if(pos.getNumChildren() <= options::arithMLTrickSubstitutions()) {
+ d_topLevelSubstitutions.addSubstitution(newAssertion[0], newAssertion[1]);
+ Debug("miplib") << "addSubs: " << newAssertion[0] << " to " << newAssertion[1] << endl;
+ } else {
+ Debug("miplib") << "skipSubs: " << newAssertion[0] << " to " << newAssertion[1] << " (threshold is " << options::arithMLTrickSubstitutions() << ")" << endl;
+ }
+ newAssertion = Rewriter::rewrite(newAssertion);
+ Debug("miplib") << " " << newAssertion << endl;
+ d_assertionsToCheck.push_back(newAssertion);
+ Debug("miplib") << " assertions to remove: " << endl;
+ for(vector<TNode>::const_iterator k = asserts[pos_var].begin(), k_end = asserts[pos_var].end(); k != k_end; ++k) {
+ Debug("miplib") << " " << *k << endl;
+ removeAssertions.insert((*k).getId());
+ }
+ }
+ }
+ }
+ }
+ }
+ if(!removeAssertions.empty()) {
+ Debug("miplib") << "SmtEnginePrivate::simplify(): scrubbing miplib encoding..." << endl;
+ Node trueNode = nm->mkConst(true);
+ for(size_t i = 0; i < d_realAssertionsEnd; ++i) {
+ if(removeAssertions.find(d_assertionsToCheck[i].getId()) != removeAssertions.end()) {
+ Debug("miplib") << "SmtEnginePrivate::simplify(): - removing " << d_assertionsToCheck[i] << endl;
+ d_assertionsToCheck[i] = trueNode;
+ ++d_smt.d_stats->d_numMiplibAssertionsRemoved;
+ } else if(d_assertionsToCheck[i].getKind() == kind::AND) {
+ size_t removals = removeFromConjunction(d_assertionsToCheck[i], removeAssertions);
+ if(removals > 0) {
+ Debug("miplib") << "SmtEnginePrivate::simplify(): - reduced " << d_assertionsToCheck[i] << endl;
+ Debug("miplib") << "SmtEnginePrivate::simplify(): - by " << removals << " conjuncts" << endl;
+ d_smt.d_stats->d_numMiplibAssertionsRemoved += removals;
+ }
+ }
+ Debug("miplib") << "had: " << d_assertionsToCheck[i] << endl;
+ d_assertionsToCheck[i] = Rewriter::rewrite(d_topLevelSubstitutions.apply(d_assertionsToCheck[i]));
+ Debug("miplib") << "now: " << d_assertionsToCheck[i] << endl;
+ }
+ } else {
+ Debug("miplib") << "SmtEnginePrivate::simplify(): miplib pass found nothing." << endl;
+ }
+ d_realAssertionsEnd = d_assertionsToCheck.size();
+}
+
// returns false if simplification led to "false"
bool SmtEnginePrivate::simplifyAssertions()
throw(TypeCheckingException, LogicException) {
@@ -1904,21 +2313,49 @@ bool SmtEnginePrivate::simplifyAssertions()
if(options::simplificationMode() != SIMPLIFICATION_MODE_NONE) {
// Perform non-clausal simplification
+ Chat() << "...performing nonclausal simplification..." << endl;
Trace("simplify") << "SmtEnginePrivate::simplify(): "
<< "performing non-clausal simplification" << endl;
bool noConflict = nonClausalSimplify();
- if(!noConflict) return false;
+ if(!noConflict) {
+ return false;
+ }
+
+ // We piggy-back off of the BackEdgesMap in the CircuitPropagator to
+ // do the miplib trick.
+ if( // check that option is on
+ options::arithMLTrick() &&
+ // miplib rewrites aren't safe in incremental mode
+ ! options::incrementalSolving() &&
+ // only useful in arith
+ d_smt.d_logic.isTheoryEnabled(theory::THEORY_ARITH) &&
+ // we add new assertions and need this (in practice, this
+ // restriction only disables miplib processing during
+ // re-simplification, which we don't expect to be useful anyway)
+ d_realAssertionsEnd == d_assertionsToCheck.size() ) {
+ Chat() << "...fixing miplib encodings..." << endl;
+ Trace("simplify") << "SmtEnginePrivate::simplify(): "
+ << "looking for miplib pseudobooleans..." << endl;
+
+ TimerStat::CodeTimer miplibTimer(d_smt.d_stats->d_miplibPassTime);
+
+ doMiplibTrick();
+ } else {
+ Trace("simplify") << "SmtEnginePrivate::simplify(): "
+ << "skipping miplib pseudobooleans pass (either incrementalSolving is on, or miplib pbs are turned off)..." << endl;
+ }
} else {
Assert(d_assertionsToCheck.empty());
d_assertionsToCheck.swap(d_assertionsToPreprocess);
}
- Trace("smt") << "POST nonClasualSimplify" << std::endl;
+ Trace("smt") << "POST nonClausalSimplify" << endl;
Debug("smt") << " d_assertionsToPreprocess: " << d_assertionsToPreprocess.size() << endl;
Debug("smt") << " d_assertionsToCheck : " << d_assertionsToCheck.size() << endl;
// Theory preprocessing
if (d_smt.d_earlyTheoryPP) {
+ Chat() << "...doing early theory preprocessing..." << endl;
TimerStat::CodeTimer codeTimer(d_smt.d_stats->d_theoryPreprocessTime);
// Call the theory preprocessors
d_smt.d_theoryEngine->preprocessStart();
@@ -1929,31 +2366,34 @@ bool SmtEnginePrivate::simplifyAssertions()
}
}
- Trace("smt") << "POST theoryPP" << std::endl;
+ Trace("smt") << "POST theoryPP" << endl;
Debug("smt") << " d_assertionsToPreprocess: " << d_assertionsToPreprocess.size() << endl;
Debug("smt") << " d_assertionsToCheck : " << d_assertionsToCheck.size() << endl;
// ITE simplification
if(options::doITESimp()) {
+ Chat() << "...doing ITE simplification..." << endl;
simpITE();
}
- Trace("smt") << "POST iteSimp" << std::endl;
+ Trace("smt") << "POST iteSimp" << endl;
Debug("smt") << " d_assertionsToPreprocess: " << d_assertionsToPreprocess.size() << endl;
Debug("smt") << " d_assertionsToCheck : " << d_assertionsToCheck.size() << endl;
// Unconstrained simplification
if(options::unconstrainedSimp()) {
+ Chat() << "...doing unconstrained simplification..." << endl;
unconstrainedSimp();
}
- Trace("smt") << "POST unconstrainedSimp" << std::endl;
+ Trace("smt") << "POST unconstrainedSimp" << endl;
Debug("smt") << " d_assertionsToPreprocess: " << d_assertionsToPreprocess.size() << endl;
Debug("smt") << " d_assertionsToCheck : " << d_assertionsToCheck.size() << endl;
if(options::repeatSimp() && options::simplificationMode() != SIMPLIFICATION_MODE_NONE) {
+ Chat() << "...doing another round of nonclausal simplification..." << endl;
Trace("simplify") << "SmtEnginePrivate::simplify(): "
- << " doing repeated simplification" << std::endl;
+ << " doing repeated simplification" << endl;
d_assertionsToCheck.swap(d_assertionsToPreprocess);
Assert(d_assertionsToCheck.empty());
bool noConflict = nonClausalSimplify();
@@ -1962,7 +2402,7 @@ bool SmtEnginePrivate::simplifyAssertions()
}
}
- Trace("smt") << "POST repeatSimp" << std::endl;
+ Trace("smt") << "POST repeatSimp" << endl;
Debug("smt") << " d_assertionsToPreprocess: " << d_assertionsToPreprocess.size() << endl;
Debug("smt") << " d_assertionsToCheck : " << d_assertionsToCheck.size() << endl;
@@ -2012,6 +2452,7 @@ Result SmtEngine::check() {
resource = d_resourceBudgetPerCall;
}
+ Chat() << "solving..." << endl;
Trace("smt") << "SmtEngine::check(): running check" << endl;
Result result = d_propEngine->checkSat(millis, resource);
@@ -2188,11 +2629,11 @@ void SmtEnginePrivate::processAssertions() {
//apply pre-skolemization to existential quantifiers
for (unsigned i = 0; i < d_assertionsToPreprocess.size(); ++ i) {
Node prev = d_assertionsToPreprocess[i];
- std::vector< Node > fvs;
+ vector< Node > fvs;
d_assertionsToPreprocess[i] = Rewriter::rewrite( preSkolemizeQuantifiers( d_assertionsToPreprocess[i], true, fvs ) );
if( prev!=d_assertionsToPreprocess[i] ){
- Trace("quantifiers-rewrite") << "*** Pre-skolemize " << prev << std::endl;
- Trace("quantifiers-rewrite") << " ...got " << d_assertionsToPreprocess[i] << std::endl;
+ Trace("quantifiers-rewrite") << "*** Pre-skolemize " << prev << endl;
+ Trace("quantifiers-rewrite") << " ...got " << d_assertionsToPreprocess[i] << endl;
}
}
}
@@ -2209,8 +2650,7 @@ void SmtEnginePrivate::processAssertions() {
if( options::sortInference() ){
//sort inference technique
- SortInference si;
- si.simplify( d_assertionsToPreprocess );
+ d_smt.d_theoryEngine->getSortInference()->simplify( d_assertionsToPreprocess );
}
dumpAssertions("pre-simplify", d_assertionsToPreprocess);
@@ -2242,7 +2682,7 @@ void SmtEnginePrivate::processAssertions() {
dumpAssertions("pre-repeat-simplify", d_assertionsToCheck);
if(options::repeatSimp()) {
d_assertionsToCheck.swap(d_assertionsToPreprocess);
- Chat() << "simplifying assertions..." << endl;
+ Chat() << "re-simplifying assertions..." << endl;
noConflict &= simplifyAssertions();
if (noConflict) {
// Need to fix up assertion list to maintain invariants:
@@ -2600,7 +3040,7 @@ Expr SmtEngine::expandDefinitions(const Expr& ex) throw(TypeCheckingException, L
return n.toExpr();
}
-Expr SmtEngine::getValue(const Expr& ex) throw(ModalException, LogicException) {
+Expr SmtEngine::getValue(const Expr& ex) throw(ModalException, TypeCheckingException, LogicException) {
Assert(ex.getExprManager() == d_exprManager);
SmtScope smts(this);
@@ -2908,6 +3348,7 @@ void SmtEngine::checkModel(bool hardFailure) {
hash_map<Node, Node, NodeHashFunction> cache;
n = d_private->expandDefinitions(n, cache);
}
+ Notice() << "SmtEngine::checkModel(): -- expands to " << n << endl;
// Apply our model value substitutions.
n = substitutions.apply(n);
@@ -2929,6 +3370,12 @@ void SmtEngine::checkModel(bool hardFailure) {
continue;
}
+ // As a last-ditch effort, ask model to simplify it.
+ // Presently, this is only an issue for quantifiers, which can have a value
+ // but don't show up in our substitution map above.
+ n = m->getValue(n);
+ Notice() << "SmtEngine::checkModel(): -- model-substitutes to " << n << endl;
+
// The result should be == true.
if(n != NodeManager::currentNM()->mkConst(true)) {
Notice() << "SmtEngine::checkModel(): *** PROBLEM: EXPECTED `TRUE' ***"
diff --git a/src/smt/smt_engine.h b/src/smt/smt_engine.h
index cdae68d96..fecfba14a 100644
--- a/src/smt/smt_engine.h
+++ b/src/smt/smt_engine.h
@@ -444,7 +444,7 @@ public:
* by a SAT or INVALID query). Only permitted if the SmtEngine is
* set to operate interactively and produce-models is on.
*/
- Expr getValue(const Expr& e) throw(ModalException, LogicException);
+ Expr getValue(const Expr& e) throw(ModalException, TypeCheckingException, LogicException);
/**
* Add a function to the set of expressions whose value is to be
diff --git a/src/theory/arith/arith_static_learner.cpp b/src/theory/arith/arith_static_learner.cpp
index 4ee176cf1..124fa8e2a 100644
--- a/src/theory/arith/arith_static_learner.cpp
+++ b/src/theory/arith/arith_static_learner.cpp
@@ -21,8 +21,6 @@
#include "theory/arith/arith_static_learner.h"
#include "theory/arith/options.h"
-#include "util/propositional_query.h"
-
#include "expr/expr.h"
#include "expr/convenience_node_builders.h"
@@ -37,7 +35,6 @@ namespace arith {
ArithStaticLearner::ArithStaticLearner(context::Context* userContext) :
- d_miplibTrick(userContext),
d_minMap(userContext),
d_maxMap(userContext),
d_statistics()
@@ -45,30 +42,17 @@ ArithStaticLearner::ArithStaticLearner(context::Context* userContext) :
ArithStaticLearner::Statistics::Statistics():
d_iteMinMaxApplications("theory::arith::iteMinMaxApplications", 0),
- d_iteConstantApplications("theory::arith::iteConstantApplications", 0),
- d_miplibtrickApplications("theory::arith::miplibtrickApplications", 0),
- d_avgNumMiplibtrickValues("theory::arith::avgNumMiplibtrickValues")
+ d_iteConstantApplications("theory::arith::iteConstantApplications", 0)
{
StatisticsRegistry::registerStat(&d_iteMinMaxApplications);
StatisticsRegistry::registerStat(&d_iteConstantApplications);
- StatisticsRegistry::registerStat(&d_miplibtrickApplications);
- StatisticsRegistry::registerStat(&d_avgNumMiplibtrickValues);
}
ArithStaticLearner::Statistics::~Statistics(){
StatisticsRegistry::unregisterStat(&d_iteMinMaxApplications);
StatisticsRegistry::unregisterStat(&d_iteConstantApplications);
- StatisticsRegistry::unregisterStat(&d_miplibtrickApplications);
- StatisticsRegistry::unregisterStat(&d_avgNumMiplibtrickValues);
-}
-
-void ArithStaticLearner::miplibTrickInsert(Node key, Node value){
- if(options::arithMLTrick()){
- d_miplibTrick.insert(key, value);
- }
}
-
void ArithStaticLearner::staticLearning(TNode n, NodeBuilder<>& learned){
vector<TNode> workList;
@@ -111,8 +95,6 @@ void ArithStaticLearner::staticLearning(TNode n, NodeBuilder<>& learned){
process(n,learned, defTrue);
}
-
- postProcess(learned);
}
@@ -134,24 +116,6 @@ void ArithStaticLearner::process(TNode n, NodeBuilder<>& learned, const TNodeSet
iteConstant(n, learned);
}
break;
- case IMPLIES:
- // == 3-FINITE VALUE SET : Collect information ==
- if(n[1].getKind() == EQUAL &&
- n[1][0].isVar() &&
- defTrue.find(n) != defTrue.end()){
- Node eqTo = n[1][1];
- Node rewriteEqTo = Rewriter::rewrite(eqTo);
- if(rewriteEqTo.getKind() == CONST_RATIONAL){
-
- TNode var = n[1][0];
- Node current = (d_miplibTrick.find(var) == d_miplibTrick.end()) ?
- mkBoolNode(false) : d_miplibTrick[var];
-
- miplibTrickInsert(var, n.orNode(current));
- Debug("arith::miplib") << "insert " << var << " const " << n << endl;
- }
- }
- break;
case CONST_RATIONAL:
// Mark constants as minmax
d_minMap.insert(n, n.getConst<Rational>());
@@ -300,99 +264,6 @@ std::set<Node> listToSet(TNode l){
return ret;
}
-void ArithStaticLearner::postProcess(NodeBuilder<>& learned){
- // == 3-FINITE VALUE SET ==
- CDNodeToNodeListMap::const_iterator keyIter = d_miplibTrick.begin();
- CDNodeToNodeListMap::const_iterator endKeys = d_miplibTrick.end();
- while(keyIter != endKeys) {
- TNode var = (*keyIter).first;
- Node list = (*keyIter).second;
- const set<Node> imps = listToSet(list);
-
- if(imps.empty()){
- ++keyIter;
- continue;
- }
-
- Assert(!imps.empty());
- vector<Node> conditions;
- set<Rational> values;
- set<Node>::const_iterator j=imps.begin(), impsEnd=imps.end();
- for(; j != impsEnd; ++j){
- TNode imp = *j;
- Assert(imp.getKind() == IMPLIES);
- Assert(imp[1].getKind() == EQUAL);
-
- Node eqTo = imp[1][1];
- Node rewriteEqTo = Rewriter::rewrite(eqTo);
- Assert(rewriteEqTo.getKind() == CONST_RATIONAL);
-
- conditions.push_back(imp[0]);
- values.insert(rewriteEqTo.getConst<Rational>());
- }
-
- Node possibleTaut = Node::null();
- if(conditions.size() == 1){
- possibleTaut = conditions.front();
- }else{
- NodeBuilder<> orBuilder(OR);
- orBuilder.append(conditions);
- possibleTaut = orBuilder;
- }
-
-
- Debug("arith::miplib") << "var: " << var << endl;
- Debug("arith::miplib") << "possibleTaut: " << possibleTaut << endl;
-
- Result isTaut = PropositionalQuery::isTautology(possibleTaut);
- if(isTaut == Result(Result::VALID)){
- miplibTrick(var, values, learned);
- miplibTrickInsert(var, mkBoolNode(false));
- }
- ++keyIter;
- }
-}
-
-
-void ArithStaticLearner::miplibTrick(TNode var, set<Rational>& values, NodeBuilder<>& learned){
-
- Debug("arith::miplib") << var << " found a tautology!"<< endl;
-
- const Rational& min = *(values.begin());
- const Rational& max = *(values.rbegin());
-
- Debug("arith::miplib") << "min: " << min << endl;
- Debug("arith::miplib") << "max: " << max << endl;
-
- Assert(min <= max);
- ++(d_statistics.d_miplibtrickApplications);
- (d_statistics.d_avgNumMiplibtrickValues).addEntry(values.size());
-
- Node nGeqMin = NodeBuilder<2>(GEQ) << var << mkRationalNode(min);
- Node nLeqMax = NodeBuilder<2>(LEQ) << var << mkRationalNode(max);
- Debug("arith::miplib") << nGeqMin << nLeqMax << endl;
- learned << nGeqMin << nLeqMax;
- set<Rational>::iterator valuesIter = values.begin();
- set<Rational>::iterator valuesEnd = values.end();
- set<Rational>::iterator valuesPrev = valuesIter;
- ++valuesIter;
- for(; valuesIter != valuesEnd; valuesPrev = valuesIter, ++valuesIter){
- const Rational& prev = *valuesPrev;
- const Rational& curr = *valuesIter;
- Assert(prev < curr);
-
- //The interval (last,curr) can be excluded:
- //(not (and (> var prev) (< var curr))
- //<=> (or (not (> var prev)) (not (< var curr)))
- //<=> (or (<= var prev) (>= var curr))
- Node leqPrev = NodeBuilder<2>(LEQ) << var << mkRationalNode(prev);
- Node geqCurr = NodeBuilder<2>(GEQ) << var << mkRationalNode(curr);
- Node excludedMiddle = NodeBuilder<2>(OR) << leqPrev << geqCurr;
- Debug("arith::miplib") << excludedMiddle << endl;
- learned << excludedMiddle;
- }
-}
-
void ArithStaticLearner::addBound(TNode n) {
CDNodeToMinMaxMap::const_iterator minFind = d_minMap.find(n[0]);
diff --git a/src/theory/arith/arith_static_learner.h b/src/theory/arith/arith_static_learner.h
index 041ae6339..48ee6a3bb 100644
--- a/src/theory/arith/arith_static_learner.h
+++ b/src/theory/arith/arith_static_learner.h
@@ -37,16 +37,6 @@ namespace arith {
class ArithStaticLearner {
private:
- /* Maps a variable, x, to the set of defTrue nodes of the form
- * (=> _ (= x c))
- * where c is a constant.
- */
- typedef context::CDTrailHashMap<Node, Node, NodeHashFunction> CDNodeToNodeListMap;
- // The domain is an implicit list OR(x, OR(y, ..., FALSE ))
- // or FALSE
- CDNodeToNodeListMap d_miplibTrick;
- void miplibTrickInsert(Node key, Node value);
-
/**
* Map from a node to it's minimum and maximum.
*/
@@ -63,23 +53,15 @@ public:
private:
void process(TNode n, NodeBuilder<>& learned, const TNodeSet& defTrue);
- void postProcess(NodeBuilder<>& learned);
-
void iteMinMax(TNode n, NodeBuilder<>& learned);
void iteConstant(TNode n, NodeBuilder<>& learned);
- void miplibTrick(TNode var, std::set<Rational>& values, NodeBuilder<>& learned);
-
-
/** These fields are designed to be accessible to ArithStaticLearner methods. */
class Statistics {
public:
IntStat d_iteMinMaxApplications;
IntStat d_iteConstantApplications;
- IntStat d_miplibtrickApplications;
- AverageStat d_avgNumMiplibtrickValues;
-
Statistics();
~Statistics();
};
diff --git a/src/theory/arith/constraint.cpp b/src/theory/arith/constraint.cpp
index cf3aeafee..4655ea34e 100644
--- a/src/theory/arith/constraint.cpp
+++ b/src/theory/arith/constraint.cpp
@@ -371,8 +371,8 @@ void ConstraintValue::setAssertedToTheTheory(TNode witness) {
d_database->pushAssertionOrderWatch(this, witness);
}
-// bool ConstraintValue::isPsuedoConstraint() const {
-// return d_proof == d_database->d_psuedoConstraintProof;
+// bool ConstraintValue::isPseudoConstraint() const {
+// return d_proof == d_database->d_pseudoConstraintProof;
// }
bool ConstraintValue::isSelfExplaining() const {
@@ -486,7 +486,7 @@ ConstraintDatabase::ConstraintDatabase(context::Context* satContext, context::Co
d_equalityEngineProof = d_proofs.size();
d_proofs.push_back(NullConstraint);
- // d_psuedoConstraintProof = d_proofs.size();
+ // d_pseudoConstraintProof = d_proofs.size();
// d_proofs.push_back(NullConstraint);
}
@@ -833,11 +833,11 @@ void ConstraintValue::impliedBy(const std::vector<Constraint>& b){
}
}
-// void ConstraintValue::setPsuedoConstraint(){
+// void ConstraintValue::setPseudoConstraint(){
// Assert(truthIsUnknown());
// Assert(!hasLiteral());
-// d_database->pushProofWatch(this, d_database->d_psuedoConstraintProof);
+// d_database->pushProofWatch(this, d_database->d_pseudoConstraintProof);
// }
void ConstraintValue::setEqualityEngineProof(){
@@ -856,7 +856,7 @@ void ConstraintValue::markAsTrue(){
void ConstraintValue::markAsTrue(Constraint imp){
Assert(truthIsUnknown());
Assert(imp->hasProof());
- //Assert(!imp->isPsuedoConstraint());
+ //Assert(!imp->isPseudoConstraint());
d_database->d_proofs.push_back(NullConstraint);
d_database->d_proofs.push_back(imp);
@@ -868,8 +868,8 @@ void ConstraintValue::markAsTrue(Constraint impA, Constraint impB){
Assert(truthIsUnknown());
Assert(impA->hasProof());
Assert(impB->hasProof());
- //Assert(!impA->isPsuedoConstraint());
- //Assert(!impB->isPsuedoConstraint());
+ //Assert(!impA->isPseudoConstraint());
+ //Assert(!impB->isPseudoConstraint());
d_database->d_proofs.push_back(NullConstraint);
d_database->d_proofs.push_back(impA);
@@ -886,7 +886,7 @@ void ConstraintValue::markAsTrue(const vector<Constraint>& a){
for(vector<Constraint>::const_iterator i = a.begin(), end = a.end(); i != end; ++i){
Constraint c_i = *i;
Assert(c_i->hasProof());
- //Assert(!c_i->isPsuedoConstraint());
+ //Assert(!c_i->isPseudoConstraint());
d_database->d_proofs.push_back(c_i);
}
@@ -903,7 +903,7 @@ SortedConstraintMap& ConstraintValue::constraintSet() const{
bool ConstraintValue::proofIsEmpty() const{
Assert(hasProof());
bool result = d_database->d_proofs[d_proof] == NullConstraint;
- //Assert((!result) || isSelfExplaining() || hasEqualityEngineProof() || isPsuedoConstraint());
+ //Assert((!result) || isSelfExplaining() || hasEqualityEngineProof() || isPseudoConstraint());
Assert((!result) || isSelfExplaining() || hasEqualityEngineProof());
return result;
}
diff --git a/src/theory/arith/constraint.h b/src/theory/arith/constraint.h
index 52aa5a5ce..82023a48b 100644
--- a/src/theory/arith/constraint.h
+++ b/src/theory/arith/constraint.h
@@ -273,7 +273,7 @@ private:
*/
AssertionOrder _d_assertionOrder;
/**
- * This is guarenteed to be on the fact queue.
+ * This is guaranteed to be on the fact queue.
* For example if x + y = x + 1 is on the fact queue, then use this
*/
TNode d_witness;
@@ -491,8 +491,8 @@ public:
* The explanation is the constant true.
* explainInto() does nothing.
*/
- //void setPsuedoConstraint();
- //bool isPsuedoConstraint() const;
+ //void setPseudoConstraint();
+ //bool isPseudoConstraint() const;
/**
* Returns a explanation of the constraint that is appropriate for conflicts.
@@ -709,7 +709,7 @@ private:
*
* This is a special proof that is always a member of the list.
*/
- //ProofId d_psuedoConstraintProof;
+ //ProofId d_pseudoConstraintProof;
typedef context::CDList<Constraint, ConstraintValue::ProofCleanup> ProofCleanupList;
typedef context::CDList<Constraint, ConstraintValue::CanBePropagatedCleanup> CBPList;
diff --git a/src/theory/arith/delta_rational.h b/src/theory/arith/delta_rational.h
index 19a16d558..51c1e5138 100644
--- a/src/theory/arith/delta_rational.h
+++ b/src/theory/arith/delta_rational.h
@@ -249,7 +249,7 @@ public:
}
/**
- * Computes a sufficient upperbound to seperate two DeltaRationals.
+ * Computes a sufficient upperbound to separate two DeltaRationals.
* This value is stored in res.
* For any rational d such that
* 0 < d < res
diff --git a/src/theory/arith/options b/src/theory/arith/options
index 719c826ae..efe594766 100644
--- a/src/theory/arith/options
+++ b/src/theory/arith/options
@@ -51,13 +51,15 @@ option arithRewriteEq --enable-arith-rewrite-equalities/--disable-arith-rewrite-
turns on the preprocessing rewrite turning equalities into a conjunction of inequalities
/turns off the preprocessing rewrite turning equalities into a conjunction of inequalities
-option arithMLTrick --enable-miplib-trick/--disable-miplib-trick bool :default false :read-write
+option arithMLTrick miplib-trick --enable-miplib-trick/--disable-miplib-trick bool :default false
turns on the preprocessing step of attempting to infer bounds on miplib problems
/turns off the preprocessing step of attempting to infer bounds on miplib problems
+option arithMLTrickSubstitutions miplib-trick-subs --miplib-trick-subs unsigned :default 1
+ do substitution for miplib 'tmp' vars if defined in <= N eliminated vars
+
option doCutAllBounded --enable-cut-all-bounded/--disable-cut-all-bounded bool :default false :read-write
turns on the integer solving step of periodically cutting all integer variables that have both upper and lower bounds
-/ turns off the integer solving step of periodically cutting all integer variables that have both upper and lower bounds
-
+/turns off the integer solving step of periodically cutting all integer variables that have both upper and lower bounds
endmodule
diff --git a/src/theory/arith/options_handlers.h b/src/theory/arith/options_handlers.h
index 52e7cbf2a..f8f851964 100644
--- a/src/theory/arith/options_handlers.h
+++ b/src/theory/arith/options_handlers.h
@@ -52,7 +52,7 @@ This decides on kind of propagation arithmetic attempts to do during the search.
";
static const std::string heuristicPivotRulesHelp = "\
-This decides on the rule used by simplex during hueristic rounds\n\
+This decides on the rule used by simplex during heuristic rounds\n\
for deciding the next basic variable to select.\n\
Heuristic pivot rules available:\n\
+min\n\
diff --git a/src/theory/arrays/theory_arrays.cpp b/src/theory/arrays/theory_arrays.cpp
index aabd3a62d..dcf4813fc 100644
--- a/src/theory/arrays/theory_arrays.cpp
+++ b/src/theory/arrays/theory_arrays.cpp
@@ -1324,7 +1324,9 @@ void TheoryArrays::queueRowLemma(RowLemmaType lem)
// Prefer equality between indexes so as not to introduce new read terms
if (d_eagerIndexSplitting && !bothExist && !d_equalityEngine.areDisequal(i,j, false)) {
- d_decisionRequests.push(i.eqNode(j));
+ Node i_eq_j = d_valuation.ensureLiteral(i.eqNode(j));
+ getOutputChannel().requirePhase(i_eq_j, true);
+ d_decisionRequests.push(i_eq_j);
}
// TODO: maybe add triggers here
@@ -1392,7 +1394,7 @@ void TheoryArrays::queueRowLemma(RowLemmaType lem)
Node TheoryArrays::getNextDecisionRequest() {
if(! d_decisionRequests.empty()) {
- Node n = d_valuation.ensureLiteral(d_decisionRequests.front());
+ Node n = d_decisionRequests.front();
d_decisionRequests.pop();
return n;
} else {
diff --git a/src/theory/arrays/theory_arrays_model.cpp b/src/theory/arrays/theory_arrays_model.cpp
index 86bdad53f..4f7584ac1 100644
--- a/src/theory/arrays/theory_arrays_model.cpp
+++ b/src/theory/arrays/theory_arrays_model.cpp
@@ -41,7 +41,7 @@ Node ArrayModel::getValue( TheoryModel* m, Node i ){
return it->second;
}else{
return NodeManager::currentNM()->mkNode( SELECT, getArrayValue(), i );
- //return d_default_value; //TODO: guarentee I can return this here
+ //return d_default_value; //TODO: guarantee I can return this here
}
}
diff --git a/src/theory/arrays/theory_arrays_model.h b/src/theory/arrays/theory_arrays_model.h
index 8dfc7fc4a..c82c7635d 100644
--- a/src/theory/arrays/theory_arrays_model.h
+++ b/src/theory/arrays/theory_arrays_model.h
@@ -1,58 +1,58 @@
/********************* */
/*! \file theory_arrays_model.h
** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
** Minor contributors (to current version): none
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.\endverbatim
**
- ** \brief MODEL for theory of arrays
- **/
-
-
-#include "cvc4_private.h"
-
-#ifndef __CVC4__THEORY_ARRAYS_MODEL_H
-#define __CVC4__THEORY_ARRAYS_MODEL_H
-
-#include "theory/quantifiers_engine.h"
-
-namespace CVC4 {
-namespace theory {
-
-class TheoryModel;
-
-namespace arrays {
-
-class ArrayModel{
-protected:
- /** the array this model is for */
- Node d_arr;
-public:
- ArrayModel(){}
- ArrayModel( Node arr, TheoryModel* m );
- ~ArrayModel() {}
-public:
- /** pre-defined values */
- std::map< Node, Node > d_values;
- /** base array */
- Node d_base_arr;
- /** get value, return arguments that the value depends on */
- Node getValue( TheoryModel* m, Node i );
- /** set value */
- void setValue( TheoryModel* m, Node i, Node e );
- /** set default */
- void setDefaultArray( Node arr );
-public:
- /** get array value */
- Node getArrayValue();
-};/* class ArrayModel */
-
-}
-}
-}
-
+ ** \brief MODEL for theory of arrays
+ **/
+
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__THEORY_ARRAYS_MODEL_H
+#define __CVC4__THEORY_ARRAYS_MODEL_H
+
+#include "theory/quantifiers_engine.h"
+
+namespace CVC4 {
+namespace theory {
+
+class TheoryModel;
+
+namespace arrays {
+
+class ArrayModel{
+protected:
+ /** the array this model is for */
+ Node d_arr;
+public:
+ ArrayModel(){}
+ ArrayModel( Node arr, TheoryModel* m );
+ ~ArrayModel() {}
+public:
+ /** pre-defined values */
+ std::map< Node, Node > d_values;
+ /** base array */
+ Node d_base_arr;
+ /** get value, return arguments that the value depends on */
+ Node getValue( TheoryModel* m, Node i );
+ /** set value */
+ void setValue( TheoryModel* m, Node i, Node e );
+ /** set default */
+ void setDefaultArray( Node arr );
+public:
+ /** get array value */
+ Node getArrayValue();
+};/* class ArrayModel */
+
+}
+}
+}
+
#endif \ No newline at end of file
diff --git a/src/theory/arrays/theory_arrays_rewriter.h b/src/theory/arrays/theory_arrays_rewriter.h
index da479616d..9cbb0c9e8 100644
--- a/src/theory/arrays/theory_arrays_rewriter.h
+++ b/src/theory/arrays/theory_arrays_rewriter.h
@@ -37,8 +37,12 @@ typedef expr::Attribute<attr::ArrayConstantMostFrequentValueCountTag, uint64_t>
typedef expr::Attribute<attr::ArrayConstantMostFrequentValueTag, Node> ArrayConstantMostFrequentValueAttr;
class TheoryArraysRewriter {
-
static Node normalizeConstant(TNode node) {
+ return normalizeConstant(node, node[1].getType().getCardinality());
+ }
+public:
+ //this function is called by printers when using the option "--model-u-dt-enum"
+ static Node normalizeConstant(TNode node, Cardinality indexCard) {
TNode store = node[0];
TNode index = node[1];
TNode value = node[2];
@@ -112,7 +116,6 @@ class TheoryArraysRewriter {
return n;
}
- Cardinality indexCard = index.getType().getCardinality();
if (indexCard.isInfinite()) {
return n;
}
@@ -189,13 +192,15 @@ class TheoryArraysRewriter {
std::vector<Node> newIndices;
TypeEnumerator te(index.getType());
bool needToSort = false;
- while (!te.isFinished()) {
+ unsigned numTe = 0;
+ while (!te.isFinished() && (!indexCard.isFinite() || numTe<indexCard.getFiniteCardinality().toUnsignedInt())) {
if (indexSet.find(*te) == indexSet.end()) {
if (!newIndices.empty() && (!(newIndices.back() < (*te)))) {
needToSort = true;
}
newIndices.push_back(*te);
}
+ ++numTe;
++te;
}
Assert(indexCard.compare(newIndices.size() + depth) == Cardinality::EQUAL);
diff --git a/src/theory/booleans/circuit_propagator.h b/src/theory/booleans/circuit_propagator.h
index aec0cff58..de4bb30d2 100644
--- a/src/theory/booleans/circuit_propagator.h
+++ b/src/theory/booleans/circuit_propagator.h
@@ -64,6 +64,8 @@ public:
else return ASSIGNED_TO_TRUE;
}
+ typedef std::hash_map<Node, std::vector<Node>, NodeHashFunction> BackEdgesMap;
+
private:
context::Context d_context;
@@ -96,7 +98,7 @@ private:
*/
DataClearer< std::vector<TNode> > d_propagationQueueClearer;
- /** Are we in conflict */
+ /** Are we in conflict? */
context::CDO<bool> d_conflict;
/** Map of substitutions */
@@ -107,8 +109,9 @@ private:
*/
DataClearer< std::vector<Node> > d_learnedLiteralClearer;
- /** Back edges from nodes to where they are used */
- typedef std::hash_map<Node, std::vector<Node>, NodeHashFunction> BackEdgesMap;
+ /**
+ * Back edges from nodes to where they are used.
+ */
BackEdgesMap d_backEdges;
/**
@@ -157,6 +160,7 @@ private:
}
}
+public:
/** True iff Node is assigned in circuit (either true or false). */
bool isAssigned(TNode n) const {
AssignmentMap::const_iterator i = d_state.find(n);
@@ -179,6 +183,7 @@ private:
return (*i).second == ASSIGNED_TO_TRUE;
}
+private:
/** Predicate for use in STL functions. */
class IsAssigned : public std::unary_function<TNode, bool> {
CircuitPropagator& d_circuit;
@@ -268,6 +273,13 @@ public:
*/
bool propagate() CVC4_WARN_UNUSED_RESULT;
+ /**
+ * Get the back edges of this circuit.
+ */
+ const BackEdgesMap& getBackEdges() const {
+ return d_backEdges;
+ }
+
};/* class CircuitPropagator */
}/* CVC4::theory::booleans namespace */
diff --git a/src/theory/bv/bitblast_strategies.cpp b/src/theory/bv/bitblast_strategies.cpp
index 3ce9bcb44..773685997 100644
--- a/src/theory/bv/bitblast_strategies.cpp
+++ b/src/theory/bv/bitblast_strategies.cpp
@@ -191,13 +191,13 @@ Node inline sLessThanBB(const Bits&a, const Bits& b, bool orEqual) {
Node UndefinedAtomBBStrategy(TNode node, Bitblaster* bb) {
- BVDebug("bitvector") << "TheoryBV::Bitblaster Undefined bitblasting strategy for kind: "
+ Debug("bitvector") << "TheoryBV::Bitblaster Undefined bitblasting strategy for kind: "
<< node.getKind() << "\n";
Unreachable();
}
Node DefaultEqBB(TNode node, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "Bitblasting node " << node << "\n";
+ Debug("bitvector-bb") << "Bitblasting node " << node << "\n";
Assert(node.getKind() == kind::EQUAL);
Bits lhs, rhs;
@@ -219,7 +219,7 @@ Node DefaultEqBB(TNode node, Bitblaster* bb) {
Node AdderUltBB(TNode node, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "Bitblasting node " << node << "\n";
+ Debug("bitvector-bb") << "Bitblasting node " << node << "\n";
Assert(node.getKind() == kind::BITVECTOR_ULT);
Bits a, b;
bb->bbTerm(node[0], a);
@@ -241,7 +241,7 @@ Node AdderUltBB(TNode node, Bitblaster* bb) {
Node DefaultUltBB(TNode node, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "Bitblasting node " << node << "\n";
+ Debug("bitvector-bb") << "Bitblasting node " << node << "\n";
Assert(node.getKind() == kind::BITVECTOR_ULT);
Bits a, b;
bb->bbTerm(node[0], a);
@@ -254,7 +254,7 @@ Node DefaultUltBB(TNode node, Bitblaster* bb) {
}
Node DefaultUleBB(TNode node, Bitblaster* bb){
- BVDebug("bitvector-bb") << "Bitblasting node " << node << "\n";
+ Debug("bitvector-bb") << "Bitblasting node " << node << "\n";
Assert(node.getKind() == kind::BITVECTOR_ULE);
Bits a, b;
@@ -267,31 +267,31 @@ Node DefaultUleBB(TNode node, Bitblaster* bb){
}
Node DefaultUgtBB(TNode node, Bitblaster* bb){
- BVDebug("bitvector-bb") << "Bitblasting node " << node << "\n";
+ Debug("bitvector-bb") << "Bitblasting node " << node << "\n";
// should be rewritten
Unimplemented();
}
Node DefaultUgeBB(TNode node, Bitblaster* bb){
- BVDebug("bitvector-bb") << "Bitblasting node " << node << "\n";
+ Debug("bitvector-bb") << "Bitblasting node " << node << "\n";
// should be rewritten
Unimplemented();
}
// Node DefaultSltBB(TNode node, Bitblaster* bb){
-// BVDebug("bitvector-bb") << "Bitblasting node " << node << "\n";
+// Debug("bitvector-bb") << "Bitblasting node " << node << "\n";
// // shoudl be rewritten in terms of ult
// Unimplemented();
// }
// Node DefaultSleBB(TNode node, Bitblaster* bb){
-// BVDebug("bitvector-bb") << "Bitblasting node " << node << "\n";
+// Debug("bitvector-bb") << "Bitblasting node " << node << "\n";
// // shoudl be rewritten in terms of ule
// Unimplemented();
// }
Node DefaultSltBB(TNode node, Bitblaster* bb){
- BVDebug("bitvector-bb") << "Bitblasting node " << node << "\n";
+ Debug("bitvector-bb") << "Bitblasting node " << node << "\n";
Bits a, b;
bb->bbTerm(node[0], a);
@@ -303,7 +303,7 @@ Node DefaultSltBB(TNode node, Bitblaster* bb){
}
Node DefaultSleBB(TNode node, Bitblaster* bb){
- BVDebug("bitvector-bb") << "Bitblasting node " << node << "\n";
+ Debug("bitvector-bb") << "Bitblasting node " << node << "\n";
Bits a, b;
bb->bbTerm(node[0], a);
@@ -315,13 +315,13 @@ Node DefaultSleBB(TNode node, Bitblaster* bb){
}
Node DefaultSgtBB(TNode node, Bitblaster* bb){
- BVDebug("bitvector-bb") << "Bitblasting node " << node << "\n";
+ Debug("bitvector-bb") << "Bitblasting node " << node << "\n";
// should be rewritten
Unimplemented();
}
Node DefaultSgeBB(TNode node, Bitblaster* bb){
- BVDebug("bitvector-bb") << "Bitblasting node " << node << "\n";
+ Debug("bitvector-bb") << "Bitblasting node " << node << "\n";
// should be rewritten
Unimplemented();
}
@@ -330,7 +330,7 @@ Node DefaultSgeBB(TNode node, Bitblaster* bb){
/// Term bitblasting strategies
void UndefinedTermBBStrategy(TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector") << "theory::bv:: Undefined bitblasting strategy for kind: "
+ Debug("bitvector") << "theory::bv:: Undefined bitblasting strategy for kind: "
<< node.getKind() << "\n";
Unreachable();
}
@@ -342,15 +342,15 @@ void DefaultVarBB (TNode node, Bits& bits, Bitblaster* bb) {
}
if(Debug.isOn("bitvector-bb")) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultVarBB bitblasting " << node << "\n";
- BVDebug("bitvector-bb") << " with bits " << toString(bits);
+ Debug("bitvector-bb") << "theory::bv::DefaultVarBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << " with bits " << toString(bits);
}
bb->storeVariable(node);
}
void DefaultConstBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultConstBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultConstBB bitblasting " << node << "\n";
Assert(node.getKind() == kind::CONST_BITVECTOR);
Assert(bits.size() == 0);
@@ -364,13 +364,13 @@ void DefaultConstBB (TNode node, Bits& bits, Bitblaster* bb) {
}
}
if(Debug.isOn("bitvector-bb")) {
- BVDebug("bitvector-bb") << "with bits: " << toString(bits) << "\n";
+ Debug("bitvector-bb") << "with bits: " << toString(bits) << "\n";
}
}
void DefaultNotBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultNotBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultNotBB bitblasting " << node << "\n";
Assert(node.getKind() == kind::BITVECTOR_NOT);
Assert(bits.size() == 0);
Bits bv;
@@ -379,7 +379,7 @@ void DefaultNotBB (TNode node, Bits& bits, Bitblaster* bb) {
}
void DefaultConcatBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultConcatBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultConcatBB bitblasting " << node << "\n";
Assert(bits.size() == 0);
Assert (node.getKind() == kind::BITVECTOR_CONCAT);
@@ -394,12 +394,12 @@ void DefaultConcatBB (TNode node, Bits& bits, Bitblaster* bb) {
}
Assert (bits.size() == utils::getSize(node));
if(Debug.isOn("bitvector-bb")) {
- BVDebug("bitvector-bb") << "with bits: " << toString(bits) << "\n";
+ Debug("bitvector-bb") << "with bits: " << toString(bits) << "\n";
}
}
void DefaultAndBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultAndBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultAndBB bitblasting " << node << "\n";
Assert(node.getKind() == kind::BITVECTOR_AND &&
bits.size() == 0);
@@ -417,7 +417,7 @@ void DefaultAndBB (TNode node, Bits& bits, Bitblaster* bb) {
}
void DefaultOrBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultOrBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultOrBB bitblasting " << node << "\n";
Assert(node.getKind() == kind::BITVECTOR_OR &&
bits.size() == 0);
@@ -435,7 +435,7 @@ void DefaultOrBB (TNode node, Bits& bits, Bitblaster* bb) {
}
void DefaultXorBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultXorBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultXorBB bitblasting " << node << "\n";
Assert(node.getKind() == kind::BITVECTOR_XOR &&
bits.size() == 0);
@@ -456,7 +456,7 @@ void DefaultXorBB (TNode node, Bits& bits, Bitblaster* bb) {
}
void DefaultXnorBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultXnorBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultXnorBB bitblasting " << node << "\n";
Assert(node.getNumChildren() == 2 &&
node.getKind() == kind::BITVECTOR_XNOR &&
@@ -473,17 +473,17 @@ void DefaultXnorBB (TNode node, Bits& bits, Bitblaster* bb) {
void DefaultNandBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector") << "theory::bv:: Unimplemented kind "
+ Debug("bitvector") << "theory::bv:: Unimplemented kind "
<< node.getKind() << "\n";
Unimplemented();
}
void DefaultNorBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector") << "theory::bv:: Unimplemented kind "
+ Debug("bitvector") << "theory::bv:: Unimplemented kind "
<< node.getKind() << "\n";
Unimplemented();
}
void DefaultCompBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector") << "theory::bv:: DefaultCompBB bitblasting "<< node << "\n";
+ Debug("bitvector") << "theory::bv:: DefaultCompBB bitblasting "<< node << "\n";
Assert(getSize(node) == 1 && bits.size() == 0 && node.getKind() == kind::BITVECTOR_COMP);
Bits a, b;
@@ -501,7 +501,7 @@ void DefaultCompBB (TNode node, Bits& bits, Bitblaster* bb) {
}
void DefaultMultBB (TNode node, Bits& res, Bitblaster* bb) {
- BVDebug("bitvector") << "theory::bv:: DefaultMultBB bitblasting "<< node << "\n";
+ Debug("bitvector") << "theory::bv:: DefaultMultBB bitblasting "<< node << "\n";
Assert(res.size() == 0 &&
node.getKind() == kind::BITVECTOR_MULT);
@@ -517,12 +517,12 @@ void DefaultMultBB (TNode node, Bits& res, Bitblaster* bb) {
res = newres;
}
if(Debug.isOn("bitvector-bb")) {
- BVDebug("bitvector-bb") << "with bits: " << toString(res) << "\n";
+ Debug("bitvector-bb") << "with bits: " << toString(res) << "\n";
}
}
void DefaultPlusBB (TNode node, Bits& res, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultPlusBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultPlusBB bitblasting " << node << "\n";
Assert(node.getKind() == kind::BITVECTOR_PLUS &&
res.size() == 0);
@@ -543,7 +543,7 @@ void DefaultPlusBB (TNode node, Bits& res, Bitblaster* bb) {
void DefaultSubBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultSubBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultSubBB bitblasting " << node << "\n";
Assert(node.getKind() == kind::BITVECTOR_SUB &&
node.getNumChildren() == 2 &&
bits.size() == 0);
@@ -561,7 +561,7 @@ void DefaultSubBB (TNode node, Bits& bits, Bitblaster* bb) {
}
void DefaultNegBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultNegBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultNegBB bitblasting " << node << "\n";
Assert(node.getKind() == kind::BITVECTOR_NEG);
Bits a;
@@ -639,7 +639,7 @@ void uDivModRec(const Bits& a, const Bits& b, Bits& q, Bits& r, unsigned rec_wid
}
void DefaultUdivBB (TNode node, Bits& q, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultUdivBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultUdivBB bitblasting " << node << "\n";
Assert(node.getKind() == kind::BITVECTOR_UDIV_TOTAL && q.size() == 0);
Bits a, b;
@@ -666,7 +666,7 @@ void DefaultUdivBB (TNode node, Bits& q, Bitblaster* bb) {
}
void DefaultUremBB (TNode node, Bits& rem, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultUremBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultUremBB bitblasting " << node << "\n";
Assert(node.getKind() == kind::BITVECTOR_UREM_TOTAL && rem.size() == 0);
Bits a, b;
@@ -694,23 +694,23 @@ void DefaultUremBB (TNode node, Bits& rem, Bitblaster* bb) {
void DefaultSdivBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector") << "theory::bv:: Unimplemented kind "
+ Debug("bitvector") << "theory::bv:: Unimplemented kind "
<< node.getKind() << "\n";
Unimplemented();
}
void DefaultSremBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector") << "theory::bv:: Unimplemented kind "
+ Debug("bitvector") << "theory::bv:: Unimplemented kind "
<< node.getKind() << "\n";
Unimplemented();
}
void DefaultSmodBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector") << "theory::bv:: Unimplemented kind "
+ Debug("bitvector") << "theory::bv:: Unimplemented kind "
<< node.getKind() << "\n";
Unimplemented();
}
void DefaultShlBB (TNode node, Bits& res, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultShlBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultShlBB bitblasting " << node << "\n";
Assert (node.getKind() == kind::BITVECTOR_SHL &&
res.size() == 0);
Bits a, b;
@@ -738,12 +738,12 @@ void DefaultShlBB (TNode node, Bits& res, Bitblaster* bb) {
}
}
if(Debug.isOn("bitvector-bb")) {
- BVDebug("bitvector-bb") << "with bits: " << toString(res) << "\n";
+ Debug("bitvector-bb") << "with bits: " << toString(res) << "\n";
}
}
void DefaultLshrBB (TNode node, Bits& res, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultLshrBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultLshrBB bitblasting " << node << "\n";
Assert (node.getKind() == kind::BITVECTOR_LSHR &&
res.size() == 0);
Bits a, b;
@@ -771,13 +771,13 @@ void DefaultLshrBB (TNode node, Bits& res, Bitblaster* bb) {
}
}
if(Debug.isOn("bitvector-bb")) {
- BVDebug("bitvector-bb") << "with bits: " << toString(res) << "\n";
+ Debug("bitvector-bb") << "with bits: " << toString(res) << "\n";
}
}
void DefaultAshrBB (TNode node, Bits& res, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultAshrBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultAshrBB bitblasting " << node << "\n";
Assert (node.getKind() == kind::BITVECTOR_ASHR &&
res.size() == 0);
Bits a, b;
@@ -806,7 +806,7 @@ void DefaultAshrBB (TNode node, Bits& res, Bitblaster* bb) {
}
}
if(Debug.isOn("bitvector-bb")) {
- BVDebug("bitvector-bb") << "with bits: " << toString(res) << "\n";
+ Debug("bitvector-bb") << "with bits: " << toString(res) << "\n";
}
}
@@ -825,14 +825,14 @@ void DefaultExtractBB (TNode node, Bits& bits, Bitblaster* bb) {
Assert (bits.size() == high - low + 1);
if(Debug.isOn("bitvector-bb")) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultExtractBB bitblasting " << node << "\n";
- BVDebug("bitvector-bb") << " with bits " << toString(bits);
+ Debug("bitvector-bb") << "theory::bv::DefaultExtractBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << " with bits " << toString(bits);
}
}
void DefaultRepeatBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector") << "theory::bv:: Unimplemented kind "
+ Debug("bitvector") << "theory::bv:: Unimplemented kind "
<< node.getKind() << "\n";
// this should be rewritten
Unimplemented();
@@ -840,7 +840,7 @@ void DefaultRepeatBB (TNode node, Bits& bits, Bitblaster* bb) {
void DefaultZeroExtendBB (TNode node, Bits& res_bits, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultZeroExtendBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultZeroExtendBB bitblasting " << node << "\n";
// this should be rewritten
Unimplemented();
@@ -848,7 +848,7 @@ void DefaultZeroExtendBB (TNode node, Bits& res_bits, Bitblaster* bb) {
}
void DefaultSignExtendBB (TNode node, Bits& res_bits, Bitblaster* bb) {
- BVDebug("bitvector-bb") << "theory::bv::DefaultSignExtendBB bitblasting " << node << "\n";
+ Debug("bitvector-bb") << "theory::bv::DefaultSignExtendBB bitblasting " << node << "\n";
Assert (node.getKind() == kind::BITVECTOR_SIGN_EXTEND &&
res_bits.size() == 0);
@@ -871,14 +871,14 @@ void DefaultSignExtendBB (TNode node, Bits& res_bits, Bitblaster* bb) {
}
void DefaultRotateRightBB (TNode node, Bits& res, Bitblaster* bb) {
- BVDebug("bitvector") << "theory::bv:: Unimplemented kind "
+ Debug("bitvector") << "theory::bv:: Unimplemented kind "
<< node.getKind() << "\n";
Unimplemented();
}
void DefaultRotateLeftBB (TNode node, Bits& bits, Bitblaster* bb) {
- BVDebug("bitvector") << "theory::bv:: Unimplemented kind "
+ Debug("bitvector") << "theory::bv:: Unimplemented kind "
<< node.getKind() << "\n";
Unimplemented();
}
diff --git a/src/theory/bv/bv_subtheory.h b/src/theory/bv/bv_subtheory.h
index a256b6001..d95aaa873 100644
--- a/src/theory/bv/bv_subtheory.h
+++ b/src/theory/bv/bv_subtheory.h
@@ -72,19 +72,31 @@ protected:
/** The bit-vector theory */
TheoryBV* d_bv;
-
+ context::CDQueue<TNode> d_assertionQueue;
+ context::CDO<uint32_t> d_assertionIndex;
public:
SubtheorySolver(context::Context* c, TheoryBV* bv) :
d_context(c),
- d_bv(bv)
+ d_bv(bv),
+ d_assertionQueue(c),
+ d_assertionIndex(c, 0)
{}
virtual ~SubtheorySolver() {}
+
+ virtual bool check(Theory::Effort e) = 0;
+ virtual void explain(TNode literal, std::vector<TNode>& assumptions) = 0;
+ virtual void preRegister(TNode node) {}
+ virtual void collectModelInfo(TheoryModel* m) = 0;
+ bool done() { return d_assertionQueue.size() == d_assertionIndex; }
+ TNode get() {
+ Assert (!done());
+ TNode res = d_assertionQueue[d_assertionIndex];
+ d_assertionIndex = d_assertionIndex + 1;
+ return res;
+ }
+ void assertFact(TNode fact) { d_assertionQueue.push_back(fact); }
- virtual bool addAssertions(const std::vector<TNode>& assertions, Theory::Effort e) = 0;
- virtual void explain(TNode literal, std::vector<TNode>& assumptions) = 0;
- virtual void preRegister(TNode node) {}
- virtual void collectModelInfo(TheoryModel* m) = 0;
};
}
diff --git a/src/theory/bv/bv_subtheory_bitblast.cpp b/src/theory/bv/bv_subtheory_bitblast.cpp
index 985a9b500..2f76e32d3 100644
--- a/src/theory/bv/bv_subtheory_bitblast.cpp
+++ b/src/theory/bv/bv_subtheory_bitblast.cpp
@@ -52,12 +52,21 @@ void BitblastSolver::explain(TNode literal, std::vector<TNode>& assumptions) {
d_bitblaster->explain(literal, assumptions);
}
-bool BitblastSolver::addAssertions(const std::vector<TNode>& assertions, Theory::Effort e) {
- Debug("bitvector::bitblaster") << "BitblastSolver::addAssertions (" << e << ")" << std::endl;
- Debug("bitvector::bitblaster") << "number of assertions: " << assertions.size() << std::endl;
- //// Lazy bit-blasting
+bool BitblastSolver::check(Theory::Effort e) {
+ //// Eager bit-blasting
+ if (options::bitvectorEagerBitblast()) {
+ while (!done()) {
+ TNode assertion = get();
+ TNode atom = assertion.getKind() == kind::NOT ? assertion[0] : assertion;
+ if (atom.getKind() != kind::BITVECTOR_BITOF) {
+ d_bitblaster->bbAtom(atom);
+ }
+ return true;
+ }
+ }
+ //// Lazy bit-blasting
// bit-blast enqueued nodes
while (!d_bitblastQueue.empty()) {
TNode atom = d_bitblastQueue.front();
@@ -65,9 +74,9 @@ bool BitblastSolver::addAssertions(const std::vector<TNode>& assertions, Theory:
d_bitblastQueue.pop();
}
- // propagation
- for (unsigned i = 0; i < assertions.size(); ++i) {
- TNode fact = assertions[i];
+ // Processinga ssertions
+ while (!done()) {
+ TNode fact = get();
if (!d_bv->inConflict() && !d_bv->propagatedBy(fact, SUB_BITBLAST)) {
// Some atoms have not been bit-blasted yet
d_bitblaster->bbAtom(fact);
@@ -93,7 +102,7 @@ bool BitblastSolver::addAssertions(const std::vector<TNode>& assertions, Theory:
}
}
- // solving
+ // Solving
if (e == Theory::EFFORT_FULL || options::bitvectorEagerFullcheck()) {
Assert(!d_bv->inConflict());
Debug("bitvector::bitblaster") << "BitblastSolver::addAssertions solving. \n";
diff --git a/src/theory/bv/bv_subtheory_bitblast.h b/src/theory/bv/bv_subtheory_bitblast.h
index 3396d813b..318fdd230 100644
--- a/src/theory/bv/bv_subtheory_bitblast.h
+++ b/src/theory/bv/bv_subtheory_bitblast.h
@@ -42,7 +42,7 @@ public:
~BitblastSolver();
void preRegister(TNode node);
- bool addAssertions(const std::vector<TNode>& assertions, Theory::Effort e);
+ bool check(Theory::Effort e);
void explain(TNode literal, std::vector<TNode>& assumptions);
EqualityStatus getEqualityStatus(TNode a, TNode b);
void collectModelInfo(TheoryModel* m);
diff --git a/src/theory/bv/bv_subtheory_core.cpp b/src/theory/bv/bv_subtheory_core.cpp
index 91cf29ee9..2e1320d1a 100644
--- a/src/theory/bv/bv_subtheory_core.cpp
+++ b/src/theory/bv/bv_subtheory_core.cpp
@@ -35,7 +35,9 @@ CoreSolver::CoreSolver(context::Context* c, TheoryBV* bv, Slicer* slicer)
d_assertions(c),
d_normalFormCache(),
d_slicer(slicer),
- d_isCoreTheory(c, true)
+ d_isCoreTheory(c, true),
+ d_baseChanged(false),
+ d_checkCalled(false)
{
if (d_useEqualityEngine) {
@@ -83,6 +85,7 @@ void CoreSolver::preRegister(TNode node) {
if (node.getKind() == kind::EQUAL) {
d_equalityEngine.addTriggerEquality(node);
+ d_slicer->processEquality(node);
} else {
d_equalityEngine.addTerm(node);
}
@@ -101,6 +104,11 @@ void CoreSolver::explain(TNode literal, std::vector<TNode>& assumptions) {
Node CoreSolver::getBaseDecomposition(TNode a) {
std::vector<Node> a_decomp;
+ // FIXME: hack to do bitwise decomposition
+ // for (int i = utils::getSize(a) - 1; i>= 0; --i) {
+ // Node bit = Rewriter::rewrite(utils::mkExtract(a, i, i));
+ // a_decomp.push_back(bit);
+ // }
d_slicer->getBaseDecomposition(a, a_decomp);
Node new_a = utils::mkConcat(a_decomp);
return new_a;
@@ -116,11 +124,8 @@ bool CoreSolver::decomposeFact(TNode fact) {
TNode a = eq[0];
TNode b = eq[1];
- // we need to get the old decomposition to keep track of the cuts we added
- Base a_old_base = d_slicer->getTopLevelBase(a);
- Base b_old_base = d_slicer->getTopLevelBase(b);
- d_slicer->processEquality(eq);
+ // d_slicer->processEquality(eq);
Node new_a = getBaseDecomposition(a);
Node new_b = getBaseDecomposition(b);
@@ -132,20 +137,12 @@ bool CoreSolver::decomposeFact(TNode fact) {
Node a_eq_new_a = nm->mkNode(kind::EQUAL, a, new_a);
Node b_eq_new_b = nm->mkNode(kind::EQUAL, b, new_b);
- Base a_new_base = d_slicer->getTopLevelBase(a);
- Base b_new_base = d_slicer->getTopLevelBase(b);
-
bool ok = true;
- ok = addNewSplits(a, a_old_base, a_new_base);
- if (!ok) return false;
- ok = addNewSplits(b, b_old_base, b_new_base);
- if (!ok) return false;
-
- ok = assertFact(a_eq_new_a, utils::mkTrue());
+ ok = assertFactToEqualityEngine(a_eq_new_a, utils::mkTrue());
if (!ok) return false;
- ok = assertFact(b_eq_new_b, utils::mkTrue());
+ ok = assertFactToEqualityEngine(b_eq_new_b, utils::mkTrue());
if (!ok) return false;
- ok = assertFact(fact, fact);
+ ok = assertFactToEqualityEngine(fact, fact);
if (!ok) return false;
if (fact.getKind() == kind::EQUAL) {
@@ -157,7 +154,7 @@ bool CoreSolver::decomposeFact(TNode fact) {
Assert (new_a.getNumChildren() == new_b.getNumChildren());
for (unsigned i = 0; i < new_a.getNumChildren(); ++i) {
Node eq_i = nm->mkNode(kind::EQUAL, new_a[i], new_b[i]);
- ok = assertFact(eq_i, fact);
+ ok = assertFactToEqualityEngine(eq_i, fact);
if (!ok) return false;
}
}
@@ -165,64 +162,15 @@ bool CoreSolver::decomposeFact(TNode fact) {
return true;
}
-bool CoreSolver::addNewSplits(TNode n, Base& old_base, Base& new_base) {
- if (n.getKind() == kind::BITVECTOR_EXTRACT) {
- n = n[0];
- }
- Assert (old_base.getBitwidth() == new_base.getBitwidth() &&
- utils::getSize(n) == old_base.getBitwidth());
-
- Index high, low = 0;
- std::vector<std::pair<Index, Index> > toSlice;
- bool hasNewCut = false;
- // collect the intervals that need to be sliced
- for (unsigned i = 0; i <= old_base.getBitwidth(); ++i) {
- Assert (! old_base.isCutPoint(i) || new_base.isCutPoint(i));
- if (new_base.isCutPoint(i) && !old_base.isCutPoint(i)) {
- hasNewCut = true;
- }
- if (new_base.isCutPoint(i) && old_base.isCutPoint(i)) {
- high = i;
- if (hasNewCut) {
- toSlice.push_back(std::pair<Index, Index>(high, low));
- }
- low = i;
- hasNewCut = false;
- }
- }
- // for each interval, assert the proper equality
- for (unsigned i = 0; i < toSlice.size(); ++i) {
- int high = toSlice[i].first;
- int low = toSlice[i].second;
- int prev = high;
- std::vector<Node> extracts;
- for (int k = high -1; k >= low; --k) {
- if (new_base.isCutPoint(k) && (!old_base.isCutPoint(k) || k == low)) {
- // add a new extract
- Node ex = utils::mkExtract(n, prev - 1, k);
- prev = k;
- extracts.push_back(ex);
- }
- }
- Node concat = utils::mkConcat(extracts);
- Node current = utils::mkExtract(n, high - 1, low);
- Node eq = utils::mkNode(kind::EQUAL, concat, current);
- bool ok = assertFact(eq, utils::mkTrue());
- if (!ok)
- return false;
- }
- return true;
-}
-
-
-bool CoreSolver::addAssertions(const std::vector<TNode>& assertions, Theory::Effort e) {
- Trace("bitvector::core") << "CoreSolver::addAssertions \n";
+bool CoreSolver::check(Theory::Effort e) {
+ d_checkCalled = true;
+ Trace("bitvector::core") << "CoreSolver::check \n";
Assert (!d_bv->inConflict());
bool ok = true;
std::vector<Node> core_eqs;
- for (unsigned i = 0; i < assertions.size(); ++i) {
- TNode fact = assertions[i];
+ while (! done()) {
+ TNode fact = get();
// update whether we are in the core fragment
if (d_isCoreTheory && !d_slicer->isCoreTerm(fact)) {
@@ -234,17 +182,17 @@ bool CoreSolver::addAssertions(const std::vector<TNode>& assertions, Theory::Eff
TNode eq = fact.getKind() == kind::EQUAL ? fact : fact[0];
ok = decomposeFact(fact);
} else {
- ok = assertFact(fact, fact);
+ ok = assertFactToEqualityEngine(fact, fact);
}
if (!ok)
return false;
}
-
+
return true;
}
-bool CoreSolver::assertFact(TNode fact, TNode reason) {
- Debug("bv-slicer") << "CoreSolver::assertFact fact=" << fact << endl;
+bool CoreSolver::assertFactToEqualityEngine(TNode fact, TNode reason) {
+ Debug("bv-slicer") << "CoreSolver::assertFactToEqualityEngine fact=" << fact << endl;
Debug("bv-slicer") << " reason=" << reason << endl;
// Notify the equality engine
if (d_useEqualityEngine && !d_bv->inConflict() && !d_bv->propagatedBy(fact, SUB_CORE) ) {
@@ -276,7 +224,7 @@ bool CoreSolver::assertFact(TNode fact, TNode reason) {
}
bool CoreSolver::NotifyClass::eqNotifyTriggerEquality(TNode equality, bool value) {
- BVDebug("bitvector::core") << "NotifyClass::eqNotifyTriggerEquality(" << equality << ", " << (value ? "true" : "false" )<< ")" << std::endl;
+ Debug("bitvector::core") << "NotifyClass::eqNotifyTriggerEquality(" << equality << ", " << (value ? "true" : "false" )<< ")" << std::endl;
if (value) {
return d_solver.storePropagation(equality);
} else {
@@ -285,7 +233,7 @@ bool CoreSolver::NotifyClass::eqNotifyTriggerEquality(TNode equality, bool value
}
bool CoreSolver::NotifyClass::eqNotifyTriggerPredicate(TNode predicate, bool value) {
- BVDebug("bitvector::core") << "NotifyClass::eqNotifyTriggerPredicate(" << predicate << ", " << (value ? "true" : "false" ) << ")" << std::endl;
+ Debug("bitvector::core") << "NotifyClass::eqNotifyTriggerPredicate(" << predicate << ", " << (value ? "true" : "false" ) << ")" << std::endl;
if (value) {
return d_solver.storePropagation(predicate);
} else {
diff --git a/src/theory/bv/bv_subtheory_core.h b/src/theory/bv/bv_subtheory_core.h
index 1adf813ff..d5235a864 100644
--- a/src/theory/bv/bv_subtheory_core.h
+++ b/src/theory/bv/bv_subtheory_core.h
@@ -73,16 +73,17 @@ class CoreSolver : public SubtheorySolver {
Slicer* d_slicer;
context::CDO<bool> d_isCoreTheory;
- bool assertFact(TNode fact, TNode reason);
+ bool assertFactToEqualityEngine(TNode fact, TNode reason);
bool decomposeFact(TNode fact);
Node getBaseDecomposition(TNode a);
- bool addNewSplits(TNode n, Base& old_base, Base& new_base);
+ bool d_baseChanged;
+ bool d_checkCalled;
public:
- bool isCoreTheory() {return d_isCoreTheory; }
CoreSolver(context::Context* c, TheoryBV* bv, Slicer* slicer);
- void setMasterEqualityEngine(eq::EqualityEngine* eq);
+ bool isCoreTheory() { return d_isCoreTheory; }
+ void setMasterEqualityEngine(eq::EqualityEngine* eq);
void preRegister(TNode node);
- bool addAssertions(const std::vector<TNode>& assertions, Theory::Effort e);
+ bool check(Theory::Effort e);
void explain(TNode literal, std::vector<TNode>& assumptions);
void collectModelInfo(TheoryModel* m);
void addSharedTerm(TNode t) {
diff --git a/src/theory/bv/bv_subtheory_eq.cpp b/src/theory/bv/bv_subtheory_eq.cpp
index ca3e3e35c..f11b1252b 100644
--- a/src/theory/bv/bv_subtheory_eq.cpp
+++ b/src/theory/bv/bv_subtheory_eq.cpp
@@ -131,7 +131,7 @@ bool EqualitySolver::addAssertions(const std::vector<TNode>& assertions, Theory:
}
bool EqualitySolver::NotifyClass::eqNotifyTriggerEquality(TNode equality, bool value) {
- BVDebug("bitvector::equality") << "NotifyClass::eqNotifyTriggerEquality(" << equality << ", " << (value ? "true" : "false" )<< ")" << std::endl;
+ Debug("bitvector::equality") << "NotifyClass::eqNotifyTriggerEquality(" << equality << ", " << (value ? "true" : "false" )<< ")" << std::endl;
if (value) {
return d_solver.storePropagation(equality);
} else {
@@ -140,7 +140,7 @@ bool EqualitySolver::NotifyClass::eqNotifyTriggerEquality(TNode equality, bool v
}
bool EqualitySolver::NotifyClass::eqNotifyTriggerPredicate(TNode predicate, bool value) {
- BVDebug("bitvector::equality") << "NotifyClass::eqNotifyTriggerPredicate(" << predicate << ", " << (value ? "true" : "false" ) << ")" << std::endl;
+ Debug("bitvector::equality") << "NotifyClass::eqNotifyTriggerPredicate(" << predicate << ", " << (value ? "true" : "false" ) << ")" << std::endl;
if (value) {
return d_solver.storePropagation(predicate);
} else {
diff --git a/src/theory/bv/cd_set_collection.h b/src/theory/bv/cd_set_collection.h
index e4bcbca47..ec7f6d66d 100644
--- a/src/theory/bv/cd_set_collection.h
+++ b/src/theory/bv/cd_set_collection.h
@@ -71,7 +71,7 @@ class BacktrackableSetCollection {
const tree_entry_type& node = d_memory.back();
if(Debug.isOn("cd_set_collection")) {
- BVDebug("cd_set_collection") << "BacktrackableSetCollection::backtrack(): removing " << node.getValue()
+ Debug("cd_set_collection") << "BacktrackableSetCollection::backtrack(): removing " << node.getValue()
<< " from " << internalToString(getRoot(d_memory.size()-1)) << std::endl;
}
@@ -279,7 +279,7 @@ public:
// Find the biggest node smaleer than value (it must exist)
while (set != null) {
if(Debug.isOn("set_collection")) {
- BVDebug("set_collection") << "BacktrackableSetCollection::getPrev(" << toString(set) << "," << value << ")" << std::endl;
+ Debug("set_collection") << "BacktrackableSetCollection::getPrev(" << toString(set) << "," << value << ")" << std::endl;
}
const tree_entry_type& node = d_memory[set];
if (node.getValue() >= value) {
@@ -308,7 +308,7 @@ public:
// Find the smallest node bigger than value (it must exist)
while (set != null) {
if(Debug.isOn("set_collection")) {
- BVDebug("set_collection") << "BacktrackableSetCollection::getNext(" << toString(set) << "," << value << ")" << std::endl;
+ Debug("set_collection") << "BacktrackableSetCollection::getNext(" << toString(set) << "," << value << ")" << std::endl;
}
const tree_entry_type& node = d_memory[set];
if (node.getValue() <= value) {
@@ -377,7 +377,7 @@ public:
Assert(isValid(set));
if(Debug.isOn("set_collection")) {
- BVDebug("set_collection") << "BacktrackableSetCollection::getElements(" << toString(set) << "," << lowerBound << "," << upperBound << ")" << std::endl;
+ Debug("set_collection") << "BacktrackableSetCollection::getElements(" << toString(set) << "," << lowerBound << "," << upperBound << ")" << std::endl;
}
// Empty set no elements
diff --git a/src/theory/bv/slicer.cpp b/src/theory/bv/slicer.cpp
index 2334ed2b0..ac668ab20 100644
--- a/src/theory/bv/slicer.cpp
+++ b/src/theory/bv/slicer.cpp
@@ -48,6 +48,14 @@ void Base::sliceAt(Index index) {
d_repr[vector_index] = d_repr[vector_index] | bit_mask;
}
+void Base::undoSliceAt(Index index) {
+ Index vector_index = index / 32;
+ Assert (vector_index < d_size);
+ Index int_index = index % 32;
+ uint32_t bit_mask = utils::pow2(int_index);
+ d_repr[vector_index] = d_repr[vector_index] ^ bit_mask;
+}
+
void Base::sliceWith(const Base& other) {
Assert (d_size == other.d_size);
for (unsigned i = 0; i < d_repr.size(); ++i) {
@@ -245,8 +253,9 @@ void UnionFind::split(TermId id, Index i) {
if (i == 0 || i == getBitwidth(id)) {
// nothing to do
- return;
+ return;
}
+
Assert (i < getBitwidth(id));
if (!hasChildren(id)) {
// first time we split this term
@@ -417,6 +426,7 @@ void UnionFind::ensureSlicing(const ExtractTerm& term) {
}
void UnionFind::backtrack() {
+ return;
int size = d_undoStack.size();
for (int i = size; i > d_undoStackIndex.get(); --i) {
Operation op = d_undoStack.back();
@@ -443,6 +453,9 @@ void UnionFind::undoSplit(TermId id) {
}
void UnionFind::recordOperation(OperationKind op, TermId term) {
+ if (op == SPLIT) {
+ d_newSplit = true;
+ }
d_undoStackIndex.set(d_undoStackIndex.get() + 1);
d_undoStack.push_back(Operation(op, term));
Assert (d_undoStack.size() == d_undoStackIndex);
diff --git a/src/theory/bv/slicer.h b/src/theory/bv/slicer.h
index 0508c67c1..6e09d971b 100644
--- a/src/theory/bv/slicer.h
+++ b/src/theory/bv/slicer.h
@@ -47,6 +47,7 @@ namespace bv {
typedef Index TermId;
extern const TermId UndefinedId;
+class CDBase;
/**
* Base
@@ -55,9 +56,11 @@ extern const TermId UndefinedId;
class Base {
Index d_size;
std::vector<uint32_t> d_repr;
+ void undoSliceAt(Index index);
public:
Base (Index size);
- void sliceAt(Index index);
+ void sliceAt(Index index);
+
void sliceWith(const Base& other);
bool isCutPoint(Index index) const;
void diffCutPoints(const Base& other, Base& res) const;
@@ -78,6 +81,47 @@ public:
}
return true;
}
+ friend class CDBase;
+};
+
+
+class CDBase : public context::ContextNotifyObj {
+ context::Context* d_ctx;
+ context::CDO<unsigned> d_undoIndex;
+
+ std::vector<unsigned> d_undoStack;
+ Base d_base;
+ CDBase(context::Context* ctx, Index bitwidth)
+ : ContextNotifyObj(ctx),
+ d_ctx(ctx),
+ d_undoIndex(d_ctx),
+ d_undoStack(),
+ d_base(bitwidth)
+ {}
+ void sliceAt(Index i) {
+ Assert (!d_base.isCutPoint(i));
+ d_undoStack.push_back(i);
+ d_undoIndex.set(d_undoIndex.get() + 1);
+ d_base.sliceAt(i);
+ }
+ bool isCutPoint(Index i) {
+ return d_base.isCutPoint(i);
+ }
+ Index getBitwidth() const {return d_base.getBitwidth(); }
+ virtual ~CDBase() throw(AssertionException) {}
+ void contextNotifyPop() {
+ backtrack();
+ }
+
+ void backtrack() {
+ for (unsigned i = d_undoIndex.get(); i < d_undoStack.size(); ++i) {
+ Index i = d_undoStack.back();
+ d_undoStack.pop_back();
+ d_base.undoSliceAt(i);
+ }
+ Assert(d_undoIndex.get() == d_undoStack.size());
+ }
+
};
/**
@@ -227,11 +271,11 @@ class UnionFind : public context::ContextNotifyObj {
};
Statistics d_statistics;
+ bool d_newSplit;
public:
UnionFind(context::Context* ctx)
: ContextNotifyObj(ctx),
d_nodes(),
- // d_representatives(ctx),
d_undoStack(),
d_undoStackIndex(ctx),
d_statistics()
@@ -256,6 +300,8 @@ public:
void contextNotifyPop() {
backtrack();
}
+ bool hasNewSplit() { return d_newSplit; }
+ void resetNewSplit() { d_newSplit = false; }
friend class Slicer;
};
@@ -279,7 +325,9 @@ public:
bool isCoreTerm (TNode node);
Base getTopLevelBase(TNode node);
static void splitEqualities(TNode node, std::vector<Node>& equalities);
- static unsigned d_numAddedEqualities;
+ static unsigned d_numAddedEqualities;
+ inline bool hasNewSplit() { return d_unionFind.hasNewSplit(); }
+ inline void resetNewSplit() { d_unionFind.resetNewSplit(); }
};
diff --git a/src/theory/bv/theory_bv.cpp b/src/theory/bv/theory_bv.cpp
index 6248782bd..5d034287d 100644
--- a/src/theory/bv/theory_bv.cpp
+++ b/src/theory/bv/theory_bv.cpp
@@ -41,7 +41,6 @@ TheoryBV::TheoryBV(context::Context* c, context::UserContext* u, OutputChannel&
d_alreadyPropagatedSet(c),
d_sharedTermsSet(c),
d_slicer(c),
- d_bitblastAssertionsQueue(c),
d_bitblastSolver(c, this),
d_coreSolver(c, this, &d_slicer),
d_statistics(),
@@ -110,29 +109,23 @@ void TheoryBV::check(Effort e)
return;
}
- // getting the new assertions
- std::vector<TNode> new_assertions;
while (!done()) {
- Assertion assertion = get();
- TNode fact = assertion.assertion;
- new_assertions.push_back(fact);
- d_bitblastAssertionsQueue.push_back(fact);
- Debug("bitvector-assertions") << "TheoryBV::check assertion " << fact << "\n";
+ TNode fact = get().assertion;
+ d_coreSolver.assertFact(fact);
+ d_bitblastSolver.assertFact(fact);
}
+ bool ok = true;
if (!inConflict()) {
- // sending assertions to the equality solver first
- d_coreSolver.addAssertions(new_assertions, e);
+ ok = d_coreSolver.check(e);
}
+ Assert (!ok == inConflict());
if (!inConflict() && !d_coreSolver.isCoreTheory()) {
- // sending assertions to the bitblast solver if it's not just core theory
- d_bitblastSolver.addAssertions(new_assertions, e);
- } else {
- // sending assertions to the bitblast solver if it's not just core theory
- d_bitblastSolver.addAssertions(new_assertions, EFFORT_STANDARD);
+ ok = d_bitblastSolver.check(e);
}
+ Assert (!ok == inConflict());
if (inConflict()) {
sendConflict();
}
@@ -156,7 +149,10 @@ void TheoryBV::propagate(Effort e) {
bool ok = true;
for (; d_literalsToPropagateIndex < d_literalsToPropagate.size() && ok; d_literalsToPropagateIndex = d_literalsToPropagateIndex + 1) {
TNode literal = d_literalsToPropagate[d_literalsToPropagateIndex];
- ok = d_out->propagate(literal);
+ // temporary fix for incremental bit-blasting
+ if (d_valuation.isSatLiteral(literal)) {
+ ok = d_out->propagate(literal);
+ }
}
if (!ok) {
@@ -214,7 +210,7 @@ void TheoryBV::presolve() {
bool TheoryBV::storePropagation(TNode literal, SubTheory subtheory)
{
- Debug("bitvector::propagate") << indent() << "TheoryBV::storePropagation(" << literal << ", " << subtheory << ")" << std::endl;
+ Debug("bitvector::propagate") << indent() << getSatContext()->getLevel() << " " << "TheoryBV::storePropagation(" << literal << ", " << subtheory << ")" << std::endl;
// If already in conflict, no more propagation
if (d_conflict) {
diff --git a/src/theory/bv/theory_bv.h b/src/theory/bv/theory_bv.h
index ec72f40e1..3e14584ed 100644
--- a/src/theory/bv/theory_bv.h
+++ b/src/theory/bv/theory_bv.h
@@ -25,7 +25,6 @@
#include "context/cdhashset.h"
#include "theory/bv/theory_bv_utils.h"
#include "util/statistics_registry.h"
-#include "context/cdqueue.h"
#include "theory/bv/bv_subtheory.h"
#include "theory/bv/bv_subtheory_eq.h"
#include "theory/bv/bv_subtheory_core.h"
@@ -46,11 +45,8 @@ class TheoryBV : public Theory {
context::CDHashSet<Node, NodeHashFunction> d_sharedTermsSet;
Slicer d_slicer;
-
- context::CDQueue<TNode> d_bitblastAssertionsQueue;
-
BitblastSolver d_bitblastSolver;
- CoreSolver d_coreSolver;
+ CoreSolver d_coreSolver;
public:
diff --git a/src/theory/bv/theory_bv_rewrite_rules.h b/src/theory/bv/theory_bv_rewrite_rules.h
index f9650932e..bd7a8131a 100644
--- a/src/theory/bv/theory_bv_rewrite_rules.h
+++ b/src/theory/bv/theory_bv_rewrite_rules.h
@@ -334,7 +334,7 @@ public:
template<bool checkApplies>
static inline Node run(TNode node) {
if (!checkApplies || applies(node)) {
- BVDebug("theory::bv::rewrite") << "RewriteRule<" << rule << ">(" << node << ")" << std::endl;
+ Debug("theory::bv::rewrite") << "RewriteRule<" << rule << ">(" << node << ")" << std::endl;
Assert(checkApplies || applies(node));
//++ s_statistics->d_ruleApplications;
Node result = apply(node);
@@ -355,7 +355,7 @@ public:
<< CheckSatCommand(condition.toExpr());
}
}
- BVDebug("theory::bv::rewrite") << "RewriteRule<" << rule << ">(" << node << ") => " << result << std::endl;
+ Debug("theory::bv::rewrite") << "RewriteRule<" << rule << ">(" << node << ") => " << result << std::endl;
return result;
} else {
return node;
@@ -486,7 +486,7 @@ bool RewriteRule<EmptyRule>::applies(TNode node) {
template<> inline
Node RewriteRule<EmptyRule>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EmptyRule> for " << node.getKind() <<"\n";
+ Debug("bv-rewrite") << "RewriteRule<EmptyRule> for " << node.getKind() <<"\n";
Unreachable();
return node;
}
diff --git a/src/theory/bv/theory_bv_rewrite_rules_constant_evaluation.h b/src/theory/bv/theory_bv_rewrite_rules_constant_evaluation.h
index 498378638..178b17b43 100644
--- a/src/theory/bv/theory_bv_rewrite_rules_constant_evaluation.h
+++ b/src/theory/bv/theory_bv_rewrite_rules_constant_evaluation.h
@@ -37,7 +37,7 @@ bool RewriteRule<EvalAnd>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalAnd>::apply(TNode node) {
Unreachable();
- BVDebug("bv-rewrite") << "RewriteRule<EvalAnd>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalAnd>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector b = node[1].getConst<BitVector>();
BitVector res = a & b;
@@ -56,7 +56,7 @@ bool RewriteRule<EvalOr>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalOr>::apply(TNode node) {
Unreachable();
- BVDebug("bv-rewrite") << "RewriteRule<EvalOr>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalOr>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector b = node[1].getConst<BitVector>();
BitVector res = a | b;
@@ -75,7 +75,7 @@ bool RewriteRule<EvalXor>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalXor>::apply(TNode node) {
Unreachable();
- BVDebug("bv-rewrite") << "RewriteRule<EvalXor>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalXor>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector b = node[1].getConst<BitVector>();
BitVector res = a ^ b;
@@ -91,7 +91,7 @@ Node RewriteRule<EvalXor>::apply(TNode node) {
// template<> inline
// Node RewriteRule<EvalXnor>::apply(TNode node) {
-// BVDebug("bv-rewrite") << "RewriteRule<EvalXnor>(" << node << ")" << std::endl;
+// Debug("bv-rewrite") << "RewriteRule<EvalXnor>(" << node << ")" << std::endl;
// BitVector a = node[0].getConst<BitVector>();
// BitVector b = node[1].getConst<BitVector>();
// BitVector res = ~ (a ^ b);
@@ -106,7 +106,7 @@ bool RewriteRule<EvalNot>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalNot>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalNot>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalNot>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector res = ~ a;
return utils::mkConst(res);
@@ -120,7 +120,7 @@ Node RewriteRule<EvalNot>::apply(TNode node) {
// template<> inline
// Node RewriteRule<EvalComp>::apply(TNode node) {
-// BVDebug("bv-rewrite") << "RewriteRule<EvalComp>(" << node << ")" << std::endl;
+// Debug("bv-rewrite") << "RewriteRule<EvalComp>(" << node << ")" << std::endl;
// BitVector a = node[0].getConst<BitVector>();
// BitVector b = node[1].getConst<BitVector>();
// BitVector res;
@@ -141,7 +141,7 @@ bool RewriteRule<EvalMult>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalMult>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalMult>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalMult>(" << node << ")" << std::endl;
TNode::iterator child_it = node.begin();
BitVector res = (*child_it).getConst<BitVector>();
for(++child_it; child_it != node.end(); ++child_it) {
@@ -158,7 +158,7 @@ bool RewriteRule<EvalPlus>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalPlus>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalPlus>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalPlus>(" << node << ")" << std::endl;
TNode::iterator child_it = node.begin();
BitVector res = (*child_it).getConst<BitVector>();
for(++child_it; child_it != node.end(); ++child_it) {
@@ -175,7 +175,7 @@ Node RewriteRule<EvalPlus>::apply(TNode node) {
// template<> inline
// Node RewriteRule<EvalSub>::apply(TNode node) {
-// BVDebug("bv-rewrite") << "RewriteRule<EvalSub>(" << node << ")" << std::endl;
+// Debug("bv-rewrite") << "RewriteRule<EvalSub>(" << node << ")" << std::endl;
// BitVector a = node[0].getConst<BitVector>();
// BitVector b = node[1].getConst<BitVector>();
// BitVector res = a - b;
@@ -190,7 +190,7 @@ bool RewriteRule<EvalNeg>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalNeg>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalNeg>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalNeg>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector res = - a;
@@ -204,7 +204,7 @@ bool RewriteRule<EvalUdiv>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalUdiv>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalUdiv>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalUdiv>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector b = node[1].getConst<BitVector>();
BitVector res = a.unsignedDivTotal(b);
@@ -219,7 +219,7 @@ bool RewriteRule<EvalUrem>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalUrem>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalUrem>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalUrem>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector b = node[1].getConst<BitVector>();
BitVector res = a.unsignedRemTotal(b);
@@ -234,7 +234,7 @@ bool RewriteRule<EvalShl>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalShl>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalShl>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalShl>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector b = node[1].getConst<BitVector>();
@@ -250,7 +250,7 @@ bool RewriteRule<EvalLshr>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalLshr>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalLshr>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalLshr>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector b = node[1].getConst<BitVector>();
@@ -266,7 +266,7 @@ bool RewriteRule<EvalAshr>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalAshr>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalAshr>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalAshr>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector b = node[1].getConst<BitVector>();
@@ -282,7 +282,7 @@ bool RewriteRule<EvalUlt>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalUlt>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalUlt>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalUlt>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector b = node[1].getConst<BitVector>();
@@ -300,7 +300,7 @@ bool RewriteRule<EvalSlt>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalSlt>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalSlt>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalSlt>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector b = node[1].getConst<BitVector>();
@@ -319,7 +319,7 @@ bool RewriteRule<EvalUle>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalUle>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalUle>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalUle>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector b = node[1].getConst<BitVector>();
@@ -337,7 +337,7 @@ bool RewriteRule<EvalSle>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalSle>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalSle>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalSle>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector b = node[1].getConst<BitVector>();
@@ -355,7 +355,7 @@ bool RewriteRule<EvalExtract>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalExtract>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalExtract>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalExtract>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
unsigned lo = utils::getExtractLow(node);
unsigned hi = utils::getExtractHigh(node);
@@ -373,7 +373,7 @@ bool RewriteRule<EvalConcat>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalConcat>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalConcat>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalConcat>(" << node << ")" << std::endl;
unsigned num = node.getNumChildren();
BitVector res = node[0].getConst<BitVector>();
for(unsigned i = 1; i < num; ++i ) {
@@ -391,7 +391,7 @@ bool RewriteRule<EvalSignExtend>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalSignExtend>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalSignExtend>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalSignExtend>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
unsigned amount = node.getOperator().getConst<BitVectorSignExtend>().signExtendAmount;
BitVector res = a.signExtend(amount);
@@ -407,7 +407,7 @@ bool RewriteRule<EvalEquals>::applies(TNode node) {
template<> inline
Node RewriteRule<EvalEquals>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<EvalEquals>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<EvalEquals>(" << node << ")" << std::endl;
BitVector a = node[0].getConst<BitVector>();
BitVector b = node[1].getConst<BitVector>();
if (a == b) {
diff --git a/src/theory/bv/theory_bv_rewrite_rules_core.h b/src/theory/bv/theory_bv_rewrite_rules_core.h
index b44c72f74..ade345d1c 100644
--- a/src/theory/bv/theory_bv_rewrite_rules_core.h
+++ b/src/theory/bv/theory_bv_rewrite_rules_core.h
@@ -33,7 +33,7 @@ bool RewriteRule<ConcatFlatten>::applies(TNode node) {
template<> inline
Node RewriteRule<ConcatFlatten>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ConcatFlatten>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ConcatFlatten>(" << node << ")" << std::endl;
NodeBuilder<> result(kind::BITVECTOR_CONCAT);
std::vector<Node> processing_stack;
processing_stack.push_back(node);
@@ -48,7 +48,7 @@ Node RewriteRule<ConcatFlatten>::apply(TNode node) {
}
}
Node resultNode = result;
- BVDebug("bv-rewrite") << "RewriteRule<ConcatFlatten>(" << resultNode << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ConcatFlatten>(" << resultNode << ")" << std::endl;
return resultNode;
}
@@ -60,7 +60,7 @@ bool RewriteRule<ConcatExtractMerge>::applies(TNode node) {
template<> inline
Node RewriteRule<ConcatExtractMerge>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ConcatExtractMerge>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ConcatExtractMerge>(" << node << ")" << std::endl;
std::vector<Node> mergedExtracts;
@@ -121,7 +121,7 @@ bool RewriteRule<ConcatConstantMerge>::applies(TNode node) {
template<> inline
Node RewriteRule<ConcatConstantMerge>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ConcatConstantMerge>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ConcatConstantMerge>(" << node << ")" << std::endl;
std::vector<Node> mergedConstants;
for (unsigned i = 0, end = node.getNumChildren(); i < end;) {
@@ -150,7 +150,7 @@ Node RewriteRule<ConcatConstantMerge>::apply(TNode node) {
}
}
- BVDebug("bv-rewrite") << "RewriteRule<ConcatConstantMerge>(" << node << ") => " << utils::mkConcat(mergedConstants) << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ConcatConstantMerge>(" << node << ") => " << utils::mkConcat(mergedConstants) << std::endl;
return utils::mkConcat(mergedConstants);
}
@@ -168,7 +168,7 @@ bool RewriteRule<ExtractWhole>::applies(TNode node) {
template<> inline
Node RewriteRule<ExtractWhole>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ExtractWhole>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ExtractWhole>(" << node << ")" << std::endl;
return node[0];
}
@@ -181,7 +181,7 @@ bool RewriteRule<ExtractConstant>::applies(TNode node) {
template<> inline
Node RewriteRule<ExtractConstant>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ExtractConstant>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ExtractConstant>(" << node << ")" << std::endl;
Node child = node[0];
BitVector childValue = child.getConst<BitVector>();
return utils::mkConst(childValue.extract(utils::getExtractHigh(node), utils::getExtractLow(node)));
@@ -189,7 +189,7 @@ Node RewriteRule<ExtractConstant>::apply(TNode node) {
template<> inline
bool RewriteRule<ExtractConcat>::applies(TNode node) {
- //BVDebug("bv-rewrite") << "RewriteRule<ExtractConcat>(" << node << ")" << std::endl;
+ //Debug("bv-rewrite") << "RewriteRule<ExtractConcat>(" << node << ")" << std::endl;
if (node.getKind() != kind::BITVECTOR_EXTRACT) return false;
if (node[0].getKind() != kind::BITVECTOR_CONCAT) return false;
return true;
@@ -197,7 +197,7 @@ bool RewriteRule<ExtractConcat>::applies(TNode node) {
template<> inline
Node RewriteRule<ExtractConcat>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ExtractConcat>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ExtractConcat>(" << node << ")" << std::endl;
int extract_high = utils::getExtractHigh(node);
int extract_low = utils::getExtractLow(node);
@@ -230,7 +230,7 @@ bool RewriteRule<ExtractExtract>::applies(TNode node) {
template<> inline
Node RewriteRule<ExtractExtract>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ExtractExtract>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ExtractExtract>(" << node << ")" << std::endl;
// x[i:j][k:l] ~> x[k+j:l+j]
Node child = node[0];
@@ -244,7 +244,7 @@ Node RewriteRule<ExtractExtract>::apply(TNode node) {
template<> inline
bool RewriteRule<FailEq>::applies(TNode node) {
- //BVDebug("bv-rewrite") << "RewriteRule<FailEq>(" << node << ")" << std::endl;
+ //Debug("bv-rewrite") << "RewriteRule<FailEq>(" << node << ")" << std::endl;
if (node.getKind() != kind::EQUAL) return false;
if (node[0].getKind() != kind::CONST_BITVECTOR) return false;
if (node[1].getKind() != kind::CONST_BITVECTOR) return false;
@@ -264,7 +264,7 @@ bool RewriteRule<SimplifyEq>::applies(TNode node) {
template<> inline
Node RewriteRule<SimplifyEq>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<SimplifyEq>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<SimplifyEq>(" << node << ")" << std::endl;
return utils::mkTrue();
}
@@ -275,7 +275,7 @@ bool RewriteRule<ReflexivityEq>::applies(TNode node) {
template<> inline
Node RewriteRule<ReflexivityEq>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ReflexivityEq>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ReflexivityEq>(" << node << ")" << std::endl;
return node[1].eqNode(node[0]);
}
diff --git a/src/theory/bv/theory_bv_rewrite_rules_normalization.h b/src/theory/bv/theory_bv_rewrite_rules_normalization.h
index 6b3d0f770..39f55f26c 100644
--- a/src/theory/bv/theory_bv_rewrite_rules_normalization.h
+++ b/src/theory/bv/theory_bv_rewrite_rules_normalization.h
@@ -41,7 +41,7 @@ bool RewriteRule<ExtractBitwise>::applies(TNode node) {
template<> inline
Node RewriteRule<ExtractBitwise>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ExtractBitwise>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ExtractBitwise>(" << node << ")" << std::endl;
unsigned high = utils::getExtractHigh(node);
unsigned low = utils::getExtractLow(node);
std::vector<Node> children;
@@ -65,7 +65,7 @@ bool RewriteRule<ExtractNot>::applies(TNode node) {
template<> inline
Node RewriteRule<ExtractNot>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ExtractNot>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ExtractNot>(" << node << ")" << std::endl;
unsigned low = utils::getExtractLow(node);
unsigned high = utils::getExtractHigh(node);
Node a = utils::mkExtract(node[0][0], high, low);
@@ -88,7 +88,7 @@ bool RewriteRule<ExtractArith>::applies(TNode node) {
template<> inline
Node RewriteRule<ExtractArith>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ExtractArith>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ExtractArith>(" << node << ")" << std::endl;
unsigned low = utils::getExtractLow(node);
Assert (low == 0);
unsigned high = utils::getExtractHigh(node);
@@ -117,7 +117,7 @@ bool RewriteRule<ExtractArith2>::applies(TNode node) {
template<> inline
Node RewriteRule<ExtractArith2>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ExtractArith2>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ExtractArith2>(" << node << ")" << std::endl;
unsigned low = utils::getExtractLow(node);
unsigned high = utils::getExtractHigh(node);
std::vector<Node> children;
@@ -151,7 +151,7 @@ bool RewriteRule<FlattenAssocCommut>::applies(TNode node) {
template<> inline
Node RewriteRule<FlattenAssocCommut>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<FlattenAssocCommut>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<FlattenAssocCommut>(" << node << ")" << std::endl;
std::vector<Node> processingStack;
processingStack.push_back(node);
std::vector<Node> children;
@@ -291,7 +291,7 @@ bool RewriteRule<PlusCombineLikeTerms>::applies(TNode node) {
template<> inline
Node RewriteRule<PlusCombineLikeTerms>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<PlusCombineLikeTerms>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<PlusCombineLikeTerms>(" << node << ")" << std::endl;
unsigned size = utils::getSize(node);
BitVector constSum(size, (unsigned)0);
std::map<Node, BitVector> factorToCoefficient;
@@ -348,7 +348,7 @@ bool RewriteRule<MultSimplify>::applies(TNode node) {
template<> inline
Node RewriteRule<MultSimplify>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<MultSimplify>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<MultSimplify>(" << node << ")" << std::endl;
unsigned size = utils::getSize(node);
BitVector constant(size, Integer(1));
@@ -397,7 +397,7 @@ bool RewriteRule<MultDistribConst>::applies(TNode node) {
template<> inline
Node RewriteRule<MultDistribConst>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<MultDistribConst>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<MultDistribConst>(" << node << ")" << std::endl;
TNode constant = node[1];
TNode factor = node[0];
@@ -434,7 +434,7 @@ bool RewriteRule<SolveEq>::applies(TNode node) {
// Doesn't do full solving (yet), instead, if a term appears both on lhs and rhs, it subtracts from both sides so that one side's coeff is zero
template<> inline
Node RewriteRule<SolveEq>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<SolveEq>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<SolveEq>(" << node << ")" << std::endl;
TNode left = node[0];
TNode right = node[1];
@@ -662,7 +662,7 @@ static inline Node mkNodeKind(Kind k, TNode node, TNode c) {
template<> inline
Node RewriteRule<BitwiseEq>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<BitwiseEq>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<BitwiseEq>(" << node << ")" << std::endl;
TNode term;
BitVector c;
@@ -745,7 +745,7 @@ bool RewriteRule<NegMult>::applies(TNode node) {
template<> inline
Node RewriteRule<NegMult>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<NegMult>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<NegMult>(" << node << ")" << std::endl;
TNode mult = node[0];
NodeBuilder<> nb(kind::BITVECTOR_MULT);
BitVector bv(utils::getSize(node), (unsigned)1);
@@ -767,7 +767,7 @@ bool RewriteRule<NegSub>::applies(TNode node) {
template<> inline
Node RewriteRule<NegSub>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<NegSub>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<NegSub>(" << node << ")" << std::endl;
return utils::mkNode(kind::BITVECTOR_SUB, node[0][1], node[0][0]);
}
@@ -779,7 +779,7 @@ bool RewriteRule<NegPlus>::applies(TNode node) {
template<> inline
Node RewriteRule<NegPlus>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<NegPlus>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<NegPlus>(" << node << ")" << std::endl;
std::vector<Node> children;
for (unsigned i = 0; i < node[0].getNumChildren(); ++i) {
children.push_back(utils::mkNode(kind::BITVECTOR_NEG, node[0][i]));
@@ -820,7 +820,7 @@ bool RewriteRule<AndSimplify>::applies(TNode node) {
template<> inline
Node RewriteRule<AndSimplify>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<AndSimplify>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<AndSimplify>(" << node << ")" << std::endl;
// this will remove duplicates
std::hash_map<TNode, Count, TNodeHashFunction> subterms;
@@ -883,7 +883,7 @@ bool RewriteRule<OrSimplify>::applies(TNode node) {
template<> inline
Node RewriteRule<OrSimplify>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<OrSimplify>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<OrSimplify>(" << node << ")" << std::endl;
// this will remove duplicates
std::hash_map<TNode, Count, TNodeHashFunction> subterms;
@@ -946,7 +946,7 @@ bool RewriteRule<XorSimplify>::applies(TNode node) {
template<> inline
Node RewriteRule<XorSimplify>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<XorSimplify>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<XorSimplify>(" << node << ")" << std::endl;
std::hash_map<TNode, Count, TNodeHashFunction> subterms;
@@ -1041,7 +1041,7 @@ Node RewriteRule<XorSimplify>::apply(TNode node) {
// template<> inline
// Node RewriteRule<AndSimplify>::apply(TNode node) {
-// BVDebug("bv-rewrite") << "RewriteRule<AndSimplify>(" << node << ")" << std::endl;
+// Debug("bv-rewrite") << "RewriteRule<AndSimplify>(" << node << ")" << std::endl;
// return resultNode;
// }
@@ -1053,7 +1053,7 @@ Node RewriteRule<XorSimplify>::apply(TNode node) {
// template<> inline
// Node RewriteRule<>::apply(TNode node) {
-// BVDebug("bv-rewrite") << "RewriteRule<>(" << node << ")" << std::endl;
+// Debug("bv-rewrite") << "RewriteRule<>(" << node << ")" << std::endl;
// return resultNode;
// }
diff --git a/src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h b/src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h
index 94983e03a..4202f8c2e 100644
--- a/src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h
+++ b/src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h
@@ -33,7 +33,7 @@ bool RewriteRule<UgtEliminate>::applies(TNode node) {
template<>
Node RewriteRule<UgtEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<UgtEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<UgtEliminate>(" << node << ")" << std::endl;
TNode a = node[0];
TNode b = node[1];
Node result = utils::mkNode(kind::BITVECTOR_ULT, b, a);
@@ -48,7 +48,7 @@ bool RewriteRule<UgeEliminate>::applies(TNode node) {
template<>
Node RewriteRule<UgeEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<UgeEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<UgeEliminate>(" << node << ")" << std::endl;
TNode a = node[0];
TNode b = node[1];
Node result = utils::mkNode(kind::BITVECTOR_ULE, b, a);
@@ -63,7 +63,7 @@ bool RewriteRule<SgtEliminate>::applies(TNode node) {
template<>
Node RewriteRule<SgtEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<SgtEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<SgtEliminate>(" << node << ")" << std::endl;
TNode a = node[0];
TNode b = node[1];
Node result = utils::mkNode(kind::BITVECTOR_SLT, b, a);
@@ -78,7 +78,7 @@ bool RewriteRule<SgeEliminate>::applies(TNode node) {
template<>
Node RewriteRule<SgeEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<SgeEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<SgeEliminate>(" << node << ")" << std::endl;
TNode a = node[0];
TNode b = node[1];
Node result = utils::mkNode(kind::BITVECTOR_SLE, b, a);
@@ -92,7 +92,7 @@ bool RewriteRule<SltEliminate>::applies(TNode node) {
template <>
Node RewriteRule<SltEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<SltEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<SltEliminate>(" << node << ")" << std::endl;
unsigned size = utils::getSize(node[0]);
Node pow_two = utils::mkConst(BitVector(size, Integer(1).multiplyByPow2(size - 1)));
@@ -110,7 +110,7 @@ bool RewriteRule<SleEliminate>::applies(TNode node) {
template <>
Node RewriteRule<SleEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<SleEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<SleEliminate>(" << node << ")" << std::endl;
unsigned size = utils::getSize(node[0]);
Node pow_two = utils::mkConst(BitVector(size, Integer(1).multiplyByPow2(size - 1)));
@@ -128,7 +128,7 @@ bool RewriteRule<CompEliminate>::applies(TNode node) {
template <>
Node RewriteRule<CompEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<CompEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<CompEliminate>(" << node << ")" << std::endl;
Node comp = utils::mkNode(kind::EQUAL, node[0], node[1]);
Node one = utils::mkConst(1, 1);
Node zero = utils::mkConst(1, 0);
@@ -143,7 +143,7 @@ bool RewriteRule<SubEliminate>::applies(TNode node) {
template <>
Node RewriteRule<SubEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<SubEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<SubEliminate>(" << node << ")" << std::endl;
Node negb = utils::mkNode(kind::BITVECTOR_NEG, node[1]);
Node a = node[0];
@@ -158,7 +158,7 @@ bool RewriteRule<RepeatEliminate>::applies(TNode node) {
template<>
Node RewriteRule<RepeatEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<RepeatEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<RepeatEliminate>(" << node << ")" << std::endl;
TNode a = node[0];
unsigned amount = node.getOperator().getConst<BitVectorRepeat>().repeatAmount;
Assert(amount >= 1);
@@ -180,7 +180,7 @@ bool RewriteRule<RotateLeftEliminate>::applies(TNode node) {
template<>
Node RewriteRule<RotateLeftEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<RotateLeftEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<RotateLeftEliminate>(" << node << ")" << std::endl;
TNode a = node[0];
unsigned amount = node.getOperator().getConst<BitVectorRotateLeft>().rotateLeftAmount;
amount = amount % utils::getSize(a);
@@ -202,7 +202,7 @@ bool RewriteRule<RotateRightEliminate>::applies(TNode node) {
template<>
Node RewriteRule<RotateRightEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<RotateRightEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<RotateRightEliminate>(" << node << ")" << std::endl;
TNode a = node[0];
unsigned amount = node.getOperator().getConst<BitVectorRotateRight>().rotateRightAmount;
amount = amount % utils::getSize(a);
@@ -225,7 +225,7 @@ bool RewriteRule<NandEliminate>::applies(TNode node) {
template<>
Node RewriteRule<NandEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<NandEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<NandEliminate>(" << node << ")" << std::endl;
TNode a = node[0];
TNode b = node[1];
Node andNode = utils::mkNode(kind::BITVECTOR_AND, a, b);
@@ -241,7 +241,7 @@ bool RewriteRule<NorEliminate>::applies(TNode node) {
template<>
Node RewriteRule<NorEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<NorEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<NorEliminate>(" << node << ")" << std::endl;
TNode a = node[0];
TNode b = node[1];
Node orNode = utils::mkNode(kind::BITVECTOR_OR, a, b);
@@ -257,7 +257,7 @@ bool RewriteRule<XnorEliminate>::applies(TNode node) {
template<>
Node RewriteRule<XnorEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<XnorEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<XnorEliminate>(" << node << ")" << std::endl;
TNode a = node[0];
TNode b = node[1];
Node xorNode = utils::mkNode(kind::BITVECTOR_XOR, a, b);
@@ -272,7 +272,7 @@ bool RewriteRule<SdivEliminate>::applies(TNode node) {
template<>
Node RewriteRule<SdivEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<SdivEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<SdivEliminate>(" << node << ")" << std::endl;
TNode a = node[0];
TNode b = node[1];
@@ -301,7 +301,7 @@ bool RewriteRule<SremEliminate>::applies(TNode node) {
template<>
Node RewriteRule<SremEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<SremEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<SremEliminate>(" << node << ")" << std::endl;
TNode a = node[0];
TNode b = node[1];
unsigned size = utils::getSize(a);
@@ -327,7 +327,7 @@ bool RewriteRule<SmodEliminate>::applies(TNode node) {
template<>
Node RewriteRule<SmodEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<SmodEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<SmodEliminate>(" << node << ")" << std::endl;
TNode s = node[0];
TNode t = node[1];
unsigned size = utils::getSize(s);
@@ -382,7 +382,7 @@ bool RewriteRule<ZeroExtendEliminate>::applies(TNode node) {
template<>
Node RewriteRule<ZeroExtendEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ZeroExtendEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ZeroExtendEliminate>(" << node << ")" << std::endl;
TNode bv = node[0];
unsigned amount = node.getOperator().getConst<BitVectorZeroExtend>().zeroExtendAmount;
@@ -402,7 +402,7 @@ bool RewriteRule<SignExtendEliminate>::applies(TNode node) {
template<>
Node RewriteRule<SignExtendEliminate>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<SignExtendEliminate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<SignExtendEliminate>(" << node << ")" << std::endl;
unsigned amount = node.getOperator().getConst<BitVectorSignExtend>().signExtendAmount;
if(amount == 0) {
diff --git a/src/theory/bv/theory_bv_rewrite_rules_simplification.h b/src/theory/bv/theory_bv_rewrite_rules_simplification.h
index 8bcc64414..9d1cafab9 100644
--- a/src/theory/bv/theory_bv_rewrite_rules_simplification.h
+++ b/src/theory/bv/theory_bv_rewrite_rules_simplification.h
@@ -43,7 +43,7 @@ bool RewriteRule<ShlByConst>::applies(TNode node) {
template<> inline
Node RewriteRule<ShlByConst>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ShlByConst>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ShlByConst>(" << node << ")" << std::endl;
Integer amount = node[1].getConst<BitVector>().toInteger();
Node a = node[0];
@@ -79,7 +79,7 @@ bool RewriteRule<LshrByConst>::applies(TNode node) {
template<> inline
Node RewriteRule<LshrByConst>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<LshrByConst>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<LshrByConst>(" << node << ")" << std::endl;
Integer amount = node[1].getConst<BitVector>().toInteger();
Node a = node[0];
@@ -115,7 +115,7 @@ bool RewriteRule<AshrByConst>::applies(TNode node) {
template<> inline
Node RewriteRule<AshrByConst>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<AshrByConst>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<AshrByConst>(" << node << ")" << std::endl;
Integer amount = node[1].getConst<BitVector>().toInteger();
Node a = node[0];
@@ -160,7 +160,7 @@ bool RewriteRule<BitwiseIdemp>::applies(TNode node) {
template<> inline
Node RewriteRule<BitwiseIdemp>::apply(TNode node) {
Unreachable();
- BVDebug("bv-rewrite") << "RewriteRule<BitwiseIdemp>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<BitwiseIdemp>(" << node << ")" << std::endl;
return node[0];
}
@@ -183,7 +183,7 @@ bool RewriteRule<AndZero>::applies(TNode node) {
template<> inline
Node RewriteRule<AndZero>::apply(TNode node) {
Unreachable();
- BVDebug("bv-rewrite") << "RewriteRule<AndZero>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<AndZero>(" << node << ")" << std::endl;
return utils::mkConst(utils::getSize(node), 0);
}
@@ -207,7 +207,7 @@ bool RewriteRule<AndOne>::applies(TNode node) {
template<> inline
Node RewriteRule<AndOne>::apply(TNode node) {
Unreachable();
- BVDebug("bv-rewrite") << "RewriteRule<AndOne>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<AndOne>(" << node << ")" << std::endl;
unsigned size = utils::getSize(node);
if (node[0] == utils::mkOnes(size)) {
@@ -237,7 +237,7 @@ bool RewriteRule<OrZero>::applies(TNode node) {
template<> inline
Node RewriteRule<OrZero>::apply(TNode node) {
Unreachable();
- BVDebug("bv-rewrite") << "RewriteRule<OrZero>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<OrZero>(" << node << ")" << std::endl;
unsigned size = utils::getSize(node);
if (node[0] == utils::mkConst(size, 0)) {
@@ -268,7 +268,7 @@ bool RewriteRule<OrOne>::applies(TNode node) {
template<> inline
Node RewriteRule<OrOne>::apply(TNode node) {
Unreachable();
- BVDebug("bv-rewrite") << "RewriteRule<OrOne>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<OrOne>(" << node << ")" << std::endl;
return utils::mkOnes(utils::getSize(node));
}
@@ -290,7 +290,7 @@ bool RewriteRule<XorDuplicate>::applies(TNode node) {
template<> inline
Node RewriteRule<XorDuplicate>::apply(TNode node) {
Unreachable();
- BVDebug("bv-rewrite") << "RewriteRule<XorDuplicate>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<XorDuplicate>(" << node << ")" << std::endl;
return utils::mkConst(BitVector(utils::getSize(node), Integer(0)));
}
@@ -316,7 +316,7 @@ bool RewriteRule<XorOne>::applies(TNode node) {
template<> inline
Node RewriteRule<XorOne>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<XorOne>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<XorOne>(" << node << ")" << std::endl;
Node ones = utils::mkOnes(utils::getSize(node));
std::vector<Node> children;
bool found_ones = false;
@@ -360,7 +360,7 @@ bool RewriteRule<XorZero>::applies(TNode node) {
template<> inline
Node RewriteRule<XorZero>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<XorZero>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<XorZero>(" << node << ")" << std::endl;
std::vector<Node> children;
Node zero = utils::mkConst(utils::getSize(node), 0);
@@ -393,7 +393,7 @@ bool RewriteRule<BitwiseNotAnd>::applies(TNode node) {
template<> inline
Node RewriteRule<BitwiseNotAnd>::apply(TNode node) {
Unreachable();
- BVDebug("bv-rewrite") << "RewriteRule<BitwiseNegAnd>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<BitwiseNegAnd>(" << node << ")" << std::endl;
return utils::mkConst(BitVector(utils::getSize(node), Integer(0)));
}
@@ -415,7 +415,7 @@ bool RewriteRule<BitwiseNotOr>::applies(TNode node) {
template<> inline
Node RewriteRule<BitwiseNotOr>::apply(TNode node) {
Unreachable();
- BVDebug("bv-rewrite") << "RewriteRule<BitwiseNotOr>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<BitwiseNotOr>(" << node << ")" << std::endl;
uint32_t size = utils::getSize(node);
Integer ones = Integer(1).multiplyByPow2(size) - 1;
return utils::mkConst(BitVector(size, ones));
@@ -435,7 +435,7 @@ bool RewriteRule<XorNot>::applies(TNode node) {
template<> inline
Node RewriteRule<XorNot>::apply(TNode node) {
Unreachable();
- BVDebug("bv-rewrite") << "RewriteRule<XorNot>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<XorNot>(" << node << ")" << std::endl;
Node a = node[0][0];
Node b = node[1][0];
return utils::mkNode(kind::BITVECTOR_XOR, a, b);
@@ -455,7 +455,7 @@ bool RewriteRule<NotXor>::applies(TNode node) {
template<> inline
Node RewriteRule<NotXor>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<NotXor>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<NotXor>(" << node << ")" << std::endl;
std::vector<Node> children;
TNode::iterator child_it = node[0].begin();
children.push_back(utils::mkNode(kind::BITVECTOR_NOT, *child_it));
@@ -479,7 +479,7 @@ bool RewriteRule<NotIdemp>::applies(TNode node) {
template<> inline
Node RewriteRule<NotIdemp>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<XorIdemp>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<XorIdemp>(" << node << ")" << std::endl;
return node[0][0];
}
@@ -500,7 +500,7 @@ bool RewriteRule<LtSelf>::applies(TNode node) {
template<> inline
Node RewriteRule<LtSelf>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<LtSelf>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<LtSelf>(" << node << ")" << std::endl;
return utils::mkFalse();
}
@@ -519,7 +519,7 @@ bool RewriteRule<LteSelf>::applies(TNode node) {
template<> inline
Node RewriteRule<LteSelf>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<LteSelf>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<LteSelf>(" << node << ")" << std::endl;
return utils::mkTrue();
}
@@ -537,7 +537,7 @@ bool RewriteRule<UltZero>::applies(TNode node) {
template<> inline
Node RewriteRule<UltZero>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<UltZero>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<UltZero>(" << node << ")" << std::endl;
return utils::mkFalse();
}
@@ -555,7 +555,7 @@ bool RewriteRule<UltSelf>::applies(TNode node) {
template<> inline
Node RewriteRule<UltSelf>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<UltSelf>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<UltSelf>(" << node << ")" << std::endl;
return utils::mkFalse();
}
@@ -574,7 +574,7 @@ bool RewriteRule<UleZero>::applies(TNode node) {
template<> inline
Node RewriteRule<UleZero>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<UleZero>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<UleZero>(" << node << ")" << std::endl;
return utils::mkNode(kind::EQUAL, node[0], node[1]);
}
@@ -592,7 +592,7 @@ bool RewriteRule<UleSelf>::applies(TNode node) {
template<> inline
Node RewriteRule<UleSelf>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<UleSelf>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<UleSelf>(" << node << ")" << std::endl;
return utils::mkTrue();
}
@@ -611,7 +611,7 @@ bool RewriteRule<ZeroUle>::applies(TNode node) {
template<> inline
Node RewriteRule<ZeroUle>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ZeroUle>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ZeroUle>(" << node << ")" << std::endl;
return utils::mkTrue();
}
@@ -634,7 +634,7 @@ bool RewriteRule<UleMax>::applies(TNode node) {
template<> inline
Node RewriteRule<UleMax>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<UleMax>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<UleMax>(" << node << ")" << std::endl;
return utils::mkTrue();
}
@@ -652,7 +652,7 @@ bool RewriteRule<NotUlt>::applies(TNode node) {
template<> inline
Node RewriteRule<NotUlt>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<NotUlt>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<NotUlt>(" << node << ")" << std::endl;
Node ult = node[0];
Node a = ult[0];
Node b = ult[1];
@@ -673,7 +673,7 @@ bool RewriteRule<NotUle>::applies(TNode node) {
template<> inline
Node RewriteRule<NotUle>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<NotUle>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<NotUle>(" << node << ")" << std::endl;
Node ult = node[0];
Node a = ult[0];
Node b = ult[1];
@@ -701,7 +701,7 @@ bool RewriteRule<MultPow2>::applies(TNode node) {
template<> inline
Node RewriteRule<MultPow2>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<MultPow2>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<MultPow2>(" << node << ")" << std::endl;
std::vector<Node> children;
unsigned exponent = 0;
@@ -736,7 +736,7 @@ bool RewriteRule<NegIdemp>::applies(TNode node) {
template<> inline
Node RewriteRule<NegIdemp>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<NegIdemp>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<NegIdemp>(" << node << ")" << std::endl;
return node[0][0];
}
@@ -754,7 +754,7 @@ bool RewriteRule<UdivPow2>::applies(TNode node) {
template<> inline
Node RewriteRule<UdivPow2>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<UdivPow2>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<UdivPow2>(" << node << ")" << std::endl;
Node a = node[0];
unsigned power = utils::isPow2Const(node[1]) -1;
@@ -778,7 +778,7 @@ bool RewriteRule<UdivOne>::applies(TNode node) {
template<> inline
Node RewriteRule<UdivOne>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<UdivOne>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<UdivOne>(" << node << ")" << std::endl;
return node[0];
}
@@ -796,7 +796,7 @@ bool RewriteRule<UdivSelf>::applies(TNode node) {
template<> inline
Node RewriteRule<UdivSelf>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<UdivSelf>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<UdivSelf>(" << node << ")" << std::endl;
return utils::mkConst(utils::getSize(node), 1);
}
@@ -814,7 +814,7 @@ bool RewriteRule<UremPow2>::applies(TNode node) {
template<> inline
Node RewriteRule<UremPow2>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<UremPow2>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<UremPow2>(" << node << ")" << std::endl;
TNode a = node[0];
unsigned power = utils::isPow2Const(node[1]) - 1;
if (power == 0) {
@@ -839,7 +839,7 @@ bool RewriteRule<UremOne>::applies(TNode node) {
template<> inline
Node RewriteRule<UremOne>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<UremOne>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<UremOne>(" << node << ")" << std::endl;
return utils::mkConst(utils::getSize(node), 0);
}
@@ -857,7 +857,7 @@ bool RewriteRule<UremSelf>::applies(TNode node) {
template<> inline
Node RewriteRule<UremSelf>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<UremSelf>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<UremSelf>(" << node << ")" << std::endl;
return utils::mkConst(utils::getSize(node), 0);
}
@@ -877,7 +877,7 @@ bool RewriteRule<ShiftZero>::applies(TNode node) {
template<> inline
Node RewriteRule<ShiftZero>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<ShiftZero>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<ShiftZero>(" << node << ")" << std::endl;
return node[0];
}
@@ -905,7 +905,7 @@ bool RewriteRule<BBPlusNeg>::applies(TNode node) {
template<> inline
Node RewriteRule<BBPlusNeg>::apply(TNode node) {
- BVDebug("bv-rewrite") << "RewriteRule<BBPlusNeg>(" << node << ")" << std::endl;
+ Debug("bv-rewrite") << "RewriteRule<BBPlusNeg>(" << node << ")" << std::endl;
std::vector<Node> children;
unsigned neg_count = 0;
@@ -944,7 +944,7 @@ Node RewriteRule<BBPlusNeg>::apply(TNode node) {
// template<> inline
// Node RewriteRule<BBFactorOut>::apply(TNode node) {
-// BVDebug("bv-rewrite") << "RewriteRule<BBFactorOut>(" << node << ")" << std::endl;
+// Debug("bv-rewrite") << "RewriteRule<BBFactorOut>(" << node << ")" << std::endl;
// std::hash_set<TNode, TNodeHashFunction> factors;
// for (unsigned i = 0; i < node.getNumChildren(); ++i) {
@@ -980,7 +980,7 @@ Node RewriteRule<BBPlusNeg>::apply(TNode node) {
// template<> inline
// Node RewriteRule<>::apply(TNode node) {
-// BVDebug("bv-rewrite") << "RewriteRule<>(" << node << ")" << std::endl;
+// Debug("bv-rewrite") << "RewriteRule<>(" << node << ")" << std::endl;
// return ;
// }
diff --git a/src/theory/bv/theory_bv_utils.h b/src/theory/bv/theory_bv_utils.h
index f87163e37..e5a7bbb84 100644
--- a/src/theory/bv/theory_bv_utils.h
+++ b/src/theory/bv/theory_bv_utils.h
@@ -24,12 +24,6 @@
#include <sstream>
#include "expr/node_manager.h"
-#ifdef CVC4_DEBUG
-#define BVDebug(x) Debug(x)
-#else
-#define BVDebug(x) if (false) Debug(x)
-#endif
-
namespace CVC4 {
diff --git a/src/theory/datatypes/theory_datatypes_type_rules.h b/src/theory/datatypes/theory_datatypes_type_rules.h
index ade9ffc26..9b4f24566 100644
--- a/src/theory/datatypes/theory_datatypes_type_rules.h
+++ b/src/theory/datatypes/theory_datatypes_type_rules.h
@@ -285,7 +285,7 @@ struct TupleSelectTypeRule {
const TupleSelect& ts = n.getOperator().getConst<TupleSelect>();
TypeNode tupleType = n[0].getType(check);
if(!tupleType.isTuple()) {
- if(!tupleType.hasAttribute(expr::DatatypeRecordAttr())) {
+ if(!tupleType.hasAttribute(expr::DatatypeTupleAttr())) {
throw TypeCheckingExceptionPrivate(n, "Tuple-select expression formed over non-tuple");
}
tupleType = tupleType.getAttribute(expr::DatatypeTupleAttr());
@@ -309,7 +309,7 @@ struct TupleUpdateTypeRule {
TypeNode newValue = n[1].getType(check);
if(check) {
if(!tupleType.isTuple()) {
- if(!tupleType.hasAttribute(expr::DatatypeRecordAttr())) {
+ if(!tupleType.hasAttribute(expr::DatatypeTupleAttr())) {
throw TypeCheckingExceptionPrivate(n, "Tuple-update expression formed over non-tuple");
}
tupleType = tupleType.getAttribute(expr::DatatypeTupleAttr());
diff --git a/src/theory/datatypes/type_enumerator.h b/src/theory/datatypes/type_enumerator.h
index 2a14d7fba..2a74f6d15 100644
--- a/src/theory/datatypes/type_enumerator.h
+++ b/src/theory/datatypes/type_enumerator.h
@@ -92,23 +92,21 @@ public:
newEnumerators();
}
- DatatypesEnumerator(const DatatypesEnumerator& other) :
- TypeEnumeratorBase<DatatypesEnumerator>(other.getType()),
- d_datatype(other.d_datatype),
- d_ctor(other.d_ctor),
- d_zeroCtor(other.d_zeroCtor),
+ DatatypesEnumerator(const DatatypesEnumerator& de) throw() :
+ TypeEnumeratorBase<DatatypesEnumerator>(de.getType()),
+ d_datatype(de.d_datatype),
+ d_ctor(de.d_ctor),
+ d_zeroCtor(de.d_zeroCtor),
d_argEnumerators(NULL) {
-
- if (other.d_argEnumerators != NULL) {
- d_argEnumerators = new TypeEnumerator*[d_datatype[d_ctor].getNumArgs()];
+
+ if(de.d_argEnumerators != NULL) {
+ newEnumerators();
for(size_t a = 0; a < d_datatype[d_ctor].getNumArgs(); ++a) {
- if (other.d_argEnumerators[a] != NULL) {
- d_argEnumerators[a] = new TypeEnumerator(*other.d_argEnumerators[a]);
- } else {
- d_argEnumerators[a] = NULL;
+ if(de.d_argEnumerators[a] != NULL) {
+ d_argEnumerators[a] = new TypeEnumerator(*de.d_argEnumerators[a]);
}
- }
- }
+ }
+ }
}
~DatatypesEnumerator() throw() {
@@ -139,11 +137,10 @@ public:
DatatypesEnumerator& operator++() throw() {
if(d_ctor < d_datatype.getNumConstructors()) {
for(size_t a = d_datatype[d_ctor].getNumArgs(); a > 0; --a) {
- try {
- *++*d_argEnumerators[a - 1];
- return *this;
- } catch(NoMoreValuesException&) {
+ if((++*d_argEnumerators[a - 1]).isFinished()) {
*d_argEnumerators[a - 1] = TypeEnumerator(Node::fromExpr(d_datatype[d_ctor][a - 1].getSelector()).getType()[1]);
+ } else {
+ return *this;
}
}
@@ -175,6 +172,14 @@ public:
class TupleEnumerator : public TypeEnumeratorBase<TupleEnumerator> {
TypeEnumerator** d_enumerators;
+ /** Allocate and initialize the delegate enumerators */
+ void newEnumerators() {
+ d_enumerators = new TypeEnumerator*[getType().getNumChildren()];
+ for(size_t i = 0; i < getType().getNumChildren(); ++i) {
+ d_enumerators[i] = NULL;
+ }
+ }
+
void deleteEnumerators() throw() {
if(d_enumerators != NULL) {
for(size_t i = 0; i < getType().getNumChildren(); ++i) {
@@ -190,9 +195,20 @@ public:
TupleEnumerator(TypeNode type) throw() :
TypeEnumeratorBase<TupleEnumerator>(type) {
Assert(type.isTuple());
- d_enumerators = new TypeEnumerator*[type.getNumChildren()];
- for(size_t i = 0; i < type.getNumChildren(); ++i) {
- d_enumerators[i] = new TypeEnumerator(type[i]);
+ newEnumerators();
+ }
+
+ TupleEnumerator(const TupleEnumerator& te) throw() :
+ TypeEnumeratorBase<TupleEnumerator>(te.getType()),
+ d_enumerators(NULL) {
+
+ if(te.d_enumerators != NULL) {
+ newEnumerators();
+ for(size_t i = 0; i < getType().getNumChildren(); ++i) {
+ if(te.d_enumerators[i] != NULL) {
+ d_enumerators[i] = new TypeEnumerator(*te.d_enumerators[i]);
+ }
+ }
}
}
@@ -241,9 +257,19 @@ public:
class RecordEnumerator : public TypeEnumeratorBase<RecordEnumerator> {
TypeEnumerator** d_enumerators;
+ /** Allocate and initialize the delegate enumerators */
+ void newEnumerators() {
+ const Record& rec = getType().getConst<Record>();
+ d_enumerators = new TypeEnumerator*[rec.getNumFields()];
+ for(size_t i = 0; i < rec.getNumFields(); ++i) {
+ d_enumerators[i] = new TypeEnumerator(TypeNode::fromType(rec[i].second));
+ }
+ }
+
void deleteEnumerators() throw() {
if(d_enumerators != NULL) {
- for(size_t i = 0; i < getType().getNumChildren(); ++i) {
+ const Record& rec = getType().getConst<Record>();
+ for(size_t i = 0; i < rec.getNumFields(); ++i) {
delete d_enumerators[i];
}
delete [] d_enumerators;
@@ -256,12 +282,20 @@ public:
RecordEnumerator(TypeNode type) throw() :
TypeEnumeratorBase<RecordEnumerator>(type) {
Assert(type.isRecord());
- const Record& rec = getType().getConst<Record>();
- Debug("te") << "creating record enumerator for " << type << std::endl;
- d_enumerators = new TypeEnumerator*[rec.getNumFields()];
- for(size_t i = 0; i < rec.getNumFields(); ++i) {
- Debug("te") << " - sub-enumerator for " << rec[i].second << std::endl;
- d_enumerators[i] = new TypeEnumerator(TypeNode::fromType(rec[i].second));
+ newEnumerators();
+ }
+
+ RecordEnumerator(const RecordEnumerator& re) throw() :
+ TypeEnumeratorBase<RecordEnumerator>(re.getType()),
+ d_enumerators(NULL) {
+
+ if(re.d_enumerators != NULL) {
+ newEnumerators();
+ for(size_t i = 0; i < getType().getNumChildren(); ++i) {
+ if(re.d_enumerators[i] != NULL) {
+ d_enumerators[i] = new TypeEnumerator(*re.d_enumerators[i]);
+ }
+ }
}
}
diff --git a/src/theory/mkrewriter b/src/theory/mkrewriter
index 88ac5b9fb..2d8012bfb 100755
--- a/src/theory/mkrewriter
+++ b/src/theory/mkrewriter
@@ -2,7 +2,7 @@
#
# mkrewriter
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2010-2012 The CVC4 Project
+# Copyright (c) 2010-2013 The CVC4 Project
#
# The purpose of this script is to create rewriter_tables.h from a template
# and a list of theory kinds.
@@ -14,13 +14,14 @@
# Output is to standard out.
#
-copyright=2010-2012
+copyright=2010-2013
cat <<EOF
/********************* */
/** rewriter_tables.h
**
- ** Copyright $copyright The AcSys Group, New York University, and as below.
+ ** Copyright $copyright New York University and The University of Iowa,
+ ** and as below.
**
** This header file automatically generated by:
**
diff --git a/src/theory/mktheorytraits b/src/theory/mktheorytraits
index a44d8e9c3..3edc7c140 100755
--- a/src/theory/mktheorytraits
+++ b/src/theory/mktheorytraits
@@ -2,7 +2,7 @@
#
# mktheorytraits
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2010-2012 The CVC4 Project
+# Copyright (c) 2010-2013 The CVC4 Project
#
# The purpose of this script is to create theory_traits.h from a template
# and a list of theory kinds.
@@ -14,7 +14,7 @@
# Output is to standard out.
#
-copyright=2010-2012
+copyright=2010-2013
filename=`basename "$1" | sed 's,_template,,'`
@@ -22,7 +22,8 @@ cat <<EOF
/********************* */
/** $filename
**
- ** Copyright $copyright The AcSys Group, New York University, and as below.
+ ** Copyright $copyright New York University and The University of Iowa,
+ ** and as below.
**
** This header file automatically generated by:
**
diff --git a/src/theory/model.cpp b/src/theory/model.cpp
index 713587be2..bbc51c9e0 100644
--- a/src/theory/model.cpp
+++ b/src/theory/model.cpp
@@ -395,6 +395,9 @@ bool TheoryEngineModelBuilder::isAssignable(TNode n)
void TheoryEngineModelBuilder::checkTerms(TNode n, TheoryModel* tm, NodeSet& cache)
{
+ if (n.getKind()==FORALL || n.getKind()==EXISTS) {
+ return;
+ }
if (cache.find(n) != cache.end()) {
return;
}
diff --git a/src/theory/model.h b/src/theory/model.h
index e283ee183..98eeda97a 100644
--- a/src/theory/model.h
+++ b/src/theory/model.h
@@ -87,7 +87,7 @@ public:
void addSubstitution(TNode x, TNode t, bool invalidateCache = true);
/** add term function
* addTerm( n ) will do any model-specific processing necessary for n,
- * such as contraining the interpretation of uninterpretted functions,
+ * such as constraining the interpretation of uninterpreted functions,
* and adding n to the equality engine of this model
*/
virtual void addTerm(TNode n);
diff --git a/src/theory/quantifiers/inst_gen.cpp b/src/theory/quantifiers/inst_gen.cpp
index d3bd6ad03..dea371e9c 100755..100644
--- a/src/theory/quantifiers/inst_gen.cpp
+++ b/src/theory/quantifiers/inst_gen.cpp
@@ -1,298 +1,296 @@
-/********************* */
-/*! \file inst_gen.cpp
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
- ** Minor contributors (to current version): none
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys)
- ** Courant Institute of Mathematical Sciences
- ** New York University
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief Implementation of inst gen classes
- **/
-
-#include "theory/quantifiers/inst_gen.h"
-#include "theory/quantifiers/model_engine.h"
-#include "theory/quantifiers/model_builder.h"
-#include "theory/quantifiers/first_order_model.h"
-
-//#define CHILD_USE_CONSIDER
-
-using namespace std;
-using namespace CVC4;
-using namespace CVC4::kind;
-using namespace CVC4::context;
-using namespace CVC4::theory;
-using namespace CVC4::theory::quantifiers;
-
-
-
-InstGenProcess::InstGenProcess( Node n ) : d_node( n ){
- Assert( n.hasAttribute(InstConstantAttribute()) );
- int count = 0;
- for( size_t i=0; i<n.getNumChildren(); i++ ){
- if( n[i].getKind()!=INST_CONSTANT && n[i].hasAttribute(InstConstantAttribute()) ){
- d_children.push_back( InstGenProcess( n[i] ) );
- d_children_index.push_back( i );
- d_children_map[ i ] = count;
- count++;
- }
- }
-}
-
-void InstGenProcess::addMatchValue( QuantifiersEngine* qe, Node f, Node val, InstMatch& m ){
- if( !qe->existsInstantiation( f, m, true ) ){
- //make sure no duplicates are produced
- if( d_inst_trie[val].addInstMatch( qe, f, m, true ) ){
- d_match_values.push_back( val );
- d_matches.push_back( InstMatch( &m ) );
- qe->getModelEngine()->getModelBuilder()->d_instGenMatches++;
- }
- }
-}
-
-void InstGenProcess::calculateMatches( QuantifiersEngine* qe, Node f, std::vector< Node >& considerVal, bool useConsider ){
- Trace("inst-gen-cm") << "* Calculate matches " << d_node << std::endl;
- //whether we are doing a product or sum or matches
- bool doProduct = true;
- //get the model
- FirstOrderModel* fm = qe->getModel();
-
- //calculate terms we will consider
- std::vector< Node > considerTerms;
- std::vector< std::vector< Node > > newConsiderVal;
- std::vector< bool > newUseConsider;
- std::map< Node, InstMatch > considerTermsMatch[2];
- std::map< Node, bool > considerTermsSuccess[2];
- newConsiderVal.resize( d_children.size() );
- newUseConsider.resize( d_children.size(), useConsider );
- if( d_node.getKind()==APPLY_UF ){
- Node op = d_node.getOperator();
- if( useConsider ){
-#ifndef CHILD_USE_CONSIDER
- for( size_t i=0; i<newUseConsider.size(); i++ ){
- newUseConsider[i] = false;
- }
-#endif
- for( size_t i=0; i<considerVal.size(); i++ ){
- eq::EqClassIterator eqc( qe->getEqualityQuery()->getEngine()->getRepresentative( considerVal[i] ),
- qe->getEqualityQuery()->getEngine() );
- while( !eqc.isFinished() ){
- Node en = (*eqc);
- if( en.getKind()==APPLY_UF && en.getOperator()==op ){
- considerTerms.push_back( en );
- }
- ++eqc;
- }
- }
- }else{
- considerTerms.insert( considerTerms.begin(), fm->d_uf_terms[op].begin(), fm->d_uf_terms[op].end() );
- }
- //for each term we consider, calculate a current match
- for( size_t i=0; i<considerTerms.size(); i++ ){
- Node n = considerTerms[i];
- bool isSelected = qe->getModelEngine()->getModelBuilder()->isTermSelected( n );
- bool hadSuccess CVC4_UNUSED = false;
- for( int t=(isSelected ? 0 : 1); t<2; t++ ){
- if( t==0 || !n.getAttribute(NoMatchAttribute()) ){
- considerTermsMatch[t][n] = InstMatch();
- considerTermsSuccess[t][n] = true;
- for( size_t j=0; j<d_node.getNumChildren(); j++ ){
- if( d_children_map.find( j )==d_children_map.end() ){
- if( t!=0 || !n[j].getAttribute(ModelBasisAttribute()) ){
- if( d_node[j].getKind()==INST_CONSTANT ){
- if( !considerTermsMatch[t][n].setMatch( qe->getEqualityQuery(), d_node[j], n[j] ) ){
- Trace("inst-gen-cm") << "fail match: " << n[j] << " is not equal to ";
- Trace("inst-gen-cm") << considerTermsMatch[t][n].getValue( d_node[j] ) << std::endl;
- considerTermsSuccess[t][n] = false;
- break;
- }
- }else if( !qe->getEqualityQuery()->areEqual( d_node[j], n[j] ) ){
- Trace("inst-gen-cm") << "fail arg: " << n[j] << " is not equal to " << d_node[j] << std::endl;
- considerTermsSuccess[t][n] = false;
- break;
- }
- }
- }
- }
- //if successful, store it
- if( considerTermsSuccess[t][n] ){
-#ifdef CHILD_USE_CONSIDER
- if( !hadSuccess ){
- hadSuccess = true;
- for( size_t k=0; k<d_children.size(); k++ ){
- if( newUseConsider[k] ){
- int childIndex = d_children_index[k];
- //determine if we are restricted or not
- if( t!=0 || !n[childIndex].getAttribute(ModelBasisAttribute()) ){
- Node r = qe->getModel()->getRepresentative( n[childIndex] );
- if( std::find( newConsiderVal[k].begin(), newConsiderVal[k].end(), r )==newConsiderVal[k].end() ){
- newConsiderVal[k].push_back( r );
- //check if we now need to consider the entire domain
- TypeNode tn = r.getType();
- if( qe->getModel()->d_rep_set.hasType( tn ) ){
- if( (int)newConsiderVal[k].size()>=qe->getModel()->d_rep_set.getNumRepresentatives( tn ) ){
- newConsiderVal[k].clear();
- newUseConsider[k] = false;
- }
- }
- }
- }else{
- //matching against selected term, will need to consider all values
- newConsiderVal[k].clear();
- newUseConsider[k] = false;
- }
- }
- }
- }
-#endif
- }
- }
- }
- }
- }else{
- //the interpretted case
- if( d_node.getType().isBoolean() ){
- if( useConsider ){
- //if( considerVal.size()!=1 ) { std::cout << "consider val = " << considerVal.size() << std::endl; }
- Assert( considerVal.size()==1 );
- bool reqPol = considerVal[0]==fm->d_true;
- Node ncv = considerVal[0];
- if( d_node.getKind()==NOT ){
- ncv = reqPol ? fm->d_false : fm->d_true;
- }
- if( d_node.getKind()==NOT || d_node.getKind()==AND || d_node.getKind()==OR ){
- for( size_t i=0; i<newConsiderVal.size(); i++ ){
- newConsiderVal[i].push_back( ncv );
- }
- //instead we will do a sum
- if( ( d_node.getKind()==AND && !reqPol ) || ( d_node.getKind()==OR && reqPol ) ){
- doProduct = false;
- }
- }else{
- //do not use consider
- for( size_t i=0; i<newUseConsider.size(); i++ ){
- newUseConsider[i] = false;
- }
- }
- }
- }
- }
-
- //calculate all matches for children
- for( int i=0; i<(int)d_children.size(); i++ ){
- d_children[i].calculateMatches( qe, f, newConsiderVal[i], newUseConsider[i] );
- if( doProduct && d_children[i].getNumMatches()==0 ){
- return;
- }
- }
- if( d_node.getKind()==APPLY_UF ){
- //if this is an uninterpreted function
- Node op = d_node.getOperator();
- //process all values
- for( size_t i=0; i<considerTerms.size(); i++ ){
- Node n = considerTerms[i];
- bool isSelected = qe->getModelEngine()->getModelBuilder()->isTermSelected( n );
- for( int t=(isSelected ? 0 : 1); t<2; t++ ){
- //do not consider ground case if it is already congruent to another ground term
- if( t==0 || !n.getAttribute(NoMatchAttribute()) ){
- Trace("inst-gen-cm") << "calculate for " << n << ", selected = " << (t==0) << std::endl;
- if( considerTermsSuccess[t][n] ){
- //try to find unifier for d_node = n
- calculateMatchesUninterpreted( qe, f, considerTermsMatch[t][n], n, 0, t==0 );
- }
- }
- }
- }
- }else{
- //if this is an interpreted function
- if( doProduct ){
- //combining children matches
- InstMatch curr;
- std::vector< Node > terms;
- calculateMatchesInterpreted( qe, f, curr, terms, 0 );
- }else{
- //summing children matches
- Assert( considerVal.size()==1 );
- for( int i=0; i<(int)d_children.size(); i++ ){
- for( int j=0; j<(int)d_children[ i ].getNumMatches(); j++ ){
- InstMatch m;
- if( d_children[ i ].getMatch( qe->getEqualityQuery(), j, m ) ){
- addMatchValue( qe, f, considerVal[0], m );
- }
- }
- }
- }
- }
- Trace("inst-gen-cm") << "done calculate matches" << std::endl;
- //can clear information used for finding duplicates
- d_inst_trie.clear();
-}
-
-bool InstGenProcess::getMatch( EqualityQuery* q, int i, InstMatch& m ){
- //FIXME: is this correct? (query may not be accurate)
- return m.merge( q, d_matches[i] );
-}
-
-void InstGenProcess::calculateMatchesUninterpreted( QuantifiersEngine* qe, Node f, InstMatch& curr, Node n, int childIndex, bool isSelected ){
- if( childIndex==(int)d_children.size() ){
- Node val = qe->getModel()->getRepresentative( n ); //FIXME: is this correct?
- Trace("inst-gen-cm") << " - u-match : " << val << std::endl;
- Trace("inst-gen-cm") << " : " << curr << std::endl;
- addMatchValue( qe, f, val, curr );
- }else{
- Trace("inst-gen-cm") << "Consider child index = " << childIndex << ", against ground term argument " << d_children_index[childIndex] << " ... " << n[d_children_index[childIndex]] << std::endl;
- bool sel = ( isSelected && n[d_children_index[childIndex]].getAttribute(ModelBasisAttribute()) );
- for( int i=0; i<(int)d_children[ childIndex ].getNumMatches(); i++ ){
- //FIXME: is this correct?
- if( sel || qe->getEqualityQuery()->areEqual( d_children[ childIndex ].getMatchValue( i ), n[d_children_index[childIndex]] ) ){
- InstMatch next( &curr );
- if( d_children[ childIndex ].getMatch( qe->getEqualityQuery(), i, next ) ){
- calculateMatchesUninterpreted( qe, f, next, n, childIndex+1, isSelected );
- }else{
- Trace("inst-gen-cm") << curr << " not equal to " << d_children[ childIndex ].d_matches[i] << std::endl;
- Trace("inst-gen-cm") << childIndex << " match " << i << " not equal subs." << std::endl;
- }
- }else{
- Trace("inst-gen-cm") << childIndex << " match " << i << " not equal value." << std::endl;
- }
- }
- }
-}
-
-void InstGenProcess::calculateMatchesInterpreted( QuantifiersEngine* qe, Node f, InstMatch& curr, std::vector< Node >& terms, int argIndex ){
- FirstOrderModel* fm = qe->getModel();
- if( argIndex==(int)d_node.getNumChildren() ){
- Node val;
- if( d_node.getNumChildren()==0 ){
- val = d_node;
- }else if( d_node.getKind()==EQUAL ){
- val = qe->getEqualityQuery()->areEqual( terms[0], terms[1] ) ? fm->d_true : fm->d_false;
- }else{
- val = NodeManager::currentNM()->mkNode( d_node.getKind(), terms );
- val = Rewriter::rewrite( val );
- }
- Trace("inst-gen-cm") << " - i-match : " << d_node << std::endl;
- Trace("inst-gen-cm") << " : " << val << std::endl;
- Trace("inst-gen-cm") << " : " << curr << std::endl;
- addMatchValue( qe, f, val, curr );
- }else{
- if( d_children_map.find( argIndex )==d_children_map.end() ){
- terms.push_back( fm->getRepresentative( d_node[argIndex] ) );
- calculateMatchesInterpreted( qe, f, curr, terms, argIndex+1 );
- terms.pop_back();
- }else{
- for( int i=0; i<(int)d_children[ d_children_map[argIndex] ].getNumMatches(); i++ ){
- InstMatch next( &curr );
- if( d_children[ d_children_map[argIndex] ].getMatch( qe->getEqualityQuery(), i, next ) ){
- terms.push_back( d_children[ d_children_map[argIndex] ].getMatchValue( i ) );
- calculateMatchesInterpreted( qe, f, next, terms, argIndex+1 );
- terms.pop_back();
- }
- }
- }
- }
-}
+/********************* */
+/*! \file inst_gen.cpp
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief Implementation of inst gen classes
+ **/
+
+#include "theory/quantifiers/inst_gen.h"
+#include "theory/quantifiers/model_engine.h"
+#include "theory/quantifiers/model_builder.h"
+#include "theory/quantifiers/first_order_model.h"
+
+//#define CHILD_USE_CONSIDER
+
+using namespace std;
+using namespace CVC4;
+using namespace CVC4::kind;
+using namespace CVC4::context;
+using namespace CVC4::theory;
+using namespace CVC4::theory::quantifiers;
+
+
+
+InstGenProcess::InstGenProcess( Node n ) : d_node( n ){
+ Assert( n.hasAttribute(InstConstantAttribute()) );
+ int count = 0;
+ for( size_t i=0; i<n.getNumChildren(); i++ ){
+ if( n[i].getKind()!=INST_CONSTANT && n[i].hasAttribute(InstConstantAttribute()) ){
+ d_children.push_back( InstGenProcess( n[i] ) );
+ d_children_index.push_back( i );
+ d_children_map[ i ] = count;
+ count++;
+ }
+ }
+}
+
+void InstGenProcess::addMatchValue( QuantifiersEngine* qe, Node f, Node val, InstMatch& m ){
+ if( !qe->existsInstantiation( f, m, true ) ){
+ //make sure no duplicates are produced
+ if( d_inst_trie[val].addInstMatch( qe, f, m, true ) ){
+ d_match_values.push_back( val );
+ d_matches.push_back( InstMatch( &m ) );
+ qe->getModelEngine()->getModelBuilder()->d_instGenMatches++;
+ }
+ }
+}
+
+void InstGenProcess::calculateMatches( QuantifiersEngine* qe, Node f, std::vector< Node >& considerVal, bool useConsider ){
+ Trace("inst-gen-cm") << "* Calculate matches " << d_node << std::endl;
+ //whether we are doing a product or sum or matches
+ bool doProduct = true;
+ //get the model
+ FirstOrderModel* fm = qe->getModel();
+
+ //calculate terms we will consider
+ std::vector< Node > considerTerms;
+ std::vector< std::vector< Node > > newConsiderVal;
+ std::vector< bool > newUseConsider;
+ std::map< Node, InstMatch > considerTermsMatch[2];
+ std::map< Node, bool > considerTermsSuccess[2];
+ newConsiderVal.resize( d_children.size() );
+ newUseConsider.resize( d_children.size(), useConsider );
+ if( d_node.getKind()==APPLY_UF ){
+ Node op = d_node.getOperator();
+ if( useConsider ){
+#ifndef CHILD_USE_CONSIDER
+ for( size_t i=0; i<newUseConsider.size(); i++ ){
+ newUseConsider[i] = false;
+ }
+#endif
+ for( size_t i=0; i<considerVal.size(); i++ ){
+ eq::EqClassIterator eqc( qe->getEqualityQuery()->getEngine()->getRepresentative( considerVal[i] ),
+ qe->getEqualityQuery()->getEngine() );
+ while( !eqc.isFinished() ){
+ Node en = (*eqc);
+ if( en.getKind()==APPLY_UF && en.getOperator()==op ){
+ considerTerms.push_back( en );
+ }
+ ++eqc;
+ }
+ }
+ }else{
+ considerTerms.insert( considerTerms.begin(), fm->d_uf_terms[op].begin(), fm->d_uf_terms[op].end() );
+ }
+ //for each term we consider, calculate a current match
+ for( size_t i=0; i<considerTerms.size(); i++ ){
+ Node n = considerTerms[i];
+ bool isSelected = qe->getModelEngine()->getModelBuilder()->isTermSelected( n );
+ bool hadSuccess CVC4_UNUSED = false;
+ for( int t=(isSelected ? 0 : 1); t<2; t++ ){
+ if( t==0 || !n.getAttribute(NoMatchAttribute()) ){
+ considerTermsMatch[t][n] = InstMatch();
+ considerTermsSuccess[t][n] = true;
+ for( size_t j=0; j<d_node.getNumChildren(); j++ ){
+ if( d_children_map.find( j )==d_children_map.end() ){
+ if( t!=0 || !n[j].getAttribute(ModelBasisAttribute()) ){
+ if( d_node[j].getKind()==INST_CONSTANT ){
+ if( !considerTermsMatch[t][n].setMatch( qe->getEqualityQuery(), d_node[j], n[j] ) ){
+ Trace("inst-gen-cm") << "fail match: " << n[j] << " is not equal to ";
+ Trace("inst-gen-cm") << considerTermsMatch[t][n].getValue( d_node[j] ) << std::endl;
+ considerTermsSuccess[t][n] = false;
+ break;
+ }
+ }else if( !qe->getEqualityQuery()->areEqual( d_node[j], n[j] ) ){
+ Trace("inst-gen-cm") << "fail arg: " << n[j] << " is not equal to " << d_node[j] << std::endl;
+ considerTermsSuccess[t][n] = false;
+ break;
+ }
+ }
+ }
+ }
+ //if successful, store it
+ if( considerTermsSuccess[t][n] ){
+#ifdef CHILD_USE_CONSIDER
+ if( !hadSuccess ){
+ hadSuccess = true;
+ for( size_t k=0; k<d_children.size(); k++ ){
+ if( newUseConsider[k] ){
+ int childIndex = d_children_index[k];
+ //determine if we are restricted or not
+ if( t!=0 || !n[childIndex].getAttribute(ModelBasisAttribute()) ){
+ Node r = qe->getModel()->getRepresentative( n[childIndex] );
+ if( std::find( newConsiderVal[k].begin(), newConsiderVal[k].end(), r )==newConsiderVal[k].end() ){
+ newConsiderVal[k].push_back( r );
+ //check if we now need to consider the entire domain
+ TypeNode tn = r.getType();
+ if( qe->getModel()->d_rep_set.hasType( tn ) ){
+ if( (int)newConsiderVal[k].size()>=qe->getModel()->d_rep_set.getNumRepresentatives( tn ) ){
+ newConsiderVal[k].clear();
+ newUseConsider[k] = false;
+ }
+ }
+ }
+ }else{
+ //matching against selected term, will need to consider all values
+ newConsiderVal[k].clear();
+ newUseConsider[k] = false;
+ }
+ }
+ }
+ }
+#endif
+ }
+ }
+ }
+ }
+ }else{
+ //the interpretted case
+ if( d_node.getType().isBoolean() ){
+ if( useConsider ){
+ //if( considerVal.size()!=1 ) { std::cout << "consider val = " << considerVal.size() << std::endl; }
+ Assert( considerVal.size()==1 );
+ bool reqPol = considerVal[0]==fm->d_true;
+ Node ncv = considerVal[0];
+ if( d_node.getKind()==NOT ){
+ ncv = reqPol ? fm->d_false : fm->d_true;
+ }
+ if( d_node.getKind()==NOT || d_node.getKind()==AND || d_node.getKind()==OR ){
+ for( size_t i=0; i<newConsiderVal.size(); i++ ){
+ newConsiderVal[i].push_back( ncv );
+ }
+ //instead we will do a sum
+ if( ( d_node.getKind()==AND && !reqPol ) || ( d_node.getKind()==OR && reqPol ) ){
+ doProduct = false;
+ }
+ }else{
+ //do not use consider
+ for( size_t i=0; i<newUseConsider.size(); i++ ){
+ newUseConsider[i] = false;
+ }
+ }
+ }
+ }
+ }
+
+ //calculate all matches for children
+ for( int i=0; i<(int)d_children.size(); i++ ){
+ d_children[i].calculateMatches( qe, f, newConsiderVal[i], newUseConsider[i] );
+ if( doProduct && d_children[i].getNumMatches()==0 ){
+ return;
+ }
+ }
+ if( d_node.getKind()==APPLY_UF ){
+ //if this is an uninterpreted function
+ Node op = d_node.getOperator();
+ //process all values
+ for( size_t i=0; i<considerTerms.size(); i++ ){
+ Node n = considerTerms[i];
+ bool isSelected = qe->getModelEngine()->getModelBuilder()->isTermSelected( n );
+ for( int t=(isSelected ? 0 : 1); t<2; t++ ){
+ //do not consider ground case if it is already congruent to another ground term
+ if( t==0 || !n.getAttribute(NoMatchAttribute()) ){
+ Trace("inst-gen-cm") << "calculate for " << n << ", selected = " << (t==0) << std::endl;
+ if( considerTermsSuccess[t][n] ){
+ //try to find unifier for d_node = n
+ calculateMatchesUninterpreted( qe, f, considerTermsMatch[t][n], n, 0, t==0 );
+ }
+ }
+ }
+ }
+ }else{
+ //if this is an interpreted function
+ if( doProduct ){
+ //combining children matches
+ InstMatch curr;
+ std::vector< Node > terms;
+ calculateMatchesInterpreted( qe, f, curr, terms, 0 );
+ }else{
+ //summing children matches
+ Assert( considerVal.size()==1 );
+ for( int i=0; i<(int)d_children.size(); i++ ){
+ for( int j=0; j<(int)d_children[ i ].getNumMatches(); j++ ){
+ InstMatch m;
+ if( d_children[ i ].getMatch( qe->getEqualityQuery(), j, m ) ){
+ addMatchValue( qe, f, considerVal[0], m );
+ }
+ }
+ }
+ }
+ }
+ Trace("inst-gen-cm") << "done calculate matches" << std::endl;
+ //can clear information used for finding duplicates
+ d_inst_trie.clear();
+}
+
+bool InstGenProcess::getMatch( EqualityQuery* q, int i, InstMatch& m ){
+ //FIXME: is this correct? (query may not be accurate)
+ return m.merge( q, d_matches[i] );
+}
+
+void InstGenProcess::calculateMatchesUninterpreted( QuantifiersEngine* qe, Node f, InstMatch& curr, Node n, int childIndex, bool isSelected ){
+ if( childIndex==(int)d_children.size() ){
+ Node val = qe->getModel()->getRepresentative( n ); //FIXME: is this correct?
+ Trace("inst-gen-cm") << " - u-match : " << val << std::endl;
+ Trace("inst-gen-cm") << " : " << curr << std::endl;
+ addMatchValue( qe, f, val, curr );
+ }else{
+ Trace("inst-gen-cm") << "Consider child index = " << childIndex << ", against ground term argument " << d_children_index[childIndex] << " ... " << n[d_children_index[childIndex]] << std::endl;
+ bool sel = ( isSelected && n[d_children_index[childIndex]].getAttribute(ModelBasisAttribute()) );
+ for( int i=0; i<(int)d_children[ childIndex ].getNumMatches(); i++ ){
+ //FIXME: is this correct?
+ if( sel || qe->getEqualityQuery()->areEqual( d_children[ childIndex ].getMatchValue( i ), n[d_children_index[childIndex]] ) ){
+ InstMatch next( &curr );
+ if( d_children[ childIndex ].getMatch( qe->getEqualityQuery(), i, next ) ){
+ calculateMatchesUninterpreted( qe, f, next, n, childIndex+1, isSelected );
+ }else{
+ Trace("inst-gen-cm") << curr << " not equal to " << d_children[ childIndex ].d_matches[i] << std::endl;
+ Trace("inst-gen-cm") << childIndex << " match " << i << " not equal subs." << std::endl;
+ }
+ }else{
+ Trace("inst-gen-cm") << childIndex << " match " << i << " not equal value." << std::endl;
+ }
+ }
+ }
+}
+
+void InstGenProcess::calculateMatchesInterpreted( QuantifiersEngine* qe, Node f, InstMatch& curr, std::vector< Node >& terms, int argIndex ){
+ FirstOrderModel* fm = qe->getModel();
+ if( argIndex==(int)d_node.getNumChildren() ){
+ Node val;
+ if( d_node.getNumChildren()==0 ){
+ val = d_node;
+ }else if( d_node.getKind()==EQUAL ){
+ val = qe->getEqualityQuery()->areEqual( terms[0], terms[1] ) ? fm->d_true : fm->d_false;
+ }else{
+ val = NodeManager::currentNM()->mkNode( d_node.getKind(), terms );
+ val = Rewriter::rewrite( val );
+ }
+ Trace("inst-gen-cm") << " - i-match : " << d_node << std::endl;
+ Trace("inst-gen-cm") << " : " << val << std::endl;
+ Trace("inst-gen-cm") << " : " << curr << std::endl;
+ addMatchValue( qe, f, val, curr );
+ }else{
+ if( d_children_map.find( argIndex )==d_children_map.end() ){
+ terms.push_back( fm->getRepresentative( d_node[argIndex] ) );
+ calculateMatchesInterpreted( qe, f, curr, terms, argIndex+1 );
+ terms.pop_back();
+ }else{
+ for( int i=0; i<(int)d_children[ d_children_map[argIndex] ].getNumMatches(); i++ ){
+ InstMatch next( &curr );
+ if( d_children[ d_children_map[argIndex] ].getMatch( qe->getEqualityQuery(), i, next ) ){
+ terms.push_back( d_children[ d_children_map[argIndex] ].getMatchValue( i ) );
+ calculateMatchesInterpreted( qe, f, next, terms, argIndex+1 );
+ terms.pop_back();
+ }
+ }
+ }
+ }
+}
diff --git a/src/theory/quantifiers/inst_gen.h b/src/theory/quantifiers/inst_gen.h
index f6e6a372e..930133954 100755..100644
--- a/src/theory/quantifiers/inst_gen.h
+++ b/src/theory/quantifiers/inst_gen.h
@@ -1,61 +1,59 @@
-/********************* */
-/*! \file inst_gen.h
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
- ** Minor contributors (to current version): none
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 The Analysis of Computer Systems Group (ACSys)
- ** Courant Institute of Mathematical Sciences
- ** New York University
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief Inst Gen classes
- **/
-
-#include "cvc4_private.h"
-
-#ifndef __CVC4__THEORY__QUANTIFIERS__INST_GEN_H
-#define __CVC4__THEORY__QUANTIFIERS__INST_GEN_H
-
-#include "theory/quantifiers_engine.h"
-#include "theory/quantifiers/inst_match.h"
-
-namespace CVC4 {
-namespace theory {
-namespace quantifiers {
-
-class InstGenProcess
-{
-private:
- //the node we are processing
- Node d_node;
- //the sub children for this node
- std::vector< InstGenProcess > d_children;
- std::vector< int > d_children_index;
- std::map< int, int > d_children_map;
- //the matches we have produced
- std::vector< InstMatch > d_matches;
- std::vector< Node > d_match_values;
- //add match value
- std::map< Node, inst::InstMatchTrie > d_inst_trie;
- void addMatchValue( QuantifiersEngine* qe, Node f, Node val, InstMatch& m );
-private:
- void calculateMatchesUninterpreted( QuantifiersEngine* qe, Node f, InstMatch& curr, Node n, int childIndex, bool isSelected );
- void calculateMatchesInterpreted( QuantifiersEngine* qe, Node f, InstMatch& curr, std::vector< Node >& terms, int argIndex );
-public:
- InstGenProcess( Node n );
- virtual ~InstGenProcess(){}
-
- void calculateMatches( QuantifiersEngine* qe, Node f, std::vector< Node >& considerVal, bool useConsider );
- int getNumMatches() { return d_matches.size(); }
- bool getMatch( EqualityQuery* q, int i, InstMatch& m );
- Node getMatchValue( int i ) { return d_match_values[i]; }
-};
-
-}
-}
-}
-
-#endif
+/********************* */
+/*! \file inst_gen.h
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief Inst Gen classes
+ **/
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__THEORY__QUANTIFIERS__INST_GEN_H
+#define __CVC4__THEORY__QUANTIFIERS__INST_GEN_H
+
+#include "theory/quantifiers_engine.h"
+#include "theory/quantifiers/inst_match.h"
+
+namespace CVC4 {
+namespace theory {
+namespace quantifiers {
+
+class InstGenProcess
+{
+private:
+ //the node we are processing
+ Node d_node;
+ //the sub children for this node
+ std::vector< InstGenProcess > d_children;
+ std::vector< int > d_children_index;
+ std::map< int, int > d_children_map;
+ //the matches we have produced
+ std::vector< InstMatch > d_matches;
+ std::vector< Node > d_match_values;
+ //add match value
+ std::map< Node, inst::InstMatchTrie > d_inst_trie;
+ void addMatchValue( QuantifiersEngine* qe, Node f, Node val, InstMatch& m );
+private:
+ void calculateMatchesUninterpreted( QuantifiersEngine* qe, Node f, InstMatch& curr, Node n, int childIndex, bool isSelected );
+ void calculateMatchesInterpreted( QuantifiersEngine* qe, Node f, InstMatch& curr, std::vector< Node >& terms, int argIndex );
+public:
+ InstGenProcess( Node n );
+ virtual ~InstGenProcess(){}
+
+ void calculateMatches( QuantifiersEngine* qe, Node f, std::vector< Node >& considerVal, bool useConsider );
+ int getNumMatches() { return d_matches.size(); }
+ bool getMatch( EqualityQuery* q, int i, InstMatch& m );
+ Node getMatchValue( int i ) { return d_match_values[i]; }
+};/* class InstGenProcess */
+
+}/* CVC4::theory::quantifiers namespace */
+}/* CVC4::theory namespace */
+}/* CVC4 namespace */
+
+#endif /* __CVC4__THEORY__QUANTIFIERS__INST_GEN_H */
diff --git a/src/theory/quantifiers/inst_match.cpp b/src/theory/quantifiers/inst_match.cpp
index dcd7a1b79..85a96f90a 100644
--- a/src/theory/quantifiers/inst_match.cpp
+++ b/src/theory/quantifiers/inst_match.cpp
@@ -103,12 +103,12 @@ void InstMatch::makeComplete( Node f, QuantifiersEngine* qe ){
}
}
-void InstMatch::makeInternalRepresentative( QuantifiersEngine* qe ){
- EqualityQueryQuantifiersEngine* eqqe = (EqualityQueryQuantifiersEngine*)qe->getEqualityQuery();
- for( std::map< Node, Node >::iterator it = d_map.begin(); it != d_map.end(); ++it ){
- d_map[ it->first ] = eqqe->getInternalRepresentative( it->second );
- }
-}
+//void InstMatch::makeInternalRepresentative( QuantifiersEngine* qe ){
+// EqualityQueryQuantifiersEngine* eqqe = (EqualityQueryQuantifiersEngine*)qe->getEqualityQuery();
+// for( std::map< Node, Node >::iterator it = d_map.begin(); it != d_map.end(); ++it ){
+// d_map[ it->first ] = eqqe->getInternalRepresentative( it->second );
+// }
+//}
void InstMatch::makeRepresentative( QuantifiersEngine* qe ){
for( std::map< Node, Node >::iterator it = d_map.begin(); it != d_map.end(); ++it ){
diff --git a/src/theory/quantifiers/inst_match.h b/src/theory/quantifiers/inst_match.h
index 8b2d9726b..b9e61be20 100644
--- a/src/theory/quantifiers/inst_match.h
+++ b/src/theory/quantifiers/inst_match.h
@@ -58,7 +58,7 @@ public:
/** make complete */
void makeComplete( Node f, QuantifiersEngine* qe );
/** make internal representative */
- void makeInternalRepresentative( QuantifiersEngine* qe );
+ //void makeInternalRepresentative( QuantifiersEngine* qe );
/** make representative */
void makeRepresentative( QuantifiersEngine* qe );
/** get value */
diff --git a/src/theory/quantifiers/inst_match_generator.cpp b/src/theory/quantifiers/inst_match_generator.cpp
index 3b5e594fb..5484e25e9 100755..100644
--- a/src/theory/quantifiers/inst_match_generator.cpp
+++ b/src/theory/quantifiers/inst_match_generator.cpp
@@ -1,664 +1,658 @@
-/********************* */
-/*! \file inst_match_generator.cpp
-** \verbatim
-** Original author: ajreynol
-** Major contributors: bobot
-** Minor contributors (to current version): barrett, mdeters
-** This file is part of the CVC4 prototype.
-** Copyright (c) 2009-2012 New York University and The University of Iowa
-** See the file COPYING in the top-level source directory for licensing
-** information.\endverbatim
-**
-** \brief Implementation of inst match generator class
-**/
-
-#include "theory/quantifiers/inst_match_generator.h"
-#include "theory/quantifiers/trigger.h"
-#include "theory/quantifiers/term_database.h"
-#include "theory/quantifiers/candidate_generator.h"
-#include "theory/quantifiers_engine.h"
-
-using namespace std;
-using namespace CVC4;
-using namespace CVC4::kind;
-using namespace CVC4::context;
-using namespace CVC4::theory;
-
-namespace CVC4 {
-namespace theory {
-namespace inst {
-
-
-InstMatchGenerator::InstMatchGenerator( Node pat, QuantifiersEngine* qe, int matchPolicy ) : d_matchPolicy( matchPolicy ){
- initializePattern( pat, qe );
-}
-
-InstMatchGenerator::InstMatchGenerator( std::vector< Node >& pats, QuantifiersEngine* qe, int matchPolicy ) : d_matchPolicy( matchPolicy ){
- if( pats.size()==1 ){
- initializePattern( pats[0], qe );
- }else{
- initializePatterns( pats, qe );
- }
-}
-
-void InstMatchGenerator::initializePatterns( std::vector< Node >& pats, QuantifiersEngine* qe ){
- int childMatchPolicy = d_matchPolicy==MATCH_GEN_EFFICIENT_E_MATCH ? 0 : d_matchPolicy;
- for( int i=0; i<(int)pats.size(); i++ ){
- d_children.push_back( new InstMatchGenerator( pats[i], qe, childMatchPolicy ) );
- }
- d_pattern = Node::null();
- d_match_pattern = Node::null();
- d_cg = NULL;
-}
-
-void InstMatchGenerator::initializePattern( Node pat, QuantifiersEngine* qe ){
- Debug("inst-match-gen") << "Pattern term is " << pat << std::endl;
- Assert( pat.hasAttribute(InstConstantAttribute()) );
- d_pattern = pat;
- d_match_pattern = pat;
- if( d_match_pattern.getKind()==NOT ){
- //we want to add the children of the NOT
- d_match_pattern = d_pattern[0];
- }
- if( d_match_pattern.getKind()==IFF || d_match_pattern.getKind()==EQUAL ){
- if( !d_match_pattern[0].hasAttribute(InstConstantAttribute()) ){
- Assert( d_match_pattern[1].hasAttribute(InstConstantAttribute()) );
- //swap sides
- d_pattern = NodeManager::currentNM()->mkNode( d_match_pattern.getKind(), d_match_pattern[1], d_match_pattern[0] );
- d_pattern = pat.getKind()==NOT ? d_pattern.notNode() : d_pattern;
- if( pat.getKind()!=NOT ){ //TEMPORARY until we do better implementation of disequality matching
- d_match_pattern = d_match_pattern[1];
- }else{
- d_match_pattern = d_pattern[0][0];
- }
- }else if( !d_match_pattern[1].hasAttribute(InstConstantAttribute()) ){
- Assert( d_match_pattern[0].hasAttribute(InstConstantAttribute()) );
- if( pat.getKind()!=NOT ){ //TEMPORARY until we do better implementation of disequality matching
- d_match_pattern = d_match_pattern[0];
- }
- }
- }
- int childMatchPolicy = MATCH_GEN_DEFAULT;
- for( int i=0; i<(int)d_match_pattern.getNumChildren(); i++ ){
- if( d_match_pattern[i].hasAttribute(InstConstantAttribute()) ){
- if( d_match_pattern[i].getKind()!=INST_CONSTANT ){
- d_children.push_back( new InstMatchGenerator( d_match_pattern[i], qe, childMatchPolicy ) );
- d_children_index.push_back( i );
- }
- }
- }
-
- Debug("inst-match-gen") << "Pattern is " << d_pattern << ", match pattern is " << d_match_pattern << std::endl;
-
- //create candidate generator
- if( d_match_pattern.getKind()==EQUAL || d_match_pattern.getKind()==IFF ){
- Assert( d_matchPolicy==MATCH_GEN_DEFAULT );
- //we will be producing candidates via literal matching heuristics
- if( d_pattern.getKind()!=NOT ){
- //candidates will be all equalities
- d_cg = new inst::CandidateGeneratorQELitEq( qe, d_match_pattern );
- }else{
- //candidates will be all disequalities
- d_cg = new inst::CandidateGeneratorQELitDeq( qe, d_match_pattern );
- }
- }else if( d_pattern.getKind()==EQUAL || d_pattern.getKind()==IFF || d_pattern.getKind()==NOT ){
- Assert( d_matchPolicy==MATCH_GEN_DEFAULT );
- if( d_pattern.getKind()==NOT ){
- Unimplemented("Disequal generator unimplemented");
- }else{
- Assert( Trigger::isAtomicTrigger( d_match_pattern ) );
- //we are matching only in a particular equivalence class
- d_cg = new inst::CandidateGeneratorQE( qe, d_match_pattern.getOperator() );
- //store the equivalence class that we will call d_cg->reset( ... ) on
- d_eq_class = d_pattern[1];
- }
- }else if( Trigger::isAtomicTrigger( d_match_pattern ) ){
- //if( d_matchPolicy==MATCH_GEN_EFFICIENT_E_MATCH ){
- //Warning() << "Currently efficient e matching is not taken into account for quantifiers: " << d_pattern << std::endl;
- //}
- //we will be scanning lists trying to find d_match_pattern.getOperator()
- d_cg = new inst::CandidateGeneratorQE( qe, d_match_pattern.getOperator() );
- }else{
- d_cg = new CandidateGeneratorQueue;
- if( !Trigger::getPatternArithmetic( d_match_pattern.getAttribute(InstConstantAttribute()), d_match_pattern, d_arith_coeffs ) ){
- Debug("inst-match-gen") << "(?) Unknown matching pattern is " << d_match_pattern << std::endl;
- //Warning() << "(?) Unknown matching pattern is " << d_match_pattern << std::endl;
- d_matchPolicy = MATCH_GEN_INTERNAL_ERROR;
- }else{
- Debug("matching-arith") << "Generated arithmetic pattern for " << d_match_pattern << ": " << std::endl;
- for( std::map< Node, Node >::iterator it = d_arith_coeffs.begin(); it != d_arith_coeffs.end(); ++it ){
- Debug("matching-arith") << " " << it->first << " -> " << it->second << std::endl;
- }
- //we will treat this as match gen internal arithmetic
- d_matchPolicy = MATCH_GEN_INTERNAL_ARITHMETIC;
- }
- }
-}
-
-/** get match (not modulo equality) */
-bool InstMatchGenerator::getMatch( Node t, InstMatch& m, QuantifiersEngine* qe ){
- Debug("matching") << "Matching " << t << " against pattern " << d_match_pattern << " ("
- << m.size() << ")" << ", " << d_children.size() << std::endl;
- Assert( !d_match_pattern.isNull() );
- if( qe->d_optMatchIgnoreModelBasis && t.getAttribute(ModelBasisAttribute()) ){
- return true;
- }else if( d_matchPolicy==MATCH_GEN_INTERNAL_ARITHMETIC ){
- return getMatchArithmetic( t, m, qe );
- }else if( d_matchPolicy==MATCH_GEN_INTERNAL_ERROR ){
- return false;
- }else{
- EqualityQuery* q = qe->getEqualityQuery();
- //add m to partial match vector
- std::vector< InstMatch > partial;
- partial.push_back( InstMatch( &m ) );
- //if t is null
- Assert( !t.isNull() );
- Assert( !t.hasAttribute(InstConstantAttribute()) );
- Assert( t.getKind()==d_match_pattern.getKind() );
- Assert( !Trigger::isAtomicTrigger( d_match_pattern ) || t.getOperator()==d_match_pattern.getOperator() );
- //first, check if ground arguments are not equal, or a match is in conflict
- for( int i=0; i<(int)d_match_pattern.getNumChildren(); i++ ){
- if( d_match_pattern[i].hasAttribute(InstConstantAttribute()) ){
- if( d_match_pattern[i].getKind()==INST_CONSTANT ){
- if( !partial[0].setMatch( q, d_match_pattern[i], t[i] ) ){
- //match is in conflict
- Debug("matching-debug") << "Match in conflict " << t[i] << " and "
- << d_match_pattern[i] << " because "
- << partial[0].get(d_match_pattern[i])
- << std::endl;
- Debug("matching-fail") << "Match fail: " << partial[0].get(d_match_pattern[i]) << " and " << t[i] << std::endl;
- return false;
- }
- }
- }else{
- if( !q->areEqual( d_match_pattern[i], t[i] ) ){
- Debug("matching-fail") << "Match fail arg: " << d_match_pattern[i] << " and " << t[i] << std::endl;
- //ground arguments are not equal
- return false;
- }
- }
- }
- //now, fit children into match
- //we will be requesting candidates for matching terms for each child
- std::vector< Node > reps;
- for( int i=0; i<(int)d_children.size(); i++ ){
- Node rep = q->getRepresentative( t[ d_children_index[i] ] );
- reps.push_back( rep );
- d_children[i]->d_cg->reset( rep );
- }
-
- //combine child matches
- int index = 0;
- while( index>=0 && index<(int)d_children.size() ){
- partial.push_back( InstMatch( &partial[index] ) );
- if( d_children[index]->getNextMatch2( partial[index+1], qe ) ){
- index++;
- }else{
- d_children[index]->d_cg->reset( reps[index] );
- partial.pop_back();
- if( !partial.empty() ){
- partial.pop_back();
- }
- index--;
- }
- }
- if( index>=0 ){
- m = partial.back();
- return true;
- }else{
- return false;
- }
- }
-}
-
-bool InstMatchGenerator::getNextMatch2( InstMatch& m, QuantifiersEngine* qe, bool saveMatched ){
- bool success = false;
- Node t;
- do{
- //get the next candidate term t
- t = d_cg->getNextCandidate();
- //if t not null, try to fit it into match m
- if( !t.isNull() && t.getType()==d_match_pattern.getType() ){
- success = getMatch( t, m, qe );
- }
- }while( !success && !t.isNull() );
- if (saveMatched) m.d_matched = t;
- return success;
-}
-
-bool InstMatchGenerator::getMatchArithmetic( Node t, InstMatch& m, QuantifiersEngine* qe ){
- Debug("matching-arith") << "Matching " << t << " " << d_match_pattern << std::endl;
- if( !d_arith_coeffs.empty() ){
- NodeBuilder<> tb(kind::PLUS);
- Node ic = Node::null();
- for( std::map< Node, Node >::iterator it = d_arith_coeffs.begin(); it != d_arith_coeffs.end(); ++it ){
- Debug("matching-arith") << it->first << " -> " << it->second << std::endl;
- if( !it->first.isNull() ){
- if( m.find( it->first )==m.end() ){
- //see if we can choose this to set
- if( ic.isNull() && ( it->second.isNull() || !it->first.getType().isInteger() ) ){
- ic = it->first;
- }
- }else{
- Debug("matching-arith") << "already set " << m.get( it->first ) << std::endl;
- Node tm = m.get( it->first );
- if( !it->second.isNull() ){
- tm = NodeManager::currentNM()->mkNode( MULT, it->second, tm );
- }
- tb << tm;
- }
- }else{
- tb << it->second;
- }
- }
- if( !ic.isNull() ){
- Node tm;
- if( tb.getNumChildren()==0 ){
- tm = t;
- }else{
- tm = tb.getNumChildren()==1 ? tb.getChild( 0 ) : tb;
- tm = NodeManager::currentNM()->mkNode( MINUS, t, tm );
- }
- if( !d_arith_coeffs[ ic ].isNull() ){
- Assert( !ic.getType().isInteger() );
- Node coeff = NodeManager::currentNM()->mkConst( Rational(1) / d_arith_coeffs[ ic ].getConst<Rational>() );
- tm = NodeManager::currentNM()->mkNode( MULT, coeff, tm );
- }
- m.set( ic, Rewriter::rewrite( tm ));
- //set the rest to zeros
- for( std::map< Node, Node >::iterator it = d_arith_coeffs.begin(); it != d_arith_coeffs.end(); ++it ){
- if( !it->first.isNull() ){
- if( m.find( it->first )==m.end() ){
- m.set( it->first, NodeManager::currentNM()->mkConst( Rational(0) ) );
- }
- }
- }
- Debug("matching-arith") << "Setting " << ic << " to " << tm << std::endl;
- return true;
- }else{
- return false;
- }
- }else{
- return false;
- }
-}
-
-
-/** reset instantiation round */
-void InstMatchGenerator::resetInstantiationRound( QuantifiersEngine* qe ){
- if( d_match_pattern.isNull() ){
- for( int i=0; i<(int)d_children.size(); i++ ){
- d_children[i]->resetInstantiationRound( qe );
- }
- }else{
- if( d_cg ){
- d_cg->resetInstantiationRound();
- }
- }
-}
-
-void InstMatchGenerator::reset( Node eqc, QuantifiersEngine* qe ){
- if( d_match_pattern.isNull() ){
- for( int i=0; i<(int)d_children.size(); i++ ){
- d_children[i]->reset( eqc, qe );
- }
- d_partial.clear();
- }else{
- if( !d_eq_class.isNull() ){
- //we have a specific equivalence class in mind
- //we are producing matches for f(E) ~ t, where E is a non-ground vector of terms, and t is a ground term
- //just look in equivalence class of the RHS
- d_cg->reset( d_eq_class );
- }else{
- d_cg->reset( eqc );
- }
- }
-}
-
-bool InstMatchGenerator::getNextMatch( InstMatch& m, QuantifiersEngine* qe ){
- m.d_matched = Node::null();
- if( d_match_pattern.isNull() ){
- int index = (int)d_partial.size();
- while( index>=0 && index<(int)d_children.size() ){
- if( index>0 ){
- d_partial.push_back( InstMatch( &d_partial[index-1] ) );
- }else{
- d_partial.push_back( InstMatch() );
- }
- if( d_children[index]->getNextMatch( d_partial[index], qe ) ){
- index++;
- }else{
- d_children[index]->reset( Node::null(), qe );
- d_partial.pop_back();
- if( !d_partial.empty() ){
- d_partial.pop_back();
- }
- index--;
- }
- }
- if( index>=0 ){
- m = d_partial.back();
- d_partial.pop_back();
- return true;
- }else{
- return false;
- }
- }else{
- bool res = getNextMatch2( m, qe, true );
- Assert(!res || !m.d_matched.isNull());
- return res;
- }
-}
-
-
-
-int InstMatchGenerator::addInstantiations( Node f, InstMatch& baseMatch, QuantifiersEngine* qe ){
- //now, try to add instantiation for each match produced
- int addedLemmas = 0;
- InstMatch m;
- while( getNextMatch( m, qe ) ){
- //m.makeInternal( d_quantEngine->getEqualityQuery() );
- m.add( baseMatch );
- if( qe->addInstantiation( f, m ) ){
- addedLemmas++;
- if( qe->d_optInstLimitActive && qe->d_optInstLimit<=0 ){
- return addedLemmas;
- }
- }
- m.clear();
- }
- //return number of lemmas added
- return addedLemmas;
-}
-
-int InstMatchGenerator::addTerm( Node f, Node t, QuantifiersEngine* qe ){
- Assert( options::eagerInstQuant() );
- if( !d_match_pattern.isNull() ){
- InstMatch m;
- if( getMatch( t, m, qe ) ){
- if( qe->addInstantiation( f, m ) ){
- return 1;
- }
- }
- }else{
- for( int i=0; i<(int)d_children.size(); i++ ){
- d_children[i]->addTerm( f, t, qe );
- }
- }
- return 0;
-}
-
-/** constructors */
-InstMatchGeneratorMulti::InstMatchGeneratorMulti( Node f, std::vector< Node >& pats, QuantifiersEngine* qe, int matchOption ) :
-d_f( f ){
- Debug("smart-multi-trigger") << "Making smart multi-trigger for " << f << std::endl;
- std::map< Node, std::vector< Node > > var_contains;
- qe->getTermDatabase()->getVarContains( f, pats, var_contains );
- //convert to indicies
- for( std::map< Node, std::vector< Node > >::iterator it = var_contains.begin(); it != var_contains.end(); ++it ){
- Debug("smart-multi-trigger") << "Pattern " << it->first << " contains: ";
- for( int i=0; i<(int)it->second.size(); i++ ){
- Debug("smart-multi-trigger") << it->second[i] << " ";
- int index = it->second[i].getAttribute(InstVarNumAttribute());
- d_var_contains[ it->first ].push_back( index );
- d_var_to_node[ index ].push_back( it->first );
- }
- Debug("smart-multi-trigger") << std::endl;
- }
- for( int i=0; i<(int)pats.size(); i++ ){
- Node n = pats[i];
- //make the match generator
- d_children.push_back( new InstMatchGenerator( n, qe, matchOption ) );
- //compute unique/shared variables
- std::vector< int > unique_vars;
- std::map< int, bool > shared_vars;
- int numSharedVars = 0;
- for( int j=0; j<(int)d_var_contains[n].size(); j++ ){
- if( d_var_to_node[ d_var_contains[n][j] ].size()==1 ){
- Debug("smart-multi-trigger") << "Var " << d_var_contains[n][j] << " is unique to " << pats[i] << std::endl;
- unique_vars.push_back( d_var_contains[n][j] );
- }else{
- shared_vars[ d_var_contains[n][j] ] = true;
- numSharedVars++;
- }
- }
- //we use the latest shared variables, then unique variables
- std::vector< int > vars;
- int index = i==0 ? (int)(pats.size()-1) : (i-1);
- while( numSharedVars>0 && index!=i ){
- for( std::map< int, bool >::iterator it = shared_vars.begin(); it != shared_vars.end(); ++it ){
- if( it->second ){
- if( std::find( d_var_contains[ pats[index] ].begin(), d_var_contains[ pats[index] ].end(), it->first )!=
- d_var_contains[ pats[index] ].end() ){
- vars.push_back( it->first );
- shared_vars[ it->first ] = false;
- numSharedVars--;
- }
- }
- }
- index = index==0 ? (int)(pats.size()-1) : (index-1);
- }
- vars.insert( vars.end(), unique_vars.begin(), unique_vars.end() );
- Debug("smart-multi-trigger") << " Index[" << i << "]: ";
- for( int i=0; i<(int)vars.size(); i++ ){
- Debug("smart-multi-trigger") << vars[i] << " ";
- }
- Debug("smart-multi-trigger") << std::endl;
- //make ordered inst match trie
- InstMatchTrie::ImtIndexOrder* imtio = new InstMatchTrie::ImtIndexOrder;
- imtio->d_order.insert( imtio->d_order.begin(), vars.begin(), vars.end() );
- d_children_trie.push_back( InstMatchTrieOrdered( imtio ) );
- }
-
-}
-
-/** reset instantiation round (call this whenever equivalence classes have changed) */
-void InstMatchGeneratorMulti::resetInstantiationRound( QuantifiersEngine* qe ){
- for( int i=0; i<(int)d_children.size(); i++ ){
- d_children[i]->resetInstantiationRound( qe );
- }
-}
-
-/** reset, eqc is the equivalence class to search in (any if eqc=null) */
-void InstMatchGeneratorMulti::reset( Node eqc, QuantifiersEngine* qe ){
- for( int i=0; i<(int)d_children.size(); i++ ){
- d_children[i]->reset( eqc, qe );
- }
-}
-
-int InstMatchGeneratorMulti::addInstantiations( Node f, InstMatch& baseMatch, QuantifiersEngine* qe ){
- int addedLemmas = 0;
- Debug("smart-multi-trigger") << "Process smart multi trigger" << std::endl;
- for( int i=0; i<(int)d_children.size(); i++ ){
- Debug("smart-multi-trigger") << "Calculate matches " << i << std::endl;
- std::vector< InstMatch > newMatches;
- InstMatch m;
- while( d_children[i]->getNextMatch( m, qe ) ){
- m.makeRepresentative( qe );
- newMatches.push_back( InstMatch( &m ) );
- m.clear();
- }
- for( int j=0; j<(int)newMatches.size(); j++ ){
- processNewMatch( qe, newMatches[j], i, addedLemmas );
- }
- }
- return addedLemmas;
-}
-
-void InstMatchGeneratorMulti::processNewMatch( QuantifiersEngine* qe, InstMatch& m, int fromChildIndex, int& addedLemmas ){
- //see if these produce new matches
- d_children_trie[fromChildIndex].addInstMatch( qe, d_f, m, true );
- //possibly only do the following if we know that new matches will be produced?
- //the issue is that instantiations are filtered in quantifiers engine, and so there is no guarentee that
- // we can safely skip the following lines, even when we have already produced this match.
- Debug("smart-multi-trigger") << "Child " << fromChildIndex << " produced match " << m << std::endl;
- //process new instantiations
- int childIndex = (fromChildIndex+1)%(int)d_children.size();
- std::vector< IndexedTrie > unique_var_tries;
- processNewInstantiations( qe, m, addedLemmas, d_children_trie[childIndex].getTrie(),
- unique_var_tries, 0, childIndex, fromChildIndex, true );
-}
-
-void InstMatchGeneratorMulti::processNewInstantiations( QuantifiersEngine* qe, InstMatch& m, int& addedLemmas, InstMatchTrie* tr,
- std::vector< IndexedTrie >& unique_var_tries,
- int trieIndex, int childIndex, int endChildIndex, bool modEq ){
- if( childIndex==endChildIndex ){
- //now, process unique variables
- processNewInstantiations2( qe, m, addedLemmas, unique_var_tries, 0 );
- }else if( trieIndex<(int)d_children_trie[childIndex].getOrdering()->d_order.size() ){
- int curr_index = d_children_trie[childIndex].getOrdering()->d_order[trieIndex];
- Node curr_ic = qe->getTermDatabase()->getInstantiationConstant( d_f, curr_index );
- if( m.find( curr_ic )==m.end() ){
- //if( d_var_to_node[ curr_index ].size()==1 ){ //FIXME
- // //unique variable(s), defer calculation
- // unique_var_tries.push_back( IndexedTrie( std::pair< int, int >( childIndex, trieIndex ), tr ) );
- // int newChildIndex = (childIndex+1)%(int)d_children.size();
- // processNewInstantiations( qe, m, d_children_trie[newChildIndex].getTrie(), unique_var_tries,
- // 0, newChildIndex, endChildIndex, modEq );
- //}else{
- //shared and non-set variable, add to InstMatch
- for( std::map< Node, InstMatchTrie >::iterator it = tr->d_data.begin(); it != tr->d_data.end(); ++it ){
- InstMatch mn( &m );
- mn.set( curr_ic, it->first);
- processNewInstantiations( qe, mn, addedLemmas, &(it->second), unique_var_tries,
- trieIndex+1, childIndex, endChildIndex, modEq );
- }
- //}
- }else{
- //shared and set variable, try to merge
- Node n = m.get( curr_ic );
- std::map< Node, InstMatchTrie >::iterator it = tr->d_data.find( n );
- if( it!=tr->d_data.end() ){
- processNewInstantiations( qe, m, addedLemmas, &(it->second), unique_var_tries,
- trieIndex+1, childIndex, endChildIndex, modEq );
- }
- if( modEq ){
- //check modulo equality for other possible instantiations
- if( qe->getEqualityQuery()->getEngine()->hasTerm( n ) ){
- eq::EqClassIterator eqc( qe->getEqualityQuery()->getEngine()->getRepresentative( n ),
- qe->getEqualityQuery()->getEngine() );
- while( !eqc.isFinished() ){
- Node en = (*eqc);
- if( en!=n ){
- std::map< Node, InstMatchTrie >::iterator itc = tr->d_data.find( en );
- if( itc!=tr->d_data.end() ){
- processNewInstantiations( qe, m, addedLemmas, &(itc->second), unique_var_tries,
- trieIndex+1, childIndex, endChildIndex, modEq );
- }
- }
- ++eqc;
- }
- }
- }
- }
- }else{
- int newChildIndex = (childIndex+1)%(int)d_children.size();
- processNewInstantiations( qe, m, addedLemmas, d_children_trie[newChildIndex].getTrie(), unique_var_tries,
- 0, newChildIndex, endChildIndex, modEq );
- }
-}
-
-void InstMatchGeneratorMulti::processNewInstantiations2( QuantifiersEngine* qe, InstMatch& m, int& addedLemmas,
- std::vector< IndexedTrie >& unique_var_tries,
- int uvtIndex, InstMatchTrie* tr, int trieIndex ){
- if( uvtIndex<(int)unique_var_tries.size() ){
- int childIndex = unique_var_tries[uvtIndex].first.first;
- if( !tr ){
- tr = unique_var_tries[uvtIndex].second;
- trieIndex = unique_var_tries[uvtIndex].first.second;
- }
- if( trieIndex<(int)d_children_trie[childIndex].getOrdering()->d_order.size() ){
- int curr_index = d_children_trie[childIndex].getOrdering()->d_order[trieIndex];
- Node curr_ic = qe->getTermDatabase()->getInstantiationConstant( d_f, curr_index );
- //unique non-set variable, add to InstMatch
- for( std::map< Node, InstMatchTrie >::iterator it = tr->d_data.begin(); it != tr->d_data.end(); ++it ){
- InstMatch mn( &m );
- mn.set( curr_ic, it->first);
- processNewInstantiations2( qe, mn, addedLemmas, unique_var_tries, uvtIndex, &(it->second), trieIndex+1 );
- }
- }else{
- processNewInstantiations2( qe, m, addedLemmas, unique_var_tries, uvtIndex+1 );
- }
- }else{
- //m is an instantiation
- if( qe->addInstantiation( d_f, m ) ){
- addedLemmas++;
- Debug("smart-multi-trigger") << "-> Produced instantiation " << m << std::endl;
- }
- }
-}
-
-int InstMatchGeneratorMulti::addTerm( Node f, Node t, QuantifiersEngine* qe ){
- Assert( options::eagerInstQuant() );
- int addedLemmas = 0;
- for( int i=0; i<(int)d_children.size(); i++ ){
- if( ((InstMatchGenerator*)d_children[i])->d_match_pattern.getOperator()==t.getOperator() ){
- InstMatch m;
- //if it produces a match, then process it with the rest
- if( ((InstMatchGenerator*)d_children[i])->getMatch( t, m, qe ) ){
- processNewMatch( qe, m, i, addedLemmas );
- }
- }
- }
- return addedLemmas;
-}
-
-int InstMatchGeneratorSimple::addInstantiations( Node f, InstMatch& baseMatch, QuantifiersEngine* qe ){
- InstMatch m;
- m.add( baseMatch );
- int addedLemmas = 0;
- if( d_match_pattern.getType()==NodeManager::currentNM()->booleanType() ){
- for( int i=0; i<2; i++ ){
- addInstantiations( m, qe, addedLemmas, 0, &(qe->getTermDatabase()->d_pred_map_trie[i][ d_match_pattern.getOperator() ]) );
- }
- }else{
- addInstantiations( m, qe, addedLemmas, 0, &(qe->getTermDatabase()->d_func_map_trie[ d_match_pattern.getOperator() ]) );
- }
- return addedLemmas;
-}
-
-void InstMatchGeneratorSimple::addInstantiations( InstMatch& m, QuantifiersEngine* qe, int& addedLemmas, int argIndex, quantifiers::TermArgTrie* tat ){
- if( argIndex==(int)d_match_pattern.getNumChildren() ){
- //m is an instantiation
- if( qe->addInstantiation( d_f, m ) ){
- addedLemmas++;
- Debug("simple-multi-trigger") << "-> Produced instantiation " << m << std::endl;
- }
- }else{
- if( d_match_pattern[argIndex].getKind()==INST_CONSTANT ){
- Node ic = d_match_pattern[argIndex];
- for( std::map< Node, quantifiers::TermArgTrie >::iterator it = tat->d_data.begin(); it != tat->d_data.end(); ++it ){
- Node t = it->first;
- if( ( m.get( ic ).isNull() || m.get( ic )==t ) && ic.getType()==t.getType() ){
- Node prev = m.get( ic );
- m.set( ic, t);
- addInstantiations( m, qe, addedLemmas, argIndex+1, &(it->second) );
- m.set( ic, prev);
- }
- }
- }else{
- Node r = qe->getEqualityQuery()->getRepresentative( d_match_pattern[argIndex] );
- std::map< Node, quantifiers::TermArgTrie >::iterator it = tat->d_data.find( r );
- if( it!=tat->d_data.end() ){
- addInstantiations( m, qe, addedLemmas, argIndex+1, &(it->second) );
- }
- }
- }
-}
-
-int InstMatchGeneratorSimple::addTerm( Node f, Node t, QuantifiersEngine* qe ){
- Assert( options::eagerInstQuant() );
- InstMatch m;
- for( int i=0; i<(int)t.getNumChildren(); i++ ){
- if( d_match_pattern[i].getKind()==INST_CONSTANT ){
- m.set(d_match_pattern[i], t[i]);
- }else if( !qe->getEqualityQuery()->areEqual( d_match_pattern[i], t[i] ) ){
- return 0;
- }
- }
- return qe->addInstantiation( f, m ) ? 1 : 0;
-}
-
-}/* CVC4::theory::inst namespace */
-}/* CVC4::theory namespace */
-}/* CVC4 namespace */
+/********************* */
+/*! \file inst_match_generator.cpp
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** [[ Add lengthier description here ]]
+ ** \todo document this file
+**/
+
+#include "theory/quantifiers/inst_match_generator.h"
+#include "theory/quantifiers/trigger.h"
+#include "theory/quantifiers/term_database.h"
+#include "theory/quantifiers/candidate_generator.h"
+#include "theory/quantifiers_engine.h"
+
+using namespace std;
+using namespace CVC4;
+using namespace CVC4::kind;
+using namespace CVC4::context;
+using namespace CVC4::theory;
+
+namespace CVC4 {
+namespace theory {
+namespace inst {
+
+
+InstMatchGenerator::InstMatchGenerator( Node pat, int matchPolicy ) : d_matchPolicy( matchPolicy ){
+ d_active_add = false;
+ Assert( pat.hasAttribute(InstConstantAttribute()) );
+ d_pattern = pat;
+ d_match_pattern = pat;
+ d_next = NULL;
+}
+
+void InstMatchGenerator::setActiveAdd(){
+ d_active_add = true;
+ if( d_next!=NULL ){
+ d_next->setActiveAdd();
+ }
+}
+
+void InstMatchGenerator::initialize( QuantifiersEngine* qe, std::vector< InstMatchGenerator * > & gens ){
+ if( !d_pattern.isNull() ){
+ Debug("inst-match-gen") << "Pattern term is " << d_pattern << std::endl;
+ if( d_match_pattern.getKind()==NOT ){
+ //we want to add the children of the NOT
+ d_match_pattern = d_pattern[0];
+ }
+ if( d_match_pattern.getKind()==IFF || d_match_pattern.getKind()==EQUAL ){
+ if( !d_match_pattern[0].hasAttribute(InstConstantAttribute()) ){
+ Assert( d_match_pattern[1].hasAttribute(InstConstantAttribute()) );
+ //swap sides
+ Node pat = d_pattern;
+ d_pattern = NodeManager::currentNM()->mkNode( d_match_pattern.getKind(), d_match_pattern[1], d_match_pattern[0] );
+ d_pattern = pat.getKind()==NOT ? d_pattern.notNode() : d_pattern;
+ if( pat.getKind()!=NOT ){ //TEMPORARY until we do better implementation of disequality matching
+ d_match_pattern = d_match_pattern[1];
+ }else{
+ d_match_pattern = d_pattern[0][0];
+ }
+ }else if( !d_match_pattern[1].hasAttribute(InstConstantAttribute()) ){
+ Assert( d_match_pattern[0].hasAttribute(InstConstantAttribute()) );
+ if( d_pattern.getKind()!=NOT ){ //TEMPORARY until we do better implementation of disequality matching
+ d_match_pattern = d_match_pattern[0];
+ }
+ }
+ }
+ int childMatchPolicy = MATCH_GEN_DEFAULT;
+ for( int i=0; i<(int)d_match_pattern.getNumChildren(); i++ ){
+ if( d_match_pattern[i].hasAttribute(InstConstantAttribute()) ){
+ if( d_match_pattern[i].getKind()!=INST_CONSTANT ){
+ InstMatchGenerator * cimg = new InstMatchGenerator( d_match_pattern[i], childMatchPolicy );
+ d_children.push_back( cimg );
+ d_children_index.push_back( i );
+ gens.push_back( cimg );
+ }
+ }
+ }
+
+ Debug("inst-match-gen") << "Pattern is " << d_pattern << ", match pattern is " << d_match_pattern << std::endl;
+
+ //create candidate generator
+ if( d_match_pattern.getKind()==EQUAL || d_match_pattern.getKind()==IFF ){
+ Assert( d_matchPolicy==MATCH_GEN_DEFAULT );
+ //we will be producing candidates via literal matching heuristics
+ if( d_pattern.getKind()!=NOT ){
+ //candidates will be all equalities
+ d_cg = new inst::CandidateGeneratorQELitEq( qe, d_match_pattern );
+ }else{
+ //candidates will be all disequalities
+ d_cg = new inst::CandidateGeneratorQELitDeq( qe, d_match_pattern );
+ }
+ }else if( d_pattern.getKind()==EQUAL || d_pattern.getKind()==IFF || d_pattern.getKind()==NOT ){
+ Assert( d_matchPolicy==MATCH_GEN_DEFAULT );
+ if( d_pattern.getKind()==NOT ){
+ Unimplemented("Disequal generator unimplemented");
+ }else{
+ Assert( Trigger::isAtomicTrigger( d_match_pattern ) );
+ //we are matching only in a particular equivalence class
+ d_cg = new inst::CandidateGeneratorQE( qe, d_match_pattern.getOperator() );
+ //store the equivalence class that we will call d_cg->reset( ... ) on
+ d_eq_class = d_pattern[1];
+ }
+ }else if( Trigger::isAtomicTrigger( d_match_pattern ) ){
+ //if( d_matchPolicy==MATCH_GEN_EFFICIENT_E_MATCH ){
+ //Warning() << "Currently efficient e matching is not taken into account for quantifiers: " << d_pattern << std::endl;
+ //}
+ //we will be scanning lists trying to find d_match_pattern.getOperator()
+ d_cg = new inst::CandidateGeneratorQE( qe, d_match_pattern.getOperator() );
+ }else{
+ d_cg = new CandidateGeneratorQueue;
+ if( !Trigger::getPatternArithmetic( d_match_pattern.getAttribute(InstConstantAttribute()), d_match_pattern, d_arith_coeffs ) ){
+ Debug("inst-match-gen") << "(?) Unknown matching pattern is " << d_match_pattern << std::endl;
+ //Warning() << "(?) Unknown matching pattern is " << d_match_pattern << std::endl;
+ d_matchPolicy = MATCH_GEN_INTERNAL_ERROR;
+ }else{
+ Debug("matching-arith") << "Generated arithmetic pattern for " << d_match_pattern << ": " << std::endl;
+ for( std::map< Node, Node >::iterator it = d_arith_coeffs.begin(); it != d_arith_coeffs.end(); ++it ){
+ Debug("matching-arith") << " " << it->first << " -> " << it->second << std::endl;
+ }
+ //we will treat this as match gen internal arithmetic
+ d_matchPolicy = MATCH_GEN_INTERNAL_ARITHMETIC;
+ }
+ }
+ }
+}
+
+/** get match (not modulo equality) */
+bool InstMatchGenerator::getMatch( Node f, Node t, InstMatch& m, QuantifiersEngine* qe ){
+ Debug("matching") << "Matching " << t << " against pattern " << d_match_pattern << " ("
+ << m << ")" << ", " << d_children.size() << std::endl;
+ Assert( !d_match_pattern.isNull() );
+ if( qe->d_optMatchIgnoreModelBasis && t.getAttribute(ModelBasisAttribute()) ){
+ return true;
+ }else if( d_matchPolicy==MATCH_GEN_INTERNAL_ARITHMETIC ){
+ return getMatchArithmetic( t, m, qe );
+ }else if( d_matchPolicy==MATCH_GEN_INTERNAL_ERROR ){
+ return false;
+ }else{
+ EqualityQuery* q = qe->getEqualityQuery();
+ bool success = true;
+ //save previous match
+ InstMatch prev( &m );
+ //if t is null
+ Assert( !t.isNull() );
+ Assert( !t.hasAttribute(InstConstantAttribute()) );
+ Assert( t.getKind()==d_match_pattern.getKind() );
+ Assert( !Trigger::isAtomicTrigger( d_match_pattern ) || t.getOperator()==d_match_pattern.getOperator() );
+ //first, check if ground arguments are not equal, or a match is in conflict
+ for( int i=0; i<(int)d_match_pattern.getNumChildren(); i++ ){
+ if( d_match_pattern[i].hasAttribute(InstConstantAttribute()) ){
+ if( d_match_pattern[i].getKind()==INST_CONSTANT ){
+ if( !m.setMatch( q, d_match_pattern[i], t[i] ) ){
+ //match is in conflict
+ Debug("matching-debug") << "Match in conflict " << t[i] << " and "
+ << d_match_pattern[i] << " because "
+ << m.get(d_match_pattern[i])
+ << std::endl;
+ Debug("matching-fail") << "Match fail: " << m.get(d_match_pattern[i]) << " and " << t[i] << std::endl;
+ success = false;
+ break;
+ }
+ }
+ }else{
+ if( !q->areEqual( d_match_pattern[i], t[i] ) ){
+ Debug("matching-fail") << "Match fail arg: " << d_match_pattern[i] << " and " << t[i] << std::endl;
+ //ground arguments are not equal
+ success = false;
+ break;
+ }
+ }
+ }
+ if( success ){
+ //now, fit children into match
+ //we will be requesting candidates for matching terms for each child
+ std::vector< Node > reps;
+ for( int i=0; i<(int)d_children.size(); i++ ){
+ Node rep = q->getRepresentative( t[ d_children_index[i] ] );
+ reps.push_back( rep );
+ d_children[i]->reset( rep, qe );
+ }
+ if( d_next!=NULL ){
+ success = d_next->getNextMatch( f, m, qe );
+ }else{
+ if( d_active_add ){
+ Trace("active-add") << "Active Adding instantiation " << m << std::endl;
+ success = qe->addInstantiation( f, m );
+ Trace("active-add") << "Success = " << success << std::endl;
+ }
+ }
+ }
+ if( !success ){
+ m = InstMatch( &prev );
+ }
+ return success;
+ }
+}
+
+bool InstMatchGenerator::getMatchArithmetic( Node t, InstMatch& m, QuantifiersEngine* qe ){
+ Debug("matching-arith") << "Matching " << t << " " << d_match_pattern << std::endl;
+ if( !d_arith_coeffs.empty() ){
+ NodeBuilder<> tb(kind::PLUS);
+ Node ic = Node::null();
+ for( std::map< Node, Node >::iterator it = d_arith_coeffs.begin(); it != d_arith_coeffs.end(); ++it ){
+ Debug("matching-arith") << it->first << " -> " << it->second << std::endl;
+ if( !it->first.isNull() ){
+ if( m.find( it->first )==m.end() ){
+ //see if we can choose this to set
+ if( ic.isNull() && ( it->second.isNull() || !it->first.getType().isInteger() ) ){
+ ic = it->first;
+ }
+ }else{
+ Debug("matching-arith") << "already set " << m.get( it->first ) << std::endl;
+ Node tm = m.get( it->first );
+ if( !it->second.isNull() ){
+ tm = NodeManager::currentNM()->mkNode( MULT, it->second, tm );
+ }
+ tb << tm;
+ }
+ }else{
+ tb << it->second;
+ }
+ }
+ if( !ic.isNull() ){
+ Node tm;
+ if( tb.getNumChildren()==0 ){
+ tm = t;
+ }else{
+ tm = tb.getNumChildren()==1 ? tb.getChild( 0 ) : tb;
+ tm = NodeManager::currentNM()->mkNode( MINUS, t, tm );
+ }
+ if( !d_arith_coeffs[ ic ].isNull() ){
+ Assert( !ic.getType().isInteger() );
+ Node coeff = NodeManager::currentNM()->mkConst( Rational(1) / d_arith_coeffs[ ic ].getConst<Rational>() );
+ tm = NodeManager::currentNM()->mkNode( MULT, coeff, tm );
+ }
+ m.set( ic, Rewriter::rewrite( tm ));
+ //set the rest to zeros
+ for( std::map< Node, Node >::iterator it = d_arith_coeffs.begin(); it != d_arith_coeffs.end(); ++it ){
+ if( !it->first.isNull() ){
+ if( m.find( it->first )==m.end() ){
+ m.set( it->first, NodeManager::currentNM()->mkConst( Rational(0) ) );
+ }
+ }
+ }
+ Debug("matching-arith") << "Setting " << ic << " to " << tm << std::endl;
+ return true;
+ }else{
+ return false;
+ }
+ }else{
+ return false;
+ }
+}
+
+
+/** reset instantiation round */
+void InstMatchGenerator::resetInstantiationRound( QuantifiersEngine* qe ){
+ if( d_match_pattern.isNull() ){
+ for( int i=0; i<(int)d_children.size(); i++ ){
+ d_children[i]->resetInstantiationRound( qe );
+ }
+ }else{
+ if( d_cg ){
+ d_cg->resetInstantiationRound();
+ }
+ }
+}
+
+void InstMatchGenerator::reset( Node eqc, QuantifiersEngine* qe ){
+ if( !eqc.isNull() ){
+ d_eq_class = eqc;
+ }
+ //we have a specific equivalence class in mind
+ //we are producing matches for f(E) ~ t, where E is a non-ground vector of terms, and t is a ground term
+ //just look in equivalence class of the RHS
+ d_cg->reset( d_eq_class );
+}
+
+bool InstMatchGenerator::getNextMatch( Node f, InstMatch& m, QuantifiersEngine* qe ){
+ m.d_matched = Node::null();
+ //Debug("matching") << this << " " << d_pattern << " get next match 2 " << m << " in eq class " << d_eq_class << std::endl;
+ bool success = false;
+ Node t;
+ do{
+ //get the next candidate term t
+ t = d_cg->getNextCandidate();
+ //if t not null, try to fit it into match m
+ if( !t.isNull() && t.getType()==d_match_pattern.getType() ){
+ success = getMatch( f, t, m, qe );
+ }
+ }while( !success && !t.isNull() );
+ m.d_matched = t;
+ if( !success ){
+ //Debug("matching") << this << " failed, reset " << d_eq_class << std::endl;
+ //we failed, must reset
+ reset( d_eq_class, qe );
+ }
+ return success;
+}
+
+
+
+int InstMatchGenerator::addInstantiations( Node f, InstMatch& baseMatch, QuantifiersEngine* qe ){
+ //try to add instantiation for each match produced
+ int addedLemmas = 0;
+ InstMatch m;
+ while( getNextMatch( f, m, qe ) ){
+ if( !d_active_add ){
+ //m.makeInternal( d_quantEngine->getEqualityQuery() );
+ m.add( baseMatch );
+ if( qe->addInstantiation( f, m ) ){
+ addedLemmas++;
+ if( qe->d_optInstLimitActive && qe->d_optInstLimit<=0 ){
+ return addedLemmas;
+ }
+ }
+ }else{
+ addedLemmas++;
+ }
+ m.clear();
+ }
+ //return number of lemmas added
+ return addedLemmas;
+}
+
+int InstMatchGenerator::addTerm( Node f, Node t, QuantifiersEngine* qe ){
+ Assert( options::eagerInstQuant() );
+ if( !d_match_pattern.isNull() ){
+ InstMatch m;
+ if( getMatch( f, t, m, qe ) ){
+ if( qe->addInstantiation( f, m ) ){
+ return 1;
+ }
+ }
+ }else{
+ for( int i=0; i<(int)d_children.size(); i++ ){
+ d_children[i]->addTerm( f, t, qe );
+ }
+ }
+ return 0;
+}
+
+
+InstMatchGenerator* InstMatchGenerator::mkInstMatchGenerator( Node pat, QuantifiersEngine* qe ) {
+ std::vector< Node > pats;
+ pats.push_back( pat );
+ return mkInstMatchGenerator( pats, qe );
+}
+
+InstMatchGenerator* InstMatchGenerator::mkInstMatchGenerator( std::vector< Node >& pats, QuantifiersEngine* qe ) {
+ size_t pCounter = 0;
+ InstMatchGenerator* prev = NULL;
+ InstMatchGenerator* oinit = NULL;
+ while( pCounter<pats.size() ){
+ size_t counter = 0;
+ std::vector< InstMatchGenerator* > gens;
+ InstMatchGenerator* init = new InstMatchGenerator(pats[pCounter]);
+ if(pCounter==0){
+ oinit = init;
+ }
+ gens.push_back(init);
+ //chain the resulting match generators together
+ while (counter<gens.size()) {
+ InstMatchGenerator* curr = gens[counter];
+ if( prev ){
+ prev->d_next = curr;
+ }
+ curr->initialize(qe, gens);
+ prev = curr;
+ counter++;
+ }
+ pCounter++;
+ }
+ return oinit;
+}
+
+/** constructors */
+InstMatchGeneratorMulti::InstMatchGeneratorMulti( Node f, std::vector< Node >& pats, QuantifiersEngine* qe, int matchOption ) :
+d_f( f ){
+ Debug("smart-multi-trigger") << "Making smart multi-trigger for " << f << std::endl;
+ std::map< Node, std::vector< Node > > var_contains;
+ qe->getTermDatabase()->getVarContains( f, pats, var_contains );
+ //convert to indicies
+ for( std::map< Node, std::vector< Node > >::iterator it = var_contains.begin(); it != var_contains.end(); ++it ){
+ Debug("smart-multi-trigger") << "Pattern " << it->first << " contains: ";
+ for( int i=0; i<(int)it->second.size(); i++ ){
+ Debug("smart-multi-trigger") << it->second[i] << " ";
+ int index = it->second[i].getAttribute(InstVarNumAttribute());
+ d_var_contains[ it->first ].push_back( index );
+ d_var_to_node[ index ].push_back( it->first );
+ }
+ Debug("smart-multi-trigger") << std::endl;
+ }
+ for( int i=0; i<(int)pats.size(); i++ ){
+ Node n = pats[i];
+ //make the match generator
+ d_children.push_back( InstMatchGenerator::mkInstMatchGenerator( n, qe ) );
+ //compute unique/shared variables
+ std::vector< int > unique_vars;
+ std::map< int, bool > shared_vars;
+ int numSharedVars = 0;
+ for( int j=0; j<(int)d_var_contains[n].size(); j++ ){
+ if( d_var_to_node[ d_var_contains[n][j] ].size()==1 ){
+ Debug("smart-multi-trigger") << "Var " << d_var_contains[n][j] << " is unique to " << pats[i] << std::endl;
+ unique_vars.push_back( d_var_contains[n][j] );
+ }else{
+ shared_vars[ d_var_contains[n][j] ] = true;
+ numSharedVars++;
+ }
+ }
+ //we use the latest shared variables, then unique variables
+ std::vector< int > vars;
+ int index = i==0 ? (int)(pats.size()-1) : (i-1);
+ while( numSharedVars>0 && index!=i ){
+ for( std::map< int, bool >::iterator it = shared_vars.begin(); it != shared_vars.end(); ++it ){
+ if( it->second ){
+ if( std::find( d_var_contains[ pats[index] ].begin(), d_var_contains[ pats[index] ].end(), it->first )!=
+ d_var_contains[ pats[index] ].end() ){
+ vars.push_back( it->first );
+ shared_vars[ it->first ] = false;
+ numSharedVars--;
+ }
+ }
+ }
+ index = index==0 ? (int)(pats.size()-1) : (index-1);
+ }
+ vars.insert( vars.end(), unique_vars.begin(), unique_vars.end() );
+ Debug("smart-multi-trigger") << " Index[" << i << "]: ";
+ for( int i=0; i<(int)vars.size(); i++ ){
+ Debug("smart-multi-trigger") << vars[i] << " ";
+ }
+ Debug("smart-multi-trigger") << std::endl;
+ //make ordered inst match trie
+ InstMatchTrie::ImtIndexOrder* imtio = new InstMatchTrie::ImtIndexOrder;
+ imtio->d_order.insert( imtio->d_order.begin(), vars.begin(), vars.end() );
+ d_children_trie.push_back( InstMatchTrieOrdered( imtio ) );
+ }
+
+}
+
+/** reset instantiation round (call this whenever equivalence classes have changed) */
+void InstMatchGeneratorMulti::resetInstantiationRound( QuantifiersEngine* qe ){
+ for( int i=0; i<(int)d_children.size(); i++ ){
+ d_children[i]->resetInstantiationRound( qe );
+ }
+}
+
+/** reset, eqc is the equivalence class to search in (any if eqc=null) */
+void InstMatchGeneratorMulti::reset( Node eqc, QuantifiersEngine* qe ){
+ for( int i=0; i<(int)d_children.size(); i++ ){
+ d_children[i]->reset( eqc, qe );
+ }
+}
+
+int InstMatchGeneratorMulti::addInstantiations( Node f, InstMatch& baseMatch, QuantifiersEngine* qe ){
+ int addedLemmas = 0;
+ Debug("smart-multi-trigger") << "Process smart multi trigger" << std::endl;
+ for( int i=0; i<(int)d_children.size(); i++ ){
+ Debug("smart-multi-trigger") << "Calculate matches " << i << std::endl;
+ std::vector< InstMatch > newMatches;
+ InstMatch m;
+ while( d_children[i]->getNextMatch( f, m, qe ) ){
+ //m.makeRepresentative( qe );
+ newMatches.push_back( InstMatch( &m ) );
+ m.clear();
+ }
+ Debug("smart-multi-trigger") << "Made " << newMatches.size() << " new matches for index " << i << std::endl;
+ for( int j=0; j<(int)newMatches.size(); j++ ){
+ processNewMatch( qe, newMatches[j], i, addedLemmas );
+ }
+ }
+ return addedLemmas;
+}
+
+void InstMatchGeneratorMulti::processNewMatch( QuantifiersEngine* qe, InstMatch& m, int fromChildIndex, int& addedLemmas ){
+ //see if these produce new matches
+ d_children_trie[fromChildIndex].addInstMatch( qe, d_f, m, true );
+ //possibly only do the following if we know that new matches will be produced?
+ //the issue is that instantiations are filtered in quantifiers engine, and so there is no guarentee that
+ // we can safely skip the following lines, even when we have already produced this match.
+ Debug("smart-multi-trigger") << "Child " << fromChildIndex << " produced match " << m << std::endl;
+ //process new instantiations
+ int childIndex = (fromChildIndex+1)%(int)d_children.size();
+ std::vector< IndexedTrie > unique_var_tries;
+ processNewInstantiations( qe, m, addedLemmas, d_children_trie[childIndex].getTrie(),
+ unique_var_tries, 0, childIndex, fromChildIndex, true );
+}
+
+void InstMatchGeneratorMulti::processNewInstantiations( QuantifiersEngine* qe, InstMatch& m, int& addedLemmas, InstMatchTrie* tr,
+ std::vector< IndexedTrie >& unique_var_tries,
+ int trieIndex, int childIndex, int endChildIndex, bool modEq ){
+ if( childIndex==endChildIndex ){
+ //now, process unique variables
+ processNewInstantiations2( qe, m, addedLemmas, unique_var_tries, 0 );
+ }else if( trieIndex<(int)d_children_trie[childIndex].getOrdering()->d_order.size() ){
+ int curr_index = d_children_trie[childIndex].getOrdering()->d_order[trieIndex];
+ Node curr_ic = qe->getTermDatabase()->getInstantiationConstant( d_f, curr_index );
+ if( m.find( curr_ic )==m.end() ){
+ //if( d_var_to_node[ curr_index ].size()==1 ){ //FIXME
+ // //unique variable(s), defer calculation
+ // unique_var_tries.push_back( IndexedTrie( std::pair< int, int >( childIndex, trieIndex ), tr ) );
+ // int newChildIndex = (childIndex+1)%(int)d_children.size();
+ // processNewInstantiations( qe, m, d_children_trie[newChildIndex].getTrie(), unique_var_tries,
+ // 0, newChildIndex, endChildIndex, modEq );
+ //}else{
+ //shared and non-set variable, add to InstMatch
+ for( std::map< Node, InstMatchTrie >::iterator it = tr->d_data.begin(); it != tr->d_data.end(); ++it ){
+ InstMatch mn( &m );
+ mn.set( curr_ic, it->first);
+ processNewInstantiations( qe, mn, addedLemmas, &(it->second), unique_var_tries,
+ trieIndex+1, childIndex, endChildIndex, modEq );
+ }
+ //}
+ }else{
+ //shared and set variable, try to merge
+ Node n = m.get( curr_ic );
+ std::map< Node, InstMatchTrie >::iterator it = tr->d_data.find( n );
+ if( it!=tr->d_data.end() ){
+ processNewInstantiations( qe, m, addedLemmas, &(it->second), unique_var_tries,
+ trieIndex+1, childIndex, endChildIndex, modEq );
+ }
+ if( modEq ){
+ //check modulo equality for other possible instantiations
+ if( qe->getEqualityQuery()->getEngine()->hasTerm( n ) ){
+ eq::EqClassIterator eqc( qe->getEqualityQuery()->getEngine()->getRepresentative( n ),
+ qe->getEqualityQuery()->getEngine() );
+ while( !eqc.isFinished() ){
+ Node en = (*eqc);
+ if( en!=n ){
+ std::map< Node, InstMatchTrie >::iterator itc = tr->d_data.find( en );
+ if( itc!=tr->d_data.end() ){
+ processNewInstantiations( qe, m, addedLemmas, &(itc->second), unique_var_tries,
+ trieIndex+1, childIndex, endChildIndex, modEq );
+ }
+ }
+ ++eqc;
+ }
+ }
+ }
+ }
+ }else{
+ int newChildIndex = (childIndex+1)%(int)d_children.size();
+ processNewInstantiations( qe, m, addedLemmas, d_children_trie[newChildIndex].getTrie(), unique_var_tries,
+ 0, newChildIndex, endChildIndex, modEq );
+ }
+}
+
+void InstMatchGeneratorMulti::processNewInstantiations2( QuantifiersEngine* qe, InstMatch& m, int& addedLemmas,
+ std::vector< IndexedTrie >& unique_var_tries,
+ int uvtIndex, InstMatchTrie* tr, int trieIndex ){
+ if( uvtIndex<(int)unique_var_tries.size() ){
+ int childIndex = unique_var_tries[uvtIndex].first.first;
+ if( !tr ){
+ tr = unique_var_tries[uvtIndex].second;
+ trieIndex = unique_var_tries[uvtIndex].first.second;
+ }
+ if( trieIndex<(int)d_children_trie[childIndex].getOrdering()->d_order.size() ){
+ int curr_index = d_children_trie[childIndex].getOrdering()->d_order[trieIndex];
+ Node curr_ic = qe->getTermDatabase()->getInstantiationConstant( d_f, curr_index );
+ //unique non-set variable, add to InstMatch
+ for( std::map< Node, InstMatchTrie >::iterator it = tr->d_data.begin(); it != tr->d_data.end(); ++it ){
+ InstMatch mn( &m );
+ mn.set( curr_ic, it->first);
+ processNewInstantiations2( qe, mn, addedLemmas, unique_var_tries, uvtIndex, &(it->second), trieIndex+1 );
+ }
+ }else{
+ processNewInstantiations2( qe, m, addedLemmas, unique_var_tries, uvtIndex+1 );
+ }
+ }else{
+ //m is an instantiation
+ if( qe->addInstantiation( d_f, m ) ){
+ addedLemmas++;
+ Debug("smart-multi-trigger") << "-> Produced instantiation " << m << std::endl;
+ }
+ }
+}
+
+int InstMatchGeneratorMulti::addTerm( Node f, Node t, QuantifiersEngine* qe ){
+ Assert( options::eagerInstQuant() );
+ int addedLemmas = 0;
+ for( int i=0; i<(int)d_children.size(); i++ ){
+ if( ((InstMatchGenerator*)d_children[i])->d_match_pattern.getOperator()==t.getOperator() ){
+ InstMatch m;
+ //if it produces a match, then process it with the rest
+ if( ((InstMatchGenerator*)d_children[i])->getMatch( f, t, m, qe ) ){
+ processNewMatch( qe, m, i, addedLemmas );
+ }
+ }
+ }
+ return addedLemmas;
+}
+
+int InstMatchGeneratorSimple::addInstantiations( Node f, InstMatch& baseMatch, QuantifiersEngine* qe ){
+ InstMatch m;
+ m.add( baseMatch );
+ int addedLemmas = 0;
+ if( d_match_pattern.getType()==NodeManager::currentNM()->booleanType() ){
+ for( int i=0; i<2; i++ ){
+ addInstantiations( m, qe, addedLemmas, 0, &(qe->getTermDatabase()->d_pred_map_trie[i][ d_match_pattern.getOperator() ]) );
+ }
+ }else{
+ addInstantiations( m, qe, addedLemmas, 0, &(qe->getTermDatabase()->d_func_map_trie[ d_match_pattern.getOperator() ]) );
+ }
+ return addedLemmas;
+}
+
+void InstMatchGeneratorSimple::addInstantiations( InstMatch& m, QuantifiersEngine* qe, int& addedLemmas, int argIndex, quantifiers::TermArgTrie* tat ){
+ if( argIndex==(int)d_match_pattern.getNumChildren() ){
+ //m is an instantiation
+ if( qe->addInstantiation( d_f, m ) ){
+ addedLemmas++;
+ Debug("simple-multi-trigger") << "-> Produced instantiation " << m << std::endl;
+ }
+ }else{
+ if( d_match_pattern[argIndex].getKind()==INST_CONSTANT ){
+ Node ic = d_match_pattern[argIndex];
+ for( std::map< Node, quantifiers::TermArgTrie >::iterator it = tat->d_data.begin(); it != tat->d_data.end(); ++it ){
+ Node t = it->first;
+ if( ( m.get( ic ).isNull() || m.get( ic )==t ) && ic.getType()==t.getType() ){
+ Node prev = m.get( ic );
+ m.set( ic, t);
+ addInstantiations( m, qe, addedLemmas, argIndex+1, &(it->second) );
+ m.set( ic, prev);
+ }
+ }
+ }else{
+ Node r = qe->getEqualityQuery()->getRepresentative( d_match_pattern[argIndex] );
+ std::map< Node, quantifiers::TermArgTrie >::iterator it = tat->d_data.find( r );
+ if( it!=tat->d_data.end() ){
+ addInstantiations( m, qe, addedLemmas, argIndex+1, &(it->second) );
+ }
+ }
+ }
+}
+
+int InstMatchGeneratorSimple::addTerm( Node f, Node t, QuantifiersEngine* qe ){
+ Assert( options::eagerInstQuant() );
+ InstMatch m;
+ for( int i=0; i<(int)t.getNumChildren(); i++ ){
+ if( d_match_pattern[i].getKind()==INST_CONSTANT ){
+ m.set(d_match_pattern[i], t[i]);
+ }else if( !qe->getEqualityQuery()->areEqual( d_match_pattern[i], t[i] ) ){
+ return 0;
+ }
+ }
+ return qe->addInstantiation( f, m ) ? 1 : 0;
+}
+
+}/* CVC4::theory::inst namespace */
+}/* CVC4::theory namespace */
+}/* CVC4 namespace */
diff --git a/src/theory/quantifiers/inst_match_generator.h b/src/theory/quantifiers/inst_match_generator.h
index af65e809b..b201fa60f 100755..100644
--- a/src/theory/quantifiers/inst_match_generator.h
+++ b/src/theory/quantifiers/inst_match_generator.h
@@ -1,192 +1,194 @@
-/********************* */
-/*! \file inst_match_generator.h
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: bobot
- ** Minor contributors (to current version): mdeters
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief inst match generator class
- **/
-
-#include "cvc4_private.h"
-
-#ifndef __CVC4__THEORY__QUANTIFIERS__INST_MATCH_GENERATOR_H
-#define __CVC4__THEORY__QUANTIFIERS__INST_MATCH_GENERATOR_H
-
-#include "theory/quantifiers/inst_match.h"
-#include <map>
-
-namespace CVC4 {
-namespace theory {
-
-class QuantifiersEngine;
-namespace quantifiers{
- class TermArgTrie;
-}
-
-namespace inst {
-
-/** base class for producing InstMatch objects */
-class IMGenerator {
-public:
- /** reset instantiation round (call this at beginning of instantiation round) */
- virtual void resetInstantiationRound( QuantifiersEngine* qe ) = 0;
- /** reset, eqc is the equivalence class to search in (any if eqc=null) */
- virtual void reset( Node eqc, QuantifiersEngine* qe ) = 0;
- /** get the next match. must call reset( eqc ) before this function. */
- virtual bool getNextMatch( InstMatch& m, QuantifiersEngine* qe ) = 0;
- /** add instantiations directly */
- virtual int addInstantiations( Node f, InstMatch& baseMatch, QuantifiersEngine* qe ) = 0;
- /** add ground term t, called when t is added to term db */
- virtual int addTerm( Node f, Node t, QuantifiersEngine* qe ) = 0;
-};/* class IMGenerator */
-
-class CandidateGenerator;
-
-class InstMatchGenerator : public IMGenerator {
-private:
- /** candidate generator */
- CandidateGenerator* d_cg;
- /** policy to use for matching */
- int d_matchPolicy;
- /** children generators */
- std::vector< InstMatchGenerator* > d_children;
- std::vector< int > d_children_index;
- /** partial vector */
- std::vector< InstMatch > d_partial;
- /** eq class */
- Node d_eq_class;
- /** for arithmetic matching */
- std::map< Node, Node > d_arith_coeffs;
- /** initialize pattern */
- void initializePatterns( std::vector< Node >& pats, QuantifiersEngine* qe );
- void initializePattern( Node pat, QuantifiersEngine* qe );
-public:
- enum {
- //options for producing matches
- MATCH_GEN_DEFAULT = 0,
- MATCH_GEN_EFFICIENT_E_MATCH, //generate matches via Efficient E-matching for SMT solvers
- //others (internally used)
- MATCH_GEN_INTERNAL_ARITHMETIC,
- MATCH_GEN_INTERNAL_ERROR,
- };
-private:
- /** get the next match. must call d_cg->reset( ... ) before using.
- only valid for use where !d_match_pattern.isNull().
- */
- bool getNextMatch2( InstMatch& m, QuantifiersEngine* qe, bool saveMatched = false );
- /** for arithmetic */
- bool getMatchArithmetic( Node t, InstMatch& m, QuantifiersEngine* qe );
-public:
- /** get the match against ground term or formula t.
- d_match_pattern and t should have the same shape.
- only valid for use where !d_match_pattern.isNull().
- */
- bool getMatch( Node t, InstMatch& m, QuantifiersEngine* qe );
-
- /** constructors */
- InstMatchGenerator( Node pat, QuantifiersEngine* qe, int matchOption = 0 );
- InstMatchGenerator( std::vector< Node >& pats, QuantifiersEngine* qe, int matchOption = 0 );
- /** destructor */
- ~InstMatchGenerator(){}
- /** The pattern we are producing matches for.
- If null, this is a multi trigger that is merging matches from d_children.
- */
- Node d_pattern;
- /** match pattern */
- Node d_match_pattern;
-public:
- /** reset instantiation round (call this whenever equivalence classes have changed) */
- void resetInstantiationRound( QuantifiersEngine* qe );
- /** reset, eqc is the equivalence class to search in (any if eqc=null) */
- void reset( Node eqc, QuantifiersEngine* qe );
- /** get the next match. must call reset( eqc ) before this function. */
- bool getNextMatch( InstMatch& m, QuantifiersEngine* qe );
- /** add instantiations */
- int addInstantiations( Node f, InstMatch& baseMatch, QuantifiersEngine* qe );
- /** add ground term t */
- int addTerm( Node f, Node t, QuantifiersEngine* qe );
-};/* class InstMatchGenerator */
-
-/** smart multi-trigger implementation */
-class InstMatchGeneratorMulti : public IMGenerator {
-private:
- /** indexed trie */
- typedef std::pair< std::pair< int, int >, InstMatchTrie* > IndexedTrie;
- /** process new match */
- void processNewMatch( QuantifiersEngine* qe, InstMatch& m, int fromChildIndex, int& addedLemmas );
- /** process new instantiations */
- void processNewInstantiations( QuantifiersEngine* qe, InstMatch& m, int& addedLemmas, InstMatchTrie* tr,
- std::vector< IndexedTrie >& unique_var_tries,
- int trieIndex, int childIndex, int endChildIndex, bool modEq );
- /** process new instantiations 2 */
- void processNewInstantiations2( QuantifiersEngine* qe, InstMatch& m, int& addedLemmas,
- std::vector< IndexedTrie >& unique_var_tries,
- int uvtIndex, InstMatchTrie* tr = NULL, int trieIndex = 0 );
-private:
- /** var contains (variable indices) for each pattern node */
- std::map< Node, std::vector< int > > d_var_contains;
- /** variable indices contained to pattern nodes */
- std::map< int, std::vector< Node > > d_var_to_node;
- /** quantifier to use */
- Node d_f;
- /** policy to use for matching */
- int d_matchPolicy;
- /** children generators */
- std::vector< InstMatchGenerator* > d_children;
- /** inst match tries for each child */
- std::vector< InstMatchTrieOrdered > d_children_trie;
- /** calculate matches */
- void calculateMatches( QuantifiersEngine* qe );
-public:
- /** constructors */
- InstMatchGeneratorMulti( Node f, std::vector< Node >& pats, QuantifiersEngine* qe, int matchOption = 0 );
- /** destructor */
- ~InstMatchGeneratorMulti(){}
- /** reset instantiation round (call this whenever equivalence classes have changed) */
- void resetInstantiationRound( QuantifiersEngine* qe );
- /** reset, eqc is the equivalence class to search in (any if eqc=null) */
- void reset( Node eqc, QuantifiersEngine* qe );
- /** get the next match. must call reset( eqc ) before this function. (not implemented) */
- bool getNextMatch( InstMatch& m, QuantifiersEngine* qe ) { return false; }
- /** add instantiations */
- int addInstantiations( Node f, InstMatch& baseMatch, QuantifiersEngine* qe );
- /** add ground term t */
- int addTerm( Node f, Node t, QuantifiersEngine* qe );
-};/* class InstMatchGeneratorMulti */
-
-/** smart (single)-trigger implementation */
-class InstMatchGeneratorSimple : public IMGenerator {
-private:
- /** quantifier for match term */
- Node d_f;
- /** match term */
- Node d_match_pattern;
- /** add instantiations */
- void addInstantiations( InstMatch& m, QuantifiersEngine* qe, int& addedLemmas, int argIndex, quantifiers::TermArgTrie* tat );
-public:
- /** constructors */
- InstMatchGeneratorSimple( Node f, Node pat ) : d_f( f ), d_match_pattern( pat ){}
- /** destructor */
- ~InstMatchGeneratorSimple(){}
- /** reset instantiation round (call this whenever equivalence classes have changed) */
- void resetInstantiationRound( QuantifiersEngine* qe ) {}
- /** reset, eqc is the equivalence class to search in (any if eqc=null) */
- void reset( Node eqc, QuantifiersEngine* qe ) {}
- /** get the next match. must call reset( eqc ) before this function. (not implemented) */
- bool getNextMatch( InstMatch& m, QuantifiersEngine* qe ) { return false; }
- /** add instantiations */
- int addInstantiations( Node f, InstMatch& baseMatch, QuantifiersEngine* qe );
- /** add ground term t, possibly add instantiations */
- int addTerm( Node f, Node t, QuantifiersEngine* qe );
-};/* class InstMatchGeneratorSimple */
-
-}
-}
-}
-
-#endif
+/********************* */
+/*! \file inst_match_generator.h
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief inst match generator class
+ **/
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__THEORY__QUANTIFIERS__INST_MATCH_GENERATOR_H
+#define __CVC4__THEORY__QUANTIFIERS__INST_MATCH_GENERATOR_H
+
+#include "theory/quantifiers/inst_match.h"
+#include <map>
+
+namespace CVC4 {
+namespace theory {
+
+class QuantifiersEngine;
+namespace quantifiers{
+ class TermArgTrie;
+}
+
+namespace inst {
+
+/** base class for producing InstMatch objects */
+class IMGenerator {
+public:
+ /** reset instantiation round (call this at beginning of instantiation round) */
+ virtual void resetInstantiationRound( QuantifiersEngine* qe ) = 0;
+ /** reset, eqc is the equivalence class to search in (any if eqc=null) */
+ virtual void reset( Node eqc, QuantifiersEngine* qe ) = 0;
+ /** get the next match. must call reset( eqc ) before this function. */
+ virtual bool getNextMatch( Node f, InstMatch& m, QuantifiersEngine* qe ) = 0;
+ /** add instantiations directly */
+ virtual int addInstantiations( Node f, InstMatch& baseMatch, QuantifiersEngine* qe ) = 0;
+ /** add ground term t, called when t is added to term db */
+ virtual int addTerm( Node f, Node t, QuantifiersEngine* qe ) = 0;
+ /** set active add */
+ virtual void setActiveAdd() {}
+};/* class IMGenerator */
+
+class CandidateGenerator;
+
+class InstMatchGenerator : public IMGenerator {
+private:
+ /** candidate generator */
+ CandidateGenerator* d_cg;
+ /** policy to use for matching */
+ int d_matchPolicy;
+ /** children generators */
+ std::vector< InstMatchGenerator* > d_children;
+ std::vector< int > d_children_index;
+ /** the next generator in order */
+ InstMatchGenerator* d_next;
+ /** eq class */
+ Node d_eq_class;
+ /** for arithmetic matching */
+ std::map< Node, Node > d_arith_coeffs;
+ /** initialize pattern */
+ void initialize( QuantifiersEngine* qe, std::vector< InstMatchGenerator * > & gens );
+public:
+ enum {
+ //options for producing matches
+ MATCH_GEN_DEFAULT = 0,
+ MATCH_GEN_EFFICIENT_E_MATCH, //generate matches via Efficient E-matching for SMT solvers
+ //others (internally used)
+ MATCH_GEN_INTERNAL_ARITHMETIC,
+ MATCH_GEN_INTERNAL_ERROR,
+ };
+private:
+ /** for arithmetic */
+ bool getMatchArithmetic( Node t, InstMatch& m, QuantifiersEngine* qe );
+public:
+ /** get the match against ground term or formula t.
+ d_match_pattern and t should have the same shape.
+ only valid for use where !d_match_pattern.isNull().
+ */
+ bool getMatch( Node f, Node t, InstMatch& m, QuantifiersEngine* qe );
+
+ /** constructors */
+ InstMatchGenerator( Node pat, int matchOption = 0 );
+ /** destructor */
+ ~InstMatchGenerator(){}
+ /** The pattern we are producing matches for.
+ If null, this is a multi trigger that is merging matches from d_children.
+ */
+ Node d_pattern;
+ /** match pattern */
+ Node d_match_pattern;
+public:
+ /** reset instantiation round (call this whenever equivalence classes have changed) */
+ void resetInstantiationRound( QuantifiersEngine* qe );
+ /** reset, eqc is the equivalence class to search in (any if eqc=null) */
+ void reset( Node eqc, QuantifiersEngine* qe );
+ /** get the next match. must call reset( eqc ) before this function. */
+ bool getNextMatch( Node f, InstMatch& m, QuantifiersEngine* qe );
+ /** add instantiations */
+ int addInstantiations( Node f, InstMatch& baseMatch, QuantifiersEngine* qe );
+ /** add ground term t */
+ int addTerm( Node f, Node t, QuantifiersEngine* qe );
+
+ bool d_active_add;
+ void setActiveAdd();
+
+ static InstMatchGenerator* mkInstMatchGenerator( Node pat, QuantifiersEngine* qe );
+ static InstMatchGenerator* mkInstMatchGenerator( std::vector< Node >& pats, QuantifiersEngine* qe );
+};/* class InstMatchGenerator */
+
+/** smart multi-trigger implementation */
+class InstMatchGeneratorMulti : public IMGenerator {
+private:
+ /** indexed trie */
+ typedef std::pair< std::pair< int, int >, InstMatchTrie* > IndexedTrie;
+ /** process new match */
+ void processNewMatch( QuantifiersEngine* qe, InstMatch& m, int fromChildIndex, int& addedLemmas );
+ /** process new instantiations */
+ void processNewInstantiations( QuantifiersEngine* qe, InstMatch& m, int& addedLemmas, InstMatchTrie* tr,
+ std::vector< IndexedTrie >& unique_var_tries,
+ int trieIndex, int childIndex, int endChildIndex, bool modEq );
+ /** process new instantiations 2 */
+ void processNewInstantiations2( QuantifiersEngine* qe, InstMatch& m, int& addedLemmas,
+ std::vector< IndexedTrie >& unique_var_tries,
+ int uvtIndex, InstMatchTrie* tr = NULL, int trieIndex = 0 );
+private:
+ /** var contains (variable indices) for each pattern node */
+ std::map< Node, std::vector< int > > d_var_contains;
+ /** variable indices contained to pattern nodes */
+ std::map< int, std::vector< Node > > d_var_to_node;
+ /** quantifier to use */
+ Node d_f;
+ /** policy to use for matching */
+ int d_matchPolicy;
+ /** children generators */
+ std::vector< InstMatchGenerator* > d_children;
+ /** inst match tries for each child */
+ std::vector< InstMatchTrieOrdered > d_children_trie;
+ /** calculate matches */
+ void calculateMatches( QuantifiersEngine* qe );
+public:
+ /** constructors */
+ InstMatchGeneratorMulti( Node f, std::vector< Node >& pats, QuantifiersEngine* qe, int matchOption = 0 );
+ /** destructor */
+ ~InstMatchGeneratorMulti(){}
+ /** reset instantiation round (call this whenever equivalence classes have changed) */
+ void resetInstantiationRound( QuantifiersEngine* qe );
+ /** reset, eqc is the equivalence class to search in (any if eqc=null) */
+ void reset( Node eqc, QuantifiersEngine* qe );
+ /** get the next match. must call reset( eqc ) before this function. (not implemented) */
+ bool getNextMatch( Node f, InstMatch& m, QuantifiersEngine* qe ) { return false; }
+ /** add instantiations */
+ int addInstantiations( Node f, InstMatch& baseMatch, QuantifiersEngine* qe );
+ /** add ground term t */
+ int addTerm( Node f, Node t, QuantifiersEngine* qe );
+};/* class InstMatchGeneratorMulti */
+
+/** smart (single)-trigger implementation */
+class InstMatchGeneratorSimple : public IMGenerator {
+private:
+ /** quantifier for match term */
+ Node d_f;
+ /** match term */
+ Node d_match_pattern;
+ /** add instantiations */
+ void addInstantiations( InstMatch& m, QuantifiersEngine* qe, int& addedLemmas, int argIndex, quantifiers::TermArgTrie* tat );
+public:
+ /** constructors */
+ InstMatchGeneratorSimple( Node f, Node pat ) : d_f( f ), d_match_pattern( pat ){}
+ /** destructor */
+ ~InstMatchGeneratorSimple(){}
+ /** reset instantiation round (call this whenever equivalence classes have changed) */
+ void resetInstantiationRound( QuantifiersEngine* qe ) {}
+ /** reset, eqc is the equivalence class to search in (any if eqc=null) */
+ void reset( Node eqc, QuantifiersEngine* qe ) {}
+ /** get the next match. must call reset( eqc ) before this function. (not implemented) */
+ bool getNextMatch( Node f, InstMatch& m, QuantifiersEngine* qe ) { return false; }
+ /** add instantiations */
+ int addInstantiations( Node f, InstMatch& baseMatch, QuantifiersEngine* qe );
+ /** add ground term t, possibly add instantiations */
+ int addTerm( Node f, Node t, QuantifiersEngine* qe );
+};/* class InstMatchGeneratorSimple */
+
+}
+}
+}
+
+#endif
diff --git a/src/theory/quantifiers/inst_strategy_cbqi.cpp b/src/theory/quantifiers/inst_strategy_cbqi.cpp
index ddf763b73..b12fed619 100755..100644
--- a/src/theory/quantifiers/inst_strategy_cbqi.cpp
+++ b/src/theory/quantifiers/inst_strategy_cbqi.cpp
@@ -1,405 +1,405 @@
-/********************* */
-/*! \file inst_strategy_cbqi.cpp
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
- ** Minor contributors (to current version): bobot, mdeters
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief Implementation of cbqi instantiation strategies
- **/
-
-#include "theory/quantifiers/inst_strategy_cbqi.h"
-#include "theory/arith/theory_arith.h"
-#include "theory/theory_engine.h"
-#include "theory/quantifiers/options.h"
-#include "theory/quantifiers/term_database.h"
-
-using namespace std;
-using namespace CVC4;
-using namespace CVC4::kind;
-using namespace CVC4::context;
-using namespace CVC4::theory;
-using namespace CVC4::theory::quantifiers;
-using namespace CVC4::theory::arith;
-using namespace CVC4::theory::datatypes;
-
-#define ARITH_INSTANTIATOR_USE_MINUS_DELTA
-
-InstStrategySimplex::InstStrategySimplex( TheoryArith* th, QuantifiersEngine* ie ) :
- InstStrategy( ie ), d_th( th ), d_counter( 0 ){
- d_negOne = NodeManager::currentNM()->mkConst( Rational(-1) );
-}
-
-bool InstStrategySimplex::calculateShouldProcess( Node f ){
- //DO_THIS
- return false;
-}
-
-void InstStrategySimplex::processResetInstantiationRound( Theory::Effort effort ){
- Debug("quant-arith") << "Setting up simplex for instantiator... " << std::endl;
- d_instRows.clear();
- d_tableaux_term.clear();
- d_tableaux.clear();
- d_ceTableaux.clear();
- //search for instantiation rows in simplex tableaux
- ArithVarNodeMap& avnm = d_th->d_arithvarNodeMap;
- ArithVarNodeMap::var_iterator vi, vend;
- for(vi = avnm.var_begin(), vend = avnm.var_end(); vi != vend; ++vi ){
- ArithVar x = *vi;
- if( d_th->d_partialModel.hasEitherBound( x ) ){
- Node n = avnm.asNode(x);
- Node f;
- NodeBuilder<> t(kind::PLUS);
- if( n.getKind()==PLUS ){
- for( int i=0; i<(int)n.getNumChildren(); i++ ){
- addTermToRow( x, n[i], f, t );
- }
- }else{
- addTermToRow( x, n, f, t );
- }
- if( f!=Node::null() ){
- d_instRows[f].push_back( x );
- //this theory has constraints from f
- Debug("quant-arith") << "Has constraints from " << f << std::endl;
- //set that we should process it
- d_quantActive[ f ] = true;
- //set tableaux term
- if( t.getNumChildren()==0 ){
- d_tableaux_term[x] = NodeManager::currentNM()->mkConst( Rational(0) );
- }else if( t.getNumChildren()==1 ){
- d_tableaux_term[x] = t.getChild( 0 );
- }else{
- d_tableaux_term[x] = t;
- }
- }
- }
- }
- //print debug
- debugPrint( "quant-arith-debug" );
- d_counter++;
-}
-
-int InstStrategySimplex::process( Node f, Theory::Effort effort, int e ){
- if( e<2 ){
- return STATUS_UNFINISHED;
- }else if( e==2 ){
- //Notice() << f << std::endl;
- //Notice() << "Num inst rows = " << d_th->d_instRows[f].size() << std::endl;
- //Notice() << "Num inst constants = " << d_quantEngine->getNumInstantiationConstants( f ) << std::endl;
- Debug("quant-arith-simplex") << "InstStrategySimplex check " << f << ", rows = " << d_instRows[f].size() << std::endl;
- for( int j=0; j<(int)d_instRows[f].size(); j++ ){
- ArithVar x = d_instRows[f][j];
- if( !d_ceTableaux[x].empty() ){
- Debug("quant-arith-simplex") << "Check row " << x << std::endl;
- //instantiation row will be A*e + B*t = beta,
- // where e is a vector of terms , and t is vector of ground terms.
- // Say one term in A*e is coeff*e_i, where e_i is an instantiation constant
- // We will construct the term ( beta - B*t)/coeff to use for e_i.
- InstMatch m;
- //By default, choose the first instantiation constant to be e_i.
- Node var = d_ceTableaux[x].begin()->first;
- if( var.getType().isInteger() ){
- std::map< Node, Node >::iterator it = d_ceTableaux[x].begin();
- //try to find coefficent that is +/- 1
- while( !var.isNull() && !d_ceTableaux[x][var].isNull() && d_ceTableaux[x][var]!=d_negOne ){
- ++it;
- if( it==d_ceTableaux[x].end() ){
- var = Node::null();
- }else{
- var = it->first;
- }
- }
- //otherwise, try one that divides all ground term coefficients? DO_THIS
- }
- if( !var.isNull() ){
- Debug("quant-arith-simplex") << "Instantiate with var " << var << std::endl;
- doInstantiation( f, d_tableaux_term[x], x, m, var );
- }else{
- Debug("quant-arith-simplex") << "Could not find var." << std::endl;
- }
- ////choose a new variable based on alternation strategy
- //int index = d_counter%(int)d_th->d_ceTableaux[x].size();
- //Node var;
- //for( std::map< Node, Node >::iterator it = d_th->d_ceTableaux[x].begin(); it != d_th->d_ceTableaux[x].end(); ++it ){
- // if( index==0 ){
- // var = it->first;
- // break;
- // }
- // index--;
- //}
- //d_th->doInstantiation( f, d_th->d_tableaux_term[x], x, &m, var );
- }
- }
- }
- return STATUS_UNKNOWN;
-}
-
-
-void InstStrategySimplex::addTermToRow( ArithVar x, Node n, Node& f, NodeBuilder<>& t ){
- if( n.getKind()==MULT ){
- if( n[1].hasAttribute(InstConstantAttribute()) ){
- f = n[1].getAttribute(InstConstantAttribute());
- if( n[1].getKind()==INST_CONSTANT ){
- d_ceTableaux[x][ n[1] ] = n[0];
- }else{
- d_tableaux_ce_term[x][ n[1] ] = n[0];
- }
- }else{
- d_tableaux[x][ n[1] ] = n[0];
- t << n;
- }
- }else{
- if( n.hasAttribute(InstConstantAttribute()) ){
- f = n.getAttribute(InstConstantAttribute());
- if( n.getKind()==INST_CONSTANT ){
- d_ceTableaux[x][ n ] = Node::null();
- }else{
- d_tableaux_ce_term[x][ n ] = NodeManager::currentNM()->mkConst( Rational(1) );
- }
- }else{
- d_tableaux[x][ n ] = NodeManager::currentNM()->mkConst( Rational(1) );
- t << n;
- }
- }
-}
-
-void InstStrategySimplex::debugPrint( const char* c ){
- const ArithVarNodeMap& avnm = d_th->d_arithvarNodeMap;
- ArithVarNodeMap::var_iterator vi, vend;
- for(vi = avnm.var_begin(), vend = avnm.var_end(); vi != vend; ++vi ){
- ArithVar x = *vi;
- Node n = avnm.asNode(x);
- //if( ((TheoryArith*)getTheory())->d_partialModel.hasEitherBound( x ) ){
- Debug(c) << x << " : " << n << ", bounds = ";
- if( d_th->d_partialModel.hasLowerBound( x ) ){
- Debug(c) << d_th->d_partialModel.getLowerBound( x );
- }else{
- Debug(c) << "-infty";
- }
- Debug(c) << " <= ";
- Debug(c) << d_th->d_partialModel.getAssignment( x );
- Debug(c) << " <= ";
- if( d_th->d_partialModel.hasUpperBound( x ) ){
- Debug(c) << d_th->d_partialModel.getUpperBound( x );
- }else{
- Debug(c) << "+infty";
- }
- Debug(c) << std::endl;
- //Debug(c) << " Term = " << d_tableaux_term[x] << std::endl;
- //Debug(c) << " ";
- //for( std::map< Node, Node >::iterator it2 = d_tableaux[x].begin(); it2 != d_tableaux[x].end(); ++it2 ){
- // Debug(c) << "( " << it2->first << ", " << it2->second << " ) ";
- //}
- //for( std::map< Node, Node >::iterator it2 = d_ceTableaux[x].begin(); it2 != d_ceTableaux[x].end(); ++it2 ){
- // Debug(c) << "(CE)( " << it2->first << ", " << it2->second << " ) ";
- //}
- //for( std::map< Node, Node >::iterator it2 = d_tableaux_ce_term[x].begin(); it2 != d_tableaux_ce_term[x].end(); ++it2 ){
- // Debug(c) << "(CE-term)( " << it2->first << ", " << it2->second << " ) ";
- //}
- //Debug(c) << std::endl;
- //}
- }
- Debug(c) << std::endl;
-
- for( int q=0; q<d_quantEngine->getNumQuantifiers(); q++ ){
- Node f = d_quantEngine->getQuantifier( q );
- Debug(c) << f << std::endl;
- Debug(c) << " Inst constants: ";
- for( int i=0; i<(int)d_quantEngine->getTermDatabase()->getNumInstantiationConstants( f ); i++ ){
- if( i>0 ){
- Debug( c ) << ", ";
- }
- Debug( c ) << d_quantEngine->getTermDatabase()->getInstantiationConstant( f, i );
- }
- Debug(c) << std::endl;
- Debug(c) << " Instantiation rows: ";
- for( int i=0; i<(int)d_instRows[f].size(); i++ ){
- if( i>0 ){
- Debug(c) << ", ";
- }
- Debug(c) << d_instRows[f][i];
- }
- Debug(c) << std::endl;
- }
-}
-
-//say instantiation row x for quantifier f is coeff*var + A*t[e] + term = beta,
-// where var is an instantiation constant from f,
-// t[e] is a vector of terms containing instantiation constants from f,
-// and term is a ground term (c1*t1 + ... + cn*tn).
-// We construct the term ( beta - term )/coeff to use as an instantiation for var.
-bool InstStrategySimplex::doInstantiation( Node f, Node term, ArithVar x, InstMatch& m, Node var ){
- //first try +delta
- if( doInstantiation2( f, term, x, m, var ) ){
- ++(d_quantEngine->getInstantiationEngine()->d_statistics.d_instantiations_cbqi_arith);
- return true;
- }else{
-#ifdef ARITH_INSTANTIATOR_USE_MINUS_DELTA
- //otherwise try -delta
- if( doInstantiation2( f, term, x, m, var, true ) ){
- ++(d_quantEngine->getInstantiationEngine()->d_statistics.d_instantiations_cbqi_arith_minus);
- return true;
- }else{
- return false;
- }
-#else
- return false;
-#endif
- }
-}
-
-bool InstStrategySimplex::doInstantiation2( Node f, Node term, ArithVar x, InstMatch& m, Node var, bool minus_delta ){
- // make term ( beta - term )/coeff
- Node beta = getTableauxValue( x, minus_delta );
- Node instVal = NodeManager::currentNM()->mkNode( MINUS, beta, term );
- if( !d_ceTableaux[x][var].isNull() ){
- if( var.getType().isInteger() ){
- Assert( d_ceTableaux[x][var]==NodeManager::currentNM()->mkConst( Rational(-1) ) );
- instVal = NodeManager::currentNM()->mkNode( MULT, d_ceTableaux[x][var], instVal );
- }else{
- Node coeff = NodeManager::currentNM()->mkConst( Rational(1) / d_ceTableaux[x][var].getConst<Rational>() );
- instVal = NodeManager::currentNM()->mkNode( MULT, coeff, instVal );
- }
- }
- instVal = Rewriter::rewrite( instVal );
- //use as instantiation value for var
- m.set(var, instVal);
- Debug("quant-arith") << "Add instantiation " << m << std::endl;
- return d_quantEngine->addInstantiation( f, m );
-}
-
-Node InstStrategySimplex::getTableauxValue( Node n, bool minus_delta ){
- if( d_th->d_arithvarNodeMap.hasArithVar(n) ){
- ArithVar v = d_th->d_arithvarNodeMap.asArithVar( n );
- return getTableauxValue( v, minus_delta );
- }else{
- return NodeManager::currentNM()->mkConst( Rational(0) );
- }
-}
-
-Node InstStrategySimplex::getTableauxValue( ArithVar v, bool minus_delta ){
- const Rational& delta = d_th->d_partialModel.getDelta();
- DeltaRational drv = d_th->d_partialModel.getAssignment( v );
- Rational qmodel = drv.substituteDelta( minus_delta ? -delta : delta );
- return mkRationalNode(qmodel);
-}
-
-
-InstStrategyDatatypesValue::InstStrategyDatatypesValue( TheoryDatatypes* th, QuantifiersEngine* qe ) :
- InstStrategy( qe ), d_th( th ){
-
-}
-
-bool InstStrategyDatatypesValue::calculateShouldProcess( Node f ){
- //DO_THIS
- return false;
-}
-
-void InstStrategyDatatypesValue::processResetInstantiationRound( Theory::Effort effort ){
-
-}
-
-int InstStrategyDatatypesValue::process( Node f, Theory::Effort effort, int e ){
- Debug("quant-datatypes") << "Datatypes: Try to solve (" << e << ") for " << f << "... " << std::endl;
- if( e<2 ){
- return InstStrategy::STATUS_UNFINISHED;
- }else if( e==2 ){
- InstMatch m;
- for( int j = 0; j<(int)d_quantEngine->getTermDatabase()->getNumInstantiationConstants( f ); j++ ){
- Node i = d_quantEngine->getTermDatabase()->getInstantiationConstant( f, j );
- if( i.getType().isDatatype() ){
- Node n = getValueFor( i );
- Debug("quant-datatypes-debug") << "Value for " << i << " is " << n << std::endl;
- m.set(i,n);
- }
- }
- //d_quantEngine->addInstantiation( f, m );
- }
- return InstStrategy::STATUS_UNKNOWN;
-}
-
-Node InstStrategyDatatypesValue::getValueFor( Node n ){
- //simply get the ground value for n in the current model, if it exists,
- // or return an arbitrary ground term otherwise
- if( !n.hasAttribute(InstConstantAttribute()) ){
- return n;
- }else{
- return n;
- }
- /* FIXME
-
- Debug("quant-datatypes-debug") << "get value for " << n << std::endl;
- if( !n.hasAttribute(InstConstantAttribute()) ){
- return n;
- }else{
- Assert( n.getType().isDatatype() );
- //check if in equivalence class with ground term
- Node rep = getRepresentative( n );
- Debug("quant-datatypes-debug") << "Rep is " << rep << std::endl;
- if( !rep.hasAttribute(InstConstantAttribute()) ){
- return rep;
- }else{
- if( !n.getType().isDatatype() ){
- return n.getType().mkGroundTerm();
- }else{
- if( n.getKind()==APPLY_CONSTRUCTOR ){
- std::vector< Node > children;
- children.push_back( n.getOperator() );
- for( int i=0; i<(int)n.getNumChildren(); i++ ){
- children.push_back( getValueFor( n[i] ) );
- }
- return NodeManager::currentNM()->mkNode( APPLY_CONSTRUCTOR, children );
- }else{
- const Datatype& dt = ((DatatypeType)(n.getType()).toType()).getDatatype();
- TheoryDatatypes::EqLists* labels = &((TheoryDatatypes*)d_th)->d_labels;
- //otherwise, use which constructor the inst constant is current chosen to be
- if( labels->find( n )!=labels->end() ){
- TheoryDatatypes::EqList* lbl = (*labels->find( n )).second;
- int tIndex = -1;
- if( !lbl->empty() && (*lbl)[ lbl->size()-1 ].getKind()==APPLY_TESTER ){
- Debug("quant-datatypes-debug") << n << " tester is " << (*lbl)[ lbl->size()-1 ] << std::endl;
- tIndex = Datatype::indexOf((*lbl)[ lbl->size()-1 ].getOperator().toExpr());
- }else{
- Debug("quant-datatypes-debug") << "find possible tester choice" << std::endl;
- //must find a possible choice
- vector< bool > possibleCons;
- possibleCons.resize( dt.getNumConstructors(), true );
- for( TheoryDatatypes::EqList::const_iterator j = lbl->begin(); j != lbl->end(); j++ ) {
- Node leqn = (*j);
- possibleCons[ Datatype::indexOf( leqn[0].getOperator().toExpr() ) ] = false;
- }
- for( unsigned int j=0; j<possibleCons.size(); j++ ) {
- if( possibleCons[j] ){
- tIndex = j;
- break;
- }
- }
- }
- Assert( tIndex!=-1 );
- Node cons = Node::fromExpr( dt[ tIndex ].getConstructor() );
- Debug("quant-datatypes-debug") << n << " cons is " << cons << std::endl;
- std::vector< Node > children;
- children.push_back( cons );
- for( int i=0; i<(int)dt[ tIndex ].getNumArgs(); i++ ) {
- Node sn = NodeManager::currentNM()->mkNode( APPLY_SELECTOR, Node::fromExpr( dt[tIndex][i].getSelector() ), n );
- if( n.hasAttribute(InstConstantAttribute()) ){
- InstConstantAttribute ica;
- sn.setAttribute(ica,n.getAttribute(InstConstantAttribute()) );
- }
- Node snn = getValueFor( sn );
- children.push_back( snn );
- }
- return NodeManager::currentNM()->mkNode( APPLY_CONSTRUCTOR, children );
- }else{
- return n.getType().mkGroundTerm();
- }
- }
- }
- }
- }
- */
-}
+/********************* */
+/*! \file inst_strategy_cbqi.cpp
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief Implementation of cbqi instantiation strategies
+ **/
+
+#include "theory/quantifiers/inst_strategy_cbqi.h"
+#include "theory/arith/theory_arith.h"
+#include "theory/theory_engine.h"
+#include "theory/quantifiers/options.h"
+#include "theory/quantifiers/term_database.h"
+
+using namespace std;
+using namespace CVC4;
+using namespace CVC4::kind;
+using namespace CVC4::context;
+using namespace CVC4::theory;
+using namespace CVC4::theory::quantifiers;
+using namespace CVC4::theory::arith;
+using namespace CVC4::theory::datatypes;
+
+#define ARITH_INSTANTIATOR_USE_MINUS_DELTA
+
+InstStrategySimplex::InstStrategySimplex( TheoryArith* th, QuantifiersEngine* ie ) :
+ InstStrategy( ie ), d_th( th ), d_counter( 0 ){
+ d_negOne = NodeManager::currentNM()->mkConst( Rational(-1) );
+}
+
+bool InstStrategySimplex::calculateShouldProcess( Node f ){
+ //DO_THIS
+ return false;
+}
+
+void InstStrategySimplex::processResetInstantiationRound( Theory::Effort effort ){
+ Debug("quant-arith") << "Setting up simplex for instantiator... " << std::endl;
+ d_instRows.clear();
+ d_tableaux_term.clear();
+ d_tableaux.clear();
+ d_ceTableaux.clear();
+ //search for instantiation rows in simplex tableaux
+ ArithVarNodeMap& avnm = d_th->d_arithvarNodeMap;
+ ArithVarNodeMap::var_iterator vi, vend;
+ for(vi = avnm.var_begin(), vend = avnm.var_end(); vi != vend; ++vi ){
+ ArithVar x = *vi;
+ if( d_th->d_partialModel.hasEitherBound( x ) ){
+ Node n = avnm.asNode(x);
+ Node f;
+ NodeBuilder<> t(kind::PLUS);
+ if( n.getKind()==PLUS ){
+ for( int i=0; i<(int)n.getNumChildren(); i++ ){
+ addTermToRow( x, n[i], f, t );
+ }
+ }else{
+ addTermToRow( x, n, f, t );
+ }
+ if( f!=Node::null() ){
+ d_instRows[f].push_back( x );
+ //this theory has constraints from f
+ Debug("quant-arith") << "Has constraints from " << f << std::endl;
+ //set that we should process it
+ d_quantActive[ f ] = true;
+ //set tableaux term
+ if( t.getNumChildren()==0 ){
+ d_tableaux_term[x] = NodeManager::currentNM()->mkConst( Rational(0) );
+ }else if( t.getNumChildren()==1 ){
+ d_tableaux_term[x] = t.getChild( 0 );
+ }else{
+ d_tableaux_term[x] = t;
+ }
+ }
+ }
+ }
+ //print debug
+ debugPrint( "quant-arith-debug" );
+ d_counter++;
+}
+
+int InstStrategySimplex::process( Node f, Theory::Effort effort, int e ){
+ if( e<2 ){
+ return STATUS_UNFINISHED;
+ }else if( e==2 ){
+ //Notice() << f << std::endl;
+ //Notice() << "Num inst rows = " << d_th->d_instRows[f].size() << std::endl;
+ //Notice() << "Num inst constants = " << d_quantEngine->getNumInstantiationConstants( f ) << std::endl;
+ Debug("quant-arith-simplex") << "InstStrategySimplex check " << f << ", rows = " << d_instRows[f].size() << std::endl;
+ for( int j=0; j<(int)d_instRows[f].size(); j++ ){
+ ArithVar x = d_instRows[f][j];
+ if( !d_ceTableaux[x].empty() ){
+ Debug("quant-arith-simplex") << "Check row " << x << std::endl;
+ //instantiation row will be A*e + B*t = beta,
+ // where e is a vector of terms , and t is vector of ground terms.
+ // Say one term in A*e is coeff*e_i, where e_i is an instantiation constant
+ // We will construct the term ( beta - B*t)/coeff to use for e_i.
+ InstMatch m;
+ //By default, choose the first instantiation constant to be e_i.
+ Node var = d_ceTableaux[x].begin()->first;
+ if( var.getType().isInteger() ){
+ std::map< Node, Node >::iterator it = d_ceTableaux[x].begin();
+ //try to find coefficent that is +/- 1
+ while( !var.isNull() && !d_ceTableaux[x][var].isNull() && d_ceTableaux[x][var]!=d_negOne ){
+ ++it;
+ if( it==d_ceTableaux[x].end() ){
+ var = Node::null();
+ }else{
+ var = it->first;
+ }
+ }
+ //otherwise, try one that divides all ground term coefficients? DO_THIS
+ }
+ if( !var.isNull() ){
+ Debug("quant-arith-simplex") << "Instantiate with var " << var << std::endl;
+ doInstantiation( f, d_tableaux_term[x], x, m, var );
+ }else{
+ Debug("quant-arith-simplex") << "Could not find var." << std::endl;
+ }
+ ////choose a new variable based on alternation strategy
+ //int index = d_counter%(int)d_th->d_ceTableaux[x].size();
+ //Node var;
+ //for( std::map< Node, Node >::iterator it = d_th->d_ceTableaux[x].begin(); it != d_th->d_ceTableaux[x].end(); ++it ){
+ // if( index==0 ){
+ // var = it->first;
+ // break;
+ // }
+ // index--;
+ //}
+ //d_th->doInstantiation( f, d_th->d_tableaux_term[x], x, &m, var );
+ }
+ }
+ }
+ return STATUS_UNKNOWN;
+}
+
+
+void InstStrategySimplex::addTermToRow( ArithVar x, Node n, Node& f, NodeBuilder<>& t ){
+ if( n.getKind()==MULT ){
+ if( n[1].hasAttribute(InstConstantAttribute()) ){
+ f = n[1].getAttribute(InstConstantAttribute());
+ if( n[1].getKind()==INST_CONSTANT ){
+ d_ceTableaux[x][ n[1] ] = n[0];
+ }else{
+ d_tableaux_ce_term[x][ n[1] ] = n[0];
+ }
+ }else{
+ d_tableaux[x][ n[1] ] = n[0];
+ t << n;
+ }
+ }else{
+ if( n.hasAttribute(InstConstantAttribute()) ){
+ f = n.getAttribute(InstConstantAttribute());
+ if( n.getKind()==INST_CONSTANT ){
+ d_ceTableaux[x][ n ] = Node::null();
+ }else{
+ d_tableaux_ce_term[x][ n ] = NodeManager::currentNM()->mkConst( Rational(1) );
+ }
+ }else{
+ d_tableaux[x][ n ] = NodeManager::currentNM()->mkConst( Rational(1) );
+ t << n;
+ }
+ }
+}
+
+void InstStrategySimplex::debugPrint( const char* c ){
+ const ArithVarNodeMap& avnm = d_th->d_arithvarNodeMap;
+ ArithVarNodeMap::var_iterator vi, vend;
+ for(vi = avnm.var_begin(), vend = avnm.var_end(); vi != vend; ++vi ){
+ ArithVar x = *vi;
+ Node n = avnm.asNode(x);
+ //if( ((TheoryArith*)getTheory())->d_partialModel.hasEitherBound( x ) ){
+ Debug(c) << x << " : " << n << ", bounds = ";
+ if( d_th->d_partialModel.hasLowerBound( x ) ){
+ Debug(c) << d_th->d_partialModel.getLowerBound( x );
+ }else{
+ Debug(c) << "-infty";
+ }
+ Debug(c) << " <= ";
+ Debug(c) << d_th->d_partialModel.getAssignment( x );
+ Debug(c) << " <= ";
+ if( d_th->d_partialModel.hasUpperBound( x ) ){
+ Debug(c) << d_th->d_partialModel.getUpperBound( x );
+ }else{
+ Debug(c) << "+infty";
+ }
+ Debug(c) << std::endl;
+ //Debug(c) << " Term = " << d_tableaux_term[x] << std::endl;
+ //Debug(c) << " ";
+ //for( std::map< Node, Node >::iterator it2 = d_tableaux[x].begin(); it2 != d_tableaux[x].end(); ++it2 ){
+ // Debug(c) << "( " << it2->first << ", " << it2->second << " ) ";
+ //}
+ //for( std::map< Node, Node >::iterator it2 = d_ceTableaux[x].begin(); it2 != d_ceTableaux[x].end(); ++it2 ){
+ // Debug(c) << "(CE)( " << it2->first << ", " << it2->second << " ) ";
+ //}
+ //for( std::map< Node, Node >::iterator it2 = d_tableaux_ce_term[x].begin(); it2 != d_tableaux_ce_term[x].end(); ++it2 ){
+ // Debug(c) << "(CE-term)( " << it2->first << ", " << it2->second << " ) ";
+ //}
+ //Debug(c) << std::endl;
+ //}
+ }
+ Debug(c) << std::endl;
+
+ for( int q=0; q<d_quantEngine->getNumQuantifiers(); q++ ){
+ Node f = d_quantEngine->getQuantifier( q );
+ Debug(c) << f << std::endl;
+ Debug(c) << " Inst constants: ";
+ for( int i=0; i<(int)d_quantEngine->getTermDatabase()->getNumInstantiationConstants( f ); i++ ){
+ if( i>0 ){
+ Debug( c ) << ", ";
+ }
+ Debug( c ) << d_quantEngine->getTermDatabase()->getInstantiationConstant( f, i );
+ }
+ Debug(c) << std::endl;
+ Debug(c) << " Instantiation rows: ";
+ for( int i=0; i<(int)d_instRows[f].size(); i++ ){
+ if( i>0 ){
+ Debug(c) << ", ";
+ }
+ Debug(c) << d_instRows[f][i];
+ }
+ Debug(c) << std::endl;
+ }
+}
+
+//say instantiation row x for quantifier f is coeff*var + A*t[e] + term = beta,
+// where var is an instantiation constant from f,
+// t[e] is a vector of terms containing instantiation constants from f,
+// and term is a ground term (c1*t1 + ... + cn*tn).
+// We construct the term ( beta - term )/coeff to use as an instantiation for var.
+bool InstStrategySimplex::doInstantiation( Node f, Node term, ArithVar x, InstMatch& m, Node var ){
+ //first try +delta
+ if( doInstantiation2( f, term, x, m, var ) ){
+ ++(d_quantEngine->getInstantiationEngine()->d_statistics.d_instantiations_cbqi_arith);
+ return true;
+ }else{
+#ifdef ARITH_INSTANTIATOR_USE_MINUS_DELTA
+ //otherwise try -delta
+ if( doInstantiation2( f, term, x, m, var, true ) ){
+ ++(d_quantEngine->getInstantiationEngine()->d_statistics.d_instantiations_cbqi_arith_minus);
+ return true;
+ }else{
+ return false;
+ }
+#else
+ return false;
+#endif
+ }
+}
+
+bool InstStrategySimplex::doInstantiation2( Node f, Node term, ArithVar x, InstMatch& m, Node var, bool minus_delta ){
+ // make term ( beta - term )/coeff
+ Node beta = getTableauxValue( x, minus_delta );
+ Node instVal = NodeManager::currentNM()->mkNode( MINUS, beta, term );
+ if( !d_ceTableaux[x][var].isNull() ){
+ if( var.getType().isInteger() ){
+ Assert( d_ceTableaux[x][var]==NodeManager::currentNM()->mkConst( Rational(-1) ) );
+ instVal = NodeManager::currentNM()->mkNode( MULT, d_ceTableaux[x][var], instVal );
+ }else{
+ Node coeff = NodeManager::currentNM()->mkConst( Rational(1) / d_ceTableaux[x][var].getConst<Rational>() );
+ instVal = NodeManager::currentNM()->mkNode( MULT, coeff, instVal );
+ }
+ }
+ instVal = Rewriter::rewrite( instVal );
+ //use as instantiation value for var
+ m.set(var, instVal);
+ Debug("quant-arith") << "Add instantiation " << m << std::endl;
+ return d_quantEngine->addInstantiation( f, m );
+}
+
+Node InstStrategySimplex::getTableauxValue( Node n, bool minus_delta ){
+ if( d_th->d_arithvarNodeMap.hasArithVar(n) ){
+ ArithVar v = d_th->d_arithvarNodeMap.asArithVar( n );
+ return getTableauxValue( v, minus_delta );
+ }else{
+ return NodeManager::currentNM()->mkConst( Rational(0) );
+ }
+}
+
+Node InstStrategySimplex::getTableauxValue( ArithVar v, bool minus_delta ){
+ const Rational& delta = d_th->d_partialModel.getDelta();
+ DeltaRational drv = d_th->d_partialModel.getAssignment( v );
+ Rational qmodel = drv.substituteDelta( minus_delta ? -delta : delta );
+ return mkRationalNode(qmodel);
+}
+
+
+InstStrategyDatatypesValue::InstStrategyDatatypesValue( TheoryDatatypes* th, QuantifiersEngine* qe ) :
+ InstStrategy( qe ), d_th( th ){
+
+}
+
+bool InstStrategyDatatypesValue::calculateShouldProcess( Node f ){
+ //DO_THIS
+ return false;
+}
+
+void InstStrategyDatatypesValue::processResetInstantiationRound( Theory::Effort effort ){
+
+}
+
+int InstStrategyDatatypesValue::process( Node f, Theory::Effort effort, int e ){
+ Debug("quant-datatypes") << "Datatypes: Try to solve (" << e << ") for " << f << "... " << std::endl;
+ if( e<2 ){
+ return InstStrategy::STATUS_UNFINISHED;
+ }else if( e==2 ){
+ InstMatch m;
+ for( int j = 0; j<(int)d_quantEngine->getTermDatabase()->getNumInstantiationConstants( f ); j++ ){
+ Node i = d_quantEngine->getTermDatabase()->getInstantiationConstant( f, j );
+ if( i.getType().isDatatype() ){
+ Node n = getValueFor( i );
+ Debug("quant-datatypes-debug") << "Value for " << i << " is " << n << std::endl;
+ m.set(i,n);
+ }
+ }
+ //d_quantEngine->addInstantiation( f, m );
+ }
+ return InstStrategy::STATUS_UNKNOWN;
+}
+
+Node InstStrategyDatatypesValue::getValueFor( Node n ){
+ //simply get the ground value for n in the current model, if it exists,
+ // or return an arbitrary ground term otherwise
+ if( !n.hasAttribute(InstConstantAttribute()) ){
+ return n;
+ }else{
+ return n;
+ }
+ /* FIXME
+
+ Debug("quant-datatypes-debug") << "get value for " << n << std::endl;
+ if( !n.hasAttribute(InstConstantAttribute()) ){
+ return n;
+ }else{
+ Assert( n.getType().isDatatype() );
+ //check if in equivalence class with ground term
+ Node rep = getRepresentative( n );
+ Debug("quant-datatypes-debug") << "Rep is " << rep << std::endl;
+ if( !rep.hasAttribute(InstConstantAttribute()) ){
+ return rep;
+ }else{
+ if( !n.getType().isDatatype() ){
+ return n.getType().mkGroundTerm();
+ }else{
+ if( n.getKind()==APPLY_CONSTRUCTOR ){
+ std::vector< Node > children;
+ children.push_back( n.getOperator() );
+ for( int i=0; i<(int)n.getNumChildren(); i++ ){
+ children.push_back( getValueFor( n[i] ) );
+ }
+ return NodeManager::currentNM()->mkNode( APPLY_CONSTRUCTOR, children );
+ }else{
+ const Datatype& dt = ((DatatypeType)(n.getType()).toType()).getDatatype();
+ TheoryDatatypes::EqLists* labels = &((TheoryDatatypes*)d_th)->d_labels;
+ //otherwise, use which constructor the inst constant is current chosen to be
+ if( labels->find( n )!=labels->end() ){
+ TheoryDatatypes::EqList* lbl = (*labels->find( n )).second;
+ int tIndex = -1;
+ if( !lbl->empty() && (*lbl)[ lbl->size()-1 ].getKind()==APPLY_TESTER ){
+ Debug("quant-datatypes-debug") << n << " tester is " << (*lbl)[ lbl->size()-1 ] << std::endl;
+ tIndex = Datatype::indexOf((*lbl)[ lbl->size()-1 ].getOperator().toExpr());
+ }else{
+ Debug("quant-datatypes-debug") << "find possible tester choice" << std::endl;
+ //must find a possible choice
+ vector< bool > possibleCons;
+ possibleCons.resize( dt.getNumConstructors(), true );
+ for( TheoryDatatypes::EqList::const_iterator j = lbl->begin(); j != lbl->end(); j++ ) {
+ Node leqn = (*j);
+ possibleCons[ Datatype::indexOf( leqn[0].getOperator().toExpr() ) ] = false;
+ }
+ for( unsigned int j=0; j<possibleCons.size(); j++ ) {
+ if( possibleCons[j] ){
+ tIndex = j;
+ break;
+ }
+ }
+ }
+ Assert( tIndex!=-1 );
+ Node cons = Node::fromExpr( dt[ tIndex ].getConstructor() );
+ Debug("quant-datatypes-debug") << n << " cons is " << cons << std::endl;
+ std::vector< Node > children;
+ children.push_back( cons );
+ for( int i=0; i<(int)dt[ tIndex ].getNumArgs(); i++ ) {
+ Node sn = NodeManager::currentNM()->mkNode( APPLY_SELECTOR, Node::fromExpr( dt[tIndex][i].getSelector() ), n );
+ if( n.hasAttribute(InstConstantAttribute()) ){
+ InstConstantAttribute ica;
+ sn.setAttribute(ica,n.getAttribute(InstConstantAttribute()) );
+ }
+ Node snn = getValueFor( sn );
+ children.push_back( snn );
+ }
+ return NodeManager::currentNM()->mkNode( APPLY_CONSTRUCTOR, children );
+ }else{
+ return n.getType().mkGroundTerm();
+ }
+ }
+ }
+ }
+ }
+ */
+}
diff --git a/src/theory/quantifiers/inst_strategy_cbqi.h b/src/theory/quantifiers/inst_strategy_cbqi.h
index 3ee423fe7..de548ab14 100755..100644
--- a/src/theory/quantifiers/inst_strategy_cbqi.h
+++ b/src/theory/quantifiers/inst_strategy_cbqi.h
@@ -1,110 +1,110 @@
-/********************* */
-/*! \file inst_strategy_cbqi.h
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
- ** Minor contributors (to current version): mdeters
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief instantiator_arith_instantiator
- **/
-
-
-#include "cvc4_private.h"
-
-#ifndef __CVC4__INST_STRATEGT_CBQI_H
-#define __CVC4__INST_STRATEGT_CBQI_H
-
-#include "theory/quantifiers/instantiation_engine.h"
-#include "theory/arith/arithvar_node_map.h"
-
-#include "util/statistics_registry.h"
-
-namespace CVC4 {
-namespace theory {
-
-namespace arith {
- class TheoryArith;
-}
-
-namespace datatypes {
- class TheoryDatatypes;
-}
-
-namespace quantifiers {
-
-
-class InstStrategySimplex : public InstStrategy{
-protected:
- /** calculate if we should process this quantifier */
- bool calculateShouldProcess( Node f );
-private:
- /** reference to theory arithmetic */
- arith::TheoryArith* d_th;
- /** delta */
- std::map< TypeNode, Node > d_deltas;
- /** for each quantifier, simplex rows */
- std::map< Node, std::vector< arith::ArithVar > > d_instRows;
- /** tableaux */
- std::map< arith::ArithVar, Node > d_tableaux_term;
- std::map< arith::ArithVar, std::map< Node, Node > > d_tableaux_ce_term;
- std::map< arith::ArithVar, std::map< Node, Node > > d_tableaux;
- /** ce tableaux */
- std::map< arith::ArithVar, std::map< Node, Node > > d_ceTableaux;
- /** get value */
- Node getTableauxValue( Node n, bool minus_delta = false );
- Node getTableauxValue( arith::ArithVar v, bool minus_delta = false );
- /** do instantiation */
- bool doInstantiation( Node f, Node term, arith::ArithVar x, InstMatch& m, Node var );
- bool doInstantiation2( Node f, Node term, arith::ArithVar x, InstMatch& m, Node var, bool minus_delta = false );
- /** add term to row */
- void addTermToRow( arith::ArithVar x, Node n, Node& f, NodeBuilder<>& t );
- /** print debug */
- void debugPrint( const char* c );
-private:
- /** */
- int d_counter;
- /** negative one */
- Node d_negOne;
- /** process functions */
- void processResetInstantiationRound( Theory::Effort effort );
- int process( Node f, Theory::Effort effort, int e );
-public:
- InstStrategySimplex( arith::TheoryArith* th, QuantifiersEngine* ie );
- ~InstStrategySimplex(){}
- /** identify */
- std::string identify() const { return std::string("Simplex"); }
-};
-
-
-class InstStrategyDatatypesValue : public InstStrategy
-{
-protected:
- /** calculate if we should process this quantifier */
- bool calculateShouldProcess( Node f );
-private:
- /** reference to theory datatypes */
- datatypes::TheoryDatatypes* d_th;
- /** get value function */
- Node getValueFor( Node n );
-public:
- //constructor
- InstStrategyDatatypesValue( datatypes::TheoryDatatypes* th, QuantifiersEngine* qe );
- ~InstStrategyDatatypesValue(){}
- /** reset instantiation */
- void processResetInstantiationRound( Theory::Effort effort );
- /** process method, returns a status */
- int process( Node f, Theory::Effort effort, int e );
- /** identify */
- std::string identify() const { return std::string("InstStrategyDatatypesValue"); }
-
-};/* class InstStrategy */
-
-}
-}
-}
-
+/********************* */
+/*! \file inst_strategy_cbqi.h
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief instantiator_arith_instantiator
+ **/
+
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__INST_STRATEGT_CBQI_H
+#define __CVC4__INST_STRATEGT_CBQI_H
+
+#include "theory/quantifiers/instantiation_engine.h"
+#include "theory/arith/arithvar_node_map.h"
+
+#include "util/statistics_registry.h"
+
+namespace CVC4 {
+namespace theory {
+
+namespace arith {
+ class TheoryArith;
+}
+
+namespace datatypes {
+ class TheoryDatatypes;
+}
+
+namespace quantifiers {
+
+
+class InstStrategySimplex : public InstStrategy{
+protected:
+ /** calculate if we should process this quantifier */
+ bool calculateShouldProcess( Node f );
+private:
+ /** reference to theory arithmetic */
+ arith::TheoryArith* d_th;
+ /** delta */
+ std::map< TypeNode, Node > d_deltas;
+ /** for each quantifier, simplex rows */
+ std::map< Node, std::vector< arith::ArithVar > > d_instRows;
+ /** tableaux */
+ std::map< arith::ArithVar, Node > d_tableaux_term;
+ std::map< arith::ArithVar, std::map< Node, Node > > d_tableaux_ce_term;
+ std::map< arith::ArithVar, std::map< Node, Node > > d_tableaux;
+ /** ce tableaux */
+ std::map< arith::ArithVar, std::map< Node, Node > > d_ceTableaux;
+ /** get value */
+ Node getTableauxValue( Node n, bool minus_delta = false );
+ Node getTableauxValue( arith::ArithVar v, bool minus_delta = false );
+ /** do instantiation */
+ bool doInstantiation( Node f, Node term, arith::ArithVar x, InstMatch& m, Node var );
+ bool doInstantiation2( Node f, Node term, arith::ArithVar x, InstMatch& m, Node var, bool minus_delta = false );
+ /** add term to row */
+ void addTermToRow( arith::ArithVar x, Node n, Node& f, NodeBuilder<>& t );
+ /** print debug */
+ void debugPrint( const char* c );
+private:
+ /** */
+ int d_counter;
+ /** negative one */
+ Node d_negOne;
+ /** process functions */
+ void processResetInstantiationRound( Theory::Effort effort );
+ int process( Node f, Theory::Effort effort, int e );
+public:
+ InstStrategySimplex( arith::TheoryArith* th, QuantifiersEngine* ie );
+ ~InstStrategySimplex(){}
+ /** identify */
+ std::string identify() const { return std::string("Simplex"); }
+};
+
+
+class InstStrategyDatatypesValue : public InstStrategy
+{
+protected:
+ /** calculate if we should process this quantifier */
+ bool calculateShouldProcess( Node f );
+private:
+ /** reference to theory datatypes */
+ datatypes::TheoryDatatypes* d_th;
+ /** get value function */
+ Node getValueFor( Node n );
+public:
+ //constructor
+ InstStrategyDatatypesValue( datatypes::TheoryDatatypes* th, QuantifiersEngine* qe );
+ ~InstStrategyDatatypesValue(){}
+ /** reset instantiation */
+ void processResetInstantiationRound( Theory::Effort effort );
+ /** process method, returns a status */
+ int process( Node f, Theory::Effort effort, int e );
+ /** identify */
+ std::string identify() const { return std::string("InstStrategyDatatypesValue"); }
+
+};/* class InstStrategy */
+
+}
+}
+}
+
#endif \ No newline at end of file
diff --git a/src/theory/quantifiers/inst_strategy_e_matching.cpp b/src/theory/quantifiers/inst_strategy_e_matching.cpp
index 48af334ff..3f5cc7666 100755..100644
--- a/src/theory/quantifiers/inst_strategy_e_matching.cpp
+++ b/src/theory/quantifiers/inst_strategy_e_matching.cpp
@@ -1,379 +1,375 @@
-/********************* */
-/*! \file inst_strategy_e_matching.cpp
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: mdeters
- ** Minor contributors (to current version): bobot
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief Implementation of e matching instantiation strategies
- **/
-
-#include "theory/quantifiers/inst_strategy_e_matching.h"
-
-#include "theory/theory_engine.h"
-#include "theory/quantifiers/options.h"
-#include "theory/quantifiers/term_database.h"
-#include "theory/quantifiers/inst_match_generator.h"
-
-using namespace std;
-using namespace CVC4;
-using namespace CVC4::kind;
-using namespace CVC4::context;
-using namespace CVC4::theory;
-using namespace CVC4::theory::inst;
-using namespace CVC4::theory::quantifiers;
-
-#define USE_SINGLE_TRIGGER_BEFORE_MULTI_TRIGGER
-//#define MULTI_TRIGGER_FULL_EFFORT_HALF
-#define MULTI_MULTI_TRIGGERS
-
-struct sortQuantifiersForSymbol {
- QuantifiersEngine* d_qe;
- bool operator() (Node i, Node j) {
- int nqfsi = d_qe->getQuantifierRelevance()->getNumQuantifiersForSymbol( i.getOperator() );
- int nqfsj = d_qe->getQuantifierRelevance()->getNumQuantifiersForSymbol( j.getOperator() );
- if( nqfsi<nqfsj ){
- return true;
- }else if( nqfsi>nqfsj ){
- return false;
- }else{
- return false;
- }
- }
-};
-
-void InstStrategyUserPatterns::processResetInstantiationRound( Theory::Effort effort ){
- //reset triggers
- for( std::map< Node, std::vector< Trigger* > >::iterator it = d_user_gen.begin(); it != d_user_gen.end(); ++it ){
- for( int i=0; i<(int)it->second.size(); i++ ){
- it->second[i]->resetInstantiationRound();
- it->second[i]->reset( Node::null() );
- }
- }
-}
-
-int InstStrategyUserPatterns::process( Node f, Theory::Effort effort, int e ){
- if( e==0 ){
- return STATUS_UNFINISHED;
- }else if( e==1 ){
- d_counter[f]++;
- Debug("quant-uf-strategy") << "Try user-provided patterns..." << std::endl;
- //Notice() << "Try user-provided patterns..." << std::endl;
- for( int i=0; i<(int)d_user_gen[f].size(); i++ ){
- bool processTrigger = true;
- if( effort!=Theory::EFFORT_LAST_CALL && d_user_gen[f][i]->isMultiTrigger() ){
-//#ifdef MULTI_TRIGGER_FULL_EFFORT_HALF
-// processTrigger = d_counter[f]%2==0;
-//#endif
- }
- if( processTrigger ){
- //if( d_user_gen[f][i]->isMultiTrigger() )
- //Notice() << " Process (user) " << (*d_user_gen[f][i]) << " for " << f << "..." << std::endl;
- InstMatch baseMatch;
- int numInst = d_user_gen[f][i]->addInstantiations( baseMatch );
- //if( d_user_gen[f][i]->isMultiTrigger() )
- //Notice() << " Done, numInst = " << numInst << "." << std::endl;
- d_quantEngine->getInstantiationEngine()->d_statistics.d_instantiations_user_patterns += numInst;
- if( d_user_gen[f][i]->isMultiTrigger() ){
- d_quantEngine->d_statistics.d_multi_trigger_instantiations += numInst;
- }
- //d_quantEngine->d_hasInstantiated[f] = true;
- }
- }
- Debug("quant-uf-strategy") << "done." << std::endl;
- //Notice() << "done" << std::endl;
- }
- return STATUS_UNKNOWN;
-}
-
-void InstStrategyUserPatterns::addUserPattern( Node f, Node pat ){
- //add to generators
- std::vector< Node > nodes;
- for( int i=0; i<(int)pat.getNumChildren(); i++ ){
- nodes.push_back( pat[i] );
- }
- if( Trigger::isUsableTrigger( nodes, f ) ){
- //extend to literal matching
- d_quantEngine->getPhaseReqTerms( f, nodes );
- //check match option
- int matchOption = options::efficientEMatching() ? InstMatchGenerator::MATCH_GEN_EFFICIENT_E_MATCH : 0;
- d_user_gen[f].push_back( Trigger::mkTrigger( d_quantEngine, f, nodes, matchOption, true, Trigger::TR_MAKE_NEW,
- options::smartTriggers() ) );
- }
-}
-/*
-InstStrategyUserPatterns::Statistics::Statistics():
- d_instantiations("InstStrategyUserPatterns::Instantiations", 0)
-{
- StatisticsRegistry::registerStat(&d_instantiations);
-}
-
-InstStrategyUserPatterns::Statistics::~Statistics(){
- StatisticsRegistry::unregisterStat(&d_instantiations);
-}
-*/
-
-void InstStrategyAutoGenTriggers::processResetInstantiationRound( Theory::Effort effort ){
- //reset triggers
- for( std::map< Node, std::map< Trigger*, bool > >::iterator it = d_auto_gen_trigger.begin(); it != d_auto_gen_trigger.end(); ++it ){
- for( std::map< Trigger*, bool >::iterator itt = it->second.begin(); itt != it->second.end(); ++itt ){
- itt->first->resetInstantiationRound();
- itt->first->reset( Node::null() );
- }
- }
-}
-
-int InstStrategyAutoGenTriggers::process( Node f, Theory::Effort effort, int e ){
- int peffort = f.getNumChildren()==3 ? 2 : 1;
- //int peffort = f.getNumChildren()==3 ? 2 : 1;
- //int peffort = 1;
- if( e<peffort ){
- return STATUS_UNFINISHED;
- }else{
- bool gen = false;
- if( e==peffort ){
- if( d_counter.find( f )==d_counter.end() ){
- d_counter[f] = 0;
- gen = true;
- }else{
- d_counter[f]++;
- gen = d_regenerate && d_counter[f]%d_regenerate_frequency==0;
- }
- }else{
- gen = true;
- }
- if( gen ){
- generateTriggers( f );
- }
- Debug("quant-uf-strategy") << "Try auto-generated triggers... " << d_tr_strategy << " " << e << std::endl;
- //Notice() << "Try auto-generated triggers..." << std::endl;
- for( std::map< Trigger*, bool >::iterator itt = d_auto_gen_trigger[f].begin(); itt != d_auto_gen_trigger[f].end(); ++itt ){
- Trigger* tr = itt->first;
- if( tr ){
- bool processTrigger = itt->second;
- if( effort!=Theory::EFFORT_LAST_CALL && tr->isMultiTrigger() ){
-#ifdef MULTI_TRIGGER_FULL_EFFORT_HALF
- processTrigger = d_counter[f]%2==0;
-#endif
- }
- if( processTrigger ){
- //if( tr->isMultiTrigger() )
- Debug("quant-uf-strategy-auto-gen-triggers") << " Process " << (*tr) << "..." << std::endl;
- InstMatch baseMatch;
- int numInst = tr->addInstantiations( baseMatch );
- //if( tr->isMultiTrigger() )
- Debug("quant-uf-strategy-auto-gen-triggers") << " Done, numInst = " << numInst << "." << std::endl;
- if( d_tr_strategy==Trigger::TS_MIN_TRIGGER ){
- d_quantEngine->getInstantiationEngine()->d_statistics.d_instantiations_auto_gen_min += numInst;
- }else{
- d_quantEngine->getInstantiationEngine()->d_statistics.d_instantiations_auto_gen += numInst;
- }
- if( tr->isMultiTrigger() ){
- d_quantEngine->d_statistics.d_multi_trigger_instantiations += numInst;
- }
- //d_quantEngine->d_hasInstantiated[f] = true;
- }
- }
- }
- Debug("quant-uf-strategy") << "done." << std::endl;
- //Notice() << "done" << std::endl;
- }
- return STATUS_UNKNOWN;
-}
-
-void InstStrategyAutoGenTriggers::generateTriggers( Node f ){
- Debug("auto-gen-trigger") << "Generate trigger for " << f << std::endl;
- if( d_patTerms[0].find( f )==d_patTerms[0].end() ){
- //determine all possible pattern terms based on trigger term selection strategy d_tr_strategy
- d_patTerms[0][f].clear();
- d_patTerms[1][f].clear();
- std::vector< Node > patTermsF;
- Trigger::collectPatTerms( d_quantEngine, f, d_quantEngine->getTermDatabase()->getInstConstantBody( f ), patTermsF, d_tr_strategy, true );
- Debug("auto-gen-trigger") << "Collected pat terms for " << d_quantEngine->getTermDatabase()->getInstConstantBody( f ) << std::endl;
- Debug("auto-gen-trigger") << " ";
- for( int i=0; i<(int)patTermsF.size(); i++ ){
- Debug("auto-gen-trigger") << patTermsF[i] << " ";
- }
- Debug("auto-gen-trigger") << std::endl;
- //extend to literal matching (if applicable)
- d_quantEngine->getPhaseReqTerms( f, patTermsF );
- //sort into single/multi triggers
- std::map< Node, std::vector< Node > > varContains;
- d_quantEngine->getTermDatabase()->getVarContains( f, patTermsF, varContains );
- for( std::map< Node, std::vector< Node > >::iterator it = varContains.begin(); it != varContains.end(); ++it ){
- if( it->second.size()==f[0].getNumChildren() ){
- d_patTerms[0][f].push_back( it->first );
- d_is_single_trigger[ it->first ] = true;
- }else{
- d_patTerms[1][f].push_back( it->first );
- d_is_single_trigger[ it->first ] = false;
- }
- }
- d_made_multi_trigger[f] = false;
- Debug("auto-gen-trigger") << "Single triggers for " << f << " : " << std::endl;
- Debug("auto-gen-trigger") << " ";
- for( int i=0; i<(int)d_patTerms[0][f].size(); i++ ){
- Debug("auto-gen-trigger") << d_patTerms[0][f][i] << " ";
- }
- Debug("auto-gen-trigger") << std::endl;
- Debug("auto-gen-trigger") << "Multi-trigger term pool for " << f << " : " << std::endl;
- Debug("auto-gen-trigger") << " ";
- for( int i=0; i<(int)d_patTerms[1][f].size(); i++ ){
- Debug("auto-gen-trigger") << d_patTerms[1][f][i] << " ";
- }
- Debug("auto-gen-trigger") << std::endl;
- }
-
- //populate candidate pattern term vector for the current trigger
- std::vector< Node > patTerms;
-#ifdef USE_SINGLE_TRIGGER_BEFORE_MULTI_TRIGGER
- //try to add single triggers first
- for( int i=0; i<(int)d_patTerms[0][f].size(); i++ ){
- if( !d_single_trigger_gen[d_patTerms[0][f][i]] ){
- patTerms.push_back( d_patTerms[0][f][i] );
- }
- }
- //if no single triggers exist, add multi trigger terms
- if( patTerms.empty() ){
- patTerms.insert( patTerms.begin(), d_patTerms[1][f].begin(), d_patTerms[1][f].end() );
- }
-#else
- patTerms.insert( patTerms.begin(), d_patTerms[0][f].begin(), d_patTerms[0][f].end() );
- patTerms.insert( patTerms.begin(), d_patTerms[1][f].begin(), d_patTerms[1][f].end() );
-#endif
-
- if( !patTerms.empty() ){
- Debug("auto-gen-trigger") << "Generate trigger for " << f << std::endl;
- //sort terms based on relevance
- if( d_rlv_strategy==RELEVANCE_DEFAULT ){
- sortQuantifiersForSymbol sqfs;
- sqfs.d_qe = d_quantEngine;
- //sort based on # occurrences (this will cause Trigger to select rarer symbols)
- std::sort( patTerms.begin(), patTerms.end(), sqfs );
- Debug("relevant-trigger") << "Terms based on relevance: " << std::endl;
- for( int i=0; i<(int)patTerms.size(); i++ ){
- Debug("relevant-trigger") << " " << patTerms[i] << " (";
- Debug("relevant-trigger") << d_quantEngine->getQuantifierRelevance()->getNumQuantifiersForSymbol( patTerms[i].getOperator() ) << ")" << std::endl;
- }
- //Notice() << "Terms based on relevance: " << std::endl;
- //for( int i=0; i<(int)patTerms.size(); i++ ){
- // Notice() << " " << patTerms[i] << " (";
- // Notice() << d_quantEngine->getNumQuantifiersForSymbol( patTerms[i].getOperator() ) << ")" << std::endl;
- //}
- }
- //now, generate the trigger...
- int matchOption = options::efficientEMatching() ? InstMatchGenerator::MATCH_GEN_EFFICIENT_E_MATCH : 0;
- Trigger* tr = NULL;
- if( d_is_single_trigger[ patTerms[0] ] ){
- tr = Trigger::mkTrigger( d_quantEngine, f, patTerms[0], matchOption, false, Trigger::TR_RETURN_NULL,
- options::smartTriggers() );
- d_single_trigger_gen[ patTerms[0] ] = true;
- }else{
- //if we are re-generating triggers, shuffle based on some method
- if( d_made_multi_trigger[f] ){
-#ifndef MULTI_MULTI_TRIGGERS
- return;
-#endif
- std::random_shuffle( patTerms.begin(), patTerms.end() ); //shuffle randomly
- }else{
- d_made_multi_trigger[f] = true;
- }
- //will possibly want to get an old trigger
- tr = Trigger::mkTrigger( d_quantEngine, f, patTerms, matchOption, false, Trigger::TR_GET_OLD,
- options::smartTriggers() );
- }
- if( tr ){
- if( tr->isMultiTrigger() ){
- //disable all other multi triggers
- for( std::map< Trigger*, bool >::iterator it = d_auto_gen_trigger[f].begin(); it != d_auto_gen_trigger[f].end(); ++it ){
- if( it->first->isMultiTrigger() ){
- d_auto_gen_trigger[f][ it->first ] = false;
- }
- }
- }
- //making it during an instantiation round, so must reset
- if( d_auto_gen_trigger[f].find( tr )==d_auto_gen_trigger[f].end() ){
- tr->resetInstantiationRound();
- tr->reset( Node::null() );
- }
- d_auto_gen_trigger[f][tr] = true;
- //if we are generating additional triggers...
- if( d_generate_additional && d_is_single_trigger[ patTerms[0] ] ){
- int index = 0;
- if( index<(int)patTerms.size() ){
- //Notice() << "check add additional" << std::endl;
- //check if similar patterns exist, and if so, add them additionally
- int nqfs_curr = d_quantEngine->getQuantifierRelevance()->getNumQuantifiersForSymbol( patTerms[0].getOperator() );
- index++;
- bool success = true;
- while( success && index<(int)patTerms.size() && d_is_single_trigger[ patTerms[index] ] ){
- success = false;
- if( d_quantEngine->getQuantifierRelevance()->getNumQuantifiersForSymbol( patTerms[index].getOperator() )<=nqfs_curr ){
- d_single_trigger_gen[ patTerms[index] ] = true;
- Trigger* tr2 = Trigger::mkTrigger( d_quantEngine, f, patTerms[index], matchOption, false, Trigger::TR_RETURN_NULL,
- options::smartTriggers() );
- if( tr2 ){
- //Notice() << "Add additional trigger " << patTerms[index] << std::endl;
- tr2->resetInstantiationRound();
- tr2->reset( Node::null() );
- d_auto_gen_trigger[f][tr2] = true;
- }
- success = true;
- }
- index++;
- }
- //Notice() << "done check add additional" << std::endl;
- }
- }
- }
- }
-}
-/*
-InstStrategyAutoGenTriggers::Statistics::Statistics():
- d_instantiations("InstStrategyAutoGenTriggers::Instantiations", 0),
- d_instantiations_min("InstStrategyAutoGenTriggers::Instantiations_min", 0)
-{
- StatisticsRegistry::registerStat(&d_instantiations);
- StatisticsRegistry::registerStat(&d_instantiations_min);
-}
-
-InstStrategyAutoGenTriggers::Statistics::~Statistics(){
- StatisticsRegistry::unregisterStat(&d_instantiations);
- StatisticsRegistry::unregisterStat(&d_instantiations_min);
-}
-*/
-
-void InstStrategyFreeVariable::processResetInstantiationRound( Theory::Effort effort ){
-}
-
-int InstStrategyFreeVariable::process( Node f, Theory::Effort effort, int e ){
- if( e<5 ){
- return STATUS_UNFINISHED;
- }else{
- if( d_guessed.find( f )==d_guessed.end() ){
- d_guessed[f] = true;
- Debug("quant-uf-alg") << "Add guessed instantiation" << std::endl;
- InstMatch m;
- if( d_quantEngine->addInstantiation( f, m ) ){
- ++(d_quantEngine->getInstantiationEngine()->d_statistics.d_instantiations_guess);
- //d_quantEngine->d_hasInstantiated[f] = true;
- }
- }
- return STATUS_UNKNOWN;
- }
-}
-/*
-InstStrategyFreeVariable::Statistics::Statistics():
- d_instantiations("InstStrategyGuess::Instantiations", 0)
-{
- StatisticsRegistry::registerStat(&d_instantiations);
-}
-
-InstStrategyFreeVariable::Statistics::~Statistics(){
- StatisticsRegistry::unregisterStat(&d_instantiations);
-}
-*/
+/********************* */
+/*! \file inst_strategy_e_matching.cpp
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief Implementation of e matching instantiation strategies
+ **/
+
+#include "theory/quantifiers/inst_strategy_e_matching.h"
+
+#include "theory/theory_engine.h"
+#include "theory/quantifiers/options.h"
+#include "theory/quantifiers/term_database.h"
+#include "theory/quantifiers/inst_match_generator.h"
+
+using namespace std;
+using namespace CVC4;
+using namespace CVC4::kind;
+using namespace CVC4::context;
+using namespace CVC4::theory;
+using namespace CVC4::theory::inst;
+using namespace CVC4::theory::quantifiers;
+
+//#define MULTI_TRIGGER_FULL_EFFORT_HALF
+#define MULTI_MULTI_TRIGGERS
+
+struct sortQuantifiersForSymbol {
+ QuantifiersEngine* d_qe;
+ bool operator() (Node i, Node j) {
+ int nqfsi = d_qe->getQuantifierRelevance()->getNumQuantifiersForSymbol( i.getOperator() );
+ int nqfsj = d_qe->getQuantifierRelevance()->getNumQuantifiersForSymbol( j.getOperator() );
+ if( nqfsi<nqfsj ){
+ return true;
+ }else if( nqfsi>nqfsj ){
+ return false;
+ }else{
+ return false;
+ }
+ }
+};
+
+void InstStrategyUserPatterns::processResetInstantiationRound( Theory::Effort effort ){
+ //reset triggers
+ for( std::map< Node, std::vector< Trigger* > >::iterator it = d_user_gen.begin(); it != d_user_gen.end(); ++it ){
+ for( int i=0; i<(int)it->second.size(); i++ ){
+ it->second[i]->resetInstantiationRound();
+ it->second[i]->reset( Node::null() );
+ }
+ }
+}
+
+int InstStrategyUserPatterns::process( Node f, Theory::Effort effort, int e ){
+ if( e==0 ){
+ return STATUS_UNFINISHED;
+ }else if( e==1 ){
+ d_counter[f]++;
+ Debug("quant-uf-strategy") << "Try user-provided patterns..." << std::endl;
+ //Notice() << "Try user-provided patterns..." << std::endl;
+ for( int i=0; i<(int)d_user_gen[f].size(); i++ ){
+ bool processTrigger = true;
+ if( processTrigger ){
+ //if( d_user_gen[f][i]->isMultiTrigger() )
+ Trace("process-trigger") << " Process (user) " << (*d_user_gen[f][i]) << "..." << std::endl;
+ InstMatch baseMatch;
+ int numInst = d_user_gen[f][i]->addInstantiations( baseMatch );
+ //if( d_user_gen[f][i]->isMultiTrigger() )
+ Trace("process-trigger") << " Done, numInst = " << numInst << "." << std::endl;
+ d_quantEngine->getInstantiationEngine()->d_statistics.d_instantiations_user_patterns += numInst;
+ if( d_user_gen[f][i]->isMultiTrigger() ){
+ d_quantEngine->d_statistics.d_multi_trigger_instantiations += numInst;
+ }
+ //d_quantEngine->d_hasInstantiated[f] = true;
+ }
+ }
+ Debug("quant-uf-strategy") << "done." << std::endl;
+ //Notice() << "done" << std::endl;
+ }
+ return STATUS_UNKNOWN;
+}
+
+void InstStrategyUserPatterns::addUserPattern( Node f, Node pat ){
+ //add to generators
+ std::vector< Node > nodes;
+ for( int i=0; i<(int)pat.getNumChildren(); i++ ){
+ nodes.push_back( pat[i] );
+ }
+ if( Trigger::isUsableTrigger( nodes, f ) ){
+ //extend to literal matching
+ d_quantEngine->getPhaseReqTerms( f, nodes );
+ //check match option
+ int matchOption = options::efficientEMatching() ? InstMatchGenerator::MATCH_GEN_EFFICIENT_E_MATCH : 0;
+ d_user_gen[f].push_back( Trigger::mkTrigger( d_quantEngine, f, nodes, matchOption, true, Trigger::TR_MAKE_NEW,
+ options::smartTriggers() ) );
+ }
+}
+/*
+InstStrategyUserPatterns::Statistics::Statistics():
+ d_instantiations("InstStrategyUserPatterns::Instantiations", 0)
+{
+ StatisticsRegistry::registerStat(&d_instantiations);
+}
+
+InstStrategyUserPatterns::Statistics::~Statistics(){
+ StatisticsRegistry::unregisterStat(&d_instantiations);
+}
+*/
+
+void InstStrategyAutoGenTriggers::processResetInstantiationRound( Theory::Effort effort ){
+ //reset triggers
+ for( std::map< Node, std::map< Trigger*, bool > >::iterator it = d_auto_gen_trigger.begin(); it != d_auto_gen_trigger.end(); ++it ){
+ for( std::map< Trigger*, bool >::iterator itt = it->second.begin(); itt != it->second.end(); ++itt ){
+ itt->first->resetInstantiationRound();
+ itt->first->reset( Node::null() );
+ }
+ }
+ d_processed_trigger.clear();
+}
+
+int InstStrategyAutoGenTriggers::process( Node f, Theory::Effort effort, int e ){
+ int peffort = f.getNumChildren()==3 ? 2 : 1;
+ //int peffort = f.getNumChildren()==3 ? 2 : 1;
+ //int peffort = 1;
+ if( e<peffort ){
+ return STATUS_UNFINISHED;
+ }else{
+ int status = STATUS_UNKNOWN;
+ bool gen = false;
+ if( e==peffort ){
+ if( d_counter.find( f )==d_counter.end() ){
+ d_counter[f] = 0;
+ gen = true;
+ }else{
+ d_counter[f]++;
+ gen = d_regenerate && d_counter[f]%d_regenerate_frequency==0;
+ }
+ }else{
+ gen = true;
+ }
+ if( gen ){
+ generateTriggers( f, effort, e, status );
+ }
+ Debug("quant-uf-strategy") << "Try auto-generated triggers... " << d_tr_strategy << " " << e << std::endl;
+ //Notice() << "Try auto-generated triggers..." << std::endl;
+ for( std::map< Trigger*, bool >::iterator itt = d_auto_gen_trigger[f].begin(); itt != d_auto_gen_trigger[f].end(); ++itt ){
+ Trigger* tr = itt->first;
+ if( tr ){
+ bool processTrigger = itt->second;
+ if( processTrigger && d_processed_trigger[f].find( tr )==d_processed_trigger[f].end() ){
+ d_processed_trigger[f][tr] = true;
+ //if( tr->isMultiTrigger() )
+ Trace("process-trigger") << " Process " << (*tr) << "..." << std::endl;
+ InstMatch baseMatch;
+ int numInst = tr->addInstantiations( baseMatch );
+ //if( tr->isMultiTrigger() )
+ Trace("process-trigger") << " Done, numInst = " << numInst << "." << std::endl;
+ if( d_tr_strategy==Trigger::TS_MIN_TRIGGER ){
+ d_quantEngine->getInstantiationEngine()->d_statistics.d_instantiations_auto_gen_min += numInst;
+ }else{
+ d_quantEngine->getInstantiationEngine()->d_statistics.d_instantiations_auto_gen += numInst;
+ }
+ if( tr->isMultiTrigger() ){
+ d_quantEngine->d_statistics.d_multi_trigger_instantiations += numInst;
+ }
+ //d_quantEngine->d_hasInstantiated[f] = true;
+ }
+ }
+ }
+ Debug("quant-uf-strategy") << "done." << std::endl;
+ //Notice() << "done" << std::endl;
+ return status;
+ }
+}
+
+void InstStrategyAutoGenTriggers::generateTriggers( Node f, Theory::Effort effort, int e, int & status ){
+ Trace("auto-gen-trigger-debug") << "Generate trigger for " << f << std::endl;
+ if( d_patTerms[0].find( f )==d_patTerms[0].end() ){
+ //determine all possible pattern terms based on trigger term selection strategy d_tr_strategy
+ d_patTerms[0][f].clear();
+ d_patTerms[1][f].clear();
+ std::vector< Node > patTermsF;
+ Trigger::collectPatTerms( d_quantEngine, f, d_quantEngine->getTermDatabase()->getInstConstantBody( f ), patTermsF, d_tr_strategy, true );
+ Trace("auto-gen-trigger") << "Collected pat terms for " << d_quantEngine->getTermDatabase()->getInstConstantBody( f ) << std::endl;
+ Trace("auto-gen-trigger") << " ";
+ for( int i=0; i<(int)patTermsF.size(); i++ ){
+ Trace("auto-gen-trigger") << patTermsF[i] << " ";
+ }
+ Trace("auto-gen-trigger") << std::endl;
+ //extend to literal matching (if applicable)
+ d_quantEngine->getPhaseReqTerms( f, patTermsF );
+ //sort into single/multi triggers
+ std::map< Node, std::vector< Node > > varContains;
+ d_quantEngine->getTermDatabase()->getVarContains( f, patTermsF, varContains );
+ for( std::map< Node, std::vector< Node > >::iterator it = varContains.begin(); it != varContains.end(); ++it ){
+ if( it->second.size()==f[0].getNumChildren() ){
+ d_patTerms[0][f].push_back( it->first );
+ d_is_single_trigger[ it->first ] = true;
+ }else{
+ d_patTerms[1][f].push_back( it->first );
+ d_is_single_trigger[ it->first ] = false;
+ }
+ }
+ d_made_multi_trigger[f] = false;
+ Trace("auto-gen-trigger") << "Single triggers for " << f << " : " << std::endl;
+ Trace("auto-gen-trigger") << " ";
+ for( int i=0; i<(int)d_patTerms[0][f].size(); i++ ){
+ Trace("auto-gen-trigger") << d_patTerms[0][f][i] << " ";
+ }
+ Trace("auto-gen-trigger") << std::endl;
+ Trace("auto-gen-trigger") << "Multi-trigger term pool for " << f << " : " << std::endl;
+ Trace("auto-gen-trigger") << " ";
+ for( int i=0; i<(int)d_patTerms[1][f].size(); i++ ){
+ Trace("auto-gen-trigger") << d_patTerms[1][f][i] << " ";
+ }
+ Trace("auto-gen-trigger") << std::endl;
+ }
+
+ //populate candidate pattern term vector for the current trigger
+ std::vector< Node > patTerms;
+ //try to add single triggers first
+ for( int i=0; i<(int)d_patTerms[0][f].size(); i++ ){
+ if( !d_single_trigger_gen[d_patTerms[0][f][i]] ){
+ patTerms.push_back( d_patTerms[0][f][i] );
+ }
+ }
+ //if no single triggers exist, add multi trigger terms
+ if( patTerms.empty() ){
+ patTerms.insert( patTerms.begin(), d_patTerms[1][f].begin(), d_patTerms[1][f].end() );
+ }
+
+ if( !patTerms.empty() ){
+ Trace("auto-gen-trigger") << "Generate trigger for " << f << std::endl;
+ //sort terms based on relevance
+ if( d_rlv_strategy==RELEVANCE_DEFAULT ){
+ sortQuantifiersForSymbol sqfs;
+ sqfs.d_qe = d_quantEngine;
+ //sort based on # occurrences (this will cause Trigger to select rarer symbols)
+ std::sort( patTerms.begin(), patTerms.end(), sqfs );
+ Debug("relevant-trigger") << "Terms based on relevance: " << std::endl;
+ for( int i=0; i<(int)patTerms.size(); i++ ){
+ Debug("relevant-trigger") << " " << patTerms[i] << " (";
+ Debug("relevant-trigger") << d_quantEngine->getQuantifierRelevance()->getNumQuantifiersForSymbol( patTerms[i].getOperator() ) << ")" << std::endl;
+ }
+ //Notice() << "Terms based on relevance: " << std::endl;
+ //for( int i=0; i<(int)patTerms.size(); i++ ){
+ // Notice() << " " << patTerms[i] << " (";
+ // Notice() << d_quantEngine->getNumQuantifiersForSymbol( patTerms[i].getOperator() ) << ")" << std::endl;
+ //}
+ }
+ //now, generate the trigger...
+ int matchOption = options::efficientEMatching() ? InstMatchGenerator::MATCH_GEN_EFFICIENT_E_MATCH : 0;
+ Trigger* tr = NULL;
+ if( d_is_single_trigger[ patTerms[0] ] ){
+ tr = Trigger::mkTrigger( d_quantEngine, f, patTerms[0], matchOption, false, Trigger::TR_RETURN_NULL,
+ options::smartTriggers() );
+ d_single_trigger_gen[ patTerms[0] ] = true;
+ }else{
+ //only generate multi trigger if effort level > 5, or if no single triggers exist
+ if( !d_patTerms[0][f].empty() ){
+ if( e<=5 ){
+ status = STATUS_UNFINISHED;
+ return;
+ }else{
+ Trace("multi-trigger-debug") << "Resort to choosing multi-triggers..." << std::endl;
+ }
+ }
+ //if we are re-generating triggers, shuffle based on some method
+ if( d_made_multi_trigger[f] ){
+#ifndef MULTI_MULTI_TRIGGERS
+ return;
+#endif
+ std::random_shuffle( patTerms.begin(), patTerms.end() ); //shuffle randomly
+ }else{
+ d_made_multi_trigger[f] = true;
+ }
+ //will possibly want to get an old trigger
+ tr = Trigger::mkTrigger( d_quantEngine, f, patTerms, matchOption, false, Trigger::TR_GET_OLD,
+ options::smartTriggers() );
+ }
+ if( tr ){
+ if( tr->isMultiTrigger() ){
+ //disable all other multi triggers
+ for( std::map< Trigger*, bool >::iterator it = d_auto_gen_trigger[f].begin(); it != d_auto_gen_trigger[f].end(); ++it ){
+ if( it->first->isMultiTrigger() ){
+ d_auto_gen_trigger[f][ it->first ] = false;
+ }
+ }
+ }
+ //making it during an instantiation round, so must reset
+ if( d_auto_gen_trigger[f].find( tr )==d_auto_gen_trigger[f].end() ){
+ tr->resetInstantiationRound();
+ tr->reset( Node::null() );
+ }
+ d_auto_gen_trigger[f][tr] = true;
+ //if we are generating additional triggers...
+ if( d_generate_additional && d_is_single_trigger[ patTerms[0] ] ){
+ int index = 0;
+ if( index<(int)patTerms.size() ){
+ //Notice() << "check add additional" << std::endl;
+ //check if similar patterns exist, and if so, add them additionally
+ int nqfs_curr = d_quantEngine->getQuantifierRelevance()->getNumQuantifiersForSymbol( patTerms[0].getOperator() );
+ index++;
+ bool success = true;
+ while( success && index<(int)patTerms.size() && d_is_single_trigger[ patTerms[index] ] ){
+ success = false;
+ if( d_quantEngine->getQuantifierRelevance()->getNumQuantifiersForSymbol( patTerms[index].getOperator() )<=nqfs_curr ){
+ d_single_trigger_gen[ patTerms[index] ] = true;
+ Trigger* tr2 = Trigger::mkTrigger( d_quantEngine, f, patTerms[index], matchOption, false, Trigger::TR_RETURN_NULL,
+ options::smartTriggers() );
+ if( tr2 ){
+ //Notice() << "Add additional trigger " << patTerms[index] << std::endl;
+ tr2->resetInstantiationRound();
+ tr2->reset( Node::null() );
+ d_auto_gen_trigger[f][tr2] = true;
+ }
+ success = true;
+ }
+ index++;
+ }
+ //Notice() << "done check add additional" << std::endl;
+ }
+ }
+ }
+ }
+}
+/*
+InstStrategyAutoGenTriggers::Statistics::Statistics():
+ d_instantiations("InstStrategyAutoGenTriggers::Instantiations", 0),
+ d_instantiations_min("InstStrategyAutoGenTriggers::Instantiations_min", 0)
+{
+ StatisticsRegistry::registerStat(&d_instantiations);
+ StatisticsRegistry::registerStat(&d_instantiations_min);
+}
+
+InstStrategyAutoGenTriggers::Statistics::~Statistics(){
+ StatisticsRegistry::unregisterStat(&d_instantiations);
+ StatisticsRegistry::unregisterStat(&d_instantiations_min);
+}
+*/
+
+void InstStrategyFreeVariable::processResetInstantiationRound( Theory::Effort effort ){
+}
+
+int InstStrategyFreeVariable::process( Node f, Theory::Effort effort, int e ){
+ if( e<5 ){
+ return STATUS_UNFINISHED;
+ }else{
+ if( d_guessed.find( f )==d_guessed.end() ){
+ d_guessed[f] = true;
+ Debug("quant-uf-alg") << "Add guessed instantiation" << std::endl;
+ InstMatch m;
+ if( d_quantEngine->addInstantiation( f, m ) ){
+ ++(d_quantEngine->getInstantiationEngine()->d_statistics.d_instantiations_guess);
+ //d_quantEngine->d_hasInstantiated[f] = true;
+ }
+ }
+ return STATUS_UNKNOWN;
+ }
+}
+/*
+InstStrategyFreeVariable::Statistics::Statistics():
+ d_instantiations("InstStrategyGuess::Instantiations", 0)
+{
+ StatisticsRegistry::registerStat(&d_instantiations);
+}
+
+InstStrategyFreeVariable::Statistics::~Statistics(){
+ StatisticsRegistry::unregisterStat(&d_instantiations);
+}
+*/
diff --git a/src/theory/quantifiers/inst_strategy_e_matching.h b/src/theory/quantifiers/inst_strategy_e_matching.h
index 23f0d8a54..13d443c6a 100755..100644
--- a/src/theory/quantifiers/inst_strategy_e_matching.h
+++ b/src/theory/quantifiers/inst_strategy_e_matching.h
@@ -1,135 +1,137 @@
-/********************* */
-/*! \file inst_strategy_e_matching.h
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
- ** Minor contributors (to current version): bobot, mdeters
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief E matching instantiation strategies
- **/
-
-#include "cvc4_private.h"
-
-#ifndef __CVC4__INST_STRATEGY_E_MATCHING_H
-#define __CVC4__INST_STRATEGY_E_MATCHING_H
-
-#include "theory/quantifiers_engine.h"
-#include "theory/quantifiers/trigger.h"
-
-#include "context/context.h"
-#include "context/context_mm.h"
-
-#include "util/statistics_registry.h"
-#include "theory/quantifiers/instantiation_engine.h"
-
-namespace CVC4 {
-namespace theory {
-namespace quantifiers {
-
-//instantiation strategies
-
-class InstStrategyUserPatterns : public InstStrategy{
-private:
- /** explicitly provided patterns */
- std::map< Node, std::vector< inst::Trigger* > > d_user_gen;
- /** counter for quantifiers */
- std::map< Node, int > d_counter;
- /** process functions */
- void processResetInstantiationRound( Theory::Effort effort );
- int process( Node f, Theory::Effort effort, int e );
-public:
- InstStrategyUserPatterns( QuantifiersEngine* ie ) :
- InstStrategy( ie ){}
- ~InstStrategyUserPatterns(){}
-public:
- /** add pattern */
- void addUserPattern( Node f, Node pat );
- /** get num patterns */
- int getNumUserGenerators( Node f ) { return (int)d_user_gen[f].size(); }
- /** get user pattern */
- inst::Trigger* getUserGenerator( Node f, int i ) { return d_user_gen[f][ i ]; }
- /** identify */
- std::string identify() const { return std::string("UserPatterns"); }
-};/* class InstStrategyUserPatterns */
-
-class InstStrategyAutoGenTriggers : public InstStrategy{
-public:
- enum {
- RELEVANCE_NONE,
- RELEVANCE_DEFAULT,
- };
-private:
- /** trigger generation strategy */
- int d_tr_strategy;
- /** relevance strategy */
- int d_rlv_strategy;
- /** regeneration */
- bool d_regenerate;
- int d_regenerate_frequency;
- /** generate additional triggers */
- bool d_generate_additional;
- /** triggers for each quantifier */
- std::map< Node, std::map< inst::Trigger*, bool > > d_auto_gen_trigger;
- std::map< Node, int > d_counter;
- /** single, multi triggers for each quantifier */
- std::map< Node, std::vector< Node > > d_patTerms[2];
- std::map< Node, bool > d_is_single_trigger;
- std::map< Node, bool > d_single_trigger_gen;
- std::map< Node, bool > d_made_multi_trigger;
-private:
- /** process functions */
- void processResetInstantiationRound( Theory::Effort effort );
- int process( Node f, Theory::Effort effort, int e );
- /** generate triggers */
- void generateTriggers( Node f );
-public:
- /** tstrt is the type of triggers to use (maximum depth, minimum depth, or all)
- rstrt is the relevance setting for trigger (use only relevant triggers vs. use all)
- rgfr is the frequency at which triggers are generated */
- InstStrategyAutoGenTriggers( QuantifiersEngine* qe, int tstrt, int rstrt, int rgfr = -1 ) :
- InstStrategy( qe ), d_tr_strategy( tstrt ), d_rlv_strategy( rstrt ), d_generate_additional( false ){
- setRegenerateFrequency( rgfr );
- }
- ~InstStrategyAutoGenTriggers(){}
-public:
- /** get auto-generated trigger */
- inst::Trigger* getAutoGenTrigger( Node f );
- /** identify */
- std::string identify() const { return std::string("AutoGenTriggers"); }
- /** set regenerate frequency, if fr<0, turn off regenerate */
- void setRegenerateFrequency( int fr ){
- if( fr<0 ){
- d_regenerate = false;
- }else{
- d_regenerate_frequency = fr;
- d_regenerate = true;
- }
- }
- /** set generate additional */
- void setGenerateAdditional( bool val ) { d_generate_additional = val; }
-};/* class InstStrategyAutoGenTriggers */
-
-class InstStrategyFreeVariable : public InstStrategy{
-private:
- /** guessed instantiations */
- std::map< Node, bool > d_guessed;
- /** process functions */
- void processResetInstantiationRound( Theory::Effort effort );
- int process( Node f, Theory::Effort effort, int e );
-public:
- InstStrategyFreeVariable( QuantifiersEngine* qe ) :
- InstStrategy( qe ){}
- ~InstStrategyFreeVariable(){}
- /** identify */
- std::string identify() const { return std::string("FreeVariable"); }
-};/* class InstStrategyFreeVariable */
-
-}
-}/* CVC4::theory namespace */
-}/* CVC4 namespace */
-
-#endif
+/********************* */
+/*! \file inst_strategy_e_matching.h
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief E matching instantiation strategies
+ **/
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__INST_STRATEGY_E_MATCHING_H
+#define __CVC4__INST_STRATEGY_E_MATCHING_H
+
+#include "theory/quantifiers_engine.h"
+#include "theory/quantifiers/trigger.h"
+
+#include "context/context.h"
+#include "context/context_mm.h"
+
+#include "util/statistics_registry.h"
+#include "theory/quantifiers/instantiation_engine.h"
+
+namespace CVC4 {
+namespace theory {
+namespace quantifiers {
+
+//instantiation strategies
+
+class InstStrategyUserPatterns : public InstStrategy{
+private:
+ /** explicitly provided patterns */
+ std::map< Node, std::vector< inst::Trigger* > > d_user_gen;
+ /** counter for quantifiers */
+ std::map< Node, int > d_counter;
+ /** process functions */
+ void processResetInstantiationRound( Theory::Effort effort );
+ int process( Node f, Theory::Effort effort, int e );
+public:
+ InstStrategyUserPatterns( QuantifiersEngine* ie ) :
+ InstStrategy( ie ){}
+ ~InstStrategyUserPatterns(){}
+public:
+ /** add pattern */
+ void addUserPattern( Node f, Node pat );
+ /** get num patterns */
+ int getNumUserGenerators( Node f ) { return (int)d_user_gen[f].size(); }
+ /** get user pattern */
+ inst::Trigger* getUserGenerator( Node f, int i ) { return d_user_gen[f][ i ]; }
+ /** identify */
+ std::string identify() const { return std::string("UserPatterns"); }
+};/* class InstStrategyUserPatterns */
+
+class InstStrategyAutoGenTriggers : public InstStrategy{
+public:
+ enum {
+ RELEVANCE_NONE,
+ RELEVANCE_DEFAULT,
+ };
+private:
+ /** trigger generation strategy */
+ int d_tr_strategy;
+ /** relevance strategy */
+ int d_rlv_strategy;
+ /** regeneration */
+ bool d_regenerate;
+ int d_regenerate_frequency;
+ /** generate additional triggers */
+ bool d_generate_additional;
+ /** triggers for each quantifier */
+ std::map< Node, std::map< inst::Trigger*, bool > > d_auto_gen_trigger;
+ std::map< Node, int > d_counter;
+ /** single, multi triggers for each quantifier */
+ std::map< Node, std::vector< Node > > d_patTerms[2];
+ std::map< Node, bool > d_is_single_trigger;
+ std::map< Node, bool > d_single_trigger_gen;
+ std::map< Node, bool > d_made_multi_trigger;
+ //processed trigger this round
+ std::map< Node, std::map< inst::Trigger*, bool > > d_processed_trigger;
+private:
+ /** process functions */
+ void processResetInstantiationRound( Theory::Effort effort );
+ int process( Node f, Theory::Effort effort, int e );
+ /** generate triggers */
+ void generateTriggers( Node f, Theory::Effort effort, int e, int & status );
+public:
+ /** tstrt is the type of triggers to use (maximum depth, minimum depth, or all)
+ rstrt is the relevance setting for trigger (use only relevant triggers vs. use all)
+ rgfr is the frequency at which triggers are generated */
+ InstStrategyAutoGenTriggers( QuantifiersEngine* qe, int tstrt, int rstrt, int rgfr = -1 ) :
+ InstStrategy( qe ), d_tr_strategy( tstrt ), d_rlv_strategy( rstrt ), d_generate_additional( false ){
+ setRegenerateFrequency( rgfr );
+ }
+ ~InstStrategyAutoGenTriggers(){}
+public:
+ /** get auto-generated trigger */
+ inst::Trigger* getAutoGenTrigger( Node f );
+ /** identify */
+ std::string identify() const { return std::string("AutoGenTriggers"); }
+ /** set regenerate frequency, if fr<0, turn off regenerate */
+ void setRegenerateFrequency( int fr ){
+ if( fr<0 ){
+ d_regenerate = false;
+ }else{
+ d_regenerate_frequency = fr;
+ d_regenerate = true;
+ }
+ }
+ /** set generate additional */
+ void setGenerateAdditional( bool val ) { d_generate_additional = val; }
+};/* class InstStrategyAutoGenTriggers */
+
+class InstStrategyFreeVariable : public InstStrategy{
+private:
+ /** guessed instantiations */
+ std::map< Node, bool > d_guessed;
+ /** process functions */
+ void processResetInstantiationRound( Theory::Effort effort );
+ int process( Node f, Theory::Effort effort, int e );
+public:
+ InstStrategyFreeVariable( QuantifiersEngine* qe ) :
+ InstStrategy( qe ){}
+ ~InstStrategyFreeVariable(){}
+ /** identify */
+ std::string identify() const { return std::string("FreeVariable"); }
+};/* class InstStrategyFreeVariable */
+
+}
+}/* CVC4::theory namespace */
+}/* CVC4 namespace */
+
+#endif
diff --git a/src/theory/quantifiers/instantiation_engine.cpp b/src/theory/quantifiers/instantiation_engine.cpp
index 53977ee4f..75cc10615 100644
--- a/src/theory/quantifiers/instantiation_engine.cpp
+++ b/src/theory/quantifiers/instantiation_engine.cpp
@@ -84,16 +84,18 @@ bool InstantiationEngine::doInstantiationRound( Theory::Effort effort ){
//add cbqi lemma
//get the counterexample literal
Node ceLit = d_quantEngine->getTermDatabase()->getCounterexampleLiteral( f );
- //require any decision on cel to be phase=true
- d_quantEngine->getOutputChannel().requirePhase( ceLit, true );
- Debug("cbqi-debug") << "Require phase " << ceLit << " = true." << std::endl;
- //add counterexample lemma
- NodeBuilder<> nb(kind::OR);
- nb << f << ceLit;
- Node lem = nb;
- Debug("cbqi-debug") << "Counterexample lemma : " << lem << std::endl;
- d_quantEngine->getOutputChannel().lemma( lem );
- addedLemma = true;
+ if( !ceLit.isNull() ){
+ //require any decision on cel to be phase=true
+ d_quantEngine->getOutputChannel().requirePhase( ceLit, true );
+ Debug("cbqi-debug") << "Require phase " << ceLit << " = true." << std::endl;
+ //add counterexample lemma
+ NodeBuilder<> nb(kind::OR);
+ nb << f << ceLit;
+ Node lem = nb;
+ Debug("cbqi-debug") << "Counterexample lemma : " << lem << std::endl;
+ d_quantEngine->getOutputChannel().lemma( lem );
+ addedLemma = true;
+ }
}
}
if( addedLemma ){
diff --git a/src/theory/quantifiers/macros.cpp b/src/theory/quantifiers/macros.cpp
index c116b73f5..bf67bdd25 100755..100644
--- a/src/theory/quantifiers/macros.cpp
+++ b/src/theory/quantifiers/macros.cpp
@@ -1,375 +1,375 @@
-/********************* */
-/*! \file macros.cpp
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
- ** Minor contributors (to current version): none
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief Sort inference module
- **
- ** This class implements quantifiers macro definitions.
- **/
-
-#include <vector>
-
-#include "theory/quantifiers/macros.h"
-#include "theory/rewriter.h"
-
-using namespace CVC4;
-using namespace std;
-using namespace CVC4::theory;
-using namespace CVC4::theory::quantifiers;
-using namespace CVC4::kind;
-using namespace CVC4::context;
-
-bool QuantifierMacros::simplify( std::vector< Node >& assertions, bool doRewrite ){
- //first, collect macro definitions
- for( size_t i=0; i<assertions.size(); i++ ){
- if( assertions[i].getKind()==FORALL ){
- std::vector< Node > args;
- for( size_t j=0; j<assertions[i][0].getNumChildren(); j++ ){
- args.push_back( assertions[i][0][j] );
- }
- //look at the body of the quantifier for macro definition
- process( assertions[i][1], true, args, assertions[i] );
- }
- }
- //create macro defs
- for( std::map< Node, std::vector< std::pair< Node, Node > > >::iterator it = d_macro_def_cases.begin();
- it != d_macro_def_cases.end(); ++it ){
- //create ite based on case definitions
- Node val;
- for( size_t i=0; i<it->second.size(); ++i ){
- if( it->second[i].first.isNull() ){
- Assert( i==0 );
- val = it->second[i].second;
- }else{
- //if value is null, must generate it
- if( val.isNull() ){
- std::stringstream ss;
- ss << "mdo_" << it->first << "_$$";
- Node op = NodeManager::currentNM()->mkSkolem( ss.str(), it->first.getType(), "op created during macro definitions" );
- //will be defined in terms of fresh operator
- std::vector< Node > children;
- children.push_back( op );
- children.insert( children.end(), d_macro_basis[ it->first ].begin(), d_macro_basis[ it->first ].end() );
- val = NodeManager::currentNM()->mkNode( APPLY_UF, children );
- }
- val = NodeManager::currentNM()->mkNode( ITE, it->second[i].first, it->second[i].second, val );
- }
- }
- d_macro_defs[ it->first ] = val;
- Trace("macros-def") << "* " << val << " is a macro for " << it->first << std::endl;
- }
- //now simplify bodies
- for( std::map< Node, Node >::iterator it = d_macro_defs.begin(); it != d_macro_defs.end(); ++it ){
- d_macro_defs[ it->first ] = Rewriter::rewrite( simplify( it->second ) );
- }
- bool retVal = false;
- if( doRewrite && !d_macro_defs.empty() ){
- //now, rewrite based on macro definitions
- for( size_t i=0; i<assertions.size(); i++ ){
- Node prev = assertions[i];
- assertions[i] = simplify( assertions[i] );
- if( prev!=assertions[i] ){
- assertions[i] = Rewriter::rewrite( assertions[i] );
- Trace("macros-rewrite") << "Rewrite " << prev << " to " << assertions[i] << std::endl;
- retVal = true;
- }
- }
- }
- return retVal;
-}
-
-bool QuantifierMacros::contains( Node n, Node n_s ){
- if( n==n_s ){
- return true;
- }else{
- for( size_t i=0; i<n.getNumChildren(); i++ ){
- if( contains( n[i], n_s ) ){
- return true;
- }
- }
- return false;
- }
-}
-
-bool QuantifierMacros::containsBadOp( Node n, Node n_op ){
- if( n!=n_op ){
- if( n.getKind()==APPLY_UF ){
- Node op = n.getOperator();
- if( op==n_op.getOperator() ){
- return true;
- }
- if( d_macro_def_cases.find( op )!=d_macro_def_cases.end() && !d_macro_def_cases[op].empty() ){
- return true;
- }
- }
- for( size_t i=0; i<n.getNumChildren(); i++ ){
- if( containsBadOp( n[i], n_op ) ){
- return true;
- }
- }
- }
- return false;
-}
-
-bool QuantifierMacros::isMacroLiteral( Node n, bool pol ){
- return pol && n.getKind()==EQUAL;//( n.getKind()==EQUAL || n.getKind()==IFF );
-}
-
-void QuantifierMacros::getMacroCandidates( Node n, std::vector< Node >& candidates ){
- if( n.getKind()==APPLY_UF ){
- candidates.push_back( n );
- }else if( n.getKind()==PLUS ){
- for( size_t i=0; i<n.getNumChildren(); i++ ){
- getMacroCandidates( n[i], candidates );
- }
- }else if( n.getKind()==MULT ){
- //if the LHS is a constant
- if( n.getNumChildren()==2 && n[0].isConst() ){
- getMacroCandidates( n[1], candidates );
- }
- }
-}
-
-Node QuantifierMacros::solveInEquality( Node n, Node lit ){
- if( lit.getKind()==IFF || lit.getKind()==EQUAL ){
- //return the opposite side of the equality if defined that way
- for( int i=0; i<2; i++ ){
- if( lit[i]==n ){
- return lit[ i==0 ? 1 : 0];
- }
- }
- //must solve for term n in the literal lit
- if( lit[0].getType().isInteger() || lit[0].getType().isReal() ){
- Node coeff;
- Node term;
- //could be solved for on LHS
- if( lit[0].getKind()==MULT && lit[0][1]==n ){
- Assert( lit[0][0].isConst() );
- term = lit[1];
- coeff = lit[0][0];
- }else{
- Assert( lit[1].getKind()==PLUS );
- std::vector< Node > plus_children;
- //find monomial with n
- for( size_t j=0; j<lit[1].getNumChildren(); j++ ){
- if( lit[1][j]==n ){
- Assert( coeff.isNull() );
- coeff = NodeManager::currentNM()->mkConst( Rational(1) );
- }else if( lit[1][j].getKind()==MULT && lit[1][j][1]==n ){
- Assert( coeff.isNull() );
- Assert( lit[1][j][0].isConst() );
- coeff = lit[1][j][0];
- }else{
- plus_children.push_back( lit[1][j] );
- }
- }
- if( !coeff.isNull() ){
- term = NodeManager::currentNM()->mkNode( PLUS, plus_children );
- term = NodeManager::currentNM()->mkNode( MINUS, lit[0], term );
- }
- }
- if( !coeff.isNull() ){
- coeff = NodeManager::currentNM()->mkConst( Rational(1) / coeff.getConst<Rational>() );
- term = NodeManager::currentNM()->mkNode( MULT, coeff, term );
- term = Rewriter::rewrite( term );
- return term;
- }
- }
- }
- Trace("macros-debug") << "Cannot find for " << lit << " " << n << std::endl;
- return Node::null();
-}
-
-bool QuantifierMacros::isConsistentDefinition( Node op, Node cond, Node def ){
- if( d_macro_def_cases[op].empty() || ( cond.isNull() && !d_macro_def_cases[op][0].first.isNull() ) ){
- return true;
- }else{
- return false;
- }
-}
-
-bool QuantifierMacros::getFreeVariables( Node n, std::vector< Node >& v_quant, std::vector< Node >& vars, bool retOnly ){
- if( std::find( v_quant.begin(), v_quant.end(), n )!=v_quant.end() ){
- if( std::find( vars.begin(), vars.end(), n )==vars.end() ){
- if( retOnly ){
- return true;
- }else{
- vars.push_back( n );
- }
- }
- }
- for( size_t i=0; i<n.getNumChildren(); i++ ){
- if( getFreeVariables( n[i], v_quant, vars, retOnly ) ){
- return true;
- }
- }
- return false;
-}
-
-bool QuantifierMacros::getSubstitution( std::vector< Node >& v_quant, std::map< Node, Node >& solved,
- std::vector< Node >& vars, std::vector< Node >& subs, bool reqComplete ){
- bool success = true;
- for( size_t a=0; a<v_quant.size(); a++ ){
- if( !solved[ v_quant[a] ].isNull() ){
- vars.push_back( v_quant[a] );
- subs.push_back( solved[ v_quant[a] ] );
- }else{
- if( reqComplete ){
- success = false;
- break;
- }
- }
- }
- return success;
-}
-
-void QuantifierMacros::process( Node n, bool pol, std::vector< Node >& args, Node f ){
- if( n.getKind()==NOT ){
- process( n[0], !pol, args, f );
- }else if( n.getKind()==AND || n.getKind()==OR || n.getKind()==IMPLIES ){
- //bool favorPol = (n.getKind()==AND)==pol;
- //conditional?
- }else if( n.getKind()==ITE ){
- //can not do anything
- }else{
- //literal case
- if( isMacroLiteral( n, pol ) ){
- std::vector< Node > candidates;
- for( size_t i=0; i<n.getNumChildren(); i++ ){
- getMacroCandidates( n[i], candidates );
- }
- for( size_t i=0; i<candidates.size(); i++ ){
- Node m = candidates[i];
- Node op = m.getOperator();
- if( !containsBadOp( n, m ) ){
- std::vector< Node > fvs;
- getFreeVariables( m, args, fvs, false );
- //get definition and condition
- Node n_def = solveInEquality( m, n ); //definition for the macro
- //definition must exist and not contain any free variables apart from fvs
- if( !n_def.isNull() && !getFreeVariables( n_def, args, fvs, true ) ){
- Node n_cond; //condition when this definition holds
- //conditional must not contain any free variables apart from fvs
- if( n_cond.isNull() || !getFreeVariables( n_cond, args, fvs, true ) ){
- Trace("macros") << m << " is possible macro in " << f << std::endl;
- //now we must rewrite candidates[i] to a term of form g( x1, ..., xn ) where
- // x1 ... xn are distinct variables
- if( d_macro_basis[op].empty() ){
- for( size_t a=0; a<m.getNumChildren(); a++ ){
- std::stringstream ss;
- ss << "mda_" << op << "_$$";
- Node v = NodeManager::currentNM()->mkSkolem( ss.str(), m[a].getType(), "created during macro definition recognition" );
- d_macro_basis[op].push_back( v );
- }
- }
- std::vector< Node > eq;
- for( size_t a=0; a<m.getNumChildren(); a++ ){
- eq.push_back( m[a] );
- }
- //solve system of equations "d_macro_basis[op] = m" for variables in fvs
- std::map< Node, Node > solved;
- //solve obvious cases first
- for( size_t a=0; a<eq.size(); a++ ){
- if( std::find( fvs.begin(), fvs.end(), eq[a] )!=fvs.end() ){
- if( solved[ eq[a] ].isNull() ){
- solved[ eq[a] ] = d_macro_basis[op][a];
- }
- }
- }
- //now, apply substitution for obvious cases
- std::vector< Node > vars;
- std::vector< Node > subs;
- getSubstitution( fvs, solved, vars, subs, false );
- for( size_t a=0; a<eq.size(); a++ ){
- eq[a] = eq[a].substitute( vars.begin(), vars.end(), subs.begin(), subs.end() );
- }
-
- Trace("macros-eq") << "Solve system of equations : " << std::endl;
- for( size_t a=0; a<m.getNumChildren(); a++ ){
- if( d_macro_basis[op][a]!=eq[a] ){
- Trace("macros-eq") << " " << d_macro_basis[op][a] << " = " << eq[a] << std::endl;
- }
- }
- Trace("macros-eq") << " for ";
- for( size_t a=0; a<fvs.size(); a++ ){
- if( solved[ fvs[a] ].isNull() ){
- Trace("macros-eq") << fvs[a] << " ";
- }
- }
- Trace("macros-eq") << std::endl;
- //DO_THIS
-
-
- vars.clear();
- subs.clear();
- if( getSubstitution( fvs, solved, vars, subs, true ) ){
- //build condition
- std::vector< Node > conds;
- if( !n_cond.isNull() ){
- //must apply substitution obtained from solving system of equations to original condition
- n_cond = n_cond.substitute( vars.begin(), vars.end(), subs.begin(), subs.end() );
- conds.push_back( n_cond );
- }
- for( size_t a=0; a<eq.size(); a++ ){
- //collect conditions based on solving argument's system of equations
- if( d_macro_basis[op][a]!=eq[a] ){
- conds.push_back( NodeManager::currentNM()->mkNode( eq[a].getType().isBoolean() ? IFF : EQUAL, d_macro_basis[op][a], eq[a] ) );
- }
- }
- //build the condition
- if( !conds.empty() ){
- n_cond = conds.size()==1 ? conds[0] : NodeManager::currentNM()->mkNode( AND, conds );
- }
- //apply the substitution to the
- n_def = n_def.substitute( vars.begin(), vars.end(), subs.begin(), subs.end() );
- //now see if definition is consistent with others
- if( isConsistentDefinition( op, n_cond, n_def ) ){
- //must clear if it is a base definition
- if( n_cond.isNull() ){
- d_macro_def_cases[ op ].clear();
- }
- d_macro_def_cases[ op ].push_back( std::pair< Node, Node >( n_cond, n_def ) );
- }
- }
- }
- }
- }
- }
- }
- }
-}
-
-Node QuantifierMacros::simplify( Node n ){
- Trace("macros-debug") << "simplify " << n << std::endl;
- std::vector< Node > children;
- bool childChanged = false;
- for( size_t i=0; i<n.getNumChildren(); i++ ){
- Node nn = simplify( n[i] );
- children.push_back( nn );
- childChanged = childChanged || nn!=n[i];
- }
- if( n.getKind()==APPLY_UF ){
- Node op = n.getOperator();
- if( d_macro_defs.find( op )!=d_macro_defs.end() && !d_macro_defs[op].isNull() ){
- //do subsitutition
- Node ret = d_macro_defs[op];
- ret = ret.substitute( d_macro_basis[op].begin(), d_macro_basis[op].end(), children.begin(), children.end() );
- return ret;
- }
- }
- if( childChanged ){
- if( n.getMetaKind() == kind::metakind::PARAMETERIZED ){
- children.insert( children.begin(), n.getOperator() );
- }
- return NodeManager::currentNM()->mkNode( n.getKind(), children );
- }else{
- return n;
- }
-}
+/********************* */
+/*! \file macros.cpp
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief Sort inference module
+ **
+ ** This class implements quantifiers macro definitions.
+ **/
+
+#include <vector>
+
+#include "theory/quantifiers/macros.h"
+#include "theory/rewriter.h"
+
+using namespace CVC4;
+using namespace std;
+using namespace CVC4::theory;
+using namespace CVC4::theory::quantifiers;
+using namespace CVC4::kind;
+using namespace CVC4::context;
+
+bool QuantifierMacros::simplify( std::vector< Node >& assertions, bool doRewrite ){
+ //first, collect macro definitions
+ for( size_t i=0; i<assertions.size(); i++ ){
+ if( assertions[i].getKind()==FORALL ){
+ std::vector< Node > args;
+ for( size_t j=0; j<assertions[i][0].getNumChildren(); j++ ){
+ args.push_back( assertions[i][0][j] );
+ }
+ //look at the body of the quantifier for macro definition
+ process( assertions[i][1], true, args, assertions[i] );
+ }
+ }
+ //create macro defs
+ for( std::map< Node, std::vector< std::pair< Node, Node > > >::iterator it = d_macro_def_cases.begin();
+ it != d_macro_def_cases.end(); ++it ){
+ //create ite based on case definitions
+ Node val;
+ for( size_t i=0; i<it->second.size(); ++i ){
+ if( it->second[i].first.isNull() ){
+ Assert( i==0 );
+ val = it->second[i].second;
+ }else{
+ //if value is null, must generate it
+ if( val.isNull() ){
+ std::stringstream ss;
+ ss << "mdo_" << it->first << "_$$";
+ Node op = NodeManager::currentNM()->mkSkolem( ss.str(), it->first.getType(), "op created during macro definitions" );
+ //will be defined in terms of fresh operator
+ std::vector< Node > children;
+ children.push_back( op );
+ children.insert( children.end(), d_macro_basis[ it->first ].begin(), d_macro_basis[ it->first ].end() );
+ val = NodeManager::currentNM()->mkNode( APPLY_UF, children );
+ }
+ val = NodeManager::currentNM()->mkNode( ITE, it->second[i].first, it->second[i].second, val );
+ }
+ }
+ d_macro_defs[ it->first ] = val;
+ Trace("macros-def") << "* " << val << " is a macro for " << it->first << std::endl;
+ }
+ //now simplify bodies
+ for( std::map< Node, Node >::iterator it = d_macro_defs.begin(); it != d_macro_defs.end(); ++it ){
+ d_macro_defs[ it->first ] = Rewriter::rewrite( simplify( it->second ) );
+ }
+ bool retVal = false;
+ if( doRewrite && !d_macro_defs.empty() ){
+ //now, rewrite based on macro definitions
+ for( size_t i=0; i<assertions.size(); i++ ){
+ Node prev = assertions[i];
+ assertions[i] = simplify( assertions[i] );
+ if( prev!=assertions[i] ){
+ assertions[i] = Rewriter::rewrite( assertions[i] );
+ Trace("macros-rewrite") << "Rewrite " << prev << " to " << assertions[i] << std::endl;
+ retVal = true;
+ }
+ }
+ }
+ return retVal;
+}
+
+bool QuantifierMacros::contains( Node n, Node n_s ){
+ if( n==n_s ){
+ return true;
+ }else{
+ for( size_t i=0; i<n.getNumChildren(); i++ ){
+ if( contains( n[i], n_s ) ){
+ return true;
+ }
+ }
+ return false;
+ }
+}
+
+bool QuantifierMacros::containsBadOp( Node n, Node n_op ){
+ if( n!=n_op ){
+ if( n.getKind()==APPLY_UF ){
+ Node op = n.getOperator();
+ if( op==n_op.getOperator() ){
+ return true;
+ }
+ if( d_macro_def_cases.find( op )!=d_macro_def_cases.end() && !d_macro_def_cases[op].empty() ){
+ return true;
+ }
+ }
+ for( size_t i=0; i<n.getNumChildren(); i++ ){
+ if( containsBadOp( n[i], n_op ) ){
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+bool QuantifierMacros::isMacroLiteral( Node n, bool pol ){
+ return pol && n.getKind()==EQUAL;//( n.getKind()==EQUAL || n.getKind()==IFF );
+}
+
+void QuantifierMacros::getMacroCandidates( Node n, std::vector< Node >& candidates ){
+ if( n.getKind()==APPLY_UF ){
+ candidates.push_back( n );
+ }else if( n.getKind()==PLUS ){
+ for( size_t i=0; i<n.getNumChildren(); i++ ){
+ getMacroCandidates( n[i], candidates );
+ }
+ }else if( n.getKind()==MULT ){
+ //if the LHS is a constant
+ if( n.getNumChildren()==2 && n[0].isConst() ){
+ getMacroCandidates( n[1], candidates );
+ }
+ }
+}
+
+Node QuantifierMacros::solveInEquality( Node n, Node lit ){
+ if( lit.getKind()==IFF || lit.getKind()==EQUAL ){
+ //return the opposite side of the equality if defined that way
+ for( int i=0; i<2; i++ ){
+ if( lit[i]==n ){
+ return lit[ i==0 ? 1 : 0];
+ }
+ }
+ //must solve for term n in the literal lit
+ if( lit[0].getType().isInteger() || lit[0].getType().isReal() ){
+ Node coeff;
+ Node term;
+ //could be solved for on LHS
+ if( lit[0].getKind()==MULT && lit[0][1]==n ){
+ Assert( lit[0][0].isConst() );
+ term = lit[1];
+ coeff = lit[0][0];
+ }else{
+ Assert( lit[1].getKind()==PLUS );
+ std::vector< Node > plus_children;
+ //find monomial with n
+ for( size_t j=0; j<lit[1].getNumChildren(); j++ ){
+ if( lit[1][j]==n ){
+ Assert( coeff.isNull() );
+ coeff = NodeManager::currentNM()->mkConst( Rational(1) );
+ }else if( lit[1][j].getKind()==MULT && lit[1][j][1]==n ){
+ Assert( coeff.isNull() );
+ Assert( lit[1][j][0].isConst() );
+ coeff = lit[1][j][0];
+ }else{
+ plus_children.push_back( lit[1][j] );
+ }
+ }
+ if( !coeff.isNull() ){
+ term = NodeManager::currentNM()->mkNode( PLUS, plus_children );
+ term = NodeManager::currentNM()->mkNode( MINUS, lit[0], term );
+ }
+ }
+ if( !coeff.isNull() ){
+ coeff = NodeManager::currentNM()->mkConst( Rational(1) / coeff.getConst<Rational>() );
+ term = NodeManager::currentNM()->mkNode( MULT, coeff, term );
+ term = Rewriter::rewrite( term );
+ return term;
+ }
+ }
+ }
+ Trace("macros-debug") << "Cannot find for " << lit << " " << n << std::endl;
+ return Node::null();
+}
+
+bool QuantifierMacros::isConsistentDefinition( Node op, Node cond, Node def ){
+ if( d_macro_def_cases[op].empty() || ( cond.isNull() && !d_macro_def_cases[op][0].first.isNull() ) ){
+ return true;
+ }else{
+ return false;
+ }
+}
+
+bool QuantifierMacros::getFreeVariables( Node n, std::vector< Node >& v_quant, std::vector< Node >& vars, bool retOnly ){
+ if( std::find( v_quant.begin(), v_quant.end(), n )!=v_quant.end() ){
+ if( std::find( vars.begin(), vars.end(), n )==vars.end() ){
+ if( retOnly ){
+ return true;
+ }else{
+ vars.push_back( n );
+ }
+ }
+ }
+ for( size_t i=0; i<n.getNumChildren(); i++ ){
+ if( getFreeVariables( n[i], v_quant, vars, retOnly ) ){
+ return true;
+ }
+ }
+ return false;
+}
+
+bool QuantifierMacros::getSubstitution( std::vector< Node >& v_quant, std::map< Node, Node >& solved,
+ std::vector< Node >& vars, std::vector< Node >& subs, bool reqComplete ){
+ bool success = true;
+ for( size_t a=0; a<v_quant.size(); a++ ){
+ if( !solved[ v_quant[a] ].isNull() ){
+ vars.push_back( v_quant[a] );
+ subs.push_back( solved[ v_quant[a] ] );
+ }else{
+ if( reqComplete ){
+ success = false;
+ break;
+ }
+ }
+ }
+ return success;
+}
+
+void QuantifierMacros::process( Node n, bool pol, std::vector< Node >& args, Node f ){
+ if( n.getKind()==NOT ){
+ process( n[0], !pol, args, f );
+ }else if( n.getKind()==AND || n.getKind()==OR || n.getKind()==IMPLIES ){
+ //bool favorPol = (n.getKind()==AND)==pol;
+ //conditional?
+ }else if( n.getKind()==ITE ){
+ //can not do anything
+ }else{
+ //literal case
+ if( isMacroLiteral( n, pol ) ){
+ std::vector< Node > candidates;
+ for( size_t i=0; i<n.getNumChildren(); i++ ){
+ getMacroCandidates( n[i], candidates );
+ }
+ for( size_t i=0; i<candidates.size(); i++ ){
+ Node m = candidates[i];
+ Node op = m.getOperator();
+ if( !containsBadOp( n, m ) ){
+ std::vector< Node > fvs;
+ getFreeVariables( m, args, fvs, false );
+ //get definition and condition
+ Node n_def = solveInEquality( m, n ); //definition for the macro
+ //definition must exist and not contain any free variables apart from fvs
+ if( !n_def.isNull() && !getFreeVariables( n_def, args, fvs, true ) ){
+ Node n_cond; //condition when this definition holds
+ //conditional must not contain any free variables apart from fvs
+ if( n_cond.isNull() || !getFreeVariables( n_cond, args, fvs, true ) ){
+ Trace("macros") << m << " is possible macro in " << f << std::endl;
+ //now we must rewrite candidates[i] to a term of form g( x1, ..., xn ) where
+ // x1 ... xn are distinct variables
+ if( d_macro_basis[op].empty() ){
+ for( size_t a=0; a<m.getNumChildren(); a++ ){
+ std::stringstream ss;
+ ss << "mda_" << op << "_$$";
+ Node v = NodeManager::currentNM()->mkSkolem( ss.str(), m[a].getType(), "created during macro definition recognition" );
+ d_macro_basis[op].push_back( v );
+ }
+ }
+ std::vector< Node > eq;
+ for( size_t a=0; a<m.getNumChildren(); a++ ){
+ eq.push_back( m[a] );
+ }
+ //solve system of equations "d_macro_basis[op] = m" for variables in fvs
+ std::map< Node, Node > solved;
+ //solve obvious cases first
+ for( size_t a=0; a<eq.size(); a++ ){
+ if( std::find( fvs.begin(), fvs.end(), eq[a] )!=fvs.end() ){
+ if( solved[ eq[a] ].isNull() ){
+ solved[ eq[a] ] = d_macro_basis[op][a];
+ }
+ }
+ }
+ //now, apply substitution for obvious cases
+ std::vector< Node > vars;
+ std::vector< Node > subs;
+ getSubstitution( fvs, solved, vars, subs, false );
+ for( size_t a=0; a<eq.size(); a++ ){
+ eq[a] = eq[a].substitute( vars.begin(), vars.end(), subs.begin(), subs.end() );
+ }
+
+ Trace("macros-eq") << "Solve system of equations : " << std::endl;
+ for( size_t a=0; a<m.getNumChildren(); a++ ){
+ if( d_macro_basis[op][a]!=eq[a] ){
+ Trace("macros-eq") << " " << d_macro_basis[op][a] << " = " << eq[a] << std::endl;
+ }
+ }
+ Trace("macros-eq") << " for ";
+ for( size_t a=0; a<fvs.size(); a++ ){
+ if( solved[ fvs[a] ].isNull() ){
+ Trace("macros-eq") << fvs[a] << " ";
+ }
+ }
+ Trace("macros-eq") << std::endl;
+ //DO_THIS
+
+
+ vars.clear();
+ subs.clear();
+ if( getSubstitution( fvs, solved, vars, subs, true ) ){
+ //build condition
+ std::vector< Node > conds;
+ if( !n_cond.isNull() ){
+ //must apply substitution obtained from solving system of equations to original condition
+ n_cond = n_cond.substitute( vars.begin(), vars.end(), subs.begin(), subs.end() );
+ conds.push_back( n_cond );
+ }
+ for( size_t a=0; a<eq.size(); a++ ){
+ //collect conditions based on solving argument's system of equations
+ if( d_macro_basis[op][a]!=eq[a] ){
+ conds.push_back( NodeManager::currentNM()->mkNode( eq[a].getType().isBoolean() ? IFF : EQUAL, d_macro_basis[op][a], eq[a] ) );
+ }
+ }
+ //build the condition
+ if( !conds.empty() ){
+ n_cond = conds.size()==1 ? conds[0] : NodeManager::currentNM()->mkNode( AND, conds );
+ }
+ //apply the substitution to the
+ n_def = n_def.substitute( vars.begin(), vars.end(), subs.begin(), subs.end() );
+ //now see if definition is consistent with others
+ if( isConsistentDefinition( op, n_cond, n_def ) ){
+ //must clear if it is a base definition
+ if( n_cond.isNull() ){
+ d_macro_def_cases[ op ].clear();
+ }
+ d_macro_def_cases[ op ].push_back( std::pair< Node, Node >( n_cond, n_def ) );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+Node QuantifierMacros::simplify( Node n ){
+ Trace("macros-debug") << "simplify " << n << std::endl;
+ std::vector< Node > children;
+ bool childChanged = false;
+ for( size_t i=0; i<n.getNumChildren(); i++ ){
+ Node nn = simplify( n[i] );
+ children.push_back( nn );
+ childChanged = childChanged || nn!=n[i];
+ }
+ if( n.getKind()==APPLY_UF ){
+ Node op = n.getOperator();
+ if( d_macro_defs.find( op )!=d_macro_defs.end() && !d_macro_defs[op].isNull() ){
+ //do substitution
+ Node ret = d_macro_defs[op];
+ ret = ret.substitute( d_macro_basis[op].begin(), d_macro_basis[op].end(), children.begin(), children.end() );
+ return ret;
+ }
+ }
+ if( childChanged ){
+ if( n.getMetaKind() == kind::metakind::PARAMETERIZED ){
+ children.insert( children.begin(), n.getOperator() );
+ }
+ return NodeManager::currentNM()->mkNode( n.getKind(), children );
+ }else{
+ return n;
+ }
+}
diff --git a/src/theory/quantifiers/macros.h b/src/theory/quantifiers/macros.h
index b1fbb3e68..140f02966 100755..100644
--- a/src/theory/quantifiers/macros.h
+++ b/src/theory/quantifiers/macros.h
@@ -1,62 +1,62 @@
-/********************* */
-/*! \file macros.h
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
- ** Minor contributors (to current version): none
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief Pre-process step for detecting quantifier macro definitions
- **/
-
-#include "cvc4_private.h"
-
-#ifndef __CVC4__QUANTIFIERS_MACROS_H
-#define __CVC4__QUANTIFIERS_MACROS_H
-
-#include <iostream>
-#include <string>
-#include <vector>
-#include <map>
-#include "expr/node.h"
-#include "expr/type_node.h"
-
-namespace CVC4 {
-namespace theory {
-namespace quantifiers {
-
-class QuantifierMacros{
-private:
- void process( Node n, bool pol, std::vector< Node >& args, Node f );
- bool contains( Node n, Node n_s );
- bool containsBadOp( Node n, Node n_op );
- bool isMacroLiteral( Node n, bool pol );
- void getMacroCandidates( Node n, std::vector< Node >& candidates );
- Node solveInEquality( Node n, Node lit );
- bool isConsistentDefinition( Node op, Node cond, Node def );
- bool getFreeVariables( Node n, std::vector< Node >& v_quant, std::vector< Node >& vars, bool retOnly );
- bool getSubstitution( std::vector< Node >& v_quant, std::map< Node, Node >& solved,
- std::vector< Node >& vars, std::vector< Node >& subs, bool reqComplete );
- //map from operators to macro basis terms
- std::map< Node, std::vector< Node > > d_macro_basis;
- //map from operators to map from conditions to definition cases
- std::map< Node, std::vector< std::pair< Node, Node > > > d_macro_def_cases;
- //map from operators to macro definition
- std::map< Node, Node > d_macro_defs;
-private:
- Node simplify( Node n );
-public:
- QuantifierMacros(){}
- ~QuantifierMacros(){}
-
- bool simplify( std::vector< Node >& assertions, bool doRewrite = false );
-};
-
-}
-}
-}
-
-#endif
+/********************* */
+/*! \file macros.h
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief Pre-process step for detecting quantifier macro definitions
+ **/
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__QUANTIFIERS_MACROS_H
+#define __CVC4__QUANTIFIERS_MACROS_H
+
+#include <iostream>
+#include <string>
+#include <vector>
+#include <map>
+#include "expr/node.h"
+#include "expr/type_node.h"
+
+namespace CVC4 {
+namespace theory {
+namespace quantifiers {
+
+class QuantifierMacros{
+private:
+ void process( Node n, bool pol, std::vector< Node >& args, Node f );
+ bool contains( Node n, Node n_s );
+ bool containsBadOp( Node n, Node n_op );
+ bool isMacroLiteral( Node n, bool pol );
+ void getMacroCandidates( Node n, std::vector< Node >& candidates );
+ Node solveInEquality( Node n, Node lit );
+ bool isConsistentDefinition( Node op, Node cond, Node def );
+ bool getFreeVariables( Node n, std::vector< Node >& v_quant, std::vector< Node >& vars, bool retOnly );
+ bool getSubstitution( std::vector< Node >& v_quant, std::map< Node, Node >& solved,
+ std::vector< Node >& vars, std::vector< Node >& subs, bool reqComplete );
+ //map from operators to macro basis terms
+ std::map< Node, std::vector< Node > > d_macro_basis;
+ //map from operators to map from conditions to definition cases
+ std::map< Node, std::vector< std::pair< Node, Node > > > d_macro_def_cases;
+ //map from operators to macro definition
+ std::map< Node, Node > d_macro_defs;
+private:
+ Node simplify( Node n );
+public:
+ QuantifierMacros(){}
+ ~QuantifierMacros(){}
+
+ bool simplify( std::vector< Node >& assertions, bool doRewrite = false );
+};
+
+}
+}
+}
+
+#endif
diff --git a/src/theory/quantifiers/model_builder.cpp b/src/theory/quantifiers/model_builder.cpp
index 2f44140c2..d8b154b95 100644
--- a/src/theory/quantifiers/model_builder.cpp
+++ b/src/theory/quantifiers/model_builder.cpp
@@ -368,15 +368,32 @@ void ModelEngineBuilderDefault::reset( FirstOrderModel* fm ){
d_op_selection_terms.clear();
}
+
+int ModelEngineBuilderDefault::getSelectionScore( std::vector< Node >& uf_terms ) {
+ /*
+ size_t maxChildren = 0;
+ for( size_t i=0; i<uf_terms.size(); i++ ){
+ if( uf_terms[i].getNumChildren()>maxChildren ){
+ maxChildren = uf_terms[i].getNumChildren();
+ }
+ }
+ //TODO: look at how many entries they have?
+ return (int)maxChildren;
+ */
+ return 0;
+}
+
void ModelEngineBuilderDefault::analyzeQuantifier( FirstOrderModel* fm, Node f ){
Debug("fmf-model-prefs") << "Analyze quantifier " << f << std::endl;
//the pro/con preferences for this quantifier
std::vector< Node > pro_con[2];
//the terms in the selection literal we choose
std::vector< Node > selectionLitTerms;
+ Trace("inst-gen-debug-quant") << "Inst-gen analyze " << f << std::endl;
//for each asserted quantifier f,
// - determine selection literals
// - check which function/predicates have good and bad definitions for satisfying f
+ int selectLitScore = -1;
QuantPhaseReq* qpr = d_qe->getPhaseRequirements( f );
for( std::map< Node, bool >::iterator it = qpr->d_phase_reqs.begin(); it != qpr->d_phase_reqs.end(); ++it ){
//the literal n is phase-required for quantifier f
@@ -433,10 +450,18 @@ void ModelEngineBuilderDefault::analyzeQuantifier( FirstOrderModel* fm, Node f )
selectLit = true;
}
}
+ //also check if it is naturally a better literal
+ if( !selectLit ){
+ int score = getSelectionScore( uf_terms );
+ //Trace("inst-gen-debug") << "Check " << score << " < " << selectLitScore << std::endl;
+ selectLit = score<selectLitScore;
+ }
//see if we wish to choose this as a selection literal
d_quant_selection_lit_candidates[f].push_back( value ? n : n.notNode() );
if( selectLit ){
+ selectLitScore = getSelectionScore( uf_terms );
Trace("inst-gen-debug") << "Choose selection literal " << gn << std::endl;
+ Trace("inst-gen-debug") << " flags: " << isConst << " " << selectLitConstraints << " " << selectLitScore << std::endl;
d_quant_selection_lit[f] = value ? n : n.notNode();
selectionLitTerms.clear();
selectionLitTerms.insert( selectionLitTerms.begin(), uf_terms.begin(), uf_terms.end() );
@@ -466,7 +491,7 @@ void ModelEngineBuilderDefault::analyzeQuantifier( FirstOrderModel* fm, Node f )
d_op_selection_terms[ selectionLitTerms[i].getOperator() ].push_back( selectionLitTerms[i] );
}
}else{
- Trace("inst-gen-warn") << "WARNING: " << f << " has no selection literals (is the body of f clausified?)" << std::endl;
+ Trace("inst-gen-warn") << "WARNING: " << f << " has no selection literals" << std::endl;
}
//process information about requirements and preferences of quantifier f
if( d_quant_sat.find( f )!=d_quant_sat.end() ){
@@ -526,7 +551,7 @@ int ModelEngineBuilderDefault::doInstGen( FirstOrderModel* fm, Node f ){
//if applicable, try to add exceptions here
if( !tr_terms.empty() ){
//make a trigger for these terms, add instantiations
- inst::Trigger* tr = inst::Trigger::mkTrigger( d_qe, f, tr_terms );
+ inst::Trigger* tr = inst::Trigger::mkTrigger( d_qe, f, tr_terms, 0, true, inst::Trigger::TR_MAKE_NEW, options::smartTriggers() );
//Notice() << "Trigger = " << (*tr) << std::endl;
tr->resetInstantiationRound();
tr->reset( Node::null() );
diff --git a/src/theory/quantifiers/model_builder.h b/src/theory/quantifiers/model_builder.h
index 908cfca2b..5490d17dd 100644
--- a/src/theory/quantifiers/model_builder.h
+++ b/src/theory/quantifiers/model_builder.h
@@ -155,6 +155,8 @@ private: ///information for (old) InstGen
std::map< Node, Node > d_term_selection_lit;
//map from operators to terms that appear in selection literals
std::map< Node, std::vector< Node > > d_op_selection_terms;
+ //get selection score
+ int getSelectionScore( std::vector< Node >& uf_terms );
protected:
//reset
void reset( FirstOrderModel* fm );
diff --git a/src/theory/quantifiers/model_engine.cpp b/src/theory/quantifiers/model_engine.cpp
index bf6ea11f0..1522d0828 100644
--- a/src/theory/quantifiers/model_engine.cpp
+++ b/src/theory/quantifiers/model_engine.cpp
@@ -73,9 +73,8 @@ void ModelEngine::check( Theory::Effort e ){
if( addedLemmas==0 ){
Trace("model-engine-debug") << "Verify uf ss is minimal..." << std::endl;
//let the strong solver verify that the model is minimal
- uf::StrongSolverTheoryUf* uf_ss = ((uf::TheoryUF*)d_quantEngine->getTheoryEngine()->theoryOf( THEORY_UF ))->getStrongSolver();
//for debugging, this will if there are terms in the model that the strong solver was not notified of
- uf_ss->debugModel( fm );
+ ((uf::TheoryUF*)d_quantEngine->getTheoryEngine()->theoryOf( THEORY_UF ))->getStrongSolver()->debugModel( fm );
Trace("model-engine-debug") << "Check model..." << std::endl;
d_incomplete_check = false;
//print debug
@@ -164,7 +163,7 @@ int ModelEngine::checkModel( int checkOption ){
Trace("model-engine-debug") << " ";
for( size_t i=0; i<it->second.size(); i++ ){
//Trace("model-engine-debug") << it->second[i] << " ";
- Node r = ((EqualityQueryQuantifiersEngine*)d_quantEngine->getEqualityQuery())->getInternalRepresentative( it->second[i] );
+ Node r = ((EqualityQueryQuantifiersEngine*)d_quantEngine->getEqualityQuery())->getRepresentative( it->second[i] );
Trace("model-engine-debug") << r << " ";
}
Trace("model-engine-debug") << std::endl;
@@ -225,7 +224,7 @@ int ModelEngine::checkModel( int checkOption ){
int ModelEngine::exhaustiveInstantiate( Node f, bool useRelInstDomain ){
int addedLemmas = 0;
- Debug("inst-fmf-ei") << "Exhaustive instantiate " << f << "..." << std::endl;
+ Trace("inst-fmf-ei") << "Exhaustive instantiate " << f << "..." << std::endl;
Debug("inst-fmf-ei") << " Instantiation Constants: ";
for( size_t i=0; i<f[0].getNumChildren(); i++ ){
Debug("inst-fmf-ei") << d_quantEngine->getTermDatabase()->getInstantiationConstant( f, i ) << " ";
@@ -299,12 +298,12 @@ int ModelEngine::exhaustiveInstantiate( Node f, bool useRelInstDomain ){
relevantInst = relevantInst * (int)riter.d_domain[i].size();
}
d_relevantLemmas += relevantInst;
- Debug("inst-fmf-ei") << "Finished: " << std::endl;
+ Trace("inst-fmf-ei") << "Finished: " << std::endl;
//Debug("inst-fmf-ei") << " Inst Total: " << totalInst << std::endl;
- Debug("inst-fmf-ei") << " Inst Relevant: " << relevantInst << std::endl;
- Debug("inst-fmf-ei") << " Inst Tried: " << triedLemmas << std::endl;
- Debug("inst-fmf-ei") << " Inst Added: " << addedLemmas << std::endl;
- Debug("inst-fmf-ei") << " # Tests: " << tests << std::endl;
+ Trace("inst-fmf-ei") << " Inst Relevant: " << relevantInst << std::endl;
+ Trace("inst-fmf-ei") << " Inst Tried: " << triedLemmas << std::endl;
+ Trace("inst-fmf-ei") << " Inst Added: " << addedLemmas << std::endl;
+ Trace("inst-fmf-ei") << " # Tests: " << tests << std::endl;
if( addedLemmas>1000 ){
Trace("model-engine-warn") << "WARNING: many instantiations produced for " << f << ": " << std::endl;
//Trace("model-engine-warn") << " Inst Total: " << totalInst << std::endl;
diff --git a/src/theory/quantifiers/options b/src/theory/quantifiers/options
index bc45e6051..7a3687dd5 100644
--- a/src/theory/quantifiers/options
+++ b/src/theory/quantifiers/options
@@ -37,6 +37,9 @@ option cnfQuant --cnf-quant bool :default false
option preSkolemQuant --pre-skolem-quant bool :default false
apply skolemization eagerly to bodies of quantified formulas
+# Whether to perform agressive miniscoping
+option aggressiveMiniscopeQuant --ag-miniscope-quant bool :default false
+ perform aggressive miniscoping for quantifiers
# Whether to perform quantifier macro expansion
option macrosQuant --macros-quant bool :default false
perform quantifiers macro expansions
@@ -45,8 +48,8 @@ option macrosQuant --macros-quant bool :default false
option smartTriggers /--disable-smart-triggers bool :default true
disable smart triggers
# Whether to use relevent triggers
-option relevantTriggers /--relevant-triggers bool :default true
- prefer triggers that are more relevant based on SInE style method
+option relevantTriggers --relevant-triggers bool :default true
+ prefer triggers that are more relevant based on SInE style analysis
# Whether to consider terms in the bodies of quantifiers for matching
option registerQuantBodyTerms --register-quant-body-terms bool :default false
@@ -65,13 +68,14 @@ option cbqi --enable-cbqi/--disable-cbqi bool :default false
turns on counterexample-based quantifier instantiation [off by default]
/turns off counterexample-based quantifier instantiation
+
option userPatternsQuant /--ignore-user-patterns bool :default true
ignore user-provided patterns for quantifier instantiation
option flipDecision --flip-decision/ bool :default false
turns on flip decision heuristic
-option internalReps --disable-quant-internal-reps/ bool :default true
+option internalReps /--disable-quant-internal-reps bool :default true
disables instantiating with representatives chosen by quantifiers engine
option finiteModelFind --finite-model-find bool :default false
@@ -94,6 +98,8 @@ option fmfInstGen /--disable-fmf-inst-gen bool :default true
disable Inst-Gen instantiation techniques for finite model finding
option fmfInstGenOneQuantPerRound --fmf-inst-gen-one-quant-per-round bool :default false
only perform Inst-Gen instantiation techniques on one quantifier per round
+option fmfFreshDistConst --fmf-fresh-dc bool :default false
+ use fresh distinguished representative when applying Inst-Gen techniques
option axiomInstMode --axiom-inst=MODE CVC4::theory::quantifiers::AxiomInstMode :default CVC4::theory::quantifiers::AXIOM_INST_MODE_DEFAULT :include "theory/quantifiers/modes.h" :handler CVC4::theory::quantifiers::stringToAxiomInstMode :handler-include "theory/quantifiers/options_handlers.h"
policy for instantiating axioms
diff --git a/src/theory/quantifiers/quant_util.cpp b/src/theory/quantifiers/quant_util.cpp
index d1b0e0fea..9e4a2a14a 100755..100644
--- a/src/theory/quantifiers/quant_util.cpp
+++ b/src/theory/quantifiers/quant_util.cpp
@@ -1,145 +1,145 @@
-/********************* */
-/*! \file quant_util.cpp
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: bobot, mdeters
- ** Minor contributors (to current version): none
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief Implementation of quantifier utilities
- **/
-
-#include "theory/quantifiers/quant_util.h"
-#include "theory/quantifiers/inst_match.h"
-#include "theory/quantifiers/term_database.h"
-
-using namespace std;
-using namespace CVC4;
-using namespace CVC4::kind;
-using namespace CVC4::context;
-using namespace CVC4::theory;
-
-void QuantRelevance::registerQuantifier( Node f ){
- //compute symbols in f
- std::vector< Node > syms;
- computeSymbols( f[1], syms );
- d_syms[f].insert( d_syms[f].begin(), syms.begin(), syms.end() );
- //set initial relevance
- int minRelevance = -1;
- for( int i=0; i<(int)syms.size(); i++ ){
- d_syms_quants[ syms[i] ].push_back( f );
- int r = getRelevance( syms[i] );
- if( r!=-1 && ( minRelevance==-1 || r<minRelevance ) ){
- minRelevance = r;
- }
- }
- if( minRelevance!=-1 ){
- setRelevance( f, minRelevance+1 );
- }
-}
-
-
-/** compute symbols */
-void QuantRelevance::computeSymbols( Node n, std::vector< Node >& syms ){
- if( n.getKind()==APPLY_UF ){
- Node op = n.getOperator();
- if( std::find( syms.begin(), syms.end(), op )==syms.end() ){
- syms.push_back( op );
- }
- }
- if( n.getKind()!=FORALL ){
- for( int i=0; i<(int)n.getNumChildren(); i++ ){
- computeSymbols( n[i], syms );
- }
- }
-}
-
-/** set relevance */
-void QuantRelevance::setRelevance( Node s, int r ){
- if( d_computeRel ){
- int rOld = getRelevance( s );
- if( rOld==-1 || r<rOld ){
- d_relevance[s] = r;
- if( s.getKind()==FORALL ){
- for( int i=0; i<(int)d_syms[s].size(); i++ ){
- setRelevance( d_syms[s][i], r );
- }
- }else{
- for( int i=0; i<(int)d_syms_quants[s].size(); i++ ){
- setRelevance( d_syms_quants[s][i], r+1 );
- }
- }
- }
- }
-}
-
-
-QuantPhaseReq::QuantPhaseReq( Node n, bool computeEq ){
- std::map< Node, int > phaseReqs2;
- computePhaseReqs( n, false, phaseReqs2 );
- for( std::map< Node, int >::iterator it = phaseReqs2.begin(); it != phaseReqs2.end(); ++it ){
- if( it->second==1 ){
- d_phase_reqs[ it->first ] = true;
- }else if( it->second==-1 ){
- d_phase_reqs[ it->first ] = false;
- }
- }
- Debug("inst-engine-phase-req") << "Phase requirements for " << n << ":" << std::endl;
- //now, compute if any patterns are equality required
- if( computeEq ){
- for( std::map< Node, bool >::iterator it = d_phase_reqs.begin(); it != d_phase_reqs.end(); ++it ){
- Debug("inst-engine-phase-req") << " " << it->first << " -> " << it->second << std::endl;
- if( it->first.getKind()==EQUAL ){
- if( it->first[0].hasAttribute(InstConstantAttribute()) ){
- if( !it->first[1].hasAttribute(InstConstantAttribute()) ){
- d_phase_reqs_equality_term[ it->first[0] ] = it->first[1];
- d_phase_reqs_equality[ it->first[0] ] = it->second;
- Debug("inst-engine-phase-req") << " " << it->first[0] << ( it->second ? " == " : " != " ) << it->first[1] << std::endl;
- }
- }else if( it->first[1].hasAttribute(InstConstantAttribute()) ){
- d_phase_reqs_equality_term[ it->first[1] ] = it->first[0];
- d_phase_reqs_equality[ it->first[1] ] = it->second;
- Debug("inst-engine-phase-req") << " " << it->first[1] << ( it->second ? " == " : " != " ) << it->first[0] << std::endl;
- }
- }
- }
- }
-}
-
-void QuantPhaseReq::computePhaseReqs( Node n, bool polarity, std::map< Node, int >& phaseReqs ){
- bool newReqPol = false;
- bool newPolarity;
- if( n.getKind()==NOT ){
- newReqPol = true;
- newPolarity = !polarity;
- }else if( n.getKind()==OR || n.getKind()==IMPLIES ){
- if( !polarity ){
- newReqPol = true;
- newPolarity = false;
- }
- }else if( n.getKind()==AND ){
- if( polarity ){
- newReqPol = true;
- newPolarity = true;
- }
- }else{
- int val = polarity ? 1 : -1;
- if( phaseReqs.find( n )==phaseReqs.end() ){
- phaseReqs[n] = val;
- }else if( val!=phaseReqs[n] ){
- phaseReqs[n] = 0;
- }
- }
- if( newReqPol ){
- for( int i=0; i<(int)n.getNumChildren(); i++ ){
- if( n.getKind()==IMPLIES && i==0 ){
- computePhaseReqs( n[i], !newPolarity, phaseReqs );
- }else{
- computePhaseReqs( n[i], newPolarity, phaseReqs );
- }
- }
- }
-}
+/********************* */
+/*! \file quant_util.cpp
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief Implementation of quantifier utilities
+ **/
+
+#include "theory/quantifiers/quant_util.h"
+#include "theory/quantifiers/inst_match.h"
+#include "theory/quantifiers/term_database.h"
+
+using namespace std;
+using namespace CVC4;
+using namespace CVC4::kind;
+using namespace CVC4::context;
+using namespace CVC4::theory;
+
+void QuantRelevance::registerQuantifier( Node f ){
+ //compute symbols in f
+ std::vector< Node > syms;
+ computeSymbols( f[1], syms );
+ d_syms[f].insert( d_syms[f].begin(), syms.begin(), syms.end() );
+ //set initial relevance
+ int minRelevance = -1;
+ for( int i=0; i<(int)syms.size(); i++ ){
+ d_syms_quants[ syms[i] ].push_back( f );
+ int r = getRelevance( syms[i] );
+ if( r!=-1 && ( minRelevance==-1 || r<minRelevance ) ){
+ minRelevance = r;
+ }
+ }
+ if( minRelevance!=-1 ){
+ setRelevance( f, minRelevance+1 );
+ }
+}
+
+
+/** compute symbols */
+void QuantRelevance::computeSymbols( Node n, std::vector< Node >& syms ){
+ if( n.getKind()==APPLY_UF ){
+ Node op = n.getOperator();
+ if( std::find( syms.begin(), syms.end(), op )==syms.end() ){
+ syms.push_back( op );
+ }
+ }
+ if( n.getKind()!=FORALL ){
+ for( int i=0; i<(int)n.getNumChildren(); i++ ){
+ computeSymbols( n[i], syms );
+ }
+ }
+}
+
+/** set relevance */
+void QuantRelevance::setRelevance( Node s, int r ){
+ if( d_computeRel ){
+ int rOld = getRelevance( s );
+ if( rOld==-1 || r<rOld ){
+ d_relevance[s] = r;
+ if( s.getKind()==FORALL ){
+ for( int i=0; i<(int)d_syms[s].size(); i++ ){
+ setRelevance( d_syms[s][i], r );
+ }
+ }else{
+ for( int i=0; i<(int)d_syms_quants[s].size(); i++ ){
+ setRelevance( d_syms_quants[s][i], r+1 );
+ }
+ }
+ }
+ }
+}
+
+
+QuantPhaseReq::QuantPhaseReq( Node n, bool computeEq ){
+ std::map< Node, int > phaseReqs2;
+ computePhaseReqs( n, false, phaseReqs2 );
+ for( std::map< Node, int >::iterator it = phaseReqs2.begin(); it != phaseReqs2.end(); ++it ){
+ if( it->second==1 ){
+ d_phase_reqs[ it->first ] = true;
+ }else if( it->second==-1 ){
+ d_phase_reqs[ it->first ] = false;
+ }
+ }
+ Debug("inst-engine-phase-req") << "Phase requirements for " << n << ":" << std::endl;
+ //now, compute if any patterns are equality required
+ if( computeEq ){
+ for( std::map< Node, bool >::iterator it = d_phase_reqs.begin(); it != d_phase_reqs.end(); ++it ){
+ Debug("inst-engine-phase-req") << " " << it->first << " -> " << it->second << std::endl;
+ if( it->first.getKind()==EQUAL ){
+ if( it->first[0].hasAttribute(InstConstantAttribute()) ){
+ if( !it->first[1].hasAttribute(InstConstantAttribute()) ){
+ d_phase_reqs_equality_term[ it->first[0] ] = it->first[1];
+ d_phase_reqs_equality[ it->first[0] ] = it->second;
+ Debug("inst-engine-phase-req") << " " << it->first[0] << ( it->second ? " == " : " != " ) << it->first[1] << std::endl;
+ }
+ }else if( it->first[1].hasAttribute(InstConstantAttribute()) ){
+ d_phase_reqs_equality_term[ it->first[1] ] = it->first[0];
+ d_phase_reqs_equality[ it->first[1] ] = it->second;
+ Debug("inst-engine-phase-req") << " " << it->first[1] << ( it->second ? " == " : " != " ) << it->first[0] << std::endl;
+ }
+ }
+ }
+ }
+}
+
+void QuantPhaseReq::computePhaseReqs( Node n, bool polarity, std::map< Node, int >& phaseReqs ){
+ bool newReqPol = false;
+ bool newPolarity;
+ if( n.getKind()==NOT ){
+ newReqPol = true;
+ newPolarity = !polarity;
+ }else if( n.getKind()==OR || n.getKind()==IMPLIES ){
+ if( !polarity ){
+ newReqPol = true;
+ newPolarity = false;
+ }
+ }else if( n.getKind()==AND ){
+ if( polarity ){
+ newReqPol = true;
+ newPolarity = true;
+ }
+ }else{
+ int val = polarity ? 1 : -1;
+ if( phaseReqs.find( n )==phaseReqs.end() ){
+ phaseReqs[n] = val;
+ }else if( val!=phaseReqs[n] ){
+ phaseReqs[n] = 0;
+ }
+ }
+ if( newReqPol ){
+ for( int i=0; i<(int)n.getNumChildren(); i++ ){
+ if( n.getKind()==IMPLIES && i==0 ){
+ computePhaseReqs( n[i], !newPolarity, phaseReqs );
+ }else{
+ computePhaseReqs( n[i], newPolarity, phaseReqs );
+ }
+ }
+ }
+}
diff --git a/src/theory/quantifiers/quant_util.h b/src/theory/quantifiers/quant_util.h
index bb6855c47..85602dbab 100755..100644
--- a/src/theory/quantifiers/quant_util.h
+++ b/src/theory/quantifiers/quant_util.h
@@ -1,99 +1,99 @@
-/********************* */
-/*! \file quant_util.h
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
- ** Minor contributors (to current version): mdeters, bobot
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief quantifier util
- **/
-
-#include "cvc4_private.h"
-
-#ifndef __CVC4__THEORY__QUANT_UTIL_H
-#define __CVC4__THEORY__QUANT_UTIL_H
-
-#include "theory/theory.h"
-#include "theory/uf/equality_engine.h"
-
-#include <ext/hash_set>
-#include <iostream>
-#include <map>
-
-namespace CVC4 {
-namespace theory {
-
-
-class QuantRelevance
-{
-private:
- /** for computing relavance */
- bool d_computeRel;
- /** map from quantifiers to symbols they contain */
- std::map< Node, std::vector< Node > > d_syms;
- /** map from symbols to quantifiers */
- std::map< Node, std::vector< Node > > d_syms_quants;
- /** relevance for quantifiers and symbols */
- std::map< Node, int > d_relevance;
- /** compute symbols */
- void computeSymbols( Node n, std::vector< Node >& syms );
-public:
- QuantRelevance( bool cr ) : d_computeRel( cr ){}
- ~QuantRelevance(){}
- /** register quantifier */
- void registerQuantifier( Node f );
- /** set relevance */
- void setRelevance( Node s, int r );
- /** get relevance */
- int getRelevance( Node s ) { return d_relevance.find( s )==d_relevance.end() ? -1 : d_relevance[s]; }
- /** get number of quantifiers for symbol s */
- int getNumQuantifiersForSymbol( Node s ) { return (int)d_syms_quants[s].size(); }
-};
-
-class QuantPhaseReq
-{
-private:
- /** helper functions compute phase requirements */
- void computePhaseReqs( Node n, bool polarity, std::map< Node, int >& phaseReqs );
-public:
- QuantPhaseReq( Node n, bool computeEq = false );
- ~QuantPhaseReq(){}
- /** is phase required */
- bool isPhaseReq( Node lit ) { return d_phase_reqs.find( lit )!=d_phase_reqs.end(); }
- /** get phase requirement */
- bool getPhaseReq( Node lit ) { return d_phase_reqs.find( lit )==d_phase_reqs.end() ? false : d_phase_reqs[ lit ]; }
- /** phase requirements for each quantifier for each instantiation literal */
- std::map< Node, bool > d_phase_reqs;
- std::map< Node, bool > d_phase_reqs_equality;
- std::map< Node, Node > d_phase_reqs_equality_term;
-};
-
-
-class EqualityQuery {
-public:
- EqualityQuery(){}
- virtual ~EqualityQuery(){};
- /** reset */
- virtual void reset() = 0;
- /** contains term */
- virtual bool hasTerm( Node a ) = 0;
- /** get the representative of the equivalence class of a */
- virtual Node getRepresentative( Node a ) = 0;
- /** returns true if a and b are equal in the current context */
- virtual bool areEqual( Node a, Node b ) = 0;
- /** returns true is a and b are disequal in the current context */
- virtual bool areDisequal( Node a, Node b ) = 0;
- /** get the equality engine associated with this query */
- virtual eq::EqualityEngine* getEngine() = 0;
- /** get the equivalence class of a */
- virtual void getEquivalenceClass( Node a, std::vector< Node >& eqc ) = 0;
-};/* class EqualityQuery */
-
-}
-}
-
-#endif
+/********************* */
+/*! \file quant_util.h
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief quantifier util
+ **/
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__THEORY__QUANT_UTIL_H
+#define __CVC4__THEORY__QUANT_UTIL_H
+
+#include "theory/theory.h"
+#include "theory/uf/equality_engine.h"
+
+#include <ext/hash_set>
+#include <iostream>
+#include <map>
+
+namespace CVC4 {
+namespace theory {
+
+
+class QuantRelevance
+{
+private:
+ /** for computing relavance */
+ bool d_computeRel;
+ /** map from quantifiers to symbols they contain */
+ std::map< Node, std::vector< Node > > d_syms;
+ /** map from symbols to quantifiers */
+ std::map< Node, std::vector< Node > > d_syms_quants;
+ /** relevance for quantifiers and symbols */
+ std::map< Node, int > d_relevance;
+ /** compute symbols */
+ void computeSymbols( Node n, std::vector< Node >& syms );
+public:
+ QuantRelevance( bool cr ) : d_computeRel( cr ){}
+ ~QuantRelevance(){}
+ /** register quantifier */
+ void registerQuantifier( Node f );
+ /** set relevance */
+ void setRelevance( Node s, int r );
+ /** get relevance */
+ int getRelevance( Node s ) { return d_relevance.find( s )==d_relevance.end() ? -1 : d_relevance[s]; }
+ /** get number of quantifiers for symbol s */
+ int getNumQuantifiersForSymbol( Node s ) { return (int)d_syms_quants[s].size(); }
+};
+
+class QuantPhaseReq
+{
+private:
+ /** helper functions compute phase requirements */
+ void computePhaseReqs( Node n, bool polarity, std::map< Node, int >& phaseReqs );
+public:
+ QuantPhaseReq( Node n, bool computeEq = false );
+ ~QuantPhaseReq(){}
+ /** is phase required */
+ bool isPhaseReq( Node lit ) { return d_phase_reqs.find( lit )!=d_phase_reqs.end(); }
+ /** get phase requirement */
+ bool getPhaseReq( Node lit ) { return d_phase_reqs.find( lit )==d_phase_reqs.end() ? false : d_phase_reqs[ lit ]; }
+ /** phase requirements for each quantifier for each instantiation literal */
+ std::map< Node, bool > d_phase_reqs;
+ std::map< Node, bool > d_phase_reqs_equality;
+ std::map< Node, Node > d_phase_reqs_equality_term;
+};
+
+
+class EqualityQuery {
+public:
+ EqualityQuery(){}
+ virtual ~EqualityQuery(){};
+ /** reset */
+ virtual void reset() = 0;
+ /** contains term */
+ virtual bool hasTerm( Node a ) = 0;
+ /** get the representative of the equivalence class of a */
+ virtual Node getRepresentative( Node a ) = 0;
+ /** returns true if a and b are equal in the current context */
+ virtual bool areEqual( Node a, Node b ) = 0;
+ /** returns true is a and b are disequal in the current context */
+ virtual bool areDisequal( Node a, Node b ) = 0;
+ /** get the equality engine associated with this query */
+ virtual eq::EqualityEngine* getEngine() = 0;
+ /** get the equivalence class of a */
+ virtual void getEquivalenceClass( Node a, std::vector< Node >& eqc ) = 0;
+};/* class EqualityQuery */
+
+}
+}
+
+#endif
diff --git a/src/theory/quantifiers/quantifiers_attributes.cpp b/src/theory/quantifiers/quantifiers_attributes.cpp
index 2f6dc47db..b00fe45f4 100644
--- a/src/theory/quantifiers/quantifiers_attributes.cpp
+++ b/src/theory/quantifiers/quantifiers_attributes.cpp
@@ -1,41 +1,41 @@
/********************* */
/*! \file quantifiers_attributes.cpp
** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
** Minor contributors (to current version): none
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.\endverbatim
**
- ** \brief Implementation of QuantifiersAttributes class
- **/
-
-#include "theory/quantifiers/quantifiers_attributes.h"
-#include "theory/quantifiers/options.h"
-
-using namespace std;
-using namespace CVC4;
-using namespace CVC4::kind;
-using namespace CVC4::context;
-using namespace CVC4::theory;
-using namespace CVC4::theory::quantifiers;
-
-void QuantifiersAttributes::setUserAttribute( const std::string& attr, Node n ){
- if( n.getKind()==FORALL ){
- if( attr=="axiom" ){
- Trace("quant-attr") << "Set axiom " << n << std::endl;
- AxiomAttribute aa;
- n.setAttribute( aa, true );
- }else if( attr=="conjecture" ){
- Trace("quant-attr") << "Set conjecture " << n << std::endl;
- ConjectureAttribute ca;
- n.setAttribute( ca, true );
- }
- }else{
- for( size_t i=0; i<n.getNumChildren(); i++ ){
- setUserAttribute( attr, n[i] );
- }
- }
-}
+ ** \brief Implementation of QuantifiersAttributes class
+ **/
+
+#include "theory/quantifiers/quantifiers_attributes.h"
+#include "theory/quantifiers/options.h"
+
+using namespace std;
+using namespace CVC4;
+using namespace CVC4::kind;
+using namespace CVC4::context;
+using namespace CVC4::theory;
+using namespace CVC4::theory::quantifiers;
+
+void QuantifiersAttributes::setUserAttribute( const std::string& attr, Node n ){
+ if( n.getKind()==FORALL ){
+ if( attr=="axiom" ){
+ Trace("quant-attr") << "Set axiom " << n << std::endl;
+ AxiomAttribute aa;
+ n.setAttribute( aa, true );
+ }else if( attr=="conjecture" ){
+ Trace("quant-attr") << "Set conjecture " << n << std::endl;
+ ConjectureAttribute ca;
+ n.setAttribute( ca, true );
+ }
+ }else{
+ for( size_t i=0; i<n.getNumChildren(); i++ ){
+ setUserAttribute( attr, n[i] );
+ }
+ }
+}
diff --git a/src/theory/quantifiers/quantifiers_attributes.h b/src/theory/quantifiers/quantifiers_attributes.h
index 88bac8bc9..8e8ebe97a 100644
--- a/src/theory/quantifiers/quantifiers_attributes.h
+++ b/src/theory/quantifiers/quantifiers_attributes.h
@@ -1,51 +1,51 @@
/********************* */
/*! \file quantifiers_attributes.h
** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
** Minor contributors (to current version): none
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.\endverbatim
**
- ** \brief Attributes for the theory quantifiers
- **
- ** Attributes for the theory quantifiers.
- **/
-
-#include "cvc4_private.h"
-
-#ifndef __CVC4__THEORY__QUANTIFIERS__QUANTIFIERS_REWRITER_H
-#define __CVC4__THEORY__QUANTIFIERS__QUANTIFIERS_REWRITER_H
-
-#include "theory/rewriter.h"
-#include "theory/quantifiers_engine.h"
-
-namespace CVC4 {
-namespace theory {
-namespace quantifiers {
-
-/** Attribute true for quantifiers that are axioms */
-struct AxiomAttributeId {};
-typedef expr::Attribute< AxiomAttributeId, bool > AxiomAttribute;
-
-/** Attribute true for quantifiers that are conjecture */
-struct ConjectureAttributeId {};
-typedef expr::Attribute< ConjectureAttributeId, bool > ConjectureAttribute;
-
-struct QuantifiersAttributes
-{
- /** set user attribute
- * This function will apply a custom set of attributes to all top-level universal
- * quantifiers contained in n
- */
- static void setUserAttribute( const std::string& attr, Node n );
-};
-
-
-}
-}
-}
-
-#endif
+ ** \brief Attributes for the theory quantifiers
+ **
+ ** Attributes for the theory quantifiers.
+ **/
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__THEORY__QUANTIFIERS__QUANTIFIERS_REWRITER_H
+#define __CVC4__THEORY__QUANTIFIERS__QUANTIFIERS_REWRITER_H
+
+#include "theory/rewriter.h"
+#include "theory/quantifiers_engine.h"
+
+namespace CVC4 {
+namespace theory {
+namespace quantifiers {
+
+/** Attribute true for quantifiers that are axioms */
+struct AxiomAttributeId {};
+typedef expr::Attribute< AxiomAttributeId, bool > AxiomAttribute;
+
+/** Attribute true for quantifiers that are conjecture */
+struct ConjectureAttributeId {};
+typedef expr::Attribute< ConjectureAttributeId, bool > ConjectureAttribute;
+
+struct QuantifiersAttributes
+{
+ /** set user attribute
+ * This function will apply a custom set of attributes to all top-level universal
+ * quantifiers contained in n
+ */
+ static void setUserAttribute( const std::string& attr, Node n );
+};
+
+
+}
+}
+}
+
+#endif
diff --git a/src/theory/quantifiers/quantifiers_rewriter.cpp b/src/theory/quantifiers/quantifiers_rewriter.cpp
index dabaa2188..bf6a025f8 100644
--- a/src/theory/quantifiers/quantifiers_rewriter.cpp
+++ b/src/theory/quantifiers/quantifiers_rewriter.cpp
@@ -90,29 +90,15 @@ void QuantifiersRewriter::addNodeToOrBuilder( Node n, NodeBuilder<>& t ){
}
}
-void QuantifiersRewriter::computeArgs( std::map< Node, bool >& active, Node n ){
- if( active.find( n )!=active.end() ){
- active[n] = true;
+void QuantifiersRewriter::computeArgs( std::vector< Node >& args, std::vector< Node >& activeArgs, Node n ){
+ if( n.getKind()==BOUND_VARIABLE ){
+ if( std::find( args.begin(), args.end(), n )!=args.end() &&
+ std::find( activeArgs.begin(), activeArgs.end(), n )==activeArgs.end() ){
+ activeArgs.push_back( n );
+ }
}else{
for( int i=0; i<(int)n.getNumChildren(); i++ ){
- computeArgs( active, n[i] );
- }
- }
-}
-
-void QuantifiersRewriter::computeArgs( std::vector< Node >& args, std::vector< Node >& activeArgs, Node n ){
- std::map< Node, bool > active;
- for( int i=0; i<(int)args.size(); i++ ){
- active[ args[i] ] = false;
- }
- //Notice() << "For " << n << " : " << std::endl;
- computeArgs( active, n );
- activeArgs.clear();
- for( std::map< Node, bool >::iterator it = active.begin(); it != active.end(); ++it ){
- Node n = it->first;
- //Notice() << " " << it->first << " is " << it->second << std::endl;
- if( it->second ){ //only add bound variables that occur in body
- activeArgs.push_back( it->first );
+ computeArgs( args, activeArgs, n[i] );
}
}
}
@@ -468,37 +454,19 @@ Node QuantifiersRewriter::computeCNF( Node n, std::vector< Node >& args, NodeBui
}
}
-Node QuantifiersRewriter::computePrenex( Node body, std::vector< Node >& args, bool pol, bool polReq ){
+Node QuantifiersRewriter::computePrenex( Node body, std::vector< Node >& args, bool pol ){
if( body.getKind()==FORALL ){
- if( pol==polReq ){
+ if( pol ){
std::vector< Node > terms;
std::vector< Node > subs;
- if( polReq ){
- //for doing prenexing of same-signed quantifiers
- //must rename each variable that already exists
- for( int i=0; i<(int)body[0].getNumChildren(); i++ ){
- //if( std::find( args.begin(), args.end(), body[0][i] )!=args.end() ){
- terms.push_back( body[0][i] );
- subs.push_back( NodeManager::currentNM()->mkBoundVar( body[0][i].getType() ) );
- }
- args.insert( args.end(), subs.begin(), subs.end() );
- }else{
- std::vector< TypeNode > argTypes;
- for( int i=0; i<(int)args.size(); i++ ){
- argTypes.push_back( args[i].getType() );
- }
- //for doing pre-skolemization of opposite-signed quantifiers
- for( int i=0; i<(int)body[0].getNumChildren(); i++ ){
- terms.push_back( body[0][i] );
- //make the new function symbol
- TypeNode typ = NodeManager::currentNM()->mkFunctionType( argTypes, body[0][i].getType() );
- Node op = NodeManager::currentNM()->mkSkolem( "op_$$", typ, "was created by the quantifiers rewriter" );
- std::vector< Node > funcArgs;
- funcArgs.push_back( op );
- funcArgs.insert( funcArgs.end(), args.begin(), args.end() );
- subs.push_back( NodeManager::currentNM()->mkNode( APPLY_UF, funcArgs ) );
- }
+ //for doing prenexing of same-signed quantifiers
+ //must rename each variable that already exists
+ for( int i=0; i<(int)body[0].getNumChildren(); i++ ){
+ //if( std::find( args.begin(), args.end(), body[0][i] )!=args.end() ){
+ terms.push_back( body[0][i] );
+ subs.push_back( NodeManager::currentNM()->mkBoundVar( body[0][i].getType() ) );
}
+ args.insert( args.end(), subs.begin(), subs.end() );
Node newBody = body[1];
newBody = newBody.substitute( terms.begin(), terms.end(), subs.begin(), subs.end() );
Debug("quantifiers-substitute-debug") << "Did substitute have an effect" << (body[1] != newBody) << body[1] << " became " << newBody << endl;
@@ -514,7 +482,7 @@ Node QuantifiersRewriter::computePrenex( Node body, std::vector< Node >& args, b
std::vector< Node > newChildren;
for( int i=0; i<(int)body.getNumChildren(); i++ ){
bool newPol = ( body.getKind()==NOT || ( body.getKind()==IMPLIES && i==0 ) ) ? !pol : pol;
- Node n = computePrenex( body[i], args, newPol, polReq );
+ Node n = computePrenex( body[i], args, newPol );
newChildren.push_back( n );
if( n!=body[i] ){
childrenChanged = true;
@@ -549,10 +517,12 @@ Node QuantifiersRewriter::computeOperation( Node f, int computeOption ){
if( computeOption==COMPUTE_MINISCOPING ){
//return directly
return computeMiniscoping( args, n, ipl, f.hasAttribute(NestedQuantAttribute()) );
+ }else if( computeOption==COMPUTE_AGGRESSIVE_MINISCOPING ){
+ return computeAggressiveMiniscoping( args, n, f.hasAttribute(NestedQuantAttribute()) );
}else if( computeOption==COMPUTE_NNF ){
n = computeNNF( n );
- }else if( computeOption==COMPUTE_PRENEX || computeOption==COMPUTE_PRE_SKOLEM ){
- n = computePrenex( n, args, true, computeOption==COMPUTE_PRENEX );
+ }else if( computeOption==COMPUTE_PRENEX ){
+ n = computePrenex( n, args, true );
}else if( computeOption==COMPUTE_VAR_ELIMINATION ){
Node prev;
do{
@@ -670,42 +640,113 @@ Node QuantifiersRewriter::computeMiniscoping( std::vector< Node >& args, Node bo
}
return mkForAll( args, body, ipl );
}
-/*
-Node QuantifiersRewriter::rewriteQuants( Node n, bool isNested ){
- if( n.getKind()==FORALL ){
- return rewriteQuant( n, isNested );
- }else if( isLiteral( n ) ){
- return n;
- }else{
- NodeBuilder<> tt(n.getKind());
- for( int i=0; i<(int)n.getNumChildren(); i++ ){
- tt << rewriteQuants( n[i], isNested );
- }
- return tt.constructNode();
- }
-}
-Node QuantifiersRewriter::rewriteQuant( Node n, bool isNested ){
- Node prev = n;
- for( int op=0; op<COMPUTE_LAST; op++ ){
- if( doOperation( n, isNested, op ) ){
- Node prev2 = n;
- n = computeOperation( n, op );
- if( prev2!=n ){
- Trace("quantifiers-rewrite-op") << "Rewrite op " << op << ": rewrite " << prev2 << std::endl;
- Trace("quantifiers-rewrite-op") << " to " << std::endl;
- Trace("quantifiers-rewrite-op") << n << std::endl;
+Node QuantifiersRewriter::computeAggressiveMiniscoping( std::vector< Node >& args, Node body, bool isNested ){
+ if( !isNested ){
+ std::map< Node, std::vector< Node > > varLits;
+ std::map< Node, std::vector< Node > > litVars;
+ if( body.getKind()==OR ){
+ Trace("ag-miniscope") << "compute aggressive miniscoping on " << body << std::endl;
+ for( size_t i=0; i<body.getNumChildren(); i++ ){
+ std::vector< Node > activeArgs;
+ computeArgs( args, activeArgs, body[i] );
+ for (unsigned j=0; j<activeArgs.size(); j++ ){
+ varLits[activeArgs[j]].push_back( body[i] );
+ }
+ litVars[body[i]].insert( litVars[body[i]].begin(), activeArgs.begin(), activeArgs.end() );
+ }
+ //find the variable in the least number of literals
+ Node bestVar;
+ for( std::map< Node, std::vector< Node > >::iterator it = varLits.begin(); it != varLits.end(); ++it ){
+ if( bestVar.isNull() || varLits[bestVar].size()>it->second.size() ){
+ bestVar = it->first;
+ }
+ }
+ Trace("ag-miniscope-debug") << "Best variable " << bestVar << " occurs in " << varLits[bestVar].size() << "/ " << body.getNumChildren() << " literals." << std::endl;
+ if( !bestVar.isNull() && varLits[bestVar].size()<body.getNumChildren() ){
+ //we can miniscope
+ Trace("ag-miniscope") << "Miniscope on " << bestVar << std::endl;
+ //make the bodies
+ std::vector< Node > qlit1;
+ qlit1.insert( qlit1.begin(), varLits[bestVar].begin(), varLits[bestVar].end() );
+ std::vector< Node > qlitt;
+ //for all literals not containing bestVar
+ for( size_t i=0; i<body.getNumChildren(); i++ ){
+ if( std::find( qlit1.begin(), qlit1.end(), body[i] )==qlit1.end() ){
+ qlitt.push_back( body[i] );
+ }
+ }
+ //make the variable lists
+ std::vector< Node > qvl1;
+ std::vector< Node > qvl2;
+ std::vector< Node > qvsh;
+ for( unsigned i=0; i<args.size(); i++ ){
+ bool found1 = false;
+ bool found2 = false;
+ for( size_t j=0; j<varLits[args[i]].size(); j++ ){
+ if( !found1 && std::find( qlit1.begin(), qlit1.end(), varLits[args[i]][j] )!=qlit1.end() ){
+ found1 = true;
+ }else if( !found2 && std::find( qlitt.begin(), qlitt.end(), varLits[args[i]][j] )!=qlitt.end() ){
+ found2 = true;
+ }
+ if( found1 && found2 ){
+ break;
+ }
+ }
+ if( found1 ){
+ if( found2 ){
+ qvsh.push_back( args[i] );
+ }else{
+ qvl1.push_back( args[i] );
+ }
+ }else{
+ Assert(found2);
+ qvl2.push_back( args[i] );
+ }
+ }
+ Assert( !qvl1.empty() );
+ Assert( !qvl2.empty() || !qvsh.empty() );
+ //check for literals that only contain shared variables
+ std::vector< Node > qlitsh;
+ std::vector< Node > qlit2;
+ for( size_t i=0; i<qlitt.size(); i++ ){
+ bool hasVar2 = false;
+ for( size_t j=0; j<litVars[qlitt[i]].size(); j++ ){
+ if( std::find( qvl2.begin(), qvl2.end(), litVars[qlitt[i]][j] )!=qvl2.end() ){
+ hasVar2 = true;
+ break;
+ }
+ }
+ if( hasVar2 ){
+ qlit2.push_back( qlitt[i] );
+ }else{
+ qlitsh.push_back( qlitt[i] );
+ }
+ }
+ varLits.clear();
+ litVars.clear();
+ Trace("ag-miniscope-debug") << "Split into literals : " << qlit1.size() << " / " << qlit2.size() << " / " << qlitsh.size();
+ Trace("ag-miniscope-debug") << ", variables : " << qvl1.size() << " / " << qvl2.size() << " / " << qvsh.size() << std::endl;
+ Node n1 = qlit1.size()==1 ? qlit1[0] : NodeManager::currentNM()->mkNode( OR, qlit1 );
+ n1 = computeAggressiveMiniscoping( qvl1, n1 );
+ qlitsh.push_back( n1 );
+ if( !qlit2.empty() ){
+ Node n2 = qlit2.size()==1 ? qlit2[0] : NodeManager::currentNM()->mkNode( OR, qlit2 );
+ n2 = computeAggressiveMiniscoping( qvl2, n2 );
+ qlitsh.push_back( n2 );
+ }
+ Node n = NodeManager::currentNM()->mkNode( OR, qlitsh );
+ if( !qvsh.empty() ){
+ Node bvl = NodeManager::currentNM()->mkNode(kind::BOUND_VAR_LIST, qvsh);
+ n = NodeManager::currentNM()->mkNode( FORALL, bvl, n );
+ }
+ Trace("ag-miniscope") << "Return " << n << " for " << body << std::endl;
+ return n;
}
}
}
- if( prev==n ){
- return n;
- }else{
- //rewrite again until fix point is reached
- return rewriteQuant( n, isNested );
- }
+ return mkForAll( args, body, Node::null() );
}
-*/
bool QuantifiersRewriter::doMiniscopingNoFreeVar(){
return options::miniscopeQuantFreeVar();
@@ -726,12 +767,12 @@ bool QuantifiersRewriter::doMiniscopingAnd(){
bool QuantifiersRewriter::doOperation( Node f, bool isNested, int computeOption ){
if( computeOption==COMPUTE_MINISCOPING ){
return true;
+ }else if( computeOption==COMPUTE_AGGRESSIVE_MINISCOPING ){
+ return options::aggressiveMiniscopeQuant();
}else if( computeOption==COMPUTE_NNF ){
return false;//TODO: compute NNF (current bad idea since arithmetic rewrites equalities)
- }else if( computeOption==COMPUTE_PRE_SKOLEM ){
- return false;//options::preSkolemQuant();
}else if( computeOption==COMPUTE_PRENEX ){
- return options::prenexQuant();
+ return options::prenexQuant() && !options::aggressiveMiniscopeQuant();
}else if( computeOption==COMPUTE_VAR_ELIMINATION ){
return options::varElimQuant();
}else if( computeOption==COMPUTE_CNF ){
diff --git a/src/theory/quantifiers/quantifiers_rewriter.h b/src/theory/quantifiers/quantifiers_rewriter.h
index 00301c610..75b392e15 100644
--- a/src/theory/quantifiers/quantifiers_rewriter.h
+++ b/src/theory/quantifiers/quantifiers_rewriter.h
@@ -41,19 +41,19 @@ private:
static void computeArgs( std::vector< Node >& args, std::vector< Node >& activeArgs, Node n );
static bool hasArg( std::vector< Node >& args, Node n );
static void setNestedQuantifiers( Node n, Node q );
- static void computeArgs( std::map< Node, bool >& active, Node n );
static Node computeClause( Node n );
private:
static Node computeMiniscoping( std::vector< Node >& args, Node body, Node ipl, bool isNested = false );
+ static Node computeAggressiveMiniscoping( std::vector< Node >& args, Node body, bool isNested = false );
static Node computeNNF( Node body );
static Node computeVarElimination( Node body, std::vector< Node >& args, Node& ipl );
static Node computeCNF( Node body, std::vector< Node >& args, NodeBuilder<>& defs, bool forcePred );
- static Node computePrenex( Node body, std::vector< Node >& args, bool pol, bool polReq );
+ static Node computePrenex( Node body, std::vector< Node >& args, bool pol );
private:
enum{
COMPUTE_MINISCOPING = 0,
+ COMPUTE_AGGRESSIVE_MINISCOPING,
COMPUTE_NNF,
- COMPUTE_PRE_SKOLEM,
COMPUTE_PRENEX,
COMPUTE_VAR_ELIMINATION,
//COMPUTE_FLATTEN_ARGS_UF,
diff --git a/src/theory/quantifiers/term_database.cpp b/src/theory/quantifiers/term_database.cpp
index d60aa2ef4..f6518cfd3 100644
--- a/src/theory/quantifiers/term_database.cpp
+++ b/src/theory/quantifiers/term_database.cpp
@@ -75,7 +75,7 @@ void TermDb::addTerm( Node n, std::set< Node >& added, bool withinQuant ){
//Call the children?
if( inst::Trigger::isAtomicTrigger( n ) ){
if( !n.hasAttribute(InstConstantAttribute()) ){
- Debug("term-db") << "register trigger term " << n << std::endl;
+ Trace("term-db") << "register term in db " << n << std::endl;
//std::cout << "register trigger term " << n << std::endl;
Node op = n.getOperator();
d_op_map[op].push_back( n );
@@ -194,7 +194,7 @@ void TermDb::addTerm( Node n, std::set< Node >& added, bool withinQuant ){
Node TermDb::getModelBasisTerm( TypeNode tn, int i ){
if( d_model_basis_term.find( tn )==d_model_basis_term.end() ){
Node mbt;
- if( d_type_map[ tn ].empty() ){
+ if( options::fmfFreshDistConst() || d_type_map[ tn ].empty() ){
std::stringstream ss;
ss << Expr::setlanguage(options::outputLanguage());
ss << "e_" << tn;
@@ -206,6 +206,7 @@ Node TermDb::getModelBasisTerm( TypeNode tn, int i ){
ModelBasisAttribute mba;
mbt.setAttribute(mba,true);
d_model_basis_term[tn] = mbt;
+ Trace("model-basis-term") << "Choose " << mbt << " as model basis term for " << tn << std::endl;
}
return d_model_basis_term[tn];
}
@@ -337,6 +338,14 @@ Node TermDb::getInstConstantBody( Node f ){
Node TermDb::getCounterexampleLiteral( Node f ){
if( d_ce_lit.find( f )==d_ce_lit.end() ){
Node ceBody = getInstConstantBody( f );
+ //check if any variable are of bad types, and fail if so
+ for( size_t i=0; i<d_inst_constants[f].size(); i++ ){
+ if( d_inst_constants[f][i].getType().isBoolean() ){
+ d_ce_lit[ f ] = Node::null();
+ return Node::null();
+ }
+ }
+ //otherwise, ensure literal
Node ceLit = d_quantEngine->getValuation().ensureLiteral( ceBody.notNode() );
d_ce_lit[ f ] = ceLit;
setInstantiationConstantAttr( ceLit, f );
@@ -367,6 +376,10 @@ Node TermDb::getSkolemizedBody( Node f ){
Node skv = NodeManager::currentNM()->mkSkolem( "skv_$$", f[0][i].getType(), "is a termdb-created skolemized body" );
d_skolem_constants[ f ].push_back( skv );
vars.push_back( f[0][i] );
+ //carry information for sort inference
+ if( options::sortInference() ){
+ d_quantEngine->getTheoryEngine()->getSortInference()->setSkolemVar( f, f[0][i], skv );
+ }
}
d_skolem_body[ f ] = f[ 1 ].substitute( vars.begin(), vars.end(),
d_skolem_constants[ f ].begin(), d_skolem_constants[ f ].end() );
@@ -515,6 +528,34 @@ int TermDb::isInstanceOf( Node n1, Node n2 ){
return 0;
}
+bool TermDb::isUnifiableInstanceOf( Node n1, Node n2, std::map< Node, Node >& subs ){
+ if( n1==n2 ){
+ return true;
+ }else if( n2.getKind()==INST_CONSTANT ){
+ //if( !node_contains( n1, n2 ) ){
+ // return false;
+ //}
+ if( subs.find( n2 )==subs.end() ){
+ subs[n2] = n1;
+ }else if( subs[n2]!=n1 ){
+ return false;
+ }
+ return true;
+ }else if( n1.getKind()==n2.getKind() && n1.getMetaKind()==kind::metakind::PARAMETERIZED ){
+ if( n1.getOperator()!=n2.getOperator() ){
+ return false;
+ }
+ for( int i=0; i<(int)n1.getNumChildren(); i++ ){
+ if( !isUnifiableInstanceOf( n1[i], n2[i], subs ) ){
+ return false;
+ }
+ }
+ return true;
+ }else{
+ return false;
+ }
+}
+
void TermDb::filterInstances( std::vector< Node >& nodes ){
std::vector< bool > active;
active.resize( nodes.size(), true );
@@ -523,8 +564,10 @@ void TermDb::filterInstances( std::vector< Node >& nodes ){
if( active[i] && active[j] ){
int result = isInstanceOf( nodes[i], nodes[j] );
if( result==1 ){
+ Trace("filter-instances") << nodes[j] << " is an instance of " << nodes[i] << std::endl;
active[j] = false;
}else if( result==-1 ){
+ Trace("filter-instances") << nodes[i] << " is an instance of " << nodes[j] << std::endl;
active[i] = false;
}
}
diff --git a/src/theory/quantifiers/term_database.h b/src/theory/quantifiers/term_database.h
index a1f1de1dc..6bfea5c44 100644
--- a/src/theory/quantifiers/term_database.h
+++ b/src/theory/quantifiers/term_database.h
@@ -167,7 +167,7 @@ public:
/** get counterexample literal (for cbqi) */
Node getCounterexampleLiteral( Node f );
/** returns node n with bound vars of f replaced by instantiation constants of f
- node n : is the futur pattern
+ node n : is the future pattern
node f : is the quantifier containing which bind the variable
return a pattern where the variable are replaced by variable for
instantiation.
@@ -212,6 +212,8 @@ private:
std::map< TNode, std::vector< TNode > > d_var_contains;
/** triggers for each operator */
std::map< Node, std::vector< inst::Trigger* > > d_op_triggers;
+ /** helper for is intance of */
+ bool isUnifiableInstanceOf( Node n1, Node n2, std::map< Node, Node >& subs );
public:
/** compute var contains */
void computeVarContains( Node n );
diff --git a/src/theory/quantifiers/theory_quantifiers.cpp b/src/theory/quantifiers/theory_quantifiers.cpp
index d1dbae90c..be6dd5b08 100644
--- a/src/theory/quantifiers/theory_quantifiers.cpp
+++ b/src/theory/quantifiers/theory_quantifiers.cpp
@@ -92,12 +92,14 @@ Node TheoryQuantifiers::getValue(TNode n) {
}
}
-void TheoryQuantifiers::collectModelInfo( TheoryModel* m, bool fullModel ){
- if( fullModel ){
+void TheoryQuantifiers::collectModelInfo(TheoryModel* m, bool fullModel) {
+ if(fullModel) {
for(assertions_iterator i = facts_begin(); i != facts_end(); ++i) {
if((*i).assertion.getKind() == kind::NOT) {
+ Debug("quantifiers::collectModelInfo") << "got quant FALSE: " << (*i).assertion[0] << endl;
m->assertPredicate((*i).assertion[0], false);
} else {
+ Debug("quantifiers::collectModelInfo") << "got quant TRUE : " << *i << endl;
m->assertPredicate(*i, true);
}
}
diff --git a/src/theory/quantifiers/trigger.cpp b/src/theory/quantifiers/trigger.cpp
index bc577fda6..cff28f243 100644
--- a/src/theory/quantifiers/trigger.cpp
+++ b/src/theory/quantifiers/trigger.cpp
@@ -34,24 +34,29 @@ using namespace CVC4::theory::inst;
Trigger::Trigger( QuantifiersEngine* qe, Node f, std::vector< Node >& nodes, int matchOption, bool smartTriggers ) :
d_quantEngine( qe ), d_f( f ){
d_nodes.insert( d_nodes.begin(), nodes.begin(), nodes.end() );
+ Trace("trigger") << "Trigger for " << f << ": " << std::endl;
+ for( int i=0; i<(int)d_nodes.size(); i++ ){
+ Trace("trigger") << " " << d_nodes[i] << std::endl;
+ }
+ Trace("trigger-debug") << ", smart triggers = " << smartTriggers;
+ Trace("trigger") << std::endl;
if( smartTriggers ){
if( d_nodes.size()==1 ){
if( isSimpleTrigger( d_nodes[0] ) ){
d_mg = new InstMatchGeneratorSimple( f, d_nodes[0] );
}else{
- d_mg = new InstMatchGenerator( d_nodes[0], qe, matchOption );
+ d_mg = InstMatchGenerator::mkInstMatchGenerator( d_nodes[0], qe );
+ d_mg->setActiveAdd();
}
}else{
d_mg = new InstMatchGeneratorMulti( f, d_nodes, qe, matchOption );
+ //d_mg = InstMatchGenerator::mkInstMatchGenerator( d_nodes, qe );
+ //d_mg->setActiveAdd();
}
}else{
- d_mg = new InstMatchGenerator( d_nodes, qe, matchOption );
- }
- Trace("trigger") << "Trigger for " << f << ": " << std::endl;
- for( int i=0; i<(int)d_nodes.size(); i++ ){
- Trace("trigger") << " " << d_nodes[i] << std::endl;
+ d_mg = InstMatchGenerator::mkInstMatchGenerator( d_nodes, qe );
+ d_mg->setActiveAdd();
}
- Trace("trigger") << std::endl;
if( d_nodes.size()==1 ){
if( isSimpleTrigger( d_nodes[0] ) ){
++(qe->d_statistics.d_triggers);
@@ -59,7 +64,7 @@ d_quantEngine( qe ), d_f( f ){
++(qe->d_statistics.d_simple_triggers);
}
}else{
- Debug("multi-trigger") << "Multi-trigger " << (*this) << std::endl;
+ Trace("multi-trigger") << "Multi-trigger " << (*this) << " for " << f << std::endl;
//Notice() << "Multi-trigger for " << f << " : " << std::endl;
//Notice() << " " << (*this) << std::endl;
++(qe->d_statistics.d_multi_triggers);
@@ -80,14 +85,14 @@ void Trigger::reset( Node eqc ){
d_mg->reset( eqc, d_quantEngine );
}
-bool Trigger::getNextMatch( InstMatch& m ){
- bool retVal = d_mg->getNextMatch( m, d_quantEngine );
+bool Trigger::getNextMatch( Node f, InstMatch& m ){
+ bool retVal = d_mg->getNextMatch( f, m, d_quantEngine );
return retVal;
}
-bool Trigger::getMatch( Node t, InstMatch& m ){
+bool Trigger::getMatch( Node f, Node t, InstMatch& m ){
//FIXME: this assumes d_mg is an inst match generator
- return ((InstMatchGenerator*)d_mg)->getMatch( t, m, d_quantEngine );
+ return ((InstMatchGenerator*)d_mg)->getMatch( f, t, m, d_quantEngine );
}
int Trigger::addTerm( Node t ){
@@ -115,6 +120,7 @@ Trigger* Trigger::mkTrigger( QuantifiersEngine* qe, Node f, std::vector< Node >&
temp.insert( temp.begin(), nodes.begin(), nodes.end() );
std::map< Node, bool > vars;
std::map< Node, std::vector< Node > > patterns;
+ size_t varCount = 0;
for( int i=0; i<(int)temp.size(); i++ ){
bool foundVar = false;
qe->getTermDatabase()->computeVarContains( temp[i] );
@@ -122,6 +128,7 @@ Trigger* Trigger::mkTrigger( QuantifiersEngine* qe, Node f, std::vector< Node >&
Node v = qe->getTermDatabase()->d_var_contains[ temp[i] ][j];
if( v.getAttribute(InstConstantAttribute())==f ){
if( vars.find( v )==vars.end() ){
+ varCount++;
vars[ v ] = true;
foundVar = true;
}
@@ -134,32 +141,40 @@ Trigger* Trigger::mkTrigger( QuantifiersEngine* qe, Node f, std::vector< Node >&
patterns[ v ].push_back( temp[i] );
}
}
- }
- //now, minimalize the trigger
- for( int i=0; i<(int)trNodes.size(); i++ ){
- bool keepPattern = false;
- Node n = trNodes[i];
- for( int j=0; j<(int)qe->getTermDatabase()->d_var_contains[ n ].size(); j++ ){
- Node v = qe->getTermDatabase()->d_var_contains[ n ][j];
- if( patterns[v].size()==1 ){
- keepPattern = true;
- break;
- }
+ if( varCount==f[0].getNumChildren() ){
+ break;
}
- if( !keepPattern ){
- //remove from pattern vector
+ }
+ if( varCount<f[0].getNumChildren() ){
+ //do not generate multi-trigger if it does not contain all variables
+ return NULL;
+ }else{
+ //now, minimize the trigger
+ for( int i=0; i<(int)trNodes.size(); i++ ){
+ bool keepPattern = false;
+ Node n = trNodes[i];
for( int j=0; j<(int)qe->getTermDatabase()->d_var_contains[ n ].size(); j++ ){
Node v = qe->getTermDatabase()->d_var_contains[ n ][j];
- for( int k=0; k<(int)patterns[v].size(); k++ ){
- if( patterns[v][k]==n ){
- patterns[v].erase( patterns[v].begin() + k, patterns[v].begin() + k + 1 );
- break;
+ if( patterns[v].size()==1 ){
+ keepPattern = true;
+ break;
+ }
+ }
+ if( !keepPattern ){
+ //remove from pattern vector
+ for( int j=0; j<(int)qe->getTermDatabase()->d_var_contains[ n ].size(); j++ ){
+ Node v = qe->getTermDatabase()->d_var_contains[ n ][j];
+ for( int k=0; k<(int)patterns[v].size(); k++ ){
+ if( patterns[v][k]==n ){
+ patterns[v].erase( patterns[v].begin() + k, patterns[v].begin() + k + 1 );
+ break;
+ }
}
}
+ //remove from trigger nodes
+ trNodes.erase( trNodes.begin() + i, trNodes.begin() + i + 1 );
+ i--;
}
- //remove from trigger nodes
- trNodes.erase( trNodes.begin() + i, trNodes.begin() + i + 1 );
- i--;
}
}
}else{
@@ -322,16 +337,16 @@ void Trigger::collectPatTerms( QuantifiersEngine* qe, Node f, Node n, std::vecto
temp.insert( temp.begin(), patTerms2.begin(), patTerms2.end() );
qe->getTermDatabase()->filterInstances( temp );
if( temp.size()!=patTerms2.size() ){
- Debug("trigger-filter-instance") << "Filtered an instance: " << std::endl;
- Debug("trigger-filter-instance") << "Old: ";
+ Trace("trigger-filter-instance") << "Filtered an instance: " << std::endl;
+ Trace("trigger-filter-instance") << "Old: ";
for( int i=0; i<(int)patTerms2.size(); i++ ){
- Debug("trigger-filter-instance") << patTerms2[i] << " ";
+ Trace("trigger-filter-instance") << patTerms2[i] << " ";
}
- Debug("trigger-filter-instance") << std::endl << "New: ";
+ Trace("trigger-filter-instance") << std::endl << "New: ";
for( int i=0; i<(int)temp.size(); i++ ){
- Debug("trigger-filter-instance") << temp[i] << " ";
+ Trace("trigger-filter-instance") << temp[i] << " ";
}
- Debug("trigger-filter-instance") << std::endl;
+ Trace("trigger-filter-instance") << std::endl;
}
if( tstrt==TS_ALL ){
patTerms.insert( patTerms.begin(), temp.begin(), temp.end() );
diff --git a/src/theory/quantifiers/trigger.h b/src/theory/quantifiers/trigger.h
index 6fcd316f4..93731283b 100644
--- a/src/theory/quantifiers/trigger.h
+++ b/src/theory/quantifiers/trigger.h
@@ -56,12 +56,12 @@ public:
/** reset, eqc is the equivalence class to search in (search in any if eqc=null) */
void reset( Node eqc );
/** get next match. must call reset( eqc ) once before this function. */
- bool getNextMatch( InstMatch& m );
+ bool getNextMatch( Node f, InstMatch& m );
/** get the match against ground term or formula t.
the trigger and t should have the same shape.
Currently the trigger should not be a multi-trigger.
*/
- bool getMatch( Node t, InstMatch& m);
+ bool getMatch( Node f, Node t, InstMatch& m);
/** add ground term t, called when t is added to the TermDb */
int addTerm( Node t );
/** return whether this is a multi-trigger */
diff --git a/src/theory/quantifiers_engine.cpp b/src/theory/quantifiers_engine.cpp
index 08bdd496b..a11cc85c0 100644
--- a/src/theory/quantifiers_engine.cpp
+++ b/src/theory/quantifiers_engine.cpp
@@ -71,6 +71,7 @@ d_lemmas_produced_c(u){
d_optMatchIgnoreModelBasis = false;
d_optInstLimitActive = false;
d_optInstLimit = 0;
+ d_total_inst_count_debug = 0;
}
QuantifiersEngine::~QuantifiersEngine(){
@@ -142,10 +143,23 @@ void QuantifiersEngine::check( Theory::Effort e ){
}
//build the model if not done so already
// this happens if no quantifiers are currently asserted and no model-building module is enabled
- if( options::produceModels() && e==Theory::EFFORT_LAST_CALL && !d_hasAddedLemma && !d_model->isModelSet() ){
- d_te->getModelBuilder()->buildModel( d_model, true );
+ if( e==Theory::EFFORT_LAST_CALL && !d_hasAddedLemma ){
+ if( options::produceModels() && !d_model->isModelSet() ){
+ d_te->getModelBuilder()->buildModel( d_model, true );
+ }
+ if( Trace.isOn("inst-per-quant") ){
+ for( std::map< Node, int >::iterator it = d_total_inst_debug.begin(); it != d_total_inst_debug.end(); ++it ){
+ Trace("inst-per-quant") << " * " << it->second << " for " << it->first << std::endl;
+ }
+ }
+ }else{
+ if( Trace.isOn("inst-per-quant-round") ){
+ for( std::map< Node, int >::iterator it = d_temp_inst_debug.begin(); it != d_temp_inst_debug.end(); ++it ){
+ Trace("inst-per-quant-round") << " * " << it->second << " for " << it->first << std::endl;
+ d_temp_inst_debug[it->first] = 0;
+ }
+ }
}
-
Trace("quant-engine") << "Finished quantifiers engine check." << std::endl;
}
}
@@ -242,6 +256,9 @@ bool QuantifiersEngine::addInstantiation( Node f, std::vector< Node >& vars, std
Node lem = nb;
//check for duplication
if( addLemma( lem ) ){
+ d_total_inst_debug[f]++;
+ d_temp_inst_debug[f]++;
+ d_total_inst_count_debug++;
Trace("inst") << "*** Instantiate " << f << " with " << std::endl;
uint64_t maxInstLevel = 0;
for( int i=0; i<(int)terms.size(); i++ ){
@@ -354,7 +371,7 @@ bool QuantifiersEngine::addInstantiation( Node f, InstMatch& m, bool modEq, bool
//make it representative, this is helpful for recognizing duplication
if( mkRep ){
//pick the best possible representative for instantiation, based on past use and simplicity of term
- Node r = d_eq_query->getInternalRepresentative( val );
+ Node r = d_eq_query->getInternalRepresentative( val, f, i );
Trace("inst-add-debug") << "mkRep " << r << " " << val << std::endl;
m.set( ic, r );
}
@@ -460,56 +477,6 @@ void QuantifiersEngine::getPhaseReqTerms( Node f, std::vector< Node >& nodes ){
d_statistics.d_lit_phase_nreq += (int)nodes.size();
}
}
-/*
-EqualityQuery* QuantifiersEngine::getEqualityQuery(TypeNode t) {
- // Should use skeleton (in order to have the type and the kind
- // or any needed other information) instead of only the type
-
- // TheoryId id = Theory::theoryOf(t);
- // inst::EqualityQuery* eq = d_eq_query_arr[id];
- // if(eq == NULL) return d_eq_query_arr[theory::THEORY_UF];
- // else return eq;
-
- // hack because the generic one is too slow
- // TheoryId id = Theory::theoryOf(t);
- // if( true || id == theory::THEORY_UF){
- // uf::InstantiatorTheoryUf* ith = static_cast<uf::InstantiatorTheoryUf*>( getInstantiator( theory::THEORY_UF ));
- // return new uf::EqualityQueryInstantiatorTheoryUf(ith);
- // }
- // inst::EqualityQuery* eq = d_eq_query_arr[id];
- // if(eq == NULL) return d_eq_query_arr[theory::THEORY_UF];
- // else return eq;
-
-
- //Currently we use the generic EqualityQuery
- return getEqualityQuery();
-}
-
-
-rrinst::CandidateGenerator* QuantifiersEngine::getRRCanGenClasses() {
- return new GenericCandidateGeneratorClasses(this);
-}
-
-rrinst::CandidateGenerator* QuantifiersEngine::getRRCanGenClass() {
- return new GenericCandidateGeneratorClass(this);
-}
-
-rrinst::CandidateGenerator* QuantifiersEngine::getRRCanGenClasses(TypeNode t) {
- // TheoryId id = Theory::theoryOf(t);
- // rrinst::CandidateGenerator* eq = getInstantiator(id)->getRRCanGenClasses();
- // if(eq == NULL) return getInstantiator(id)->getRRCanGenClasses();
- // else return eq;
- return getRRCanGenClasses();
-}
-
-rrinst::CandidateGenerator* QuantifiersEngine::getRRCanGenClass(TypeNode t) {
- // TheoryId id = Theory::theoryOf(t);
- // rrinst::CandidateGenerator* eq = getInstantiator(id)->getRRCanGenClass();
- // if(eq == NULL) return getInstantiator(id)->getRRCanGenClass();
- // else return eq;
- return getRRCanGenClass();
-}
-*/
QuantifiersEngine::Statistics::Statistics():
d_num_quant("QuantifiersEngine::Num_Quantifiers", 0),
@@ -635,39 +602,57 @@ bool EqualityQueryQuantifiersEngine::areDisequal( Node a, Node b ){
return false;
}
-Node EqualityQueryQuantifiersEngine::getInternalRepresentative( Node a ){
+Node EqualityQueryQuantifiersEngine::getInternalRepresentative( Node a, Node f, int index ){
Node r = getRepresentative( a );
if( !options::internalReps() ){
return r;
}else{
- if( d_int_rep.find( r )==d_int_rep.end() ){
+ int sortId = 0;
+ if( optInternalRepSortInference() ){
+ sortId = d_qe->getTheoryEngine()->getSortInference()->getSortId( f, f[0][index] );
+ }
+ if( d_int_rep[sortId].find( r )==d_int_rep[sortId].end() ){
std::vector< Node > eqc;
getEquivalenceClass( r, eqc );
//find best selection for representative
- Node r_best = r;
- int r_best_score = getRepScore( r );
+ Node r_best;
+ int r_best_score = -1;
for( size_t i=0; i<eqc.size(); i++ ){
- int score = getRepScore( eqc[i] );
+ int score = getRepScore( eqc[i], f, index );
+ if( optInternalRepSortInference() ){
+ int e_sortId = d_qe->getTheoryEngine()->getSortInference()->getSortId( eqc[i]);
+ if( score>=0 && e_sortId!=sortId ){
+ score += 100;
+ }
+ }
//score prefers earliest use of this term as a representative
- if( score>=0 && ( r_best_score<0 || score<r_best_score ) ){
+ if( r_best.isNull() || ( score>=0 && ( r_best_score<0 || score<r_best_score ) ) ){
r_best = eqc[i];
r_best_score = score;
}
}
//now, make sure that no other member of the class is an instance
- r_best = getInstance( r_best, eqc );
+ if( !optInternalRepSortInference() ){
+ r_best = getInstance( r_best, eqc );
+ }
//store that this representative was chosen at this point
if( d_rep_score.find( r_best )==d_rep_score.end() ){
d_rep_score[ r_best ] = d_reset_count;
}
- d_int_rep[r] = r_best;
+ d_int_rep[sortId][r] = r_best;
if( r_best!=a ){
Trace("internal-rep-debug") << "rep( " << a << " ) = " << r << ", " << std::endl;
Trace("internal-rep-debug") << "int_rep( " << a << " ) = " << r_best << ", " << std::endl;
}
+ if( optInternalRepSortInference() ){
+ int sortIdBest = d_qe->getTheoryEngine()->getSortInference()->getSortId( r_best );
+ if( sortId!=sortIdBest ){
+ Trace("sort-inf-rep") << "Choosing representative with bad type " << r_best << " " << sortId << " " << sortIdBest << std::endl;
+ }
+ }
return r_best;
}else{
- return d_int_rep[r];
+ return d_int_rep[sortId][r];
}
}
}
@@ -723,7 +708,11 @@ int getDepth( Node n ){
}
}
-int EqualityQueryQuantifiersEngine::getRepScore( Node n ){
+int EqualityQueryQuantifiersEngine::getRepScore( Node n, Node f, int index ){
return d_rep_score.find( n )==d_rep_score.end() ? -1 : d_rep_score[n]; //initial
//return ( d_rep_score.find( n )==d_rep_score.end() ? 100 : 0 ) + getDepth( n ); //term depth
}
+
+bool EqualityQueryQuantifiersEngine::optInternalRepSortInference() {
+ return false; //shown to be not effective
+} \ No newline at end of file
diff --git a/src/theory/quantifiers_engine.h b/src/theory/quantifiers_engine.h
index 29381a309..9f520f420 100644
--- a/src/theory/quantifiers_engine.h
+++ b/src/theory/quantifiers_engine.h
@@ -119,6 +119,10 @@ private:
rrinst::TriggerTrie* d_rr_tr_trie;
/** extended model object */
quantifiers::FirstOrderModel* d_model;
+ /** statistics for debugging */
+ std::map< Node, int > d_total_inst_debug;
+ std::map< Node, int > d_temp_inst_debug;
+ int d_total_inst_count_debug;
private:
KEEP_STATISTIC(TimerStat, d_time, "theory::QuantifiersEngine::time");
public:
@@ -210,6 +214,7 @@ public:
rrinst::TriggerTrie* getRRTriggerDatabase() { return d_rr_tr_trie; }
/** add term to database */
void addTermToDatabase( Node n, bool withinQuant = false );
+ /** get the master equality engine */
eq::EqualityEngine* getMasterEqualityEngine() ;
public:
/** statistics class */
@@ -262,7 +267,7 @@ private:
/** pointer to theory engine */
QuantifiersEngine* d_qe;
/** internal representatives */
- std::map< Node, Node > d_int_rep;
+ std::map< int, std::map< Node, Node > > d_int_rep;
/** rep score */
std::map< Node, int > d_rep_score;
/** reset count */
@@ -271,7 +276,9 @@ private:
/** node contains */
Node getInstance( Node n, std::vector< Node >& eqc );
/** get score */
- int getRepScore( Node n );
+ int getRepScore( Node n, Node f, int index );
+ /** choose rep based on sort inference */
+ bool optInternalRepSortInference();
public:
EqualityQueryQuantifiersEngine( QuantifiersEngine* qe ) : d_qe( qe ), d_reset_count( 0 ){}
~EqualityQueryQuantifiersEngine(){}
@@ -288,7 +295,7 @@ public:
If cbqi is active, this will return a term in the equivalence class of "a" that does
not contain instantiation constants, if such a term exists.
*/
- Node getInternalRepresentative( Node a );
+ Node getInternalRepresentative( Node a, Node f, int index );
}; /* EqualityQueryQuantifiersEngine */
}/* CVC4::theory namespace */
diff --git a/src/theory/rep_set.cpp b/src/theory/rep_set.cpp
index b50878e70..2df0c3f61 100644
--- a/src/theory/rep_set.cpp
+++ b/src/theory/rep_set.cpp
@@ -1,231 +1,224 @@
/********************* */
/*! \file rep_set.cpp
** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
- ** Minor contributors (to current version): mdeters
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.\endverbatim
**
- ** \brief Implementation of representative set
- **/
-
-#include "theory/rep_set.h"
-#include "theory/type_enumerator.h"
-
-using namespace std;
-using namespace CVC4;
-using namespace CVC4::kind;
-using namespace CVC4::context;
-using namespace CVC4::theory;
-
-void RepSet::clear(){
- d_type_reps.clear();
- d_type_complete.clear();
- d_tmap.clear();
-}
-
-int RepSet::getNumRepresentatives( TypeNode tn ) const{
- std::map< TypeNode, std::vector< Node > >::const_iterator it = d_type_reps.find( tn );
- if( it!=d_type_reps.end() ){
- return (int)it->second.size();
- }else{
- return 0;
- }
-}
-
-void RepSet::add( Node n ){
- TypeNode t = n.getType();
- d_tmap[ n ] = (int)d_type_reps[t].size();
- d_type_reps[t].push_back( n );
-}
-
-int RepSet::getIndexFor( Node n ) const {
- std::map< Node, int >::const_iterator it = d_tmap.find( n );
- if( it!=d_tmap.end() ){
- return it->second;
- }else{
- return -1;
- }
-}
-
-void RepSet::complete( TypeNode t ){
- if( d_type_complete.find( t )==d_type_complete.end() ){
- d_type_complete[t] = true;
- TypeEnumerator te(t);
- while( !te.isFinished() ){
- Node n = *te;
- if( std::find( d_type_reps[t].begin(), d_type_reps[t].end(), n )==d_type_reps[t].end() ){
- add( n );
- }
- ++te;
- }
- for( size_t i=0; i<d_type_reps[t].size(); i++ ){
- Trace("reps-complete") << d_type_reps[t][i] << " ";
- }
- Trace("reps-complete") << std::endl;
- }
-}
-
-void RepSet::toStream(std::ostream& out){
-#if 0
- for( std::map< TypeNode, std::vector< Node > >::iterator it = d_type_reps.begin(); it != d_type_reps.end(); ++it ){
- out << it->first << " : " << std::endl;
- for( int i=0; i<(int)it->second.size(); i++ ){
- out << " " << i << ": " << it->second[i] << std::endl;
- }
- }
-#else
- for( std::map< TypeNode, std::vector< Node > >::iterator it = d_type_reps.begin(); it != d_type_reps.end(); ++it ){
- if( !it->first.isFunction() && !it->first.isPredicate() ){
- out << "(" << it->first << " " << it->second.size();
- out << " (";
- for( int i=0; i<(int)it->second.size(); i++ ){
- if( i>0 ){ out << " "; }
- out << it->second[i];
- }
- out << ")";
- out << ")" << std::endl;
- }
- }
-#endif
-}
-
-
-RepSetIterator::RepSetIterator( RepSet* rs ) : d_rep_set( rs ){
- d_incomplete = false;
-
-}
-
-bool RepSetIterator::setQuantifier( Node f ){
- Assert( d_types.empty() );
- //store indicies
- for( size_t i=0; i<f[0].getNumChildren(); i++ ){
- d_types.push_back( f[0][i].getType() );
- }
- return initialize();
-}
-
-bool RepSetIterator::setFunctionDomain( Node op ){
- Assert( d_types.empty() );
- TypeNode tn = op.getType();
- for( size_t i=0; i<tn.getNumChildren()-1; i++ ){
- d_types.push_back( tn[i] );
- }
- return initialize();
-}
-
-bool RepSetIterator::initialize(){
- for( size_t i=0; i<d_types.size(); i++ ){
- d_index.push_back( 0 );
- //store default index order
- d_index_order.push_back( i );
- d_var_order[i] = i;
- //store default domain
- d_domain.push_back( RepDomain() );
- TypeNode tn = d_types[i];
- if( tn.isSort() ){
- if( !d_rep_set->hasType( tn ) ){
- Node var = NodeManager::currentNM()->mkSkolem( "repSet_$$", tn, "is a variable created by the RepSetIterator" );
- Trace("mkVar") << "RepSetIterator:: Make variable " << var << " : " << tn << std::endl;
- d_rep_set->add( var );
- }
- }else if( tn.isInteger() || tn.isReal() ){
- Trace("fmf-incomplete") << "Incomplete because of infinite type " << tn << std::endl;
- d_incomplete = true;
- }else if( tn.isDatatype() ){
- const Datatype& dt = ((DatatypeType)(tn).toType()).getDatatype();
- //if finite, then complete all values of the domain
- if( dt.isFinite() ){
- d_rep_set->complete( tn );
- //d_incomplete = true;
- }else{
- Trace("fmf-incomplete") << "Incomplete because of infinite datatype " << tn << std::endl;
- d_incomplete = true;
- }
- }else{
- Trace("fmf-incomplete") << "Incomplete because of unknown type " << tn << std::endl;
- d_incomplete = true;
- }
- if( d_rep_set->hasType( tn ) ){
- for( size_t j=0; j<d_rep_set->d_type_reps[tn].size(); j++ ){
- d_domain[i].push_back( j );
- }
- }else{
- return false;
- }
- }
- return true;
-}
-
-void RepSetIterator::setIndexOrder( std::vector< int >& indexOrder ){
- d_index_order.clear();
- d_index_order.insert( d_index_order.begin(), indexOrder.begin(), indexOrder.end() );
- //make the d_var_order mapping
- for( int i=0; i<(int)d_index_order.size(); i++ ){
- d_var_order[d_index_order[i]] = i;
- }
-}
-
-void RepSetIterator::setDomain( std::vector< RepDomain >& domain ){
- d_domain.clear();
- d_domain.insert( d_domain.begin(), domain.begin(), domain.end() );
- //we are done if a domain is empty
- for( int i=0; i<(int)d_domain.size(); i++ ){
- if( d_domain[i].empty() ){
- d_index.clear();
- }
- }
-}
-
-void RepSetIterator::increment2( int counter ){
- Assert( !isFinished() );
-#ifdef DISABLE_EVAL_SKIP_MULTIPLE
- counter = (int)d_index.size()-1;
-#endif
- //increment d_index
- while( counter>=0 && d_index[counter]==(int)(d_domain[counter].size()-1) ){
- counter--;
- }
- if( counter==-1 ){
- d_index.clear();
- }else{
- for( int i=(int)d_index.size()-1; i>counter; i-- ){
- d_index[i] = 0;
- }
- d_index[counter]++;
- }
-}
-
-void RepSetIterator::increment(){
- if( !isFinished() ){
- increment2( (int)d_index.size()-1 );
- }
-}
-
-bool RepSetIterator::isFinished(){
- return d_index.empty();
-}
-
-Node RepSetIterator::getTerm( int i ){
- TypeNode tn = d_types[d_index_order[i]];
- Assert( d_rep_set->d_type_reps.find( tn )!=d_rep_set->d_type_reps.end() );
- int index = d_index_order[i];
- return d_rep_set->d_type_reps[tn][d_domain[index][d_index[index]]];
-}
-
-void RepSetIterator::debugPrint( const char* c ){
- for( int i=0; i<(int)d_index.size(); i++ ){
- Debug( c ) << i << " : " << d_index[i] << " : " << getTerm( i ) << std::endl;
- }
-}
-
-void RepSetIterator::debugPrintSmall( const char* c ){
- Debug( c ) << "RI: ";
- for( int i=0; i<(int)d_index.size(); i++ ){
- Debug( c ) << d_index[i] << ": " << getTerm( i ) << " ";
- }
- Debug( c ) << std::endl;
-}
+ ** \brief Implementation of representative set
+ **/
+
+#include "theory/rep_set.h"
+#include "theory/type_enumerator.h"
+
+using namespace std;
+using namespace CVC4;
+using namespace CVC4::kind;
+using namespace CVC4::context;
+using namespace CVC4::theory;
+
+void RepSet::clear(){
+ d_type_reps.clear();
+ d_type_complete.clear();
+ d_tmap.clear();
+}
+
+int RepSet::getNumRepresentatives( TypeNode tn ) const{
+ std::map< TypeNode, std::vector< Node > >::const_iterator it = d_type_reps.find( tn );
+ if( it!=d_type_reps.end() ){
+ return (int)it->second.size();
+ }else{
+ return 0;
+ }
+}
+
+void RepSet::add( Node n ){
+ TypeNode t = n.getType();
+ d_tmap[ n ] = (int)d_type_reps[t].size();
+ d_type_reps[t].push_back( n );
+}
+
+int RepSet::getIndexFor( Node n ) const {
+ std::map< Node, int >::const_iterator it = d_tmap.find( n );
+ if( it!=d_tmap.end() ){
+ return it->second;
+ }else{
+ return -1;
+ }
+}
+
+void RepSet::complete( TypeNode t ){
+ if( d_type_complete.find( t )==d_type_complete.end() ){
+ d_type_complete[t] = true;
+ TypeEnumerator te(t);
+ while( !te.isFinished() ){
+ Node n = *te;
+ if( std::find( d_type_reps[t].begin(), d_type_reps[t].end(), n )==d_type_reps[t].end() ){
+ add( n );
+ }
+ ++te;
+ }
+ for( size_t i=0; i<d_type_reps[t].size(); i++ ){
+ Trace("reps-complete") << d_type_reps[t][i] << " ";
+ }
+ Trace("reps-complete") << std::endl;
+ }
+}
+
+void RepSet::toStream(std::ostream& out){
+#if 0
+ for( std::map< TypeNode, std::vector< Node > >::iterator it = d_type_reps.begin(); it != d_type_reps.end(); ++it ){
+ out << it->first << " : " << std::endl;
+ for( int i=0; i<(int)it->second.size(); i++ ){
+ out << " " << i << ": " << it->second[i] << std::endl;
+ }
+ }
+#else
+ for( std::map< TypeNode, std::vector< Node > >::iterator it = d_type_reps.begin(); it != d_type_reps.end(); ++it ){
+ if( !it->first.isFunction() && !it->first.isPredicate() ){
+ out << "(" << it->first << " " << it->second.size();
+ out << " (";
+ for( int i=0; i<(int)it->second.size(); i++ ){
+ if( i>0 ){ out << " "; }
+ out << it->second[i];
+ }
+ out << ")";
+ out << ")" << std::endl;
+ }
+ }
+#endif
+}
+
+
+RepSetIterator::RepSetIterator( RepSet* rs ) : d_rep_set( rs ){
+ d_incomplete = false;
+
+}
+
+bool RepSetIterator::setQuantifier( Node f ){
+ Assert( d_types.empty() );
+ //store indicies
+ for( size_t i=0; i<f[0].getNumChildren(); i++ ){
+ d_types.push_back( f[0][i].getType() );
+ }
+ return initialize();
+}
+
+bool RepSetIterator::setFunctionDomain( Node op ){
+ Assert( d_types.empty() );
+ TypeNode tn = op.getType();
+ for( size_t i=0; i<tn.getNumChildren()-1; i++ ){
+ d_types.push_back( tn[i] );
+ }
+ return initialize();
+}
+
+bool RepSetIterator::initialize(){
+ for( size_t i=0; i<d_types.size(); i++ ){
+ d_index.push_back( 0 );
+ //store default index order
+ d_index_order.push_back( i );
+ d_var_order[i] = i;
+ //store default domain
+ d_domain.push_back( RepDomain() );
+ TypeNode tn = d_types[i];
+ if( tn.isSort() ){
+ if( !d_rep_set->hasType( tn ) ){
+ Node var = NodeManager::currentNM()->mkSkolem( "repSet_$$", tn, "is a variable created by the RepSetIterator" );
+ Trace("mkVar") << "RepSetIterator:: Make variable " << var << " : " << tn << std::endl;
+ d_rep_set->add( var );
+ }
+ }else if( tn.isInteger() || tn.isReal() ){
+ Trace("fmf-incomplete") << "Incomplete because of infinite type " << tn << std::endl;
+ d_incomplete = true;
+ //enumerate if the sort is reasonably small, the upper bound of 128 is chosen arbitrarily for now
+ }else if( tn.getCardinality().isFinite() && tn.getCardinality().getFiniteCardinality().toUnsignedInt()<=128 ){
+ d_rep_set->complete( tn );
+ }else{
+ Trace("fmf-incomplete") << "Incomplete because of unknown type " << tn << std::endl;
+ d_incomplete = true;
+ }
+ if( d_rep_set->hasType( tn ) ){
+ for( size_t j=0; j<d_rep_set->d_type_reps[tn].size(); j++ ){
+ d_domain[i].push_back( j );
+ }
+ }else{
+ return false;
+ }
+ }
+ return true;
+}
+
+void RepSetIterator::setIndexOrder( std::vector< int >& indexOrder ){
+ d_index_order.clear();
+ d_index_order.insert( d_index_order.begin(), indexOrder.begin(), indexOrder.end() );
+ //make the d_var_order mapping
+ for( int i=0; i<(int)d_index_order.size(); i++ ){
+ d_var_order[d_index_order[i]] = i;
+ }
+}
+
+void RepSetIterator::setDomain( std::vector< RepDomain >& domain ){
+ d_domain.clear();
+ d_domain.insert( d_domain.begin(), domain.begin(), domain.end() );
+ //we are done if a domain is empty
+ for( int i=0; i<(int)d_domain.size(); i++ ){
+ if( d_domain[i].empty() ){
+ d_index.clear();
+ }
+ }
+}
+
+void RepSetIterator::increment2( int counter ){
+ Assert( !isFinished() );
+#ifdef DISABLE_EVAL_SKIP_MULTIPLE
+ counter = (int)d_index.size()-1;
+#endif
+ //increment d_index
+ while( counter>=0 && d_index[counter]==(int)(d_domain[counter].size()-1) ){
+ counter--;
+ }
+ if( counter==-1 ){
+ d_index.clear();
+ }else{
+ for( int i=(int)d_index.size()-1; i>counter; i-- ){
+ d_index[i] = 0;
+ }
+ d_index[counter]++;
+ }
+}
+
+void RepSetIterator::increment(){
+ if( !isFinished() ){
+ increment2( (int)d_index.size()-1 );
+ }
+}
+
+bool RepSetIterator::isFinished(){
+ return d_index.empty();
+}
+
+Node RepSetIterator::getTerm( int i ){
+ TypeNode tn = d_types[d_index_order[i]];
+ Assert( d_rep_set->d_type_reps.find( tn )!=d_rep_set->d_type_reps.end() );
+ int index = d_index_order[i];
+ return d_rep_set->d_type_reps[tn][d_domain[index][d_index[index]]];
+}
+
+void RepSetIterator::debugPrint( const char* c ){
+ for( int i=0; i<(int)d_index.size(); i++ ){
+ Debug( c ) << i << " : " << d_index[i] << " : " << getTerm( i ) << std::endl;
+ }
+}
+
+void RepSetIterator::debugPrintSmall( const char* c ){
+ Debug( c ) << "RI: ";
+ for( int i=0; i<(int)d_index.size(); i++ ){
+ Debug( c ) << d_index[i] << ": " << getTerm( i ) << " ";
+ }
+ Debug( c ) << std::endl;
+}
diff --git a/src/theory/rep_set.h b/src/theory/rep_set.h
index 61b2ebf9f..019f69ec2 100644
--- a/src/theory/rep_set.h
+++ b/src/theory/rep_set.h
@@ -1,112 +1,112 @@
/********************* */
/*! \file rep_set.h
** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
** Minor contributors (to current version): none
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.\endverbatim
**
- ** \brief Representative set class and utilities
- **/
-
-#include "cvc4_private.h"
-
-#ifndef __CVC4__REP_SET_H
-#define __CVC4__REP_SET_H
-
-#include "expr/node.h"
-#include <map>
-
-namespace CVC4 {
-namespace theory {
-
-/** this class stores a representative set */
-class RepSet {
-public:
- RepSet(){}
- ~RepSet(){}
- std::map< TypeNode, std::vector< Node > > d_type_reps;
- std::map< TypeNode, bool > d_type_complete;
- std::map< Node, int > d_tmap;
- /** clear the set */
- void clear();
- /** has type */
- bool hasType( TypeNode tn ) const { return d_type_reps.find( tn )!=d_type_reps.end(); }
- /** get cardinality for type */
- int getNumRepresentatives( TypeNode tn ) const;
- /** add representative for type */
- void add( Node n );
- /** returns index in d_type_reps for node n */
- int getIndexFor( Node n ) const;
- /** complete all values */
- void complete( TypeNode t );
- /** debug print */
- void toStream(std::ostream& out);
-};
-
-//representative domain
-typedef std::vector< int > RepDomain;
-
-/** this class iterates over a RepSet */
-class RepSetIterator {
-private:
- //initialize function
- bool initialize();
-public:
- RepSetIterator( RepSet* rs );
- ~RepSetIterator(){}
- //set that this iterator will be iterating over instantiations for a quantifier
- bool setQuantifier( Node f );
- //set that this iterator will be iterating over the domain of a function
- bool setFunctionDomain( Node op );
-public:
- //pointer to model
- RepSet* d_rep_set;
- //index we are considering
- std::vector< int > d_index;
- //types we are considering
- std::vector< TypeNode > d_types;
- //domain we are considering
- std::vector< RepDomain > d_domain;
- //are we only considering a strict subset of the domain of the quantifier?
- bool d_incomplete;
- //ordering for variables we are indexing over
- // for example, given reps = { a, b } and quantifier forall( x, y, z ) P( x, y, z ) with d_index_order = { 2, 0, 1 },
- // then we consider instantiations in this order:
- // a/x a/y a/z
- // a/x b/y a/z
- // b/x a/y a/z
- // b/x b/y a/z
- // ...
- std::vector< int > d_index_order;
- //variables to index they are considered at
- // for example, if d_index_order = { 2, 0, 1 }
- // then d_var_order = { 0 -> 1, 1 -> 2, 2 -> 0 }
- std::map< int, int > d_var_order;
-public:
- /** set index order */
- void setIndexOrder( std::vector< int >& indexOrder );
- /** set domain */
- void setDomain( std::vector< RepDomain >& domain );
- /** increment the iterator at index=counter */
- void increment2( int counter );
- /** increment the iterator */
- void increment();
- /** is the iterator finished? */
- bool isFinished();
- /** get the i_th term we are considering */
- Node getTerm( int i );
- /** get the number of terms we are considering */
- int getNumTerms() { return (int)d_index_order.size(); }
- /** debug print */
- void debugPrint( const char* c );
- void debugPrintSmall( const char* c );
-};
-
-}
-}
-
-#endif \ No newline at end of file
+ ** \brief Representative set class and utilities
+ **/
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__THEORY__REP_SET_H
+#define __CVC4__THEORY__REP_SET_H
+
+#include "expr/node.h"
+#include <map>
+
+namespace CVC4 {
+namespace theory {
+
+/** this class stores a representative set */
+class RepSet {
+public:
+ RepSet(){}
+ ~RepSet(){}
+ std::map< TypeNode, std::vector< Node > > d_type_reps;
+ std::map< TypeNode, bool > d_type_complete;
+ std::map< Node, int > d_tmap;
+ /** clear the set */
+ void clear();
+ /** has type */
+ bool hasType( TypeNode tn ) const { return d_type_reps.find( tn )!=d_type_reps.end(); }
+ /** get cardinality for type */
+ int getNumRepresentatives( TypeNode tn ) const;
+ /** add representative for type */
+ void add( Node n );
+ /** returns index in d_type_reps for node n */
+ int getIndexFor( Node n ) const;
+ /** complete all values */
+ void complete( TypeNode t );
+ /** debug print */
+ void toStream(std::ostream& out);
+};/* class RepSet */
+
+//representative domain
+typedef std::vector< int > RepDomain;
+
+/** this class iterates over a RepSet */
+class RepSetIterator {
+private:
+ //initialize function
+ bool initialize();
+public:
+ RepSetIterator( RepSet* rs );
+ ~RepSetIterator(){}
+ //set that this iterator will be iterating over instantiations for a quantifier
+ bool setQuantifier( Node f );
+ //set that this iterator will be iterating over the domain of a function
+ bool setFunctionDomain( Node op );
+public:
+ //pointer to model
+ RepSet* d_rep_set;
+ //index we are considering
+ std::vector< int > d_index;
+ //types we are considering
+ std::vector< TypeNode > d_types;
+ //domain we are considering
+ std::vector< RepDomain > d_domain;
+ //are we only considering a strict subset of the domain of the quantifier?
+ bool d_incomplete;
+ //ordering for variables we are indexing over
+ // for example, given reps = { a, b } and quantifier forall( x, y, z ) P( x, y, z ) with d_index_order = { 2, 0, 1 },
+ // then we consider instantiations in this order:
+ // a/x a/y a/z
+ // a/x b/y a/z
+ // b/x a/y a/z
+ // b/x b/y a/z
+ // ...
+ std::vector< int > d_index_order;
+ //variables to index they are considered at
+ // for example, if d_index_order = { 2, 0, 1 }
+ // then d_var_order = { 0 -> 1, 1 -> 2, 2 -> 0 }
+ std::map< int, int > d_var_order;
+public:
+ /** set index order */
+ void setIndexOrder( std::vector< int >& indexOrder );
+ /** set domain */
+ void setDomain( std::vector< RepDomain >& domain );
+ /** increment the iterator at index=counter */
+ void increment2( int counter );
+ /** increment the iterator */
+ void increment();
+ /** is the iterator finished? */
+ bool isFinished();
+ /** get the i_th term we are considering */
+ Node getTerm( int i );
+ /** get the number of terms we are considering */
+ int getNumTerms() { return (int)d_index_order.size(); }
+ /** debug print */
+ void debugPrint( const char* c );
+ void debugPrintSmall( const char* c );
+};/* class RepSetIterator */
+
+}/* CVC4::theory namespace */
+}/* CVC4 namespace */
+
+#endif /* __CVC4__THEORY__REP_SET_H */
diff --git a/src/theory/rewriterules/efficient_e_matching.cpp b/src/theory/rewriterules/efficient_e_matching.cpp
index 2f39d8098..5ed34d46c 100755..100644
--- a/src/theory/rewriterules/efficient_e_matching.cpp
+++ b/src/theory/rewriterules/efficient_e_matching.cpp
@@ -1,686 +1,686 @@
-/********************* */
-/*! \file efficient_e_matching.cpp
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: bobot
- ** Minor contributors (to current version): mdeters
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief Implementation of theory uf instantiator class
- **/
-
-#include "theory/rewriterules/efficient_e_matching.h"
-#include "theory/rewriterules/rr_candidate_generator.h"
-#include "theory/quantifiers/candidate_generator.h"
-#include "theory/quantifiers/options.h"
-#include "theory/rewriterules/options.h"
-#include "theory/quantifiers/term_database.h"
-
-#include "theory/theory_engine.h"
-
-using namespace std;
-using namespace CVC4;
-using namespace CVC4::kind;
-using namespace CVC4::context;
-using namespace CVC4::theory;
-using namespace CVC4::theory::inst;
-
-namespace CVC4 {
-namespace theory {
-
-inline std::ostream& operator<<(std::ostream& out, const EfficientEMatcher::Ips& ips) {
- return out;
-};
-
-EqClassInfo::EqClassInfo( context::Context* c ) : d_funs( c ), d_pfuns( c ), d_disequal( c ){
-
-}
-
-//set member
-void EqClassInfo::setMember( Node n, quantifiers::TermDb* db ){
- if( n.hasOperator() ){
- d_funs.insertAtContextLevelZero(n.getOperator(),true);
- }
- //add parent functions
- for( std::hash_map< Node, std::hash_map< int, std::vector< Node > >, NodeHashFunction >::iterator it = db->d_parents[n].begin();
- it != db->d_parents[n].end(); ++it ){
- //TODO Is it true to do it at level 0? That depend when SetMember is called
- // At worst it is a good overapproximation
- d_pfuns.insertAtContextLevelZero( it->first, true);
- }
-}
-
-//get has function
-bool EqClassInfo::hasFunction( Node op ){
- return d_funs.find( op )!=d_funs.end();
-}
-
-bool EqClassInfo::hasParent( Node op ){
- return d_pfuns.find( op )!=d_pfuns.end();
-}
-
-//merge with another eq class info
-void EqClassInfo::merge( EqClassInfo* eci ){
- for( BoolMap::iterator it = eci->d_funs.begin(); it != eci->d_funs.end(); it++ ) {
- d_funs[ (*it).first ] = true;
- }
- for( BoolMap::iterator it = eci->d_pfuns.begin(); it != eci->d_pfuns.end(); it++ ) {
- d_pfuns[ (*it).first ] = true;
- }
-}
-
-inline void outputEqClassInfo( const char* c, const EqClassInfo* eci){
- Debug(c) << " funs:";
- for( EqClassInfo::BoolMap::iterator it = eci->d_funs.begin(); it != eci->d_funs.end(); it++ ) {
- Debug(c) << (*it).first << ",";
- }
- Debug(c) << std::endl << "pfuns:";
- for( EqClassInfo::BoolMap::iterator it = eci->d_pfuns.begin(); it != eci->d_pfuns.end(); it++ ) {
- Debug(c) << (*it).first << ",";
- }
- Debug(c) << std::endl;
-}
-
-
-
-EfficientEMatcher::EfficientEMatcher( CVC4::theory::QuantifiersEngine* qe ) : d_quantEngine( qe )
-{
-
-}
-
-eq::EqualityEngine* EfficientEMatcher::getEqualityEngine(){
- //return ((uf::TheoryUF*)d_quantEngine->getTheoryEngine()->theoryOf( THEORY_UF ))->getEqualityEngine();
- return d_quantEngine->getMasterEqualityEngine();
-}
-
-/** new node */
-void EfficientEMatcher::newEqClass( TNode n ){
-
-}
-
-void EfficientEMatcher::newTerms(SetNode& s){
- static NoMatchAttribute rewrittenNodeAttribute;
- /* op -> nodes (if the set is empty, the op is not interesting) */
- std::hash_map< TNode, SetNode, TNodeHashFunction > h;
- /* types -> nodes (if the set is empty, the type is not interesting) */
- std::hash_map< TypeNode, SetNode, TypeNodeHashFunction > tyh;
- for(SetNode::iterator i=s.begin(), end=s.end(); i != end; ++i){
- if (i->getAttribute(rewrittenNodeAttribute)) continue; /* skip it */
- if( !d_cand_gens.empty() ){
- // op
- TNode op = i->getOperator();
- std::hash_map< TNode, SetNode, TNodeHashFunction >::iterator
- is = h.find(op);
- if(is == h.end()){
- std::pair<std::hash_map< TNode, SetNode, TNodeHashFunction >::iterator,bool>
- p = h.insert(make_pair(op,SetNode()));
- is = p.first;
- if(d_cand_gens.find(op) != d_cand_gens.end()){
- is->second.insert(*i);
- } /* else we have inserted an empty set */
- }else if(!is->second.empty()){
- is->second.insert(*i);
- }
- }
- if( !d_cand_gen_types.empty() ){
- //type
- TypeNode ty = i->getType();
- std::hash_map< TypeNode, SetNode, TypeNodeHashFunction >::iterator
- is = tyh.find(ty);
- if(is == tyh.end()){
- std::pair<std::hash_map< TypeNode, SetNode, TypeNodeHashFunction >::iterator,bool>
- p = tyh.insert(make_pair(ty,SetNode()));
- is = p.first;
- if(d_cand_gen_types.find(ty) != d_cand_gen_types.end()){
- is->second.insert(*i);
- } /* else we have inserted an empty set */
- }else if(!is->second.empty()){
- is->second.insert(*i);
- }
- }
- }
- //op
- for(std::hash_map< TNode, SetNode, TNodeHashFunction >::iterator i=h.begin(), end=h.end();
- i != end; ++i){
- //new term, add n to candidate generators
- if(i->second.empty()) continue;
- std::map< Node, NodeNewTermDispatcher >::iterator
- inpc = d_cand_gens.find(i->first);
- //we know that this op exists
- Assert(inpc != d_cand_gens.end());
- inpc->second.send(i->second);
- }
- //type
- for(std::hash_map< TypeNode, SetNode, TypeNodeHashFunction >::iterator i=tyh.begin(), end=tyh.end();
- i != end; ++i){
- //new term, add n to candidate generators
- if(i->second.empty()) continue;
- std::map< TypeNode, NodeNewTermDispatcher >::iterator
- inpc = d_cand_gen_types.find(i->first);
- //we know that this op exists
- Assert(inpc != d_cand_gen_types.end());
- inpc->second.send(i->second);
- }
-
-}
-
-
-/** merge */
-void EfficientEMatcher::merge( TNode a, TNode b ){
- if( options::efficientEMatching() ){
- //merge eqc_ops of b into a
- EqClassInfo* eci_a = getOrCreateEquivalenceClassInfo( a );
- EqClassInfo* eci_b = getOrCreateEquivalenceClassInfo( b );
-
- if( a.getKind()!=IFF && a.getKind()!=EQUAL && b.getKind()!=IFF && b.getKind()!=EQUAL ){
- Debug("efficient-e-match") << "Merging " << a << " with " << b << std::endl;
-
- //determine new candidates for instantiation
- computeCandidatesPcPairs( a, eci_a, b, eci_b );
- computeCandidatesPcPairs( b, eci_b, a, eci_a );
- computeCandidatesPpPairs( a, eci_a, b, eci_b );
- computeCandidatesPpPairs( b, eci_b, a, eci_a );
- }
- computeCandidatesConstants( a, eci_a, b, eci_b);
- computeCandidatesConstants( b, eci_b, a, eci_a);
-
- eci_a->merge( eci_b );
- }
-}
-
-/** assert terms are disequal */
-void EfficientEMatcher::assertDisequal( TNode a, TNode b, TNode reason ){
-
-}
-
-EqClassInfo* EfficientEMatcher::getEquivalenceClassInfo( Node n ) {
- return d_eqc_ops.find( n )==d_eqc_ops.end() ? NULL : d_eqc_ops[n];
-}
-EqClassInfo* EfficientEMatcher::getOrCreateEquivalenceClassInfo( Node n ){
- Assert( n==getEqualityEngine()->getRepresentative( n ) );
- if( d_eqc_ops.find( n )==d_eqc_ops.end() ){
- EqClassInfo* eci = new EqClassInfo( d_quantEngine->getSatContext() );
- eci->setMember( n, d_quantEngine->getTermDatabase() );
- d_eqc_ops[n] = eci;
- }
- return d_eqc_ops[n];
-}
-
-void EfficientEMatcher::computeCandidatesPcPairs( Node a, EqClassInfo* eci_a, Node b, EqClassInfo* eci_b ){
- Debug("efficient-e-match") << "Compute candidates for pc pairs..." << std::endl;
- Debug("efficient-e-match") << " Eq class = [";
- outputEqClass( "efficient-e-match", a);
- Debug("efficient-e-match") << "]" << std::endl;
- outputEqClassInfo("efficient-e-match",eci_a);
- for( EqClassInfo::BoolMap::iterator it = eci_a->d_funs.begin(); it != eci_a->d_funs.end(); it++ ) {
- //the child function: a member of eq_class( a ) has top symbol g, in other words g is in funs( a )
- Node g = (*it).first;
- Debug("efficient-e-match") << " Checking application " << g << std::endl;
- //look at all parent/child pairs
- for( std::map< Node, std::vector< std::pair< NodePcDispatcher*, Ips > > >::iterator itf = d_pc_pairs[g].begin();
- itf != d_pc_pairs[g].end(); ++itf ){
- //f/g is a parent/child pair
- Node f = itf->first;
- if( eci_b->hasParent( f ) ){
- //DO_THIS: determine if f in pfuns( b ), only do the follow if so
- Debug("efficient-e-match") << " Checking parent application " << f << std::endl;
- //scan through the list of inverted path strings/candidate generators
- for( std::vector< std::pair< NodePcDispatcher*, Ips > >::iterator cit = itf->second.begin();
- cit != itf->second.end(); ++cit ){
-#ifdef CVC4_DEBUG
- Debug("efficient-e-match") << " Checking pattern " << cit->first->pat << std::endl;
-#endif
- Debug("efficient-e-match") << " Check inverted path string for pattern ";
- outputIps( "efficient-e-match", cit->second );
- Debug("efficient-e-match") << std::endl;
-
- //collect all new relevant terms
- SetNode terms;
- terms.insert( b );
- collectTermsIps( cit->second, terms );
- if( terms.empty() ) continue;
- Debug("efficient-e-match") << " -> Added terms (" << terms.size() << "): ";
- for( SetNode::const_iterator t=terms.begin(), end=terms.end();
- t!=end; ++t ){
- Debug("efficient-e-match") << (*t) << " ";
- }
- Debug("efficient-e-match") << std::endl;
- //add them as candidates to the candidate generator
- cit->first->send(terms);
- }
- }
- }
- }
-}
-
-void EfficientEMatcher::computeCandidatesPpPairs( Node a, EqClassInfo* eci_a, Node b, EqClassInfo* eci_b ){
- Debug("efficient-e-match") << "Compute candidates for pp pairs..." << std::endl;
- for( std::map< Node, std::map< Node, std::vector< triple< NodePpDispatcher*, Ips, Ips > > > >::iterator it = d_pp_pairs.begin();
- it != d_pp_pairs.end(); ++it ){
- Node f = it->first;
- if( eci_a->hasParent( f ) ){
- Debug("efficient-e-match") << " Checking parent application " << f << std::endl;
- for( std::map< Node, std::vector< triple<NodePpDispatcher*, Ips, Ips> > >::iterator it2 = it->second.begin();
- it2 != it->second.end(); ++it2 ){
- Node g = it2->first;
- if( eci_b->hasParent( g ) ){
- Debug("efficient-e-match") << " Checking parent application " << g << std::endl;
- //if f in pfuns( a ) and g is in pfuns( b ), only do the follow if so
- for( std::vector< triple<NodePpDispatcher*, Ips, Ips> > ::iterator cit = it2->second.begin();
- cit != it2->second.end(); ++cit ){
-#ifdef CVC4_DEBUG
- Debug("efficient-e-match") << " Checking pattern " << cit->first->pat1 << " and " << cit->first->pat2 << std::endl;
-#endif
- Debug("efficient-e-match") << " Check inverted path string ";
- outputIps( "efficient-e-match", cit->second );
- SetNode a_terms;
- a_terms.insert( a );
- collectTermsIps( cit->second, a_terms );
- if( a_terms.empty() ) continue;
- Debug("efficient-e-match") << " And check inverted path string ";
- outputIps( "efficient-e-match", cit->third );
- SetNode b_terms;
- b_terms.insert( b );
- collectTermsIps( cit->third, b_terms );
- if( b_terms.empty() ) continue;
- //Start debug
- Debug("efficient-e-match") << " -> Possibly Added termsA (" << a_terms.size() << "): ";
- for( SetNode::const_iterator t=a_terms.begin(), end=a_terms.end();
- t!=end; ++t ){
- Debug("efficient-e-match") << (*t) << " ";
- }
- Debug("efficient-e-match") << std::endl;
- Debug("efficient-e-match") << " -> Possibly Added termsB (" << b_terms.size() << "): ";
- for( SetNode::const_iterator t=b_terms.begin(), end=b_terms.end();
- t!=end; ++t ){
- Debug("efficient-e-match") << (*t) << " ";
- }
- Debug("efficient-e-match") << std::endl;
- //End debug
-
- cit->first->send(a_terms,b_terms);
- }
- }
- }
- }
- }
-}
-
-
-void EfficientEMatcher::computeCandidatesConstants( Node a, EqClassInfo* eci_a, Node b, EqClassInfo* eci_b ){
- Debug("efficient-e-match") << "Compute candidates constants for cc pairs..." << std::endl;
- Debug("efficient-e-match") << " Eq class = [";
- outputEqClass( "efficient-e-match", a);
- Debug("efficient-e-match") << "]" << std::endl;
- outputEqClassInfo("efficient-e-match",eci_a);
- for( std::map< Node, std::map< Node, NodePcDispatcher* > >::iterator
- it = d_cc_pairs.begin(), end = d_cc_pairs.end();
- it != end; ++it ) {
- Debug("efficient-e-match") << " Checking application " << it->first << std::endl;
- if( !eci_b->hasFunction(it->first) ) continue;
- for( std::map< Node, NodePcDispatcher* >::iterator
- itc = it->second.begin(), end = it->second.end();
- itc != end; ++itc ) {
- //The constant
- Debug("efficient-e-match") << " Checking constant " << a << std::endl;
- if(getEqualityEngine()->getRepresentative(itc->first) != a) continue;
- SetNode s;
- eq::EqClassIterator eqc_iter( b, getEqualityEngine() );
- while( !eqc_iter.isFinished() ){
- Debug("efficient-e-match-debug") << "> look at " << (*eqc_iter)
- << std::endl;
- if( (*eqc_iter).hasOperator() && (*eqc_iter).getOperator() == it->first ) s.insert(*eqc_iter);
- eqc_iter++;
- }
-
- if( s.empty() ) continue;
- Debug("efficient-e-match") << " -> Added terms (" << s.size() << "): ";
- for( SetNode::const_iterator t=s.begin(), end=s.end();
- t!=end; ++t ){
- Debug("efficient-e-match") << (*t) << " ";
- }
- Debug("efficient-e-match") << std::endl;
- itc->second->send(s);
- }
- }
-}
-
-void EfficientEMatcher::collectTermsIps( Ips& ips, SetNode & terms ){
- Assert( ips.size() > 0);
- return collectTermsIps( ips, terms, ips.size() - 1);
-}
-
-void EfficientEMatcher::collectTermsIps( Ips& ips, SetNode& terms, int index ){
- if( !terms.empty() ){
- Debug("efficient-e-match-debug") << "> Process " << index << std::endl;
- Node f = ips[index].first;
- int arg = ips[index].second;
-
- //for each term in terms, determine if any term (modulo equality) has parent "f" from position "arg"
- bool addRep = ( index!=0 ); // We want to keep the top symbol for the last
- SetNode newTerms;
- for( SetNode::const_iterator t=terms.begin(), end=terms.end();
- t!=end; ++t ){
- collectParentsTermsIps( *t, f, arg, newTerms, addRep );
- }
- terms.swap(newTerms);
-
- Debug("efficient-e-match-debug") << "> Terms are now: ";
- for( SetNode::const_iterator t=terms.begin(), end=terms.end();
- t!=end; ++t ){
- Debug("efficient-e-match-debug") << *t << " ";
- }
- Debug("efficient-e-match-debug") << std::endl;
-
- if(index!=0) collectTermsIps( ips, terms, index-1 );
- }
-}
-
-bool EfficientEMatcher::collectParentsTermsIps( Node n, Node f, int arg, SetNode & terms, bool addRep, bool modEq ){ //modEq default true
- bool addedTerm = false;
-
- if( modEq && getEqualityEngine()->hasTerm( n )){
- Assert( getEqualityEngine()->getRepresentative( n )==n );
- //collect modulo equality
- //DO_THIS: this should (if necessary) compute a current set of (f, arg) parents for n and cache it
- eq::EqClassIterator eqc_iter( n, getEqualityEngine() );
- while( !eqc_iter.isFinished() ){
- Debug("efficient-e-match-debug") << "> look at " << (*eqc_iter)
- << std::endl;
- if( collectParentsTermsIps( (*eqc_iter), f, arg, terms, addRep, false ) ){
- //if only one argument, we know we can stop (since all others added will be congruent)
- if( f.getType().getNumChildren()==2 ){
- return true;
- }
- addedTerm = true;
- }
- eqc_iter++;
- }
- }else{
- quantifiers::TermDb* db = d_quantEngine->getTermDatabase();
- //see if parent f exists from argument arg
- const std::vector<Node> & parents = db->getParents(n,f,arg);
- for( size_t i=0; i<parents.size(); ++i ){
- TNode t = parents[i];
- if(!CandidateGenerator::isLegalCandidate(t)) continue;
- if( addRep ) t = getEqualityEngine()->getRepresentative( t );
- terms.insert(t);
- addedTerm = true;
- }
- }
- return addedTerm;
-}
-
-void EfficientEMatcher::registerPatternElementPairs2( Node pat, Ips& ips, PpIpsMap & pp_ips_map, NodePcDispatcher* npc ){
- Assert( pat.hasOperator() );
- //add information for possible pp-pair
- ips.push_back( std::pair< Node, int >( pat.getOperator(), 0 ) ); //0 is just a dumb value
-
- for( int i=0; i<(int)pat.getNumChildren(); i++ ){
- if( pat[i].getKind()==INST_CONSTANT ){
- ips.back().second = i;
- pp_ips_map[ pat[i] ].push_back( make_pair( pat.getOperator(), Ips( ips ) ) );
- }
- }
-
- for( int i=0; i<(int)pat.getNumChildren(); i++ ){
- if( pat[i].getKind()==APPLY_UF ){
- ips.back().second = i;
- registerPatternElementPairs2( pat[i], ips, pp_ips_map, npc );
- Debug("pattern-element-opt") << "Found pc-pair ( " << pat.getOperator() << ", " << pat[i].getOperator() << " )" << std::endl;
- Debug("pattern-element-opt") << " Path = ";
- outputIps( "pattern-element-opt", ips );
- Debug("pattern-element-opt") << std::endl;
- //pat.getOperator() and pat[i].getOperator() are a pc-pair
- d_pc_pairs[ pat[i].getOperator() ][ pat.getOperator() ]
- .push_back( make_pair(npc,Ips(ips)) );
- }
- }
- ips.pop_back();
-}
-
-void EfficientEMatcher::registerPatternElementPairs( Node pat, PpIpsMap & pp_ips_map,
- NodePcDispatcher* npc,
- NodePpDispatcher* npp){
- Ips ips;
- registerPatternElementPairs2( pat, ips, pp_ips_map, npc );
- for( PpIpsMap::iterator it = pp_ips_map.begin(); it != pp_ips_map.end(); ++it ){
- // for each variable construct all the pp-pair
- for( size_t j=0; j<it->second.size(); j++ ){
- for( size_t k=j+1; k<it->second.size(); k++ ){
- //found a pp-pair
- Debug("pattern-element-opt") << "Found pp-pair ( " << it->second[j].first << ", " << it->second[k].first << " )" << std::endl;
- Debug("pattern-element-opt") << " Paths = ";
- outputIps( "pattern-element-opt", it->second[j].second );
- Debug("pattern-element-opt") << " and ";
- outputIps( "pattern-element-opt", it->second[k].second );
- Debug("pattern-element-opt") << std::endl;
- d_pp_pairs[ it->second[j].first ][ it->second[k].first ]
- .push_back( make_triple( npp, it->second[j].second, it->second[k].second ));
- }
- }
- }
-};
-
-void findPpSite(Node pat, EfficientEMatcher::Ips& ips, EfficientEMatcher::PpIpsMap & pp_ips_map){
- Assert( pat.getKind()==APPLY_UF );
- //add information for possible pp-pair
-
- ips.push_back( make_pair( pat.getOperator(), 0) );
- for( size_t i=0; i<pat.getNumChildren(); i++ ){
- if( pat[i].getKind()==INST_CONSTANT ){
- ips.back().second = i;
- pp_ips_map[ pat[i] ].push_back( make_pair( pat.getOperator(), EfficientEMatcher::Ips( ips ) ) );
- }
- }
-
- for( size_t i=0; i<pat.getNumChildren(); i++ ){
- if( pat[i].getKind()==APPLY_UF ){
- ips.back().second = i;
- findPpSite( pat[i], ips, pp_ips_map );
- }
- }
- ips.pop_back();
-}
-
-void EfficientEMatcher::combineMultiPpIpsMap(PpIpsMap & pp_ips_map, MultiPpIpsMap & multi_pp_ips_map,
- EfficientHandler& eh, size_t index2,const std::vector<Node> & pats){
- hash_map<size_t,NodePpDispatcher*> npps;
- for( PpIpsMap::iterator it = pp_ips_map.begin(); it != pp_ips_map.end(); ++it ){
- MultiPpIpsMap::iterator mit = multi_pp_ips_map.find(it->first);
- if(mit == multi_pp_ips_map.end()) continue;
- // for each variable construct all the pp-pair
- // j the last pattern treated
- for( std::vector< std::pair< Node, Ips > >::iterator j=it->second.begin(), jend = it->second.end() ;
- j != jend; ++j){
- // k one of the previous one
- for( std::vector< triple< size_t, Node, Ips > >::iterator k=mit->second.begin(), kend = mit->second.end() ;
- k != kend; ++k){
- //found a pp-pair
- Debug("pattern-element-opt") << "Found multi-pp-pair ( " << j->first
- << ", " << k->second << " in "<< k->first
- << " )" << std::endl;
- Debug("pattern-element-opt") << " Paths = ";
- outputIps( "pattern-element-opt", j->second );
- Debug("pattern-element-opt") << " and ";
- outputIps( "pattern-element-opt", k->third );
- Debug("pattern-element-opt") << std::endl;
- NodePpDispatcher* dispatcher;
- hash_map<size_t,NodePpDispatcher*>::iterator inpp = npps.find(k->first);
- if( inpp != npps.end() ) dispatcher = inpp->second;
- else{
- dispatcher = new NodePpDispatcher();
-#ifdef CVC4_DEBUG
- dispatcher->pat1 = pats[index2];
- dispatcher->pat2 = pats[k->first];
-#endif
- dispatcher->addPpDispatcher(&eh,index2,k->first);
- };
- d_pp_pairs[ j->first ][ k->second ].push_back( make_triple( dispatcher, j->second, k->third ));
- }
- }
- }
-
- /** Put pp_ips_map to multi_pp_ips_map */
- for( PpIpsMap::iterator it = pp_ips_map.begin(); it != pp_ips_map.end(); ++it ){
- for( std::vector< std::pair< Node, Ips > >::iterator j=it->second.begin(), jend = it->second.end() ;
- j != jend; ++j){
- multi_pp_ips_map[it->first].push_back(make_triple(index2, j->first, j->second));
- }
- }
-
-}
-
-
-void EfficientEMatcher::registerEfficientHandler( EfficientHandler& handler,
- const std::vector< Node > & pats ){
- Assert(pats.size() > 0);
-
- MultiPpIpsMap multi_pp_ips_map;
- PpIpsMap pp_ips_map;
- //In a multi-pattern Pattern that is only a variable are specials,
- //if the variable appears in another pattern, it can be discarded.
- //Otherwise new term of this term can be candidate. So we stock them
- //here before adding them.
- std::vector< size_t > patVars;
-
- Debug("pattern-element-opt") << "Register patterns" << pats << std::endl;
- for(size_t i = 0; i < pats.size(); ++i){
- if( pats[i].getKind() == kind::INST_CONSTANT){
- patVars.push_back(i);
- continue;
- }
- //to complete
- if( pats[i].getKind() == kind::NOT && pats[i][0].getKind() == kind::EQUAL){
- Node cst = NodeManager::currentNM()->mkConst<bool>(false);
- TNode op = pats[i][0].getOperator();
- if(d_cc_pairs[op][cst] == NULL){
- d_cc_pairs[op][cst] = new NodePcDispatcher();
- }
- d_cc_pairs[op][cst]->addPcDispatcher(&handler,i);
- continue;
- }
- //end to complete
- Debug("pattern-element-opt") << " Register candidate generator..." << pats[i] << std::endl;
- /* Has the pattern already been seen */
- if( d_pat_cand_gens.find( pats[i] )==d_pat_cand_gens.end() ){
- NodePcDispatcher* npc = new NodePcDispatcher();
- NodePpDispatcher* npp = new NodePpDispatcher();
-#ifdef CVC4_DEBUG
- npc->pat = pats[i];
- npp->pat1 = pats[i];
- npp->pat2 = pats[i];
-#endif
- d_pat_cand_gens[pats[i]] = make_pair(npc,npp);
- registerPatternElementPairs( pats[i], pp_ips_map, npc, npp );
- }else{
- Ips ips;
- findPpSite(pats[i],ips,pp_ips_map);
- }
- //Has the top operator already been seen */
- TNode op = pats[i].getOperator();
- d_pat_cand_gens[pats[i]].first->addPcDispatcher(&handler,i);
- d_pat_cand_gens[pats[i]].second->addPpDispatcher(&handler,i,i);
- d_cand_gens[op].addNewTermDispatcher(&handler,i);
-
- combineMultiPpIpsMap(pp_ips_map,multi_pp_ips_map,handler,i,pats);
-
- pp_ips_map.clear();
- }
-
- for(size_t i = 0; i < patVars.size(); ++i){
- TNode var = pats[patVars[i]];
- Assert( var.getKind() == kind::INST_CONSTANT );
- if( multi_pp_ips_map.find(var) != multi_pp_ips_map.end() ){
- //The variable appear in another pattern, skip it
- continue;
- };
- d_cand_gen_types[var.getType()].addNewTermDispatcher(&handler,patVars[i]);
- }
-
- //take all terms from the uf term db and add to candidate generator
- if( pats[0].getKind() == kind::INST_CONSTANT ){
- TypeNode ty = pats[0].getType();
- rrinst::CandidateGenerator* cg = new GenericCandidateGeneratorClasses(d_quantEngine);
- cg->reset(Node::null());
- TNode c;
- SetNode ele;
- while( !(c = cg->getNextCandidate()).isNull() ){
- if( c.getType() == ty ) ele.insert(c);
- }
- if( !ele.empty() ){
- // for(std::vector<Node>::iterator i = db->d_op_map[op].begin(), end = db->d_op_map[op].end(); i != end; ++i){
- // if(CandidateGenerator::isLegalCandidate(*i)) ele.insert(*i);
- // }
- if(Debug.isOn("efficient-e-match-stats")){
- Debug("efficient-e-match-stats") << "pattern " << pats << " initialized with " << ele.size() << " terms"<< std::endl;
- }
- handler.addMonoCandidate(ele, 0);
- }
-
- } else if( pats[0].getKind() == kind::NOT && pats[0][0].getKind() == kind::EQUAL){
- Node cst = NodeManager::currentNM()->mkConst<bool>(false);
- TNode op = pats[0][0].getOperator();
- cst = getEqualityEngine()->getRepresentative(cst);
- SetNode ele;
- eq::EqClassIterator eqc_iter( cst, getEqualityEngine() );
- while( !eqc_iter.isFinished() ){
- Debug("efficient-e-match-debug") << "> look at " << (*eqc_iter)
- << std::endl;
- if( (*eqc_iter).hasOperator() && (*eqc_iter).getOperator() == op ) ele.insert(*eqc_iter);
- eqc_iter++;
- }
- if( !ele.empty() ){
- if(Debug.isOn("efficient-e-match-stats")){
- Debug("efficient-e-match-stats") << "pattern " << pats << " initialized with " << ele.size() << " terms"<< std::endl;
- }
- handler.addMonoCandidate(ele, 0);
- }
-
- } else {
- Node op = pats[0].getOperator();
- TermDb* db = d_quantEngine->getTermDatabase();
- if(db->d_op_map[op].begin() != db->d_op_map[op].end()){
- SetNode ele;
- // for(std::vector<Node>::iterator i = db->d_op_map[op].begin(), end = db->d_op_map[op].end(); i != end; ++i){
- // if(CandidateGenerator::isLegalCandidate(*i)) ele.insert(*i);
- // }
- ele.insert(db->d_op_map[op].begin(), db->d_op_map[op].end());
- if(Debug.isOn("efficient-e-match-stats")){
- Debug("efficient-e-match-stats") << "pattern " << pats << " initialized with " << ele.size() << " terms"<< std::endl;
- }
- handler.addMonoCandidate(ele, 0);
- }
- }
- Debug("efficient-e-match") << "Done." << std::endl;
-}
-
-void EfficientEMatcher::outputEqClass( const char* c, Node n ){
- if( getEqualityEngine()->hasTerm( n ) ){
- eq::EqClassIterator eqc_iter( getEqualityEngine()->getRepresentative( n ),
- getEqualityEngine() );
- bool firstTime = true;
- while( !eqc_iter.isFinished() ){
- if( !firstTime ){ Debug(c) << ", "; }
- Debug(c) << (*eqc_iter);
- firstTime = false;
- eqc_iter++;
- }
- }else{
- Debug(c) << n;
- }
-}
-
-void EfficientEMatcher::outputIps( const char* c, Ips& ips ){
- for( int i=0; i<(int)ips.size(); i++ ){
- if( i>0 ){ Debug( c ) << "."; }
- Debug( c ) << ips[i].first << "." << ips[i].second;
- }
-}
-
-
-} /* namespace theory */
-} /* namespace cvc4 */
+/********************* */
+/*! \file efficient_e_matching.cpp
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief Implementation of theory uf instantiator class
+ **/
+
+#include "theory/rewriterules/efficient_e_matching.h"
+#include "theory/rewriterules/rr_candidate_generator.h"
+#include "theory/quantifiers/candidate_generator.h"
+#include "theory/quantifiers/options.h"
+#include "theory/rewriterules/options.h"
+#include "theory/quantifiers/term_database.h"
+
+#include "theory/theory_engine.h"
+
+using namespace std;
+using namespace CVC4;
+using namespace CVC4::kind;
+using namespace CVC4::context;
+using namespace CVC4::theory;
+using namespace CVC4::theory::inst;
+
+namespace CVC4 {
+namespace theory {
+
+inline std::ostream& operator<<(std::ostream& out, const EfficientEMatcher::Ips& ips) {
+ return out;
+};
+
+EqClassInfo::EqClassInfo( context::Context* c ) : d_funs( c ), d_pfuns( c ), d_disequal( c ){
+
+}
+
+//set member
+void EqClassInfo::setMember( Node n, quantifiers::TermDb* db ){
+ if( n.hasOperator() ){
+ d_funs.insertAtContextLevelZero(n.getOperator(),true);
+ }
+ //add parent functions
+ for( std::hash_map< Node, std::hash_map< int, std::vector< Node > >, NodeHashFunction >::iterator it = db->d_parents[n].begin();
+ it != db->d_parents[n].end(); ++it ){
+ //TODO Is it true to do it at level 0? That depend when SetMember is called
+ // At worst it is a good overapproximation
+ d_pfuns.insertAtContextLevelZero( it->first, true);
+ }
+}
+
+//get has function
+bool EqClassInfo::hasFunction( Node op ){
+ return d_funs.find( op )!=d_funs.end();
+}
+
+bool EqClassInfo::hasParent( Node op ){
+ return d_pfuns.find( op )!=d_pfuns.end();
+}
+
+//merge with another eq class info
+void EqClassInfo::merge( EqClassInfo* eci ){
+ for( BoolMap::iterator it = eci->d_funs.begin(); it != eci->d_funs.end(); it++ ) {
+ d_funs[ (*it).first ] = true;
+ }
+ for( BoolMap::iterator it = eci->d_pfuns.begin(); it != eci->d_pfuns.end(); it++ ) {
+ d_pfuns[ (*it).first ] = true;
+ }
+}
+
+inline void outputEqClassInfo( const char* c, const EqClassInfo* eci){
+ Debug(c) << " funs:";
+ for( EqClassInfo::BoolMap::iterator it = eci->d_funs.begin(); it != eci->d_funs.end(); it++ ) {
+ Debug(c) << (*it).first << ",";
+ }
+ Debug(c) << std::endl << "pfuns:";
+ for( EqClassInfo::BoolMap::iterator it = eci->d_pfuns.begin(); it != eci->d_pfuns.end(); it++ ) {
+ Debug(c) << (*it).first << ",";
+ }
+ Debug(c) << std::endl;
+}
+
+
+
+EfficientEMatcher::EfficientEMatcher( CVC4::theory::QuantifiersEngine* qe ) : d_quantEngine( qe )
+{
+
+}
+
+eq::EqualityEngine* EfficientEMatcher::getEqualityEngine(){
+ //return ((uf::TheoryUF*)d_quantEngine->getTheoryEngine()->theoryOf( THEORY_UF ))->getEqualityEngine();
+ return d_quantEngine->getMasterEqualityEngine();
+}
+
+/** new node */
+void EfficientEMatcher::newEqClass( TNode n ){
+
+}
+
+void EfficientEMatcher::newTerms(SetNode& s){
+ static NoMatchAttribute rewrittenNodeAttribute;
+ /* op -> nodes (if the set is empty, the op is not interesting) */
+ std::hash_map< TNode, SetNode, TNodeHashFunction > h;
+ /* types -> nodes (if the set is empty, the type is not interesting) */
+ std::hash_map< TypeNode, SetNode, TypeNodeHashFunction > tyh;
+ for(SetNode::iterator i=s.begin(), end=s.end(); i != end; ++i){
+ if (i->getAttribute(rewrittenNodeAttribute)) continue; /* skip it */
+ if( !d_cand_gens.empty() ){
+ // op
+ TNode op = i->getOperator();
+ std::hash_map< TNode, SetNode, TNodeHashFunction >::iterator
+ is = h.find(op);
+ if(is == h.end()){
+ std::pair<std::hash_map< TNode, SetNode, TNodeHashFunction >::iterator,bool>
+ p = h.insert(make_pair(op,SetNode()));
+ is = p.first;
+ if(d_cand_gens.find(op) != d_cand_gens.end()){
+ is->second.insert(*i);
+ } /* else we have inserted an empty set */
+ }else if(!is->second.empty()){
+ is->second.insert(*i);
+ }
+ }
+ if( !d_cand_gen_types.empty() ){
+ //type
+ TypeNode ty = i->getType();
+ std::hash_map< TypeNode, SetNode, TypeNodeHashFunction >::iterator
+ is = tyh.find(ty);
+ if(is == tyh.end()){
+ std::pair<std::hash_map< TypeNode, SetNode, TypeNodeHashFunction >::iterator,bool>
+ p = tyh.insert(make_pair(ty,SetNode()));
+ is = p.first;
+ if(d_cand_gen_types.find(ty) != d_cand_gen_types.end()){
+ is->second.insert(*i);
+ } /* else we have inserted an empty set */
+ }else if(!is->second.empty()){
+ is->second.insert(*i);
+ }
+ }
+ }
+ //op
+ for(std::hash_map< TNode, SetNode, TNodeHashFunction >::iterator i=h.begin(), end=h.end();
+ i != end; ++i){
+ //new term, add n to candidate generators
+ if(i->second.empty()) continue;
+ std::map< Node, NodeNewTermDispatcher >::iterator
+ inpc = d_cand_gens.find(i->first);
+ //we know that this op exists
+ Assert(inpc != d_cand_gens.end());
+ inpc->second.send(i->second);
+ }
+ //type
+ for(std::hash_map< TypeNode, SetNode, TypeNodeHashFunction >::iterator i=tyh.begin(), end=tyh.end();
+ i != end; ++i){
+ //new term, add n to candidate generators
+ if(i->second.empty()) continue;
+ std::map< TypeNode, NodeNewTermDispatcher >::iterator
+ inpc = d_cand_gen_types.find(i->first);
+ //we know that this op exists
+ Assert(inpc != d_cand_gen_types.end());
+ inpc->second.send(i->second);
+ }
+
+}
+
+
+/** merge */
+void EfficientEMatcher::merge( TNode a, TNode b ){
+ if( options::efficientEMatching() ){
+ //merge eqc_ops of b into a
+ EqClassInfo* eci_a = getOrCreateEquivalenceClassInfo( a );
+ EqClassInfo* eci_b = getOrCreateEquivalenceClassInfo( b );
+
+ if( a.getKind()!=IFF && a.getKind()!=EQUAL && b.getKind()!=IFF && b.getKind()!=EQUAL ){
+ Debug("efficient-e-match") << "Merging " << a << " with " << b << std::endl;
+
+ //determine new candidates for instantiation
+ computeCandidatesPcPairs( a, eci_a, b, eci_b );
+ computeCandidatesPcPairs( b, eci_b, a, eci_a );
+ computeCandidatesPpPairs( a, eci_a, b, eci_b );
+ computeCandidatesPpPairs( b, eci_b, a, eci_a );
+ }
+ computeCandidatesConstants( a, eci_a, b, eci_b);
+ computeCandidatesConstants( b, eci_b, a, eci_a);
+
+ eci_a->merge( eci_b );
+ }
+}
+
+/** assert terms are disequal */
+void EfficientEMatcher::assertDisequal( TNode a, TNode b, TNode reason ){
+
+}
+
+EqClassInfo* EfficientEMatcher::getEquivalenceClassInfo( Node n ) {
+ return d_eqc_ops.find( n )==d_eqc_ops.end() ? NULL : d_eqc_ops[n];
+}
+EqClassInfo* EfficientEMatcher::getOrCreateEquivalenceClassInfo( Node n ){
+ Assert( n==getEqualityEngine()->getRepresentative( n ) );
+ if( d_eqc_ops.find( n )==d_eqc_ops.end() ){
+ EqClassInfo* eci = new EqClassInfo( d_quantEngine->getSatContext() );
+ eci->setMember( n, d_quantEngine->getTermDatabase() );
+ d_eqc_ops[n] = eci;
+ }
+ return d_eqc_ops[n];
+}
+
+void EfficientEMatcher::computeCandidatesPcPairs( Node a, EqClassInfo* eci_a, Node b, EqClassInfo* eci_b ){
+ Debug("efficient-e-match") << "Compute candidates for pc pairs..." << std::endl;
+ Debug("efficient-e-match") << " Eq class = [";
+ outputEqClass( "efficient-e-match", a);
+ Debug("efficient-e-match") << "]" << std::endl;
+ outputEqClassInfo("efficient-e-match",eci_a);
+ for( EqClassInfo::BoolMap::iterator it = eci_a->d_funs.begin(); it != eci_a->d_funs.end(); it++ ) {
+ //the child function: a member of eq_class( a ) has top symbol g, in other words g is in funs( a )
+ Node g = (*it).first;
+ Debug("efficient-e-match") << " Checking application " << g << std::endl;
+ //look at all parent/child pairs
+ for( std::map< Node, std::vector< std::pair< NodePcDispatcher*, Ips > > >::iterator itf = d_pc_pairs[g].begin();
+ itf != d_pc_pairs[g].end(); ++itf ){
+ //f/g is a parent/child pair
+ Node f = itf->first;
+ if( eci_b->hasParent( f ) ){
+ //DO_THIS: determine if f in pfuns( b ), only do the follow if so
+ Debug("efficient-e-match") << " Checking parent application " << f << std::endl;
+ //scan through the list of inverted path strings/candidate generators
+ for( std::vector< std::pair< NodePcDispatcher*, Ips > >::iterator cit = itf->second.begin();
+ cit != itf->second.end(); ++cit ){
+#ifdef CVC4_DEBUG
+ Debug("efficient-e-match") << " Checking pattern " << cit->first->pat << std::endl;
+#endif
+ Debug("efficient-e-match") << " Check inverted path string for pattern ";
+ outputIps( "efficient-e-match", cit->second );
+ Debug("efficient-e-match") << std::endl;
+
+ //collect all new relevant terms
+ SetNode terms;
+ terms.insert( b );
+ collectTermsIps( cit->second, terms );
+ if( terms.empty() ) continue;
+ Debug("efficient-e-match") << " -> Added terms (" << terms.size() << "): ";
+ for( SetNode::const_iterator t=terms.begin(), end=terms.end();
+ t!=end; ++t ){
+ Debug("efficient-e-match") << (*t) << " ";
+ }
+ Debug("efficient-e-match") << std::endl;
+ //add them as candidates to the candidate generator
+ cit->first->send(terms);
+ }
+ }
+ }
+ }
+}
+
+void EfficientEMatcher::computeCandidatesPpPairs( Node a, EqClassInfo* eci_a, Node b, EqClassInfo* eci_b ){
+ Debug("efficient-e-match") << "Compute candidates for pp pairs..." << std::endl;
+ for( std::map< Node, std::map< Node, std::vector< triple< NodePpDispatcher*, Ips, Ips > > > >::iterator it = d_pp_pairs.begin();
+ it != d_pp_pairs.end(); ++it ){
+ Node f = it->first;
+ if( eci_a->hasParent( f ) ){
+ Debug("efficient-e-match") << " Checking parent application " << f << std::endl;
+ for( std::map< Node, std::vector< triple<NodePpDispatcher*, Ips, Ips> > >::iterator it2 = it->second.begin();
+ it2 != it->second.end(); ++it2 ){
+ Node g = it2->first;
+ if( eci_b->hasParent( g ) ){
+ Debug("efficient-e-match") << " Checking parent application " << g << std::endl;
+ //if f in pfuns( a ) and g is in pfuns( b ), only do the follow if so
+ for( std::vector< triple<NodePpDispatcher*, Ips, Ips> > ::iterator cit = it2->second.begin();
+ cit != it2->second.end(); ++cit ){
+#ifdef CVC4_DEBUG
+ Debug("efficient-e-match") << " Checking pattern " << cit->first->pat1 << " and " << cit->first->pat2 << std::endl;
+#endif
+ Debug("efficient-e-match") << " Check inverted path string ";
+ outputIps( "efficient-e-match", cit->second );
+ SetNode a_terms;
+ a_terms.insert( a );
+ collectTermsIps( cit->second, a_terms );
+ if( a_terms.empty() ) continue;
+ Debug("efficient-e-match") << " And check inverted path string ";
+ outputIps( "efficient-e-match", cit->third );
+ SetNode b_terms;
+ b_terms.insert( b );
+ collectTermsIps( cit->third, b_terms );
+ if( b_terms.empty() ) continue;
+ //Start debug
+ Debug("efficient-e-match") << " -> Possibly Added termsA (" << a_terms.size() << "): ";
+ for( SetNode::const_iterator t=a_terms.begin(), end=a_terms.end();
+ t!=end; ++t ){
+ Debug("efficient-e-match") << (*t) << " ";
+ }
+ Debug("efficient-e-match") << std::endl;
+ Debug("efficient-e-match") << " -> Possibly Added termsB (" << b_terms.size() << "): ";
+ for( SetNode::const_iterator t=b_terms.begin(), end=b_terms.end();
+ t!=end; ++t ){
+ Debug("efficient-e-match") << (*t) << " ";
+ }
+ Debug("efficient-e-match") << std::endl;
+ //End debug
+
+ cit->first->send(a_terms,b_terms);
+ }
+ }
+ }
+ }
+ }
+}
+
+
+void EfficientEMatcher::computeCandidatesConstants( Node a, EqClassInfo* eci_a, Node b, EqClassInfo* eci_b ){
+ Debug("efficient-e-match") << "Compute candidates constants for cc pairs..." << std::endl;
+ Debug("efficient-e-match") << " Eq class = [";
+ outputEqClass( "efficient-e-match", a);
+ Debug("efficient-e-match") << "]" << std::endl;
+ outputEqClassInfo("efficient-e-match",eci_a);
+ for( std::map< Node, std::map< Node, NodePcDispatcher* > >::iterator
+ it = d_cc_pairs.begin(), end = d_cc_pairs.end();
+ it != end; ++it ) {
+ Debug("efficient-e-match") << " Checking application " << it->first << std::endl;
+ if( !eci_b->hasFunction(it->first) ) continue;
+ for( std::map< Node, NodePcDispatcher* >::iterator
+ itc = it->second.begin(), end = it->second.end();
+ itc != end; ++itc ) {
+ //The constant
+ Debug("efficient-e-match") << " Checking constant " << a << std::endl;
+ if(getEqualityEngine()->getRepresentative(itc->first) != a) continue;
+ SetNode s;
+ eq::EqClassIterator eqc_iter( b, getEqualityEngine() );
+ while( !eqc_iter.isFinished() ){
+ Debug("efficient-e-match-debug") << "> look at " << (*eqc_iter)
+ << std::endl;
+ if( (*eqc_iter).hasOperator() && (*eqc_iter).getOperator() == it->first ) s.insert(*eqc_iter);
+ eqc_iter++;
+ }
+
+ if( s.empty() ) continue;
+ Debug("efficient-e-match") << " -> Added terms (" << s.size() << "): ";
+ for( SetNode::const_iterator t=s.begin(), end=s.end();
+ t!=end; ++t ){
+ Debug("efficient-e-match") << (*t) << " ";
+ }
+ Debug("efficient-e-match") << std::endl;
+ itc->second->send(s);
+ }
+ }
+}
+
+void EfficientEMatcher::collectTermsIps( Ips& ips, SetNode & terms ){
+ Assert( ips.size() > 0);
+ return collectTermsIps( ips, terms, ips.size() - 1);
+}
+
+void EfficientEMatcher::collectTermsIps( Ips& ips, SetNode& terms, int index ){
+ if( !terms.empty() ){
+ Debug("efficient-e-match-debug") << "> Process " << index << std::endl;
+ Node f = ips[index].first;
+ int arg = ips[index].second;
+
+ //for each term in terms, determine if any term (modulo equality) has parent "f" from position "arg"
+ bool addRep = ( index!=0 ); // We want to keep the top symbol for the last
+ SetNode newTerms;
+ for( SetNode::const_iterator t=terms.begin(), end=terms.end();
+ t!=end; ++t ){
+ collectParentsTermsIps( *t, f, arg, newTerms, addRep );
+ }
+ terms.swap(newTerms);
+
+ Debug("efficient-e-match-debug") << "> Terms are now: ";
+ for( SetNode::const_iterator t=terms.begin(), end=terms.end();
+ t!=end; ++t ){
+ Debug("efficient-e-match-debug") << *t << " ";
+ }
+ Debug("efficient-e-match-debug") << std::endl;
+
+ if(index!=0) collectTermsIps( ips, terms, index-1 );
+ }
+}
+
+bool EfficientEMatcher::collectParentsTermsIps( Node n, Node f, int arg, SetNode & terms, bool addRep, bool modEq ){ //modEq default true
+ bool addedTerm = false;
+
+ if( modEq && getEqualityEngine()->hasTerm( n )){
+ Assert( getEqualityEngine()->getRepresentative( n )==n );
+ //collect modulo equality
+ //DO_THIS: this should (if necessary) compute a current set of (f, arg) parents for n and cache it
+ eq::EqClassIterator eqc_iter( n, getEqualityEngine() );
+ while( !eqc_iter.isFinished() ){
+ Debug("efficient-e-match-debug") << "> look at " << (*eqc_iter)
+ << std::endl;
+ if( collectParentsTermsIps( (*eqc_iter), f, arg, terms, addRep, false ) ){
+ //if only one argument, we know we can stop (since all others added will be congruent)
+ if( f.getType().getNumChildren()==2 ){
+ return true;
+ }
+ addedTerm = true;
+ }
+ eqc_iter++;
+ }
+ }else{
+ quantifiers::TermDb* db = d_quantEngine->getTermDatabase();
+ //see if parent f exists from argument arg
+ const std::vector<Node> & parents = db->getParents(n,f,arg);
+ for( size_t i=0; i<parents.size(); ++i ){
+ TNode t = parents[i];
+ if(!CandidateGenerator::isLegalCandidate(t)) continue;
+ if( addRep ) t = getEqualityEngine()->getRepresentative( t );
+ terms.insert(t);
+ addedTerm = true;
+ }
+ }
+ return addedTerm;
+}
+
+void EfficientEMatcher::registerPatternElementPairs2( Node pat, Ips& ips, PpIpsMap & pp_ips_map, NodePcDispatcher* npc ){
+ Assert( pat.hasOperator() );
+ //add information for possible pp-pair
+ ips.push_back( std::pair< Node, int >( pat.getOperator(), 0 ) ); //0 is just a dumb value
+
+ for( int i=0; i<(int)pat.getNumChildren(); i++ ){
+ if( pat[i].getKind()==INST_CONSTANT ){
+ ips.back().second = i;
+ pp_ips_map[ pat[i] ].push_back( make_pair( pat.getOperator(), Ips( ips ) ) );
+ }
+ }
+
+ for( int i=0; i<(int)pat.getNumChildren(); i++ ){
+ if( pat[i].getKind()==APPLY_UF ){
+ ips.back().second = i;
+ registerPatternElementPairs2( pat[i], ips, pp_ips_map, npc );
+ Debug("pattern-element-opt") << "Found pc-pair ( " << pat.getOperator() << ", " << pat[i].getOperator() << " )" << std::endl;
+ Debug("pattern-element-opt") << " Path = ";
+ outputIps( "pattern-element-opt", ips );
+ Debug("pattern-element-opt") << std::endl;
+ //pat.getOperator() and pat[i].getOperator() are a pc-pair
+ d_pc_pairs[ pat[i].getOperator() ][ pat.getOperator() ]
+ .push_back( make_pair(npc,Ips(ips)) );
+ }
+ }
+ ips.pop_back();
+}
+
+void EfficientEMatcher::registerPatternElementPairs( Node pat, PpIpsMap & pp_ips_map,
+ NodePcDispatcher* npc,
+ NodePpDispatcher* npp){
+ Ips ips;
+ registerPatternElementPairs2( pat, ips, pp_ips_map, npc );
+ for( PpIpsMap::iterator it = pp_ips_map.begin(); it != pp_ips_map.end(); ++it ){
+ // for each variable construct all the pp-pair
+ for( size_t j=0; j<it->second.size(); j++ ){
+ for( size_t k=j+1; k<it->second.size(); k++ ){
+ //found a pp-pair
+ Debug("pattern-element-opt") << "Found pp-pair ( " << it->second[j].first << ", " << it->second[k].first << " )" << std::endl;
+ Debug("pattern-element-opt") << " Paths = ";
+ outputIps( "pattern-element-opt", it->second[j].second );
+ Debug("pattern-element-opt") << " and ";
+ outputIps( "pattern-element-opt", it->second[k].second );
+ Debug("pattern-element-opt") << std::endl;
+ d_pp_pairs[ it->second[j].first ][ it->second[k].first ]
+ .push_back( make_triple( npp, it->second[j].second, it->second[k].second ));
+ }
+ }
+ }
+};
+
+void findPpSite(Node pat, EfficientEMatcher::Ips& ips, EfficientEMatcher::PpIpsMap & pp_ips_map){
+ Assert( pat.getKind()==APPLY_UF );
+ //add information for possible pp-pair
+
+ ips.push_back( make_pair( pat.getOperator(), 0) );
+ for( size_t i=0; i<pat.getNumChildren(); i++ ){
+ if( pat[i].getKind()==INST_CONSTANT ){
+ ips.back().second = i;
+ pp_ips_map[ pat[i] ].push_back( make_pair( pat.getOperator(), EfficientEMatcher::Ips( ips ) ) );
+ }
+ }
+
+ for( size_t i=0; i<pat.getNumChildren(); i++ ){
+ if( pat[i].getKind()==APPLY_UF ){
+ ips.back().second = i;
+ findPpSite( pat[i], ips, pp_ips_map );
+ }
+ }
+ ips.pop_back();
+}
+
+void EfficientEMatcher::combineMultiPpIpsMap(PpIpsMap & pp_ips_map, MultiPpIpsMap & multi_pp_ips_map,
+ EfficientHandler& eh, size_t index2,const std::vector<Node> & pats){
+ hash_map<size_t,NodePpDispatcher*> npps;
+ for( PpIpsMap::iterator it = pp_ips_map.begin(); it != pp_ips_map.end(); ++it ){
+ MultiPpIpsMap::iterator mit = multi_pp_ips_map.find(it->first);
+ if(mit == multi_pp_ips_map.end()) continue;
+ // for each variable construct all the pp-pair
+ // j the last pattern treated
+ for( std::vector< std::pair< Node, Ips > >::iterator j=it->second.begin(), jend = it->second.end() ;
+ j != jend; ++j){
+ // k one of the previous one
+ for( std::vector< triple< size_t, Node, Ips > >::iterator k=mit->second.begin(), kend = mit->second.end() ;
+ k != kend; ++k){
+ //found a pp-pair
+ Debug("pattern-element-opt") << "Found multi-pp-pair ( " << j->first
+ << ", " << k->second << " in "<< k->first
+ << " )" << std::endl;
+ Debug("pattern-element-opt") << " Paths = ";
+ outputIps( "pattern-element-opt", j->second );
+ Debug("pattern-element-opt") << " and ";
+ outputIps( "pattern-element-opt", k->third );
+ Debug("pattern-element-opt") << std::endl;
+ NodePpDispatcher* dispatcher;
+ hash_map<size_t,NodePpDispatcher*>::iterator inpp = npps.find(k->first);
+ if( inpp != npps.end() ) dispatcher = inpp->second;
+ else{
+ dispatcher = new NodePpDispatcher();
+#ifdef CVC4_DEBUG
+ dispatcher->pat1 = pats[index2];
+ dispatcher->pat2 = pats[k->first];
+#endif
+ dispatcher->addPpDispatcher(&eh,index2,k->first);
+ };
+ d_pp_pairs[ j->first ][ k->second ].push_back( make_triple( dispatcher, j->second, k->third ));
+ }
+ }
+ }
+
+ /** Put pp_ips_map to multi_pp_ips_map */
+ for( PpIpsMap::iterator it = pp_ips_map.begin(); it != pp_ips_map.end(); ++it ){
+ for( std::vector< std::pair< Node, Ips > >::iterator j=it->second.begin(), jend = it->second.end() ;
+ j != jend; ++j){
+ multi_pp_ips_map[it->first].push_back(make_triple(index2, j->first, j->second));
+ }
+ }
+
+}
+
+
+void EfficientEMatcher::registerEfficientHandler( EfficientHandler& handler,
+ const std::vector< Node > & pats ){
+ Assert(pats.size() > 0);
+
+ MultiPpIpsMap multi_pp_ips_map;
+ PpIpsMap pp_ips_map;
+ //In a multi-pattern Pattern that is only a variable are specials,
+ //if the variable appears in another pattern, it can be discarded.
+ //Otherwise new term of this term can be candidate. So we stock them
+ //here before adding them.
+ std::vector< size_t > patVars;
+
+ Debug("pattern-element-opt") << "Register patterns" << pats << std::endl;
+ for(size_t i = 0; i < pats.size(); ++i){
+ if( pats[i].getKind() == kind::INST_CONSTANT){
+ patVars.push_back(i);
+ continue;
+ }
+ //to complete
+ if( pats[i].getKind() == kind::NOT && pats[i][0].getKind() == kind::EQUAL){
+ Node cst = NodeManager::currentNM()->mkConst<bool>(false);
+ TNode op = pats[i][0].getOperator();
+ if(d_cc_pairs[op][cst] == NULL){
+ d_cc_pairs[op][cst] = new NodePcDispatcher();
+ }
+ d_cc_pairs[op][cst]->addPcDispatcher(&handler,i);
+ continue;
+ }
+ //end to complete
+ Debug("pattern-element-opt") << " Register candidate generator..." << pats[i] << std::endl;
+ /* Has the pattern already been seen */
+ if( d_pat_cand_gens.find( pats[i] )==d_pat_cand_gens.end() ){
+ NodePcDispatcher* npc = new NodePcDispatcher();
+ NodePpDispatcher* npp = new NodePpDispatcher();
+#ifdef CVC4_DEBUG
+ npc->pat = pats[i];
+ npp->pat1 = pats[i];
+ npp->pat2 = pats[i];
+#endif
+ d_pat_cand_gens[pats[i]] = make_pair(npc,npp);
+ registerPatternElementPairs( pats[i], pp_ips_map, npc, npp );
+ }else{
+ Ips ips;
+ findPpSite(pats[i],ips,pp_ips_map);
+ }
+ //Has the top operator already been seen */
+ TNode op = pats[i].getOperator();
+ d_pat_cand_gens[pats[i]].first->addPcDispatcher(&handler,i);
+ d_pat_cand_gens[pats[i]].second->addPpDispatcher(&handler,i,i);
+ d_cand_gens[op].addNewTermDispatcher(&handler,i);
+
+ combineMultiPpIpsMap(pp_ips_map,multi_pp_ips_map,handler,i,pats);
+
+ pp_ips_map.clear();
+ }
+
+ for(size_t i = 0; i < patVars.size(); ++i){
+ TNode var = pats[patVars[i]];
+ Assert( var.getKind() == kind::INST_CONSTANT );
+ if( multi_pp_ips_map.find(var) != multi_pp_ips_map.end() ){
+ //The variable appear in another pattern, skip it
+ continue;
+ };
+ d_cand_gen_types[var.getType()].addNewTermDispatcher(&handler,patVars[i]);
+ }
+
+ //take all terms from the uf term db and add to candidate generator
+ if( pats[0].getKind() == kind::INST_CONSTANT ){
+ TypeNode ty = pats[0].getType();
+ rrinst::CandidateGenerator* cg = new GenericCandidateGeneratorClasses(d_quantEngine);
+ cg->reset(Node::null());
+ TNode c;
+ SetNode ele;
+ while( !(c = cg->getNextCandidate()).isNull() ){
+ if( c.getType() == ty ) ele.insert(c);
+ }
+ if( !ele.empty() ){
+ // for(std::vector<Node>::iterator i = db->d_op_map[op].begin(), end = db->d_op_map[op].end(); i != end; ++i){
+ // if(CandidateGenerator::isLegalCandidate(*i)) ele.insert(*i);
+ // }
+ if(Debug.isOn("efficient-e-match-stats")){
+ Debug("efficient-e-match-stats") << "pattern " << pats << " initialized with " << ele.size() << " terms"<< std::endl;
+ }
+ handler.addMonoCandidate(ele, 0);
+ }
+
+ } else if( pats[0].getKind() == kind::NOT && pats[0][0].getKind() == kind::EQUAL){
+ Node cst = NodeManager::currentNM()->mkConst<bool>(false);
+ TNode op = pats[0][0].getOperator();
+ cst = getEqualityEngine()->getRepresentative(cst);
+ SetNode ele;
+ eq::EqClassIterator eqc_iter( cst, getEqualityEngine() );
+ while( !eqc_iter.isFinished() ){
+ Debug("efficient-e-match-debug") << "> look at " << (*eqc_iter)
+ << std::endl;
+ if( (*eqc_iter).hasOperator() && (*eqc_iter).getOperator() == op ) ele.insert(*eqc_iter);
+ eqc_iter++;
+ }
+ if( !ele.empty() ){
+ if(Debug.isOn("efficient-e-match-stats")){
+ Debug("efficient-e-match-stats") << "pattern " << pats << " initialized with " << ele.size() << " terms"<< std::endl;
+ }
+ handler.addMonoCandidate(ele, 0);
+ }
+
+ } else {
+ Node op = pats[0].getOperator();
+ TermDb* db = d_quantEngine->getTermDatabase();
+ if(db->d_op_map[op].begin() != db->d_op_map[op].end()){
+ SetNode ele;
+ // for(std::vector<Node>::iterator i = db->d_op_map[op].begin(), end = db->d_op_map[op].end(); i != end; ++i){
+ // if(CandidateGenerator::isLegalCandidate(*i)) ele.insert(*i);
+ // }
+ ele.insert(db->d_op_map[op].begin(), db->d_op_map[op].end());
+ if(Debug.isOn("efficient-e-match-stats")){
+ Debug("efficient-e-match-stats") << "pattern " << pats << " initialized with " << ele.size() << " terms"<< std::endl;
+ }
+ handler.addMonoCandidate(ele, 0);
+ }
+ }
+ Debug("efficient-e-match") << "Done." << std::endl;
+}
+
+void EfficientEMatcher::outputEqClass( const char* c, Node n ){
+ if( getEqualityEngine()->hasTerm( n ) ){
+ eq::EqClassIterator eqc_iter( getEqualityEngine()->getRepresentative( n ),
+ getEqualityEngine() );
+ bool firstTime = true;
+ while( !eqc_iter.isFinished() ){
+ if( !firstTime ){ Debug(c) << ", "; }
+ Debug(c) << (*eqc_iter);
+ firstTime = false;
+ eqc_iter++;
+ }
+ }else{
+ Debug(c) << n;
+ }
+}
+
+void EfficientEMatcher::outputIps( const char* c, Ips& ips ){
+ for( int i=0; i<(int)ips.size(); i++ ){
+ if( i>0 ){ Debug( c ) << "."; }
+ Debug( c ) << ips[i].first << "." << ips[i].second;
+ }
+}
+
+
+} /* namespace theory */
+} /* namespace cvc4 */
diff --git a/src/theory/rewriterules/efficient_e_matching.h b/src/theory/rewriterules/efficient_e_matching.h
index 2f0a07184..11c6b783e 100755..100644
--- a/src/theory/rewriterules/efficient_e_matching.h
+++ b/src/theory/rewriterules/efficient_e_matching.h
@@ -1,450 +1,450 @@
-/********************* */
-/*! \file efficient_e_matching.h
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: bobot
- ** Minor contributors (to current version): mdeters
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief efficient e-matching
- **/
-
-#include "cvc4_private.h"
-
-#ifndef __CVC4__EFFICIENT_E_MATCHING_H
-#define __CVC4__EFFICIENT_E_MATCHING_H
-
-#include "expr/node.h"
-#include "context/context.h"
-#include "context/context_mm.h"
-#include "context/cdchunk_list.h"
-
-#include "util/statistics_registry.h"
-#include "util/ntuple.h"
-#include "context/cdqueue.h"
-#include "context/cdo.h"
-
-#include "theory/uf/equality_engine.h"
-
-namespace CVC4 {
-namespace theory {
-
-class QuantifiersEngine;
-
-namespace quantifiers{
- class TermDb;
-}
-
-class EfficientEMatcher;
-class HandlerPcDispatcher;
-class HandlerPpDispatcher;
-
-typedef std::set<Node> SetNode;
-
-template<class T>
-class CleanUpPointer{
-public:
- inline void operator()(T** e){
- delete(*e);
- };
-};
-
-class EfficientHandler{
-public:
- typedef std::pair< Node, size_t > MonoCandidate;
- typedef std::pair< MonoCandidate, MonoCandidate > MultiCandidate;
- typedef std::pair< SetNode, size_t > MonoCandidates;
- typedef std::pair< MonoCandidates, MonoCandidates > MultiCandidates;
-private:
- /* Queue of candidates */
- typedef context::CDQueue< MonoCandidates *, CleanUpPointer<MonoCandidates> > MonoCandidatesQueue;
- typedef context::CDQueue< MultiCandidates *, CleanUpPointer<MultiCandidates> > MultiCandidatesQueue;
- MonoCandidatesQueue d_monoCandidates;
- typedef SetNode::iterator SetNodeIter;
- context::CDO<SetNodeIter> d_si;
- context::CDO<bool> d_mono_not_first;
-
- MonoCandidatesQueue d_monoCandidatesNewTerm;
- context::CDO<SetNodeIter> d_si_new_term;
- context::CDO<bool> d_mono_not_first_new_term;
-
-
- MultiCandidatesQueue d_multiCandidates;
- context::CDO<SetNodeIter> d_si1;
- context::CDO<SetNodeIter> d_si2;
- context::CDO<bool> d_multi_not_first;
-
-
- friend class EfficientEMatcher;
- friend class HandlerPcDispatcher;
- friend class HandlerPpDispatcher;
- friend class HandlerNewTermDispatcher;
-protected:
- void addMonoCandidate(SetNode & s, size_t index){
- Assert(!s.empty());
- d_monoCandidates.push(new MonoCandidates(s,index));
- }
- void addMonoCandidateNewTerm(SetNode & s, size_t index){
- Assert(!s.empty());
- d_monoCandidatesNewTerm.push(new MonoCandidates(s,index));
- }
- void addMultiCandidate(SetNode & s1, size_t index1, SetNode & s2, size_t index2){
- Assert(!s1.empty() && !s2.empty());
- d_multiCandidates.push(new MultiCandidates(MonoCandidates(s1,index1),
- MonoCandidates(s2,index2)));
- }
-public:
- EfficientHandler(context::Context * c):
- //false for d_mono_not_first beacause its the default constructor
- d_monoCandidates(c), d_si(c), d_mono_not_first(c,false),
- d_monoCandidatesNewTerm(c), d_si_new_term(c),
- d_mono_not_first_new_term(c,false),
- d_multiCandidates(c) , d_si1(c), d_si2(c), d_multi_not_first(c,false) {};
-
- bool getNextMonoCandidate(MonoCandidate & candidate){
- if(d_monoCandidates.empty()) return false;
- const MonoCandidates * front = d_monoCandidates.front();
- SetNodeIter si_tmp;
- if(!d_mono_not_first){
- Assert(front->first.begin() != front->first.end());
- d_mono_not_first = true;
- si_tmp=front->first.begin();
- }else{
- si_tmp = d_si;
- ++si_tmp;
- };
- if(si_tmp != front->first.end()){
- candidate.first = (*si_tmp);
- candidate.second = front->second;
- d_si = si_tmp;
- Debug("efficienthandler") << "Mono produces " << candidate.first << " for " << candidate.second << std::endl;
- return true;
- };
- d_monoCandidates.pop();
- d_mono_not_first = false;
- return getNextMonoCandidate(candidate);
- };
-
- bool getNextMonoCandidateNewTerm(MonoCandidate & candidate){
- if(d_monoCandidatesNewTerm.empty()) return false;
- const MonoCandidates * front = d_monoCandidatesNewTerm.front();
- SetNodeIter si_tmp;
- if(!d_mono_not_first_new_term){
- Assert(front->first.begin() != front->first.end());
- d_mono_not_first_new_term = true;
- si_tmp=front->first.begin();
- }else{
- si_tmp = d_si_new_term;
- ++si_tmp;
- };
- if(si_tmp != front->first.end()){
- candidate.first = (*si_tmp);
- candidate.second = front->second;
- d_si_new_term = si_tmp;
- Debug("efficienthandler") << "Mono produces " << candidate.first << " for " << candidate.second << std::endl;
- return true;
- };
- d_monoCandidatesNewTerm.pop();
- d_mono_not_first_new_term = false;
- return getNextMonoCandidateNewTerm(candidate);
- };
-
- bool getNextMultiCandidate(MultiCandidate & candidate){
- if(d_multiCandidates.empty()) return false;
- const MultiCandidates* front = d_multiCandidates.front();
- SetNodeIter si1_tmp;
- SetNodeIter si2_tmp;
- if(!d_multi_not_first){
- Assert(front->first.first.begin() != front->first.first.end());
- Assert(front->second.first.begin() != front->second.first.end());
- si1_tmp = front->first.first.begin();
- si2_tmp = front->second.first.begin();
- }else{
- si1_tmp = d_si1;
- si2_tmp = d_si2;
- ++si2_tmp;
- };
- if(si2_tmp != front->second.first.end()){
- candidate.first.first = *si1_tmp;
- candidate.first.second = front->first.second;
- candidate.second.first = *si2_tmp;
- candidate.second.second = front->second.second;
- if(!d_multi_not_first){d_si1 = si1_tmp; d_multi_not_first = true; };
- d_si2 = si2_tmp;
- Debug("efficienthandler") << "Multi1 produces "
- << candidate.first.first << " for "
- << candidate.first.second << " and "
- << candidate.second.first << " for "
- << candidate.second.second << " and "
- << std::endl;
- return true;
- }; // end of the second set
- si2_tmp = front->second.first.begin();
- ++si1_tmp;
- if(si1_tmp != front->first.first.end()){
- candidate.first.first = *si1_tmp;
- candidate.first.second = front->first.second;
- candidate.second.first = *si2_tmp;
- candidate.second.second = front->second.second;
- d_si1 = si1_tmp;
- d_si2 = si2_tmp;
- Debug("efficienthandler") << "Multi2 produces "
- << candidate.first.first << " for "
- << candidate.first.second << " and "
- << candidate.second.first << " for "
- << candidate.second.second << " and "
- << std::endl;
- return true;
- }; // end of the first set
- d_multiCandidates.pop();
- d_multi_not_first = false;
- return getNextMultiCandidate(candidate);
- }
-};
-
-class PcDispatcher{
-public:
- virtual ~PcDispatcher(){};
- /* Send the node to the dispatcher */
- virtual void send(SetNode & s) = 0;
-};
-
-
-class HandlerPcDispatcher: public PcDispatcher{
- EfficientHandler* d_handler;
- size_t d_index;
-public:
- HandlerPcDispatcher(EfficientHandler* handler, size_t index):
- d_handler(handler), d_index(index) {};
- void send(SetNode & s){
- d_handler->addMonoCandidate(s,d_index);
- }
-};
-
-
-/** All the dispatcher that correspond to this node */
-class NodePcDispatcher: public PcDispatcher{
-#ifdef CVC4_DEBUG
-public:
- Node pat;
-#endif/* CVC4_DEBUG*/
-private:
- std::vector<HandlerPcDispatcher> d_dis;
-public:
- void send(SetNode & s){
- Assert(!s.empty());
- for(std::vector<HandlerPcDispatcher>::iterator i = d_dis.begin(), end = d_dis.end();
- i != end; ++i){
- (*i).send(s);
- }
- }
- void addPcDispatcher(EfficientHandler* handler, size_t index){
- d_dis.push_back(HandlerPcDispatcher(handler,index));
- }
-};
-
-
-class HandlerNewTermDispatcher: public PcDispatcher{
- EfficientHandler* d_handler;
- size_t d_index;
-public:
- HandlerNewTermDispatcher(EfficientHandler* handler, size_t index):
- d_handler(handler), d_index(index) {};
- void send(SetNode & s){
- d_handler->addMonoCandidateNewTerm(s,d_index);
- }
-};
-
-/** All the dispatcher that correspond to this node */
-class NodeNewTermDispatcher: public PcDispatcher{
-#ifdef CVC4_DEBUG
-public:
- Node pat;
-#endif/* CVC4_DEBUG*/
-private:
- std::vector<HandlerNewTermDispatcher> d_dis;
-public:
- void send(SetNode & s){
- Assert(!s.empty());
- for(std::vector<HandlerNewTermDispatcher>::iterator i = d_dis.begin(), end = d_dis.end();
- i != end; ++i){
- (*i).send(s);
- }
- }
- void addNewTermDispatcher(EfficientHandler* handler, size_t index){
- d_dis.push_back(HandlerNewTermDispatcher(handler,index));
- }
-};
-
-class PpDispatcher{
-public:
- virtual ~PpDispatcher(){};
- /* Send the node to the dispatcher */
- virtual void send(SetNode & s1, SetNode & s2, SetNode & sinter) = 0;
-};
-
-
-class HandlerPpDispatcher: public PpDispatcher{
- EfficientHandler* d_handler;
- size_t d_index1;
- size_t d_index2;
-public:
- HandlerPpDispatcher(EfficientHandler* handler, size_t index1, size_t index2):
- d_handler(handler), d_index1(index1), d_index2(index2) {};
- void send(SetNode & s1, SetNode & s2, SetNode & sinter){
- if(d_index1 == d_index2){
- if(!sinter.empty())
- d_handler->addMonoCandidate(sinter,d_index1);
- }else{
- d_handler->addMultiCandidate(s1,d_index1,s2,d_index2);
- }
- }
-};
-
-
-/** All the dispatcher that correspond to this node */
-class NodePpDispatcher: public PpDispatcher{
-#ifdef CVC4_DEBUG
-public:
- Node pat1;
- Node pat2;
-#endif/* CVC4_DEBUG */
-private:
- std::vector<HandlerPpDispatcher> d_dis;
- void send(SetNode & s1, SetNode & s2, SetNode & inter){
- for(std::vector<HandlerPpDispatcher>::iterator i = d_dis.begin(), end = d_dis.end();
- i != end; ++i){
- (*i).send(s1,s2,inter);
- }
- }
-public:
- void send(SetNode & s1, SetNode & s2){
- // can be done in HandlerPpDispatcher lazily
- Assert(!s1.empty() && !s2.empty());
- SetNode inter;
- std::set_intersection( s1.begin(), s1.end(), s2.begin(), s2.end(),
- std::inserter( inter, inter.begin() ) );
- send(s1,s2,inter);
- }
- void addPpDispatcher(EfficientHandler* handler, size_t index1, size_t index2){
- d_dis.push_back(HandlerPpDispatcher(handler,index1,index2));
- }
-};
-
-//equivalence class info
-class EqClassInfo
-{
-public:
- typedef context::CDHashMap<Node, bool, NodeHashFunction> BoolMap;
- typedef context::CDChunkList<Node> NodeList;
-public:
- //a list of operators that occur as top symbols in this equivalence class
- // Efficient E-Matching for SMT Solvers: "funs"
- BoolMap d_funs;
- //a list of operators f for which a term of the form f( ... t ... ) exists
- // Efficient E-Matching for SMT Solvers: "pfuns"
- BoolMap d_pfuns;
- //a list of equivalence classes that are disequal
- BoolMap d_disequal;
-public:
- EqClassInfo( context::Context* c );
- ~EqClassInfo(){}
- //set member
- void setMember( Node n, quantifiers::TermDb* db );
- //has function "funs"
- bool hasFunction( Node op );
- //has parent "pfuns"
- bool hasParent( Node op );
- //merge with another eq class info
- void merge( EqClassInfo* eci );
-};
-
-class EfficientEMatcher{
-protected:
- /** reference to the quantifiers engine */
- QuantifiersEngine* d_quantEngine;
-public:
- EfficientEMatcher(CVC4::theory::QuantifiersEngine* qe);
- ~EfficientEMatcher() {
- for(std::map< Node, std::pair<NodePcDispatcher*, NodePpDispatcher*> >::iterator
- i = d_pat_cand_gens.begin(), end = d_pat_cand_gens.end();
- i != end; i++){
- delete(i->second.first);
- delete(i->second.second);
- }
- }
- /** get equality engine we are using */
- eq::EqualityEngine* getEqualityEngine();
-private:
- //information for each equivalence class
- std::map< Node, EqClassInfo* > d_eqc_ops;
-public:
- /** new node */
- void newEqClass( TNode n );
- /** merge */
- void merge( TNode a, TNode b );
- /** assert terms are disequal */
- void assertDisequal( TNode a, TNode b, TNode reason );
- /** get equivalence class info */
- EqClassInfo* getEquivalenceClassInfo( Node n );
- EqClassInfo* getOrCreateEquivalenceClassInfo( Node n );
- typedef std::vector< std::pair< Node, int > > Ips;
- typedef std::map< Node, std::vector< std::pair< Node, Ips > > > PpIpsMap;
- typedef std::map< Node, std::vector< triple< size_t, Node, Ips > > > MultiPpIpsMap;
-private:
- /** Parent/Child Pairs (for efficient E-matching)
- So, for example, if we have the pattern f( g( x ) ), then d_pc_pairs[g][f][f( g( x ) )] = { f.0 }.
- */
- std::map< Node, std::map< Node, std::vector< std::pair< NodePcDispatcher*, Ips > > > > d_pc_pairs;
- /** Parent/Parent Pairs (for efficient E-matching) */
- std::map< Node, std::map< Node, std::vector< triple< NodePpDispatcher*, Ips, Ips > > > > d_pp_pairs;
- /** Constants/Child Pairs
- So, for example, if we have the pattern f( x ) = c, then d_pc_pairs[f][c] = ..., pcdispatcher, ...
- */
- //TODO constant in pattern can use the same thing just add an Ips
- std::map< Node, std::map< Node, NodePcDispatcher* > > d_cc_pairs;
- /** list of all candidate generators for each operator */
- std::map< Node, NodeNewTermDispatcher > d_cand_gens;
- /** list of all candidate generators for each type */
- std::map< TypeNode, NodeNewTermDispatcher > d_cand_gen_types;
- /** map from patterns to candidate generators */
- std::map< Node, std::pair<NodePcDispatcher*, NodePpDispatcher*> > d_pat_cand_gens;
- /** helper functions */
- void registerPatternElementPairs2( Node pat, Ips& ips,
- PpIpsMap & pp_ips_map, NodePcDispatcher* npc);
- void registerPatternElementPairs( Node pat, PpIpsMap & pp_ips_map,
- NodePcDispatcher* npc, NodePpDispatcher* npp);
- /** find the pp-pair between pattern inside multi-pattern*/
- void combineMultiPpIpsMap(PpIpsMap & pp_ips_map, MultiPpIpsMap & multi_pp_ips_map,
- EfficientHandler& eh, size_t index2,
- const std::vector<Node> & pats); //pats for debug
- /** compute candidates for pc pairs */
- void computeCandidatesPcPairs( Node a, EqClassInfo*, Node b, EqClassInfo* );
- /** compute candidates for pp pairs */
- void computeCandidatesPpPairs( Node a, EqClassInfo*, Node b, EqClassInfo* );
- /** compute candidates for cc pairs */
- void computeCandidatesConstants( Node a, EqClassInfo*, Node b, EqClassInfo* );
- /** collect terms based on inverted path string */
- void collectTermsIps( Ips& ips, SetNode& terms, int index);
- bool collectParentsTermsIps( Node n, Node f, int arg, SetNode& terms, bool addRep, bool modEq = true );
-public:
- void collectTermsIps( Ips& ips, SetNode& terms);
-public:
- void registerEfficientHandler( EfficientHandler& eh, const std::vector<Node> & pat );
-public:
- void newTerms(SetNode& s);
-public:
- /** output eq class */
- void outputEqClass( const char* c, Node n );
- /** output inverted path string */
- void outputIps( const char* c, Ips& ips );
-};/* class EfficientEMatcher */
-
-
-}/* CVC4::theory namespace */
-}/* CVC4 namespace */
-
-#endif /* __CVC4__EFFICIENT_E_MATCHING_H */
+/********************* */
+/*! \file efficient_e_matching.h
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief efficient e-matching
+ **/
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__EFFICIENT_E_MATCHING_H
+#define __CVC4__EFFICIENT_E_MATCHING_H
+
+#include "expr/node.h"
+#include "context/context.h"
+#include "context/context_mm.h"
+#include "context/cdchunk_list.h"
+
+#include "util/statistics_registry.h"
+#include "util/ntuple.h"
+#include "context/cdqueue.h"
+#include "context/cdo.h"
+
+#include "theory/uf/equality_engine.h"
+
+namespace CVC4 {
+namespace theory {
+
+class QuantifiersEngine;
+
+namespace quantifiers{
+ class TermDb;
+}
+
+class EfficientEMatcher;
+class HandlerPcDispatcher;
+class HandlerPpDispatcher;
+
+typedef std::set<Node> SetNode;
+
+template<class T>
+class CleanUpPointer{
+public:
+ inline void operator()(T** e){
+ delete(*e);
+ };
+};
+
+class EfficientHandler{
+public:
+ typedef std::pair< Node, size_t > MonoCandidate;
+ typedef std::pair< MonoCandidate, MonoCandidate > MultiCandidate;
+ typedef std::pair< SetNode, size_t > MonoCandidates;
+ typedef std::pair< MonoCandidates, MonoCandidates > MultiCandidates;
+private:
+ /* Queue of candidates */
+ typedef context::CDQueue< MonoCandidates *, CleanUpPointer<MonoCandidates> > MonoCandidatesQueue;
+ typedef context::CDQueue< MultiCandidates *, CleanUpPointer<MultiCandidates> > MultiCandidatesQueue;
+ MonoCandidatesQueue d_monoCandidates;
+ typedef SetNode::iterator SetNodeIter;
+ context::CDO<SetNodeIter> d_si;
+ context::CDO<bool> d_mono_not_first;
+
+ MonoCandidatesQueue d_monoCandidatesNewTerm;
+ context::CDO<SetNodeIter> d_si_new_term;
+ context::CDO<bool> d_mono_not_first_new_term;
+
+
+ MultiCandidatesQueue d_multiCandidates;
+ context::CDO<SetNodeIter> d_si1;
+ context::CDO<SetNodeIter> d_si2;
+ context::CDO<bool> d_multi_not_first;
+
+
+ friend class EfficientEMatcher;
+ friend class HandlerPcDispatcher;
+ friend class HandlerPpDispatcher;
+ friend class HandlerNewTermDispatcher;
+protected:
+ void addMonoCandidate(SetNode & s, size_t index){
+ Assert(!s.empty());
+ d_monoCandidates.push(new MonoCandidates(s,index));
+ }
+ void addMonoCandidateNewTerm(SetNode & s, size_t index){
+ Assert(!s.empty());
+ d_monoCandidatesNewTerm.push(new MonoCandidates(s,index));
+ }
+ void addMultiCandidate(SetNode & s1, size_t index1, SetNode & s2, size_t index2){
+ Assert(!s1.empty() && !s2.empty());
+ d_multiCandidates.push(new MultiCandidates(MonoCandidates(s1,index1),
+ MonoCandidates(s2,index2)));
+ }
+public:
+ EfficientHandler(context::Context * c):
+ //false for d_mono_not_first beacause its the default constructor
+ d_monoCandidates(c), d_si(c), d_mono_not_first(c,false),
+ d_monoCandidatesNewTerm(c), d_si_new_term(c),
+ d_mono_not_first_new_term(c,false),
+ d_multiCandidates(c) , d_si1(c), d_si2(c), d_multi_not_first(c,false) {};
+
+ bool getNextMonoCandidate(MonoCandidate & candidate){
+ if(d_monoCandidates.empty()) return false;
+ const MonoCandidates * front = d_monoCandidates.front();
+ SetNodeIter si_tmp;
+ if(!d_mono_not_first){
+ Assert(front->first.begin() != front->first.end());
+ d_mono_not_first = true;
+ si_tmp=front->first.begin();
+ }else{
+ si_tmp = d_si;
+ ++si_tmp;
+ };
+ if(si_tmp != front->first.end()){
+ candidate.first = (*si_tmp);
+ candidate.second = front->second;
+ d_si = si_tmp;
+ Debug("efficienthandler") << "Mono produces " << candidate.first << " for " << candidate.second << std::endl;
+ return true;
+ };
+ d_monoCandidates.pop();
+ d_mono_not_first = false;
+ return getNextMonoCandidate(candidate);
+ };
+
+ bool getNextMonoCandidateNewTerm(MonoCandidate & candidate){
+ if(d_monoCandidatesNewTerm.empty()) return false;
+ const MonoCandidates * front = d_monoCandidatesNewTerm.front();
+ SetNodeIter si_tmp;
+ if(!d_mono_not_first_new_term){
+ Assert(front->first.begin() != front->first.end());
+ d_mono_not_first_new_term = true;
+ si_tmp=front->first.begin();
+ }else{
+ si_tmp = d_si_new_term;
+ ++si_tmp;
+ };
+ if(si_tmp != front->first.end()){
+ candidate.first = (*si_tmp);
+ candidate.second = front->second;
+ d_si_new_term = si_tmp;
+ Debug("efficienthandler") << "Mono produces " << candidate.first << " for " << candidate.second << std::endl;
+ return true;
+ };
+ d_monoCandidatesNewTerm.pop();
+ d_mono_not_first_new_term = false;
+ return getNextMonoCandidateNewTerm(candidate);
+ };
+
+ bool getNextMultiCandidate(MultiCandidate & candidate){
+ if(d_multiCandidates.empty()) return false;
+ const MultiCandidates* front = d_multiCandidates.front();
+ SetNodeIter si1_tmp;
+ SetNodeIter si2_tmp;
+ if(!d_multi_not_first){
+ Assert(front->first.first.begin() != front->first.first.end());
+ Assert(front->second.first.begin() != front->second.first.end());
+ si1_tmp = front->first.first.begin();
+ si2_tmp = front->second.first.begin();
+ }else{
+ si1_tmp = d_si1;
+ si2_tmp = d_si2;
+ ++si2_tmp;
+ };
+ if(si2_tmp != front->second.first.end()){
+ candidate.first.first = *si1_tmp;
+ candidate.first.second = front->first.second;
+ candidate.second.first = *si2_tmp;
+ candidate.second.second = front->second.second;
+ if(!d_multi_not_first){d_si1 = si1_tmp; d_multi_not_first = true; };
+ d_si2 = si2_tmp;
+ Debug("efficienthandler") << "Multi1 produces "
+ << candidate.first.first << " for "
+ << candidate.first.second << " and "
+ << candidate.second.first << " for "
+ << candidate.second.second << " and "
+ << std::endl;
+ return true;
+ }; // end of the second set
+ si2_tmp = front->second.first.begin();
+ ++si1_tmp;
+ if(si1_tmp != front->first.first.end()){
+ candidate.first.first = *si1_tmp;
+ candidate.first.second = front->first.second;
+ candidate.second.first = *si2_tmp;
+ candidate.second.second = front->second.second;
+ d_si1 = si1_tmp;
+ d_si2 = si2_tmp;
+ Debug("efficienthandler") << "Multi2 produces "
+ << candidate.first.first << " for "
+ << candidate.first.second << " and "
+ << candidate.second.first << " for "
+ << candidate.second.second << " and "
+ << std::endl;
+ return true;
+ }; // end of the first set
+ d_multiCandidates.pop();
+ d_multi_not_first = false;
+ return getNextMultiCandidate(candidate);
+ }
+};
+
+class PcDispatcher{
+public:
+ virtual ~PcDispatcher(){};
+ /* Send the node to the dispatcher */
+ virtual void send(SetNode & s) = 0;
+};
+
+
+class HandlerPcDispatcher: public PcDispatcher{
+ EfficientHandler* d_handler;
+ size_t d_index;
+public:
+ HandlerPcDispatcher(EfficientHandler* handler, size_t index):
+ d_handler(handler), d_index(index) {};
+ void send(SetNode & s){
+ d_handler->addMonoCandidate(s,d_index);
+ }
+};
+
+
+/** All the dispatcher that correspond to this node */
+class NodePcDispatcher: public PcDispatcher{
+#ifdef CVC4_DEBUG
+public:
+ Node pat;
+#endif/* CVC4_DEBUG*/
+private:
+ std::vector<HandlerPcDispatcher> d_dis;
+public:
+ void send(SetNode & s){
+ Assert(!s.empty());
+ for(std::vector<HandlerPcDispatcher>::iterator i = d_dis.begin(), end = d_dis.end();
+ i != end; ++i){
+ (*i).send(s);
+ }
+ }
+ void addPcDispatcher(EfficientHandler* handler, size_t index){
+ d_dis.push_back(HandlerPcDispatcher(handler,index));
+ }
+};
+
+
+class HandlerNewTermDispatcher: public PcDispatcher{
+ EfficientHandler* d_handler;
+ size_t d_index;
+public:
+ HandlerNewTermDispatcher(EfficientHandler* handler, size_t index):
+ d_handler(handler), d_index(index) {};
+ void send(SetNode & s){
+ d_handler->addMonoCandidateNewTerm(s,d_index);
+ }
+};
+
+/** All the dispatcher that correspond to this node */
+class NodeNewTermDispatcher: public PcDispatcher{
+#ifdef CVC4_DEBUG
+public:
+ Node pat;
+#endif/* CVC4_DEBUG*/
+private:
+ std::vector<HandlerNewTermDispatcher> d_dis;
+public:
+ void send(SetNode & s){
+ Assert(!s.empty());
+ for(std::vector<HandlerNewTermDispatcher>::iterator i = d_dis.begin(), end = d_dis.end();
+ i != end; ++i){
+ (*i).send(s);
+ }
+ }
+ void addNewTermDispatcher(EfficientHandler* handler, size_t index){
+ d_dis.push_back(HandlerNewTermDispatcher(handler,index));
+ }
+};
+
+class PpDispatcher{
+public:
+ virtual ~PpDispatcher(){};
+ /* Send the node to the dispatcher */
+ virtual void send(SetNode & s1, SetNode & s2, SetNode & sinter) = 0;
+};
+
+
+class HandlerPpDispatcher: public PpDispatcher{
+ EfficientHandler* d_handler;
+ size_t d_index1;
+ size_t d_index2;
+public:
+ HandlerPpDispatcher(EfficientHandler* handler, size_t index1, size_t index2):
+ d_handler(handler), d_index1(index1), d_index2(index2) {};
+ void send(SetNode & s1, SetNode & s2, SetNode & sinter){
+ if(d_index1 == d_index2){
+ if(!sinter.empty())
+ d_handler->addMonoCandidate(sinter,d_index1);
+ }else{
+ d_handler->addMultiCandidate(s1,d_index1,s2,d_index2);
+ }
+ }
+};
+
+
+/** All the dispatcher that correspond to this node */
+class NodePpDispatcher: public PpDispatcher{
+#ifdef CVC4_DEBUG
+public:
+ Node pat1;
+ Node pat2;
+#endif/* CVC4_DEBUG */
+private:
+ std::vector<HandlerPpDispatcher> d_dis;
+ void send(SetNode & s1, SetNode & s2, SetNode & inter){
+ for(std::vector<HandlerPpDispatcher>::iterator i = d_dis.begin(), end = d_dis.end();
+ i != end; ++i){
+ (*i).send(s1,s2,inter);
+ }
+ }
+public:
+ void send(SetNode & s1, SetNode & s2){
+ // can be done in HandlerPpDispatcher lazily
+ Assert(!s1.empty() && !s2.empty());
+ SetNode inter;
+ std::set_intersection( s1.begin(), s1.end(), s2.begin(), s2.end(),
+ std::inserter( inter, inter.begin() ) );
+ send(s1,s2,inter);
+ }
+ void addPpDispatcher(EfficientHandler* handler, size_t index1, size_t index2){
+ d_dis.push_back(HandlerPpDispatcher(handler,index1,index2));
+ }
+};
+
+//equivalence class info
+class EqClassInfo
+{
+public:
+ typedef context::CDHashMap<Node, bool, NodeHashFunction> BoolMap;
+ typedef context::CDChunkList<Node> NodeList;
+public:
+ //a list of operators that occur as top symbols in this equivalence class
+ // Efficient E-Matching for SMT Solvers: "funs"
+ BoolMap d_funs;
+ //a list of operators f for which a term of the form f( ... t ... ) exists
+ // Efficient E-Matching for SMT Solvers: "pfuns"
+ BoolMap d_pfuns;
+ //a list of equivalence classes that are disequal
+ BoolMap d_disequal;
+public:
+ EqClassInfo( context::Context* c );
+ ~EqClassInfo(){}
+ //set member
+ void setMember( Node n, quantifiers::TermDb* db );
+ //has function "funs"
+ bool hasFunction( Node op );
+ //has parent "pfuns"
+ bool hasParent( Node op );
+ //merge with another eq class info
+ void merge( EqClassInfo* eci );
+};
+
+class EfficientEMatcher{
+protected:
+ /** reference to the quantifiers engine */
+ QuantifiersEngine* d_quantEngine;
+public:
+ EfficientEMatcher(CVC4::theory::QuantifiersEngine* qe);
+ ~EfficientEMatcher() {
+ for(std::map< Node, std::pair<NodePcDispatcher*, NodePpDispatcher*> >::iterator
+ i = d_pat_cand_gens.begin(), end = d_pat_cand_gens.end();
+ i != end; i++){
+ delete(i->second.first);
+ delete(i->second.second);
+ }
+ }
+ /** get equality engine we are using */
+ eq::EqualityEngine* getEqualityEngine();
+private:
+ //information for each equivalence class
+ std::map< Node, EqClassInfo* > d_eqc_ops;
+public:
+ /** new node */
+ void newEqClass( TNode n );
+ /** merge */
+ void merge( TNode a, TNode b );
+ /** assert terms are disequal */
+ void assertDisequal( TNode a, TNode b, TNode reason );
+ /** get equivalence class info */
+ EqClassInfo* getEquivalenceClassInfo( Node n );
+ EqClassInfo* getOrCreateEquivalenceClassInfo( Node n );
+ typedef std::vector< std::pair< Node, int > > Ips;
+ typedef std::map< Node, std::vector< std::pair< Node, Ips > > > PpIpsMap;
+ typedef std::map< Node, std::vector< triple< size_t, Node, Ips > > > MultiPpIpsMap;
+private:
+ /** Parent/Child Pairs (for efficient E-matching)
+ So, for example, if we have the pattern f( g( x ) ), then d_pc_pairs[g][f][f( g( x ) )] = { f.0 }.
+ */
+ std::map< Node, std::map< Node, std::vector< std::pair< NodePcDispatcher*, Ips > > > > d_pc_pairs;
+ /** Parent/Parent Pairs (for efficient E-matching) */
+ std::map< Node, std::map< Node, std::vector< triple< NodePpDispatcher*, Ips, Ips > > > > d_pp_pairs;
+ /** Constants/Child Pairs
+ So, for example, if we have the pattern f( x ) = c, then d_pc_pairs[f][c] = ..., pcdispatcher, ...
+ */
+ //TODO constant in pattern can use the same thing just add an Ips
+ std::map< Node, std::map< Node, NodePcDispatcher* > > d_cc_pairs;
+ /** list of all candidate generators for each operator */
+ std::map< Node, NodeNewTermDispatcher > d_cand_gens;
+ /** list of all candidate generators for each type */
+ std::map< TypeNode, NodeNewTermDispatcher > d_cand_gen_types;
+ /** map from patterns to candidate generators */
+ std::map< Node, std::pair<NodePcDispatcher*, NodePpDispatcher*> > d_pat_cand_gens;
+ /** helper functions */
+ void registerPatternElementPairs2( Node pat, Ips& ips,
+ PpIpsMap & pp_ips_map, NodePcDispatcher* npc);
+ void registerPatternElementPairs( Node pat, PpIpsMap & pp_ips_map,
+ NodePcDispatcher* npc, NodePpDispatcher* npp);
+ /** find the pp-pair between pattern inside multi-pattern*/
+ void combineMultiPpIpsMap(PpIpsMap & pp_ips_map, MultiPpIpsMap & multi_pp_ips_map,
+ EfficientHandler& eh, size_t index2,
+ const std::vector<Node> & pats); //pats for debug
+ /** compute candidates for pc pairs */
+ void computeCandidatesPcPairs( Node a, EqClassInfo*, Node b, EqClassInfo* );
+ /** compute candidates for pp pairs */
+ void computeCandidatesPpPairs( Node a, EqClassInfo*, Node b, EqClassInfo* );
+ /** compute candidates for cc pairs */
+ void computeCandidatesConstants( Node a, EqClassInfo*, Node b, EqClassInfo* );
+ /** collect terms based on inverted path string */
+ void collectTermsIps( Ips& ips, SetNode& terms, int index);
+ bool collectParentsTermsIps( Node n, Node f, int arg, SetNode& terms, bool addRep, bool modEq = true );
+public:
+ void collectTermsIps( Ips& ips, SetNode& terms);
+public:
+ void registerEfficientHandler( EfficientHandler& eh, const std::vector<Node> & pat );
+public:
+ void newTerms(SetNode& s);
+public:
+ /** output eq class */
+ void outputEqClass( const char* c, Node n );
+ /** output inverted path string */
+ void outputIps( const char* c, Ips& ips );
+};/* class EfficientEMatcher */
+
+
+}/* CVC4::theory namespace */
+}/* CVC4 namespace */
+
+#endif /* __CVC4__EFFICIENT_E_MATCHING_H */
diff --git a/src/theory/rewriterules/rr_candidate_generator.h b/src/theory/rewriterules/rr_candidate_generator.h
index 97c710219..d12c67f6a 100644
--- a/src/theory/rewriterules/rr_candidate_generator.h
+++ b/src/theory/rewriterules/rr_candidate_generator.h
@@ -32,7 +32,7 @@ typedef CVC4::theory::rrinst::CandidateGenerator CandidateGenerator;
//New CandidateGenerator. They have a simpler semantic than the old one
-// Just iterate amoung the equivalence classes
+// Just iterate among the equivalence classes
// node::Null() must be given to reset
class CandidateGeneratorTheoryEeClasses : public CandidateGenerator{
private:
@@ -54,7 +54,7 @@ public:
};
};
-// Just iterate amoung the equivalence class of the given node
+// Just iterate among the equivalence class of the given node
// node::Null() *can't* be given to reset
class CandidateGeneratorTheoryEeClass : public CandidateGenerator{
private:
diff --git a/src/theory/rewriterules/rr_inst_match.h b/src/theory/rewriterules/rr_inst_match.h
index 63728a95b..636a4dbc1 100644
--- a/src/theory/rewriterules/rr_inst_match.h
+++ b/src/theory/rewriterules/rr_inst_match.h
@@ -180,7 +180,7 @@ public:
/** If reset, or getNextMatch return false they remove from the
InstMatch the binding that they have previously created */
- /** virtual Matcher in order to have definned behavior */
+ /** virtual Matcher in order to have defined behavior */
virtual ~Matcher(){};
};
@@ -195,7 +195,7 @@ private:
std::vector< triple< Matcher*, size_t, EqualityQuery* > > d_childrens;
/** the variable that have been set by this matcher (during its own reset) */
std::vector< TNode > d_binded; /* TNode because the variable are already in d_pattern */
- /** the representant of the argument of the term given by the last reset */
+ /** the representative of the argument of the term given by the last reset */
std::vector< Node > d_reps;
public:
/** The pattern we are producing matches for */
@@ -250,7 +250,7 @@ public:
PatsMatcher* mkPatterns( std::vector< Node > pat, QuantifiersEngine* qe );
PatsMatcher* mkPatternsEfficient( std::vector< Node > pat, QuantifiersEngine* qe );
-/** return true if whatever Node is subsituted for the variables the
+/** return true if whatever Node is substituted for the variables the
given Node can't match the pattern */
bool nonunifiable( TNode t, TNode pat, const std::vector<Node> & vars);
diff --git a/src/theory/rewriterules/rr_trigger.h b/src/theory/rewriterules/rr_trigger.h
index 7be5d1507..f11d6ed66 100644
--- a/src/theory/rewriterules/rr_trigger.h
+++ b/src/theory/rewriterules/rr_trigger.h
@@ -100,6 +100,7 @@ public:
static inline bool isAtomicTrigger( TNode n ){
return
n.getKind()==kind::APPLY_UF ||
+ n.getKind() == kind::APPLY_CONSTRUCTOR ||
n.getKind()==kind::SELECT ||
n.getKind()==kind::STORE;
}
diff --git a/src/theory/substitutions.cpp b/src/theory/substitutions.cpp
index 0cc64e403..8858cc34b 100644
--- a/src/theory/substitutions.cpp
+++ b/src/theory/substitutions.cpp
@@ -27,12 +27,11 @@ struct substitution_stack_element {
bool children_added;
substitution_stack_element(TNode node)
: node(node), children_added(false) {}
-};
-
+};/* struct substitution_stack_element */
Node SubstitutionMap::internalSubstitute(TNode t) {
- Debug("substitution::internal") << "SubstitutionMap::internalSubstitute(" << t << ")" << std::endl;
+ Debug("substitution::internal") << "SubstitutionMap::internalSubstitute(" << t << ")" << endl;
if (d_substitutions.empty()) {
return t;
@@ -48,7 +47,7 @@ Node SubstitutionMap::internalSubstitute(TNode t) {
substitution_stack_element& stackHead = toVisit.back();
TNode current = stackHead.node;
- Debug("substitution::internal") << "SubstitutionMap::internalSubstitute(" << t << "): processing " << current << std::endl;
+ Debug("substitution::internal") << "SubstitutionMap::internalSubstitute(" << t << "): processing " << current << endl;
// If node already in the cache we're done, pop from the stack
NodeCache::iterator find = d_substitutionCache.find(current);
@@ -57,6 +56,14 @@ Node SubstitutionMap::internalSubstitute(TNode t) {
continue;
}
+ if (!d_substituteUnderQuantifiers &&
+ (current.getKind() == kind::FORALL || current.getKind() == kind::EXISTS)) {
+ Debug("substitution::internal") << "--not substituting under quantifier" << endl;
+ d_substitutionCache[current] = current;
+ toVisit.pop_back();
+ continue;
+ }
+
NodeMap::iterator find2 = d_substitutions.find(current);
if (find2 != d_substitutions.end()) {
Node rhs = (*find2).second;
@@ -98,7 +105,7 @@ Node SubstitutionMap::internalSubstitute(TNode t) {
}
}
}
- Debug("substitution::internal") << "SubstitutionMap::internalSubstitute(" << t << "): setting " << current << " -> " << result << std::endl;
+ Debug("substitution::internal") << "SubstitutionMap::internalSubstitute(" << t << "): setting " << current << " -> " << result << endl;
d_substitutionCache[current] = result;
toVisit.pop_back();
} else {
@@ -123,7 +130,7 @@ Node SubstitutionMap::internalSubstitute(TNode t) {
}
} else {
// No children, so we're done
- Debug("substitution::internal") << "SubstitutionMap::internalSubstitute(" << t << "): setting " << current << " -> " << current << std::endl;
+ Debug("substitution::internal") << "SubstitutionMap::internalSubstitute(" << t << "): setting " << current << " -> " << current << endl;
d_substitutionCache[current] = current;
toVisit.pop_back();
}
@@ -132,7 +139,7 @@ Node SubstitutionMap::internalSubstitute(TNode t) {
// Return the substituted version
return d_substitutionCache[t];
-}
+}/* SubstitutionMap::internalSubstitute() */
/*
@@ -258,7 +265,7 @@ void SubstitutionMap::processWorklist(vector<pair<Node, Node> >& equalities, boo
void SubstitutionMap::addSubstitution(TNode x, TNode t, bool invalidateCache)
{
- Debug("substitution") << "SubstitutionMap::addSubstitution(" << x << ", " << t << ")" << std::endl;
+ Debug("substitution") << "SubstitutionMap::addSubstitution(" << x << ", " << t << ")" << endl;
Assert(d_substitutions.find(x) == d_substitutions.end());
// this causes a later assert-fail (the rhs != current one, above) anyway
@@ -280,32 +287,32 @@ static bool check(TNode node, const SubstitutionMap::NodeMap& substitutions) CVC
static bool check(TNode node, const SubstitutionMap::NodeMap& substitutions) {
SubstitutionMap::NodeMap::const_iterator it = substitutions.begin();
SubstitutionMap::NodeMap::const_iterator it_end = substitutions.end();
- Debug("substitution") << "checking " << node << std::endl;
+ Debug("substitution") << "checking " << node << endl;
for (; it != it_end; ++ it) {
- Debug("substitution") << "-- hasSubterm( " << (*it).first << " ) ?" << std::endl;
+ Debug("substitution") << "-- hasSubterm( " << (*it).first << " ) ?" << endl;
if (node.hasSubterm((*it).first)) {
- Debug("substitution") << "-- FAIL" << std::endl;
+ Debug("substitution") << "-- FAIL" << endl;
return false;
}
}
- Debug("substitution") << "-- SUCCEED" << std::endl;
+ Debug("substitution") << "-- SUCCEED" << endl;
return true;
}
Node SubstitutionMap::apply(TNode t) {
- Debug("substitution") << "SubstitutionMap::apply(" << t << ")" << std::endl;
+ Debug("substitution") << "SubstitutionMap::apply(" << t << ")" << endl;
// Setup the cache
if (d_cacheInvalidated) {
d_substitutionCache.clear();
d_cacheInvalidated = false;
- Debug("substitution") << "-- reset the cache" << std::endl;
+ Debug("substitution") << "-- reset the cache" << endl;
}
// Perform the substitution
Node result = internalSubstitute(t);
- Debug("substitution") << "SubstitutionMap::apply(" << t << ") => " << result << std::endl;
+ Debug("substitution") << "SubstitutionMap::apply(" << t << ") => " << result << endl;
// Assert(check(result, d_substitutions));
diff --git a/src/theory/substitutions.h b/src/theory/substitutions.h
index 31a6b9141..a199256e7 100644
--- a/src/theory/substitutions.h
+++ b/src/theory/substitutions.h
@@ -62,6 +62,9 @@ private:
/** Cache of the already performed substitutions */
NodeCache d_substitutionCache;
+ /** Whether or not to substitute under quantifiers */
+ bool d_substituteUnderQuantifiers;
+
/** Has the cache been invalidated? */
bool d_cacheInvalidated;
@@ -95,10 +98,11 @@ private:
public:
- SubstitutionMap(context::Context* context) :
+ SubstitutionMap(context::Context* context, bool substituteUnderQuantifiers = true) :
d_context(context),
d_substitutions(context),
d_substitutionCache(),
+ d_substituteUnderQuantifiers(substituteUnderQuantifiers),
d_cacheInvalidated(false),
d_cacheInvalidator(context, d_cacheInvalidated) {
}
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp
index 35ed63bed..f7f689850 100644
--- a/src/theory/theory_engine.cpp
+++ b/src/theory/theory_engine.cpp
@@ -286,7 +286,9 @@ void TheoryEngine::check(Theory::Effort effort) {
#endif
#define CVC4_FOR_EACH_THEORY_STATEMENT(THEORY) \
if (theory::TheoryTraits<THEORY>::hasCheck && d_logicInfo.isTheoryEnabled(THEORY)) { \
+Debug("theory") << "check<" << THEORY << ">" << std::endl; \
theoryOf(THEORY)->check(effort); \
+Debug("theory") << "done<" << THEORY << ">" << std::endl; \
if (d_inConflict) { \
break; \
} \
@@ -726,16 +728,6 @@ theory::Theory::PPAssertStatus TheoryEngine::solve(TNode literal, SubstitutionMa
Theory::PPAssertStatus solveStatus = theoryOf(atom)->ppAssert(literal, substitutionOut);
Trace("theory::solve") << "TheoryEngine::solve(" << literal << ") => " << solveStatus << endl;
- //must add substitutions to model
- theory::TheoryModel* m = getModel();
- if( m ){
- for( SubstitutionMap::iterator pos = substitutionOut.begin(); pos != substitutionOut.end(); ++pos) {
- Node n = (*pos).first;
- Node v = (*pos).second;
- Trace("model") << "Add substitution : " << n << " " << v << std::endl;
- m->addSubstitution( n, v );
- }
- }
return solveStatus;
}
@@ -817,7 +809,7 @@ Node TheoryEngine::preprocess(TNode assertion) {
stringstream ss;
ss << "The logic was specified as " << d_logicInfo.getLogicString()
<< ", which doesn't include " << Theory::theoryOf(current)
- << ", but got a preprocesing-time fact for that theory." << endl
+ << ", but got a preprocessing-time fact for that theory." << endl
<< "The fact:" << endl
<< current;
throw LogicException(ss.str());
diff --git a/src/theory/theory_engine.h b/src/theory/theory_engine.h
index 27371eac3..a3779f0e8 100644
--- a/src/theory/theory_engine.h
+++ b/src/theory/theory_engine.h
@@ -41,6 +41,7 @@
#include "util/hash.h"
#include "util/cache.h"
#include "util/cvc4_assert.h"
+#include "util/sort_inference.h"
#include "theory/ite_simplifier.h"
#include "theory/unconstrained_simplifier.h"
#include "theory/uf/equality_engine.h"
@@ -268,7 +269,7 @@ class TheoryEngine {
void safePoint() throw(theory::Interrupted, AssertionException) {
if (d_engine->d_interrupted)
throw theory::Interrupted();
- }
+ }
void conflict(TNode conflictNode) throw(AssertionException) {
Trace("theory::conflict") << "EngineOutputChannel<" << d_theory << ">::conflict(" << conflictNode << ")" << std::endl;
@@ -422,6 +423,9 @@ class TheoryEngine {
RemoveITE& d_iteRemover;
+ /** sort inference module */
+ SortInference d_sortInfer;
+
/** Time spent in theory combination */
TimerStat d_combineTheoriesTime;
@@ -732,24 +736,28 @@ public:
SharedTermsDatabase* getSharedTermsDatabase() { return &d_sharedTerms; }
+ SortInference* getSortInference() { return &d_sortInfer; }
private:
std::map< std::string, std::vector< theory::Theory* > > d_attr_handle;
public:
- /** Set user attribute
- * This function is called when an attribute is set by a user. In SMT-LIBv2 this is done
- * via the syntax (! n :attr)
- */
+ /**
+ * Set user attribute.
+ * This function is called when an attribute is set by a user. In SMT-LIBv2 this is done
+ * via the syntax (! n :attr)
+ */
void setUserAttribute(const std::string& attr, Node n);
- /** Handle user attribute
- * Associates theory t with the attribute attr. Theory t will be
- * notifed whenever an attribute of name attr is set.
- */
+ /**
+ * Handle user attribute.
+ * Associates theory t with the attribute attr. Theory t will be
+ * notified whenever an attribute of name attr is set.
+ */
void handleUserAttribute(const char* attr, theory::Theory* t);
- /** Check that the theory assertions are satisfied in the model
- * This function is called from the smt engine's checkModel routine
+ /**
+ * Check that the theory assertions are satisfied in the model.
+ * This function is called from the smt engine's checkModel routine.
*/
void checkTheoryAssertionsWithModel();
diff --git a/src/theory/uf/options b/src/theory/uf/options
index 2569ccbff..33d1255ef 100644
--- a/src/theory/uf/options
+++ b/src/theory/uf/options
@@ -25,6 +25,10 @@ option ufssAbortCardinality --uf-ss-abort-card=N int :default -1
option ufssSmartSplits --uf-ss-smart-split bool :default false
use smart splitting heuristic for uf strong solver
option ufssExplainedCliques --uf-ss-explained-cliques bool :default false
- add explained clique lemmas for uf strong solver
+ use explained clique lemmas for uf strong solver
+option ufssSimpleCliques --uf-ss-simple-cliques bool :default true
+ always use simple clique lemmas for uf strong solver
+option ufssDiseqPropagation --uf-ss-deq-prop bool :default false
+ eagerly propagate disequalities for uf strong solver
endmodule
diff --git a/src/theory/uf/theory_uf.cpp b/src/theory/uf/theory_uf.cpp
index 3f033f3b8..bdbb79195 100644
--- a/src/theory/uf/theory_uf.cpp
+++ b/src/theory/uf/theory_uf.cpp
@@ -33,7 +33,7 @@ TheoryUF::TheoryUF(context::Context* c, context::UserContext* u, OutputChannel&
d_notify(*this),
/* The strong theory solver can be notified by EqualityEngine::init(),
* so make sure it's initialized first. */
- d_thss(options::finiteModelFind() ? new StrongSolverTheoryUf(c, u, out, this) : NULL),
+ d_thss(options::finiteModelFind() ? new StrongSolverTheoryUF(c, u, out, this) : NULL),
d_equalityEngine(d_notify, c, "theory::uf::TheoryUF"),
d_conflict(c, false),
d_literalsToPropagate(c),
@@ -101,12 +101,10 @@ void TheoryUF::check(Effort level) {
}
- if (d_thss != NULL) {
- if (! d_conflict) {
- d_thss->check(level);
- if( d_thss->isConflict() ){
- d_conflict = true;
- }
+ if (d_thss != NULL && ! d_conflict) {
+ d_thss->check(level);
+ if( d_thss->isConflict() ){
+ d_conflict = true;
}
}
diff --git a/src/theory/uf/theory_uf.h b/src/theory/uf/theory_uf.h
index fe1fc5137..00e270bd0 100644
--- a/src/theory/uf/theory_uf.h
+++ b/src/theory/uf/theory_uf.h
@@ -35,11 +35,11 @@ namespace theory {
namespace uf {
class UfTermDb;
-class StrongSolverTheoryUf;
+class StrongSolverTheoryUF;
class TheoryUF : public Theory {
- friend class StrongSolverTheoryUf;
+ friend class StrongSolverTheoryUF;
public:
@@ -116,7 +116,7 @@ private:
NotifyClass d_notify;
/** The associated theory strong solver (or NULL if none) */
- StrongSolverTheoryUf* d_thss;
+ StrongSolverTheoryUF* d_thss;
/** Equaltity engine */
eq::EqualityEngine d_equalityEngine;
@@ -212,7 +212,7 @@ public:
return &d_equalityEngine;
}
- StrongSolverTheoryUf* getStrongSolver() {
+ StrongSolverTheoryUF* getStrongSolver() {
return d_thss;
}
diff --git a/src/theory/uf/theory_uf_strong_solver.cpp b/src/theory/uf/theory_uf_strong_solver.cpp
index 46ac5aa60..25cb8b66c 100644
--- a/src/theory/uf/theory_uf_strong_solver.cpp
+++ b/src/theory/uf/theory_uf_strong_solver.cpp
@@ -32,11 +32,11 @@ using namespace CVC4::context;
using namespace CVC4::theory;
using namespace CVC4::theory::uf;
-void StrongSolverTheoryUf::SortRepModel::Region::addRep( Node n ) {
+void StrongSolverTheoryUF::SortModel::Region::addRep( Node n ) {
setRep( n, true );
}
-void StrongSolverTheoryUf::SortRepModel::Region::takeNode( StrongSolverTheoryUf::SortRepModel::Region* r, Node n ){
+void StrongSolverTheoryUF::SortModel::Region::takeNode( StrongSolverTheoryUF::SortModel::Region* r, Node n ){
Assert( !hasRep( n ) );
Assert( r->hasRep( n ) );
//add representative
@@ -68,7 +68,7 @@ void StrongSolverTheoryUf::SortRepModel::Region::takeNode( StrongSolverTheoryUf:
r->setRep( n, false );
}
-void StrongSolverTheoryUf::SortRepModel::Region::combine( StrongSolverTheoryUf::SortRepModel::Region* r ){
+void StrongSolverTheoryUF::SortModel::Region::combine( StrongSolverTheoryUF::SortModel::Region* r ){
//take all nodes from r
for( std::map< Node, RegionNodeInfo* >::iterator it = r->d_nodes.begin(); it != r->d_nodes.end(); ++it ){
if( it->second->d_valid ){
@@ -100,7 +100,7 @@ void StrongSolverTheoryUf::SortRepModel::Region::combine( StrongSolverTheoryUf::
}
/** setEqual */
-void StrongSolverTheoryUf::SortRepModel::Region::setEqual( Node a, Node b ){
+void StrongSolverTheoryUF::SortModel::Region::setEqual( Node a, Node b ){
Assert( hasRep( a ) && hasRep( b ) );
//move disequalities of b over to a
for( int t=0; t<2; t++ ){
@@ -108,10 +108,15 @@ void StrongSolverTheoryUf::SortRepModel::Region::setEqual( Node a, Node b ){
for( NodeBoolMap::iterator it = del->d_disequalities.begin(); it != del->d_disequalities.end(); ++it ){
if( (*it).second ){
Node n = (*it).first;
+ //get the region that contains the endpoint of the disequality b != ...
Region* nr = d_cf->d_regions[ d_cf->d_regions_map[ n ] ];
if( !isDisequal( a, n, t ) ){
setDisequal( a, n, t, true );
nr->setDisequal( n, a, t, true );
+ //notify the disequality propagator
+ if( options::ufssDiseqPropagation() ){
+ d_cf->d_thss->getDisequalityPropagator()->assertDisequal(a, n, Node::null());
+ }
}
setDisequal( b, n, t, false );
nr->setDisequal( n, b, t, false );
@@ -122,7 +127,7 @@ void StrongSolverTheoryUf::SortRepModel::Region::setEqual( Node a, Node b ){
setRep( b, false );
}
-void StrongSolverTheoryUf::SortRepModel::Region::setDisequal( Node n1, Node n2, int type, bool valid ){
+void StrongSolverTheoryUF::SortModel::Region::setDisequal( Node n1, Node n2, int type, bool valid ){
//Debug("uf-ss-region-debug") << "set disequal " << n1 << " " << n2 << " " << type << " " << valid << std::endl;
//debugPrint("uf-ss-region-debug");
//Assert( isDisequal( n1, n2, type )!=valid );
@@ -148,10 +153,10 @@ void StrongSolverTheoryUf::SortRepModel::Region::setDisequal( Node n1, Node n2,
}
}
-void StrongSolverTheoryUf::SortRepModel::Region::setRep( Node n, bool valid ){
+void StrongSolverTheoryUF::SortModel::Region::setRep( Node n, bool valid ){
Assert( hasRep( n )!=valid );
if( valid && d_nodes.find( n )==d_nodes.end() ){
- d_nodes[n] = new RegionNodeInfo( d_cf->d_th->getSatContext() );
+ d_nodes[n] = new RegionNodeInfo( d_cf->d_thss->getSatContext() );
}
d_nodes[n]->d_valid = valid;
d_reps_size = d_reps_size + ( valid ? 1 : -1 );
@@ -172,24 +177,24 @@ void StrongSolverTheoryUf::SortRepModel::Region::setRep( Node n, bool valid ){
}
}
-bool StrongSolverTheoryUf::SortRepModel::Region::isDisequal( Node n1, Node n2, int type ){
+bool StrongSolverTheoryUF::SortModel::Region::isDisequal( Node n1, Node n2, int type ){
RegionNodeInfo::DiseqList* del = d_nodes[ n1 ]->d_disequalities[type];
return del->d_disequalities.find( n2 )!=del->d_disequalities.end() && del->d_disequalities[n2];
}
struct sortInternalDegree {
- StrongSolverTheoryUf::SortRepModel::Region* r;
+ StrongSolverTheoryUF::SortModel::Region* r;
bool operator() (Node i,Node j) { return (r->d_nodes[i]->getNumInternalDisequalities()>r->d_nodes[j]->getNumInternalDisequalities());}
};
struct sortExternalDegree {
- StrongSolverTheoryUf::SortRepModel::Region* r;
+ StrongSolverTheoryUF::SortModel::Region* r;
bool operator() (Node i,Node j) { return (r->d_nodes[i]->getNumExternalDisequalities()>r->d_nodes[j]->getNumExternalDisequalities());}
};
int gmcCount = 0;
-bool StrongSolverTheoryUf::SortRepModel::Region::getMustCombine( int cardinality ){
+bool StrongSolverTheoryUF::SortModel::Region::getMustCombine( int cardinality ){
if( options::ufssRegions() && d_total_diseq_external>=long(cardinality) ){
//The number of external disequalities is greater than or equal to cardinality.
//Thus, a clique of size cardinality+1 may exist between nodes in d_regions[i] and other regions
@@ -228,7 +233,7 @@ bool StrongSolverTheoryUf::SortRepModel::Region::getMustCombine( int cardinality
return false;
}
-bool StrongSolverTheoryUf::SortRepModel::Region::check( Theory::Effort level, int cardinality, std::vector< Node >& clique ){
+bool StrongSolverTheoryUF::SortModel::Region::check( Theory::Effort level, int cardinality, std::vector< Node >& clique ){
if( d_reps_size>long(cardinality) ){
if( d_total_diseq_internal==d_reps_size*( d_reps_size - 1 ) ){
if( d_reps_size>1 ){
@@ -317,7 +322,7 @@ bool StrongSolverTheoryUf::SortRepModel::Region::check( Theory::Effort level, in
return false;
}
-void StrongSolverTheoryUf::SortRepModel::Region::getRepresentatives( std::vector< Node >& reps ){
+void StrongSolverTheoryUF::SortModel::Region::getRepresentatives( std::vector< Node >& reps ){
for( std::map< Node, RegionNodeInfo* >::iterator it = d_nodes.begin(); it != d_nodes.end(); ++it ){
RegionNodeInfo* rni = it->second;
if( rni->d_valid ){
@@ -326,7 +331,7 @@ void StrongSolverTheoryUf::SortRepModel::Region::getRepresentatives( std::vector
}
}
-void StrongSolverTheoryUf::SortRepModel::Region::getNumExternalDisequalities( std::map< Node, int >& num_ext_disequalities ){
+void StrongSolverTheoryUF::SortModel::Region::getNumExternalDisequalities( std::map< Node, int >& num_ext_disequalities ){
for( std::map< Node, RegionNodeInfo* >::iterator it = d_nodes.begin(); it != d_nodes.end(); ++it ){
RegionNodeInfo* rni = it->second;
if( rni->d_valid ){
@@ -340,7 +345,7 @@ void StrongSolverTheoryUf::SortRepModel::Region::getNumExternalDisequalities( st
}
}
-void StrongSolverTheoryUf::SortRepModel::Region::debugPrint( const char* c, bool incClique ){
+void StrongSolverTheoryUF::SortModel::Region::debugPrint( const char* c, bool incClique ){
Debug( c ) << "Num reps: " << d_reps_size << std::endl;
for( std::map< Node, RegionNodeInfo* >::iterator it = d_nodes.begin(); it != d_nodes.end(); ++it ){
RegionNodeInfo* rni = it->second;
@@ -389,27 +394,27 @@ void StrongSolverTheoryUf::SortRepModel::Region::debugPrint( const char* c, bool
-StrongSolverTheoryUf::SortRepModel::SortRepModel( Node n, context::Context* c, TheoryUF* th ) : RepModel( n.getType() ),
- d_th( th ), d_regions_index( c, 0 ), d_regions_map( c ), d_split_score( c ), d_disequalities_index( c, 0 ),
+StrongSolverTheoryUF::SortModel::SortModel( Node n, context::Context* c, StrongSolverTheoryUF* thss ) : d_type( n.getType() ),
+ d_thss( thss ), d_regions_index( c, 0 ), d_regions_map( c ), d_split_score( c ), d_disequalities_index( c, 0 ),
d_reps( c, 0 ), d_conflict( c, false ), d_cardinality( c, 1 ), d_aloc_cardinality( 0 ),
d_cardinality_assertions( c ), d_hasCard( c, false ){
d_cardinality_term = n;
}
/** initialize */
-void StrongSolverTheoryUf::SortRepModel::initialize( OutputChannel* out ){
+void StrongSolverTheoryUF::SortModel::initialize( OutputChannel* out ){
allocateCardinality( out );
}
/** new node */
-void StrongSolverTheoryUf::SortRepModel::newEqClass( Node n ){
+void StrongSolverTheoryUF::SortModel::newEqClass( Node n ){
if( !d_conflict ){
if( d_regions_map.find( n )==d_regions_map.end() ){
if( !options::ufssTotalityLazy() ){
//must generate totality axioms for every cardinality we have allocated thus far
for( std::map< int, Node >::iterator it = d_cardinality_literal.begin(); it != d_cardinality_literal.end(); ++it ){
if( applyTotality( it->first ) ){
- addTotalityAxiom( n, it->first, &d_th->getOutputChannel() );
+ addTotalityAxiom( n, it->first, &d_thss->getOutputChannel() );
}
}
}
@@ -429,14 +434,14 @@ void StrongSolverTheoryUf::SortRepModel::newEqClass( Node n ){
if( options::ufssSmartSplits() ){
setSplitScore( n, 0 );
}
- Debug("uf-ss") << "StrongSolverTheoryUf: New Eq Class " << n << std::endl;
+ Debug("uf-ss") << "StrongSolverTheoryUF: New Eq Class " << n << std::endl;
Debug("uf-ss-debug") << d_regions_index << " " << (int)d_regions.size() << std::endl;
if( d_regions_index<d_regions.size() ){
d_regions[ d_regions_index ]->debugPrint("uf-ss-debug",true);
d_regions[ d_regions_index ]->d_valid = true;
Assert( !options::ufssRegions() || d_regions[ d_regions_index ]->getNumReps()==0 );
}else{
- d_regions.push_back( new Region( this, d_th->getSatContext() ) );
+ d_regions.push_back( new Region( this, d_thss->getSatContext() ) );
}
d_regions[ d_regions_index ]->addRep( n );
d_regions_index = d_regions_index + 1;
@@ -447,7 +452,7 @@ void StrongSolverTheoryUf::SortRepModel::newEqClass( Node n ){
}
/** merge */
-void StrongSolverTheoryUf::SortRepModel::merge( Node a, Node b ){
+void StrongSolverTheoryUF::SortModel::merge( Node a, Node b ){
if( !d_conflict ){
if( options::ufssTotality() ){
if( d_regions_map[b]==-1 ){
@@ -457,7 +462,7 @@ void StrongSolverTheoryUf::SortRepModel::merge( Node a, Node b ){
}else{
//Assert( a==d_th->d_equalityEngine.getRepresentative( a ) );
//Assert( b==d_th->d_equalityEngine.getRepresentative( b ) );
- Debug("uf-ss") << "StrongSolverTheoryUf: Merging " << a << " = " << b << "..." << std::endl;
+ Debug("uf-ss") << "StrongSolverTheoryUF: Merging " << a << " = " << b << "..." << std::endl;
if( a!=b ){
Assert( d_regions_map.find( a )!=d_regions_map.end() );
Assert( d_regions_map.find( b )!=d_regions_map.end() );
@@ -495,21 +500,25 @@ void StrongSolverTheoryUf::SortRepModel::merge( Node a, Node b ){
d_regions_map[b] = -1;
}
d_reps = d_reps - 1;
- Debug("uf-ss") << "Done merge." << std::endl;
+
+ if( options::ufssDiseqPropagation() && !d_conflict ){
+ //notify the disequality propagator
+ d_thss->getDisequalityPropagator()->merge(a, b);
+ }
}
}
}
/** assert terms are disequal */
-void StrongSolverTheoryUf::SortRepModel::assertDisequal( Node a, Node b, Node reason ){
+void StrongSolverTheoryUF::SortModel::assertDisequal( Node a, Node b, Node reason ){
if( !d_conflict ){
if( options::ufssTotality() ){
//do nothing
}else{
//if they are not already disequal
- a = d_th->d_equalityEngine.getRepresentative( a );
- b = d_th->d_equalityEngine.getRepresentative( b );
- if( !d_th->d_equalityEngine.areDisequal( a, b, true ) ){
+ a = d_thss->getTheory()->d_equalityEngine.getRepresentative( a );
+ b = d_thss->getTheory()->d_equalityEngine.getRepresentative( b );
+ if( !d_thss->getTheory()->d_equalityEngine.areDisequal( a, b, true ) ){
Debug("uf-ss") << "Assert disequal " << a << " != " << b << "..." << std::endl;
//if( reason.getKind()!=NOT || ( reason[0].getKind()!=EQUAL && reason[0].getKind()!=IFF ) ||
// a!=reason[0][0] || b!=reason[0][1] ){
@@ -533,6 +542,7 @@ void StrongSolverTheoryUf::SortRepModel::assertDisequal( Node a, Node b, Node re
//internal disequality
d_regions[ai]->setDisequal( a, b, 1, true );
d_regions[ai]->setDisequal( b, a, 1, true );
+ checkRegion( ai, false ); //do not need to check if it needs to combine (no new ext. disequalities)
}else{
//external disequality
d_regions[ai]->setDisequal( a, b, 0, true );
@@ -540,18 +550,34 @@ void StrongSolverTheoryUf::SortRepModel::assertDisequal( Node a, Node b, Node re
checkRegion( ai );
checkRegion( bi );
}
- //Notice() << "done" << std::endl;
+
+ if( options::ufssDiseqPropagation() && !d_conflict ){
+ //notify the disequality propagator
+ d_thss->getDisequalityPropagator()->assertDisequal(a, b, Node::null());
+ }
}
}
}
}
+bool StrongSolverTheoryUF::SortModel::areDisequal( Node a, Node b ) {
+ Assert( a == d_thss->getTheory()->d_equalityEngine.getRepresentative( a ) );
+ Assert( b == d_thss->getTheory()->d_equalityEngine.getRepresentative( b ) );
+ if( d_regions_map.find( a )!=d_regions_map.end() &&
+ d_regions_map.find( b )!=d_regions_map.end() ){
+ int ai = d_regions_map[a];
+ int bi = d_regions_map[b];
+ return d_regions[ai]->isDisequal(a, b, ai==bi ? 1 : 0);
+ }else{
+ return false;
+ }
+}
/** check */
-void StrongSolverTheoryUf::SortRepModel::check( Theory::Effort level, OutputChannel* out ){
+void StrongSolverTheoryUF::SortModel::check( Theory::Effort level, OutputChannel* out ){
if( level>=Theory::EFFORT_STANDARD && d_hasCard && !d_conflict ){
- Debug("uf-ss") << "StrongSolverTheoryUf: Check " << level << " " << d_type << std::endl;
- //Notice() << "StrongSolverTheoryUf: Check " << level << std::endl;
+ Debug("uf-ss") << "StrongSolverTheoryUF: Check " << level << " " << d_type << std::endl;
+ //Notice() << "StrongSolverTheoryUF: Check " << level << std::endl;
if( d_reps<=(unsigned)d_cardinality ){
Debug("uf-ss-debug") << "We have " << d_reps << " representatives for type " << d_type << ", <= " << d_cardinality << std::endl;
if( level==Theory::EFFORT_FULL ){
@@ -584,7 +610,7 @@ void StrongSolverTheoryUf::SortRepModel::check( Theory::Effort level, OutputChan
if( level==Theory::EFFORT_FULL ){
for( NodeIntMap::iterator it = d_regions_map.begin(); it != d_regions_map.end(); ++it ){
if( !options::ufssTotality() || d_regions_map[ (*it).first ]!=-1 ){
- addTotalityAxiom( (*it).first, d_cardinality, &d_th->getOutputChannel() );
+ addTotalityAxiom( (*it).first, d_cardinality, &d_thss->getOutputChannel() );
}
}
}
@@ -610,8 +636,26 @@ void StrongSolverTheoryUf::SortRepModel::check( Theory::Effort level, OutputChan
if( level==Theory::EFFORT_FULL ){
if( !addedLemma ){
Trace("uf-ss-debug") << "No splits added. " << d_cardinality << std::endl;
- if( !options::ufssColoringSat() ){
- bool recheck = false;
+ Trace("uf-ss-si") << "Must combine region" << std::endl;
+ bool recheck = false;
+ if( options::sortInference()){
+ //if sort inference is enabled, search for regions with same sort
+ std::map< int, int > sortsFound;
+ for( int i=0; i<(int)d_regions_index; i++ ){
+ if( d_regions[i]->d_valid ){
+ Node op = d_regions[i]->d_nodes.begin()->first;
+ int sort_id = d_thss->getTheory()->getQuantifiersEngine()->getTheoryEngine()->getSortInference()->getSortId(op);
+ if( sortsFound.find( sort_id )!=sortsFound.end() ){
+ combineRegions( sortsFound[sort_id], i );
+ recheck = true;
+ break;
+ }else{
+ sortsFound[sort_id] = i;
+ }
+ }
+ }
+ }
+ if( !recheck ) {
//naive strategy, force region combination involving the first valid region
for( int i=0; i<(int)d_regions_index; i++ ){
if( d_regions[i]->d_valid ){
@@ -620,9 +664,9 @@ void StrongSolverTheoryUf::SortRepModel::check( Theory::Effort level, OutputChan
break;
}
}
- if( recheck ){
- check( level, out );
- }
+ }
+ if( recheck ){
+ check( level, out );
}
}
}
@@ -631,11 +675,11 @@ void StrongSolverTheoryUf::SortRepModel::check( Theory::Effort level, OutputChan
}
}
-void StrongSolverTheoryUf::SortRepModel::propagate( Theory::Effort level, OutputChannel* out ){
+void StrongSolverTheoryUF::SortModel::propagate( Theory::Effort level, OutputChannel* out ){
}
-Node StrongSolverTheoryUf::SortRepModel::getNextDecisionRequest(){
+Node StrongSolverTheoryUF::SortModel::getNextDecisionRequest(){
//request the current cardinality as a decision literal, if not already asserted
for( int i=1; i<=d_aloc_cardinality; i++ ){
if( !d_hasCard || i<d_cardinality ){
@@ -650,7 +694,7 @@ Node StrongSolverTheoryUf::SortRepModel::getNextDecisionRequest(){
return Node::null();
}
-bool StrongSolverTheoryUf::SortRepModel::minimize( OutputChannel* out, TheoryModel* m ){
+bool StrongSolverTheoryUF::SortModel::minimize( OutputChannel* out, TheoryModel* m ){
if( options::ufssTotality() ){
//do nothing
}else{
@@ -672,7 +716,7 @@ bool StrongSolverTheoryUf::SortRepModel::minimize( OutputChannel* out, TheoryMod
out->split( splitEq );
//tell the sat solver to explore the equals branch first
out->requirePhase( splitEq, true );
- ++( d_th->getStrongSolver()->d_statistics.d_split_lemmas );
+ ++( d_thss->d_statistics.d_split_lemmas );
return false;
}
}
@@ -706,7 +750,7 @@ bool StrongSolverTheoryUf::SortRepModel::minimize( OutputChannel* out, TheoryMod
}
-int StrongSolverTheoryUf::SortRepModel::getNumDisequalitiesToRegion( Node n, int ri ){
+int StrongSolverTheoryUF::SortModel::getNumDisequalitiesToRegion( Node n, int ri ){
int ni = d_regions_map[n];
int counter = 0;
Region::RegionNodeInfo::DiseqList* del = d_regions[ni]->d_nodes[n]->d_disequalities[0];
@@ -720,7 +764,7 @@ int StrongSolverTheoryUf::SortRepModel::getNumDisequalitiesToRegion( Node n, int
return counter;
}
-void StrongSolverTheoryUf::SortRepModel::getDisequalitiesToRegions( int ri, std::map< int, int >& regions_diseq ){
+void StrongSolverTheoryUF::SortModel::getDisequalitiesToRegions( int ri, std::map< int, int >& regions_diseq ){
for( std::map< Node, Region::RegionNodeInfo* >::iterator it = d_regions[ri]->d_nodes.begin();
it != d_regions[ri]->d_nodes.end(); ++it ){
if( it->second->d_valid ){
@@ -736,7 +780,7 @@ void StrongSolverTheoryUf::SortRepModel::getDisequalitiesToRegions( int ri, std:
}
}
-void StrongSolverTheoryUf::SortRepModel::setSplitScore( Node n, int s ){
+void StrongSolverTheoryUF::SortModel::setSplitScore( Node n, int s ){
if( d_split_score.find( n )!=d_split_score.end() ){
int ss = d_split_score[ n ];
d_split_score[ n ] = s>ss ? s : ss;
@@ -748,9 +792,10 @@ void StrongSolverTheoryUf::SortRepModel::setSplitScore( Node n, int s ){
}
}
-void StrongSolverTheoryUf::SortRepModel::assertCardinality( OutputChannel* out, int c, bool val ){
+void StrongSolverTheoryUF::SortModel::assertCardinality( OutputChannel* out, int c, bool val ){
if( !d_conflict ){
- Trace("uf-ss-assert") << "Assert cardinality " << d_type << " " << c << " " << val << " level = " << d_th->d_valuation.getAssertionLevel() << std::endl;
+ Trace("uf-ss-assert") << "Assert cardinality " << d_type << " " << c << " " << val << " level = ";
+ Trace("uf-ss-assert") << d_thss->getTheory()->d_valuation.getAssertionLevel() << std::endl;
Assert( d_cardinality_literal.find( c )!=d_cardinality_literal.end() );
d_cardinality_assertions[ d_cardinality_literal[c] ] = val;
if( val ){
@@ -803,15 +848,10 @@ void StrongSolverTheoryUf::SortRepModel::assertCardinality( OutputChannel* out,
}
}
-void StrongSolverTheoryUf::SortRepModel::checkRegion( int ri, bool rec ){
+void StrongSolverTheoryUF::SortModel::checkRegion( int ri, bool checkCombine ){
if( isValid(ri) && d_hasCard ){
Assert( d_cardinality>0 );
- //first check if region is in conflict
- std::vector< Node > clique;
- if( d_regions[ri]->check( Theory::EFFORT_STANDARD, d_cardinality, clique ) ){
- //explain clique
- addCliqueLemma( clique, &d_th->getOutputChannel() );
- }else if( d_regions[ri]->getMustCombine( d_cardinality ) ){
+ if( checkCombine && d_regions[ri]->getMustCombine( d_cardinality ) ){
////alternatively, check if we can reduce the number of external disequalities by moving single nodes
//for( std::map< Node, bool >::iterator it = d_regions[i]->d_reps.begin(); it != d_regions[i]->d_reps.end(); ++it ){
// if( it->second ){
@@ -822,14 +862,20 @@ void StrongSolverTheoryUf::SortRepModel::checkRegion( int ri, bool rec ){
// }
//}
int riNew = forceCombineRegion( ri, true );
- if( riNew>=0 && rec ){
- checkRegion( riNew, rec );
+ if( riNew>=0 ){
+ checkRegion( riNew, checkCombine );
}
}
+ //now check if region is in conflict
+ std::vector< Node > clique;
+ if( d_regions[ri]->check( Theory::EFFORT_STANDARD, d_cardinality, clique ) ){
+ //explain clique
+ addCliqueLemma( clique, &d_thss->getOutputChannel() );
+ }
}
}
-int StrongSolverTheoryUf::SortRepModel::forceCombineRegion( int ri, bool useDensity ){
+int StrongSolverTheoryUF::SortModel::forceCombineRegion( int ri, bool useDensity ){
if( !useDensity ){
for( int i=0; i<(int)d_regions_index; i++ ){
if( ri!=i && d_regions[i]->d_valid ){
@@ -869,7 +915,7 @@ int StrongSolverTheoryUf::SortRepModel::forceCombineRegion( int ri, bool useDens
}
-int StrongSolverTheoryUf::SortRepModel::combineRegions( int ai, int bi ){
+int StrongSolverTheoryUF::SortModel::combineRegions( int ai, int bi ){
#ifdef COMBINE_REGIONS_SMALL_INTO_LARGE
if( d_regions[ai]->getNumReps()<d_regions[bi]->getNumReps() ){
return combineRegions( bi, ai );
@@ -889,7 +935,7 @@ int StrongSolverTheoryUf::SortRepModel::combineRegions( int ai, int bi ){
return ai;
}
-void StrongSolverTheoryUf::SortRepModel::moveNode( Node n, int ri ){
+void StrongSolverTheoryUF::SortModel::moveNode( Node n, int ri ){
Debug("uf-ss-region") << "uf-ss: Move node " << n << " to Region #" << ri << std::endl;
Assert( isValid( d_regions_map[ n ] ) );
Assert( isValid( ri ) );
@@ -898,7 +944,7 @@ void StrongSolverTheoryUf::SortRepModel::moveNode( Node n, int ri ){
d_regions_map[n] = ri;
}
-void StrongSolverTheoryUf::SortRepModel::allocateCardinality( OutputChannel* out ){
+void StrongSolverTheoryUF::SortModel::allocateCardinality( OutputChannel* out ){
if( d_aloc_cardinality>0 ){
Trace("uf-ss-fmf") << "No model of size " << d_aloc_cardinality << " exists for type " << d_type << " in this branch" << std::endl;
if( Trace.isOn("uf-ss-cliques") ){
@@ -936,7 +982,7 @@ void StrongSolverTheoryUf::SortRepModel::allocateCardinality( OutputChannel* out
//must be distinct from all other cardinality terms
for( int i=0; i<(int)(d_totality_terms[0].size()-1); i++ ){
Node lem = NodeManager::currentNM()->mkNode( NOT, var.eqNode( d_totality_terms[0][i] ) );
- d_th->getOutputChannel().lemma( lem );
+ d_thss->getOutputChannel().lemma( lem );
}
}
@@ -955,18 +1001,18 @@ void StrongSolverTheoryUf::SortRepModel::allocateCardinality( OutputChannel* out
//add the appropriate lemma, propagate as decision
//Trace("uf-ss-prop-as-dec") << "Propagate as decision " << lem[0] << " " << d_type << std::endl;
//out->propagateAsDecision( lem[0] );
- d_th->getStrongSolver()->d_statistics.d_max_model_size.maxAssign( d_aloc_cardinality );
+ d_thss->d_statistics.d_max_model_size.maxAssign( d_aloc_cardinality );
if( applyTotality( d_aloc_cardinality ) && !options::ufssTotalityLazy() ){
//must send totality axioms for each existing term
for( NodeIntMap::iterator it = d_regions_map.begin(); it != d_regions_map.end(); ++it ){
- addTotalityAxiom( (*it).first, d_aloc_cardinality, &d_th->getOutputChannel() );
+ addTotalityAxiom( (*it).first, d_aloc_cardinality, &d_thss->getOutputChannel() );
}
}
}
}
-bool StrongSolverTheoryUf::SortRepModel::addSplit( Region* r, OutputChannel* out ){
+bool StrongSolverTheoryUF::SortModel::addSplit( Region* r, OutputChannel* out ){
if( r->hasSplits() ){
Node s;
if( !options::ufssSmartSplits() ){
@@ -996,6 +1042,13 @@ bool StrongSolverTheoryUf::SortRepModel::addSplit( Region* r, OutputChannel* out
Assert( s!=Node::null() && s.getKind()==EQUAL );
s = Rewriter::rewrite( s );
Trace("uf-ss-lemma") << "*** Split on " << s << std::endl;
+ if( options::sortInference()) {
+ for( int i=0; i<2; i++ ){
+ int si = d_thss->getTheory()->getQuantifiersEngine()->getTheoryEngine()->getSortInference()->getSortId( s[i] );
+ Trace("uf-ss-split-si") << si << " ";
+ }
+ Trace("uf-ss-split-si") << std::endl;
+ }
//Trace("uf-ss-lemma") << d_th->getEqualityEngine()->areEqual( s[0], s[1] ) << " ";
//Trace("uf-ss-lemma") << d_th->getEqualityEngine()->areDisequal( s[0], s[1] ) << std::endl;
//Trace("uf-ss-lemma") << s[0].getType() << " " << s[1].getType() << std::endl;
@@ -1004,7 +1057,7 @@ bool StrongSolverTheoryUf::SortRepModel::addSplit( Region* r, OutputChannel* out
out->split( s );
//tell the sat solver to explore the equals branch first
out->requirePhase( s, true );
- ++( d_th->getStrongSolver()->d_statistics.d_split_lemmas );
+ ++( d_thss->d_statistics.d_split_lemmas );
return true;
}else{
return false;
@@ -1012,126 +1065,158 @@ bool StrongSolverTheoryUf::SortRepModel::addSplit( Region* r, OutputChannel* out
}
-void StrongSolverTheoryUf::SortRepModel::addCliqueLemma( std::vector< Node >& clique, OutputChannel* out ){
+void StrongSolverTheoryUF::SortModel::addCliqueLemma( std::vector< Node >& clique, OutputChannel* out ){
Assert( d_hasCard );
Assert( d_cardinality>0 );
while( clique.size()>size_t(d_cardinality+1) ){
clique.pop_back();
}
- if( !options::ufssExplainedCliques() ){
+ if( options::ufssSimpleCliques() && !options::ufssExplainedCliques() ){
//add as lemma
std::vector< Node > eqs;
for( int i=0; i<(int)clique.size(); i++ ){
for( int j=0; j<i; j++ ){
+ Node r1 = d_thss->getTheory()->d_equalityEngine.getRepresentative(clique[i]);
+ Node r2 = d_thss->getTheory()->d_equalityEngine.getRepresentative(clique[j]);
eqs.push_back( clique[i].eqNode( clique[j] ) );
}
}
eqs.push_back( d_cardinality_literal[ d_cardinality ].notNode() );
Node lem = NodeManager::currentNM()->mkNode( OR, eqs );
+ Trace("uf-ss-lemma") << "*** Add clique conflict " << lem << std::endl;
+ ++( d_thss->d_statistics.d_clique_lemmas );
out->lemma( lem );
- return;
- }
- //if( options::ufssModelInference() ||
- if( Trace.isOn("uf-ss-cliques") ){
- std::vector< Node > clique_vec;
- clique_vec.insert( clique_vec.begin(), clique.begin(), clique.end() );
- d_cliques[ d_cardinality ].push_back( clique_vec );
- }
-
- //found a clique
- Debug("uf-ss-cliques") << "Found a clique (cardinality=" << d_cardinality << ") :" << std::endl;
- Debug("uf-ss-cliques") << " ";
- for( int i=0; i<(int)clique.size(); i++ ){
- Debug("uf-ss-cliques") << clique[i] << " ";
- }
- Debug("uf-ss-cliques") << std::endl;
- Debug("uf-ss-cliques") << "Finding clique disequalities..." << std::endl;
- std::vector< Node > conflict;
- //collect disequalities, and nodes that must be equal within representatives
- std::map< Node, std::map< Node, bool > > explained;
- std::map< Node, std::map< Node, bool > > nodesWithinRep;
- for( int i=0; i<(int)d_disequalities_index; i++ ){
- //if both sides of disequality exist in clique
- Node r1 = d_th->d_equalityEngine.getRepresentative( d_disequalities[i][0][0] );
- Node r2 = d_th->d_equalityEngine.getRepresentative( d_disequalities[i][0][1] );
- if( r1!=r2 && ( explained.find( r1 )==explained.end() || explained[r1].find( r2 )==explained[r1].end() ) &&
- std::find( clique.begin(), clique.end(), r1 )!=clique.end() &&
- std::find( clique.begin(), clique.end(), r2 )!=clique.end() ){
- explained[r1][r2] = true;
- explained[r2][r1] = true;
- conflict.push_back( d_disequalities[i] );
- Debug("uf-ss-cliques") << " -> disequality : " << d_disequalities[i] << std::endl;
- nodesWithinRep[r1][ d_disequalities[i][0][0] ] = true;
- nodesWithinRep[r2][ d_disequalities[i][0][1] ] = true;
- if( conflict.size()==(clique.size()*( clique.size()-1 )/2) ){
- break;
+ }else{
+ //debugging information
+ if( Trace.isOn("uf-ss-cliques") ){
+ std::vector< Node > clique_vec;
+ clique_vec.insert( clique_vec.begin(), clique.begin(), clique.end() );
+ d_cliques[ d_cardinality ].push_back( clique_vec );
+ }
+ //found a clique
+ Debug("uf-ss-cliques") << "Found a clique (cardinality=" << d_cardinality << ") :" << std::endl;
+ Debug("uf-ss-cliques") << " ";
+ for( int i=0; i<(int)clique.size(); i++ ){
+ Debug("uf-ss-cliques") << clique[i] << " ";
+ }
+ Debug("uf-ss-cliques") << std::endl;
+ Debug("uf-ss-cliques") << "Finding clique disequalities..." << std::endl;
+
+ //we will scan through each of the disequaltities
+ bool isSatConflict = true;
+ std::vector< Node > conflict;
+ //collect disequalities, and nodes that must be equal within representatives
+ std::map< Node, std::map< Node, bool > > explained;
+ std::map< Node, std::map< Node, bool > > nodesWithinRep;
+ //map from the reprorted clique members to those reported in the lemma
+ std::map< Node, Node > cliqueRepMap;
+ for( int i=0; i<(int)d_disequalities_index; i++ ){
+ //if both sides of disequality exist in clique
+ Node r1 = d_thss->getTheory()->d_equalityEngine.getRepresentative( d_disequalities[i][0][0] );
+ Node r2 = d_thss->getTheory()->d_equalityEngine.getRepresentative( d_disequalities[i][0][1] );
+ if( r1!=r2 && ( explained.find( r1 )==explained.end() || explained[r1].find( r2 )==explained[r1].end() ) &&
+ std::find( clique.begin(), clique.end(), r1 )!=clique.end() &&
+ std::find( clique.begin(), clique.end(), r2 )!=clique.end() ){
+ explained[r1][r2] = true;
+ explained[r2][r1] = true;
+ if( options::ufssExplainedCliques() ){
+ conflict.push_back( d_disequalities[i] );
+ Debug("uf-ss-cliques") << " -> disequality : " << d_disequalities[i] << std::endl;
+ nodesWithinRep[r1][ d_disequalities[i][0][0] ] = true;
+ nodesWithinRep[r2][ d_disequalities[i][0][1] ] = true;
+ }else{
+ //get the terms we report in the lemma
+ Node ru1 = r1;
+ if( cliqueRepMap.find( r1 )==cliqueRepMap.end() ){
+ ru1 = d_disequalities[i][0][0];
+ cliqueRepMap[r1] = ru1;
+ }else{
+ ru1 = cliqueRepMap[r1];
+ }
+ Node ru2 = r2;
+ if( cliqueRepMap.find( r2 )==cliqueRepMap.end() ){
+ ru2 = d_disequalities[i][0][1];
+ cliqueRepMap[r2] = ru2;
+ }else{
+ ru2 = cliqueRepMap[r2];
+ }
+ if( ru1!=d_disequalities[i][0][0] || ru2!=d_disequalities[i][0][1] ){
+ //disequalities have endpoints that are not connected within an equivalence class
+ // we will be producing a lemma, introducing a new literal ru1 != ru2
+ conflict.push_back( ru1.eqNode( ru2 ).notNode() );
+ isSatConflict = false;
+ }else{
+ conflict.push_back( d_disequalities[i] );
+ }
+ }
+ if( conflict.size()==(clique.size()*( clique.size()-1 )/2) ){
+ break;
+ }
}
}
- }
- //Debug("uf-ss-cliques") << conflict.size() << " " << clique.size() << std::endl;
- Assert( (int)conflict.size()==((int)clique.size()*( (int)clique.size()-1 )/2) );
- //Assert( (int)conflict.size()==(int)clique.size()*( (int)clique.size()-1 )/2 );
- Debug("uf-ss-cliques") << "Finding clique equalities internal to eq classes..." << std::endl;
- //now, we must explain equalities within each equivalence class
- for( std::map< Node, std::map< Node, bool > >::iterator it = nodesWithinRep.begin(); it != nodesWithinRep.end(); ++it ){
- if( it->second.size()>1 ){
- Node prev;
- //add explanation of t1 = t2 = ... = tn
- Debug("uf-ss-cliques") << "Explain ";
- for( std::map< Node, bool >::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2 ){
- if( prev!=Node::null() ){
- Debug("uf-ss-cliques") << " = ";
- //explain it2->first and prev
- std::vector< TNode > expl;
- d_th->d_equalityEngine.explainEquality( it2->first, prev, true, expl );
- for( int i=0; i<(int)expl.size(); i++ ){
- if( std::find( conflict.begin(), conflict.end(), expl[i] )==conflict.end() ){
- conflict.push_back( expl[i] );
+ if( options::ufssExplainedCliques() ){
+ //Debug("uf-ss-cliques") << conflict.size() << " " << clique.size() << std::endl;
+ Assert( (int)conflict.size()==((int)clique.size()*( (int)clique.size()-1 )/2) );
+ //Assert( (int)conflict.size()==(int)clique.size()*( (int)clique.size()-1 )/2 );
+ Debug("uf-ss-cliques") << "Finding clique equalities internal to eq classes..." << std::endl;
+ //now, we must explain equalities within each equivalence class
+ for( std::map< Node, std::map< Node, bool > >::iterator it = nodesWithinRep.begin(); it != nodesWithinRep.end(); ++it ){
+ if( it->second.size()>1 ){
+ Node prev;
+ //add explanation of t1 = t2 = ... = tn
+ Debug("uf-ss-cliques") << "Explain ";
+ for( std::map< Node, bool >::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2 ){
+ if( prev!=Node::null() ){
+ Debug("uf-ss-cliques") << " = ";
+ //explain it2->first and prev
+ std::vector< TNode > expl;
+ d_thss->getTheory()->d_equalityEngine.explainEquality( it2->first, prev, true, expl );
+ for( int i=0; i<(int)expl.size(); i++ ){
+ if( std::find( conflict.begin(), conflict.end(), expl[i] )==conflict.end() ){
+ conflict.push_back( expl[i] );
+ }
+ }
}
+ prev = it2->first;
+ Debug("uf-ss-cliques") << prev;
}
+ Debug("uf-ss-cliques") << std::endl;
}
- prev = it2->first;
- Debug("uf-ss-cliques") << prev;
+ }
+ Debug("uf-ss-cliques") << "Explanation of clique (size=" << conflict.size() << ") = " << std::endl;
+ for( int i=0; i<(int)conflict.size(); i++ ){
+ Debug("uf-ss-cliques") << conflict[i] << " ";
}
Debug("uf-ss-cliques") << std::endl;
}
- }
- Debug("uf-ss-cliques") << "Explanation of clique (size=" << conflict.size() << ") = " << std::endl;
- for( int i=0; i<(int)conflict.size(); i++ ){
- Debug("uf-ss-cliques") << conflict[i] << " ";
- //bool value;
- //bool hasValue = d_th->getValuation().hasSatValue( conflict[i], value );
- //Assert( hasValue );
- //Assert( value );
- }
- Debug("uf-ss-cliques") << std::endl;
- //now, make the conflict
-#if 1
- conflict.push_back( d_cardinality_literal[ d_cardinality ] );
- Node conflictNode = NodeManager::currentNM()->mkNode( AND, conflict );
- Trace("uf-ss-lemma") << "*** Add clique conflict " << conflictNode << std::endl;
- //Notice() << "*** Add clique conflict " << conflictNode << std::endl;
- out->conflict( conflictNode );
- d_conflict = true;
-#else
- Node conflictNode = conflict.size()==1 ? conflict[0] : NodeManager::currentNM()->mkNode( AND, conflict );
- //add cardinality constraint
- Node cardNode = d_cardinality_literal[ d_cardinality ];
- //bool value;
- //bool hasValue = d_th->getValuation().hasSatValue( cardNode, value );
- //Assert( hasValue );
- //Assert( value );
- conflictNode = NodeManager::currentNM()->mkNode( IMPLIES, conflictNode, cardNode.notNode() );
- Trace("uf-ss-lemma") << "*** Add clique conflict " << conflictNode << std::endl;
- //Notice() << "*** Add clique conflict " << conflictNode << std::endl;
- out->lemma( conflictNode );
-#endif
- ++( d_th->getStrongSolver()->d_statistics.d_clique_lemmas );
+ //now, make the conflict
+ if( isSatConflict ){
+ conflict.push_back( d_cardinality_literal[ d_cardinality ] );
+ Node conflictNode = NodeManager::currentNM()->mkNode( AND, conflict );
+ Trace("uf-ss-lemma") << "*** Add clique conflict " << conflictNode << std::endl;
+ //Notice() << "*** Add clique conflict " << conflictNode << std::endl;
+ out->conflict( conflictNode );
+ d_conflict = true;
+ ++( d_thss->d_statistics.d_clique_conflicts );
+ }else{
+ Node conflictNode = conflict.size()==1 ? conflict[0] : NodeManager::currentNM()->mkNode( AND, conflict );
+ //add cardinality constraint
+ Node cardNode = d_cardinality_literal[ d_cardinality ];
+ //bool value;
+ //bool hasValue = d_th->getValuation().hasSatValue( cardNode, value );
+ //Assert( hasValue );
+ //Assert( value );
+ conflictNode = NodeManager::currentNM()->mkNode( IMPLIES, conflictNode, cardNode.notNode() );
+ Trace("uf-ss-lemma") << "*** Add clique lemma " << conflictNode << std::endl;
+ out->lemma( conflictNode );
+ ++( d_thss->d_statistics.d_clique_lemmas );
+ }
- //DO_THIS: ensure that the same clique is not reported??? Check standard effort after assertDisequal can produce same clique.
+ //DO_THIS: ensure that the same clique is not reported??? Check standard effort after assertDisequal can produce same clique.
+ }
}
-void StrongSolverTheoryUf::SortRepModel::addTotalityAxiom( Node n, int cardinality, OutputChannel* out ){
+void StrongSolverTheoryUF::SortModel::addTotalityAxiom( Node n, int cardinality, OutputChannel* out ){
Node cardLit = d_cardinality_literal[ cardinality ];
std::vector< Node > eqs;
for( int i=0; i<cardinality; i++ ){
@@ -1141,25 +1226,25 @@ void StrongSolverTheoryUf::SortRepModel::addTotalityAxiom( Node n, int cardinali
Node lem = NodeManager::currentNM()->mkNode( IMPLIES, cardLit, ax );
Trace("uf-ss-lemma") << "*** Add totality axiom " << lem << std::endl;
//send as lemma to the output channel
- d_th->getOutputChannel().lemma( lem );
- ++( d_th->getStrongSolver()->d_statistics.d_totality_lemmas );
+ d_thss->getOutputChannel().lemma( lem );
+ ++( d_thss->d_statistics.d_totality_lemmas );
}
/** apply totality */
-bool StrongSolverTheoryUf::SortRepModel::applyTotality( int cardinality ){
+bool StrongSolverTheoryUF::SortModel::applyTotality( int cardinality ){
return options::ufssTotality() || cardinality<=options::ufssTotalityLimited();
// || ( options::ufssModelInference() && !d_totality_terms[cardinality].empty() );
}
/** get totality lemma terms */
-Node StrongSolverTheoryUf::SortRepModel::getTotalityLemmaTerm( int cardinality, int i ){
+Node StrongSolverTheoryUF::SortModel::getTotalityLemmaTerm( int cardinality, int i ){
return d_totality_terms[0][i];
//}else{
// return d_totality_terms[cardinality][i];
//}
}
-void StrongSolverTheoryUf::SortRepModel::debugPrint( const char* c ){
+void StrongSolverTheoryUF::SortModel::debugPrint( const char* c ){
Debug( c ) << "-- Conflict Find:" << std::endl;
Debug( c ) << "Number of reps = " << d_reps << std::endl;
Debug( c ) << "Cardinality req = " << d_cardinality << std::endl;
@@ -1184,7 +1269,7 @@ void StrongSolverTheoryUf::SortRepModel::debugPrint( const char* c ){
}
}
-void StrongSolverTheoryUf::SortRepModel::debugModel( TheoryModel* m ){
+void StrongSolverTheoryUF::SortModel::debugModel( TheoryModel* m ){
if( Trace.isOn("uf-ss-warn") ){
std::vector< Node > eqcs;
eq::EqClassesIterator eqcs_i = eq::EqClassesIterator( &m->d_equalityEngine );
@@ -1211,7 +1296,7 @@ void StrongSolverTheoryUf::SortRepModel::debugModel( TheoryModel* m ){
}
}
-int StrongSolverTheoryUf::SortRepModel::getNumRegions(){
+int StrongSolverTheoryUF::SortModel::getNumRegions(){
int count = 0;
for( int i=0; i<(int)d_regions_index; i++ ){
if( d_regions[i]->d_valid ){
@@ -1221,8 +1306,8 @@ int StrongSolverTheoryUf::SortRepModel::getNumRegions(){
return count;
}
-void StrongSolverTheoryUf::SortRepModel::getRepresentatives( std::vector< Node >& reps ){
- if( !options::ufssColoringSat() ){
+void StrongSolverTheoryUF::SortModel::getRepresentatives( std::vector< Node >& reps ){
+ //if( !options::ufssColoringSat() ){
bool foundRegion = false;
for( int i=0; i<(int)d_regions_index; i++ ){
//should not have multiple regions at this point
@@ -1235,126 +1320,12 @@ void StrongSolverTheoryUf::SortRepModel::getRepresentatives( std::vector< Node >
foundRegion = true;
}
}
- }else{
- Unimplemented("Build representatives for fmf region sat is not implemented");
- }
-}
-
-
-/** initialize */
-void StrongSolverTheoryUf::InfRepModel::initialize( OutputChannel* out ){
-
-}
-
-/** new node */
-void StrongSolverTheoryUf::InfRepModel::newEqClass( Node n ){
- d_rep[n] = n;
- //d_const_rep[n] = n.getMetaKind()==metakind::CONSTANT;
-}
-
-/** merge */
-void StrongSolverTheoryUf::InfRepModel::merge( Node a, Node b ){
- //d_rep[b] = false;
- //d_const_rep[a] = d_const_rep[a] || d_const_rep[b];
- Node repb = d_rep[b];
- Assert( !repb.isNull() );
- if( repb.getMetaKind()==metakind::CONSTANT || isBadRepresentative( d_rep[a] ) ){
- d_rep[a] = repb;
- }
- d_rep[b] = Node::null();
-}
-
-/** check */
-void StrongSolverTheoryUf::InfRepModel::check( Theory::Effort level, OutputChannel* out ){
-
-}
-
-/** minimize */
-bool StrongSolverTheoryUf::InfRepModel::minimize( OutputChannel* out ){
-#if 0
- bool retVal = true;
-#else
- bool retVal = !addSplit( out );
-#endif
- if( retVal ){
- std::vector< Node > reps;
- getRepresentatives( reps );
- Trace("uf-ss-fmf") << "Num representatives of type " << d_type << " : " << reps.size() << std::endl;
- /*
- for( int i=0; i<(int)reps.size(); i++ ){
- std::cout << reps[i] << " ";
- }
- std::cout << std::endl;
- for( int i=0; i<(int)reps.size(); i++ ){
- std::cout << reps[i].getMetaKind() << " ";
- }
- std::cout << std::endl;
- for( NodeNodeMap::iterator it = d_rep.begin(); it != d_rep.end(); ++it ){
- Node rep = (*it).second;
- if( !rep.isNull() && !isBadRepresentative( rep ) ){
- for( NodeNodeMap::iterator it2 = d_rep.begin(); it2 != d_rep.end(); ++it2 ){
- Node rep2 = (*it2).second;
- if( !rep2.isNull() && !isBadRepresentative( rep2 ) ){
- if( d_th->getQuantifiersEngine()->getEqualityQuery()->areDisequal( rep, rep2 ) ){
- std::cout << "1 ";
- }else{
- std::cout << "0 ";
- }
- }
- }
- //std::cout << " : " << rep;
- std::cout << std::endl;
- }
- }
- */
- }
- return retVal;
-}
-
-/** get representatives */
-void StrongSolverTheoryUf::InfRepModel::getRepresentatives( std::vector< Node >& reps ){
- for( NodeNodeMap::iterator it = d_rep.begin(); it != d_rep.end(); ++it ){
- if( !(*it).second.isNull() ){
- reps.push_back( (*it).first );
- }
- }
-}
-
-
-/** add split function */
-bool StrongSolverTheoryUf::InfRepModel::addSplit( OutputChannel* out ){
- std::vector< Node > visited;
- for( NodeNodeMap::iterator it = d_rep.begin(); it != d_rep.end(); ++it ){
- Node rep = (*it).second;
- if( !rep.isNull() && !isBadRepresentative( rep ) ){
- bool constRep = rep.getMetaKind()==metakind::CONSTANT;
- for( size_t i=0; i<visited.size(); i++ ){
- if( !constRep || !visited[i].getMetaKind()==metakind::CONSTANT ){
- if( !d_th->getQuantifiersEngine()->getEqualityQuery()->areDisequal( rep, visited[i] ) ){
- //split on these nodes
- Node eq = rep.eqNode( visited[i] );
- Trace("uf-ss-lemma") << "*** Split on " << eq << std::endl;
- eq = Rewriter::rewrite( eq );
- Debug("uf-ss-lemma-debug") << "Rewritten " << eq << std::endl;
- out->split( eq );
- //explore the equals branch first
- out->requirePhase( eq, true );
- ++( d_th->getStrongSolver()->d_statistics.d_split_lemmas );
- return true;
- }
- }
- }
- visited.push_back( rep );
- }
- }
- return false;
-}
-
-bool StrongSolverTheoryUf::InfRepModel::isBadRepresentative( Node n ){
- return n.getKind()==kind::PLUS;
+ //}else{
+ // Unimplemented("Build representatives for fmf region sat is not implemented");
+ //}
}
-StrongSolverTheoryUf::StrongSolverTheoryUf(context::Context* c, context::UserContext* u, OutputChannel& out, TheoryUF* th) :
+StrongSolverTheoryUF::StrongSolverTheoryUF(context::Context* c, context::UserContext* u, OutputChannel& out, TheoryUF* th) :
d_out( &out ),
d_th( th ),
d_conflict( c, false ),
@@ -1367,78 +1338,129 @@ d_rep_model_init( c )
}else{
d_term_amb = NULL;
}
+ if( options::ufssDiseqPropagation() ){
+ d_deq_prop = new DisequalityPropagator( th->getQuantifiersEngine(), this );
+ }else{
+ d_deq_prop = NULL;
+ }
+}
+
+/** get default sat context */
+context::Context* StrongSolverTheoryUF::getSatContext() {
+ return d_th->getSatContext();
+}
+
+/** get default output channel */
+OutputChannel& StrongSolverTheoryUF::getOutputChannel() {
+ return d_th->getOutputChannel();
}
/** new node */
-void StrongSolverTheoryUf::newEqClass( Node n ){
- RepModel* c = getRepModel( n );
+void StrongSolverTheoryUF::newEqClass( Node n ){
+ SortModel* c = getSortModel( n );
if( c ){
- Trace("uf-ss-solver") << "StrongSolverTheoryUf: New eq class " << n << " : " << n.getType() << std::endl;
+ Trace("uf-ss-solver") << "StrongSolverTheoryUF: New eq class " << n << " : " << n.getType() << std::endl;
c->newEqClass( n );
}
}
/** merge */
-void StrongSolverTheoryUf::merge( Node a, Node b ){
- RepModel* c = getRepModel( a );
+void StrongSolverTheoryUF::merge( Node a, Node b ){
+ SortModel* c = getSortModel( a );
if( c ){
- Trace("uf-ss-solver") << "StrongSolverTheoryUf: Merge " << a << " " << b << " : " << a.getType() << std::endl;
+ Trace("uf-ss-solver") << "StrongSolverTheoryUF: Merge " << a << " " << b << " : " << a.getType() << std::endl;
c->merge( a, b );
+ }else{
+ if( options::ufssDiseqPropagation() ){
+ d_deq_prop->merge(a, b);
+ }
}
}
/** assert terms are disequal */
-void StrongSolverTheoryUf::assertDisequal( Node a, Node b, Node reason ){
- RepModel* c = getRepModel( a );
+void StrongSolverTheoryUF::assertDisequal( Node a, Node b, Node reason ){
+ SortModel* c = getSortModel( a );
if( c ){
- Trace("uf-ss-solver") << "StrongSolverTheoryUf: Assert disequal " << a << " " << b << " : " << a.getType() << std::endl;
+ Trace("uf-ss-solver") << "StrongSolverTheoryUF: Assert disequal " << a << " " << b << " : " << a.getType() << std::endl;
//Assert( d_th->d_equalityEngine.getRepresentative( a )==a );
//Assert( d_th->d_equalityEngine.getRepresentative( b )==b );
c->assertDisequal( a, b, reason );
+ }else{
+ if( options::ufssDiseqPropagation() ){
+ d_deq_prop->assertDisequal(a, b, reason);
+ }
}
}
/** assert a node */
-void StrongSolverTheoryUf::assertNode( Node n, bool isDecision ){
+void StrongSolverTheoryUF::assertNode( Node n, bool isDecision ){
Trace("uf-ss") << "Assert " << n << " " << isDecision << std::endl;
- if( n.getKind()==CARDINALITY_CONSTRAINT ){
- TypeNode tn = n[0].getType();
+ bool polarity = n.getKind() != kind::NOT;
+ TNode lit = polarity ? n : n[0];
+ if( lit.getKind()==CARDINALITY_CONSTRAINT ){
+ TypeNode tn = lit[0].getType();
Assert( tn.isSort() );
Assert( d_rep_model[tn] );
- long nCard = n[1].getConst<Rational>().getNumerator().getLong();
- d_rep_model[tn]->assertCardinality( d_out, nCard, true );
- }else if( n.getKind()==NOT && n[0].getKind()==CARDINALITY_CONSTRAINT ){
- Node nn = n[0];
- TypeNode tn = nn[0].getType();
- Assert( tn.isSort() );
- Assert( d_rep_model[tn] );
- long nCard = nn[1].getConst<Rational>().getNumerator().getLong();
- d_rep_model[tn]->assertCardinality( d_out, nCard, false );
+ long nCard = lit[1].getConst<Rational>().getNumerator().getLong();
+ d_rep_model[tn]->assertCardinality( d_out, nCard, polarity );
}else{
- ////FIXME: this is too strict: theory propagations are showing up as isDecision=true, but
- //// a theory propagation is not a decision.
- if( isDecision ){
- for( std::map< TypeNode, RepModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
- if( !it->second->hasCardinalityAsserted() ){
- Trace("uf-ss-warn") << "WARNING: Assert " << n << " as a decision before cardinality for " << it->first << "." << std::endl;
- //Message() << "Error: constraint asserted before cardinality for " << it->first << std::endl;
- //Unimplemented();
+ if( Trace.isOn("uf-ss-warn") ){
+ ////FIXME: this is too strict: theory propagations are showing up as isDecision=true, but
+ //// a theory propagation is not a decision.
+ if( isDecision ){
+ for( std::map< TypeNode, SortModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
+ if( !it->second->hasCardinalityAsserted() ){
+ Trace("uf-ss-warn") << "WARNING: Assert " << n << " as a decision before cardinality for " << it->first << "." << std::endl;
+ //Message() << "Error: constraint asserted before cardinality for " << it->first << std::endl;
+ //Unimplemented();
+ }
}
}
}
+ if( lit.getKind()!=EQUAL ){
+ //it is a predicate
+ if( options::ufssDiseqPropagation() ){
+ d_deq_prop->assertPredicate(lit, polarity);
+ }
+ }
}
Trace("uf-ss") << "Assert: done " << n << " " << isDecision << std::endl;
}
+bool StrongSolverTheoryUF::areDisequal( Node a, Node b ) {
+ if( a==b ){
+ return false;
+ }else{
+ a = d_th->d_equalityEngine.getRepresentative( a );
+ b = d_th->d_equalityEngine.getRepresentative( b );
+ if( d_th->d_equalityEngine.areDisequal( a, b, false ) ){
+ return true;
+ }else{
+ SortModel* c = getSortModel( a );
+ if( c ){
+ return c->areDisequal( a, b );
+ }else{
+ return false;
+ }
+ }
+ }
+}
/** check */
-void StrongSolverTheoryUf::check( Theory::Effort level ){
+void StrongSolverTheoryUF::check( Theory::Effort level ){
if( !d_conflict ){
- Trace("uf-ss-solver") << "StrongSolverTheoryUf: check " << level << std::endl;
+ Trace("uf-ss-solver") << "StrongSolverTheoryUF: check " << level << std::endl;
if( level==Theory::EFFORT_FULL ){
debugPrint( "uf-ss-debug" );
}
- for( std::map< TypeNode, RepModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
+ if( !d_conflict && level==Theory::EFFORT_FULL && options::ufssColoringSat() ){
+ int lemmas = d_term_amb->disambiguateTerms( d_out );
+ d_statistics.d_disamb_term_lemmas += lemmas;
+ if( lemmas>=0 ){
+ return;
+ }
+ }
+ for( std::map< TypeNode, SortModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
it->second->check( level, d_out );
if( it->second->isConflict() ){
d_conflict = true;
@@ -1446,24 +1468,24 @@ void StrongSolverTheoryUf::check( Theory::Effort level ){
}
}
//disambiguate terms if necessary
- if( !d_conflict && level==Theory::EFFORT_FULL && options::ufssColoringSat() ){
- Assert( d_term_amb!=NULL );
- d_statistics.d_disamb_term_lemmas += d_term_amb->disambiguateTerms( d_out );
- }
- Trace("uf-ss-solver") << "Done StrongSolverTheoryUf: check " << level << std::endl;
+ //if( !d_conflict && level==Theory::EFFORT_FULL && options::ufssColoringSat() ){
+ // Assert( d_term_amb!=NULL );
+ // d_statistics.d_disamb_term_lemmas += d_term_amb->disambiguateTerms( d_out );
+ //}
+ Trace("uf-ss-solver") << "Done StrongSolverTheoryUF: check " << level << std::endl;
}
}
/** propagate */
-void StrongSolverTheoryUf::propagate( Theory::Effort level ){
- //for( std::map< TypeNode, RepModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
+void StrongSolverTheoryUF::propagate( Theory::Effort level ){
+ //for( std::map< TypeNode, SortModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
// it->second->propagate( level, d_out );
//}
}
/** get next decision request */
-Node StrongSolverTheoryUf::getNextDecisionRequest(){
- for( std::map< TypeNode, RepModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
+Node StrongSolverTheoryUF::getNextDecisionRequest(){
+ for( std::map< TypeNode, SortModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
Node n = it->second->getNextDecisionRequest();
if( !n.isNull() ){
return n;
@@ -1472,18 +1494,15 @@ Node StrongSolverTheoryUf::getNextDecisionRequest(){
return Node::null();
}
-void StrongSolverTheoryUf::preRegisterTerm( TNode n ){
+void StrongSolverTheoryUF::preRegisterTerm( TNode n ){
Trace("uf-ss-register") << "Preregister " << n << "." << std::endl;
//shouldn't have to preregister this type (it may be that there are no quantifiers over tn)
TypeNode tn = n.getType();
if( d_rep_model.find( tn )==d_rep_model.end() ){
- RepModel* rm = NULL;
+ SortModel* rm = NULL;
if( tn.isSort() ){
Trace("uf-ss-register") << "Preregister sort " << tn << "." << std::endl;
- rm = new SortRepModel( n, d_th->getSatContext(), d_th );
- }else if( tn.isInteger() ){
- //rm = new InfRepModel( tn, d_th->getSatContext(), d_th );
- //rm = new SortRepModel( tn, d_th->getSatContext(), d_th );
+ rm = new SortModel( n, d_th->getSatContext(), this );
}else{
/*
if( tn==NodeManager::currentNM()->integerType() || tn==NodeManager::currentNM()->realType() ){
@@ -1509,7 +1528,7 @@ void StrongSolverTheoryUf::preRegisterTerm( TNode n ){
}
}
-void StrongSolverTheoryUf::registerQuantifier( Node f ){
+void StrongSolverTheoryUF::registerQuantifier( Node f ){
Debug("uf-ss-register") << "Register quantifier " << f << std::endl;
//must ensure the quantifier does not quantify over arithmetic
//for( int i=0; i<(int)f[0].getNumChildren(); i++ ){
@@ -1519,9 +1538,9 @@ void StrongSolverTheoryUf::registerQuantifier( Node f ){
}
-StrongSolverTheoryUf::RepModel* StrongSolverTheoryUf::getRepModel( Node n ){
+StrongSolverTheoryUF::SortModel* StrongSolverTheoryUF::getSortModel( Node n ){
TypeNode tn = n.getType();
- std::map< TypeNode, RepModel* >::iterator it = d_rep_model.find( tn );
+ std::map< TypeNode, SortModel* >::iterator it = d_rep_model.find( tn );
//pre-register the type if not done already
if( it==d_rep_model.end() ){
preRegisterTerm( n );
@@ -1539,13 +1558,13 @@ StrongSolverTheoryUf::RepModel* StrongSolverTheoryUf::getRepModel( Node n ){
return NULL;
}
-void StrongSolverTheoryUf::notifyRestart(){
+void StrongSolverTheoryUF::notifyRestart(){
}
/** get cardinality for sort */
-int StrongSolverTheoryUf::getCardinality( Node n ) {
- RepModel* c = getRepModel( n );
+int StrongSolverTheoryUF::getCardinality( Node n ) {
+ SortModel* c = getSortModel( n );
if( c ){
return c->getCardinality();
}else{
@@ -1553,27 +1572,27 @@ int StrongSolverTheoryUf::getCardinality( Node n ) {
}
}
-void StrongSolverTheoryUf::getRepresentatives( Node n, std::vector< Node >& reps ){
- RepModel* c = getRepModel( n );
+void StrongSolverTheoryUF::getRepresentatives( Node n, std::vector< Node >& reps ){
+ SortModel* c = getSortModel( n );
if( c ){
c->getRepresentatives( reps );
}
}
-bool StrongSolverTheoryUf::minimize( TheoryModel* m ){
- for( std::map< TypeNode, RepModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
+bool StrongSolverTheoryUF::minimize( TheoryModel* m ){
+ for( std::map< TypeNode, SortModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
if( !it->second->minimize( d_out, m ) ){
return false;
}
}
- for( std::map< TypeNode, RepModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
+ for( std::map< TypeNode, SortModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
Trace("uf-ss-minimize") << "Cardinality( " << it->first << " ) : " << it->second->getCardinality() << std::endl;
}
return true;
}
//print debug
-void StrongSolverTheoryUf::debugPrint( const char* c ){
+void StrongSolverTheoryUF::debugPrint( const char* c ){
//EqClassesIterator< TheoryUF::NotifyClass > eqc_iter( &((TheoryUF*)d_th)->d_equalityEngine );
//while( !eqc_iter.isFinished() ){
// Debug( c ) << "Eq class [[" << (*eqc_iter) << "]]" << std::endl;
@@ -1587,28 +1606,30 @@ void StrongSolverTheoryUf::debugPrint( const char* c ){
// eqc_iter++;
//}
- for( std::map< TypeNode, RepModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
+ for( std::map< TypeNode, SortModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
Debug( c ) << "Conflict find structure for " << it->first << ": " << std::endl;
it->second->debugPrint( c );
Debug( c ) << std::endl;
}
}
-void StrongSolverTheoryUf::debugModel( TheoryModel* m ){
+void StrongSolverTheoryUF::debugModel( TheoryModel* m ){
if( Trace.isOn("uf-ss-warn") ){
- for( std::map< TypeNode, RepModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
+ for( std::map< TypeNode, SortModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){
it->second->debugModel( m );
}
}
}
-StrongSolverTheoryUf::Statistics::Statistics():
- d_clique_lemmas("StrongSolverTheoryUf::Clique_Lemmas", 0),
- d_split_lemmas("StrongSolverTheoryUf::Split_Lemmas", 0),
- d_disamb_term_lemmas("StrongSolverTheoryUf::Disambiguate_Term_Lemmas", 0),
- d_totality_lemmas("StrongSolverTheoryUf::Totality_Lemmas", 0),
- d_max_model_size("StrongSolverTheoryUf::Max_Model_Size", 1)
+StrongSolverTheoryUF::Statistics::Statistics():
+ d_clique_conflicts("StrongSolverTheoryUF::Clique_Conflicts", 0),
+ d_clique_lemmas("StrongSolverTheoryUF::Clique_Lemmas", 0),
+ d_split_lemmas("StrongSolverTheoryUF::Split_Lemmas", 0),
+ d_disamb_term_lemmas("StrongSolverTheoryUF::Disambiguate_Term_Lemmas", 0),
+ d_totality_lemmas("StrongSolverTheoryUF::Totality_Lemmas", 0),
+ d_max_model_size("StrongSolverTheoryUF::Max_Model_Size", 1)
{
+ StatisticsRegistry::registerStat(&d_clique_conflicts);
StatisticsRegistry::registerStat(&d_clique_lemmas);
StatisticsRegistry::registerStat(&d_split_lemmas);
StatisticsRegistry::registerStat(&d_disamb_term_lemmas);
@@ -1616,7 +1637,8 @@ StrongSolverTheoryUf::Statistics::Statistics():
StatisticsRegistry::registerStat(&d_max_model_size);
}
-StrongSolverTheoryUf::Statistics::~Statistics(){
+StrongSolverTheoryUF::Statistics::~Statistics(){
+ StatisticsRegistry::unregisterStat(&d_clique_conflicts);
StatisticsRegistry::unregisterStat(&d_clique_lemmas);
StatisticsRegistry::unregisterStat(&d_split_lemmas);
StatisticsRegistry::unregisterStat(&d_disamb_term_lemmas);
@@ -1667,11 +1689,12 @@ int TermDisambiguator::disambiguateTerms( OutputChannel* out ){
}
Assert( children.size()>1 );
Node lem = NodeManager::currentNM()->mkNode( OR, children );
- Debug( "uf-ss-lemma" ) << "*** Disambiguate lemma : " << lem << std::endl;
+ Trace( "uf-ss-lemma" ) << "*** Disambiguate lemma : " << lem << std::endl;
//Notice() << "*** Disambiguate lemma : " << lem << std::endl;
out->lemma( lem );
d_term_amb[ eq ] = false;
lemmaAdded++;
+ return lemmaAdded;
}
}
}
@@ -1693,3 +1716,73 @@ bool TermDisambiguator::involvesRelevantType( Node n ){
}
return false;
}
+
+DisequalityPropagator::DisequalityPropagator(QuantifiersEngine* qe, StrongSolverTheoryUF* ufss) :
+ d_qe(qe), d_ufss(ufss){
+ d_true = NodeManager::currentNM()->mkConst( true );
+ d_false = NodeManager::currentNM()->mkConst( false );
+}
+
+void DisequalityPropagator::checkEquivalenceClass( Node t, Node eqc ) {
+ if( t.getKind()==APPLY_UF ){
+ Node op = t.getOperator();
+ eqc = d_ufss->getTheory()->getEqualityEngine()->getRepresentative( eqc );
+ eq::EqClassIterator eqc_i(eqc, d_ufss->getTheory()->getEqualityEngine());
+ while( !eqc_i.isFinished() ){
+ Node s = *eqc_i;
+ if( s.getKind()==APPLY_UF && s.getOperator()==op ){
+ int unkIndex = -1;
+ for( size_t i=0; i<t.getNumChildren(); i++ ){
+ //should consult strong solver since it knows more disequalities
+ if( d_ufss->areDisequal( t[i], s[i] ) ){
+ //if( d_qe->getEqualityQuery()->areDisequal( t[i], s[i] ) ){
+ unkIndex = -1;
+ break;
+ }else if( !d_qe->getEqualityQuery()->areEqual( t[i], s[i] ) ){
+ if( unkIndex==-1 ){
+ unkIndex = i;
+ }else{
+ unkIndex = -1;
+ break;
+ }
+ }
+ }
+ if( unkIndex!=-1 ){
+ Trace("deq-prop") << "propagate disequality " << t[unkIndex] << " " << s[unkIndex] << std::endl;
+ d_ufss->assertDisequal(t[unkIndex], s[unkIndex], Node::null());
+ ++( d_statistics.d_propagations );
+ if( d_ufss->isConflict() ){
+ return;
+ }
+ }
+ }
+ ++eqc_i;
+ }
+ }
+}
+
+/** merge */
+void DisequalityPropagator::merge( Node a, Node b ){
+
+}
+
+/** assert terms are disequal */
+void DisequalityPropagator::assertDisequal( Node a, Node b, Node reason ){
+ Trace("deq-prop") << "Notify disequal : " << a << " " << b << std::endl;
+}
+
+
+void DisequalityPropagator::assertPredicate( Node p, bool polarity ) {
+ Trace("deq-prop") << "Assert predicate : " << p << " " << polarity << std::endl;
+ checkEquivalenceClass( p, polarity ? d_false : d_true );
+}
+
+DisequalityPropagator::Statistics::Statistics():
+ d_propagations("StrongSolverTheoryUF::Disequality_Propagations", 0)
+{
+ StatisticsRegistry::registerStat(& d_propagations);
+}
+
+DisequalityPropagator::Statistics::~Statistics(){
+ StatisticsRegistry::unregisterStat(& d_propagations);
+} \ No newline at end of file
diff --git a/src/theory/uf/theory_uf_strong_solver.h b/src/theory/uf/theory_uf_strong_solver.h
index febae2eae..33493248d 100644
--- a/src/theory/uf/theory_uf_strong_solver.h
+++ b/src/theory/uf/theory_uf_strong_solver.h
@@ -31,8 +31,9 @@ namespace uf {
class TheoryUF;
class TermDisambiguator;
+class DisequalityPropagator;
-class StrongSolverTheoryUf{
+class StrongSolverTheoryUF{
protected:
typedef context::CDHashMap<Node, bool, NodeHashFunction> NodeBoolMap;
typedef context::CDHashMap<Node, int, NodeHashFunction> NodeIntMap;
@@ -42,51 +43,14 @@ protected:
typedef context::CDList<bool> IntList;
typedef context::CDHashMap<TypeNode, bool, TypeNodeHashFunction> TypeNodeBoolMap;
public:
- class RepModel {
- protected:
- /** type */
- TypeNode d_type;
- public:
- RepModel( TypeNode tn ) : d_type( tn ){}
- virtual ~RepModel(){}
- /** initialize */
- virtual void initialize( OutputChannel* out ) = 0;
- /** new node */
- virtual void newEqClass( Node n ) = 0;
- /** merge */
- virtual void merge( Node a, Node b ) = 0;
- /** assert terms are disequal */
- virtual void assertDisequal( Node a, Node b, Node reason ) = 0;
- /** check */
- virtual void check( Theory::Effort level, OutputChannel* out ){}
- /** get next decision request */
- virtual Node getNextDecisionRequest() { return Node::null(); }
- /** minimize */
- virtual bool minimize( OutputChannel* out, TheoryModel* m ){ return true; }
- /** assert cardinality */
- virtual void assertCardinality( OutputChannel* out, int c, bool val ){}
- /** is in conflict */
- virtual bool isConflict() { return false; }
- /** get cardinality */
- virtual int getCardinality() { return -1; }
- /** has cardinality */
- virtual bool hasCardinalityAsserted() { return true; }
- /** get representatives */
- virtual void getRepresentatives( std::vector< Node >& reps ){}
- /** print debug */
- virtual void debugPrint( const char* c ){}
- /** debug a model */
- virtual void debugModel( TheoryModel* m ){}
- };
-public:
/** information for incremental conflict/clique finding for a particular sort */
- class SortRepModel : public RepModel {
+ class SortModel {
public:
/** a partition of the current equality graph for which cliques can occur internally */
class Region {
public:
/** conflict find pointer */
- SortRepModel* d_cf;
+ SortModel* d_cf;
/** information stored about each node in region */
class RegionNodeInfo {
public:
@@ -142,7 +106,7 @@ public:
void setRep( Node n, bool valid );
public:
//constructor
- Region( SortRepModel* cf, context::Context* c ) : d_cf( cf ), d_testCliqueSize( c, 0 ),
+ Region( SortModel* cf, context::Context* c ) : d_cf( cf ), d_testCliqueSize( c, 0 ),
d_splitsSize( c, 0 ), d_testClique( c ), d_splits( c ), d_reps_size( c, 0 ),
d_total_diseq_external( c, 0 ), d_total_diseq_internal( c, 0 ), d_valid( c, true ) {
}
@@ -186,8 +150,10 @@ public:
void debugPrint( const char* c, bool incClique = false );
};
private:
- /** theory uf pointer */
- TheoryUF* d_th;
+ /** the type this model is for */
+ TypeNode d_type;
+ /** strong solver pointer */
+ StrongSolverTheoryUF* d_thss;
/** regions used to d_region_index */
context::CDO< unsigned > d_regions_index;
/** vector of regions */
@@ -213,7 +179,7 @@ public:
void setSplitScore( Node n, int s );
private:
/** check if we need to combine region ri */
- void checkRegion( int ri, bool rec = true );
+ void checkRegion( int ri, bool checkCombine = true );
/** force combine region */
int forceCombineRegion( int ri, bool useDensity = true );
/** merge regions */
@@ -256,8 +222,8 @@ public:
/** get totality lemma terms */
Node getTotalityLemmaTerm( int cardinality, int i );
public:
- SortRepModel( Node n, context::Context* c, TheoryUF* th );
- virtual ~SortRepModel(){}
+ SortModel( Node n, context::Context* c, StrongSolverTheoryUF* thss );
+ virtual ~SortModel(){}
/** initialize */
void initialize( OutputChannel* out );
/** new node */
@@ -266,6 +232,8 @@ public:
void merge( Node a, Node b );
/** assert terms are disequal */
void assertDisequal( Node a, Node b, Node reason );
+ /** are disequal */
+ bool areDisequal( Node a, Node b );
/** check */
void check( Theory::Effort level, OutputChannel* out );
/** propagate */
@@ -291,43 +259,7 @@ public:
public:
/** get number of regions (for debugging) */
int getNumRegions();
- }; /** class SortRepModel */
-private:
- /** infinite rep model */
- class InfRepModel : public RepModel
- {
- protected:
- /** theory uf pointer */
- TheoryUF* d_th;
- /** list of representatives */
- NodeNodeMap d_rep;
- /** whether representatives are constant */
- NodeBoolMap d_const_rep;
- /** add split */
- bool addSplit( OutputChannel* out );
- /** is bad representative */
- bool isBadRepresentative( Node n );
- public:
- InfRepModel( TypeNode tn, context::Context* c, TheoryUF* th ) : RepModel( tn ),
- d_th( th ), d_rep( c ), d_const_rep( c ){}
- virtual ~InfRepModel(){}
- /** initialize */
- void initialize( OutputChannel* out );
- /** new node */
- void newEqClass( Node n );
- /** merge */
- void merge( Node a, Node b );
- /** assert terms are disequal */
- void assertDisequal( Node a, Node b, Node reason ){}
- /** check */
- void check( Theory::Effort level, OutputChannel* out );
- /** minimize */
- bool minimize( OutputChannel* out );
- /** get representatives */
- void getRepresentatives( std::vector< Node >& reps );
- /** print debug */
- void debugPrint( const char* c ){}
- };
+ }; /** class SortModel */
private:
/** The output channel for the strong solver. */
OutputChannel* d_out;
@@ -336,19 +268,31 @@ private:
/** Are we in conflict */
context::CDO<bool> d_conflict;
/** rep model structure, one for each type */
- std::map< TypeNode, RepModel* > d_rep_model;
+ std::map< TypeNode, SortModel* > d_rep_model;
/** all types */
std::vector< TypeNode > d_conf_types;
/** whether conflict find data structures have been initialized */
TypeNodeBoolMap d_rep_model_init;
/** get conflict find */
- RepModel* getRepModel( Node n );
+ SortModel* getSortModel( Node n );
private:
/** term disambiguator */
TermDisambiguator* d_term_amb;
+ /** disequality propagator */
+ DisequalityPropagator* d_deq_prop;
public:
- StrongSolverTheoryUf(context::Context* c, context::UserContext* u, OutputChannel& out, TheoryUF* th);
- ~StrongSolverTheoryUf() {}
+ StrongSolverTheoryUF(context::Context* c, context::UserContext* u, OutputChannel& out, TheoryUF* th);
+ ~StrongSolverTheoryUF() {}
+ /** get theory */
+ TheoryUF* getTheory() { return d_th; }
+ /** term disambiguator */
+ TermDisambiguator* getTermDisambiguator() { return d_term_amb; }
+ /** disequality propagator */
+ DisequalityPropagator* getDisequalityPropagator() { return d_deq_prop; }
+ /** get default sat context */
+ context::Context* getSatContext();
+ /** get default output channel */
+ OutputChannel& getOutputChannel();
/** new node */
void newEqClass( Node n );
/** merge */
@@ -357,6 +301,8 @@ public:
void assertDisequal( Node a, Node b, Node reason );
/** assert node */
void assertNode( Node n, bool isDecision );
+ /** are disequal */
+ bool areDisequal( Node a, Node b );
public:
/** check */
void check( Theory::Effort level );
@@ -372,7 +318,7 @@ public:
void notifyRestart();
public:
/** identify */
- std::string identify() const { return std::string("StrongSolverTheoryUf"); }
+ std::string identify() const { return std::string("StrongSolverTheoryUF"); }
//print debug
void debugPrint( const char* c );
/** debug a model */
@@ -393,6 +339,7 @@ public:
class Statistics {
public:
+ IntStat d_clique_conflicts;
IntStat d_clique_lemmas;
IntStat d_split_lemmas;
IntStat d_disamb_term_lemmas;
@@ -403,7 +350,7 @@ public:
};
/** statistics class */
Statistics d_statistics;
-};/* class StrongSolverTheoryUf */
+};/* class StrongSolverTheoryUF */
class TermDisambiguator
@@ -422,6 +369,37 @@ public:
int disambiguateTerms( OutputChannel* out );
};
+class DisequalityPropagator
+{
+private:
+ /** quantifiers engine */
+ QuantifiersEngine* d_qe;
+ /** strong solver */
+ StrongSolverTheoryUF* d_ufss;
+ /** true,false */
+ Node d_true;
+ Node d_false;
+ /** check term t against equivalence class that t is disequal from */
+ void checkEquivalenceClass( Node t, Node eqc );
+public:
+ DisequalityPropagator(QuantifiersEngine* qe, StrongSolverTheoryUF* ufss);
+ /** merge */
+ void merge( Node a, Node b );
+ /** assert terms are disequal */
+ void assertDisequal( Node a, Node b, Node reason );
+ /** assert predicate */
+ void assertPredicate( Node p, bool polarity );
+public:
+ class Statistics {
+ public:
+ IntStat d_propagations;
+ Statistics();
+ ~Statistics();
+ };
+ /** statistics class */
+ Statistics d_statistics;
+};
+
}
}/* CVC4::theory namespace */
}/* CVC4 namespace */
diff --git a/src/util/configuration.cpp b/src/util/configuration.cpp
index 59fe28eca..c6e951049 100644
--- a/src/util/configuration.cpp
+++ b/src/util/configuration.cpp
@@ -195,6 +195,33 @@ bool Configuration::isTraceTag(char const * tag){
return false;
}
+bool Configuration::isGitBuild() {
+ return IS_GIT_BUILD;
+}
+
+const char* Configuration::getGitBranchName() {
+ return GIT_BRANCH_NAME;
+}
+
+const char* Configuration::getGitCommit() {
+ return GIT_COMMIT;
+}
+
+bool Configuration::hasGitModifications() {
+ return GIT_HAS_MODIFICATIONS;
+}
+
+std::string Configuration::getGitId() {
+ if(! isGitBuild()) {
+ return "";
+ }
+
+ stringstream ss;
+ ss << "git " << getGitBranchName() << " " << string(getGitCommit()).substr(0, 8)
+ << ( ::CVC4::Configuration::hasGitModifications() ? " (with modifications)" : "" );
+ return ss.str();
+}
+
bool Configuration::isSubversionBuild() {
return IS_SUBVERSION_BUILD;
}
@@ -211,7 +238,7 @@ bool Configuration::hasSubversionModifications() {
return SUBVERSION_HAS_MODIFICATIONS;
}
-string Configuration::getSubversionId() {
+std::string Configuration::getSubversionId() {
if(! isSubversionBuild()) {
return "";
}
diff --git a/src/util/configuration.h b/src/util/configuration.h
index 3f6547872..c85f62f7f 100644
--- a/src/util/configuration.h
+++ b/src/util/configuration.h
@@ -38,6 +38,10 @@ class CVC4_PUBLIC Configuration {
static const char* const SUBVERSION_BRANCH_NAME;
static const unsigned SUBVERSION_REVISION;
static const bool SUBVERSION_HAS_MODIFICATIONS;
+ static const bool IS_GIT_BUILD;
+ static const char* const GIT_BRANCH_NAME;
+ static const char* const GIT_COMMIT;
+ static const bool GIT_HAS_MODIFICATIONS;
public:
@@ -101,6 +105,12 @@ public:
/* Test if the given argument is a known trace tag name */
static bool isTraceTag(char const *);
+ static bool isGitBuild();
+ static const char* getGitBranchName();
+ static const char* getGitCommit();
+ static bool hasGitModifications();
+ static std::string getGitId();
+
static bool isSubversionBuild();
static const char* getSubversionBranchName();
static unsigned getSubversionRevision();
diff --git a/src/util/configuration_private.h b/src/util/configuration_private.h
index c480b4318..4378badc8 100644
--- a/src/util/configuration_private.h
+++ b/src/util/configuration_private.h
@@ -115,13 +115,16 @@ namespace CVC4 {
#define CVC4_ABOUT_STRING ( ::std::string("\
This is CVC4 version " CVC4_RELEASE_STRING ) + \
+ ( ::CVC4::Configuration::isGitBuild() \
+ ? ( ::std::string(" [") + ::CVC4::Configuration::getGitId() + "]" ) \
+ : \
( ::CVC4::Configuration::isSubversionBuild() \
? ( ::std::string(" [") + ::CVC4::Configuration::getSubversionId() + "]" ) \
: ::std::string("") \
- ) + "\n\
+ )) + "\n\
compiled with " + ::CVC4::Configuration::getCompiler() + "\n\
on " + ::CVC4::Configuration::getCompiledDateTime() + "\n\n\
-Copyright (C) 2009, 2010, 2011, 2012\n\
+Copyright (C) 2009, 2010, 2011, 2012, 2013\n\
New York University and The University of Iowa\n\n" + \
( IS_CLN_BUILD ? "\
This CVC4 library uses CLN as its multi-precision arithmetic library.\n\n\
diff --git a/src/util/integer.h.in b/src/util/integer.h.in
index 1f0174083..27b589b5a 100644
--- a/src/util/integer.h.in
+++ b/src/util/integer.h.in
@@ -1,5 +1,5 @@
/********************* */
-/*! \file integer.h
+/*! \file integer.h.in
** \verbatim
** Original author: taking
** Major contributors: none
diff --git a/src/util/rational.h.in b/src/util/rational.h.in
index c8e42a253..7f5b1feb4 100644
--- a/src/util/rational.h.in
+++ b/src/util/rational.h.in
@@ -1,5 +1,5 @@
/********************* */
-/*! \file rational.h
+/*! \file rational.h.in
** \verbatim
** Original author: taking
** Major contributors: none
diff --git a/src/util/sort_inference.cpp b/src/util/sort_inference.cpp
index 7e0af3e9f..d700b70d9 100755..100644
--- a/src/util/sort_inference.cpp
+++ b/src/util/sort_inference.cpp
@@ -1,408 +1,428 @@
-/********************* */
-/*! \file sort_inference.cpp
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
- ** Minor contributors (to current version): none
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief Sort inference module
- **
- ** This class implements sort inference, based on a simple algorithm:
- ** First, we assume all functions and predicates have distinct uninterpreted types.
- ** One pass is made through the input assertions, while a union-find data structure
- ** maintains necessary information regarding constraints on these types.
- **/
-
-#include <vector>
-
-#include "util/sort_inference.h"
-
-using namespace CVC4;
-using namespace std;
-
-namespace CVC4 {
-
-
-void SortInference::printSort( const char* c, int t ){
- int rt = getRepresentative( t );
- if( d_type_types.find( rt )!=d_type_types.end() ){
- Trace(c) << d_type_types[rt];
- }else{
- Trace(c) << "s_" << rt;
- }
-}
-
-void SortInference::simplify( std::vector< Node >& assertions, bool doRewrite ){
- //process all assertions
- for( unsigned i=0; i<assertions.size(); i++ ){
- Trace("sort-inference-debug") << "Process " << assertions[i] << std::endl;
- std::map< Node, Node > var_bound;
- process( assertions[i], var_bound );
- }
- //print debug
- if( Trace.isOn("sort-inference") ){
- for( std::map< Node, int >::iterator it = d_op_return_types.begin(); it != d_op_return_types.end(); ++it ){
- Trace("sort-inference") << it->first << " : ";
- if( !d_op_arg_types[ it->first ].empty() ){
- Trace("sort-inference") << "( ";
- for( size_t i=0; i<d_op_arg_types[ it->first ].size(); i++ ){
- printSort( "sort-inference", d_op_arg_types[ it->first ][i] );
- Trace("sort-inference") << " ";
- }
- Trace("sort-inference") << ") -> ";
- }
- printSort( "sort-inference", it->second );
- Trace("sort-inference") << std::endl;
- }
- }
- if( doRewrite ){
- //simplify all assertions by introducing new symbols wherever necessary (NOTE: this is unsound for quantifiers)
- for( unsigned i=0; i<assertions.size(); i++ ){
- std::map< Node, Node > var_bound;
- assertions[i] = simplify( assertions[i], var_bound );
- Trace("sort-inference-rewrite") << " --> " << assertions[i] << std::endl;
- }
- //now, ensure constants are distinct
- for( std::map< TypeNode, std::map< Node, Node > >::iterator it = d_const_map.begin(); it != d_const_map.end(); ++it ){
- std::vector< Node > consts;
- for( std::map< Node, Node >::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2 ){
- consts.push_back( it2->second );
- }
- //add lemma enforcing introduced constants to be distinct?
- }
- }
-}
-
-int SortInference::getRepresentative( int t ){
- std::map< int, int >::iterator it = d_type_union_find.find( t );
- if( it!=d_type_union_find.end() ){
- if( it->second==t ){
- return t;
- }else{
- int rt = getRepresentative( it->second );
- d_type_union_find[t] = rt;
- return rt;
- }
- }else{
- return t;
- }
-}
-
-void SortInference::setEqual( int t1, int t2 ){
- if( t1!=t2 ){
- int rt1 = getRepresentative( t1 );
- int rt2 = getRepresentative( t2 );
- if( rt1!=rt2 ){
- Trace("sort-inference-debug") << "Set equal : ";
- printSort( "sort-inference-debug", rt1 );
- Trace("sort-inference-debug") << " ";
- printSort( "sort-inference-debug", rt2 );
- Trace("sort-inference-debug") << std::endl;
- //check if they must be a type
- std::map< int, TypeNode >::iterator it1 = d_type_types.find( rt1 );
- std::map< int, TypeNode >::iterator it2 = d_type_types.find( rt2 );
- if( it2!=d_type_types.end() ){
- if( it1==d_type_types.end() ){
- //swap sides
- int swap = rt1;
- rt1 = rt2;
- rt2 = swap;
- }else{
- Assert( rt1==rt2 );
- }
- }
- /*
- d_type_eq_class[rt1].insert( d_type_eq_class[rt1].end(), d_type_eq_class[rt2].begin(), d_type_eq_class[rt2].end() );
- d_type_eq_class[rt2].clear();
- Trace("sort-inference-debug") << "EqClass : { ";
- for( int i=0; i<(int)d_type_eq_class[rt1].size(); i++ ){
- Trace("sort-inference-debug") << d_type_eq_class[rt1][i] << ", ";
- }
- Trace("sort-inference-debug") << "}" << std::endl;
- */
- d_type_union_find[rt2] = rt1;
- }
- }
-}
-
-int SortInference::getIdForType( TypeNode tn ){
- //register the return type
- std::map< TypeNode, int >::iterator it = d_id_for_types.find( tn );
- if( it==d_id_for_types.end() ){
- int sc = sortCount;
- d_type_types[ sortCount ] = tn;
- d_id_for_types[ tn ] = sortCount;
- sortCount++;
- return sc;
- }else{
- return it->second;
- }
-}
-
-int SortInference::process( Node n, std::map< Node, Node >& var_bound ){
- Trace("sort-inference-debug") << "Process " << n << std::endl;
- //add to variable bindings
- if( n.getKind()==kind::FORALL || n.getKind()==kind::EXISTS ){
- for( size_t i=0; i<n[0].getNumChildren(); i++ ){
- //TODO: try applying sort inference to quantified variables
- //d_var_types[n][ n[0][i] ] = sortCount;
- //sortCount++;
-
- //type of the quantified variable must be the same
- d_var_types[n][ n[0][i] ] = getIdForType( n[0][i].getType() );
- var_bound[ n[0][i] ] = n;
- }
- }
-
- //process children
- std::vector< Node > children;
- std::vector< int > child_types;
- for( size_t i=0; i<n.getNumChildren(); i++ ){
- bool processChild = true;
- if( n.getKind()==kind::FORALL || n.getKind()==kind::EXISTS ){
- processChild = i==1;
- }
- if( processChild ){
- children.push_back( n[i] );
- child_types.push_back( process( n[i], var_bound ) );
- }
- }
-
- //remove from variable bindings
- if( n.getKind()==kind::FORALL || n.getKind()==kind::EXISTS ){
- //erase from variable bound
- for( size_t i=0; i<n[0].getNumChildren(); i++ ){
- var_bound.erase( n[0][i] );
- }
- }
-
- int retType;
- if( n.getKind()==kind::EQUAL ){
- //we only require that the left and right hand side must be equal
- setEqual( child_types[0], child_types[1] );
- retType = getIdForType( n.getType() );
- }else if( n.getKind()==kind::APPLY_UF ){
- Node op = n.getOperator();
- if( d_op_return_types.find( op )==d_op_return_types.end() ){
- //assign arbitrary sort for return type
- d_op_return_types[op] = sortCount;
- sortCount++;
- //d_type_eq_class[sortCount].push_back( op );
- //assign arbitrary sort for argument types
- for( size_t i=0; i<n.getNumChildren(); i++ ){
- d_op_arg_types[op].push_back( sortCount );
- sortCount++;
- }
- }
- for( size_t i=0; i<n.getNumChildren(); i++ ){
- //the argument of the operator must match the return type of the subterm
- setEqual( child_types[i], d_op_arg_types[op][i] );
- }
- //return type is the return type
- retType = d_op_return_types[op];
- }else{
- std::map< Node, Node >::iterator it = var_bound.find( n );
- if( it!=var_bound.end() ){
- Trace("sort-inference-debug") << n << " is a bound variable." << std::endl;
- //the return type was specified while binding
- retType = d_var_types[it->second][n];
- }else if( n.getKind() == kind::VARIABLE ){
- Trace("sort-inference-debug") << n << " is a variable." << std::endl;
- if( d_op_return_types.find( n )==d_op_return_types.end() ){
- //assign arbitrary sort
- d_op_return_types[n] = sortCount;
- sortCount++;
- //d_type_eq_class[sortCount].push_back( n );
- }
- retType = d_op_return_types[n];
- }else if( n.isConst() ){
- Trace("sort-inference-debug") << n << " is a constant." << std::endl;
- //can be any type we want
- retType = sortCount;
- sortCount++;
- }else{
- Trace("sort-inference-debug") << n << " is a interpreted symbol." << std::endl;
- //it is an interpretted term
- for( size_t i=0; i<children.size(); i++ ){
- Trace("sort-inference-debug") << children[i] << " forced to have " << children[i].getType() << std::endl;
- //must enforce the actual type of the operator on the children
- int ct = getIdForType( children[i].getType() );
- setEqual( child_types[i], ct );
- }
- //return type must be the actual return type
- retType = getIdForType( n.getType() );
- }
- }
- Trace("sort-inference-debug") << "Type( " << n << " ) = ";
- printSort("sort-inference-debug", retType );
- Trace("sort-inference-debug") << std::endl;
- return retType;
-}
-
-
-TypeNode SortInference::getOrCreateTypeForId( int t, TypeNode pref ){
- int rt = getRepresentative( t );
- if( d_type_types.find( rt )!=d_type_types.end() ){
- return d_type_types[rt];
- }else{
- TypeNode retType;
- //see if we can assign pref
- if( !pref.isNull() && d_id_for_types.find( pref )==d_id_for_types.end() ){
- retType = pref;
- }else{
- if( d_subtype_count.find( pref )==d_subtype_count.end() ){
- d_subtype_count[pref] = 0;
- }
- //must create new type
- std::stringstream ss;
- ss << "it_" << d_subtype_count[pref] << "_" << pref;
- d_subtype_count[pref]++;
- retType = NodeManager::currentNM()->mkSort( ss.str() );
- }
- d_id_for_types[ retType ] = rt;
- d_type_types[ rt ] = retType;
- return retType;
- }
-}
-
-TypeNode SortInference::getTypeForId( int t ){
- int rt = getRepresentative( t );
- if( d_type_types.find( rt )!=d_type_types.end() ){
- return d_type_types[rt];
- }else{
- return TypeNode::null();
- }
-}
-
-Node SortInference::getNewSymbol( Node old, TypeNode tn ){
- if( tn==old.getType() ){
- return old;
- }else if( old.isConst() ){
- //must make constant of type tn
- if( d_const_map[tn].find( old )==d_const_map[tn].end() ){
- std::stringstream ss;
- ss << "ic_" << tn << "_" << old;
- d_const_map[tn][ old ] = NodeManager::currentNM()->mkSkolem( ss.str(), tn, "constant created during sort inference" ); //use mkConst???
- }
- return d_const_map[tn][ old ];
- }else{
- std::stringstream ss;
- ss << "i_$$_" << old;
- return NodeManager::currentNM()->mkSkolem( ss.str(), tn, "created during sort inference" );
- }
-}
-
-Node SortInference::simplify( Node n, std::map< Node, Node >& var_bound ){
- std::vector< Node > children;
- if( n.getKind()==kind::FORALL || n.getKind()==kind::EXISTS ){
- //recreate based on types of variables
- std::vector< Node > new_children;
- for( size_t i=0; i<n[0].getNumChildren(); i++ ){
- TypeNode tn = getOrCreateTypeForId( d_var_types[n][ n[0][i] ], n[0][i].getType() );
- Node v = getNewSymbol( n[0][i], tn );
- new_children.push_back( v );
- var_bound[ n[0][i] ] = v;
- }
- children.push_back( NodeManager::currentNM()->mkNode( n[0].getKind(), new_children ) );
- }
-
- //process children
- if( n.getMetaKind() == kind::metakind::PARAMETERIZED ){
- children.push_back( n.getOperator() );
- }
- for( size_t i=0; i<n.getNumChildren(); i++ ){
- bool processChild = true;
- if( n.getKind()==kind::FORALL || n.getKind()==kind::EXISTS ){
- processChild = i>=1;
- }
- if( processChild ){
- children.push_back( simplify( n[i], var_bound ) );
- }
- }
-
- //remove from variable bindings
- if( n.getKind()==kind::FORALL || n.getKind()==kind::EXISTS ){
- //erase from variable bound
- for( size_t i=0; i<n[0].getNumChildren(); i++ ){
- var_bound.erase( n[0][i] );
- }
- return NodeManager::currentNM()->mkNode( n.getKind(), children );
- }else if( n.getKind()==kind::EQUAL ){
- if( children[0].getType()!=children[1].getType() ){
- if( children[0].isConst() ){
- children[0] = getNewSymbol( children[0], children[1].getType() );
- }else if( children[1].isConst() ){
- children[1] = getNewSymbol( children[1], children[0].getType() );
- }else{
- Trace("sort-inference-warn") << "Sort inference created bad equality: " << children[0] << " = " << children[1] << std::endl;
- Trace("sort-inference-warn") << " Types : " << children[0].getType() << " " << children[1].getType() << std::endl;
- Assert( false );
- }
- }
- return NodeManager::currentNM()->mkNode( kind::APPLY_UF, children );
- }else if( n.getKind()==kind::APPLY_UF ){
- Node op = n.getOperator();
- if( d_symbol_map.find( op )==d_symbol_map.end() ){
- //make the new operator if necessary
- bool opChanged = false;
- std::vector< TypeNode > argTypes;
- for( size_t i=0; i<n.getNumChildren(); i++ ){
- TypeNode tn = getOrCreateTypeForId( d_op_arg_types[op][i], n[i].getType() );
- argTypes.push_back( tn );
- if( tn!=n[i].getType() ){
- opChanged = true;
- }
- }
- TypeNode retType = getOrCreateTypeForId( d_op_return_types[op], n.getType() );
- if( retType!=n.getType() ){
- opChanged = true;
- }
- if( opChanged ){
- std::stringstream ss;
- ss << "io_$$_" << op;
- TypeNode typ = NodeManager::currentNM()->mkFunctionType( argTypes, retType );
- d_symbol_map[op] = NodeManager::currentNM()->mkSkolem( ss.str(), typ, "op created during sort inference" );
- }else{
- d_symbol_map[op] = op;
- }
- }
- children[0] = d_symbol_map[op];
- //make sure all children have been taken care of
- for( size_t i=0; i<n.getNumChildren(); i++ ){
- TypeNode tn = children[i+1].getType();
- TypeNode tna = getTypeForId( d_op_arg_types[op][i] );
- if( tn!=tna ){
- if( n[i].isConst() ){
- children[i+1] = getNewSymbol( n[i], tna );
- }else{
- Trace("sort-inference-warn") << "Sort inference created bad child: " << n[i] << " " << tn << " " << tna << std::endl;
- Assert( false );
- }
- }
- }
- return NodeManager::currentNM()->mkNode( kind::APPLY_UF, children );
- }else{
- std::map< Node, Node >::iterator it = var_bound.find( n );
- if( it!=var_bound.end() ){
- return it->second;
- }else if( n.getKind() == kind::VARIABLE ){
- if( d_symbol_map.find( n )==d_symbol_map.end() ){
- TypeNode tn = getOrCreateTypeForId( d_op_return_types[n], n.getType() );
- d_symbol_map[n] = getNewSymbol( n, tn );
- }
- return d_symbol_map[n];
- }else if( n.isConst() ){
- //just return n, we will fix at higher scope
- return n;
- }else{
- return NodeManager::currentNM()->mkNode( n.getKind(), children );
- }
- }
-
-}
-
-}
+/********************* */
+/*! \file sort_inference.cpp
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief Sort inference module
+ **
+ ** This class implements sort inference, based on a simple algorithm:
+ ** First, we assume all functions and predicates have distinct uninterpreted types.
+ ** One pass is made through the input assertions, while a union-find data structure
+ ** maintains necessary information regarding constraints on these types.
+ **/
+
+#include <vector>
+
+#include "util/sort_inference.h"
+
+using namespace CVC4;
+using namespace std;
+
+namespace CVC4 {
+
+
+void SortInference::printSort( const char* c, int t ){
+ int rt = getRepresentative( t );
+ if( d_type_types.find( rt )!=d_type_types.end() ){
+ Trace(c) << d_type_types[rt];
+ }else{
+ Trace(c) << "s_" << rt;
+ }
+}
+
+void SortInference::simplify( std::vector< Node >& assertions, bool doRewrite ){
+ //process all assertions
+ for( unsigned i=0; i<assertions.size(); i++ ){
+ Trace("sort-inference-debug") << "Process " << assertions[i] << std::endl;
+ std::map< Node, Node > var_bound;
+ process( assertions[i], var_bound );
+ }
+ //print debug
+ if( Trace.isOn("sort-inference") ){
+ for( std::map< Node, int >::iterator it = d_op_return_types.begin(); it != d_op_return_types.end(); ++it ){
+ Trace("sort-inference") << it->first << " : ";
+ if( !d_op_arg_types[ it->first ].empty() ){
+ Trace("sort-inference") << "( ";
+ for( size_t i=0; i<d_op_arg_types[ it->first ].size(); i++ ){
+ printSort( "sort-inference", d_op_arg_types[ it->first ][i] );
+ Trace("sort-inference") << " ";
+ }
+ Trace("sort-inference") << ") -> ";
+ }
+ printSort( "sort-inference", it->second );
+ Trace("sort-inference") << std::endl;
+ }
+ for( std::map< Node, std::map< Node, int > >::iterator it = d_var_types.begin(); it != d_var_types.end(); ++it ){
+ Trace("sort-inference") << "Quantified formula " << it->first << " : " << std::endl;
+ for( std::map< Node, int >::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2 ){
+ printSort( "sort-inference", it2->second );
+ Trace("sort-inference") << std::endl;
+ }
+ Trace("sort-inference") << std::endl;
+ }
+ }
+ if( doRewrite ){
+ //simplify all assertions by introducing new symbols wherever necessary (NOTE: this is unsound for quantifiers)
+ for( unsigned i=0; i<assertions.size(); i++ ){
+ std::map< Node, Node > var_bound;
+ assertions[i] = simplify( assertions[i], var_bound );
+ Trace("sort-inference-rewrite") << " --> " << assertions[i] << std::endl;
+ }
+ //now, ensure constants are distinct
+ for( std::map< TypeNode, std::map< Node, Node > >::iterator it = d_const_map.begin(); it != d_const_map.end(); ++it ){
+ std::vector< Node > consts;
+ for( std::map< Node, Node >::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2 ){
+ consts.push_back( it2->second );
+ }
+ //add lemma enforcing introduced constants to be distinct?
+ }
+ }
+}
+
+int SortInference::getRepresentative( int t ){
+ std::map< int, int >::iterator it = d_type_union_find.find( t );
+ if( it!=d_type_union_find.end() ){
+ if( it->second==t ){
+ return t;
+ }else{
+ int rt = getRepresentative( it->second );
+ d_type_union_find[t] = rt;
+ return rt;
+ }
+ }else{
+ return t;
+ }
+}
+
+void SortInference::setEqual( int t1, int t2 ){
+ if( t1!=t2 ){
+ int rt1 = getRepresentative( t1 );
+ int rt2 = getRepresentative( t2 );
+ if( rt1!=rt2 ){
+ Trace("sort-inference-debug") << "Set equal : ";
+ printSort( "sort-inference-debug", rt1 );
+ Trace("sort-inference-debug") << " ";
+ printSort( "sort-inference-debug", rt2 );
+ Trace("sort-inference-debug") << std::endl;
+ //check if they must be a type
+ std::map< int, TypeNode >::iterator it1 = d_type_types.find( rt1 );
+ std::map< int, TypeNode >::iterator it2 = d_type_types.find( rt2 );
+ if( it2!=d_type_types.end() ){
+ if( it1==d_type_types.end() ){
+ //swap sides
+ int swap = rt1;
+ rt1 = rt2;
+ rt2 = swap;
+ }else{
+ Assert( rt1==rt2 );
+ }
+ }
+ /*
+ d_type_eq_class[rt1].insert( d_type_eq_class[rt1].end(), d_type_eq_class[rt2].begin(), d_type_eq_class[rt2].end() );
+ d_type_eq_class[rt2].clear();
+ Trace("sort-inference-debug") << "EqClass : { ";
+ for( int i=0; i<(int)d_type_eq_class[rt1].size(); i++ ){
+ Trace("sort-inference-debug") << d_type_eq_class[rt1][i] << ", ";
+ }
+ Trace("sort-inference-debug") << "}" << std::endl;
+ */
+ d_type_union_find[rt2] = rt1;
+ }
+ }
+}
+
+int SortInference::getIdForType( TypeNode tn ){
+ //register the return type
+ std::map< TypeNode, int >::iterator it = d_id_for_types.find( tn );
+ if( it==d_id_for_types.end() ){
+ int sc = sortCount;
+ d_type_types[ sortCount ] = tn;
+ d_id_for_types[ tn ] = sortCount;
+ sortCount++;
+ return sc;
+ }else{
+ return it->second;
+ }
+}
+
+int SortInference::process( Node n, std::map< Node, Node >& var_bound ){
+ Trace("sort-inference-debug") << "Process " << n << std::endl;
+ //add to variable bindings
+ if( n.getKind()==kind::FORALL || n.getKind()==kind::EXISTS ){
+ for( size_t i=0; i<n[0].getNumChildren(); i++ ){
+ //TODO: try applying sort inference to quantified variables
+ d_var_types[n][ n[0][i] ] = sortCount;
+ sortCount++;
+
+ //type of the quantified variable must be the same
+ //d_var_types[n][ n[0][i] ] = getIdForType( n[0][i].getType() );
+ var_bound[ n[0][i] ] = n;
+ }
+ }
+
+ //process children
+ std::vector< Node > children;
+ std::vector< int > child_types;
+ for( size_t i=0; i<n.getNumChildren(); i++ ){
+ bool processChild = true;
+ if( n.getKind()==kind::FORALL || n.getKind()==kind::EXISTS ){
+ processChild = i==1;
+ }
+ if( processChild ){
+ children.push_back( n[i] );
+ child_types.push_back( process( n[i], var_bound ) );
+ }
+ }
+
+ //remove from variable bindings
+ if( n.getKind()==kind::FORALL || n.getKind()==kind::EXISTS ){
+ //erase from variable bound
+ for( size_t i=0; i<n[0].getNumChildren(); i++ ){
+ var_bound.erase( n[0][i] );
+ }
+ }
+
+ int retType;
+ if( n.getKind()==kind::EQUAL ){
+ //we only require that the left and right hand side must be equal
+ setEqual( child_types[0], child_types[1] );
+ retType = getIdForType( n.getType() );
+ }else if( n.getKind()==kind::APPLY_UF ){
+ Node op = n.getOperator();
+ if( d_op_return_types.find( op )==d_op_return_types.end() ){
+ //assign arbitrary sort for return type
+ d_op_return_types[op] = sortCount;
+ sortCount++;
+ //d_type_eq_class[sortCount].push_back( op );
+ //assign arbitrary sort for argument types
+ for( size_t i=0; i<n.getNumChildren(); i++ ){
+ d_op_arg_types[op].push_back( sortCount );
+ sortCount++;
+ }
+ }
+ for( size_t i=0; i<n.getNumChildren(); i++ ){
+ //the argument of the operator must match the return type of the subterm
+ setEqual( child_types[i], d_op_arg_types[op][i] );
+ }
+ //return type is the return type
+ retType = d_op_return_types[op];
+ }else{
+ std::map< Node, Node >::iterator it = var_bound.find( n );
+ if( it!=var_bound.end() ){
+ Trace("sort-inference-debug") << n << " is a bound variable." << std::endl;
+ //the return type was specified while binding
+ retType = d_var_types[it->second][n];
+ }else if( n.getKind() == kind::VARIABLE ){
+ Trace("sort-inference-debug") << n << " is a variable." << std::endl;
+ if( d_op_return_types.find( n )==d_op_return_types.end() ){
+ //assign arbitrary sort
+ d_op_return_types[n] = sortCount;
+ sortCount++;
+ //d_type_eq_class[sortCount].push_back( n );
+ }
+ retType = d_op_return_types[n];
+ }else if( n.isConst() ){
+ Trace("sort-inference-debug") << n << " is a constant." << std::endl;
+ //can be any type we want
+ retType = sortCount;
+ sortCount++;
+ }else{
+ Trace("sort-inference-debug") << n << " is a interpreted symbol." << std::endl;
+ //it is an interpretted term
+ for( size_t i=0; i<children.size(); i++ ){
+ Trace("sort-inference-debug") << children[i] << " forced to have " << children[i].getType() << std::endl;
+ //must enforce the actual type of the operator on the children
+ int ct = getIdForType( children[i].getType() );
+ setEqual( child_types[i], ct );
+ }
+ //return type must be the actual return type
+ retType = getIdForType( n.getType() );
+ }
+ }
+ Trace("sort-inference-debug") << "Type( " << n << " ) = ";
+ printSort("sort-inference-debug", retType );
+ Trace("sort-inference-debug") << std::endl;
+ return retType;
+}
+
+
+TypeNode SortInference::getOrCreateTypeForId( int t, TypeNode pref ){
+ int rt = getRepresentative( t );
+ if( d_type_types.find( rt )!=d_type_types.end() ){
+ return d_type_types[rt];
+ }else{
+ TypeNode retType;
+ //see if we can assign pref
+ if( !pref.isNull() && d_id_for_types.find( pref )==d_id_for_types.end() ){
+ retType = pref;
+ }else{
+ if( d_subtype_count.find( pref )==d_subtype_count.end() ){
+ d_subtype_count[pref] = 0;
+ }
+ //must create new type
+ std::stringstream ss;
+ ss << "it_" << d_subtype_count[pref] << "_" << pref;
+ d_subtype_count[pref]++;
+ retType = NodeManager::currentNM()->mkSort( ss.str() );
+ }
+ d_id_for_types[ retType ] = rt;
+ d_type_types[ rt ] = retType;
+ return retType;
+ }
+}
+
+TypeNode SortInference::getTypeForId( int t ){
+ int rt = getRepresentative( t );
+ if( d_type_types.find( rt )!=d_type_types.end() ){
+ return d_type_types[rt];
+ }else{
+ return TypeNode::null();
+ }
+}
+
+Node SortInference::getNewSymbol( Node old, TypeNode tn ){
+ if( tn==old.getType() ){
+ return old;
+ }else if( old.isConst() ){
+ //must make constant of type tn
+ if( d_const_map[tn].find( old )==d_const_map[tn].end() ){
+ std::stringstream ss;
+ ss << "ic_" << tn << "_" << old;
+ d_const_map[tn][ old ] = NodeManager::currentNM()->mkSkolem( ss.str(), tn, "constant created during sort inference" ); //use mkConst???
+ }
+ return d_const_map[tn][ old ];
+ }else{
+ std::stringstream ss;
+ ss << "i_$$_" << old;
+ return NodeManager::currentNM()->mkSkolem( ss.str(), tn, "created during sort inference" );
+ }
+}
+
+Node SortInference::simplify( Node n, std::map< Node, Node >& var_bound ){
+ std::vector< Node > children;
+ if( n.getKind()==kind::FORALL || n.getKind()==kind::EXISTS ){
+ //recreate based on types of variables
+ std::vector< Node > new_children;
+ for( size_t i=0; i<n[0].getNumChildren(); i++ ){
+ TypeNode tn = getOrCreateTypeForId( d_var_types[n][ n[0][i] ], n[0][i].getType() );
+ Node v = getNewSymbol( n[0][i], tn );
+ new_children.push_back( v );
+ var_bound[ n[0][i] ] = v;
+ }
+ children.push_back( NodeManager::currentNM()->mkNode( n[0].getKind(), new_children ) );
+ }
+
+ //process children
+ if( n.getMetaKind() == kind::metakind::PARAMETERIZED ){
+ children.push_back( n.getOperator() );
+ }
+ for( size_t i=0; i<n.getNumChildren(); i++ ){
+ bool processChild = true;
+ if( n.getKind()==kind::FORALL || n.getKind()==kind::EXISTS ){
+ processChild = i>=1;
+ }
+ if( processChild ){
+ children.push_back( simplify( n[i], var_bound ) );
+ }
+ }
+
+ //remove from variable bindings
+ if( n.getKind()==kind::FORALL || n.getKind()==kind::EXISTS ){
+ //erase from variable bound
+ for( size_t i=0; i<n[0].getNumChildren(); i++ ){
+ var_bound.erase( n[0][i] );
+ }
+ return NodeManager::currentNM()->mkNode( n.getKind(), children );
+ }else if( n.getKind()==kind::EQUAL ){
+ if( children[0].getType()!=children[1].getType() ){
+ if( children[0].isConst() ){
+ children[0] = getNewSymbol( children[0], children[1].getType() );
+ }else if( children[1].isConst() ){
+ children[1] = getNewSymbol( children[1], children[0].getType() );
+ }else{
+ Trace("sort-inference-warn") << "Sort inference created bad equality: " << children[0] << " = " << children[1] << std::endl;
+ Trace("sort-inference-warn") << " Types : " << children[0].getType() << " " << children[1].getType() << std::endl;
+ Assert( false );
+ }
+ }
+ return NodeManager::currentNM()->mkNode( kind::APPLY_UF, children );
+ }else if( n.getKind()==kind::APPLY_UF ){
+ Node op = n.getOperator();
+ if( d_symbol_map.find( op )==d_symbol_map.end() ){
+ //make the new operator if necessary
+ bool opChanged = false;
+ std::vector< TypeNode > argTypes;
+ for( size_t i=0; i<n.getNumChildren(); i++ ){
+ TypeNode tn = getOrCreateTypeForId( d_op_arg_types[op][i], n[i].getType() );
+ argTypes.push_back( tn );
+ if( tn!=n[i].getType() ){
+ opChanged = true;
+ }
+ }
+ TypeNode retType = getOrCreateTypeForId( d_op_return_types[op], n.getType() );
+ if( retType!=n.getType() ){
+ opChanged = true;
+ }
+ if( opChanged ){
+ std::stringstream ss;
+ ss << "io_$$_" << op;
+ TypeNode typ = NodeManager::currentNM()->mkFunctionType( argTypes, retType );
+ d_symbol_map[op] = NodeManager::currentNM()->mkSkolem( ss.str(), typ, "op created during sort inference" );
+ }else{
+ d_symbol_map[op] = op;
+ }
+ }
+ children[0] = d_symbol_map[op];
+ //make sure all children have been taken care of
+ for( size_t i=0; i<n.getNumChildren(); i++ ){
+ TypeNode tn = children[i+1].getType();
+ TypeNode tna = getTypeForId( d_op_arg_types[op][i] );
+ if( tn!=tna ){
+ if( n[i].isConst() ){
+ children[i+1] = getNewSymbol( n[i], tna );
+ }else{
+ Trace("sort-inference-warn") << "Sort inference created bad child: " << n[i] << " " << tn << " " << tna << std::endl;
+ Assert( false );
+ }
+ }
+ }
+ return NodeManager::currentNM()->mkNode( kind::APPLY_UF, children );
+ }else{
+ std::map< Node, Node >::iterator it = var_bound.find( n );
+ if( it!=var_bound.end() ){
+ return it->second;
+ }else if( n.getKind() == kind::VARIABLE ){
+ if( d_symbol_map.find( n )==d_symbol_map.end() ){
+ TypeNode tn = getOrCreateTypeForId( d_op_return_types[n], n.getType() );
+ d_symbol_map[n] = getNewSymbol( n, tn );
+ }
+ return d_symbol_map[n];
+ }else if( n.isConst() ){
+ //just return n, we will fix at higher scope
+ return n;
+ }else{
+ return NodeManager::currentNM()->mkNode( n.getKind(), children );
+ }
+ }
+
+}
+int SortInference::getSortId( Node n ) {
+ Node op = n.getKind()==kind::APPLY_UF ? n.getOperator() : n;
+ return getRepresentative( d_op_return_types[op] );
+}
+
+int SortInference::getSortId( Node f, Node v ) {
+ return getRepresentative( d_var_types[f][v] );
+}
+
+void SortInference::setSkolemVar( Node f, Node v, Node sk ){
+ d_op_return_types[sk] = getSortId( f, v );
+}
+
+}/* CVC4 namespace */
diff --git a/src/util/sort_inference.h b/src/util/sort_inference.h
index 363dbd84d..0b1f96f85 100755..100644
--- a/src/util/sort_inference.h
+++ b/src/util/sort_inference.h
@@ -1,72 +1,76 @@
-/********************* */
-/*! \file sort_inference.h
- ** \verbatim
- ** Original author: ajreynol
- ** Major contributors: none
- ** Minor contributors (to current version): none
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 New York University and The University of Iowa
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\endverbatim
- **
- ** \brief Pre-process step for performing sort inference
- **/
-
-#include "cvc4_private.h"
-
-#ifndef __CVC4__SORT_INFERENCE_H
-#define __CVC4__SORT_INFERENCE_H
-
-#include <iostream>
-#include <string>
-#include <vector>
-#include <map>
-#include "expr/node.h"
-#include "expr/type_node.h"
-
-namespace CVC4 {
-
-class SortInference{
-private:
- //for debugging
- //std::map< int, std::vector< Node > > d_type_eq_class;
-private:
- int sortCount;
- std::map< int, int > d_type_union_find;
- std::map< int, TypeNode > d_type_types;
- std::map< TypeNode, int > d_id_for_types;
- //for apply uf operators
- std::map< Node, int > d_op_return_types;
- std::map< Node, std::vector< int > > d_op_arg_types;
- //for bound variables
- std::map< Node, std::map< Node, int > > d_var_types;
- //get representative
- int getRepresentative( int t );
- void setEqual( int t1, int t2 );
- int getIdForType( TypeNode tn );
- void printSort( const char* c, int t );
- //process
- int process( Node n, std::map< Node, Node >& var_bound );
-private:
- //mapping from old symbols to new symbols
- std::map< Node, Node > d_symbol_map;
- //mapping from constants to new symbols
- std::map< TypeNode, std::map< Node, Node > > d_const_map;
- //number of subtypes generated
- std::map< TypeNode, int > d_subtype_count;
- //helper functions for simplify
- TypeNode getOrCreateTypeForId( int t, TypeNode pref );
- TypeNode getTypeForId( int t );
- Node getNewSymbol( Node old, TypeNode tn );
- //simplify
- Node simplify( Node n, std::map< Node, Node >& var_bound );
-public:
- SortInference() : sortCount( 0 ){}
- ~SortInference(){}
-
- void simplify( std::vector< Node >& assertions, bool doRewrite = false );
-};
-
-}
-
-#endif
+/********************* */
+/*! \file sort_inference.h
+ ** \verbatim
+ ** Original author: Andrew Reynolds <andrew.j.reynolds@gmail.com>
+ ** Major contributors: Morgan Deters <mdeters@cs.nyu.edu>
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2013 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief Pre-process step for performing sort inference
+ **/
+
+#include "cvc4_private.h"
+
+#ifndef __CVC4__SORT_INFERENCE_H
+#define __CVC4__SORT_INFERENCE_H
+
+#include <iostream>
+#include <string>
+#include <vector>
+#include <map>
+#include "expr/node.h"
+#include "expr/type_node.h"
+
+namespace CVC4 {
+
+class SortInference{
+private:
+ //for debugging
+ //std::map< int, std::vector< Node > > d_type_eq_class;
+private:
+ int sortCount;
+ std::map< int, int > d_type_union_find;
+ std::map< int, TypeNode > d_type_types;
+ std::map< TypeNode, int > d_id_for_types;
+ //for apply uf operators
+ std::map< Node, int > d_op_return_types;
+ std::map< Node, std::vector< int > > d_op_arg_types;
+ //for bound variables
+ std::map< Node, std::map< Node, int > > d_var_types;
+ //get representative
+ int getRepresentative( int t );
+ void setEqual( int t1, int t2 );
+ int getIdForType( TypeNode tn );
+ void printSort( const char* c, int t );
+ //process
+ int process( Node n, std::map< Node, Node >& var_bound );
+private:
+ //mapping from old symbols to new symbols
+ std::map< Node, Node > d_symbol_map;
+ //mapping from constants to new symbols
+ std::map< TypeNode, std::map< Node, Node > > d_const_map;
+ //number of subtypes generated
+ std::map< TypeNode, int > d_subtype_count;
+ //helper functions for simplify
+ TypeNode getOrCreateTypeForId( int t, TypeNode pref );
+ TypeNode getTypeForId( int t );
+ Node getNewSymbol( Node old, TypeNode tn );
+ //simplify
+ Node simplify( Node n, std::map< Node, Node >& var_bound );
+public:
+ SortInference() : sortCount( 0 ){}
+ ~SortInference(){}
+
+ void simplify( std::vector< Node >& assertions, bool doRewrite = false );
+ int getSortId( Node n );
+ int getSortId( Node f, Node v );
+ //set that sk is the skolem variable of v for quantifier f
+ void setSkolemVar( Node f, Node v, Node sk );
+};
+
+}
+
+#endif
diff --git a/src/util/tls.h.in b/src/util/tls.h.in
index 17f1f1d6e..935586f77 100644
--- a/src/util/tls.h.in
+++ b/src/util/tls.h.in
@@ -1,5 +1,5 @@
/********************* */
-/*! \file tls.h
+/*! \file tls.h.in
** \verbatim
** Original author: mdeters
** Major contributors: none
diff --git a/test/regress/regress0/Makefile.am b/test/regress/regress0/Makefile.am
index 938e7e5c1..cc385327e 100644
--- a/test/regress/regress0/Makefile.am
+++ b/test/regress/regress0/Makefile.am
@@ -143,14 +143,15 @@ BUG_TESTS = \
bug421.smt2 \
bug421b.smt2 \
bug425.cvc \
- bug480.smt2
-# bug486.cvc
+ bug480.smt2 \
+ bug486.cvc
TESTS = $(SMT_TESTS) $(SMT2_TESTS) $(CVC_TESTS) $(TPTP_TESTS) $(BUG_TESTS)
EXTRA_DIST = $(TESTS) \
simplification_bug4.smt2.expect \
- bug216.smt2.expect
+ bug216.smt2.expect \
+ bug484.smt2
if CVC4_BUILD_PROFILE_COMPETITION
else
diff --git a/test/regress/regress0/arith/Makefile.am b/test/regress/regress0/arith/Makefile.am
index 4df0543f5..40f04b239 100644
--- a/test/regress/regress0/arith/Makefile.am
+++ b/test/regress/regress0/arith/Makefile.am
@@ -23,7 +23,6 @@ TESTS = \
delta-minimized-row-vector-bug.smt \
fuzz_3-eq.smt \
leq.01.smt \
- miplibtrick.smt \
DTP_k2_n35_c175_s15.smt2 \
mod.01.smt2 \
mod.02.smt2 \
@@ -39,10 +38,21 @@ TESTS = \
div.09.smt2 \
mult.01.smt2 \
mult.02.smt2 \
- bug443.delta01.smt
+ bug443.delta01.smt \
+ miplib.cvc \
+ miplib2.cvc \
+ miplib3.cvc \
+ miplib4.cvc \
+ miplibtrick.smt
# problem__003.smt2
-EXTRA_DIST = $(TESTS)
+EXTRA_DIST = $(TESTS) \
+ miplib-opt1217--27.smt \
+ miplib-opt1217--27.smt2 \
+ miplib-pp08a-3000.smt \
+ miplib-pp08a-3000.smt2 \
+ miplib-opt1217--27.smt.expect \
+ miplib-pp08a-3000.smt.expect
#if CVC4_BUILD_PROFILE_COMPETITION
#else
diff --git a/test/regress/regress0/arith/miplib-opt1217--27.smt b/test/regress/regress0/arith/miplib-opt1217--27.smt
new file mode 100644
index 000000000..f942cbc75
--- /dev/null
+++ b/test/regress/regress0/arith/miplib-opt1217--27.smt
@@ -0,0 +1,4669 @@
+(benchmark mip_opt1217
+:source {
+Relaxation of the Mixed-Integer Programming
+optimization problem opt1217 from the MIPLIB (http://miplib.zib.de/)
+by Enric Rodriguez-Carbonell (erodri@lsi.upc.edu)
+}
+ :status unsat
+ :category { industrial }
+ :difficulty { 5 }
+ :logic QF_LRA
+
+ :extrafuns ((tmp766 Real))
+ :extrafuns ((tmp765 Real))
+ :extrafuns ((tmp764 Real))
+ :extrafuns ((tmp763 Real))
+ :extrafuns ((tmp762 Real))
+ :extrafuns ((tmp761 Real))
+ :extrafuns ((tmp760 Real))
+ :extrafuns ((tmp759 Real))
+ :extrafuns ((tmp758 Real))
+ :extrafuns ((tmp757 Real))
+ :extrafuns ((tmp756 Real))
+ :extrafuns ((tmp755 Real))
+ :extrafuns ((tmp754 Real))
+ :extrafuns ((tmp753 Real))
+ :extrafuns ((tmp752 Real))
+ :extrafuns ((tmp751 Real))
+ :extrafuns ((tmp750 Real))
+ :extrafuns ((tmp749 Real))
+ :extrafuns ((tmp748 Real))
+ :extrafuns ((tmp747 Real))
+ :extrafuns ((tmp746 Real))
+ :extrafuns ((tmp745 Real))
+ :extrafuns ((tmp744 Real))
+ :extrafuns ((tmp743 Real))
+ :extrafuns ((tmp742 Real))
+ :extrafuns ((tmp741 Real))
+ :extrafuns ((tmp740 Real))
+ :extrafuns ((tmp739 Real))
+ :extrafuns ((tmp738 Real))
+ :extrafuns ((tmp737 Real))
+ :extrafuns ((tmp736 Real))
+ :extrafuns ((tmp735 Real))
+ :extrafuns ((tmp734 Real))
+ :extrafuns ((tmp733 Real))
+ :extrafuns ((tmp732 Real))
+ :extrafuns ((tmp731 Real))
+ :extrafuns ((tmp730 Real))
+ :extrafuns ((tmp729 Real))
+ :extrafuns ((tmp728 Real))
+ :extrafuns ((tmp727 Real))
+ :extrafuns ((tmp726 Real))
+ :extrafuns ((tmp725 Real))
+ :extrafuns ((tmp724 Real))
+ :extrafuns ((tmp723 Real))
+ :extrafuns ((tmp722 Real))
+ :extrafuns ((tmp721 Real))
+ :extrafuns ((tmp720 Real))
+ :extrafuns ((tmp719 Real))
+ :extrafuns ((tmp718 Real))
+ :extrafuns ((tmp717 Real))
+ :extrafuns ((tmp716 Real))
+ :extrafuns ((tmp715 Real))
+ :extrafuns ((tmp714 Real))
+ :extrafuns ((tmp713 Real))
+ :extrafuns ((tmp712 Real))
+ :extrafuns ((tmp711 Real))
+ :extrafuns ((tmp710 Real))
+ :extrafuns ((tmp709 Real))
+ :extrafuns ((tmp708 Real))
+ :extrafuns ((tmp707 Real))
+ :extrafuns ((tmp706 Real))
+ :extrafuns ((tmp705 Real))
+ :extrafuns ((tmp704 Real))
+ :extrafuns ((tmp703 Real))
+ :extrafuns ((tmp702 Real))
+ :extrafuns ((tmp701 Real))
+ :extrafuns ((tmp700 Real))
+ :extrafuns ((tmp699 Real))
+ :extrafuns ((tmp698 Real))
+ :extrafuns ((tmp697 Real))
+ :extrafuns ((tmp696 Real))
+ :extrafuns ((tmp695 Real))
+ :extrafuns ((tmp694 Real))
+ :extrafuns ((tmp693 Real))
+ :extrafuns ((tmp692 Real))
+ :extrafuns ((tmp691 Real))
+ :extrafuns ((tmp690 Real))
+ :extrafuns ((tmp689 Real))
+ :extrafuns ((tmp688 Real))
+ :extrafuns ((tmp687 Real))
+ :extrafuns ((tmp686 Real))
+ :extrafuns ((tmp685 Real))
+ :extrafuns ((tmp684 Real))
+ :extrafuns ((tmp683 Real))
+ :extrafuns ((tmp682 Real))
+ :extrafuns ((tmp681 Real))
+ :extrafuns ((tmp680 Real))
+ :extrafuns ((tmp679 Real))
+ :extrafuns ((tmp678 Real))
+ :extrafuns ((tmp677 Real))
+ :extrafuns ((tmp676 Real))
+ :extrafuns ((tmp675 Real))
+ :extrafuns ((tmp674 Real))
+ :extrafuns ((tmp673 Real))
+ :extrafuns ((tmp672 Real))
+ :extrafuns ((tmp671 Real))
+ :extrafuns ((tmp670 Real))
+ :extrafuns ((tmp669 Real))
+ :extrafuns ((tmp668 Real))
+ :extrafuns ((tmp667 Real))
+ :extrafuns ((tmp666 Real))
+ :extrafuns ((tmp665 Real))
+ :extrafuns ((tmp664 Real))
+ :extrafuns ((tmp663 Real))
+ :extrafuns ((tmp662 Real))
+ :extrafuns ((tmp661 Real))
+ :extrafuns ((tmp660 Real))
+ :extrafuns ((tmp659 Real))
+ :extrafuns ((tmp658 Real))
+ :extrafuns ((tmp657 Real))
+ :extrafuns ((tmp656 Real))
+ :extrafuns ((tmp655 Real))
+ :extrafuns ((tmp654 Real))
+ :extrafuns ((tmp653 Real))
+ :extrafuns ((tmp652 Real))
+ :extrafuns ((tmp651 Real))
+ :extrafuns ((tmp650 Real))
+ :extrafuns ((tmp649 Real))
+ :extrafuns ((tmp648 Real))
+ :extrafuns ((tmp647 Real))
+ :extrafuns ((tmp646 Real))
+ :extrafuns ((tmp645 Real))
+ :extrafuns ((tmp644 Real))
+ :extrafuns ((tmp643 Real))
+ :extrafuns ((tmp642 Real))
+ :extrafuns ((tmp641 Real))
+ :extrafuns ((tmp640 Real))
+ :extrafuns ((tmp639 Real))
+ :extrafuns ((tmp638 Real))
+ :extrafuns ((tmp637 Real))
+ :extrafuns ((tmp636 Real))
+ :extrafuns ((tmp635 Real))
+ :extrafuns ((tmp634 Real))
+ :extrafuns ((tmp633 Real))
+ :extrafuns ((tmp632 Real))
+ :extrafuns ((tmp631 Real))
+ :extrafuns ((tmp630 Real))
+ :extrafuns ((tmp629 Real))
+ :extrafuns ((tmp628 Real))
+ :extrafuns ((tmp627 Real))
+ :extrafuns ((tmp626 Real))
+ :extrafuns ((tmp625 Real))
+ :extrafuns ((tmp624 Real))
+ :extrafuns ((tmp623 Real))
+ :extrafuns ((tmp622 Real))
+ :extrafuns ((tmp621 Real))
+ :extrafuns ((tmp620 Real))
+ :extrafuns ((tmp619 Real))
+ :extrafuns ((tmp618 Real))
+ :extrafuns ((tmp617 Real))
+ :extrafuns ((tmp616 Real))
+ :extrafuns ((tmp615 Real))
+ :extrafuns ((tmp614 Real))
+ :extrafuns ((tmp613 Real))
+ :extrafuns ((tmp612 Real))
+ :extrafuns ((tmp611 Real))
+ :extrafuns ((tmp610 Real))
+ :extrafuns ((tmp609 Real))
+ :extrafuns ((tmp608 Real))
+ :extrafuns ((tmp607 Real))
+ :extrafuns ((tmp606 Real))
+ :extrafuns ((tmp605 Real))
+ :extrafuns ((tmp604 Real))
+ :extrafuns ((tmp603 Real))
+ :extrafuns ((tmp602 Real))
+ :extrafuns ((tmp601 Real))
+ :extrafuns ((tmp600 Real))
+ :extrafuns ((tmp599 Real))
+ :extrafuns ((tmp598 Real))
+ :extrafuns ((tmp597 Real))
+ :extrafuns ((tmp596 Real))
+ :extrafuns ((tmp595 Real))
+ :extrafuns ((tmp594 Real))
+ :extrafuns ((tmp593 Real))
+ :extrafuns ((tmp592 Real))
+ :extrafuns ((tmp591 Real))
+ :extrafuns ((tmp590 Real))
+ :extrafuns ((tmp589 Real))
+ :extrafuns ((tmp588 Real))
+ :extrafuns ((tmp587 Real))
+ :extrafuns ((tmp586 Real))
+ :extrafuns ((tmp585 Real))
+ :extrafuns ((tmp584 Real))
+ :extrafuns ((tmp583 Real))
+ :extrafuns ((tmp582 Real))
+ :extrafuns ((tmp581 Real))
+ :extrafuns ((tmp580 Real))
+ :extrafuns ((tmp579 Real))
+ :extrafuns ((tmp578 Real))
+ :extrafuns ((tmp577 Real))
+ :extrafuns ((tmp576 Real))
+ :extrafuns ((tmp575 Real))
+ :extrafuns ((tmp574 Real))
+ :extrafuns ((tmp573 Real))
+ :extrafuns ((tmp572 Real))
+ :extrafuns ((tmp571 Real))
+ :extrafuns ((tmp570 Real))
+ :extrafuns ((tmp569 Real))
+ :extrafuns ((tmp568 Real))
+ :extrafuns ((tmp567 Real))
+ :extrafuns ((tmp566 Real))
+ :extrafuns ((tmp565 Real))
+ :extrafuns ((tmp564 Real))
+ :extrafuns ((tmp563 Real))
+ :extrafuns ((tmp562 Real))
+ :extrafuns ((tmp561 Real))
+ :extrafuns ((tmp560 Real))
+ :extrafuns ((tmp559 Real))
+ :extrafuns ((tmp558 Real))
+ :extrafuns ((tmp557 Real))
+ :extrafuns ((tmp556 Real))
+ :extrafuns ((tmp555 Real))
+ :extrafuns ((tmp554 Real))
+ :extrafuns ((tmp553 Real))
+ :extrafuns ((tmp552 Real))
+ :extrafuns ((tmp551 Real))
+ :extrafuns ((tmp550 Real))
+ :extrafuns ((tmp549 Real))
+ :extrafuns ((tmp548 Real))
+ :extrafuns ((tmp547 Real))
+ :extrafuns ((tmp546 Real))
+ :extrafuns ((tmp545 Real))
+ :extrafuns ((tmp544 Real))
+ :extrafuns ((tmp543 Real))
+ :extrafuns ((tmp542 Real))
+ :extrafuns ((tmp541 Real))
+ :extrafuns ((tmp540 Real))
+ :extrafuns ((tmp539 Real))
+ :extrafuns ((tmp538 Real))
+ :extrafuns ((tmp537 Real))
+ :extrafuns ((tmp536 Real))
+ :extrafuns ((tmp535 Real))
+ :extrafuns ((tmp534 Real))
+ :extrafuns ((tmp533 Real))
+ :extrafuns ((tmp532 Real))
+ :extrafuns ((tmp531 Real))
+ :extrafuns ((tmp530 Real))
+ :extrafuns ((tmp529 Real))
+ :extrafuns ((tmp528 Real))
+ :extrafuns ((tmp527 Real))
+ :extrafuns ((tmp526 Real))
+ :extrafuns ((tmp525 Real))
+ :extrafuns ((tmp524 Real))
+ :extrafuns ((tmp523 Real))
+ :extrafuns ((tmp522 Real))
+ :extrafuns ((tmp521 Real))
+ :extrafuns ((tmp520 Real))
+ :extrafuns ((tmp519 Real))
+ :extrafuns ((tmp518 Real))
+ :extrafuns ((tmp517 Real))
+ :extrafuns ((tmp516 Real))
+ :extrafuns ((tmp515 Real))
+ :extrafuns ((tmp514 Real))
+ :extrafuns ((tmp513 Real))
+ :extrafuns ((tmp512 Real))
+ :extrafuns ((tmp511 Real))
+ :extrafuns ((tmp510 Real))
+ :extrafuns ((tmp509 Real))
+ :extrafuns ((tmp508 Real))
+ :extrafuns ((tmp507 Real))
+ :extrafuns ((tmp506 Real))
+ :extrafuns ((tmp505 Real))
+ :extrafuns ((tmp504 Real))
+ :extrafuns ((tmp503 Real))
+ :extrafuns ((tmp502 Real))
+ :extrafuns ((tmp501 Real))
+ :extrafuns ((tmp500 Real))
+ :extrafuns ((tmp499 Real))
+ :extrafuns ((tmp498 Real))
+ :extrafuns ((tmp497 Real))
+ :extrafuns ((tmp496 Real))
+ :extrafuns ((tmp495 Real))
+ :extrafuns ((tmp494 Real))
+ :extrafuns ((tmp493 Real))
+ :extrafuns ((tmp492 Real))
+ :extrafuns ((tmp491 Real))
+ :extrafuns ((tmp490 Real))
+ :extrafuns ((tmp489 Real))
+ :extrafuns ((tmp488 Real))
+ :extrafuns ((tmp487 Real))
+ :extrafuns ((tmp486 Real))
+ :extrafuns ((tmp485 Real))
+ :extrafuns ((tmp484 Real))
+ :extrafuns ((tmp483 Real))
+ :extrafuns ((tmp482 Real))
+ :extrafuns ((tmp481 Real))
+ :extrafuns ((tmp480 Real))
+ :extrafuns ((tmp479 Real))
+ :extrafuns ((tmp478 Real))
+ :extrafuns ((tmp477 Real))
+ :extrafuns ((tmp476 Real))
+ :extrafuns ((tmp475 Real))
+ :extrafuns ((tmp474 Real))
+ :extrafuns ((tmp473 Real))
+ :extrafuns ((tmp472 Real))
+ :extrafuns ((tmp471 Real))
+ :extrafuns ((tmp470 Real))
+ :extrafuns ((tmp469 Real))
+ :extrafuns ((tmp468 Real))
+ :extrafuns ((tmp467 Real))
+ :extrafuns ((tmp466 Real))
+ :extrafuns ((tmp465 Real))
+ :extrafuns ((tmp464 Real))
+ :extrafuns ((tmp463 Real))
+ :extrafuns ((tmp462 Real))
+ :extrafuns ((tmp461 Real))
+ :extrafuns ((tmp460 Real))
+ :extrafuns ((tmp459 Real))
+ :extrafuns ((tmp458 Real))
+ :extrafuns ((tmp457 Real))
+ :extrafuns ((tmp456 Real))
+ :extrafuns ((tmp455 Real))
+ :extrafuns ((tmp454 Real))
+ :extrafuns ((tmp453 Real))
+ :extrafuns ((tmp452 Real))
+ :extrafuns ((tmp451 Real))
+ :extrafuns ((tmp450 Real))
+ :extrafuns ((tmp449 Real))
+ :extrafuns ((tmp448 Real))
+ :extrafuns ((tmp447 Real))
+ :extrafuns ((tmp446 Real))
+ :extrafuns ((tmp445 Real))
+ :extrafuns ((tmp444 Real))
+ :extrafuns ((tmp443 Real))
+ :extrafuns ((tmp442 Real))
+ :extrafuns ((tmp441 Real))
+ :extrafuns ((tmp440 Real))
+ :extrafuns ((tmp439 Real))
+ :extrafuns ((tmp438 Real))
+ :extrafuns ((tmp437 Real))
+ :extrafuns ((tmp436 Real))
+ :extrafuns ((tmp435 Real))
+ :extrafuns ((tmp434 Real))
+ :extrafuns ((tmp433 Real))
+ :extrafuns ((tmp432 Real))
+ :extrafuns ((tmp431 Real))
+ :extrafuns ((tmp430 Real))
+ :extrafuns ((tmp429 Real))
+ :extrafuns ((tmp428 Real))
+ :extrafuns ((tmp427 Real))
+ :extrafuns ((tmp426 Real))
+ :extrafuns ((tmp425 Real))
+ :extrafuns ((tmp424 Real))
+ :extrafuns ((tmp423 Real))
+ :extrafuns ((tmp422 Real))
+ :extrafuns ((tmp421 Real))
+ :extrafuns ((tmp420 Real))
+ :extrafuns ((tmp419 Real))
+ :extrafuns ((tmp418 Real))
+ :extrafuns ((tmp417 Real))
+ :extrafuns ((tmp416 Real))
+ :extrafuns ((tmp415 Real))
+ :extrafuns ((tmp414 Real))
+ :extrafuns ((tmp413 Real))
+ :extrafuns ((tmp412 Real))
+ :extrafuns ((tmp411 Real))
+ :extrafuns ((tmp410 Real))
+ :extrafuns ((tmp409 Real))
+ :extrafuns ((tmp408 Real))
+ :extrafuns ((tmp407 Real))
+ :extrafuns ((tmp406 Real))
+ :extrafuns ((tmp405 Real))
+ :extrafuns ((tmp404 Real))
+ :extrafuns ((tmp403 Real))
+ :extrafuns ((tmp402 Real))
+ :extrafuns ((tmp401 Real))
+ :extrafuns ((tmp400 Real))
+ :extrafuns ((tmp399 Real))
+ :extrafuns ((tmp398 Real))
+ :extrafuns ((tmp397 Real))
+ :extrafuns ((tmp396 Real))
+ :extrafuns ((tmp395 Real))
+ :extrafuns ((tmp394 Real))
+ :extrafuns ((tmp393 Real))
+ :extrafuns ((tmp392 Real))
+ :extrafuns ((tmp391 Real))
+ :extrafuns ((tmp390 Real))
+ :extrafuns ((tmp389 Real))
+ :extrafuns ((tmp388 Real))
+ :extrafuns ((tmp387 Real))
+ :extrafuns ((tmp386 Real))
+ :extrafuns ((tmp385 Real))
+ :extrafuns ((tmp384 Real))
+ :extrafuns ((tmp383 Real))
+ :extrafuns ((tmp382 Real))
+ :extrafuns ((tmp381 Real))
+ :extrafuns ((tmp380 Real))
+ :extrafuns ((tmp379 Real))
+ :extrafuns ((tmp378 Real))
+ :extrafuns ((tmp377 Real))
+ :extrafuns ((tmp376 Real))
+ :extrafuns ((tmp375 Real))
+ :extrafuns ((tmp374 Real))
+ :extrafuns ((tmp373 Real))
+ :extrafuns ((tmp372 Real))
+ :extrafuns ((tmp371 Real))
+ :extrafuns ((tmp370 Real))
+ :extrafuns ((tmp369 Real))
+ :extrafuns ((tmp368 Real))
+ :extrafuns ((tmp367 Real))
+ :extrafuns ((tmp366 Real))
+ :extrafuns ((tmp365 Real))
+ :extrafuns ((tmp364 Real))
+ :extrafuns ((tmp363 Real))
+ :extrafuns ((tmp362 Real))
+ :extrafuns ((tmp361 Real))
+ :extrafuns ((tmp360 Real))
+ :extrafuns ((tmp359 Real))
+ :extrafuns ((tmp358 Real))
+ :extrafuns ((tmp357 Real))
+ :extrafuns ((tmp356 Real))
+ :extrafuns ((tmp355 Real))
+ :extrafuns ((tmp354 Real))
+ :extrafuns ((tmp353 Real))
+ :extrafuns ((tmp352 Real))
+ :extrafuns ((tmp351 Real))
+ :extrafuns ((tmp350 Real))
+ :extrafuns ((tmp349 Real))
+ :extrafuns ((tmp348 Real))
+ :extrafuns ((tmp347 Real))
+ :extrafuns ((tmp346 Real))
+ :extrafuns ((tmp345 Real))
+ :extrafuns ((tmp344 Real))
+ :extrafuns ((tmp343 Real))
+ :extrafuns ((tmp342 Real))
+ :extrafuns ((tmp341 Real))
+ :extrafuns ((tmp340 Real))
+ :extrafuns ((tmp339 Real))
+ :extrafuns ((tmp338 Real))
+ :extrafuns ((tmp337 Real))
+ :extrafuns ((tmp336 Real))
+ :extrafuns ((tmp335 Real))
+ :extrafuns ((tmp334 Real))
+ :extrafuns ((tmp333 Real))
+ :extrafuns ((tmp332 Real))
+ :extrafuns ((tmp331 Real))
+ :extrafuns ((tmp330 Real))
+ :extrafuns ((tmp329 Real))
+ :extrafuns ((tmp328 Real))
+ :extrafuns ((tmp327 Real))
+ :extrafuns ((tmp326 Real))
+ :extrafuns ((tmp325 Real))
+ :extrafuns ((tmp324 Real))
+ :extrafuns ((tmp323 Real))
+ :extrafuns ((tmp322 Real))
+ :extrafuns ((tmp321 Real))
+ :extrafuns ((tmp320 Real))
+ :extrafuns ((tmp319 Real))
+ :extrafuns ((tmp318 Real))
+ :extrafuns ((tmp317 Real))
+ :extrafuns ((tmp316 Real))
+ :extrafuns ((tmp315 Real))
+ :extrafuns ((tmp314 Real))
+ :extrafuns ((tmp313 Real))
+ :extrafuns ((tmp312 Real))
+ :extrafuns ((tmp311 Real))
+ :extrafuns ((tmp310 Real))
+ :extrafuns ((tmp309 Real))
+ :extrafuns ((tmp308 Real))
+ :extrafuns ((tmp307 Real))
+ :extrafuns ((tmp306 Real))
+ :extrafuns ((tmp305 Real))
+ :extrafuns ((tmp304 Real))
+ :extrafuns ((tmp303 Real))
+ :extrafuns ((tmp302 Real))
+ :extrafuns ((tmp301 Real))
+ :extrafuns ((tmp300 Real))
+ :extrafuns ((tmp299 Real))
+ :extrafuns ((tmp298 Real))
+ :extrafuns ((tmp297 Real))
+ :extrafuns ((tmp296 Real))
+ :extrafuns ((tmp295 Real))
+ :extrafuns ((tmp294 Real))
+ :extrafuns ((tmp293 Real))
+ :extrafuns ((tmp292 Real))
+ :extrafuns ((tmp291 Real))
+ :extrafuns ((tmp290 Real))
+ :extrafuns ((tmp289 Real))
+ :extrafuns ((tmp288 Real))
+ :extrafuns ((tmp287 Real))
+ :extrafuns ((tmp286 Real))
+ :extrafuns ((tmp285 Real))
+ :extrafuns ((tmp284 Real))
+ :extrafuns ((tmp283 Real))
+ :extrafuns ((tmp282 Real))
+ :extrafuns ((tmp281 Real))
+ :extrafuns ((tmp280 Real))
+ :extrafuns ((tmp279 Real))
+ :extrafuns ((tmp278 Real))
+ :extrafuns ((tmp277 Real))
+ :extrafuns ((tmp276 Real))
+ :extrafuns ((tmp275 Real))
+ :extrafuns ((tmp274 Real))
+ :extrafuns ((tmp273 Real))
+ :extrafuns ((tmp272 Real))
+ :extrafuns ((tmp271 Real))
+ :extrafuns ((tmp270 Real))
+ :extrafuns ((tmp269 Real))
+ :extrafuns ((tmp268 Real))
+ :extrafuns ((tmp267 Real))
+ :extrafuns ((tmp266 Real))
+ :extrafuns ((tmp265 Real))
+ :extrafuns ((tmp264 Real))
+ :extrafuns ((tmp263 Real))
+ :extrafuns ((tmp262 Real))
+ :extrafuns ((tmp261 Real))
+ :extrafuns ((tmp260 Real))
+ :extrafuns ((tmp259 Real))
+ :extrafuns ((tmp258 Real))
+ :extrafuns ((tmp257 Real))
+ :extrafuns ((tmp256 Real))
+ :extrafuns ((tmp255 Real))
+ :extrafuns ((tmp254 Real))
+ :extrafuns ((tmp253 Real))
+ :extrafuns ((tmp252 Real))
+ :extrafuns ((tmp251 Real))
+ :extrafuns ((tmp250 Real))
+ :extrafuns ((tmp249 Real))
+ :extrafuns ((tmp248 Real))
+ :extrafuns ((tmp247 Real))
+ :extrafuns ((tmp246 Real))
+ :extrafuns ((tmp245 Real))
+ :extrafuns ((tmp244 Real))
+ :extrafuns ((tmp243 Real))
+ :extrafuns ((tmp242 Real))
+ :extrafuns ((tmp241 Real))
+ :extrafuns ((tmp240 Real))
+ :extrafuns ((tmp239 Real))
+ :extrafuns ((tmp238 Real))
+ :extrafuns ((tmp237 Real))
+ :extrafuns ((tmp236 Real))
+ :extrafuns ((tmp235 Real))
+ :extrafuns ((tmp234 Real))
+ :extrafuns ((tmp233 Real))
+ :extrafuns ((tmp232 Real))
+ :extrafuns ((tmp231 Real))
+ :extrafuns ((tmp230 Real))
+ :extrafuns ((tmp229 Real))
+ :extrafuns ((tmp228 Real))
+ :extrafuns ((tmp227 Real))
+ :extrafuns ((tmp226 Real))
+ :extrafuns ((tmp225 Real))
+ :extrafuns ((tmp224 Real))
+ :extrafuns ((tmp223 Real))
+ :extrafuns ((tmp222 Real))
+ :extrafuns ((tmp221 Real))
+ :extrafuns ((tmp220 Real))
+ :extrafuns ((tmp219 Real))
+ :extrafuns ((tmp218 Real))
+ :extrafuns ((tmp217 Real))
+ :extrafuns ((tmp216 Real))
+ :extrafuns ((tmp215 Real))
+ :extrafuns ((tmp214 Real))
+ :extrafuns ((tmp213 Real))
+ :extrafuns ((tmp212 Real))
+ :extrafuns ((tmp211 Real))
+ :extrafuns ((tmp210 Real))
+ :extrafuns ((tmp209 Real))
+ :extrafuns ((tmp208 Real))
+ :extrafuns ((tmp207 Real))
+ :extrafuns ((tmp206 Real))
+ :extrafuns ((tmp205 Real))
+ :extrafuns ((tmp204 Real))
+ :extrafuns ((tmp203 Real))
+ :extrafuns ((tmp202 Real))
+ :extrafuns ((tmp201 Real))
+ :extrafuns ((tmp200 Real))
+ :extrafuns ((tmp199 Real))
+ :extrafuns ((tmp198 Real))
+ :extrafuns ((tmp197 Real))
+ :extrafuns ((tmp196 Real))
+ :extrafuns ((tmp195 Real))
+ :extrafuns ((tmp194 Real))
+ :extrafuns ((tmp193 Real))
+ :extrafuns ((tmp192 Real))
+ :extrafuns ((tmp191 Real))
+ :extrafuns ((tmp190 Real))
+ :extrafuns ((tmp189 Real))
+ :extrafuns ((tmp188 Real))
+ :extrafuns ((tmp187 Real))
+ :extrafuns ((tmp186 Real))
+ :extrafuns ((tmp185 Real))
+ :extrafuns ((tmp184 Real))
+ :extrafuns ((tmp183 Real))
+ :extrafuns ((tmp182 Real))
+ :extrafuns ((tmp181 Real))
+ :extrafuns ((tmp180 Real))
+ :extrafuns ((tmp179 Real))
+ :extrafuns ((tmp178 Real))
+ :extrafuns ((tmp177 Real))
+ :extrafuns ((tmp176 Real))
+ :extrafuns ((tmp175 Real))
+ :extrafuns ((tmp174 Real))
+ :extrafuns ((tmp173 Real))
+ :extrafuns ((tmp172 Real))
+ :extrafuns ((tmp171 Real))
+ :extrafuns ((tmp170 Real))
+ :extrafuns ((tmp169 Real))
+ :extrafuns ((tmp168 Real))
+ :extrafuns ((tmp167 Real))
+ :extrafuns ((tmp166 Real))
+ :extrafuns ((tmp165 Real))
+ :extrafuns ((tmp164 Real))
+ :extrafuns ((tmp163 Real))
+ :extrafuns ((tmp162 Real))
+ :extrafuns ((tmp161 Real))
+ :extrafuns ((tmp160 Real))
+ :extrafuns ((tmp159 Real))
+ :extrafuns ((tmp158 Real))
+ :extrafuns ((tmp157 Real))
+ :extrafuns ((tmp156 Real))
+ :extrafuns ((tmp155 Real))
+ :extrafuns ((tmp154 Real))
+ :extrafuns ((tmp153 Real))
+ :extrafuns ((tmp152 Real))
+ :extrafuns ((tmp151 Real))
+ :extrafuns ((tmp150 Real))
+ :extrafuns ((tmp149 Real))
+ :extrafuns ((tmp148 Real))
+ :extrafuns ((tmp147 Real))
+ :extrafuns ((tmp146 Real))
+ :extrafuns ((tmp145 Real))
+ :extrafuns ((tmp144 Real))
+ :extrafuns ((tmp143 Real))
+ :extrafuns ((tmp142 Real))
+ :extrafuns ((tmp141 Real))
+ :extrafuns ((tmp140 Real))
+ :extrafuns ((tmp139 Real))
+ :extrafuns ((tmp138 Real))
+ :extrafuns ((tmp137 Real))
+ :extrafuns ((tmp136 Real))
+ :extrafuns ((tmp135 Real))
+ :extrafuns ((tmp134 Real))
+ :extrafuns ((tmp133 Real))
+ :extrafuns ((tmp132 Real))
+ :extrafuns ((tmp131 Real))
+ :extrafuns ((tmp130 Real))
+ :extrafuns ((tmp129 Real))
+ :extrafuns ((tmp128 Real))
+ :extrafuns ((tmp127 Real))
+ :extrafuns ((tmp126 Real))
+ :extrafuns ((tmp125 Real))
+ :extrafuns ((tmp124 Real))
+ :extrafuns ((tmp123 Real))
+ :extrafuns ((tmp122 Real))
+ :extrafuns ((tmp121 Real))
+ :extrafuns ((tmp120 Real))
+ :extrafuns ((tmp119 Real))
+ :extrafuns ((tmp118 Real))
+ :extrafuns ((tmp117 Real))
+ :extrafuns ((tmp116 Real))
+ :extrafuns ((tmp115 Real))
+ :extrafuns ((tmp114 Real))
+ :extrafuns ((tmp113 Real))
+ :extrafuns ((tmp112 Real))
+ :extrafuns ((tmp111 Real))
+ :extrafuns ((tmp110 Real))
+ :extrafuns ((tmp109 Real))
+ :extrafuns ((tmp108 Real))
+ :extrafuns ((tmp107 Real))
+ :extrafuns ((tmp106 Real))
+ :extrafuns ((tmp105 Real))
+ :extrafuns ((tmp104 Real))
+ :extrafuns ((tmp103 Real))
+ :extrafuns ((tmp102 Real))
+ :extrafuns ((tmp101 Real))
+ :extrafuns ((tmp100 Real))
+ :extrafuns ((tmp99 Real))
+ :extrafuns ((tmp98 Real))
+ :extrafuns ((tmp97 Real))
+ :extrafuns ((tmp96 Real))
+ :extrafuns ((tmp95 Real))
+ :extrafuns ((tmp94 Real))
+ :extrafuns ((tmp93 Real))
+ :extrafuns ((tmp92 Real))
+ :extrafuns ((tmp91 Real))
+ :extrafuns ((tmp90 Real))
+ :extrafuns ((tmp89 Real))
+ :extrafuns ((tmp88 Real))
+ :extrafuns ((tmp87 Real))
+ :extrafuns ((tmp86 Real))
+ :extrafuns ((tmp85 Real))
+ :extrafuns ((tmp84 Real))
+ :extrafuns ((tmp83 Real))
+ :extrafuns ((tmp82 Real))
+ :extrafuns ((tmp81 Real))
+ :extrafuns ((tmp80 Real))
+ :extrafuns ((tmp79 Real))
+ :extrafuns ((tmp78 Real))
+ :extrafuns ((tmp77 Real))
+ :extrafuns ((tmp76 Real))
+ :extrafuns ((tmp75 Real))
+ :extrafuns ((tmp74 Real))
+ :extrafuns ((tmp73 Real))
+ :extrafuns ((tmp72 Real))
+ :extrafuns ((tmp71 Real))
+ :extrafuns ((tmp70 Real))
+ :extrafuns ((tmp69 Real))
+ :extrafuns ((tmp68 Real))
+ :extrafuns ((tmp67 Real))
+ :extrafuns ((tmp66 Real))
+ :extrafuns ((tmp65 Real))
+ :extrafuns ((tmp64 Real))
+ :extrafuns ((tmp63 Real))
+ :extrafuns ((tmp62 Real))
+ :extrafuns ((tmp61 Real))
+ :extrafuns ((tmp60 Real))
+ :extrafuns ((tmp59 Real))
+ :extrafuns ((tmp58 Real))
+ :extrafuns ((tmp57 Real))
+ :extrafuns ((tmp56 Real))
+ :extrafuns ((tmp55 Real))
+ :extrafuns ((tmp54 Real))
+ :extrafuns ((tmp53 Real))
+ :extrafuns ((tmp52 Real))
+ :extrafuns ((tmp51 Real))
+ :extrafuns ((tmp50 Real))
+ :extrafuns ((tmp49 Real))
+ :extrafuns ((tmp48 Real))
+ :extrafuns ((tmp47 Real))
+ :extrafuns ((tmp46 Real))
+ :extrafuns ((tmp45 Real))
+ :extrafuns ((tmp44 Real))
+ :extrafuns ((tmp43 Real))
+ :extrafuns ((tmp42 Real))
+ :extrafuns ((tmp41 Real))
+ :extrafuns ((tmp40 Real))
+ :extrafuns ((tmp39 Real))
+ :extrafuns ((tmp38 Real))
+ :extrafuns ((tmp37 Real))
+ :extrafuns ((tmp36 Real))
+ :extrafuns ((tmp35 Real))
+ :extrafuns ((tmp34 Real))
+ :extrafuns ((tmp33 Real))
+ :extrafuns ((tmp32 Real))
+ :extrafuns ((tmp31 Real))
+ :extrafuns ((tmp30 Real))
+ :extrafuns ((tmp29 Real))
+ :extrafuns ((tmp28 Real))
+ :extrafuns ((tmp27 Real))
+ :extrafuns ((tmp26 Real))
+ :extrafuns ((tmp25 Real))
+ :extrafuns ((tmp24 Real))
+ :extrafuns ((tmp23 Real))
+ :extrafuns ((tmp22 Real))
+ :extrafuns ((tmp21 Real))
+ :extrafuns ((tmp20 Real))
+ :extrafuns ((tmp19 Real))
+ :extrafuns ((tmp18 Real))
+ :extrafuns ((tmp17 Real))
+ :extrafuns ((tmp16 Real))
+ :extrafuns ((tmp15 Real))
+ :extrafuns ((tmp14 Real))
+ :extrafuns ((tmp13 Real))
+ :extrafuns ((tmp12 Real))
+ :extrafuns ((tmp11 Real))
+ :extrafuns ((tmp10 Real))
+ :extrafuns ((tmp9 Real))
+ :extrafuns ((tmp8 Real))
+ :extrafuns ((tmp7 Real))
+ :extrafuns ((tmp6 Real))
+ :extrafuns ((tmp5 Real))
+ :extrafuns ((tmp4 Real))
+ :extrafuns ((tmp3 Real))
+ :extrafuns ((tmp2 Real))
+ :extrafuns ((tmp1 Real))
+ :extrafuns ((x1 Real))
+ :extrapreds ((x2))
+ :extrapreds ((x3))
+ :extrapreds ((x4))
+ :extrapreds ((x5))
+ :extrapreds ((x6))
+ :extrapreds ((x7))
+ :extrapreds ((x8))
+ :extrapreds ((x9))
+ :extrapreds ((x10))
+ :extrapreds ((x11))
+ :extrapreds ((x12))
+ :extrapreds ((x13))
+ :extrapreds ((x14))
+ :extrapreds ((x15))
+ :extrapreds ((x16))
+ :extrapreds ((x17))
+ :extrapreds ((x18))
+ :extrapreds ((x19))
+ :extrapreds ((x20))
+ :extrapreds ((x21))
+ :extrapreds ((x22))
+ :extrapreds ((x23))
+ :extrapreds ((x24))
+ :extrapreds ((x25))
+ :extrapreds ((x26))
+ :extrapreds ((x27))
+ :extrapreds ((x28))
+ :extrapreds ((x29))
+ :extrapreds ((x30))
+ :extrapreds ((x31))
+ :extrapreds ((x32))
+ :extrapreds ((x33))
+ :extrapreds ((x34))
+ :extrapreds ((x35))
+ :extrapreds ((x36))
+ :extrapreds ((x37))
+ :extrapreds ((x38))
+ :extrapreds ((x39))
+ :extrapreds ((x40))
+ :extrapreds ((x41))
+ :extrapreds ((x42))
+ :extrapreds ((x43))
+ :extrapreds ((x44))
+ :extrapreds ((x45))
+ :extrapreds ((x46))
+ :extrapreds ((x47))
+ :extrapreds ((x48))
+ :extrapreds ((x49))
+ :extrapreds ((x50))
+ :extrapreds ((x51))
+ :extrapreds ((x52))
+ :extrapreds ((x53))
+ :extrapreds ((x54))
+ :extrapreds ((x55))
+ :extrapreds ((x56))
+ :extrapreds ((x57))
+ :extrapreds ((x58))
+ :extrapreds ((x59))
+ :extrapreds ((x60))
+ :extrapreds ((x61))
+ :extrapreds ((x62))
+ :extrapreds ((x63))
+ :extrapreds ((x64))
+ :extrapreds ((x65))
+ :extrapreds ((x66))
+ :extrapreds ((x67))
+ :extrapreds ((x68))
+ :extrapreds ((x69))
+ :extrapreds ((x70))
+ :extrapreds ((x71))
+ :extrapreds ((x72))
+ :extrapreds ((x73))
+ :extrapreds ((x74))
+ :extrapreds ((x75))
+ :extrapreds ((x76))
+ :extrapreds ((x77))
+ :extrapreds ((x78))
+ :extrapreds ((x79))
+ :extrapreds ((x80))
+ :extrapreds ((x81))
+ :extrapreds ((x82))
+ :extrapreds ((x83))
+ :extrapreds ((x84))
+ :extrapreds ((x85))
+ :extrapreds ((x86))
+ :extrapreds ((x87))
+ :extrapreds ((x88))
+ :extrapreds ((x89))
+ :extrapreds ((x90))
+ :extrapreds ((x91))
+ :extrapreds ((x92))
+ :extrapreds ((x93))
+ :extrapreds ((x94))
+ :extrapreds ((x95))
+ :extrapreds ((x96))
+ :extrapreds ((x97))
+ :extrapreds ((x98))
+ :extrapreds ((x99))
+ :extrapreds ((x100))
+ :extrapreds ((x101))
+ :extrapreds ((x102))
+ :extrapreds ((x103))
+ :extrapreds ((x104))
+ :extrapreds ((x105))
+ :extrapreds ((x106))
+ :extrapreds ((x107))
+ :extrapreds ((x108))
+ :extrapreds ((x109))
+ :extrapreds ((x110))
+ :extrapreds ((x111))
+ :extrapreds ((x112))
+ :extrapreds ((x113))
+ :extrapreds ((x114))
+ :extrapreds ((x115))
+ :extrapreds ((x116))
+ :extrapreds ((x117))
+ :extrapreds ((x118))
+ :extrapreds ((x119))
+ :extrapreds ((x120))
+ :extrapreds ((x121))
+ :extrapreds ((x122))
+ :extrapreds ((x123))
+ :extrapreds ((x124))
+ :extrapreds ((x125))
+ :extrapreds ((x126))
+ :extrapreds ((x127))
+ :extrapreds ((x128))
+ :extrapreds ((x129))
+ :extrapreds ((x130))
+ :extrapreds ((x131))
+ :extrapreds ((x132))
+ :extrapreds ((x133))
+ :extrapreds ((x134))
+ :extrapreds ((x135))
+ :extrapreds ((x136))
+ :extrapreds ((x137))
+ :extrapreds ((x138))
+ :extrapreds ((x139))
+ :extrapreds ((x140))
+ :extrapreds ((x141))
+ :extrapreds ((x142))
+ :extrapreds ((x143))
+ :extrapreds ((x144))
+ :extrapreds ((x145))
+ :extrapreds ((x146))
+ :extrapreds ((x147))
+ :extrapreds ((x148))
+ :extrapreds ((x149))
+ :extrapreds ((x150))
+ :extrapreds ((x151))
+ :extrapreds ((x152))
+ :extrapreds ((x153))
+ :extrapreds ((x154))
+ :extrapreds ((x155))
+ :extrapreds ((x156))
+ :extrapreds ((x157))
+ :extrapreds ((x158))
+ :extrapreds ((x159))
+ :extrapreds ((x160))
+ :extrapreds ((x161))
+ :extrapreds ((x162))
+ :extrapreds ((x163))
+ :extrapreds ((x164))
+ :extrapreds ((x165))
+ :extrapreds ((x166))
+ :extrapreds ((x167))
+ :extrapreds ((x168))
+ :extrapreds ((x169))
+ :extrapreds ((x170))
+ :extrapreds ((x171))
+ :extrapreds ((x172))
+ :extrapreds ((x173))
+ :extrapreds ((x174))
+ :extrapreds ((x175))
+ :extrapreds ((x176))
+ :extrapreds ((x177))
+ :extrapreds ((x178))
+ :extrapreds ((x179))
+ :extrapreds ((x180))
+ :extrapreds ((x181))
+ :extrapreds ((x182))
+ :extrapreds ((x183))
+ :extrapreds ((x184))
+ :extrapreds ((x185))
+ :extrapreds ((x186))
+ :extrapreds ((x187))
+ :extrapreds ((x188))
+ :extrapreds ((x189))
+ :extrapreds ((x190))
+ :extrapreds ((x191))
+ :extrapreds ((x192))
+ :extrapreds ((x193))
+ :extrapreds ((x194))
+ :extrapreds ((x195))
+ :extrapreds ((x196))
+ :extrapreds ((x197))
+ :extrapreds ((x198))
+ :extrapreds ((x199))
+ :extrapreds ((x200))
+ :extrapreds ((x201))
+ :extrapreds ((x202))
+ :extrapreds ((x203))
+ :extrapreds ((x204))
+ :extrapreds ((x205))
+ :extrapreds ((x206))
+ :extrapreds ((x207))
+ :extrapreds ((x208))
+ :extrapreds ((x209))
+ :extrapreds ((x210))
+ :extrapreds ((x211))
+ :extrapreds ((x212))
+ :extrapreds ((x213))
+ :extrapreds ((x214))
+ :extrapreds ((x215))
+ :extrapreds ((x216))
+ :extrapreds ((x217))
+ :extrapreds ((x218))
+ :extrapreds ((x219))
+ :extrapreds ((x220))
+ :extrapreds ((x221))
+ :extrapreds ((x222))
+ :extrapreds ((x223))
+ :extrapreds ((x224))
+ :extrapreds ((x225))
+ :extrapreds ((x226))
+ :extrapreds ((x227))
+ :extrapreds ((x228))
+ :extrapreds ((x229))
+ :extrapreds ((x230))
+ :extrapreds ((x231))
+ :extrapreds ((x232))
+ :extrapreds ((x233))
+ :extrapreds ((x234))
+ :extrapreds ((x235))
+ :extrapreds ((x236))
+ :extrapreds ((x237))
+ :extrapreds ((x238))
+ :extrapreds ((x239))
+ :extrapreds ((x240))
+ :extrapreds ((x241))
+ :extrapreds ((x242))
+ :extrapreds ((x243))
+ :extrapreds ((x244))
+ :extrapreds ((x245))
+ :extrapreds ((x246))
+ :extrapreds ((x247))
+ :extrapreds ((x248))
+ :extrapreds ((x249))
+ :extrapreds ((x250))
+ :extrapreds ((x251))
+ :extrapreds ((x252))
+ :extrapreds ((x253))
+ :extrapreds ((x254))
+ :extrapreds ((x255))
+ :extrapreds ((x256))
+ :extrapreds ((x257))
+ :extrapreds ((x258))
+ :extrapreds ((x259))
+ :extrapreds ((x260))
+ :extrapreds ((x261))
+ :extrapreds ((x262))
+ :extrapreds ((x263))
+ :extrapreds ((x264))
+ :extrapreds ((x265))
+ :extrapreds ((x266))
+ :extrapreds ((x267))
+ :extrapreds ((x268))
+ :extrapreds ((x269))
+ :extrapreds ((x270))
+ :extrapreds ((x271))
+ :extrapreds ((x272))
+ :extrapreds ((x273))
+ :extrapreds ((x274))
+ :extrapreds ((x275))
+ :extrapreds ((x276))
+ :extrapreds ((x277))
+ :extrapreds ((x278))
+ :extrapreds ((x279))
+ :extrapreds ((x280))
+ :extrapreds ((x281))
+ :extrapreds ((x282))
+ :extrapreds ((x283))
+ :extrapreds ((x284))
+ :extrapreds ((x285))
+ :extrapreds ((x286))
+ :extrapreds ((x287))
+ :extrapreds ((x288))
+ :extrapreds ((x289))
+ :extrapreds ((x290))
+ :extrapreds ((x291))
+ :extrapreds ((x292))
+ :extrapreds ((x293))
+ :extrapreds ((x294))
+ :extrapreds ((x295))
+ :extrapreds ((x296))
+ :extrapreds ((x297))
+ :extrapreds ((x298))
+ :extrapreds ((x299))
+ :extrapreds ((x300))
+ :extrapreds ((x301))
+ :extrapreds ((x302))
+ :extrapreds ((x303))
+ :extrapreds ((x304))
+ :extrapreds ((x305))
+ :extrapreds ((x306))
+ :extrapreds ((x307))
+ :extrapreds ((x308))
+ :extrapreds ((x309))
+ :extrapreds ((x310))
+ :extrapreds ((x311))
+ :extrapreds ((x312))
+ :extrapreds ((x313))
+ :extrapreds ((x314))
+ :extrapreds ((x315))
+ :extrapreds ((x316))
+ :extrapreds ((x317))
+ :extrapreds ((x318))
+ :extrapreds ((x319))
+ :extrapreds ((x320))
+ :extrapreds ((x321))
+ :extrapreds ((x322))
+ :extrapreds ((x323))
+ :extrapreds ((x324))
+ :extrapreds ((x325))
+ :extrapreds ((x326))
+ :extrapreds ((x327))
+ :extrapreds ((x328))
+ :extrapreds ((x329))
+ :extrapreds ((x330))
+ :extrapreds ((x331))
+ :extrapreds ((x332))
+ :extrapreds ((x333))
+ :extrapreds ((x334))
+ :extrapreds ((x335))
+ :extrapreds ((x336))
+ :extrapreds ((x337))
+ :extrapreds ((x338))
+ :extrapreds ((x339))
+ :extrapreds ((x340))
+ :extrapreds ((x341))
+ :extrapreds ((x342))
+ :extrapreds ((x343))
+ :extrapreds ((x344))
+ :extrapreds ((x345))
+ :extrapreds ((x346))
+ :extrapreds ((x347))
+ :extrapreds ((x348))
+ :extrapreds ((x349))
+ :extrapreds ((x350))
+ :extrapreds ((x351))
+ :extrapreds ((x352))
+ :extrapreds ((x353))
+ :extrapreds ((x354))
+ :extrapreds ((x355))
+ :extrapreds ((x356))
+ :extrapreds ((x357))
+ :extrapreds ((x358))
+ :extrapreds ((x359))
+ :extrapreds ((x360))
+ :extrapreds ((x361))
+ :extrapreds ((x362))
+ :extrapreds ((x363))
+ :extrapreds ((x364))
+ :extrapreds ((x365))
+ :extrapreds ((x366))
+ :extrapreds ((x367))
+ :extrapreds ((x368))
+ :extrapreds ((x369))
+ :extrapreds ((x370))
+ :extrapreds ((x371))
+ :extrapreds ((x372))
+ :extrapreds ((x373))
+ :extrapreds ((x374))
+ :extrapreds ((x375))
+ :extrapreds ((x376))
+ :extrapreds ((x377))
+ :extrapreds ((x378))
+ :extrapreds ((x379))
+ :extrapreds ((x380))
+ :extrapreds ((x381))
+ :extrapreds ((x382))
+ :extrapreds ((x383))
+ :extrapreds ((x384))
+ :extrapreds ((x385))
+ :extrapreds ((x386))
+ :extrapreds ((x387))
+ :extrapreds ((x388))
+ :extrapreds ((x389))
+ :extrapreds ((x390))
+ :extrapreds ((x391))
+ :extrapreds ((x392))
+ :extrapreds ((x393))
+ :extrapreds ((x394))
+ :extrapreds ((x395))
+ :extrapreds ((x396))
+ :extrapreds ((x397))
+ :extrapreds ((x398))
+ :extrapreds ((x399))
+ :extrapreds ((x400))
+ :extrapreds ((x401))
+ :extrapreds ((x402))
+ :extrapreds ((x403))
+ :extrapreds ((x404))
+ :extrapreds ((x405))
+ :extrapreds ((x406))
+ :extrapreds ((x407))
+ :extrapreds ((x408))
+ :extrapreds ((x409))
+ :extrapreds ((x410))
+ :extrapreds ((x411))
+ :extrapreds ((x412))
+ :extrapreds ((x413))
+ :extrapreds ((x414))
+ :extrapreds ((x415))
+ :extrapreds ((x416))
+ :extrapreds ((x417))
+ :extrapreds ((x418))
+ :extrapreds ((x419))
+ :extrapreds ((x420))
+ :extrapreds ((x421))
+ :extrapreds ((x422))
+ :extrapreds ((x423))
+ :extrapreds ((x424))
+ :extrapreds ((x425))
+ :extrapreds ((x426))
+ :extrapreds ((x427))
+ :extrapreds ((x428))
+ :extrapreds ((x429))
+ :extrapreds ((x430))
+ :extrapreds ((x431))
+ :extrapreds ((x432))
+ :extrapreds ((x433))
+ :extrapreds ((x434))
+ :extrapreds ((x435))
+ :extrapreds ((x436))
+ :extrapreds ((x437))
+ :extrapreds ((x438))
+ :extrapreds ((x439))
+ :extrapreds ((x440))
+ :extrapreds ((x441))
+ :extrapreds ((x442))
+ :extrapreds ((x443))
+ :extrapreds ((x444))
+ :extrapreds ((x445))
+ :extrapreds ((x446))
+ :extrapreds ((x447))
+ :extrapreds ((x448))
+ :extrapreds ((x449))
+ :extrapreds ((x450))
+ :extrapreds ((x451))
+ :extrapreds ((x452))
+ :extrapreds ((x453))
+ :extrapreds ((x454))
+ :extrapreds ((x455))
+ :extrapreds ((x456))
+ :extrapreds ((x457))
+ :extrapreds ((x458))
+ :extrapreds ((x459))
+ :extrapreds ((x460))
+ :extrapreds ((x461))
+ :extrapreds ((x462))
+ :extrapreds ((x463))
+ :extrapreds ((x464))
+ :extrapreds ((x465))
+ :extrapreds ((x466))
+ :extrapreds ((x467))
+ :extrapreds ((x468))
+ :extrapreds ((x469))
+ :extrapreds ((x470))
+ :extrapreds ((x471))
+ :extrapreds ((x472))
+ :extrapreds ((x473))
+ :extrapreds ((x474))
+ :extrapreds ((x475))
+ :extrapreds ((x476))
+ :extrapreds ((x477))
+ :extrapreds ((x478))
+ :extrapreds ((x479))
+ :extrapreds ((x480))
+ :extrapreds ((x481))
+ :extrapreds ((x482))
+ :extrapreds ((x483))
+ :extrapreds ((x484))
+ :extrapreds ((x485))
+ :extrapreds ((x486))
+ :extrapreds ((x487))
+ :extrapreds ((x488))
+ :extrapreds ((x489))
+ :extrapreds ((x490))
+ :extrapreds ((x491))
+ :extrapreds ((x492))
+ :extrapreds ((x493))
+ :extrapreds ((x494))
+ :extrapreds ((x495))
+ :extrapreds ((x496))
+ :extrapreds ((x497))
+ :extrapreds ((x498))
+ :extrapreds ((x499))
+ :extrapreds ((x500))
+ :extrapreds ((x501))
+ :extrapreds ((x502))
+ :extrapreds ((x503))
+ :extrapreds ((x504))
+ :extrapreds ((x505))
+ :extrapreds ((x506))
+ :extrapreds ((x507))
+ :extrapreds ((x508))
+ :extrapreds ((x509))
+ :extrapreds ((x510))
+ :extrapreds ((x511))
+ :extrapreds ((x512))
+ :extrapreds ((x513))
+ :extrapreds ((x514))
+ :extrapreds ((x515))
+ :extrapreds ((x516))
+ :extrapreds ((x517))
+ :extrapreds ((x518))
+ :extrapreds ((x519))
+ :extrapreds ((x520))
+ :extrapreds ((x521))
+ :extrapreds ((x522))
+ :extrapreds ((x523))
+ :extrapreds ((x524))
+ :extrapreds ((x525))
+ :extrapreds ((x526))
+ :extrapreds ((x527))
+ :extrapreds ((x528))
+ :extrapreds ((x529))
+ :extrapreds ((x530))
+ :extrapreds ((x531))
+ :extrapreds ((x532))
+ :extrapreds ((x533))
+ :extrapreds ((x534))
+ :extrapreds ((x535))
+ :extrapreds ((x536))
+ :extrapreds ((x537))
+ :extrapreds ((x538))
+ :extrapreds ((x539))
+ :extrapreds ((x540))
+ :extrapreds ((x541))
+ :extrapreds ((x542))
+ :extrapreds ((x543))
+ :extrapreds ((x544))
+ :extrapreds ((x545))
+ :extrapreds ((x546))
+ :extrapreds ((x547))
+ :extrapreds ((x548))
+ :extrapreds ((x549))
+ :extrapreds ((x550))
+ :extrapreds ((x551))
+ :extrapreds ((x552))
+ :extrapreds ((x553))
+ :extrapreds ((x554))
+ :extrapreds ((x555))
+ :extrapreds ((x556))
+ :extrapreds ((x557))
+ :extrapreds ((x558))
+ :extrapreds ((x559))
+ :extrapreds ((x560))
+ :extrapreds ((x561))
+ :extrapreds ((x562))
+ :extrapreds ((x563))
+ :extrapreds ((x564))
+ :extrapreds ((x565))
+ :extrapreds ((x566))
+ :extrapreds ((x567))
+ :extrapreds ((x568))
+ :extrapreds ((x569))
+ :extrapreds ((x570))
+ :extrapreds ((x571))
+ :extrapreds ((x572))
+ :extrapreds ((x573))
+ :extrapreds ((x574))
+ :extrapreds ((x575))
+ :extrapreds ((x576))
+ :extrapreds ((x577))
+ :extrapreds ((x578))
+ :extrapreds ((x579))
+ :extrapreds ((x580))
+ :extrapreds ((x581))
+ :extrapreds ((x582))
+ :extrapreds ((x583))
+ :extrapreds ((x584))
+ :extrapreds ((x585))
+ :extrapreds ((x586))
+ :extrapreds ((x587))
+ :extrapreds ((x588))
+ :extrapreds ((x589))
+ :extrapreds ((x590))
+ :extrapreds ((x591))
+ :extrapreds ((x592))
+ :extrapreds ((x593))
+ :extrapreds ((x594))
+ :extrapreds ((x595))
+ :extrapreds ((x596))
+ :extrapreds ((x597))
+ :extrapreds ((x598))
+ :extrapreds ((x599))
+ :extrapreds ((x600))
+ :extrapreds ((x601))
+ :extrapreds ((x602))
+ :extrapreds ((x603))
+ :extrapreds ((x604))
+ :extrapreds ((x605))
+ :extrapreds ((x606))
+ :extrapreds ((x607))
+ :extrapreds ((x608))
+ :extrapreds ((x609))
+ :extrapreds ((x610))
+ :extrapreds ((x611))
+ :extrapreds ((x612))
+ :extrapreds ((x613))
+ :extrapreds ((x614))
+ :extrapreds ((x615))
+ :extrapreds ((x616))
+ :extrapreds ((x617))
+ :extrapreds ((x618))
+ :extrapreds ((x619))
+ :extrapreds ((x620))
+ :extrapreds ((x621))
+ :extrapreds ((x622))
+ :extrapreds ((x623))
+ :extrapreds ((x624))
+ :extrapreds ((x625))
+ :extrapreds ((x626))
+ :extrapreds ((x627))
+ :extrapreds ((x628))
+ :extrapreds ((x629))
+ :extrapreds ((x630))
+ :extrapreds ((x631))
+ :extrapreds ((x632))
+ :extrapreds ((x633))
+ :extrapreds ((x634))
+ :extrapreds ((x635))
+ :extrapreds ((x636))
+ :extrapreds ((x637))
+ :extrapreds ((x638))
+ :extrapreds ((x639))
+ :extrapreds ((x640))
+ :extrapreds ((x641))
+ :extrapreds ((x642))
+ :extrapreds ((x643))
+ :extrapreds ((x644))
+ :extrapreds ((x645))
+ :extrapreds ((x646))
+ :extrapreds ((x647))
+ :extrapreds ((x648))
+ :extrapreds ((x649))
+ :extrapreds ((x650))
+ :extrapreds ((x651))
+ :extrapreds ((x652))
+ :extrapreds ((x653))
+ :extrapreds ((x654))
+ :extrapreds ((x655))
+ :extrapreds ((x656))
+ :extrapreds ((x657))
+ :extrapreds ((x658))
+ :extrapreds ((x659))
+ :extrapreds ((x660))
+ :extrapreds ((x661))
+ :extrapreds ((x662))
+ :extrapreds ((x663))
+ :extrapreds ((x664))
+ :extrapreds ((x665))
+ :extrapreds ((x666))
+ :extrapreds ((x667))
+ :extrapreds ((x668))
+ :extrapreds ((x669))
+ :extrapreds ((x670))
+ :extrapreds ((x671))
+ :extrapreds ((x672))
+ :extrapreds ((x673))
+ :extrapreds ((x674))
+ :extrapreds ((x675))
+ :extrapreds ((x676))
+ :extrapreds ((x677))
+ :extrapreds ((x678))
+ :extrapreds ((x679))
+ :extrapreds ((x680))
+ :extrapreds ((x681))
+ :extrapreds ((x682))
+ :extrapreds ((x683))
+ :extrapreds ((x684))
+ :extrapreds ((x685))
+ :extrapreds ((x686))
+ :extrapreds ((x687))
+ :extrapreds ((x688))
+ :extrapreds ((x689))
+ :extrapreds ((x690))
+ :extrapreds ((x691))
+ :extrapreds ((x692))
+ :extrapreds ((x693))
+ :extrapreds ((x694))
+ :extrapreds ((x695))
+ :extrapreds ((x696))
+ :extrapreds ((x697))
+ :extrapreds ((x698))
+ :extrapreds ((x699))
+ :extrapreds ((x700))
+ :extrapreds ((x701))
+ :extrapreds ((x702))
+ :extrapreds ((x703))
+ :extrapreds ((x704))
+ :extrapreds ((x705))
+ :extrapreds ((x706))
+ :extrapreds ((x707))
+ :extrapreds ((x708))
+ :extrapreds ((x709))
+ :extrapreds ((x710))
+ :extrapreds ((x711))
+ :extrapreds ((x712))
+ :extrapreds ((x713))
+ :extrapreds ((x714))
+ :extrapreds ((x715))
+ :extrapreds ((x716))
+ :extrapreds ((x717))
+ :extrapreds ((x718))
+ :extrapreds ((x719))
+ :extrapreds ((x720))
+ :extrapreds ((x721))
+ :extrapreds ((x722))
+ :extrapreds ((x723))
+ :extrapreds ((x724))
+ :extrapreds ((x725))
+ :extrapreds ((x726))
+ :extrapreds ((x727))
+ :extrapreds ((x728))
+ :extrapreds ((x729))
+ :extrapreds ((x730))
+ :extrapreds ((x731))
+ :extrapreds ((x732))
+ :extrapreds ((x733))
+ :extrapreds ((x734))
+ :extrapreds ((x735))
+ :extrapreds ((x736))
+ :extrapreds ((x737))
+ :extrapreds ((x738))
+ :extrapreds ((x739))
+ :extrapreds ((x740))
+ :extrapreds ((x741))
+ :extrapreds ((x742))
+ :extrapreds ((x743))
+ :extrapreds ((x744))
+ :extrapreds ((x745))
+ :extrapreds ((x746))
+ :extrapreds ((x747))
+ :extrapreds ((x748))
+ :extrapreds ((x749))
+ :extrapreds ((x750))
+ :extrapreds ((x751))
+ :extrapreds ((x752))
+ :extrapreds ((x753))
+ :extrapreds ((x754))
+ :extrapreds ((x755))
+ :extrapreds ((x756))
+ :extrapreds ((x757))
+ :extrapreds ((x758))
+ :extrapreds ((x759))
+ :extrapreds ((x760))
+ :extrapreds ((x761))
+ :extrapreds ((x762))
+ :extrapreds ((x763))
+ :extrapreds ((x764))
+ :extrapreds ((x765))
+ :extrapreds ((x766))
+ :extrapreds ((x767))
+ :extrapreds ((x768))
+ :extrapreds ((x769))
+
+ :formula( and
+ ( <= ( + 0 ( * (~ 1) x1 ) ) (~ 27) )
+ ( = ( + ( + ( * 1 tmp766 ) 0 ) ( + ( * 1 tmp764 ) ( + ( * 1 tmp762 ) ( + ( * 1 tmp760 ) ( + ( * 1 tmp759 ) ( + ( * 1 tmp761 ) ( + ( * 1 tmp763 ) ( + ( * 1 tmp765 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp758 ) 0 ) ( + ( * 1 tmp756 ) ( + ( * 1 tmp754 ) ( + ( * 1 tmp752 ) ( + ( * 1 tmp751 ) ( + ( * 1 tmp753 ) ( + ( * 1 tmp755 ) ( + ( * 1 tmp757 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp750 ) 0 ) ( + ( * 1 tmp748 ) ( + ( * 1 tmp746 ) ( + ( * 1 tmp744 ) ( + ( * 1 tmp743 ) ( + ( * 1 tmp745 ) ( + ( * 1 tmp747 ) ( + ( * 1 tmp749 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp742 ) 0 ) ( + ( * 1 tmp740 ) ( + ( * 1 tmp738 ) ( + ( * 1 tmp736 ) ( + ( * 1 tmp735 ) ( + ( * 1 tmp737 ) ( + ( * 1 tmp739 ) ( + ( * 1 tmp741 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp734 ) 0 ) ( + ( * 1 tmp732 ) ( + ( * 1 tmp730 ) ( + ( * 1 tmp728 ) ( + ( * 1 tmp727 ) ( + ( * 1 tmp729 ) ( + ( * 1 tmp731 ) ( + ( * 1 tmp733 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp726 ) 0 ) ( + ( * 1 tmp724 ) ( + ( * 1 tmp722 ) ( + ( * 1 tmp720 ) ( + ( * 1 tmp719 ) ( + ( * 1 tmp721 ) ( + ( * 1 tmp723 ) ( + ( * 1 tmp725 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp718 ) 0 ) ( + ( * 1 tmp716 ) ( + ( * 1 tmp714 ) ( + ( * 1 tmp712 ) ( + ( * 1 tmp711 ) ( + ( * 1 tmp713 ) ( + ( * 1 tmp715 ) ( + ( * 1 tmp717 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp710 ) 0 ) ( + ( * 1 tmp708 ) ( + ( * 1 tmp706 ) ( + ( * 1 tmp704 ) ( + ( * 1 tmp703 ) ( + ( * 1 tmp705 ) ( + ( * 1 tmp707 ) ( + ( * 1 tmp709 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp702 ) 0 ) ( + ( * 1 tmp700 ) ( + ( * 1 tmp698 ) ( + ( * 1 tmp696 ) ( + ( * 1 tmp695 ) ( + ( * 1 tmp697 ) ( + ( * 1 tmp699 ) ( + ( * 1 tmp701 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp694 ) 0 ) ( + ( * 1 tmp692 ) ( + ( * 1 tmp690 ) ( + ( * 1 tmp688 ) ( + ( * 1 tmp687 ) ( + ( * 1 tmp689 ) ( + ( * 1 tmp691 ) ( + ( * 1 tmp693 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp686 ) 0 ) ( + ( * 1 tmp684 ) ( + ( * 1 tmp682 ) ( + ( * 1 tmp680 ) ( + ( * 1 tmp679 ) ( + ( * 1 tmp681 ) ( + ( * 1 tmp683 ) ( + ( * 1 tmp685 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp678 ) 0 ) ( + ( * 1 tmp676 ) ( + ( * 1 tmp674 ) ( + ( * 1 tmp672 ) ( + ( * 1 tmp671 ) ( + ( * 1 tmp673 ) ( + ( * 1 tmp675 ) ( + ( * 1 tmp677 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp670 ) 0 ) ( + ( * 1 tmp668 ) ( + ( * 1 tmp666 ) ( + ( * 1 tmp664 ) ( + ( * 1 tmp663 ) ( + ( * 1 tmp665 ) ( + ( * 1 tmp667 ) ( + ( * 1 tmp669 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp662 ) 0 ) ( + ( * 1 tmp660 ) ( + ( * 1 tmp658 ) ( + ( * 1 tmp656 ) ( + ( * 1 tmp655 ) ( + ( * 1 tmp657 ) ( + ( * 1 tmp659 ) ( + ( * 1 tmp661 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp654 ) 0 ) ( + ( * 1 tmp652 ) ( + ( * 1 tmp650 ) ( + ( * 1 tmp648 ) ( + ( * 1 tmp647 ) ( + ( * 1 tmp649 ) ( + ( * 1 tmp651 ) ( + ( * 1 tmp653 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp646 ) 0 ) ( + ( * 1 tmp644 ) ( + ( * 1 tmp642 ) ( + ( * 1 tmp640 ) ( + ( * 1 tmp639 ) ( + ( * 1 tmp641 ) ( + ( * 1 tmp643 ) ( + ( * 1 tmp645 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp638 ) 0 ) ( + ( * 1 tmp636 ) ( + ( * 1 tmp634 ) ( + ( * 1 tmp632 ) ( + ( * 1 tmp631 ) ( + ( * 1 tmp633 ) ( + ( * 1 tmp635 ) ( + ( * 1 tmp637 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp630 ) 0 ) ( + ( * 1 tmp628 ) ( + ( * 1 tmp626 ) ( + ( * 1 tmp624 ) ( + ( * 1 tmp623 ) ( + ( * 1 tmp625 ) ( + ( * 1 tmp627 ) ( + ( * 1 tmp629 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp622 ) 0 ) ( + ( * 1 tmp620 ) ( + ( * 1 tmp618 ) ( + ( * 1 tmp616 ) ( + ( * 1 tmp615 ) ( + ( * 1 tmp617 ) ( + ( * 1 tmp619 ) ( + ( * 1 tmp621 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp614 ) 0 ) ( + ( * 1 tmp612 ) ( + ( * 1 tmp610 ) ( + ( * 1 tmp608 ) ( + ( * 1 tmp607 ) ( + ( * 1 tmp609 ) ( + ( * 1 tmp611 ) ( + ( * 1 tmp613 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp606 ) 0 ) ( + ( * 1 tmp604 ) ( + ( * 1 tmp602 ) ( + ( * 1 tmp600 ) ( + ( * 1 tmp599 ) ( + ( * 1 tmp601 ) ( + ( * 1 tmp603 ) ( + ( * 1 tmp605 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp598 ) 0 ) ( + ( * 1 tmp596 ) ( + ( * 1 tmp594 ) ( + ( * 1 tmp592 ) ( + ( * 1 tmp591 ) ( + ( * 1 tmp593 ) ( + ( * 1 tmp595 ) ( + ( * 1 tmp597 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp590 ) 0 ) ( + ( * 1 tmp588 ) ( + ( * 1 tmp586 ) ( + ( * 1 tmp584 ) ( + ( * 1 tmp583 ) ( + ( * 1 tmp585 ) ( + ( * 1 tmp587 ) ( + ( * 1 tmp589 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp582 ) 0 ) ( + ( * 1 tmp580 ) ( + ( * 1 tmp578 ) ( + ( * 1 tmp576 ) ( + ( * 1 tmp575 ) ( + ( * 1 tmp577 ) ( + ( * 1 tmp579 ) ( + ( * 1 tmp581 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp574 ) 0 ) ( + ( * 1 tmp572 ) ( + ( * 1 tmp570 ) ( + ( * 1 tmp568 ) ( + ( * 1 tmp567 ) ( + ( * 1 tmp569 ) ( + ( * 1 tmp571 ) ( + ( * 1 tmp573 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp566 ) 0 ) ( + ( * 1 tmp564 ) ( + ( * 1 tmp562 ) ( + ( * 1 tmp560 ) ( + ( * 1 tmp559 ) ( + ( * 1 tmp561 ) ( + ( * 1 tmp563 ) ( + ( * 1 tmp565 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp558 ) 0 ) ( + ( * 1 tmp556 ) ( + ( * 1 tmp554 ) ( + ( * 1 tmp552 ) ( + ( * 1 tmp551 ) ( + ( * 1 tmp553 ) ( + ( * 1 tmp555 ) ( + ( * 1 tmp557 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp550 ) 0 ) ( + ( * 1 tmp548 ) ( + ( * 1 tmp546 ) ( + ( * 1 tmp544 ) ( + ( * 1 tmp543 ) ( + ( * 1 tmp545 ) ( + ( * 1 tmp547 ) ( + ( * 1 tmp549 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp542 ) 0 ) ( + ( * 1 tmp540 ) ( + ( * 1 tmp538 ) ( + ( * 1 tmp536 ) ( + ( * 1 tmp535 ) ( + ( * 1 tmp537 ) ( + ( * 1 tmp539 ) ( + ( * 1 tmp541 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp534 ) 0 ) ( + ( * 1 tmp532 ) ( + ( * 1 tmp530 ) ( + ( * 1 tmp528 ) ( + ( * 1 tmp527 ) ( + ( * 1 tmp529 ) ( + ( * 1 tmp531 ) ( + ( * 1 tmp533 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp526 ) 0 ) ( + ( * 1 tmp524 ) ( + ( * 1 tmp522 ) ( + ( * 1 tmp520 ) ( + ( * 1 tmp519 ) ( + ( * 1 tmp521 ) ( + ( * 1 tmp523 ) ( + ( * 1 tmp525 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp518 ) 0 ) ( + ( * 1 tmp516 ) ( + ( * 1 tmp514 ) ( + ( * 1 tmp512 ) ( + ( * 1 tmp511 ) ( + ( * 1 tmp513 ) ( + ( * 1 tmp515 ) ( + ( * 1 tmp517 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp510 ) 0 ) ( + ( * 1 tmp508 ) ( + ( * 1 tmp506 ) ( + ( * 1 tmp504 ) ( + ( * 1 tmp503 ) ( + ( * 1 tmp505 ) ( + ( * 1 tmp507 ) ( + ( * 1 tmp509 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp502 ) 0 ) ( + ( * 1 tmp500 ) ( + ( * 1 tmp498 ) ( + ( * 1 tmp496 ) ( + ( * 1 tmp495 ) ( + ( * 1 tmp497 ) ( + ( * 1 tmp499 ) ( + ( * 1 tmp501 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp494 ) 0 ) ( + ( * 1 tmp492 ) ( + ( * 1 tmp490 ) ( + ( * 1 tmp488 ) ( + ( * 1 tmp487 ) ( + ( * 1 tmp489 ) ( + ( * 1 tmp491 ) ( + ( * 1 tmp493 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp486 ) 0 ) ( + ( * 1 tmp484 ) ( + ( * 1 tmp482 ) ( + ( * 1 tmp480 ) ( + ( * 1 tmp479 ) ( + ( * 1 tmp481 ) ( + ( * 1 tmp483 ) ( + ( * 1 tmp485 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp478 ) 0 ) ( + ( * 1 tmp476 ) ( + ( * 1 tmp474 ) ( + ( * 1 tmp472 ) ( + ( * 1 tmp471 ) ( + ( * 1 tmp473 ) ( + ( * 1 tmp475 ) ( + ( * 1 tmp477 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp470 ) 0 ) ( + ( * 1 tmp468 ) ( + ( * 1 tmp466 ) ( + ( * 1 tmp464 ) ( + ( * 1 tmp463 ) ( + ( * 1 tmp465 ) ( + ( * 1 tmp467 ) ( + ( * 1 tmp469 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp462 ) 0 ) ( + ( * 1 tmp460 ) ( + ( * 1 tmp458 ) ( + ( * 1 tmp456 ) ( + ( * 1 tmp455 ) ( + ( * 1 tmp457 ) ( + ( * 1 tmp459 ) ( + ( * 1 tmp461 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp454 ) 0 ) ( + ( * 1 tmp452 ) ( + ( * 1 tmp450 ) ( + ( * 1 tmp448 ) ( + ( * 1 tmp447 ) ( + ( * 1 tmp449 ) ( + ( * 1 tmp451 ) ( + ( * 1 tmp453 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp446 ) 0 ) ( + ( * 1 tmp444 ) ( + ( * 1 tmp442 ) ( + ( * 1 tmp440 ) ( + ( * 1 tmp439 ) ( + ( * 1 tmp441 ) ( + ( * 1 tmp443 ) ( + ( * 1 tmp445 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp438 ) 0 ) ( + ( * 1 tmp436 ) ( + ( * 1 tmp434 ) ( + ( * 1 tmp432 ) ( + ( * 1 tmp431 ) ( + ( * 1 tmp433 ) ( + ( * 1 tmp435 ) ( + ( * 1 tmp437 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp430 ) 0 ) ( + ( * 1 tmp428 ) ( + ( * 1 tmp426 ) ( + ( * 1 tmp424 ) ( + ( * 1 tmp423 ) ( + ( * 1 tmp425 ) ( + ( * 1 tmp427 ) ( + ( * 1 tmp429 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp422 ) 0 ) ( + ( * 1 tmp420 ) ( + ( * 1 tmp418 ) ( + ( * 1 tmp416 ) ( + ( * 1 tmp415 ) ( + ( * 1 tmp417 ) ( + ( * 1 tmp419 ) ( + ( * 1 tmp421 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp414 ) 0 ) ( + ( * 1 tmp412 ) ( + ( * 1 tmp410 ) ( + ( * 1 tmp408 ) ( + ( * 1 tmp407 ) ( + ( * 1 tmp409 ) ( + ( * 1 tmp411 ) ( + ( * 1 tmp413 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp406 ) 0 ) ( + ( * 1 tmp404 ) ( + ( * 1 tmp402 ) ( + ( * 1 tmp400 ) ( + ( * 1 tmp399 ) ( + ( * 1 tmp401 ) ( + ( * 1 tmp403 ) ( + ( * 1 tmp405 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp398 ) 0 ) ( + ( * 1 tmp396 ) ( + ( * 1 tmp394 ) ( + ( * 1 tmp392 ) ( + ( * 1 tmp391 ) ( + ( * 1 tmp393 ) ( + ( * 1 tmp395 ) ( + ( * 1 tmp397 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( = ( + ( + ( * 1 tmp390 ) 0 ) ( + ( * 1 tmp388 ) ( + ( * 1 tmp386 ) ( + ( * 1 tmp384 ) ( + ( * 1 tmp383 ) ( + ( * 1 tmp385 ) ( + ( * 1 tmp387 ) ( + ( * 1 tmp389 ) 0 ) ) ) ) ) ) ) ) 1 )
+ ( >= ( + ( + ( * 1 tmp382 ) 0 ) ( + ( * 1 tmp380 ) ( + ( * 1 tmp378 ) ( + ( * 1 tmp376 ) ( + ( * 1 tmp374 ) ( + ( * 1 tmp372 ) ( + ( * 1 tmp370 ) ( + ( * 1 tmp368 ) ( + ( * 1 tmp366 ) ( + ( * 1 tmp364 ) ( + ( * 1 tmp362 ) ( + ( * 1 tmp360 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp359 ) ( + ( * 1 tmp361 ) ( + ( * 1 tmp363 ) ( + ( * 1 tmp365 ) ( + ( * 1 tmp367 ) ( + ( * 1 tmp369 ) ( + ( * 1 tmp371 ) ( + ( * 1 tmp373 ) ( + ( * 1 tmp375 ) ( + ( * 1 tmp377 ) ( + ( * 1 tmp379 ) ( + ( * 1 tmp381 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp358 ) 0 ) ( + ( * 1 tmp356 ) ( + ( * 1 tmp354 ) ( + ( * 1 tmp352 ) ( + ( * 1 tmp350 ) ( + ( * 1 tmp348 ) ( + ( * 1 tmp346 ) ( + ( * 1 tmp344 ) ( + ( * 1 tmp342 ) ( + ( * 1 tmp340 ) ( + ( * 1 tmp338 ) ( + ( * 1 tmp336 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp335 ) ( + ( * 1 tmp337 ) ( + ( * 1 tmp339 ) ( + ( * 1 tmp341 ) ( + ( * 1 tmp343 ) ( + ( * 1 tmp345 ) ( + ( * 1 tmp347 ) ( + ( * 1 tmp349 ) ( + ( * 1 tmp351 ) ( + ( * 1 tmp353 ) ( + ( * 1 tmp355 ) ( + ( * 1 tmp357 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp334 ) 0 ) ( + ( * 1 tmp332 ) ( + ( * 1 tmp330 ) ( + ( * 1 tmp328 ) ( + ( * 1 tmp326 ) ( + ( * 1 tmp324 ) ( + ( * 1 tmp322 ) ( + ( * 1 tmp320 ) ( + ( * 1 tmp318 ) ( + ( * 1 tmp316 ) ( + ( * 1 tmp314 ) ( + ( * 1 tmp312 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp311 ) ( + ( * 1 tmp313 ) ( + ( * 1 tmp315 ) ( + ( * 1 tmp317 ) ( + ( * 1 tmp319 ) ( + ( * 1 tmp321 ) ( + ( * 1 tmp323 ) ( + ( * 1 tmp325 ) ( + ( * 1 tmp327 ) ( + ( * 1 tmp329 ) ( + ( * 1 tmp331 ) ( + ( * 1 tmp333 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp310 ) 0 ) ( + ( * 1 tmp308 ) ( + ( * 1 tmp306 ) ( + ( * 1 tmp304 ) ( + ( * 1 tmp302 ) ( + ( * 1 tmp300 ) ( + ( * 1 tmp298 ) ( + ( * 1 tmp296 ) ( + ( * 1 tmp294 ) ( + ( * 1 tmp292 ) ( + ( * 1 tmp290 ) ( + ( * 1 tmp288 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp287 ) ( + ( * 1 tmp289 ) ( + ( * 1 tmp291 ) ( + ( * 1 tmp293 ) ( + ( * 1 tmp295 ) ( + ( * 1 tmp297 ) ( + ( * 1 tmp299 ) ( + ( * 1 tmp301 ) ( + ( * 1 tmp303 ) ( + ( * 1 tmp305 ) ( + ( * 1 tmp307 ) ( + ( * 1 tmp309 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp286 ) 0 ) ( + ( * 1 tmp284 ) ( + ( * 1 tmp282 ) ( + ( * 1 tmp280 ) ( + ( * 1 tmp278 ) ( + ( * 1 tmp276 ) ( + ( * 1 tmp274 ) ( + ( * 1 tmp272 ) ( + ( * 1 tmp270 ) ( + ( * 1 tmp268 ) ( + ( * 1 tmp266 ) ( + ( * 1 tmp264 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp263 ) ( + ( * 1 tmp265 ) ( + ( * 1 tmp267 ) ( + ( * 1 tmp269 ) ( + ( * 1 tmp271 ) ( + ( * 1 tmp273 ) ( + ( * 1 tmp275 ) ( + ( * 1 tmp277 ) ( + ( * 1 tmp279 ) ( + ( * 1 tmp281 ) ( + ( * 1 tmp283 ) ( + ( * 1 tmp285 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp262 ) 0 ) ( + ( * 1 tmp260 ) ( + ( * 1 tmp258 ) ( + ( * 1 tmp256 ) ( + ( * 1 tmp254 ) ( + ( * 1 tmp252 ) ( + ( * 1 tmp250 ) ( + ( * 1 tmp248 ) ( + ( * 1 tmp246 ) ( + ( * 1 tmp244 ) ( + ( * 1 tmp242 ) ( + ( * 1 tmp240 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp239 ) ( + ( * 1 tmp241 ) ( + ( * 1 tmp243 ) ( + ( * 1 tmp245 ) ( + ( * 1 tmp247 ) ( + ( * 1 tmp249 ) ( + ( * 1 tmp251 ) ( + ( * 1 tmp253 ) ( + ( * 1 tmp255 ) ( + ( * 1 tmp257 ) ( + ( * 1 tmp259 ) ( + ( * 1 tmp261 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp238 ) 0 ) ( + ( * 1 tmp236 ) ( + ( * 1 tmp234 ) ( + ( * 1 tmp232 ) ( + ( * 1 tmp230 ) ( + ( * 1 tmp228 ) ( + ( * 1 tmp226 ) ( + ( * 1 tmp224 ) ( + ( * 1 tmp222 ) ( + ( * 1 tmp220 ) ( + ( * 1 tmp218 ) ( + ( * 1 tmp216 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp215 ) ( + ( * 1 tmp217 ) ( + ( * 1 tmp219 ) ( + ( * 1 tmp221 ) ( + ( * 1 tmp223 ) ( + ( * 1 tmp225 ) ( + ( * 1 tmp227 ) ( + ( * 1 tmp229 ) ( + ( * 1 tmp231 ) ( + ( * 1 tmp233 ) ( + ( * 1 tmp235 ) ( + ( * 1 tmp237 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp214 ) 0 ) ( + ( * 1 tmp212 ) ( + ( * 1 tmp210 ) ( + ( * 1 tmp208 ) ( + ( * 1 tmp206 ) ( + ( * 1 tmp204 ) ( + ( * 1 tmp202 ) ( + ( * 1 tmp200 ) ( + ( * 1 tmp198 ) ( + ( * 1 tmp196 ) ( + ( * 1 tmp194 ) ( + ( * 1 tmp192 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp191 ) ( + ( * 1 tmp193 ) ( + ( * 1 tmp195 ) ( + ( * 1 tmp197 ) ( + ( * 1 tmp199 ) ( + ( * 1 tmp201 ) ( + ( * 1 tmp203 ) ( + ( * 1 tmp205 ) ( + ( * 1 tmp207 ) ( + ( * 1 tmp209 ) ( + ( * 1 tmp211 ) ( + ( * 1 tmp213 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp190 ) 0 ) ( + ( * 1 tmp188 ) ( + ( * 1 tmp186 ) ( + ( * 1 tmp184 ) ( + ( * 1 tmp182 ) ( + ( * 1 tmp180 ) ( + ( * 1 tmp178 ) ( + ( * 1 tmp176 ) ( + ( * 1 tmp174 ) ( + ( * 1 tmp172 ) ( + ( * 1 tmp170 ) ( + ( * 1 tmp168 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp167 ) ( + ( * 1 tmp169 ) ( + ( * 1 tmp171 ) ( + ( * 1 tmp173 ) ( + ( * 1 tmp175 ) ( + ( * 1 tmp177 ) ( + ( * 1 tmp179 ) ( + ( * 1 tmp181 ) ( + ( * 1 tmp183 ) ( + ( * 1 tmp185 ) ( + ( * 1 tmp187 ) ( + ( * 1 tmp189 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp166 ) 0 ) ( + ( * 1 tmp164 ) ( + ( * 1 tmp162 ) ( + ( * 1 tmp160 ) ( + ( * 1 tmp158 ) ( + ( * 1 tmp156 ) ( + ( * 1 tmp154 ) ( + ( * 1 tmp152 ) ( + ( * 1 tmp150 ) ( + ( * 1 tmp148 ) ( + ( * 1 tmp146 ) ( + ( * 1 tmp144 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp143 ) ( + ( * 1 tmp145 ) ( + ( * 1 tmp147 ) ( + ( * 1 tmp149 ) ( + ( * 1 tmp151 ) ( + ( * 1 tmp153 ) ( + ( * 1 tmp155 ) ( + ( * 1 tmp157 ) ( + ( * 1 tmp159 ) ( + ( * 1 tmp161 ) ( + ( * 1 tmp163 ) ( + ( * 1 tmp165 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp142 ) 0 ) ( + ( * 1 tmp140 ) ( + ( * 1 tmp138 ) ( + ( * 1 tmp136 ) ( + ( * 1 tmp134 ) ( + ( * 1 tmp132 ) ( + ( * 1 tmp130 ) ( + ( * 1 tmp128 ) ( + ( * 1 tmp126 ) ( + ( * 1 tmp124 ) ( + ( * 1 tmp122 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp121 ) ( + ( * 1 tmp123 ) ( + ( * 1 tmp125 ) ( + ( * 1 tmp127 ) ( + ( * 1 tmp129 ) ( + ( * 1 tmp131 ) ( + ( * 1 tmp133 ) ( + ( * 1 tmp135 ) ( + ( * 1 tmp137 ) ( + ( * 1 tmp139 ) ( + ( * 1 tmp141 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp120 ) 0 ) ( + ( * 1 tmp118 ) ( + ( * 1 tmp116 ) ( + ( * 1 tmp114 ) ( + ( * 1 tmp112 ) ( + ( * 1 tmp110 ) ( + ( * 1 tmp108 ) ( + ( * 1 tmp106 ) ( + ( * 1 tmp104 ) ( + ( * 1 tmp102 ) ( + ( * 1 tmp100 ) ( + ( * 1 tmp98 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp97 ) ( + ( * 1 tmp99 ) ( + ( * 1 tmp101 ) ( + ( * 1 tmp103 ) ( + ( * 1 tmp105 ) ( + ( * 1 tmp107 ) ( + ( * 1 tmp109 ) ( + ( * 1 tmp111 ) ( + ( * 1 tmp113 ) ( + ( * 1 tmp115 ) ( + ( * 1 tmp117 ) ( + ( * 1 tmp119 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp96 ) 0 ) ( + ( * 1 tmp94 ) ( + ( * 1 tmp92 ) ( + ( * 1 tmp90 ) ( + ( * 1 tmp88 ) ( + ( * 1 tmp86 ) ( + ( * 1 tmp84 ) ( + ( * 1 tmp82 ) ( + ( * 1 tmp80 ) ( + ( * 1 tmp78 ) ( + ( * 1 tmp76 ) ( + ( * 1 tmp74 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp73 ) ( + ( * 1 tmp75 ) ( + ( * 1 tmp77 ) ( + ( * 1 tmp79 ) ( + ( * 1 tmp81 ) ( + ( * 1 tmp83 ) ( + ( * 1 tmp85 ) ( + ( * 1 tmp87 ) ( + ( * 1 tmp89 ) ( + ( * 1 tmp91 ) ( + ( * 1 tmp93 ) ( + ( * 1 tmp95 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp72 ) 0 ) ( + ( * 1 tmp70 ) ( + ( * 1 tmp68 ) ( + ( * 1 tmp66 ) ( + ( * 1 tmp64 ) ( + ( * 1 tmp62 ) ( + ( * 1 tmp60 ) ( + ( * 1 tmp58 ) ( + ( * 1 tmp56 ) ( + ( * 1 tmp54 ) ( + ( * 1 tmp52 ) ( + ( * 1 tmp50 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp49 ) ( + ( * 1 tmp51 ) ( + ( * 1 tmp53 ) ( + ( * 1 tmp55 ) ( + ( * 1 tmp57 ) ( + ( * 1 tmp59 ) ( + ( * 1 tmp61 ) ( + ( * 1 tmp63 ) ( + ( * 1 tmp65 ) ( + ( * 1 tmp67 ) ( + ( * 1 tmp69 ) ( + ( * 1 tmp71 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp48 ) 0 ) ( + ( * 1 tmp46 ) ( + ( * 1 tmp44 ) ( + ( * 1 tmp42 ) ( + ( * 1 tmp40 ) ( + ( * 1 tmp38 ) ( + ( * 1 tmp36 ) ( + ( * 1 tmp34 ) ( + ( * 1 tmp32 ) ( + ( * 1 tmp30 ) ( + ( * 1 tmp28 ) ( + ( * 1 tmp26 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp25 ) ( + ( * 1 tmp27 ) ( + ( * 1 tmp29 ) ( + ( * 1 tmp31 ) ( + ( * 1 tmp33 ) ( + ( * 1 tmp35 ) ( + ( * 1 tmp37 ) ( + ( * 1 tmp39 ) ( + ( * 1 tmp41 ) ( + ( * 1 tmp43 ) ( + ( * 1 tmp45 ) ( + ( * 1 tmp47 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( >= ( + ( + ( * 1 tmp24 ) 0 ) ( + ( * 1 tmp22 ) ( + ( * 1 tmp20 ) ( + ( * 1 tmp18 ) ( + ( * 1 tmp16 ) ( + ( * 1 tmp14 ) ( + ( * 1 tmp12 ) ( + ( * 1 tmp10 ) ( + ( * 1 tmp8 ) ( + ( * 1 tmp6 ) ( + ( * 1 tmp4 ) ( + ( * 1 tmp2 ) ( + ( * (~ 1) x1 ) ( + ( * 1 tmp1 ) ( + ( * 1 tmp3 ) ( + ( * 1 tmp5 ) ( + ( * 1 tmp7 ) ( + ( * 1 tmp9 ) ( + ( * 1 tmp11 ) ( + ( * 1 tmp13 ) ( + ( * 1 tmp15 ) ( + ( * 1 tmp17 ) ( + ( * 1 tmp19 ) ( + ( * 1 tmp21 ) ( + ( * 1 tmp23 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0 )
+ ( <= x1 384 )
+ ( >= x1 0 )
+ ( implies ( and ( not x474 ) ( and ( not x427 ) true ) ) ( = tmp766 0 ) )
+ ( implies ( and ( not x474 ) ( and x427 true ) ) ( = tmp766 1 ) )
+ ( implies ( and x474 ( and ( not x427 ) true ) ) ( = tmp766 1 ) )
+ ( implies ( and x474 ( and x427 true ) ) ( = tmp766 2 ) )
+ ( implies ( and ( not x331 ) ( and ( not x379 ) true ) ) ( = tmp765 0 ) )
+ ( implies ( and ( not x331 ) ( and x379 true ) ) ( = tmp765 1 ) )
+ ( implies ( and x331 ( and ( not x379 ) true ) ) ( = tmp765 1 ) )
+ ( implies ( and x331 ( and x379 true ) ) ( = tmp765 2 ) )
+ ( implies ( and ( not x569 ) ( and ( not x521 ) true ) ) ( = tmp764 0 ) )
+ ( implies ( and ( not x569 ) ( and x521 true ) ) ( = tmp764 1 ) )
+ ( implies ( and x569 ( and ( not x521 ) true ) ) ( = tmp764 1 ) )
+ ( implies ( and x569 ( and x521 true ) ) ( = tmp764 2 ) )
+ ( implies ( and ( not x239 ) ( and ( not x283 ) true ) ) ( = tmp763 0 ) )
+ ( implies ( and ( not x239 ) ( and x283 true ) ) ( = tmp763 1 ) )
+ ( implies ( and x239 ( and ( not x283 ) true ) ) ( = tmp763 1 ) )
+ ( implies ( and x239 ( and x283 true ) ) ( = tmp763 2 ) )
+ ( implies ( and ( not x664 ) ( and ( not x616 ) true ) ) ( = tmp762 0 ) )
+ ( implies ( and ( not x664 ) ( and x616 true ) ) ( = tmp762 1 ) )
+ ( implies ( and x664 ( and ( not x616 ) true ) ) ( = tmp762 1 ) )
+ ( implies ( and x664 ( and x616 true ) ) ( = tmp762 2 ) )
+ ( implies ( and ( not x143 ) ( and ( not x191 ) true ) ) ( = tmp761 0 ) )
+ ( implies ( and ( not x143 ) ( and x191 true ) ) ( = tmp761 1 ) )
+ ( implies ( and x143 ( and ( not x191 ) true ) ) ( = tmp761 1 ) )
+ ( implies ( and x143 ( and x191 true ) ) ( = tmp761 2 ) )
+ ( implies ( and ( not x759 ) ( and ( not x711 ) true ) ) ( = tmp760 0 ) )
+ ( implies ( and ( not x759 ) ( and x711 true ) ) ( = tmp760 1 ) )
+ ( implies ( and x759 ( and ( not x711 ) true ) ) ( = tmp760 1 ) )
+ ( implies ( and x759 ( and x711 true ) ) ( = tmp760 2 ) )
+ ( implies ( and ( not x48 ) ( and ( not x96 ) true ) ) ( = tmp759 0 ) )
+ ( implies ( and ( not x48 ) ( and x96 true ) ) ( = tmp759 1 ) )
+ ( implies ( and x48 ( and ( not x96 ) true ) ) ( = tmp759 1 ) )
+ ( implies ( and x48 ( and x96 true ) ) ( = tmp759 2 ) )
+ ( implies ( and ( not x473 ) ( and ( not x426 ) true ) ) ( = tmp758 0 ) )
+ ( implies ( and ( not x473 ) ( and x426 true ) ) ( = tmp758 1 ) )
+ ( implies ( and x473 ( and ( not x426 ) true ) ) ( = tmp758 1 ) )
+ ( implies ( and x473 ( and x426 true ) ) ( = tmp758 2 ) )
+ ( implies ( and ( not x330 ) ( and ( not x378 ) true ) ) ( = tmp757 0 ) )
+ ( implies ( and ( not x330 ) ( and x378 true ) ) ( = tmp757 1 ) )
+ ( implies ( and x330 ( and ( not x378 ) true ) ) ( = tmp757 1 ) )
+ ( implies ( and x330 ( and x378 true ) ) ( = tmp757 2 ) )
+ ( implies ( and ( not x568 ) ( and ( not x520 ) true ) ) ( = tmp756 0 ) )
+ ( implies ( and ( not x568 ) ( and x520 true ) ) ( = tmp756 1 ) )
+ ( implies ( and x568 ( and ( not x520 ) true ) ) ( = tmp756 1 ) )
+ ( implies ( and x568 ( and x520 true ) ) ( = tmp756 2 ) )
+ ( implies ( and ( not x238 ) ( and ( not x282 ) true ) ) ( = tmp755 0 ) )
+ ( implies ( and ( not x238 ) ( and x282 true ) ) ( = tmp755 1 ) )
+ ( implies ( and x238 ( and ( not x282 ) true ) ) ( = tmp755 1 ) )
+ ( implies ( and x238 ( and x282 true ) ) ( = tmp755 2 ) )
+ ( implies ( and ( not x663 ) ( and ( not x615 ) true ) ) ( = tmp754 0 ) )
+ ( implies ( and ( not x663 ) ( and x615 true ) ) ( = tmp754 1 ) )
+ ( implies ( and x663 ( and ( not x615 ) true ) ) ( = tmp754 1 ) )
+ ( implies ( and x663 ( and x615 true ) ) ( = tmp754 2 ) )
+ ( implies ( and ( not x142 ) ( and ( not x190 ) true ) ) ( = tmp753 0 ) )
+ ( implies ( and ( not x142 ) ( and x190 true ) ) ( = tmp753 1 ) )
+ ( implies ( and x142 ( and ( not x190 ) true ) ) ( = tmp753 1 ) )
+ ( implies ( and x142 ( and x190 true ) ) ( = tmp753 2 ) )
+ ( implies ( and ( not x758 ) ( and ( not x710 ) true ) ) ( = tmp752 0 ) )
+ ( implies ( and ( not x758 ) ( and x710 true ) ) ( = tmp752 1 ) )
+ ( implies ( and x758 ( and ( not x710 ) true ) ) ( = tmp752 1 ) )
+ ( implies ( and x758 ( and x710 true ) ) ( = tmp752 2 ) )
+ ( implies ( and ( not x47 ) ( and ( not x95 ) true ) ) ( = tmp751 0 ) )
+ ( implies ( and ( not x47 ) ( and x95 true ) ) ( = tmp751 1 ) )
+ ( implies ( and x47 ( and ( not x95 ) true ) ) ( = tmp751 1 ) )
+ ( implies ( and x47 ( and x95 true ) ) ( = tmp751 2 ) )
+ ( implies ( and ( not x472 ) ( and ( not x425 ) true ) ) ( = tmp750 0 ) )
+ ( implies ( and ( not x472 ) ( and x425 true ) ) ( = tmp750 1 ) )
+ ( implies ( and x472 ( and ( not x425 ) true ) ) ( = tmp750 1 ) )
+ ( implies ( and x472 ( and x425 true ) ) ( = tmp750 2 ) )
+ ( implies ( and ( not x329 ) ( and ( not x377 ) true ) ) ( = tmp749 0 ) )
+ ( implies ( and ( not x329 ) ( and x377 true ) ) ( = tmp749 1 ) )
+ ( implies ( and x329 ( and ( not x377 ) true ) ) ( = tmp749 1 ) )
+ ( implies ( and x329 ( and x377 true ) ) ( = tmp749 2 ) )
+ ( implies ( and ( not x567 ) ( and ( not x519 ) true ) ) ( = tmp748 0 ) )
+ ( implies ( and ( not x567 ) ( and x519 true ) ) ( = tmp748 1 ) )
+ ( implies ( and x567 ( and ( not x519 ) true ) ) ( = tmp748 1 ) )
+ ( implies ( and x567 ( and x519 true ) ) ( = tmp748 2 ) )
+ ( implies ( and ( not x237 ) ( and ( not x281 ) true ) ) ( = tmp747 0 ) )
+ ( implies ( and ( not x237 ) ( and x281 true ) ) ( = tmp747 1 ) )
+ ( implies ( and x237 ( and ( not x281 ) true ) ) ( = tmp747 1 ) )
+ ( implies ( and x237 ( and x281 true ) ) ( = tmp747 2 ) )
+ ( implies ( and ( not x662 ) ( and ( not x614 ) true ) ) ( = tmp746 0 ) )
+ ( implies ( and ( not x662 ) ( and x614 true ) ) ( = tmp746 1 ) )
+ ( implies ( and x662 ( and ( not x614 ) true ) ) ( = tmp746 1 ) )
+ ( implies ( and x662 ( and x614 true ) ) ( = tmp746 2 ) )
+ ( implies ( and ( not x141 ) ( and ( not x189 ) true ) ) ( = tmp745 0 ) )
+ ( implies ( and ( not x141 ) ( and x189 true ) ) ( = tmp745 1 ) )
+ ( implies ( and x141 ( and ( not x189 ) true ) ) ( = tmp745 1 ) )
+ ( implies ( and x141 ( and x189 true ) ) ( = tmp745 2 ) )
+ ( implies ( and ( not x757 ) ( and ( not x709 ) true ) ) ( = tmp744 0 ) )
+ ( implies ( and ( not x757 ) ( and x709 true ) ) ( = tmp744 1 ) )
+ ( implies ( and x757 ( and ( not x709 ) true ) ) ( = tmp744 1 ) )
+ ( implies ( and x757 ( and x709 true ) ) ( = tmp744 2 ) )
+ ( implies ( and ( not x46 ) ( and ( not x94 ) true ) ) ( = tmp743 0 ) )
+ ( implies ( and ( not x46 ) ( and x94 true ) ) ( = tmp743 1 ) )
+ ( implies ( and x46 ( and ( not x94 ) true ) ) ( = tmp743 1 ) )
+ ( implies ( and x46 ( and x94 true ) ) ( = tmp743 2 ) )
+ ( implies ( and ( not x471 ) ( and ( not x424 ) true ) ) ( = tmp742 0 ) )
+ ( implies ( and ( not x471 ) ( and x424 true ) ) ( = tmp742 1 ) )
+ ( implies ( and x471 ( and ( not x424 ) true ) ) ( = tmp742 1 ) )
+ ( implies ( and x471 ( and x424 true ) ) ( = tmp742 2 ) )
+ ( implies ( and ( not x328 ) ( and ( not x376 ) true ) ) ( = tmp741 0 ) )
+ ( implies ( and ( not x328 ) ( and x376 true ) ) ( = tmp741 1 ) )
+ ( implies ( and x328 ( and ( not x376 ) true ) ) ( = tmp741 1 ) )
+ ( implies ( and x328 ( and x376 true ) ) ( = tmp741 2 ) )
+ ( implies ( and ( not x566 ) ( and ( not x518 ) true ) ) ( = tmp740 0 ) )
+ ( implies ( and ( not x566 ) ( and x518 true ) ) ( = tmp740 1 ) )
+ ( implies ( and x566 ( and ( not x518 ) true ) ) ( = tmp740 1 ) )
+ ( implies ( and x566 ( and x518 true ) ) ( = tmp740 2 ) )
+ ( implies ( and ( not x236 ) ( and ( not x280 ) true ) ) ( = tmp739 0 ) )
+ ( implies ( and ( not x236 ) ( and x280 true ) ) ( = tmp739 1 ) )
+ ( implies ( and x236 ( and ( not x280 ) true ) ) ( = tmp739 1 ) )
+ ( implies ( and x236 ( and x280 true ) ) ( = tmp739 2 ) )
+ ( implies ( and ( not x661 ) ( and ( not x613 ) true ) ) ( = tmp738 0 ) )
+ ( implies ( and ( not x661 ) ( and x613 true ) ) ( = tmp738 1 ) )
+ ( implies ( and x661 ( and ( not x613 ) true ) ) ( = tmp738 1 ) )
+ ( implies ( and x661 ( and x613 true ) ) ( = tmp738 2 ) )
+ ( implies ( and ( not x140 ) ( and ( not x188 ) true ) ) ( = tmp737 0 ) )
+ ( implies ( and ( not x140 ) ( and x188 true ) ) ( = tmp737 1 ) )
+ ( implies ( and x140 ( and ( not x188 ) true ) ) ( = tmp737 1 ) )
+ ( implies ( and x140 ( and x188 true ) ) ( = tmp737 2 ) )
+ ( implies ( and ( not x756 ) ( and ( not x708 ) true ) ) ( = tmp736 0 ) )
+ ( implies ( and ( not x756 ) ( and x708 true ) ) ( = tmp736 1 ) )
+ ( implies ( and x756 ( and ( not x708 ) true ) ) ( = tmp736 1 ) )
+ ( implies ( and x756 ( and x708 true ) ) ( = tmp736 2 ) )
+ ( implies ( and ( not x45 ) ( and ( not x93 ) true ) ) ( = tmp735 0 ) )
+ ( implies ( and ( not x45 ) ( and x93 true ) ) ( = tmp735 1 ) )
+ ( implies ( and x45 ( and ( not x93 ) true ) ) ( = tmp735 1 ) )
+ ( implies ( and x45 ( and x93 true ) ) ( = tmp735 2 ) )
+ ( implies ( and ( not x470 ) ( and ( not x423 ) true ) ) ( = tmp734 0 ) )
+ ( implies ( and ( not x470 ) ( and x423 true ) ) ( = tmp734 1 ) )
+ ( implies ( and x470 ( and ( not x423 ) true ) ) ( = tmp734 1 ) )
+ ( implies ( and x470 ( and x423 true ) ) ( = tmp734 2 ) )
+ ( implies ( and ( not x327 ) ( and ( not x375 ) true ) ) ( = tmp733 0 ) )
+ ( implies ( and ( not x327 ) ( and x375 true ) ) ( = tmp733 1 ) )
+ ( implies ( and x327 ( and ( not x375 ) true ) ) ( = tmp733 1 ) )
+ ( implies ( and x327 ( and x375 true ) ) ( = tmp733 2 ) )
+ ( implies ( and ( not x565 ) ( and ( not x517 ) true ) ) ( = tmp732 0 ) )
+ ( implies ( and ( not x565 ) ( and x517 true ) ) ( = tmp732 1 ) )
+ ( implies ( and x565 ( and ( not x517 ) true ) ) ( = tmp732 1 ) )
+ ( implies ( and x565 ( and x517 true ) ) ( = tmp732 2 ) )
+ ( implies ( and ( not x235 ) ( and ( not x279 ) true ) ) ( = tmp731 0 ) )
+ ( implies ( and ( not x235 ) ( and x279 true ) ) ( = tmp731 1 ) )
+ ( implies ( and x235 ( and ( not x279 ) true ) ) ( = tmp731 1 ) )
+ ( implies ( and x235 ( and x279 true ) ) ( = tmp731 2 ) )
+ ( implies ( and ( not x660 ) ( and ( not x612 ) true ) ) ( = tmp730 0 ) )
+ ( implies ( and ( not x660 ) ( and x612 true ) ) ( = tmp730 1 ) )
+ ( implies ( and x660 ( and ( not x612 ) true ) ) ( = tmp730 1 ) )
+ ( implies ( and x660 ( and x612 true ) ) ( = tmp730 2 ) )
+ ( implies ( and ( not x139 ) ( and ( not x187 ) true ) ) ( = tmp729 0 ) )
+ ( implies ( and ( not x139 ) ( and x187 true ) ) ( = tmp729 1 ) )
+ ( implies ( and x139 ( and ( not x187 ) true ) ) ( = tmp729 1 ) )
+ ( implies ( and x139 ( and x187 true ) ) ( = tmp729 2 ) )
+ ( implies ( and ( not x755 ) ( and ( not x707 ) true ) ) ( = tmp728 0 ) )
+ ( implies ( and ( not x755 ) ( and x707 true ) ) ( = tmp728 1 ) )
+ ( implies ( and x755 ( and ( not x707 ) true ) ) ( = tmp728 1 ) )
+ ( implies ( and x755 ( and x707 true ) ) ( = tmp728 2 ) )
+ ( implies ( and ( not x44 ) ( and ( not x92 ) true ) ) ( = tmp727 0 ) )
+ ( implies ( and ( not x44 ) ( and x92 true ) ) ( = tmp727 1 ) )
+ ( implies ( and x44 ( and ( not x92 ) true ) ) ( = tmp727 1 ) )
+ ( implies ( and x44 ( and x92 true ) ) ( = tmp727 2 ) )
+ ( implies ( and ( not x469 ) ( and ( not x422 ) true ) ) ( = tmp726 0 ) )
+ ( implies ( and ( not x469 ) ( and x422 true ) ) ( = tmp726 1 ) )
+ ( implies ( and x469 ( and ( not x422 ) true ) ) ( = tmp726 1 ) )
+ ( implies ( and x469 ( and x422 true ) ) ( = tmp726 2 ) )
+ ( implies ( and ( not x326 ) ( and ( not x374 ) true ) ) ( = tmp725 0 ) )
+ ( implies ( and ( not x326 ) ( and x374 true ) ) ( = tmp725 1 ) )
+ ( implies ( and x326 ( and ( not x374 ) true ) ) ( = tmp725 1 ) )
+ ( implies ( and x326 ( and x374 true ) ) ( = tmp725 2 ) )
+ ( implies ( and ( not x564 ) ( and ( not x516 ) true ) ) ( = tmp724 0 ) )
+ ( implies ( and ( not x564 ) ( and x516 true ) ) ( = tmp724 1 ) )
+ ( implies ( and x564 ( and ( not x516 ) true ) ) ( = tmp724 1 ) )
+ ( implies ( and x564 ( and x516 true ) ) ( = tmp724 2 ) )
+ ( implies ( and ( not x234 ) ( and ( not x278 ) true ) ) ( = tmp723 0 ) )
+ ( implies ( and ( not x234 ) ( and x278 true ) ) ( = tmp723 1 ) )
+ ( implies ( and x234 ( and ( not x278 ) true ) ) ( = tmp723 1 ) )
+ ( implies ( and x234 ( and x278 true ) ) ( = tmp723 2 ) )
+ ( implies ( and ( not x659 ) ( and ( not x611 ) true ) ) ( = tmp722 0 ) )
+ ( implies ( and ( not x659 ) ( and x611 true ) ) ( = tmp722 1 ) )
+ ( implies ( and x659 ( and ( not x611 ) true ) ) ( = tmp722 1 ) )
+ ( implies ( and x659 ( and x611 true ) ) ( = tmp722 2 ) )
+ ( implies ( and ( not x138 ) ( and ( not x186 ) true ) ) ( = tmp721 0 ) )
+ ( implies ( and ( not x138 ) ( and x186 true ) ) ( = tmp721 1 ) )
+ ( implies ( and x138 ( and ( not x186 ) true ) ) ( = tmp721 1 ) )
+ ( implies ( and x138 ( and x186 true ) ) ( = tmp721 2 ) )
+ ( implies ( and ( not x754 ) ( and ( not x706 ) true ) ) ( = tmp720 0 ) )
+ ( implies ( and ( not x754 ) ( and x706 true ) ) ( = tmp720 1 ) )
+ ( implies ( and x754 ( and ( not x706 ) true ) ) ( = tmp720 1 ) )
+ ( implies ( and x754 ( and x706 true ) ) ( = tmp720 2 ) )
+ ( implies ( and ( not x43 ) ( and ( not x91 ) true ) ) ( = tmp719 0 ) )
+ ( implies ( and ( not x43 ) ( and x91 true ) ) ( = tmp719 1 ) )
+ ( implies ( and x43 ( and ( not x91 ) true ) ) ( = tmp719 1 ) )
+ ( implies ( and x43 ( and x91 true ) ) ( = tmp719 2 ) )
+ ( implies ( and ( not x468 ) ( and ( not x421 ) true ) ) ( = tmp718 0 ) )
+ ( implies ( and ( not x468 ) ( and x421 true ) ) ( = tmp718 1 ) )
+ ( implies ( and x468 ( and ( not x421 ) true ) ) ( = tmp718 1 ) )
+ ( implies ( and x468 ( and x421 true ) ) ( = tmp718 2 ) )
+ ( implies ( and ( not x325 ) ( and ( not x373 ) true ) ) ( = tmp717 0 ) )
+ ( implies ( and ( not x325 ) ( and x373 true ) ) ( = tmp717 1 ) )
+ ( implies ( and x325 ( and ( not x373 ) true ) ) ( = tmp717 1 ) )
+ ( implies ( and x325 ( and x373 true ) ) ( = tmp717 2 ) )
+ ( implies ( and ( not x563 ) ( and ( not x515 ) true ) ) ( = tmp716 0 ) )
+ ( implies ( and ( not x563 ) ( and x515 true ) ) ( = tmp716 1 ) )
+ ( implies ( and x563 ( and ( not x515 ) true ) ) ( = tmp716 1 ) )
+ ( implies ( and x563 ( and x515 true ) ) ( = tmp716 2 ) )
+ ( implies ( and ( not x233 ) ( and ( not x277 ) true ) ) ( = tmp715 0 ) )
+ ( implies ( and ( not x233 ) ( and x277 true ) ) ( = tmp715 1 ) )
+ ( implies ( and x233 ( and ( not x277 ) true ) ) ( = tmp715 1 ) )
+ ( implies ( and x233 ( and x277 true ) ) ( = tmp715 2 ) )
+ ( implies ( and ( not x658 ) ( and ( not x610 ) true ) ) ( = tmp714 0 ) )
+ ( implies ( and ( not x658 ) ( and x610 true ) ) ( = tmp714 1 ) )
+ ( implies ( and x658 ( and ( not x610 ) true ) ) ( = tmp714 1 ) )
+ ( implies ( and x658 ( and x610 true ) ) ( = tmp714 2 ) )
+ ( implies ( and ( not x137 ) ( and ( not x185 ) true ) ) ( = tmp713 0 ) )
+ ( implies ( and ( not x137 ) ( and x185 true ) ) ( = tmp713 1 ) )
+ ( implies ( and x137 ( and ( not x185 ) true ) ) ( = tmp713 1 ) )
+ ( implies ( and x137 ( and x185 true ) ) ( = tmp713 2 ) )
+ ( implies ( and ( not x753 ) ( and ( not x705 ) true ) ) ( = tmp712 0 ) )
+ ( implies ( and ( not x753 ) ( and x705 true ) ) ( = tmp712 1 ) )
+ ( implies ( and x753 ( and ( not x705 ) true ) ) ( = tmp712 1 ) )
+ ( implies ( and x753 ( and x705 true ) ) ( = tmp712 2 ) )
+ ( implies ( and ( not x42 ) ( and ( not x90 ) true ) ) ( = tmp711 0 ) )
+ ( implies ( and ( not x42 ) ( and x90 true ) ) ( = tmp711 1 ) )
+ ( implies ( and x42 ( and ( not x90 ) true ) ) ( = tmp711 1 ) )
+ ( implies ( and x42 ( and x90 true ) ) ( = tmp711 2 ) )
+ ( implies ( and ( not x467 ) ( and ( not x420 ) true ) ) ( = tmp710 0 ) )
+ ( implies ( and ( not x467 ) ( and x420 true ) ) ( = tmp710 1 ) )
+ ( implies ( and x467 ( and ( not x420 ) true ) ) ( = tmp710 1 ) )
+ ( implies ( and x467 ( and x420 true ) ) ( = tmp710 2 ) )
+ ( implies ( and ( not x324 ) ( and ( not x372 ) true ) ) ( = tmp709 0 ) )
+ ( implies ( and ( not x324 ) ( and x372 true ) ) ( = tmp709 1 ) )
+ ( implies ( and x324 ( and ( not x372 ) true ) ) ( = tmp709 1 ) )
+ ( implies ( and x324 ( and x372 true ) ) ( = tmp709 2 ) )
+ ( implies ( and ( not x562 ) ( and ( not x514 ) true ) ) ( = tmp708 0 ) )
+ ( implies ( and ( not x562 ) ( and x514 true ) ) ( = tmp708 1 ) )
+ ( implies ( and x562 ( and ( not x514 ) true ) ) ( = tmp708 1 ) )
+ ( implies ( and x562 ( and x514 true ) ) ( = tmp708 2 ) )
+ ( implies ( and ( not x232 ) ( and ( not x276 ) true ) ) ( = tmp707 0 ) )
+ ( implies ( and ( not x232 ) ( and x276 true ) ) ( = tmp707 1 ) )
+ ( implies ( and x232 ( and ( not x276 ) true ) ) ( = tmp707 1 ) )
+ ( implies ( and x232 ( and x276 true ) ) ( = tmp707 2 ) )
+ ( implies ( and ( not x704 ) ( and ( not x657 ) true ) ) ( = tmp706 0 ) )
+ ( implies ( and ( not x704 ) ( and x657 true ) ) ( = tmp706 1 ) )
+ ( implies ( and x704 ( and ( not x657 ) true ) ) ( = tmp706 1 ) )
+ ( implies ( and x704 ( and x657 true ) ) ( = tmp706 2 ) )
+ ( implies ( and ( not x136 ) ( and ( not x184 ) true ) ) ( = tmp705 0 ) )
+ ( implies ( and ( not x136 ) ( and x184 true ) ) ( = tmp705 1 ) )
+ ( implies ( and x136 ( and ( not x184 ) true ) ) ( = tmp705 1 ) )
+ ( implies ( and x136 ( and x184 true ) ) ( = tmp705 2 ) )
+ ( implies ( and ( not x769 ) ( and ( not x752 ) true ) ) ( = tmp704 0 ) )
+ ( implies ( and ( not x769 ) ( and x752 true ) ) ( = tmp704 1 ) )
+ ( implies ( and x769 ( and ( not x752 ) true ) ) ( = tmp704 1 ) )
+ ( implies ( and x769 ( and x752 true ) ) ( = tmp704 2 ) )
+ ( implies ( and ( not x41 ) ( and ( not x89 ) true ) ) ( = tmp703 0 ) )
+ ( implies ( and ( not x41 ) ( and x89 true ) ) ( = tmp703 1 ) )
+ ( implies ( and x41 ( and ( not x89 ) true ) ) ( = tmp703 1 ) )
+ ( implies ( and x41 ( and x89 true ) ) ( = tmp703 2 ) )
+ ( implies ( and ( not x466 ) ( and ( not x419 ) true ) ) ( = tmp702 0 ) )
+ ( implies ( and ( not x466 ) ( and x419 true ) ) ( = tmp702 1 ) )
+ ( implies ( and x466 ( and ( not x419 ) true ) ) ( = tmp702 1 ) )
+ ( implies ( and x466 ( and x419 true ) ) ( = tmp702 2 ) )
+ ( implies ( and ( not x323 ) ( and ( not x371 ) true ) ) ( = tmp701 0 ) )
+ ( implies ( and ( not x323 ) ( and x371 true ) ) ( = tmp701 1 ) )
+ ( implies ( and x323 ( and ( not x371 ) true ) ) ( = tmp701 1 ) )
+ ( implies ( and x323 ( and x371 true ) ) ( = tmp701 2 ) )
+ ( implies ( and ( not x561 ) ( and ( not x513 ) true ) ) ( = tmp700 0 ) )
+ ( implies ( and ( not x561 ) ( and x513 true ) ) ( = tmp700 1 ) )
+ ( implies ( and x561 ( and ( not x513 ) true ) ) ( = tmp700 1 ) )
+ ( implies ( and x561 ( and x513 true ) ) ( = tmp700 2 ) )
+ ( implies ( and ( not x231 ) ( and ( not x275 ) true ) ) ( = tmp699 0 ) )
+ ( implies ( and ( not x231 ) ( and x275 true ) ) ( = tmp699 1 ) )
+ ( implies ( and x231 ( and ( not x275 ) true ) ) ( = tmp699 1 ) )
+ ( implies ( and x231 ( and x275 true ) ) ( = tmp699 2 ) )
+ ( implies ( and ( not x656 ) ( and ( not x609 ) true ) ) ( = tmp698 0 ) )
+ ( implies ( and ( not x656 ) ( and x609 true ) ) ( = tmp698 1 ) )
+ ( implies ( and x656 ( and ( not x609 ) true ) ) ( = tmp698 1 ) )
+ ( implies ( and x656 ( and x609 true ) ) ( = tmp698 2 ) )
+ ( implies ( and ( not x135 ) ( and ( not x183 ) true ) ) ( = tmp697 0 ) )
+ ( implies ( and ( not x135 ) ( and x183 true ) ) ( = tmp697 1 ) )
+ ( implies ( and x135 ( and ( not x183 ) true ) ) ( = tmp697 1 ) )
+ ( implies ( and x135 ( and x183 true ) ) ( = tmp697 2 ) )
+ ( implies ( and ( not x751 ) ( and ( not x703 ) true ) ) ( = tmp696 0 ) )
+ ( implies ( and ( not x751 ) ( and x703 true ) ) ( = tmp696 1 ) )
+ ( implies ( and x751 ( and ( not x703 ) true ) ) ( = tmp696 1 ) )
+ ( implies ( and x751 ( and x703 true ) ) ( = tmp696 2 ) )
+ ( implies ( and ( not x40 ) ( and ( not x88 ) true ) ) ( = tmp695 0 ) )
+ ( implies ( and ( not x40 ) ( and x88 true ) ) ( = tmp695 1 ) )
+ ( implies ( and x40 ( and ( not x88 ) true ) ) ( = tmp695 1 ) )
+ ( implies ( and x40 ( and x88 true ) ) ( = tmp695 2 ) )
+ ( implies ( and ( not x465 ) ( and ( not x418 ) true ) ) ( = tmp694 0 ) )
+ ( implies ( and ( not x465 ) ( and x418 true ) ) ( = tmp694 1 ) )
+ ( implies ( and x465 ( and ( not x418 ) true ) ) ( = tmp694 1 ) )
+ ( implies ( and x465 ( and x418 true ) ) ( = tmp694 2 ) )
+ ( implies ( and ( not x322 ) ( and ( not x370 ) true ) ) ( = tmp693 0 ) )
+ ( implies ( and ( not x322 ) ( and x370 true ) ) ( = tmp693 1 ) )
+ ( implies ( and x322 ( and ( not x370 ) true ) ) ( = tmp693 1 ) )
+ ( implies ( and x322 ( and x370 true ) ) ( = tmp693 2 ) )
+ ( implies ( and ( not x560 ) ( and ( not x512 ) true ) ) ( = tmp692 0 ) )
+ ( implies ( and ( not x560 ) ( and x512 true ) ) ( = tmp692 1 ) )
+ ( implies ( and x560 ( and ( not x512 ) true ) ) ( = tmp692 1 ) )
+ ( implies ( and x560 ( and x512 true ) ) ( = tmp692 2 ) )
+ ( implies ( and ( not x230 ) ( and ( not x274 ) true ) ) ( = tmp691 0 ) )
+ ( implies ( and ( not x230 ) ( and x274 true ) ) ( = tmp691 1 ) )
+ ( implies ( and x230 ( and ( not x274 ) true ) ) ( = tmp691 1 ) )
+ ( implies ( and x230 ( and x274 true ) ) ( = tmp691 2 ) )
+ ( implies ( and ( not x655 ) ( and ( not x608 ) true ) ) ( = tmp690 0 ) )
+ ( implies ( and ( not x655 ) ( and x608 true ) ) ( = tmp690 1 ) )
+ ( implies ( and x655 ( and ( not x608 ) true ) ) ( = tmp690 1 ) )
+ ( implies ( and x655 ( and x608 true ) ) ( = tmp690 2 ) )
+ ( implies ( and ( not x134 ) ( and ( not x182 ) true ) ) ( = tmp689 0 ) )
+ ( implies ( and ( not x134 ) ( and x182 true ) ) ( = tmp689 1 ) )
+ ( implies ( and x134 ( and ( not x182 ) true ) ) ( = tmp689 1 ) )
+ ( implies ( and x134 ( and x182 true ) ) ( = tmp689 2 ) )
+ ( implies ( and ( not x750 ) ( and ( not x702 ) true ) ) ( = tmp688 0 ) )
+ ( implies ( and ( not x750 ) ( and x702 true ) ) ( = tmp688 1 ) )
+ ( implies ( and x750 ( and ( not x702 ) true ) ) ( = tmp688 1 ) )
+ ( implies ( and x750 ( and x702 true ) ) ( = tmp688 2 ) )
+ ( implies ( and ( not x39 ) ( and ( not x87 ) true ) ) ( = tmp687 0 ) )
+ ( implies ( and ( not x39 ) ( and x87 true ) ) ( = tmp687 1 ) )
+ ( implies ( and x39 ( and ( not x87 ) true ) ) ( = tmp687 1 ) )
+ ( implies ( and x39 ( and x87 true ) ) ( = tmp687 2 ) )
+ ( implies ( and ( not x464 ) ( and ( not x417 ) true ) ) ( = tmp686 0 ) )
+ ( implies ( and ( not x464 ) ( and x417 true ) ) ( = tmp686 1 ) )
+ ( implies ( and x464 ( and ( not x417 ) true ) ) ( = tmp686 1 ) )
+ ( implies ( and x464 ( and x417 true ) ) ( = tmp686 2 ) )
+ ( implies ( and ( not x321 ) ( and ( not x369 ) true ) ) ( = tmp685 0 ) )
+ ( implies ( and ( not x321 ) ( and x369 true ) ) ( = tmp685 1 ) )
+ ( implies ( and x321 ( and ( not x369 ) true ) ) ( = tmp685 1 ) )
+ ( implies ( and x321 ( and x369 true ) ) ( = tmp685 2 ) )
+ ( implies ( and ( not x559 ) ( and ( not x511 ) true ) ) ( = tmp684 0 ) )
+ ( implies ( and ( not x559 ) ( and x511 true ) ) ( = tmp684 1 ) )
+ ( implies ( and x559 ( and ( not x511 ) true ) ) ( = tmp684 1 ) )
+ ( implies ( and x559 ( and x511 true ) ) ( = tmp684 2 ) )
+ ( implies ( and ( not x229 ) ( and ( not x273 ) true ) ) ( = tmp683 0 ) )
+ ( implies ( and ( not x229 ) ( and x273 true ) ) ( = tmp683 1 ) )
+ ( implies ( and x229 ( and ( not x273 ) true ) ) ( = tmp683 1 ) )
+ ( implies ( and x229 ( and x273 true ) ) ( = tmp683 2 ) )
+ ( implies ( and ( not x654 ) ( and ( not x607 ) true ) ) ( = tmp682 0 ) )
+ ( implies ( and ( not x654 ) ( and x607 true ) ) ( = tmp682 1 ) )
+ ( implies ( and x654 ( and ( not x607 ) true ) ) ( = tmp682 1 ) )
+ ( implies ( and x654 ( and x607 true ) ) ( = tmp682 2 ) )
+ ( implies ( and ( not x133 ) ( and ( not x181 ) true ) ) ( = tmp681 0 ) )
+ ( implies ( and ( not x133 ) ( and x181 true ) ) ( = tmp681 1 ) )
+ ( implies ( and x133 ( and ( not x181 ) true ) ) ( = tmp681 1 ) )
+ ( implies ( and x133 ( and x181 true ) ) ( = tmp681 2 ) )
+ ( implies ( and ( not x749 ) ( and ( not x701 ) true ) ) ( = tmp680 0 ) )
+ ( implies ( and ( not x749 ) ( and x701 true ) ) ( = tmp680 1 ) )
+ ( implies ( and x749 ( and ( not x701 ) true ) ) ( = tmp680 1 ) )
+ ( implies ( and x749 ( and x701 true ) ) ( = tmp680 2 ) )
+ ( implies ( and ( not x38 ) ( and ( not x86 ) true ) ) ( = tmp679 0 ) )
+ ( implies ( and ( not x38 ) ( and x86 true ) ) ( = tmp679 1 ) )
+ ( implies ( and x38 ( and ( not x86 ) true ) ) ( = tmp679 1 ) )
+ ( implies ( and x38 ( and x86 true ) ) ( = tmp679 2 ) )
+ ( implies ( and ( not x463 ) ( and ( not x416 ) true ) ) ( = tmp678 0 ) )
+ ( implies ( and ( not x463 ) ( and x416 true ) ) ( = tmp678 1 ) )
+ ( implies ( and x463 ( and ( not x416 ) true ) ) ( = tmp678 1 ) )
+ ( implies ( and x463 ( and x416 true ) ) ( = tmp678 2 ) )
+ ( implies ( and ( not x320 ) ( and ( not x368 ) true ) ) ( = tmp677 0 ) )
+ ( implies ( and ( not x320 ) ( and x368 true ) ) ( = tmp677 1 ) )
+ ( implies ( and x320 ( and ( not x368 ) true ) ) ( = tmp677 1 ) )
+ ( implies ( and x320 ( and x368 true ) ) ( = tmp677 2 ) )
+ ( implies ( and ( not x558 ) ( and ( not x510 ) true ) ) ( = tmp676 0 ) )
+ ( implies ( and ( not x558 ) ( and x510 true ) ) ( = tmp676 1 ) )
+ ( implies ( and x558 ( and ( not x510 ) true ) ) ( = tmp676 1 ) )
+ ( implies ( and x558 ( and x510 true ) ) ( = tmp676 2 ) )
+ ( implies ( and ( not x228 ) ( and ( not x272 ) true ) ) ( = tmp675 0 ) )
+ ( implies ( and ( not x228 ) ( and x272 true ) ) ( = tmp675 1 ) )
+ ( implies ( and x228 ( and ( not x272 ) true ) ) ( = tmp675 1 ) )
+ ( implies ( and x228 ( and x272 true ) ) ( = tmp675 2 ) )
+ ( implies ( and ( not x653 ) ( and ( not x606 ) true ) ) ( = tmp674 0 ) )
+ ( implies ( and ( not x653 ) ( and x606 true ) ) ( = tmp674 1 ) )
+ ( implies ( and x653 ( and ( not x606 ) true ) ) ( = tmp674 1 ) )
+ ( implies ( and x653 ( and x606 true ) ) ( = tmp674 2 ) )
+ ( implies ( and ( not x132 ) ( and ( not x180 ) true ) ) ( = tmp673 0 ) )
+ ( implies ( and ( not x132 ) ( and x180 true ) ) ( = tmp673 1 ) )
+ ( implies ( and x132 ( and ( not x180 ) true ) ) ( = tmp673 1 ) )
+ ( implies ( and x132 ( and x180 true ) ) ( = tmp673 2 ) )
+ ( implies ( and ( not x748 ) ( and ( not x700 ) true ) ) ( = tmp672 0 ) )
+ ( implies ( and ( not x748 ) ( and x700 true ) ) ( = tmp672 1 ) )
+ ( implies ( and x748 ( and ( not x700 ) true ) ) ( = tmp672 1 ) )
+ ( implies ( and x748 ( and x700 true ) ) ( = tmp672 2 ) )
+ ( implies ( and ( not x37 ) ( and ( not x85 ) true ) ) ( = tmp671 0 ) )
+ ( implies ( and ( not x37 ) ( and x85 true ) ) ( = tmp671 1 ) )
+ ( implies ( and x37 ( and ( not x85 ) true ) ) ( = tmp671 1 ) )
+ ( implies ( and x37 ( and x85 true ) ) ( = tmp671 2 ) )
+ ( implies ( and ( not x462 ) ( and ( not x415 ) true ) ) ( = tmp670 0 ) )
+ ( implies ( and ( not x462 ) ( and x415 true ) ) ( = tmp670 1 ) )
+ ( implies ( and x462 ( and ( not x415 ) true ) ) ( = tmp670 1 ) )
+ ( implies ( and x462 ( and x415 true ) ) ( = tmp670 2 ) )
+ ( implies ( and ( not x319 ) ( and ( not x367 ) true ) ) ( = tmp669 0 ) )
+ ( implies ( and ( not x319 ) ( and x367 true ) ) ( = tmp669 1 ) )
+ ( implies ( and x319 ( and ( not x367 ) true ) ) ( = tmp669 1 ) )
+ ( implies ( and x319 ( and x367 true ) ) ( = tmp669 2 ) )
+ ( implies ( and ( not x557 ) ( and ( not x509 ) true ) ) ( = tmp668 0 ) )
+ ( implies ( and ( not x557 ) ( and x509 true ) ) ( = tmp668 1 ) )
+ ( implies ( and x557 ( and ( not x509 ) true ) ) ( = tmp668 1 ) )
+ ( implies ( and x557 ( and x509 true ) ) ( = tmp668 2 ) )
+ ( implies ( and ( not x227 ) ( and ( not x271 ) true ) ) ( = tmp667 0 ) )
+ ( implies ( and ( not x227 ) ( and x271 true ) ) ( = tmp667 1 ) )
+ ( implies ( and x227 ( and ( not x271 ) true ) ) ( = tmp667 1 ) )
+ ( implies ( and x227 ( and x271 true ) ) ( = tmp667 2 ) )
+ ( implies ( and ( not x652 ) ( and ( not x605 ) true ) ) ( = tmp666 0 ) )
+ ( implies ( and ( not x652 ) ( and x605 true ) ) ( = tmp666 1 ) )
+ ( implies ( and x652 ( and ( not x605 ) true ) ) ( = tmp666 1 ) )
+ ( implies ( and x652 ( and x605 true ) ) ( = tmp666 2 ) )
+ ( implies ( and ( not x131 ) ( and ( not x179 ) true ) ) ( = tmp665 0 ) )
+ ( implies ( and ( not x131 ) ( and x179 true ) ) ( = tmp665 1 ) )
+ ( implies ( and x131 ( and ( not x179 ) true ) ) ( = tmp665 1 ) )
+ ( implies ( and x131 ( and x179 true ) ) ( = tmp665 2 ) )
+ ( implies ( and ( not x747 ) ( and ( not x699 ) true ) ) ( = tmp664 0 ) )
+ ( implies ( and ( not x747 ) ( and x699 true ) ) ( = tmp664 1 ) )
+ ( implies ( and x747 ( and ( not x699 ) true ) ) ( = tmp664 1 ) )
+ ( implies ( and x747 ( and x699 true ) ) ( = tmp664 2 ) )
+ ( implies ( and ( not x36 ) ( and ( not x84 ) true ) ) ( = tmp663 0 ) )
+ ( implies ( and ( not x36 ) ( and x84 true ) ) ( = tmp663 1 ) )
+ ( implies ( and x36 ( and ( not x84 ) true ) ) ( = tmp663 1 ) )
+ ( implies ( and x36 ( and x84 true ) ) ( = tmp663 2 ) )
+ ( implies ( and ( not x461 ) ( and ( not x414 ) true ) ) ( = tmp662 0 ) )
+ ( implies ( and ( not x461 ) ( and x414 true ) ) ( = tmp662 1 ) )
+ ( implies ( and x461 ( and ( not x414 ) true ) ) ( = tmp662 1 ) )
+ ( implies ( and x461 ( and x414 true ) ) ( = tmp662 2 ) )
+ ( implies ( and ( not x318 ) ( and ( not x366 ) true ) ) ( = tmp661 0 ) )
+ ( implies ( and ( not x318 ) ( and x366 true ) ) ( = tmp661 1 ) )
+ ( implies ( and x318 ( and ( not x366 ) true ) ) ( = tmp661 1 ) )
+ ( implies ( and x318 ( and x366 true ) ) ( = tmp661 2 ) )
+ ( implies ( and ( not x556 ) ( and ( not x508 ) true ) ) ( = tmp660 0 ) )
+ ( implies ( and ( not x556 ) ( and x508 true ) ) ( = tmp660 1 ) )
+ ( implies ( and x556 ( and ( not x508 ) true ) ) ( = tmp660 1 ) )
+ ( implies ( and x556 ( and x508 true ) ) ( = tmp660 2 ) )
+ ( implies ( and ( not x226 ) ( and ( not x270 ) true ) ) ( = tmp659 0 ) )
+ ( implies ( and ( not x226 ) ( and x270 true ) ) ( = tmp659 1 ) )
+ ( implies ( and x226 ( and ( not x270 ) true ) ) ( = tmp659 1 ) )
+ ( implies ( and x226 ( and x270 true ) ) ( = tmp659 2 ) )
+ ( implies ( and ( not x651 ) ( and ( not x604 ) true ) ) ( = tmp658 0 ) )
+ ( implies ( and ( not x651 ) ( and x604 true ) ) ( = tmp658 1 ) )
+ ( implies ( and x651 ( and ( not x604 ) true ) ) ( = tmp658 1 ) )
+ ( implies ( and x651 ( and x604 true ) ) ( = tmp658 2 ) )
+ ( implies ( and ( not x130 ) ( and ( not x178 ) true ) ) ( = tmp657 0 ) )
+ ( implies ( and ( not x130 ) ( and x178 true ) ) ( = tmp657 1 ) )
+ ( implies ( and x130 ( and ( not x178 ) true ) ) ( = tmp657 1 ) )
+ ( implies ( and x130 ( and x178 true ) ) ( = tmp657 2 ) )
+ ( implies ( and ( not x746 ) ( and ( not x698 ) true ) ) ( = tmp656 0 ) )
+ ( implies ( and ( not x746 ) ( and x698 true ) ) ( = tmp656 1 ) )
+ ( implies ( and x746 ( and ( not x698 ) true ) ) ( = tmp656 1 ) )
+ ( implies ( and x746 ( and x698 true ) ) ( = tmp656 2 ) )
+ ( implies ( and ( not x35 ) ( and ( not x83 ) true ) ) ( = tmp655 0 ) )
+ ( implies ( and ( not x35 ) ( and x83 true ) ) ( = tmp655 1 ) )
+ ( implies ( and x35 ( and ( not x83 ) true ) ) ( = tmp655 1 ) )
+ ( implies ( and x35 ( and x83 true ) ) ( = tmp655 2 ) )
+ ( implies ( and ( not x460 ) ( and ( not x413 ) true ) ) ( = tmp654 0 ) )
+ ( implies ( and ( not x460 ) ( and x413 true ) ) ( = tmp654 1 ) )
+ ( implies ( and x460 ( and ( not x413 ) true ) ) ( = tmp654 1 ) )
+ ( implies ( and x460 ( and x413 true ) ) ( = tmp654 2 ) )
+ ( implies ( and ( not x317 ) ( and ( not x365 ) true ) ) ( = tmp653 0 ) )
+ ( implies ( and ( not x317 ) ( and x365 true ) ) ( = tmp653 1 ) )
+ ( implies ( and x317 ( and ( not x365 ) true ) ) ( = tmp653 1 ) )
+ ( implies ( and x317 ( and x365 true ) ) ( = tmp653 2 ) )
+ ( implies ( and ( not x555 ) ( and ( not x507 ) true ) ) ( = tmp652 0 ) )
+ ( implies ( and ( not x555 ) ( and x507 true ) ) ( = tmp652 1 ) )
+ ( implies ( and x555 ( and ( not x507 ) true ) ) ( = tmp652 1 ) )
+ ( implies ( and x555 ( and x507 true ) ) ( = tmp652 2 ) )
+ ( implies ( and ( not x225 ) ( and ( not x269 ) true ) ) ( = tmp651 0 ) )
+ ( implies ( and ( not x225 ) ( and x269 true ) ) ( = tmp651 1 ) )
+ ( implies ( and x225 ( and ( not x269 ) true ) ) ( = tmp651 1 ) )
+ ( implies ( and x225 ( and x269 true ) ) ( = tmp651 2 ) )
+ ( implies ( and ( not x650 ) ( and ( not x603 ) true ) ) ( = tmp650 0 ) )
+ ( implies ( and ( not x650 ) ( and x603 true ) ) ( = tmp650 1 ) )
+ ( implies ( and x650 ( and ( not x603 ) true ) ) ( = tmp650 1 ) )
+ ( implies ( and x650 ( and x603 true ) ) ( = tmp650 2 ) )
+ ( implies ( and ( not x129 ) ( and ( not x177 ) true ) ) ( = tmp649 0 ) )
+ ( implies ( and ( not x129 ) ( and x177 true ) ) ( = tmp649 1 ) )
+ ( implies ( and x129 ( and ( not x177 ) true ) ) ( = tmp649 1 ) )
+ ( implies ( and x129 ( and x177 true ) ) ( = tmp649 2 ) )
+ ( implies ( and ( not x745 ) ( and ( not x697 ) true ) ) ( = tmp648 0 ) )
+ ( implies ( and ( not x745 ) ( and x697 true ) ) ( = tmp648 1 ) )
+ ( implies ( and x745 ( and ( not x697 ) true ) ) ( = tmp648 1 ) )
+ ( implies ( and x745 ( and x697 true ) ) ( = tmp648 2 ) )
+ ( implies ( and ( not x34 ) ( and ( not x82 ) true ) ) ( = tmp647 0 ) )
+ ( implies ( and ( not x34 ) ( and x82 true ) ) ( = tmp647 1 ) )
+ ( implies ( and x34 ( and ( not x82 ) true ) ) ( = tmp647 1 ) )
+ ( implies ( and x34 ( and x82 true ) ) ( = tmp647 2 ) )
+ ( implies ( and ( not x459 ) ( and ( not x412 ) true ) ) ( = tmp646 0 ) )
+ ( implies ( and ( not x459 ) ( and x412 true ) ) ( = tmp646 1 ) )
+ ( implies ( and x459 ( and ( not x412 ) true ) ) ( = tmp646 1 ) )
+ ( implies ( and x459 ( and x412 true ) ) ( = tmp646 2 ) )
+ ( implies ( and ( not x316 ) ( and ( not x364 ) true ) ) ( = tmp645 0 ) )
+ ( implies ( and ( not x316 ) ( and x364 true ) ) ( = tmp645 1 ) )
+ ( implies ( and x316 ( and ( not x364 ) true ) ) ( = tmp645 1 ) )
+ ( implies ( and x316 ( and x364 true ) ) ( = tmp645 2 ) )
+ ( implies ( and ( not x554 ) ( and ( not x506 ) true ) ) ( = tmp644 0 ) )
+ ( implies ( and ( not x554 ) ( and x506 true ) ) ( = tmp644 1 ) )
+ ( implies ( and x554 ( and ( not x506 ) true ) ) ( = tmp644 1 ) )
+ ( implies ( and x554 ( and x506 true ) ) ( = tmp644 2 ) )
+ ( implies ( and ( not x224 ) ( and ( not x268 ) true ) ) ( = tmp643 0 ) )
+ ( implies ( and ( not x224 ) ( and x268 true ) ) ( = tmp643 1 ) )
+ ( implies ( and x224 ( and ( not x268 ) true ) ) ( = tmp643 1 ) )
+ ( implies ( and x224 ( and x268 true ) ) ( = tmp643 2 ) )
+ ( implies ( and ( not x649 ) ( and ( not x602 ) true ) ) ( = tmp642 0 ) )
+ ( implies ( and ( not x649 ) ( and x602 true ) ) ( = tmp642 1 ) )
+ ( implies ( and x649 ( and ( not x602 ) true ) ) ( = tmp642 1 ) )
+ ( implies ( and x649 ( and x602 true ) ) ( = tmp642 2 ) )
+ ( implies ( and ( not x128 ) ( and ( not x176 ) true ) ) ( = tmp641 0 ) )
+ ( implies ( and ( not x128 ) ( and x176 true ) ) ( = tmp641 1 ) )
+ ( implies ( and x128 ( and ( not x176 ) true ) ) ( = tmp641 1 ) )
+ ( implies ( and x128 ( and x176 true ) ) ( = tmp641 2 ) )
+ ( implies ( and ( not x744 ) ( and ( not x696 ) true ) ) ( = tmp640 0 ) )
+ ( implies ( and ( not x744 ) ( and x696 true ) ) ( = tmp640 1 ) )
+ ( implies ( and x744 ( and ( not x696 ) true ) ) ( = tmp640 1 ) )
+ ( implies ( and x744 ( and x696 true ) ) ( = tmp640 2 ) )
+ ( implies ( and ( not x33 ) ( and ( not x81 ) true ) ) ( = tmp639 0 ) )
+ ( implies ( and ( not x33 ) ( and x81 true ) ) ( = tmp639 1 ) )
+ ( implies ( and x33 ( and ( not x81 ) true ) ) ( = tmp639 1 ) )
+ ( implies ( and x33 ( and x81 true ) ) ( = tmp639 2 ) )
+ ( implies ( and ( not x458 ) ( and ( not x411 ) true ) ) ( = tmp638 0 ) )
+ ( implies ( and ( not x458 ) ( and x411 true ) ) ( = tmp638 1 ) )
+ ( implies ( and x458 ( and ( not x411 ) true ) ) ( = tmp638 1 ) )
+ ( implies ( and x458 ( and x411 true ) ) ( = tmp638 2 ) )
+ ( implies ( and ( not x315 ) ( and ( not x363 ) true ) ) ( = tmp637 0 ) )
+ ( implies ( and ( not x315 ) ( and x363 true ) ) ( = tmp637 1 ) )
+ ( implies ( and x315 ( and ( not x363 ) true ) ) ( = tmp637 1 ) )
+ ( implies ( and x315 ( and x363 true ) ) ( = tmp637 2 ) )
+ ( implies ( and ( not x553 ) ( and ( not x505 ) true ) ) ( = tmp636 0 ) )
+ ( implies ( and ( not x553 ) ( and x505 true ) ) ( = tmp636 1 ) )
+ ( implies ( and x553 ( and ( not x505 ) true ) ) ( = tmp636 1 ) )
+ ( implies ( and x553 ( and x505 true ) ) ( = tmp636 2 ) )
+ ( implies ( and ( not x223 ) ( and ( not x267 ) true ) ) ( = tmp635 0 ) )
+ ( implies ( and ( not x223 ) ( and x267 true ) ) ( = tmp635 1 ) )
+ ( implies ( and x223 ( and ( not x267 ) true ) ) ( = tmp635 1 ) )
+ ( implies ( and x223 ( and x267 true ) ) ( = tmp635 2 ) )
+ ( implies ( and ( not x648 ) ( and ( not x601 ) true ) ) ( = tmp634 0 ) )
+ ( implies ( and ( not x648 ) ( and x601 true ) ) ( = tmp634 1 ) )
+ ( implies ( and x648 ( and ( not x601 ) true ) ) ( = tmp634 1 ) )
+ ( implies ( and x648 ( and x601 true ) ) ( = tmp634 2 ) )
+ ( implies ( and ( not x127 ) ( and ( not x175 ) true ) ) ( = tmp633 0 ) )
+ ( implies ( and ( not x127 ) ( and x175 true ) ) ( = tmp633 1 ) )
+ ( implies ( and x127 ( and ( not x175 ) true ) ) ( = tmp633 1 ) )
+ ( implies ( and x127 ( and x175 true ) ) ( = tmp633 2 ) )
+ ( implies ( and ( not x743 ) ( and ( not x695 ) true ) ) ( = tmp632 0 ) )
+ ( implies ( and ( not x743 ) ( and x695 true ) ) ( = tmp632 1 ) )
+ ( implies ( and x743 ( and ( not x695 ) true ) ) ( = tmp632 1 ) )
+ ( implies ( and x743 ( and x695 true ) ) ( = tmp632 2 ) )
+ ( implies ( and ( not x32 ) ( and ( not x80 ) true ) ) ( = tmp631 0 ) )
+ ( implies ( and ( not x32 ) ( and x80 true ) ) ( = tmp631 1 ) )
+ ( implies ( and x32 ( and ( not x80 ) true ) ) ( = tmp631 1 ) )
+ ( implies ( and x32 ( and x80 true ) ) ( = tmp631 2 ) )
+ ( implies ( and ( not x457 ) ( and ( not x410 ) true ) ) ( = tmp630 0 ) )
+ ( implies ( and ( not x457 ) ( and x410 true ) ) ( = tmp630 1 ) )
+ ( implies ( and x457 ( and ( not x410 ) true ) ) ( = tmp630 1 ) )
+ ( implies ( and x457 ( and x410 true ) ) ( = tmp630 2 ) )
+ ( implies ( and ( not x314 ) ( and ( not x362 ) true ) ) ( = tmp629 0 ) )
+ ( implies ( and ( not x314 ) ( and x362 true ) ) ( = tmp629 1 ) )
+ ( implies ( and x314 ( and ( not x362 ) true ) ) ( = tmp629 1 ) )
+ ( implies ( and x314 ( and x362 true ) ) ( = tmp629 2 ) )
+ ( implies ( and ( not x552 ) ( and ( not x504 ) true ) ) ( = tmp628 0 ) )
+ ( implies ( and ( not x552 ) ( and x504 true ) ) ( = tmp628 1 ) )
+ ( implies ( and x552 ( and ( not x504 ) true ) ) ( = tmp628 1 ) )
+ ( implies ( and x552 ( and x504 true ) ) ( = tmp628 2 ) )
+ ( implies ( and ( not x222 ) ( and ( not x266 ) true ) ) ( = tmp627 0 ) )
+ ( implies ( and ( not x222 ) ( and x266 true ) ) ( = tmp627 1 ) )
+ ( implies ( and x222 ( and ( not x266 ) true ) ) ( = tmp627 1 ) )
+ ( implies ( and x222 ( and x266 true ) ) ( = tmp627 2 ) )
+ ( implies ( and ( not x647 ) ( and ( not x600 ) true ) ) ( = tmp626 0 ) )
+ ( implies ( and ( not x647 ) ( and x600 true ) ) ( = tmp626 1 ) )
+ ( implies ( and x647 ( and ( not x600 ) true ) ) ( = tmp626 1 ) )
+ ( implies ( and x647 ( and x600 true ) ) ( = tmp626 2 ) )
+ ( implies ( and ( not x126 ) ( and ( not x174 ) true ) ) ( = tmp625 0 ) )
+ ( implies ( and ( not x126 ) ( and x174 true ) ) ( = tmp625 1 ) )
+ ( implies ( and x126 ( and ( not x174 ) true ) ) ( = tmp625 1 ) )
+ ( implies ( and x126 ( and x174 true ) ) ( = tmp625 2 ) )
+ ( implies ( and ( not x742 ) ( and ( not x694 ) true ) ) ( = tmp624 0 ) )
+ ( implies ( and ( not x742 ) ( and x694 true ) ) ( = tmp624 1 ) )
+ ( implies ( and x742 ( and ( not x694 ) true ) ) ( = tmp624 1 ) )
+ ( implies ( and x742 ( and x694 true ) ) ( = tmp624 2 ) )
+ ( implies ( and ( not x31 ) ( and ( not x79 ) true ) ) ( = tmp623 0 ) )
+ ( implies ( and ( not x31 ) ( and x79 true ) ) ( = tmp623 1 ) )
+ ( implies ( and x31 ( and ( not x79 ) true ) ) ( = tmp623 1 ) )
+ ( implies ( and x31 ( and x79 true ) ) ( = tmp623 2 ) )
+ ( implies ( and ( not x456 ) ( and ( not x409 ) true ) ) ( = tmp622 0 ) )
+ ( implies ( and ( not x456 ) ( and x409 true ) ) ( = tmp622 1 ) )
+ ( implies ( and x456 ( and ( not x409 ) true ) ) ( = tmp622 1 ) )
+ ( implies ( and x456 ( and x409 true ) ) ( = tmp622 2 ) )
+ ( implies ( and ( not x313 ) ( and ( not x361 ) true ) ) ( = tmp621 0 ) )
+ ( implies ( and ( not x313 ) ( and x361 true ) ) ( = tmp621 1 ) )
+ ( implies ( and x313 ( and ( not x361 ) true ) ) ( = tmp621 1 ) )
+ ( implies ( and x313 ( and x361 true ) ) ( = tmp621 2 ) )
+ ( implies ( and ( not x551 ) ( and ( not x503 ) true ) ) ( = tmp620 0 ) )
+ ( implies ( and ( not x551 ) ( and x503 true ) ) ( = tmp620 1 ) )
+ ( implies ( and x551 ( and ( not x503 ) true ) ) ( = tmp620 1 ) )
+ ( implies ( and x551 ( and x503 true ) ) ( = tmp620 2 ) )
+ ( implies ( and ( not x221 ) ( and ( not x265 ) true ) ) ( = tmp619 0 ) )
+ ( implies ( and ( not x221 ) ( and x265 true ) ) ( = tmp619 1 ) )
+ ( implies ( and x221 ( and ( not x265 ) true ) ) ( = tmp619 1 ) )
+ ( implies ( and x221 ( and x265 true ) ) ( = tmp619 2 ) )
+ ( implies ( and ( not x646 ) ( and ( not x599 ) true ) ) ( = tmp618 0 ) )
+ ( implies ( and ( not x646 ) ( and x599 true ) ) ( = tmp618 1 ) )
+ ( implies ( and x646 ( and ( not x599 ) true ) ) ( = tmp618 1 ) )
+ ( implies ( and x646 ( and x599 true ) ) ( = tmp618 2 ) )
+ ( implies ( and ( not x125 ) ( and ( not x173 ) true ) ) ( = tmp617 0 ) )
+ ( implies ( and ( not x125 ) ( and x173 true ) ) ( = tmp617 1 ) )
+ ( implies ( and x125 ( and ( not x173 ) true ) ) ( = tmp617 1 ) )
+ ( implies ( and x125 ( and x173 true ) ) ( = tmp617 2 ) )
+ ( implies ( and ( not x741 ) ( and ( not x693 ) true ) ) ( = tmp616 0 ) )
+ ( implies ( and ( not x741 ) ( and x693 true ) ) ( = tmp616 1 ) )
+ ( implies ( and x741 ( and ( not x693 ) true ) ) ( = tmp616 1 ) )
+ ( implies ( and x741 ( and x693 true ) ) ( = tmp616 2 ) )
+ ( implies ( and ( not x30 ) ( and ( not x78 ) true ) ) ( = tmp615 0 ) )
+ ( implies ( and ( not x30 ) ( and x78 true ) ) ( = tmp615 1 ) )
+ ( implies ( and x30 ( and ( not x78 ) true ) ) ( = tmp615 1 ) )
+ ( implies ( and x30 ( and x78 true ) ) ( = tmp615 2 ) )
+ ( implies ( and ( not x455 ) ( and ( not x408 ) true ) ) ( = tmp614 0 ) )
+ ( implies ( and ( not x455 ) ( and x408 true ) ) ( = tmp614 1 ) )
+ ( implies ( and x455 ( and ( not x408 ) true ) ) ( = tmp614 1 ) )
+ ( implies ( and x455 ( and x408 true ) ) ( = tmp614 2 ) )
+ ( implies ( and ( not x312 ) ( and ( not x360 ) true ) ) ( = tmp613 0 ) )
+ ( implies ( and ( not x312 ) ( and x360 true ) ) ( = tmp613 1 ) )
+ ( implies ( and x312 ( and ( not x360 ) true ) ) ( = tmp613 1 ) )
+ ( implies ( and x312 ( and x360 true ) ) ( = tmp613 2 ) )
+ ( implies ( and ( not x550 ) ( and ( not x502 ) true ) ) ( = tmp612 0 ) )
+ ( implies ( and ( not x550 ) ( and x502 true ) ) ( = tmp612 1 ) )
+ ( implies ( and x550 ( and ( not x502 ) true ) ) ( = tmp612 1 ) )
+ ( implies ( and x550 ( and x502 true ) ) ( = tmp612 2 ) )
+ ( implies ( and ( not x220 ) ( and ( not x264 ) true ) ) ( = tmp611 0 ) )
+ ( implies ( and ( not x220 ) ( and x264 true ) ) ( = tmp611 1 ) )
+ ( implies ( and x220 ( and ( not x264 ) true ) ) ( = tmp611 1 ) )
+ ( implies ( and x220 ( and x264 true ) ) ( = tmp611 2 ) )
+ ( implies ( and ( not x645 ) ( and ( not x598 ) true ) ) ( = tmp610 0 ) )
+ ( implies ( and ( not x645 ) ( and x598 true ) ) ( = tmp610 1 ) )
+ ( implies ( and x645 ( and ( not x598 ) true ) ) ( = tmp610 1 ) )
+ ( implies ( and x645 ( and x598 true ) ) ( = tmp610 2 ) )
+ ( implies ( and ( not x124 ) ( and ( not x172 ) true ) ) ( = tmp609 0 ) )
+ ( implies ( and ( not x124 ) ( and x172 true ) ) ( = tmp609 1 ) )
+ ( implies ( and x124 ( and ( not x172 ) true ) ) ( = tmp609 1 ) )
+ ( implies ( and x124 ( and x172 true ) ) ( = tmp609 2 ) )
+ ( implies ( and ( not x740 ) ( and ( not x692 ) true ) ) ( = tmp608 0 ) )
+ ( implies ( and ( not x740 ) ( and x692 true ) ) ( = tmp608 1 ) )
+ ( implies ( and x740 ( and ( not x692 ) true ) ) ( = tmp608 1 ) )
+ ( implies ( and x740 ( and x692 true ) ) ( = tmp608 2 ) )
+ ( implies ( and ( not x29 ) ( and ( not x77 ) true ) ) ( = tmp607 0 ) )
+ ( implies ( and ( not x29 ) ( and x77 true ) ) ( = tmp607 1 ) )
+ ( implies ( and x29 ( and ( not x77 ) true ) ) ( = tmp607 1 ) )
+ ( implies ( and x29 ( and x77 true ) ) ( = tmp607 2 ) )
+ ( implies ( and ( not x501 ) ( and ( not x407 ) true ) ) ( = tmp606 0 ) )
+ ( implies ( and ( not x501 ) ( and x407 true ) ) ( = tmp606 1 ) )
+ ( implies ( and x501 ( and ( not x407 ) true ) ) ( = tmp606 1 ) )
+ ( implies ( and x501 ( and x407 true ) ) ( = tmp606 2 ) )
+ ( implies ( and ( not x311 ) ( and ( not x359 ) true ) ) ( = tmp605 0 ) )
+ ( implies ( and ( not x311 ) ( and x359 true ) ) ( = tmp605 1 ) )
+ ( implies ( and x311 ( and ( not x359 ) true ) ) ( = tmp605 1 ) )
+ ( implies ( and x311 ( and x359 true ) ) ( = tmp605 2 ) )
+ ( implies ( and ( not x597 ) ( and ( not x549 ) true ) ) ( = tmp604 0 ) )
+ ( implies ( and ( not x597 ) ( and x549 true ) ) ( = tmp604 1 ) )
+ ( implies ( and x597 ( and ( not x549 ) true ) ) ( = tmp604 1 ) )
+ ( implies ( and x597 ( and x549 true ) ) ( = tmp604 2 ) )
+ ( implies ( and ( not x219 ) ( and ( not x263 ) true ) ) ( = tmp603 0 ) )
+ ( implies ( and ( not x219 ) ( and x263 true ) ) ( = tmp603 1 ) )
+ ( implies ( and x219 ( and ( not x263 ) true ) ) ( = tmp603 1 ) )
+ ( implies ( and x219 ( and x263 true ) ) ( = tmp603 2 ) )
+ ( implies ( and ( not x691 ) ( and ( not x644 ) true ) ) ( = tmp602 0 ) )
+ ( implies ( and ( not x691 ) ( and x644 true ) ) ( = tmp602 1 ) )
+ ( implies ( and x691 ( and ( not x644 ) true ) ) ( = tmp602 1 ) )
+ ( implies ( and x691 ( and x644 true ) ) ( = tmp602 2 ) )
+ ( implies ( and ( not x123 ) ( and ( not x171 ) true ) ) ( = tmp601 0 ) )
+ ( implies ( and ( not x123 ) ( and x171 true ) ) ( = tmp601 1 ) )
+ ( implies ( and x123 ( and ( not x171 ) true ) ) ( = tmp601 1 ) )
+ ( implies ( and x123 ( and x171 true ) ) ( = tmp601 2 ) )
+ ( implies ( and ( not x768 ) ( and ( not x739 ) true ) ) ( = tmp600 0 ) )
+ ( implies ( and ( not x768 ) ( and x739 true ) ) ( = tmp600 1 ) )
+ ( implies ( and x768 ( and ( not x739 ) true ) ) ( = tmp600 1 ) )
+ ( implies ( and x768 ( and x739 true ) ) ( = tmp600 2 ) )
+ ( implies ( and ( not x28 ) ( and ( not x76 ) true ) ) ( = tmp599 0 ) )
+ ( implies ( and ( not x28 ) ( and x76 true ) ) ( = tmp599 1 ) )
+ ( implies ( and x28 ( and ( not x76 ) true ) ) ( = tmp599 1 ) )
+ ( implies ( and x28 ( and x76 true ) ) ( = tmp599 2 ) )
+ ( implies ( and ( not x454 ) ( and ( not x406 ) true ) ) ( = tmp598 0 ) )
+ ( implies ( and ( not x454 ) ( and x406 true ) ) ( = tmp598 1 ) )
+ ( implies ( and x454 ( and ( not x406 ) true ) ) ( = tmp598 1 ) )
+ ( implies ( and x454 ( and x406 true ) ) ( = tmp598 2 ) )
+ ( implies ( and ( not x310 ) ( and ( not x358 ) true ) ) ( = tmp597 0 ) )
+ ( implies ( and ( not x310 ) ( and x358 true ) ) ( = tmp597 1 ) )
+ ( implies ( and x310 ( and ( not x358 ) true ) ) ( = tmp597 1 ) )
+ ( implies ( and x310 ( and x358 true ) ) ( = tmp597 2 ) )
+ ( implies ( and ( not x548 ) ( and ( not x500 ) true ) ) ( = tmp596 0 ) )
+ ( implies ( and ( not x548 ) ( and x500 true ) ) ( = tmp596 1 ) )
+ ( implies ( and x548 ( and ( not x500 ) true ) ) ( = tmp596 1 ) )
+ ( implies ( and x548 ( and x500 true ) ) ( = tmp596 2 ) )
+ ( implies ( and ( not x218 ) ( and ( not x262 ) true ) ) ( = tmp595 0 ) )
+ ( implies ( and ( not x218 ) ( and x262 true ) ) ( = tmp595 1 ) )
+ ( implies ( and x218 ( and ( not x262 ) true ) ) ( = tmp595 1 ) )
+ ( implies ( and x218 ( and x262 true ) ) ( = tmp595 2 ) )
+ ( implies ( and ( not x643 ) ( and ( not x596 ) true ) ) ( = tmp594 0 ) )
+ ( implies ( and ( not x643 ) ( and x596 true ) ) ( = tmp594 1 ) )
+ ( implies ( and x643 ( and ( not x596 ) true ) ) ( = tmp594 1 ) )
+ ( implies ( and x643 ( and x596 true ) ) ( = tmp594 2 ) )
+ ( implies ( and ( not x122 ) ( and ( not x170 ) true ) ) ( = tmp593 0 ) )
+ ( implies ( and ( not x122 ) ( and x170 true ) ) ( = tmp593 1 ) )
+ ( implies ( and x122 ( and ( not x170 ) true ) ) ( = tmp593 1 ) )
+ ( implies ( and x122 ( and x170 true ) ) ( = tmp593 2 ) )
+ ( implies ( and ( not x738 ) ( and ( not x690 ) true ) ) ( = tmp592 0 ) )
+ ( implies ( and ( not x738 ) ( and x690 true ) ) ( = tmp592 1 ) )
+ ( implies ( and x738 ( and ( not x690 ) true ) ) ( = tmp592 1 ) )
+ ( implies ( and x738 ( and x690 true ) ) ( = tmp592 2 ) )
+ ( implies ( and ( not x27 ) ( and ( not x75 ) true ) ) ( = tmp591 0 ) )
+ ( implies ( and ( not x27 ) ( and x75 true ) ) ( = tmp591 1 ) )
+ ( implies ( and x27 ( and ( not x75 ) true ) ) ( = tmp591 1 ) )
+ ( implies ( and x27 ( and x75 true ) ) ( = tmp591 2 ) )
+ ( implies ( and ( not x453 ) ( and ( not x405 ) true ) ) ( = tmp590 0 ) )
+ ( implies ( and ( not x453 ) ( and x405 true ) ) ( = tmp590 1 ) )
+ ( implies ( and x453 ( and ( not x405 ) true ) ) ( = tmp590 1 ) )
+ ( implies ( and x453 ( and x405 true ) ) ( = tmp590 2 ) )
+ ( implies ( and ( not x309 ) ( and ( not x357 ) true ) ) ( = tmp589 0 ) )
+ ( implies ( and ( not x309 ) ( and x357 true ) ) ( = tmp589 1 ) )
+ ( implies ( and x309 ( and ( not x357 ) true ) ) ( = tmp589 1 ) )
+ ( implies ( and x309 ( and x357 true ) ) ( = tmp589 2 ) )
+ ( implies ( and ( not x547 ) ( and ( not x499 ) true ) ) ( = tmp588 0 ) )
+ ( implies ( and ( not x547 ) ( and x499 true ) ) ( = tmp588 1 ) )
+ ( implies ( and x547 ( and ( not x499 ) true ) ) ( = tmp588 1 ) )
+ ( implies ( and x547 ( and x499 true ) ) ( = tmp588 2 ) )
+ ( implies ( and ( not x217 ) ( and ( not x261 ) true ) ) ( = tmp587 0 ) )
+ ( implies ( and ( not x217 ) ( and x261 true ) ) ( = tmp587 1 ) )
+ ( implies ( and x217 ( and ( not x261 ) true ) ) ( = tmp587 1 ) )
+ ( implies ( and x217 ( and x261 true ) ) ( = tmp587 2 ) )
+ ( implies ( and ( not x642 ) ( and ( not x595 ) true ) ) ( = tmp586 0 ) )
+ ( implies ( and ( not x642 ) ( and x595 true ) ) ( = tmp586 1 ) )
+ ( implies ( and x642 ( and ( not x595 ) true ) ) ( = tmp586 1 ) )
+ ( implies ( and x642 ( and x595 true ) ) ( = tmp586 2 ) )
+ ( implies ( and ( not x121 ) ( and ( not x169 ) true ) ) ( = tmp585 0 ) )
+ ( implies ( and ( not x121 ) ( and x169 true ) ) ( = tmp585 1 ) )
+ ( implies ( and x121 ( and ( not x169 ) true ) ) ( = tmp585 1 ) )
+ ( implies ( and x121 ( and x169 true ) ) ( = tmp585 2 ) )
+ ( implies ( and ( not x737 ) ( and ( not x689 ) true ) ) ( = tmp584 0 ) )
+ ( implies ( and ( not x737 ) ( and x689 true ) ) ( = tmp584 1 ) )
+ ( implies ( and x737 ( and ( not x689 ) true ) ) ( = tmp584 1 ) )
+ ( implies ( and x737 ( and x689 true ) ) ( = tmp584 2 ) )
+ ( implies ( and ( not x26 ) ( and ( not x74 ) true ) ) ( = tmp583 0 ) )
+ ( implies ( and ( not x26 ) ( and x74 true ) ) ( = tmp583 1 ) )
+ ( implies ( and x26 ( and ( not x74 ) true ) ) ( = tmp583 1 ) )
+ ( implies ( and x26 ( and x74 true ) ) ( = tmp583 2 ) )
+ ( implies ( and ( not x452 ) ( and ( not x404 ) true ) ) ( = tmp582 0 ) )
+ ( implies ( and ( not x452 ) ( and x404 true ) ) ( = tmp582 1 ) )
+ ( implies ( and x452 ( and ( not x404 ) true ) ) ( = tmp582 1 ) )
+ ( implies ( and x452 ( and x404 true ) ) ( = tmp582 2 ) )
+ ( implies ( and ( not x308 ) ( and ( not x356 ) true ) ) ( = tmp581 0 ) )
+ ( implies ( and ( not x308 ) ( and x356 true ) ) ( = tmp581 1 ) )
+ ( implies ( and x308 ( and ( not x356 ) true ) ) ( = tmp581 1 ) )
+ ( implies ( and x308 ( and x356 true ) ) ( = tmp581 2 ) )
+ ( implies ( and ( not x546 ) ( and ( not x498 ) true ) ) ( = tmp580 0 ) )
+ ( implies ( and ( not x546 ) ( and x498 true ) ) ( = tmp580 1 ) )
+ ( implies ( and x546 ( and ( not x498 ) true ) ) ( = tmp580 1 ) )
+ ( implies ( and x546 ( and x498 true ) ) ( = tmp580 2 ) )
+ ( implies ( and ( not x216 ) ( and ( not x260 ) true ) ) ( = tmp579 0 ) )
+ ( implies ( and ( not x216 ) ( and x260 true ) ) ( = tmp579 1 ) )
+ ( implies ( and x216 ( and ( not x260 ) true ) ) ( = tmp579 1 ) )
+ ( implies ( and x216 ( and x260 true ) ) ( = tmp579 2 ) )
+ ( implies ( and ( not x641 ) ( and ( not x594 ) true ) ) ( = tmp578 0 ) )
+ ( implies ( and ( not x641 ) ( and x594 true ) ) ( = tmp578 1 ) )
+ ( implies ( and x641 ( and ( not x594 ) true ) ) ( = tmp578 1 ) )
+ ( implies ( and x641 ( and x594 true ) ) ( = tmp578 2 ) )
+ ( implies ( and ( not x120 ) ( and ( not x168 ) true ) ) ( = tmp577 0 ) )
+ ( implies ( and ( not x120 ) ( and x168 true ) ) ( = tmp577 1 ) )
+ ( implies ( and x120 ( and ( not x168 ) true ) ) ( = tmp577 1 ) )
+ ( implies ( and x120 ( and x168 true ) ) ( = tmp577 2 ) )
+ ( implies ( and ( not x736 ) ( and ( not x688 ) true ) ) ( = tmp576 0 ) )
+ ( implies ( and ( not x736 ) ( and x688 true ) ) ( = tmp576 1 ) )
+ ( implies ( and x736 ( and ( not x688 ) true ) ) ( = tmp576 1 ) )
+ ( implies ( and x736 ( and x688 true ) ) ( = tmp576 2 ) )
+ ( implies ( and ( not x25 ) ( and ( not x73 ) true ) ) ( = tmp575 0 ) )
+ ( implies ( and ( not x25 ) ( and x73 true ) ) ( = tmp575 1 ) )
+ ( implies ( and x25 ( and ( not x73 ) true ) ) ( = tmp575 1 ) )
+ ( implies ( and x25 ( and x73 true ) ) ( = tmp575 2 ) )
+ ( implies ( and ( not x451 ) ( and ( not x403 ) true ) ) ( = tmp574 0 ) )
+ ( implies ( and ( not x451 ) ( and x403 true ) ) ( = tmp574 1 ) )
+ ( implies ( and x451 ( and ( not x403 ) true ) ) ( = tmp574 1 ) )
+ ( implies ( and x451 ( and x403 true ) ) ( = tmp574 2 ) )
+ ( implies ( and ( not x307 ) ( and ( not x355 ) true ) ) ( = tmp573 0 ) )
+ ( implies ( and ( not x307 ) ( and x355 true ) ) ( = tmp573 1 ) )
+ ( implies ( and x307 ( and ( not x355 ) true ) ) ( = tmp573 1 ) )
+ ( implies ( and x307 ( and x355 true ) ) ( = tmp573 2 ) )
+ ( implies ( and ( not x545 ) ( and ( not x497 ) true ) ) ( = tmp572 0 ) )
+ ( implies ( and ( not x545 ) ( and x497 true ) ) ( = tmp572 1 ) )
+ ( implies ( and x545 ( and ( not x497 ) true ) ) ( = tmp572 1 ) )
+ ( implies ( and x545 ( and x497 true ) ) ( = tmp572 2 ) )
+ ( implies ( and ( not x215 ) ( and ( not x259 ) true ) ) ( = tmp571 0 ) )
+ ( implies ( and ( not x215 ) ( and x259 true ) ) ( = tmp571 1 ) )
+ ( implies ( and x215 ( and ( not x259 ) true ) ) ( = tmp571 1 ) )
+ ( implies ( and x215 ( and x259 true ) ) ( = tmp571 2 ) )
+ ( implies ( and ( not x640 ) ( and ( not x593 ) true ) ) ( = tmp570 0 ) )
+ ( implies ( and ( not x640 ) ( and x593 true ) ) ( = tmp570 1 ) )
+ ( implies ( and x640 ( and ( not x593 ) true ) ) ( = tmp570 1 ) )
+ ( implies ( and x640 ( and x593 true ) ) ( = tmp570 2 ) )
+ ( implies ( and ( not x119 ) ( and ( not x167 ) true ) ) ( = tmp569 0 ) )
+ ( implies ( and ( not x119 ) ( and x167 true ) ) ( = tmp569 1 ) )
+ ( implies ( and x119 ( and ( not x167 ) true ) ) ( = tmp569 1 ) )
+ ( implies ( and x119 ( and x167 true ) ) ( = tmp569 2 ) )
+ ( implies ( and ( not x735 ) ( and ( not x687 ) true ) ) ( = tmp568 0 ) )
+ ( implies ( and ( not x735 ) ( and x687 true ) ) ( = tmp568 1 ) )
+ ( implies ( and x735 ( and ( not x687 ) true ) ) ( = tmp568 1 ) )
+ ( implies ( and x735 ( and x687 true ) ) ( = tmp568 2 ) )
+ ( implies ( and ( not x24 ) ( and ( not x72 ) true ) ) ( = tmp567 0 ) )
+ ( implies ( and ( not x24 ) ( and x72 true ) ) ( = tmp567 1 ) )
+ ( implies ( and x24 ( and ( not x72 ) true ) ) ( = tmp567 1 ) )
+ ( implies ( and x24 ( and x72 true ) ) ( = tmp567 2 ) )
+ ( implies ( and ( not x496 ) ( and ( not x450 ) true ) ) ( = tmp566 0 ) )
+ ( implies ( and ( not x496 ) ( and x450 true ) ) ( = tmp566 1 ) )
+ ( implies ( and x496 ( and ( not x450 ) true ) ) ( = tmp566 1 ) )
+ ( implies ( and x496 ( and x450 true ) ) ( = tmp566 2 ) )
+ ( implies ( and ( not x354 ) ( and ( not x402 ) true ) ) ( = tmp565 0 ) )
+ ( implies ( and ( not x354 ) ( and x402 true ) ) ( = tmp565 1 ) )
+ ( implies ( and x354 ( and ( not x402 ) true ) ) ( = tmp565 1 ) )
+ ( implies ( and x354 ( and x402 true ) ) ( = tmp565 2 ) )
+ ( implies ( and ( not x592 ) ( and ( not x544 ) true ) ) ( = tmp564 0 ) )
+ ( implies ( and ( not x592 ) ( and x544 true ) ) ( = tmp564 1 ) )
+ ( implies ( and x592 ( and ( not x544 ) true ) ) ( = tmp564 1 ) )
+ ( implies ( and x592 ( and x544 true ) ) ( = tmp564 2 ) )
+ ( implies ( and ( not x258 ) ( and ( not x306 ) true ) ) ( = tmp563 0 ) )
+ ( implies ( and ( not x258 ) ( and x306 true ) ) ( = tmp563 1 ) )
+ ( implies ( and x258 ( and ( not x306 ) true ) ) ( = tmp563 1 ) )
+ ( implies ( and x258 ( and x306 true ) ) ( = tmp563 2 ) )
+ ( implies ( and ( not x734 ) ( and ( not x639 ) true ) ) ( = tmp562 0 ) )
+ ( implies ( and ( not x734 ) ( and x639 true ) ) ( = tmp562 1 ) )
+ ( implies ( and x734 ( and ( not x639 ) true ) ) ( = tmp562 1 ) )
+ ( implies ( and x734 ( and x639 true ) ) ( = tmp562 2 ) )
+ ( implies ( and ( not x166 ) ( and ( not x214 ) true ) ) ( = tmp561 0 ) )
+ ( implies ( and ( not x166 ) ( and x214 true ) ) ( = tmp561 1 ) )
+ ( implies ( and x166 ( and ( not x214 ) true ) ) ( = tmp561 1 ) )
+ ( implies ( and x166 ( and x214 true ) ) ( = tmp561 2 ) )
+ ( implies ( and ( not x767 ) ( and ( not x766 ) true ) ) ( = tmp560 0 ) )
+ ( implies ( and ( not x767 ) ( and x766 true ) ) ( = tmp560 1 ) )
+ ( implies ( and x767 ( and ( not x766 ) true ) ) ( = tmp560 1 ) )
+ ( implies ( and x767 ( and x766 true ) ) ( = tmp560 2 ) )
+ ( implies ( and ( not x23 ) ( and ( not x71 ) true ) ) ( = tmp559 0 ) )
+ ( implies ( and ( not x23 ) ( and x71 true ) ) ( = tmp559 1 ) )
+ ( implies ( and x23 ( and ( not x71 ) true ) ) ( = tmp559 1 ) )
+ ( implies ( and x23 ( and x71 true ) ) ( = tmp559 2 ) )
+ ( implies ( and ( not x449 ) ( and ( not x401 ) true ) ) ( = tmp558 0 ) )
+ ( implies ( and ( not x449 ) ( and x401 true ) ) ( = tmp558 1 ) )
+ ( implies ( and x449 ( and ( not x401 ) true ) ) ( = tmp558 1 ) )
+ ( implies ( and x449 ( and x401 true ) ) ( = tmp558 2 ) )
+ ( implies ( and ( not x305 ) ( and ( not x353 ) true ) ) ( = tmp557 0 ) )
+ ( implies ( and ( not x305 ) ( and x353 true ) ) ( = tmp557 1 ) )
+ ( implies ( and x305 ( and ( not x353 ) true ) ) ( = tmp557 1 ) )
+ ( implies ( and x305 ( and x353 true ) ) ( = tmp557 2 ) )
+ ( implies ( and ( not x543 ) ( and ( not x495 ) true ) ) ( = tmp556 0 ) )
+ ( implies ( and ( not x543 ) ( and x495 true ) ) ( = tmp556 1 ) )
+ ( implies ( and x543 ( and ( not x495 ) true ) ) ( = tmp556 1 ) )
+ ( implies ( and x543 ( and x495 true ) ) ( = tmp556 2 ) )
+ ( implies ( and ( not x213 ) ( and ( not x257 ) true ) ) ( = tmp555 0 ) )
+ ( implies ( and ( not x213 ) ( and x257 true ) ) ( = tmp555 1 ) )
+ ( implies ( and x213 ( and ( not x257 ) true ) ) ( = tmp555 1 ) )
+ ( implies ( and x213 ( and x257 true ) ) ( = tmp555 2 ) )
+ ( implies ( and ( not x638 ) ( and ( not x591 ) true ) ) ( = tmp554 0 ) )
+ ( implies ( and ( not x638 ) ( and x591 true ) ) ( = tmp554 1 ) )
+ ( implies ( and x638 ( and ( not x591 ) true ) ) ( = tmp554 1 ) )
+ ( implies ( and x638 ( and x591 true ) ) ( = tmp554 2 ) )
+ ( implies ( and ( not x118 ) ( and ( not x165 ) true ) ) ( = tmp553 0 ) )
+ ( implies ( and ( not x118 ) ( and x165 true ) ) ( = tmp553 1 ) )
+ ( implies ( and x118 ( and ( not x165 ) true ) ) ( = tmp553 1 ) )
+ ( implies ( and x118 ( and x165 true ) ) ( = tmp553 2 ) )
+ ( implies ( and ( not x733 ) ( and ( not x686 ) true ) ) ( = tmp552 0 ) )
+ ( implies ( and ( not x733 ) ( and x686 true ) ) ( = tmp552 1 ) )
+ ( implies ( and x733 ( and ( not x686 ) true ) ) ( = tmp552 1 ) )
+ ( implies ( and x733 ( and x686 true ) ) ( = tmp552 2 ) )
+ ( implies ( and ( not x22 ) ( and ( not x70 ) true ) ) ( = tmp551 0 ) )
+ ( implies ( and ( not x22 ) ( and x70 true ) ) ( = tmp551 1 ) )
+ ( implies ( and x22 ( and ( not x70 ) true ) ) ( = tmp551 1 ) )
+ ( implies ( and x22 ( and x70 true ) ) ( = tmp551 2 ) )
+ ( implies ( and ( not x448 ) ( and ( not x400 ) true ) ) ( = tmp550 0 ) )
+ ( implies ( and ( not x448 ) ( and x400 true ) ) ( = tmp550 1 ) )
+ ( implies ( and x448 ( and ( not x400 ) true ) ) ( = tmp550 1 ) )
+ ( implies ( and x448 ( and x400 true ) ) ( = tmp550 2 ) )
+ ( implies ( and ( not x304 ) ( and ( not x352 ) true ) ) ( = tmp549 0 ) )
+ ( implies ( and ( not x304 ) ( and x352 true ) ) ( = tmp549 1 ) )
+ ( implies ( and x304 ( and ( not x352 ) true ) ) ( = tmp549 1 ) )
+ ( implies ( and x304 ( and x352 true ) ) ( = tmp549 2 ) )
+ ( implies ( and ( not x542 ) ( and ( not x494 ) true ) ) ( = tmp548 0 ) )
+ ( implies ( and ( not x542 ) ( and x494 true ) ) ( = tmp548 1 ) )
+ ( implies ( and x542 ( and ( not x494 ) true ) ) ( = tmp548 1 ) )
+ ( implies ( and x542 ( and x494 true ) ) ( = tmp548 2 ) )
+ ( implies ( and ( not x212 ) ( and ( not x256 ) true ) ) ( = tmp547 0 ) )
+ ( implies ( and ( not x212 ) ( and x256 true ) ) ( = tmp547 1 ) )
+ ( implies ( and x212 ( and ( not x256 ) true ) ) ( = tmp547 1 ) )
+ ( implies ( and x212 ( and x256 true ) ) ( = tmp547 2 ) )
+ ( implies ( and ( not x637 ) ( and ( not x590 ) true ) ) ( = tmp546 0 ) )
+ ( implies ( and ( not x637 ) ( and x590 true ) ) ( = tmp546 1 ) )
+ ( implies ( and x637 ( and ( not x590 ) true ) ) ( = tmp546 1 ) )
+ ( implies ( and x637 ( and x590 true ) ) ( = tmp546 2 ) )
+ ( implies ( and ( not x117 ) ( and ( not x164 ) true ) ) ( = tmp545 0 ) )
+ ( implies ( and ( not x117 ) ( and x164 true ) ) ( = tmp545 1 ) )
+ ( implies ( and x117 ( and ( not x164 ) true ) ) ( = tmp545 1 ) )
+ ( implies ( and x117 ( and x164 true ) ) ( = tmp545 2 ) )
+ ( implies ( and ( not x732 ) ( and ( not x685 ) true ) ) ( = tmp544 0 ) )
+ ( implies ( and ( not x732 ) ( and x685 true ) ) ( = tmp544 1 ) )
+ ( implies ( and x732 ( and ( not x685 ) true ) ) ( = tmp544 1 ) )
+ ( implies ( and x732 ( and x685 true ) ) ( = tmp544 2 ) )
+ ( implies ( and ( not x21 ) ( and ( not x69 ) true ) ) ( = tmp543 0 ) )
+ ( implies ( and ( not x21 ) ( and x69 true ) ) ( = tmp543 1 ) )
+ ( implies ( and x21 ( and ( not x69 ) true ) ) ( = tmp543 1 ) )
+ ( implies ( and x21 ( and x69 true ) ) ( = tmp543 2 ) )
+ ( implies ( and ( not x447 ) ( and ( not x399 ) true ) ) ( = tmp542 0 ) )
+ ( implies ( and ( not x447 ) ( and x399 true ) ) ( = tmp542 1 ) )
+ ( implies ( and x447 ( and ( not x399 ) true ) ) ( = tmp542 1 ) )
+ ( implies ( and x447 ( and x399 true ) ) ( = tmp542 2 ) )
+ ( implies ( and ( not x303 ) ( and ( not x351 ) true ) ) ( = tmp541 0 ) )
+ ( implies ( and ( not x303 ) ( and x351 true ) ) ( = tmp541 1 ) )
+ ( implies ( and x303 ( and ( not x351 ) true ) ) ( = tmp541 1 ) )
+ ( implies ( and x303 ( and x351 true ) ) ( = tmp541 2 ) )
+ ( implies ( and ( not x541 ) ( and ( not x493 ) true ) ) ( = tmp540 0 ) )
+ ( implies ( and ( not x541 ) ( and x493 true ) ) ( = tmp540 1 ) )
+ ( implies ( and x541 ( and ( not x493 ) true ) ) ( = tmp540 1 ) )
+ ( implies ( and x541 ( and x493 true ) ) ( = tmp540 2 ) )
+ ( implies ( and ( not x211 ) ( and ( not x255 ) true ) ) ( = tmp539 0 ) )
+ ( implies ( and ( not x211 ) ( and x255 true ) ) ( = tmp539 1 ) )
+ ( implies ( and x211 ( and ( not x255 ) true ) ) ( = tmp539 1 ) )
+ ( implies ( and x211 ( and x255 true ) ) ( = tmp539 2 ) )
+ ( implies ( and ( not x636 ) ( and ( not x589 ) true ) ) ( = tmp538 0 ) )
+ ( implies ( and ( not x636 ) ( and x589 true ) ) ( = tmp538 1 ) )
+ ( implies ( and x636 ( and ( not x589 ) true ) ) ( = tmp538 1 ) )
+ ( implies ( and x636 ( and x589 true ) ) ( = tmp538 2 ) )
+ ( implies ( and ( not x116 ) ( and ( not x163 ) true ) ) ( = tmp537 0 ) )
+ ( implies ( and ( not x116 ) ( and x163 true ) ) ( = tmp537 1 ) )
+ ( implies ( and x116 ( and ( not x163 ) true ) ) ( = tmp537 1 ) )
+ ( implies ( and x116 ( and x163 true ) ) ( = tmp537 2 ) )
+ ( implies ( and ( not x731 ) ( and ( not x684 ) true ) ) ( = tmp536 0 ) )
+ ( implies ( and ( not x731 ) ( and x684 true ) ) ( = tmp536 1 ) )
+ ( implies ( and x731 ( and ( not x684 ) true ) ) ( = tmp536 1 ) )
+ ( implies ( and x731 ( and x684 true ) ) ( = tmp536 2 ) )
+ ( implies ( and ( not x20 ) ( and ( not x68 ) true ) ) ( = tmp535 0 ) )
+ ( implies ( and ( not x20 ) ( and x68 true ) ) ( = tmp535 1 ) )
+ ( implies ( and x20 ( and ( not x68 ) true ) ) ( = tmp535 1 ) )
+ ( implies ( and x20 ( and x68 true ) ) ( = tmp535 2 ) )
+ ( implies ( and ( not x446 ) ( and ( not x398 ) true ) ) ( = tmp534 0 ) )
+ ( implies ( and ( not x446 ) ( and x398 true ) ) ( = tmp534 1 ) )
+ ( implies ( and x446 ( and ( not x398 ) true ) ) ( = tmp534 1 ) )
+ ( implies ( and x446 ( and x398 true ) ) ( = tmp534 2 ) )
+ ( implies ( and ( not x302 ) ( and ( not x350 ) true ) ) ( = tmp533 0 ) )
+ ( implies ( and ( not x302 ) ( and x350 true ) ) ( = tmp533 1 ) )
+ ( implies ( and x302 ( and ( not x350 ) true ) ) ( = tmp533 1 ) )
+ ( implies ( and x302 ( and x350 true ) ) ( = tmp533 2 ) )
+ ( implies ( and ( not x540 ) ( and ( not x492 ) true ) ) ( = tmp532 0 ) )
+ ( implies ( and ( not x540 ) ( and x492 true ) ) ( = tmp532 1 ) )
+ ( implies ( and x540 ( and ( not x492 ) true ) ) ( = tmp532 1 ) )
+ ( implies ( and x540 ( and x492 true ) ) ( = tmp532 2 ) )
+ ( implies ( and ( not x210 ) ( and ( not x254 ) true ) ) ( = tmp531 0 ) )
+ ( implies ( and ( not x210 ) ( and x254 true ) ) ( = tmp531 1 ) )
+ ( implies ( and x210 ( and ( not x254 ) true ) ) ( = tmp531 1 ) )
+ ( implies ( and x210 ( and x254 true ) ) ( = tmp531 2 ) )
+ ( implies ( and ( not x635 ) ( and ( not x588 ) true ) ) ( = tmp530 0 ) )
+ ( implies ( and ( not x635 ) ( and x588 true ) ) ( = tmp530 1 ) )
+ ( implies ( and x635 ( and ( not x588 ) true ) ) ( = tmp530 1 ) )
+ ( implies ( and x635 ( and x588 true ) ) ( = tmp530 2 ) )
+ ( implies ( and ( not x115 ) ( and ( not x162 ) true ) ) ( = tmp529 0 ) )
+ ( implies ( and ( not x115 ) ( and x162 true ) ) ( = tmp529 1 ) )
+ ( implies ( and x115 ( and ( not x162 ) true ) ) ( = tmp529 1 ) )
+ ( implies ( and x115 ( and x162 true ) ) ( = tmp529 2 ) )
+ ( implies ( and ( not x730 ) ( and ( not x683 ) true ) ) ( = tmp528 0 ) )
+ ( implies ( and ( not x730 ) ( and x683 true ) ) ( = tmp528 1 ) )
+ ( implies ( and x730 ( and ( not x683 ) true ) ) ( = tmp528 1 ) )
+ ( implies ( and x730 ( and x683 true ) ) ( = tmp528 2 ) )
+ ( implies ( and ( not x19 ) ( and ( not x67 ) true ) ) ( = tmp527 0 ) )
+ ( implies ( and ( not x19 ) ( and x67 true ) ) ( = tmp527 1 ) )
+ ( implies ( and x19 ( and ( not x67 ) true ) ) ( = tmp527 1 ) )
+ ( implies ( and x19 ( and x67 true ) ) ( = tmp527 2 ) )
+ ( implies ( and ( not x445 ) ( and ( not x397 ) true ) ) ( = tmp526 0 ) )
+ ( implies ( and ( not x445 ) ( and x397 true ) ) ( = tmp526 1 ) )
+ ( implies ( and x445 ( and ( not x397 ) true ) ) ( = tmp526 1 ) )
+ ( implies ( and x445 ( and x397 true ) ) ( = tmp526 2 ) )
+ ( implies ( and ( not x301 ) ( and ( not x349 ) true ) ) ( = tmp525 0 ) )
+ ( implies ( and ( not x301 ) ( and x349 true ) ) ( = tmp525 1 ) )
+ ( implies ( and x301 ( and ( not x349 ) true ) ) ( = tmp525 1 ) )
+ ( implies ( and x301 ( and x349 true ) ) ( = tmp525 2 ) )
+ ( implies ( and ( not x539 ) ( and ( not x491 ) true ) ) ( = tmp524 0 ) )
+ ( implies ( and ( not x539 ) ( and x491 true ) ) ( = tmp524 1 ) )
+ ( implies ( and x539 ( and ( not x491 ) true ) ) ( = tmp524 1 ) )
+ ( implies ( and x539 ( and x491 true ) ) ( = tmp524 2 ) )
+ ( implies ( and ( not x209 ) ( and ( not x253 ) true ) ) ( = tmp523 0 ) )
+ ( implies ( and ( not x209 ) ( and x253 true ) ) ( = tmp523 1 ) )
+ ( implies ( and x209 ( and ( not x253 ) true ) ) ( = tmp523 1 ) )
+ ( implies ( and x209 ( and x253 true ) ) ( = tmp523 2 ) )
+ ( implies ( and ( not x634 ) ( and ( not x587 ) true ) ) ( = tmp522 0 ) )
+ ( implies ( and ( not x634 ) ( and x587 true ) ) ( = tmp522 1 ) )
+ ( implies ( and x634 ( and ( not x587 ) true ) ) ( = tmp522 1 ) )
+ ( implies ( and x634 ( and x587 true ) ) ( = tmp522 2 ) )
+ ( implies ( and ( not x114 ) ( and ( not x161 ) true ) ) ( = tmp521 0 ) )
+ ( implies ( and ( not x114 ) ( and x161 true ) ) ( = tmp521 1 ) )
+ ( implies ( and x114 ( and ( not x161 ) true ) ) ( = tmp521 1 ) )
+ ( implies ( and x114 ( and x161 true ) ) ( = tmp521 2 ) )
+ ( implies ( and ( not x729 ) ( and ( not x682 ) true ) ) ( = tmp520 0 ) )
+ ( implies ( and ( not x729 ) ( and x682 true ) ) ( = tmp520 1 ) )
+ ( implies ( and x729 ( and ( not x682 ) true ) ) ( = tmp520 1 ) )
+ ( implies ( and x729 ( and x682 true ) ) ( = tmp520 2 ) )
+ ( implies ( and ( not x18 ) ( and ( not x66 ) true ) ) ( = tmp519 0 ) )
+ ( implies ( and ( not x18 ) ( and x66 true ) ) ( = tmp519 1 ) )
+ ( implies ( and x18 ( and ( not x66 ) true ) ) ( = tmp519 1 ) )
+ ( implies ( and x18 ( and x66 true ) ) ( = tmp519 2 ) )
+ ( implies ( and ( not x490 ) ( and ( not x444 ) true ) ) ( = tmp518 0 ) )
+ ( implies ( and ( not x490 ) ( and x444 true ) ) ( = tmp518 1 ) )
+ ( implies ( and x490 ( and ( not x444 ) true ) ) ( = tmp518 1 ) )
+ ( implies ( and x490 ( and x444 true ) ) ( = tmp518 2 ) )
+ ( implies ( and ( not x348 ) ( and ( not x396 ) true ) ) ( = tmp517 0 ) )
+ ( implies ( and ( not x348 ) ( and x396 true ) ) ( = tmp517 1 ) )
+ ( implies ( and x348 ( and ( not x396 ) true ) ) ( = tmp517 1 ) )
+ ( implies ( and x348 ( and x396 true ) ) ( = tmp517 2 ) )
+ ( implies ( and ( not x586 ) ( and ( not x538 ) true ) ) ( = tmp516 0 ) )
+ ( implies ( and ( not x586 ) ( and x538 true ) ) ( = tmp516 1 ) )
+ ( implies ( and x586 ( and ( not x538 ) true ) ) ( = tmp516 1 ) )
+ ( implies ( and x586 ( and x538 true ) ) ( = tmp516 2 ) )
+ ( implies ( and ( not x252 ) ( and ( not x300 ) true ) ) ( = tmp515 0 ) )
+ ( implies ( and ( not x252 ) ( and x300 true ) ) ( = tmp515 1 ) )
+ ( implies ( and x252 ( and ( not x300 ) true ) ) ( = tmp515 1 ) )
+ ( implies ( and x252 ( and x300 true ) ) ( = tmp515 2 ) )
+ ( implies ( and ( not x681 ) ( and ( not x633 ) true ) ) ( = tmp514 0 ) )
+ ( implies ( and ( not x681 ) ( and x633 true ) ) ( = tmp514 1 ) )
+ ( implies ( and x681 ( and ( not x633 ) true ) ) ( = tmp514 1 ) )
+ ( implies ( and x681 ( and x633 true ) ) ( = tmp514 2 ) )
+ ( implies ( and ( not x160 ) ( and ( not x208 ) true ) ) ( = tmp513 0 ) )
+ ( implies ( and ( not x160 ) ( and x208 true ) ) ( = tmp513 1 ) )
+ ( implies ( and x160 ( and ( not x208 ) true ) ) ( = tmp513 1 ) )
+ ( implies ( and x160 ( and x208 true ) ) ( = tmp513 2 ) )
+ ( implies ( and ( not x765 ) ( and ( not x728 ) true ) ) ( = tmp512 0 ) )
+ ( implies ( and ( not x765 ) ( and x728 true ) ) ( = tmp512 1 ) )
+ ( implies ( and x765 ( and ( not x728 ) true ) ) ( = tmp512 1 ) )
+ ( implies ( and x765 ( and x728 true ) ) ( = tmp512 2 ) )
+ ( implies ( and ( not x65 ) ( and ( not x113 ) true ) ) ( = tmp511 0 ) )
+ ( implies ( and ( not x65 ) ( and x113 true ) ) ( = tmp511 1 ) )
+ ( implies ( and x65 ( and ( not x113 ) true ) ) ( = tmp511 1 ) )
+ ( implies ( and x65 ( and x113 true ) ) ( = tmp511 2 ) )
+ ( implies ( and ( not x443 ) ( and ( not x395 ) true ) ) ( = tmp510 0 ) )
+ ( implies ( and ( not x443 ) ( and x395 true ) ) ( = tmp510 1 ) )
+ ( implies ( and x443 ( and ( not x395 ) true ) ) ( = tmp510 1 ) )
+ ( implies ( and x443 ( and x395 true ) ) ( = tmp510 2 ) )
+ ( implies ( and ( not x299 ) ( and ( not x347 ) true ) ) ( = tmp509 0 ) )
+ ( implies ( and ( not x299 ) ( and x347 true ) ) ( = tmp509 1 ) )
+ ( implies ( and x299 ( and ( not x347 ) true ) ) ( = tmp509 1 ) )
+ ( implies ( and x299 ( and x347 true ) ) ( = tmp509 2 ) )
+ ( implies ( and ( not x537 ) ( and ( not x489 ) true ) ) ( = tmp508 0 ) )
+ ( implies ( and ( not x537 ) ( and x489 true ) ) ( = tmp508 1 ) )
+ ( implies ( and x537 ( and ( not x489 ) true ) ) ( = tmp508 1 ) )
+ ( implies ( and x537 ( and x489 true ) ) ( = tmp508 2 ) )
+ ( implies ( and ( not x207 ) ( and ( not x251 ) true ) ) ( = tmp507 0 ) )
+ ( implies ( and ( not x207 ) ( and x251 true ) ) ( = tmp507 1 ) )
+ ( implies ( and x207 ( and ( not x251 ) true ) ) ( = tmp507 1 ) )
+ ( implies ( and x207 ( and x251 true ) ) ( = tmp507 2 ) )
+ ( implies ( and ( not x632 ) ( and ( not x585 ) true ) ) ( = tmp506 0 ) )
+ ( implies ( and ( not x632 ) ( and x585 true ) ) ( = tmp506 1 ) )
+ ( implies ( and x632 ( and ( not x585 ) true ) ) ( = tmp506 1 ) )
+ ( implies ( and x632 ( and x585 true ) ) ( = tmp506 2 ) )
+ ( implies ( and ( not x112 ) ( and ( not x159 ) true ) ) ( = tmp505 0 ) )
+ ( implies ( and ( not x112 ) ( and x159 true ) ) ( = tmp505 1 ) )
+ ( implies ( and x112 ( and ( not x159 ) true ) ) ( = tmp505 1 ) )
+ ( implies ( and x112 ( and x159 true ) ) ( = tmp505 2 ) )
+ ( implies ( and ( not x727 ) ( and ( not x680 ) true ) ) ( = tmp504 0 ) )
+ ( implies ( and ( not x727 ) ( and x680 true ) ) ( = tmp504 1 ) )
+ ( implies ( and x727 ( and ( not x680 ) true ) ) ( = tmp504 1 ) )
+ ( implies ( and x727 ( and x680 true ) ) ( = tmp504 2 ) )
+ ( implies ( and ( not x17 ) ( and ( not x64 ) true ) ) ( = tmp503 0 ) )
+ ( implies ( and ( not x17 ) ( and x64 true ) ) ( = tmp503 1 ) )
+ ( implies ( and x17 ( and ( not x64 ) true ) ) ( = tmp503 1 ) )
+ ( implies ( and x17 ( and x64 true ) ) ( = tmp503 2 ) )
+ ( implies ( and ( not x442 ) ( and ( not x394 ) true ) ) ( = tmp502 0 ) )
+ ( implies ( and ( not x442 ) ( and x394 true ) ) ( = tmp502 1 ) )
+ ( implies ( and x442 ( and ( not x394 ) true ) ) ( = tmp502 1 ) )
+ ( implies ( and x442 ( and x394 true ) ) ( = tmp502 2 ) )
+ ( implies ( and ( not x298 ) ( and ( not x346 ) true ) ) ( = tmp501 0 ) )
+ ( implies ( and ( not x298 ) ( and x346 true ) ) ( = tmp501 1 ) )
+ ( implies ( and x298 ( and ( not x346 ) true ) ) ( = tmp501 1 ) )
+ ( implies ( and x298 ( and x346 true ) ) ( = tmp501 2 ) )
+ ( implies ( and ( not x536 ) ( and ( not x488 ) true ) ) ( = tmp500 0 ) )
+ ( implies ( and ( not x536 ) ( and x488 true ) ) ( = tmp500 1 ) )
+ ( implies ( and x536 ( and ( not x488 ) true ) ) ( = tmp500 1 ) )
+ ( implies ( and x536 ( and x488 true ) ) ( = tmp500 2 ) )
+ ( implies ( and ( not x206 ) ( and ( not x250 ) true ) ) ( = tmp499 0 ) )
+ ( implies ( and ( not x206 ) ( and x250 true ) ) ( = tmp499 1 ) )
+ ( implies ( and x206 ( and ( not x250 ) true ) ) ( = tmp499 1 ) )
+ ( implies ( and x206 ( and x250 true ) ) ( = tmp499 2 ) )
+ ( implies ( and ( not x631 ) ( and ( not x584 ) true ) ) ( = tmp498 0 ) )
+ ( implies ( and ( not x631 ) ( and x584 true ) ) ( = tmp498 1 ) )
+ ( implies ( and x631 ( and ( not x584 ) true ) ) ( = tmp498 1 ) )
+ ( implies ( and x631 ( and x584 true ) ) ( = tmp498 2 ) )
+ ( implies ( and ( not x111 ) ( and ( not x158 ) true ) ) ( = tmp497 0 ) )
+ ( implies ( and ( not x111 ) ( and x158 true ) ) ( = tmp497 1 ) )
+ ( implies ( and x111 ( and ( not x158 ) true ) ) ( = tmp497 1 ) )
+ ( implies ( and x111 ( and x158 true ) ) ( = tmp497 2 ) )
+ ( implies ( and ( not x726 ) ( and ( not x679 ) true ) ) ( = tmp496 0 ) )
+ ( implies ( and ( not x726 ) ( and x679 true ) ) ( = tmp496 1 ) )
+ ( implies ( and x726 ( and ( not x679 ) true ) ) ( = tmp496 1 ) )
+ ( implies ( and x726 ( and x679 true ) ) ( = tmp496 2 ) )
+ ( implies ( and ( not x16 ) ( and ( not x63 ) true ) ) ( = tmp495 0 ) )
+ ( implies ( and ( not x16 ) ( and x63 true ) ) ( = tmp495 1 ) )
+ ( implies ( and x16 ( and ( not x63 ) true ) ) ( = tmp495 1 ) )
+ ( implies ( and x16 ( and x63 true ) ) ( = tmp495 2 ) )
+ ( implies ( and ( not x441 ) ( and ( not x393 ) true ) ) ( = tmp494 0 ) )
+ ( implies ( and ( not x441 ) ( and x393 true ) ) ( = tmp494 1 ) )
+ ( implies ( and x441 ( and ( not x393 ) true ) ) ( = tmp494 1 ) )
+ ( implies ( and x441 ( and x393 true ) ) ( = tmp494 2 ) )
+ ( implies ( and ( not x297 ) ( and ( not x345 ) true ) ) ( = tmp493 0 ) )
+ ( implies ( and ( not x297 ) ( and x345 true ) ) ( = tmp493 1 ) )
+ ( implies ( and x297 ( and ( not x345 ) true ) ) ( = tmp493 1 ) )
+ ( implies ( and x297 ( and x345 true ) ) ( = tmp493 2 ) )
+ ( implies ( and ( not x535 ) ( and ( not x487 ) true ) ) ( = tmp492 0 ) )
+ ( implies ( and ( not x535 ) ( and x487 true ) ) ( = tmp492 1 ) )
+ ( implies ( and x535 ( and ( not x487 ) true ) ) ( = tmp492 1 ) )
+ ( implies ( and x535 ( and x487 true ) ) ( = tmp492 2 ) )
+ ( implies ( and ( not x205 ) ( and ( not x249 ) true ) ) ( = tmp491 0 ) )
+ ( implies ( and ( not x205 ) ( and x249 true ) ) ( = tmp491 1 ) )
+ ( implies ( and x205 ( and ( not x249 ) true ) ) ( = tmp491 1 ) )
+ ( implies ( and x205 ( and x249 true ) ) ( = tmp491 2 ) )
+ ( implies ( and ( not x630 ) ( and ( not x583 ) true ) ) ( = tmp490 0 ) )
+ ( implies ( and ( not x630 ) ( and x583 true ) ) ( = tmp490 1 ) )
+ ( implies ( and x630 ( and ( not x583 ) true ) ) ( = tmp490 1 ) )
+ ( implies ( and x630 ( and x583 true ) ) ( = tmp490 2 ) )
+ ( implies ( and ( not x110 ) ( and ( not x157 ) true ) ) ( = tmp489 0 ) )
+ ( implies ( and ( not x110 ) ( and x157 true ) ) ( = tmp489 1 ) )
+ ( implies ( and x110 ( and ( not x157 ) true ) ) ( = tmp489 1 ) )
+ ( implies ( and x110 ( and x157 true ) ) ( = tmp489 2 ) )
+ ( implies ( and ( not x725 ) ( and ( not x678 ) true ) ) ( = tmp488 0 ) )
+ ( implies ( and ( not x725 ) ( and x678 true ) ) ( = tmp488 1 ) )
+ ( implies ( and x725 ( and ( not x678 ) true ) ) ( = tmp488 1 ) )
+ ( implies ( and x725 ( and x678 true ) ) ( = tmp488 2 ) )
+ ( implies ( and ( not x15 ) ( and ( not x62 ) true ) ) ( = tmp487 0 ) )
+ ( implies ( and ( not x15 ) ( and x62 true ) ) ( = tmp487 1 ) )
+ ( implies ( and x15 ( and ( not x62 ) true ) ) ( = tmp487 1 ) )
+ ( implies ( and x15 ( and x62 true ) ) ( = tmp487 2 ) )
+ ( implies ( and ( not x486 ) ( and ( not x440 ) true ) ) ( = tmp486 0 ) )
+ ( implies ( and ( not x486 ) ( and x440 true ) ) ( = tmp486 1 ) )
+ ( implies ( and x486 ( and ( not x440 ) true ) ) ( = tmp486 1 ) )
+ ( implies ( and x486 ( and x440 true ) ) ( = tmp486 2 ) )
+ ( implies ( and ( not x344 ) ( and ( not x392 ) true ) ) ( = tmp485 0 ) )
+ ( implies ( and ( not x344 ) ( and x392 true ) ) ( = tmp485 1 ) )
+ ( implies ( and x344 ( and ( not x392 ) true ) ) ( = tmp485 1 ) )
+ ( implies ( and x344 ( and x392 true ) ) ( = tmp485 2 ) )
+ ( implies ( and ( not x582 ) ( and ( not x534 ) true ) ) ( = tmp484 0 ) )
+ ( implies ( and ( not x582 ) ( and x534 true ) ) ( = tmp484 1 ) )
+ ( implies ( and x582 ( and ( not x534 ) true ) ) ( = tmp484 1 ) )
+ ( implies ( and x582 ( and x534 true ) ) ( = tmp484 2 ) )
+ ( implies ( and ( not x204 ) ( and ( not x296 ) true ) ) ( = tmp483 0 ) )
+ ( implies ( and ( not x204 ) ( and x296 true ) ) ( = tmp483 1 ) )
+ ( implies ( and x204 ( and ( not x296 ) true ) ) ( = tmp483 1 ) )
+ ( implies ( and x204 ( and x296 true ) ) ( = tmp483 2 ) )
+ ( implies ( and ( not x677 ) ( and ( not x629 ) true ) ) ( = tmp482 0 ) )
+ ( implies ( and ( not x677 ) ( and x629 true ) ) ( = tmp482 1 ) )
+ ( implies ( and x677 ( and ( not x629 ) true ) ) ( = tmp482 1 ) )
+ ( implies ( and x677 ( and x629 true ) ) ( = tmp482 2 ) )
+ ( implies ( and ( not x109 ) ( and ( not x156 ) true ) ) ( = tmp481 0 ) )
+ ( implies ( and ( not x109 ) ( and x156 true ) ) ( = tmp481 1 ) )
+ ( implies ( and x109 ( and ( not x156 ) true ) ) ( = tmp481 1 ) )
+ ( implies ( and x109 ( and x156 true ) ) ( = tmp481 2 ) )
+ ( implies ( and ( not x764 ) ( and ( not x724 ) true ) ) ( = tmp480 0 ) )
+ ( implies ( and ( not x764 ) ( and x724 true ) ) ( = tmp480 1 ) )
+ ( implies ( and x764 ( and ( not x724 ) true ) ) ( = tmp480 1 ) )
+ ( implies ( and x764 ( and x724 true ) ) ( = tmp480 2 ) )
+ ( implies ( and ( not x14 ) ( and ( not x61 ) true ) ) ( = tmp479 0 ) )
+ ( implies ( and ( not x14 ) ( and x61 true ) ) ( = tmp479 1 ) )
+ ( implies ( and x14 ( and ( not x61 ) true ) ) ( = tmp479 1 ) )
+ ( implies ( and x14 ( and x61 true ) ) ( = tmp479 2 ) )
+ ( implies ( and ( not x485 ) ( and ( not x439 ) true ) ) ( = tmp478 0 ) )
+ ( implies ( and ( not x485 ) ( and x439 true ) ) ( = tmp478 1 ) )
+ ( implies ( and x485 ( and ( not x439 ) true ) ) ( = tmp478 1 ) )
+ ( implies ( and x485 ( and x439 true ) ) ( = tmp478 2 ) )
+ ( implies ( and ( not x343 ) ( and ( not x391 ) true ) ) ( = tmp477 0 ) )
+ ( implies ( and ( not x343 ) ( and x391 true ) ) ( = tmp477 1 ) )
+ ( implies ( and x343 ( and ( not x391 ) true ) ) ( = tmp477 1 ) )
+ ( implies ( and x343 ( and x391 true ) ) ( = tmp477 2 ) )
+ ( implies ( and ( not x581 ) ( and ( not x533 ) true ) ) ( = tmp476 0 ) )
+ ( implies ( and ( not x581 ) ( and x533 true ) ) ( = tmp476 1 ) )
+ ( implies ( and x581 ( and ( not x533 ) true ) ) ( = tmp476 1 ) )
+ ( implies ( and x581 ( and x533 true ) ) ( = tmp476 2 ) )
+ ( implies ( and ( not x203 ) ( and ( not x295 ) true ) ) ( = tmp475 0 ) )
+ ( implies ( and ( not x203 ) ( and x295 true ) ) ( = tmp475 1 ) )
+ ( implies ( and x203 ( and ( not x295 ) true ) ) ( = tmp475 1 ) )
+ ( implies ( and x203 ( and x295 true ) ) ( = tmp475 2 ) )
+ ( implies ( and ( not x676 ) ( and ( not x628 ) true ) ) ( = tmp474 0 ) )
+ ( implies ( and ( not x676 ) ( and x628 true ) ) ( = tmp474 1 ) )
+ ( implies ( and x676 ( and ( not x628 ) true ) ) ( = tmp474 1 ) )
+ ( implies ( and x676 ( and x628 true ) ) ( = tmp474 2 ) )
+ ( implies ( and ( not x108 ) ( and ( not x155 ) true ) ) ( = tmp473 0 ) )
+ ( implies ( and ( not x108 ) ( and x155 true ) ) ( = tmp473 1 ) )
+ ( implies ( and x108 ( and ( not x155 ) true ) ) ( = tmp473 1 ) )
+ ( implies ( and x108 ( and x155 true ) ) ( = tmp473 2 ) )
+ ( implies ( and ( not x763 ) ( and ( not x723 ) true ) ) ( = tmp472 0 ) )
+ ( implies ( and ( not x763 ) ( and x723 true ) ) ( = tmp472 1 ) )
+ ( implies ( and x763 ( and ( not x723 ) true ) ) ( = tmp472 1 ) )
+ ( implies ( and x763 ( and x723 true ) ) ( = tmp472 2 ) )
+ ( implies ( and ( not x13 ) ( and ( not x60 ) true ) ) ( = tmp471 0 ) )
+ ( implies ( and ( not x13 ) ( and x60 true ) ) ( = tmp471 1 ) )
+ ( implies ( and x13 ( and ( not x60 ) true ) ) ( = tmp471 1 ) )
+ ( implies ( and x13 ( and x60 true ) ) ( = tmp471 2 ) )
+ ( implies ( and ( not x484 ) ( and ( not x438 ) true ) ) ( = tmp470 0 ) )
+ ( implies ( and ( not x484 ) ( and x438 true ) ) ( = tmp470 1 ) )
+ ( implies ( and x484 ( and ( not x438 ) true ) ) ( = tmp470 1 ) )
+ ( implies ( and x484 ( and x438 true ) ) ( = tmp470 2 ) )
+ ( implies ( and ( not x342 ) ( and ( not x390 ) true ) ) ( = tmp469 0 ) )
+ ( implies ( and ( not x342 ) ( and x390 true ) ) ( = tmp469 1 ) )
+ ( implies ( and x342 ( and ( not x390 ) true ) ) ( = tmp469 1 ) )
+ ( implies ( and x342 ( and x390 true ) ) ( = tmp469 2 ) )
+ ( implies ( and ( not x580 ) ( and ( not x532 ) true ) ) ( = tmp468 0 ) )
+ ( implies ( and ( not x580 ) ( and x532 true ) ) ( = tmp468 1 ) )
+ ( implies ( and x580 ( and ( not x532 ) true ) ) ( = tmp468 1 ) )
+ ( implies ( and x580 ( and x532 true ) ) ( = tmp468 2 ) )
+ ( implies ( and ( not x202 ) ( and ( not x294 ) true ) ) ( = tmp467 0 ) )
+ ( implies ( and ( not x202 ) ( and x294 true ) ) ( = tmp467 1 ) )
+ ( implies ( and x202 ( and ( not x294 ) true ) ) ( = tmp467 1 ) )
+ ( implies ( and x202 ( and x294 true ) ) ( = tmp467 2 ) )
+ ( implies ( and ( not x675 ) ( and ( not x627 ) true ) ) ( = tmp466 0 ) )
+ ( implies ( and ( not x675 ) ( and x627 true ) ) ( = tmp466 1 ) )
+ ( implies ( and x675 ( and ( not x627 ) true ) ) ( = tmp466 1 ) )
+ ( implies ( and x675 ( and x627 true ) ) ( = tmp466 2 ) )
+ ( implies ( and ( not x107 ) ( and ( not x154 ) true ) ) ( = tmp465 0 ) )
+ ( implies ( and ( not x107 ) ( and x154 true ) ) ( = tmp465 1 ) )
+ ( implies ( and x107 ( and ( not x154 ) true ) ) ( = tmp465 1 ) )
+ ( implies ( and x107 ( and x154 true ) ) ( = tmp465 2 ) )
+ ( implies ( and ( not x762 ) ( and ( not x722 ) true ) ) ( = tmp464 0 ) )
+ ( implies ( and ( not x762 ) ( and x722 true ) ) ( = tmp464 1 ) )
+ ( implies ( and x762 ( and ( not x722 ) true ) ) ( = tmp464 1 ) )
+ ( implies ( and x762 ( and x722 true ) ) ( = tmp464 2 ) )
+ ( implies ( and ( not x12 ) ( and ( not x59 ) true ) ) ( = tmp463 0 ) )
+ ( implies ( and ( not x12 ) ( and x59 true ) ) ( = tmp463 1 ) )
+ ( implies ( and x12 ( and ( not x59 ) true ) ) ( = tmp463 1 ) )
+ ( implies ( and x12 ( and x59 true ) ) ( = tmp463 2 ) )
+ ( implies ( and ( not x483 ) ( and ( not x437 ) true ) ) ( = tmp462 0 ) )
+ ( implies ( and ( not x483 ) ( and x437 true ) ) ( = tmp462 1 ) )
+ ( implies ( and x483 ( and ( not x437 ) true ) ) ( = tmp462 1 ) )
+ ( implies ( and x483 ( and x437 true ) ) ( = tmp462 2 ) )
+ ( implies ( and ( not x341 ) ( and ( not x389 ) true ) ) ( = tmp461 0 ) )
+ ( implies ( and ( not x341 ) ( and x389 true ) ) ( = tmp461 1 ) )
+ ( implies ( and x341 ( and ( not x389 ) true ) ) ( = tmp461 1 ) )
+ ( implies ( and x341 ( and x389 true ) ) ( = tmp461 2 ) )
+ ( implies ( and ( not x579 ) ( and ( not x531 ) true ) ) ( = tmp460 0 ) )
+ ( implies ( and ( not x579 ) ( and x531 true ) ) ( = tmp460 1 ) )
+ ( implies ( and x579 ( and ( not x531 ) true ) ) ( = tmp460 1 ) )
+ ( implies ( and x579 ( and x531 true ) ) ( = tmp460 2 ) )
+ ( implies ( and ( not x201 ) ( and ( not x293 ) true ) ) ( = tmp459 0 ) )
+ ( implies ( and ( not x201 ) ( and x293 true ) ) ( = tmp459 1 ) )
+ ( implies ( and x201 ( and ( not x293 ) true ) ) ( = tmp459 1 ) )
+ ( implies ( and x201 ( and x293 true ) ) ( = tmp459 2 ) )
+ ( implies ( and ( not x674 ) ( and ( not x626 ) true ) ) ( = tmp458 0 ) )
+ ( implies ( and ( not x674 ) ( and x626 true ) ) ( = tmp458 1 ) )
+ ( implies ( and x674 ( and ( not x626 ) true ) ) ( = tmp458 1 ) )
+ ( implies ( and x674 ( and x626 true ) ) ( = tmp458 2 ) )
+ ( implies ( and ( not x106 ) ( and ( not x153 ) true ) ) ( = tmp457 0 ) )
+ ( implies ( and ( not x106 ) ( and x153 true ) ) ( = tmp457 1 ) )
+ ( implies ( and x106 ( and ( not x153 ) true ) ) ( = tmp457 1 ) )
+ ( implies ( and x106 ( and x153 true ) ) ( = tmp457 2 ) )
+ ( implies ( and ( not x761 ) ( and ( not x721 ) true ) ) ( = tmp456 0 ) )
+ ( implies ( and ( not x761 ) ( and x721 true ) ) ( = tmp456 1 ) )
+ ( implies ( and x761 ( and ( not x721 ) true ) ) ( = tmp456 1 ) )
+ ( implies ( and x761 ( and x721 true ) ) ( = tmp456 2 ) )
+ ( implies ( and ( not x11 ) ( and ( not x58 ) true ) ) ( = tmp455 0 ) )
+ ( implies ( and ( not x11 ) ( and x58 true ) ) ( = tmp455 1 ) )
+ ( implies ( and x11 ( and ( not x58 ) true ) ) ( = tmp455 1 ) )
+ ( implies ( and x11 ( and x58 true ) ) ( = tmp455 2 ) )
+ ( implies ( and ( not x436 ) ( and ( not x388 ) true ) ) ( = tmp454 0 ) )
+ ( implies ( and ( not x436 ) ( and x388 true ) ) ( = tmp454 1 ) )
+ ( implies ( and x436 ( and ( not x388 ) true ) ) ( = tmp454 1 ) )
+ ( implies ( and x436 ( and x388 true ) ) ( = tmp454 2 ) )
+ ( implies ( and ( not x292 ) ( and ( not x340 ) true ) ) ( = tmp453 0 ) )
+ ( implies ( and ( not x292 ) ( and x340 true ) ) ( = tmp453 1 ) )
+ ( implies ( and x292 ( and ( not x340 ) true ) ) ( = tmp453 1 ) )
+ ( implies ( and x292 ( and x340 true ) ) ( = tmp453 2 ) )
+ ( implies ( and ( not x530 ) ( and ( not x482 ) true ) ) ( = tmp452 0 ) )
+ ( implies ( and ( not x530 ) ( and x482 true ) ) ( = tmp452 1 ) )
+ ( implies ( and x530 ( and ( not x482 ) true ) ) ( = tmp452 1 ) )
+ ( implies ( and x530 ( and x482 true ) ) ( = tmp452 2 ) )
+ ( implies ( and ( not x200 ) ( and ( not x248 ) true ) ) ( = tmp451 0 ) )
+ ( implies ( and ( not x200 ) ( and x248 true ) ) ( = tmp451 1 ) )
+ ( implies ( and x200 ( and ( not x248 ) true ) ) ( = tmp451 1 ) )
+ ( implies ( and x200 ( and x248 true ) ) ( = tmp451 2 ) )
+ ( implies ( and ( not x625 ) ( and ( not x578 ) true ) ) ( = tmp450 0 ) )
+ ( implies ( and ( not x625 ) ( and x578 true ) ) ( = tmp450 1 ) )
+ ( implies ( and x625 ( and ( not x578 ) true ) ) ( = tmp450 1 ) )
+ ( implies ( and x625 ( and x578 true ) ) ( = tmp450 2 ) )
+ ( implies ( and ( not x105 ) ( and ( not x152 ) true ) ) ( = tmp449 0 ) )
+ ( implies ( and ( not x105 ) ( and x152 true ) ) ( = tmp449 1 ) )
+ ( implies ( and x105 ( and ( not x152 ) true ) ) ( = tmp449 1 ) )
+ ( implies ( and x105 ( and x152 true ) ) ( = tmp449 2 ) )
+ ( implies ( and ( not x720 ) ( and ( not x673 ) true ) ) ( = tmp448 0 ) )
+ ( implies ( and ( not x720 ) ( and x673 true ) ) ( = tmp448 1 ) )
+ ( implies ( and x720 ( and ( not x673 ) true ) ) ( = tmp448 1 ) )
+ ( implies ( and x720 ( and x673 true ) ) ( = tmp448 2 ) )
+ ( implies ( and ( not x10 ) ( and ( not x57 ) true ) ) ( = tmp447 0 ) )
+ ( implies ( and ( not x10 ) ( and x57 true ) ) ( = tmp447 1 ) )
+ ( implies ( and x10 ( and ( not x57 ) true ) ) ( = tmp447 1 ) )
+ ( implies ( and x10 ( and x57 true ) ) ( = tmp447 2 ) )
+ ( implies ( and ( not x435 ) ( and ( not x387 ) true ) ) ( = tmp446 0 ) )
+ ( implies ( and ( not x435 ) ( and x387 true ) ) ( = tmp446 1 ) )
+ ( implies ( and x435 ( and ( not x387 ) true ) ) ( = tmp446 1 ) )
+ ( implies ( and x435 ( and x387 true ) ) ( = tmp446 2 ) )
+ ( implies ( and ( not x291 ) ( and ( not x339 ) true ) ) ( = tmp445 0 ) )
+ ( implies ( and ( not x291 ) ( and x339 true ) ) ( = tmp445 1 ) )
+ ( implies ( and x291 ( and ( not x339 ) true ) ) ( = tmp445 1 ) )
+ ( implies ( and x291 ( and x339 true ) ) ( = tmp445 2 ) )
+ ( implies ( and ( not x529 ) ( and ( not x481 ) true ) ) ( = tmp444 0 ) )
+ ( implies ( and ( not x529 ) ( and x481 true ) ) ( = tmp444 1 ) )
+ ( implies ( and x529 ( and ( not x481 ) true ) ) ( = tmp444 1 ) )
+ ( implies ( and x529 ( and x481 true ) ) ( = tmp444 2 ) )
+ ( implies ( and ( not x199 ) ( and ( not x247 ) true ) ) ( = tmp443 0 ) )
+ ( implies ( and ( not x199 ) ( and x247 true ) ) ( = tmp443 1 ) )
+ ( implies ( and x199 ( and ( not x247 ) true ) ) ( = tmp443 1 ) )
+ ( implies ( and x199 ( and x247 true ) ) ( = tmp443 2 ) )
+ ( implies ( and ( not x624 ) ( and ( not x577 ) true ) ) ( = tmp442 0 ) )
+ ( implies ( and ( not x624 ) ( and x577 true ) ) ( = tmp442 1 ) )
+ ( implies ( and x624 ( and ( not x577 ) true ) ) ( = tmp442 1 ) )
+ ( implies ( and x624 ( and x577 true ) ) ( = tmp442 2 ) )
+ ( implies ( and ( not x104 ) ( and ( not x151 ) true ) ) ( = tmp441 0 ) )
+ ( implies ( and ( not x104 ) ( and x151 true ) ) ( = tmp441 1 ) )
+ ( implies ( and x104 ( and ( not x151 ) true ) ) ( = tmp441 1 ) )
+ ( implies ( and x104 ( and x151 true ) ) ( = tmp441 2 ) )
+ ( implies ( and ( not x719 ) ( and ( not x672 ) true ) ) ( = tmp440 0 ) )
+ ( implies ( and ( not x719 ) ( and x672 true ) ) ( = tmp440 1 ) )
+ ( implies ( and x719 ( and ( not x672 ) true ) ) ( = tmp440 1 ) )
+ ( implies ( and x719 ( and x672 true ) ) ( = tmp440 2 ) )
+ ( implies ( and ( not x9 ) ( and ( not x56 ) true ) ) ( = tmp439 0 ) )
+ ( implies ( and ( not x9 ) ( and x56 true ) ) ( = tmp439 1 ) )
+ ( implies ( and x9 ( and ( not x56 ) true ) ) ( = tmp439 1 ) )
+ ( implies ( and x9 ( and x56 true ) ) ( = tmp439 2 ) )
+ ( implies ( and ( not x434 ) ( and ( not x386 ) true ) ) ( = tmp438 0 ) )
+ ( implies ( and ( not x434 ) ( and x386 true ) ) ( = tmp438 1 ) )
+ ( implies ( and x434 ( and ( not x386 ) true ) ) ( = tmp438 1 ) )
+ ( implies ( and x434 ( and x386 true ) ) ( = tmp438 2 ) )
+ ( implies ( and ( not x290 ) ( and ( not x338 ) true ) ) ( = tmp437 0 ) )
+ ( implies ( and ( not x290 ) ( and x338 true ) ) ( = tmp437 1 ) )
+ ( implies ( and x290 ( and ( not x338 ) true ) ) ( = tmp437 1 ) )
+ ( implies ( and x290 ( and x338 true ) ) ( = tmp437 2 ) )
+ ( implies ( and ( not x528 ) ( and ( not x480 ) true ) ) ( = tmp436 0 ) )
+ ( implies ( and ( not x528 ) ( and x480 true ) ) ( = tmp436 1 ) )
+ ( implies ( and x528 ( and ( not x480 ) true ) ) ( = tmp436 1 ) )
+ ( implies ( and x528 ( and x480 true ) ) ( = tmp436 2 ) )
+ ( implies ( and ( not x198 ) ( and ( not x246 ) true ) ) ( = tmp435 0 ) )
+ ( implies ( and ( not x198 ) ( and x246 true ) ) ( = tmp435 1 ) )
+ ( implies ( and x198 ( and ( not x246 ) true ) ) ( = tmp435 1 ) )
+ ( implies ( and x198 ( and x246 true ) ) ( = tmp435 2 ) )
+ ( implies ( and ( not x623 ) ( and ( not x576 ) true ) ) ( = tmp434 0 ) )
+ ( implies ( and ( not x623 ) ( and x576 true ) ) ( = tmp434 1 ) )
+ ( implies ( and x623 ( and ( not x576 ) true ) ) ( = tmp434 1 ) )
+ ( implies ( and x623 ( and x576 true ) ) ( = tmp434 2 ) )
+ ( implies ( and ( not x103 ) ( and ( not x150 ) true ) ) ( = tmp433 0 ) )
+ ( implies ( and ( not x103 ) ( and x150 true ) ) ( = tmp433 1 ) )
+ ( implies ( and x103 ( and ( not x150 ) true ) ) ( = tmp433 1 ) )
+ ( implies ( and x103 ( and x150 true ) ) ( = tmp433 2 ) )
+ ( implies ( and ( not x718 ) ( and ( not x671 ) true ) ) ( = tmp432 0 ) )
+ ( implies ( and ( not x718 ) ( and x671 true ) ) ( = tmp432 1 ) )
+ ( implies ( and x718 ( and ( not x671 ) true ) ) ( = tmp432 1 ) )
+ ( implies ( and x718 ( and x671 true ) ) ( = tmp432 2 ) )
+ ( implies ( and ( not x8 ) ( and ( not x55 ) true ) ) ( = tmp431 0 ) )
+ ( implies ( and ( not x8 ) ( and x55 true ) ) ( = tmp431 1 ) )
+ ( implies ( and x8 ( and ( not x55 ) true ) ) ( = tmp431 1 ) )
+ ( implies ( and x8 ( and x55 true ) ) ( = tmp431 2 ) )
+ ( implies ( and ( not x433 ) ( and ( not x385 ) true ) ) ( = tmp430 0 ) )
+ ( implies ( and ( not x433 ) ( and x385 true ) ) ( = tmp430 1 ) )
+ ( implies ( and x433 ( and ( not x385 ) true ) ) ( = tmp430 1 ) )
+ ( implies ( and x433 ( and x385 true ) ) ( = tmp430 2 ) )
+ ( implies ( and ( not x289 ) ( and ( not x337 ) true ) ) ( = tmp429 0 ) )
+ ( implies ( and ( not x289 ) ( and x337 true ) ) ( = tmp429 1 ) )
+ ( implies ( and x289 ( and ( not x337 ) true ) ) ( = tmp429 1 ) )
+ ( implies ( and x289 ( and x337 true ) ) ( = tmp429 2 ) )
+ ( implies ( and ( not x527 ) ( and ( not x479 ) true ) ) ( = tmp428 0 ) )
+ ( implies ( and ( not x527 ) ( and x479 true ) ) ( = tmp428 1 ) )
+ ( implies ( and x527 ( and ( not x479 ) true ) ) ( = tmp428 1 ) )
+ ( implies ( and x527 ( and x479 true ) ) ( = tmp428 2 ) )
+ ( implies ( and ( not x197 ) ( and ( not x245 ) true ) ) ( = tmp427 0 ) )
+ ( implies ( and ( not x197 ) ( and x245 true ) ) ( = tmp427 1 ) )
+ ( implies ( and x197 ( and ( not x245 ) true ) ) ( = tmp427 1 ) )
+ ( implies ( and x197 ( and x245 true ) ) ( = tmp427 2 ) )
+ ( implies ( and ( not x622 ) ( and ( not x575 ) true ) ) ( = tmp426 0 ) )
+ ( implies ( and ( not x622 ) ( and x575 true ) ) ( = tmp426 1 ) )
+ ( implies ( and x622 ( and ( not x575 ) true ) ) ( = tmp426 1 ) )
+ ( implies ( and x622 ( and x575 true ) ) ( = tmp426 2 ) )
+ ( implies ( and ( not x102 ) ( and ( not x149 ) true ) ) ( = tmp425 0 ) )
+ ( implies ( and ( not x102 ) ( and x149 true ) ) ( = tmp425 1 ) )
+ ( implies ( and x102 ( and ( not x149 ) true ) ) ( = tmp425 1 ) )
+ ( implies ( and x102 ( and x149 true ) ) ( = tmp425 2 ) )
+ ( implies ( and ( not x717 ) ( and ( not x670 ) true ) ) ( = tmp424 0 ) )
+ ( implies ( and ( not x717 ) ( and x670 true ) ) ( = tmp424 1 ) )
+ ( implies ( and x717 ( and ( not x670 ) true ) ) ( = tmp424 1 ) )
+ ( implies ( and x717 ( and x670 true ) ) ( = tmp424 2 ) )
+ ( implies ( and ( not x7 ) ( and ( not x54 ) true ) ) ( = tmp423 0 ) )
+ ( implies ( and ( not x7 ) ( and x54 true ) ) ( = tmp423 1 ) )
+ ( implies ( and x7 ( and ( not x54 ) true ) ) ( = tmp423 1 ) )
+ ( implies ( and x7 ( and x54 true ) ) ( = tmp423 2 ) )
+ ( implies ( and ( not x432 ) ( and ( not x384 ) true ) ) ( = tmp422 0 ) )
+ ( implies ( and ( not x432 ) ( and x384 true ) ) ( = tmp422 1 ) )
+ ( implies ( and x432 ( and ( not x384 ) true ) ) ( = tmp422 1 ) )
+ ( implies ( and x432 ( and x384 true ) ) ( = tmp422 2 ) )
+ ( implies ( and ( not x288 ) ( and ( not x336 ) true ) ) ( = tmp421 0 ) )
+ ( implies ( and ( not x288 ) ( and x336 true ) ) ( = tmp421 1 ) )
+ ( implies ( and x288 ( and ( not x336 ) true ) ) ( = tmp421 1 ) )
+ ( implies ( and x288 ( and x336 true ) ) ( = tmp421 2 ) )
+ ( implies ( and ( not x526 ) ( and ( not x478 ) true ) ) ( = tmp420 0 ) )
+ ( implies ( and ( not x526 ) ( and x478 true ) ) ( = tmp420 1 ) )
+ ( implies ( and x526 ( and ( not x478 ) true ) ) ( = tmp420 1 ) )
+ ( implies ( and x526 ( and x478 true ) ) ( = tmp420 2 ) )
+ ( implies ( and ( not x196 ) ( and ( not x244 ) true ) ) ( = tmp419 0 ) )
+ ( implies ( and ( not x196 ) ( and x244 true ) ) ( = tmp419 1 ) )
+ ( implies ( and x196 ( and ( not x244 ) true ) ) ( = tmp419 1 ) )
+ ( implies ( and x196 ( and x244 true ) ) ( = tmp419 2 ) )
+ ( implies ( and ( not x621 ) ( and ( not x574 ) true ) ) ( = tmp418 0 ) )
+ ( implies ( and ( not x621 ) ( and x574 true ) ) ( = tmp418 1 ) )
+ ( implies ( and x621 ( and ( not x574 ) true ) ) ( = tmp418 1 ) )
+ ( implies ( and x621 ( and x574 true ) ) ( = tmp418 2 ) )
+ ( implies ( and ( not x101 ) ( and ( not x148 ) true ) ) ( = tmp417 0 ) )
+ ( implies ( and ( not x101 ) ( and x148 true ) ) ( = tmp417 1 ) )
+ ( implies ( and x101 ( and ( not x148 ) true ) ) ( = tmp417 1 ) )
+ ( implies ( and x101 ( and x148 true ) ) ( = tmp417 2 ) )
+ ( implies ( and ( not x716 ) ( and ( not x669 ) true ) ) ( = tmp416 0 ) )
+ ( implies ( and ( not x716 ) ( and x669 true ) ) ( = tmp416 1 ) )
+ ( implies ( and x716 ( and ( not x669 ) true ) ) ( = tmp416 1 ) )
+ ( implies ( and x716 ( and x669 true ) ) ( = tmp416 2 ) )
+ ( implies ( and ( not x6 ) ( and ( not x53 ) true ) ) ( = tmp415 0 ) )
+ ( implies ( and ( not x6 ) ( and x53 true ) ) ( = tmp415 1 ) )
+ ( implies ( and x6 ( and ( not x53 ) true ) ) ( = tmp415 1 ) )
+ ( implies ( and x6 ( and x53 true ) ) ( = tmp415 2 ) )
+ ( implies ( and ( not x431 ) ( and ( not x383 ) true ) ) ( = tmp414 0 ) )
+ ( implies ( and ( not x431 ) ( and x383 true ) ) ( = tmp414 1 ) )
+ ( implies ( and x431 ( and ( not x383 ) true ) ) ( = tmp414 1 ) )
+ ( implies ( and x431 ( and x383 true ) ) ( = tmp414 2 ) )
+ ( implies ( and ( not x287 ) ( and ( not x335 ) true ) ) ( = tmp413 0 ) )
+ ( implies ( and ( not x287 ) ( and x335 true ) ) ( = tmp413 1 ) )
+ ( implies ( and x287 ( and ( not x335 ) true ) ) ( = tmp413 1 ) )
+ ( implies ( and x287 ( and x335 true ) ) ( = tmp413 2 ) )
+ ( implies ( and ( not x525 ) ( and ( not x477 ) true ) ) ( = tmp412 0 ) )
+ ( implies ( and ( not x525 ) ( and x477 true ) ) ( = tmp412 1 ) )
+ ( implies ( and x525 ( and ( not x477 ) true ) ) ( = tmp412 1 ) )
+ ( implies ( and x525 ( and x477 true ) ) ( = tmp412 2 ) )
+ ( implies ( and ( not x195 ) ( and ( not x243 ) true ) ) ( = tmp411 0 ) )
+ ( implies ( and ( not x195 ) ( and x243 true ) ) ( = tmp411 1 ) )
+ ( implies ( and x195 ( and ( not x243 ) true ) ) ( = tmp411 1 ) )
+ ( implies ( and x195 ( and x243 true ) ) ( = tmp411 2 ) )
+ ( implies ( and ( not x620 ) ( and ( not x573 ) true ) ) ( = tmp410 0 ) )
+ ( implies ( and ( not x620 ) ( and x573 true ) ) ( = tmp410 1 ) )
+ ( implies ( and x620 ( and ( not x573 ) true ) ) ( = tmp410 1 ) )
+ ( implies ( and x620 ( and x573 true ) ) ( = tmp410 2 ) )
+ ( implies ( and ( not x100 ) ( and ( not x147 ) true ) ) ( = tmp409 0 ) )
+ ( implies ( and ( not x100 ) ( and x147 true ) ) ( = tmp409 1 ) )
+ ( implies ( and x100 ( and ( not x147 ) true ) ) ( = tmp409 1 ) )
+ ( implies ( and x100 ( and x147 true ) ) ( = tmp409 2 ) )
+ ( implies ( and ( not x715 ) ( and ( not x668 ) true ) ) ( = tmp408 0 ) )
+ ( implies ( and ( not x715 ) ( and x668 true ) ) ( = tmp408 1 ) )
+ ( implies ( and x715 ( and ( not x668 ) true ) ) ( = tmp408 1 ) )
+ ( implies ( and x715 ( and x668 true ) ) ( = tmp408 2 ) )
+ ( implies ( and ( not x5 ) ( and ( not x52 ) true ) ) ( = tmp407 0 ) )
+ ( implies ( and ( not x5 ) ( and x52 true ) ) ( = tmp407 1 ) )
+ ( implies ( and x5 ( and ( not x52 ) true ) ) ( = tmp407 1 ) )
+ ( implies ( and x5 ( and x52 true ) ) ( = tmp407 2 ) )
+ ( implies ( and ( not x430 ) ( and ( not x382 ) true ) ) ( = tmp406 0 ) )
+ ( implies ( and ( not x430 ) ( and x382 true ) ) ( = tmp406 1 ) )
+ ( implies ( and x430 ( and ( not x382 ) true ) ) ( = tmp406 1 ) )
+ ( implies ( and x430 ( and x382 true ) ) ( = tmp406 2 ) )
+ ( implies ( and ( not x286 ) ( and ( not x334 ) true ) ) ( = tmp405 0 ) )
+ ( implies ( and ( not x286 ) ( and x334 true ) ) ( = tmp405 1 ) )
+ ( implies ( and x286 ( and ( not x334 ) true ) ) ( = tmp405 1 ) )
+ ( implies ( and x286 ( and x334 true ) ) ( = tmp405 2 ) )
+ ( implies ( and ( not x524 ) ( and ( not x476 ) true ) ) ( = tmp404 0 ) )
+ ( implies ( and ( not x524 ) ( and x476 true ) ) ( = tmp404 1 ) )
+ ( implies ( and x524 ( and ( not x476 ) true ) ) ( = tmp404 1 ) )
+ ( implies ( and x524 ( and x476 true ) ) ( = tmp404 2 ) )
+ ( implies ( and ( not x194 ) ( and ( not x242 ) true ) ) ( = tmp403 0 ) )
+ ( implies ( and ( not x194 ) ( and x242 true ) ) ( = tmp403 1 ) )
+ ( implies ( and x194 ( and ( not x242 ) true ) ) ( = tmp403 1 ) )
+ ( implies ( and x194 ( and x242 true ) ) ( = tmp403 2 ) )
+ ( implies ( and ( not x619 ) ( and ( not x572 ) true ) ) ( = tmp402 0 ) )
+ ( implies ( and ( not x619 ) ( and x572 true ) ) ( = tmp402 1 ) )
+ ( implies ( and x619 ( and ( not x572 ) true ) ) ( = tmp402 1 ) )
+ ( implies ( and x619 ( and x572 true ) ) ( = tmp402 2 ) )
+ ( implies ( and ( not x99 ) ( and ( not x146 ) true ) ) ( = tmp401 0 ) )
+ ( implies ( and ( not x99 ) ( and x146 true ) ) ( = tmp401 1 ) )
+ ( implies ( and x99 ( and ( not x146 ) true ) ) ( = tmp401 1 ) )
+ ( implies ( and x99 ( and x146 true ) ) ( = tmp401 2 ) )
+ ( implies ( and ( not x714 ) ( and ( not x667 ) true ) ) ( = tmp400 0 ) )
+ ( implies ( and ( not x714 ) ( and x667 true ) ) ( = tmp400 1 ) )
+ ( implies ( and x714 ( and ( not x667 ) true ) ) ( = tmp400 1 ) )
+ ( implies ( and x714 ( and x667 true ) ) ( = tmp400 2 ) )
+ ( implies ( and ( not x4 ) ( and ( not x51 ) true ) ) ( = tmp399 0 ) )
+ ( implies ( and ( not x4 ) ( and x51 true ) ) ( = tmp399 1 ) )
+ ( implies ( and x4 ( and ( not x51 ) true ) ) ( = tmp399 1 ) )
+ ( implies ( and x4 ( and x51 true ) ) ( = tmp399 2 ) )
+ ( implies ( and ( not x429 ) ( and ( not x381 ) true ) ) ( = tmp398 0 ) )
+ ( implies ( and ( not x429 ) ( and x381 true ) ) ( = tmp398 1 ) )
+ ( implies ( and x429 ( and ( not x381 ) true ) ) ( = tmp398 1 ) )
+ ( implies ( and x429 ( and x381 true ) ) ( = tmp398 2 ) )
+ ( implies ( and ( not x285 ) ( and ( not x333 ) true ) ) ( = tmp397 0 ) )
+ ( implies ( and ( not x285 ) ( and x333 true ) ) ( = tmp397 1 ) )
+ ( implies ( and x285 ( and ( not x333 ) true ) ) ( = tmp397 1 ) )
+ ( implies ( and x285 ( and x333 true ) ) ( = tmp397 2 ) )
+ ( implies ( and ( not x523 ) ( and ( not x475 ) true ) ) ( = tmp396 0 ) )
+ ( implies ( and ( not x523 ) ( and x475 true ) ) ( = tmp396 1 ) )
+ ( implies ( and x523 ( and ( not x475 ) true ) ) ( = tmp396 1 ) )
+ ( implies ( and x523 ( and x475 true ) ) ( = tmp396 2 ) )
+ ( implies ( and ( not x193 ) ( and ( not x241 ) true ) ) ( = tmp395 0 ) )
+ ( implies ( and ( not x193 ) ( and x241 true ) ) ( = tmp395 1 ) )
+ ( implies ( and x193 ( and ( not x241 ) true ) ) ( = tmp395 1 ) )
+ ( implies ( and x193 ( and x241 true ) ) ( = tmp395 2 ) )
+ ( implies ( and ( not x618 ) ( and ( not x571 ) true ) ) ( = tmp394 0 ) )
+ ( implies ( and ( not x618 ) ( and x571 true ) ) ( = tmp394 1 ) )
+ ( implies ( and x618 ( and ( not x571 ) true ) ) ( = tmp394 1 ) )
+ ( implies ( and x618 ( and x571 true ) ) ( = tmp394 2 ) )
+ ( implies ( and ( not x98 ) ( and ( not x145 ) true ) ) ( = tmp393 0 ) )
+ ( implies ( and ( not x98 ) ( and x145 true ) ) ( = tmp393 1 ) )
+ ( implies ( and x98 ( and ( not x145 ) true ) ) ( = tmp393 1 ) )
+ ( implies ( and x98 ( and x145 true ) ) ( = tmp393 2 ) )
+ ( implies ( and ( not x713 ) ( and ( not x666 ) true ) ) ( = tmp392 0 ) )
+ ( implies ( and ( not x713 ) ( and x666 true ) ) ( = tmp392 1 ) )
+ ( implies ( and x713 ( and ( not x666 ) true ) ) ( = tmp392 1 ) )
+ ( implies ( and x713 ( and x666 true ) ) ( = tmp392 2 ) )
+ ( implies ( and ( not x3 ) ( and ( not x50 ) true ) ) ( = tmp391 0 ) )
+ ( implies ( and ( not x3 ) ( and x50 true ) ) ( = tmp391 1 ) )
+ ( implies ( and x3 ( and ( not x50 ) true ) ) ( = tmp391 1 ) )
+ ( implies ( and x3 ( and x50 true ) ) ( = tmp391 2 ) )
+ ( implies ( and ( not x428 ) ( and ( not x380 ) true ) ) ( = tmp390 0 ) )
+ ( implies ( and ( not x428 ) ( and x380 true ) ) ( = tmp390 1 ) )
+ ( implies ( and x428 ( and ( not x380 ) true ) ) ( = tmp390 1 ) )
+ ( implies ( and x428 ( and x380 true ) ) ( = tmp390 2 ) )
+ ( implies ( and ( not x284 ) ( and ( not x332 ) true ) ) ( = tmp389 0 ) )
+ ( implies ( and ( not x284 ) ( and x332 true ) ) ( = tmp389 1 ) )
+ ( implies ( and x284 ( and ( not x332 ) true ) ) ( = tmp389 1 ) )
+ ( implies ( and x284 ( and x332 true ) ) ( = tmp389 2 ) )
+ ( implies ( and ( not x570 ) ( and ( not x522 ) true ) ) ( = tmp388 0 ) )
+ ( implies ( and ( not x570 ) ( and x522 true ) ) ( = tmp388 1 ) )
+ ( implies ( and x570 ( and ( not x522 ) true ) ) ( = tmp388 1 ) )
+ ( implies ( and x570 ( and x522 true ) ) ( = tmp388 2 ) )
+ ( implies ( and ( not x192 ) ( and ( not x240 ) true ) ) ( = tmp387 0 ) )
+ ( implies ( and ( not x192 ) ( and x240 true ) ) ( = tmp387 1 ) )
+ ( implies ( and x192 ( and ( not x240 ) true ) ) ( = tmp387 1 ) )
+ ( implies ( and x192 ( and x240 true ) ) ( = tmp387 2 ) )
+ ( implies ( and ( not x665 ) ( and ( not x617 ) true ) ) ( = tmp386 0 ) )
+ ( implies ( and ( not x665 ) ( and x617 true ) ) ( = tmp386 1 ) )
+ ( implies ( and x665 ( and ( not x617 ) true ) ) ( = tmp386 1 ) )
+ ( implies ( and x665 ( and x617 true ) ) ( = tmp386 2 ) )
+ ( implies ( and ( not x97 ) ( and ( not x144 ) true ) ) ( = tmp385 0 ) )
+ ( implies ( and ( not x97 ) ( and x144 true ) ) ( = tmp385 1 ) )
+ ( implies ( and x97 ( and ( not x144 ) true ) ) ( = tmp385 1 ) )
+ ( implies ( and x97 ( and x144 true ) ) ( = tmp385 2 ) )
+ ( implies ( and ( not x760 ) ( and ( not x712 ) true ) ) ( = tmp384 0 ) )
+ ( implies ( and ( not x760 ) ( and x712 true ) ) ( = tmp384 1 ) )
+ ( implies ( and x760 ( and ( not x712 ) true ) ) ( = tmp384 1 ) )
+ ( implies ( and x760 ( and x712 true ) ) ( = tmp384 2 ) )
+ ( implies ( and ( not x2 ) ( and ( not x49 ) true ) ) ( = tmp383 0 ) )
+ ( implies ( and ( not x2 ) ( and x49 true ) ) ( = tmp383 1 ) )
+ ( implies ( and x2 ( and ( not x49 ) true ) ) ( = tmp383 1 ) )
+ ( implies ( and x2 ( and x49 true ) ) ( = tmp383 2 ) )
+ ( implies ( and ( not x737 ) ( and ( not x736 ) true ) ) ( = tmp382 0 ) )
+ ( implies ( and ( not x737 ) ( and x736 true ) ) ( = tmp382 6 ) )
+ ( implies ( and x737 ( and ( not x736 ) true ) ) ( = tmp382 6 ) )
+ ( implies ( and x737 ( and x736 true ) ) ( = tmp382 12 ) )
+ ( implies ( and ( not x734 ) ( and ( not x735 ) true ) ) ( = tmp381 0 ) )
+ ( implies ( and ( not x734 ) ( and x735 true ) ) ( = tmp381 4 ) )
+ ( implies ( and x734 ( and ( not x735 ) true ) ) ( = tmp381 4 ) )
+ ( implies ( and x734 ( and x735 true ) ) ( = tmp381 8 ) )
+ ( implies ( and ( not x739 ) ( and ( not x738 ) true ) ) ( = tmp380 0 ) )
+ ( implies ( and ( not x739 ) ( and x738 true ) ) ( = tmp380 6 ) )
+ ( implies ( and x739 ( and ( not x738 ) true ) ) ( = tmp380 6 ) )
+ ( implies ( and x739 ( and x738 true ) ) ( = tmp380 12 ) )
+ ( implies ( and ( not x732 ) ( and ( not x733 ) true ) ) ( = tmp379 0 ) )
+ ( implies ( and ( not x732 ) ( and x733 true ) ) ( = tmp379 6 ) )
+ ( implies ( and x732 ( and ( not x733 ) true ) ) ( = tmp379 6 ) )
+ ( implies ( and x732 ( and x733 true ) ) ( = tmp379 12 ) )
+ ( implies ( and ( not x741 ) ( and ( not x740 ) true ) ) ( = tmp378 0 ) )
+ ( implies ( and ( not x741 ) ( and x740 true ) ) ( = tmp378 6 ) )
+ ( implies ( and x741 ( and ( not x740 ) true ) ) ( = tmp378 8 ) )
+ ( implies ( and x741 ( and x740 true ) ) ( = tmp378 14 ) )
+ ( implies ( and ( not x730 ) ( and ( not x731 ) true ) ) ( = tmp377 0 ) )
+ ( implies ( and ( not x730 ) ( and x731 true ) ) ( = tmp377 8 ) )
+ ( implies ( and x730 ( and ( not x731 ) true ) ) ( = tmp377 8 ) )
+ ( implies ( and x730 ( and x731 true ) ) ( = tmp377 16 ) )
+ ( implies ( and ( not x743 ) ( and ( not x742 ) true ) ) ( = tmp376 0 ) )
+ ( implies ( and ( not x743 ) ( and x742 true ) ) ( = tmp376 8 ) )
+ ( implies ( and x743 ( and ( not x742 ) true ) ) ( = tmp376 8 ) )
+ ( implies ( and x743 ( and x742 true ) ) ( = tmp376 16 ) )
+ ( implies ( and ( not x728 ) ( and ( not x729 ) true ) ) ( = tmp375 0 ) )
+ ( implies ( and ( not x728 ) ( and x729 true ) ) ( = tmp375 8 ) )
+ ( implies ( and x728 ( and ( not x729 ) true ) ) ( = tmp375 8 ) )
+ ( implies ( and x728 ( and x729 true ) ) ( = tmp375 16 ) )
+ ( implies ( and ( not x745 ) ( and ( not x744 ) true ) ) ( = tmp374 0 ) )
+ ( implies ( and ( not x745 ) ( and x744 true ) ) ( = tmp374 8 ) )
+ ( implies ( and x745 ( and ( not x744 ) true ) ) ( = tmp374 8 ) )
+ ( implies ( and x745 ( and x744 true ) ) ( = tmp374 16 ) )
+ ( implies ( and ( not x726 ) ( and ( not x727 ) true ) ) ( = tmp373 0 ) )
+ ( implies ( and ( not x726 ) ( and x727 true ) ) ( = tmp373 8 ) )
+ ( implies ( and x726 ( and ( not x727 ) true ) ) ( = tmp373 8 ) )
+ ( implies ( and x726 ( and x727 true ) ) ( = tmp373 16 ) )
+ ( implies ( and ( not x747 ) ( and ( not x746 ) true ) ) ( = tmp372 0 ) )
+ ( implies ( and ( not x747 ) ( and x746 true ) ) ( = tmp372 8 ) )
+ ( implies ( and x747 ( and ( not x746 ) true ) ) ( = tmp372 8 ) )
+ ( implies ( and x747 ( and x746 true ) ) ( = tmp372 16 ) )
+ ( implies ( and ( not x724 ) ( and ( not x725 ) true ) ) ( = tmp371 0 ) )
+ ( implies ( and ( not x724 ) ( and x725 true ) ) ( = tmp371 8 ) )
+ ( implies ( and x724 ( and ( not x725 ) true ) ) ( = tmp371 8 ) )
+ ( implies ( and x724 ( and x725 true ) ) ( = tmp371 16 ) )
+ ( implies ( and ( not x749 ) ( and ( not x748 ) true ) ) ( = tmp370 0 ) )
+ ( implies ( and ( not x749 ) ( and x748 true ) ) ( = tmp370 6 ) )
+ ( implies ( and x749 ( and ( not x748 ) true ) ) ( = tmp370 6 ) )
+ ( implies ( and x749 ( and x748 true ) ) ( = tmp370 12 ) )
+ ( implies ( and ( not x722 ) ( and ( not x723 ) true ) ) ( = tmp369 0 ) )
+ ( implies ( and ( not x722 ) ( and x723 true ) ) ( = tmp369 8 ) )
+ ( implies ( and x722 ( and ( not x723 ) true ) ) ( = tmp369 8 ) )
+ ( implies ( and x722 ( and x723 true ) ) ( = tmp369 16 ) )
+ ( implies ( and ( not x751 ) ( and ( not x750 ) true ) ) ( = tmp368 0 ) )
+ ( implies ( and ( not x751 ) ( and x750 true ) ) ( = tmp368 2 ) )
+ ( implies ( and x751 ( and ( not x750 ) true ) ) ( = tmp368 6 ) )
+ ( implies ( and x751 ( and x750 true ) ) ( = tmp368 8 ) )
+ ( implies ( and ( not x720 ) ( and ( not x721 ) true ) ) ( = tmp367 0 ) )
+ ( implies ( and ( not x720 ) ( and x721 true ) ) ( = tmp367 8 ) )
+ ( implies ( and x720 ( and ( not x721 ) true ) ) ( = tmp367 8 ) )
+ ( implies ( and x720 ( and x721 true ) ) ( = tmp367 16 ) )
+ ( implies ( and ( not x753 ) ( and ( not x752 ) true ) ) ( = tmp366 0 ) )
+ ( implies ( and ( not x753 ) ( and x752 true ) ) ( = tmp366 8 ) )
+ ( implies ( and x753 ( and ( not x752 ) true ) ) ( = tmp366 8 ) )
+ ( implies ( and x753 ( and x752 true ) ) ( = tmp366 16 ) )
+ ( implies ( and ( not x718 ) ( and ( not x719 ) true ) ) ( = tmp365 0 ) )
+ ( implies ( and ( not x718 ) ( and x719 true ) ) ( = tmp365 8 ) )
+ ( implies ( and x718 ( and ( not x719 ) true ) ) ( = tmp365 6 ) )
+ ( implies ( and x718 ( and x719 true ) ) ( = tmp365 14 ) )
+ ( implies ( and ( not x755 ) ( and ( not x754 ) true ) ) ( = tmp364 0 ) )
+ ( implies ( and ( not x755 ) ( and x754 true ) ) ( = tmp364 8 ) )
+ ( implies ( and x755 ( and ( not x754 ) true ) ) ( = tmp364 8 ) )
+ ( implies ( and x755 ( and x754 true ) ) ( = tmp364 16 ) )
+ ( implies ( and ( not x716 ) ( and ( not x717 ) true ) ) ( = tmp363 0 ) )
+ ( implies ( and ( not x716 ) ( and x717 true ) ) ( = tmp363 4 ) )
+ ( implies ( and x716 ( and ( not x717 ) true ) ) ( = tmp363 6 ) )
+ ( implies ( and x716 ( and x717 true ) ) ( = tmp363 10 ) )
+ ( implies ( and ( not x757 ) ( and ( not x756 ) true ) ) ( = tmp362 0 ) )
+ ( implies ( and ( not x757 ) ( and x756 true ) ) ( = tmp362 8 ) )
+ ( implies ( and x757 ( and ( not x756 ) true ) ) ( = tmp362 8 ) )
+ ( implies ( and x757 ( and x756 true ) ) ( = tmp362 16 ) )
+ ( implies ( and ( not x714 ) ( and ( not x715 ) true ) ) ( = tmp361 0 ) )
+ ( implies ( and ( not x714 ) ( and x715 true ) ) ( = tmp361 8 ) )
+ ( implies ( and x714 ( and ( not x715 ) true ) ) ( = tmp361 8 ) )
+ ( implies ( and x714 ( and x715 true ) ) ( = tmp361 16 ) )
+ ( implies ( and ( not x759 ) ( and ( not x758 ) true ) ) ( = tmp360 0 ) )
+ ( implies ( and ( not x759 ) ( and x758 true ) ) ( = tmp360 6 ) )
+ ( implies ( and x759 ( and ( not x758 ) true ) ) ( = tmp360 8 ) )
+ ( implies ( and x759 ( and x758 true ) ) ( = tmp360 14 ) )
+ ( implies ( and ( not x712 ) ( and ( not x713 ) true ) ) ( = tmp359 0 ) )
+ ( implies ( and ( not x712 ) ( and x713 true ) ) ( = tmp359 8 ) )
+ ( implies ( and x712 ( and ( not x713 ) true ) ) ( = tmp359 8 ) )
+ ( implies ( and x712 ( and x713 true ) ) ( = tmp359 16 ) )
+ ( implies ( and ( not x689 ) true ) ( = tmp358 0 ) )
+ ( implies ( and x689 true ) ( = tmp358 4 ) )
+ ( implies ( and ( not x687 ) ( and ( not x688 ) true ) ) ( = tmp357 0 ) )
+ ( implies ( and ( not x687 ) ( and x688 true ) ) ( = tmp357 4 ) )
+ ( implies ( and x687 ( and ( not x688 ) true ) ) ( = tmp357 2 ) )
+ ( implies ( and x687 ( and x688 true ) ) ( = tmp357 6 ) )
+ ( implies ( and ( not x691 ) ( and ( not x690 ) true ) ) ( = tmp356 0 ) )
+ ( implies ( and ( not x691 ) ( and x690 true ) ) ( = tmp356 2 ) )
+ ( implies ( and x691 ( and ( not x690 ) true ) ) ( = tmp356 2 ) )
+ ( implies ( and x691 ( and x690 true ) ) ( = tmp356 4 ) )
+ ( implies ( and ( not x685 ) ( and ( not x686 ) true ) ) ( = tmp355 0 ) )
+ ( implies ( and ( not x685 ) ( and x686 true ) ) ( = tmp355 4 ) )
+ ( implies ( and x685 ( and ( not x686 ) true ) ) ( = tmp355 6 ) )
+ ( implies ( and x685 ( and x686 true ) ) ( = tmp355 10 ) )
+ ( implies ( and ( not x693 ) ( and ( not x692 ) true ) ) ( = tmp354 0 ) )
+ ( implies ( and ( not x693 ) ( and x692 true ) ) ( = tmp354 4 ) )
+ ( implies ( and x693 ( and ( not x692 ) true ) ) ( = tmp354 4 ) )
+ ( implies ( and x693 ( and x692 true ) ) ( = tmp354 8 ) )
+ ( implies ( and ( not x683 ) ( and ( not x684 ) true ) ) ( = tmp353 0 ) )
+ ( implies ( and ( not x683 ) ( and x684 true ) ) ( = tmp353 6 ) )
+ ( implies ( and x683 ( and ( not x684 ) true ) ) ( = tmp353 8 ) )
+ ( implies ( and x683 ( and x684 true ) ) ( = tmp353 14 ) )
+ ( implies ( and ( not x695 ) ( and ( not x694 ) true ) ) ( = tmp352 0 ) )
+ ( implies ( and ( not x695 ) ( and x694 true ) ) ( = tmp352 4 ) )
+ ( implies ( and x695 ( and ( not x694 ) true ) ) ( = tmp352 4 ) )
+ ( implies ( and x695 ( and x694 true ) ) ( = tmp352 8 ) )
+ ( implies ( and ( not x681 ) ( and ( not x682 ) true ) ) ( = tmp351 0 ) )
+ ( implies ( and ( not x681 ) ( and x682 true ) ) ( = tmp351 8 ) )
+ ( implies ( and x681 ( and ( not x682 ) true ) ) ( = tmp351 6 ) )
+ ( implies ( and x681 ( and x682 true ) ) ( = tmp351 14 ) )
+ ( implies ( and ( not x697 ) ( and ( not x696 ) true ) ) ( = tmp350 0 ) )
+ ( implies ( and ( not x697 ) ( and x696 true ) ) ( = tmp350 2 ) )
+ ( implies ( and x697 ( and ( not x696 ) true ) ) ( = tmp350 2 ) )
+ ( implies ( and x697 ( and x696 true ) ) ( = tmp350 4 ) )
+ ( implies ( and ( not x679 ) ( and ( not x680 ) true ) ) ( = tmp349 0 ) )
+ ( implies ( and ( not x679 ) ( and x680 true ) ) ( = tmp349 6 ) )
+ ( implies ( and x679 ( and ( not x680 ) true ) ) ( = tmp349 6 ) )
+ ( implies ( and x679 ( and x680 true ) ) ( = tmp349 12 ) )
+ ( implies ( and ( not x699 ) ( and ( not x698 ) true ) ) ( = tmp348 0 ) )
+ ( implies ( and ( not x699 ) ( and x698 true ) ) ( = tmp348 4 ) )
+ ( implies ( and x699 ( and ( not x698 ) true ) ) ( = tmp348 6 ) )
+ ( implies ( and x699 ( and x698 true ) ) ( = tmp348 10 ) )
+ ( implies ( and ( not x677 ) ( and ( not x678 ) true ) ) ( = tmp347 0 ) )
+ ( implies ( and ( not x677 ) ( and x678 true ) ) ( = tmp347 6 ) )
+ ( implies ( and x677 ( and ( not x678 ) true ) ) ( = tmp347 8 ) )
+ ( implies ( and x677 ( and x678 true ) ) ( = tmp347 14 ) )
+ ( implies ( and ( not x701 ) ( and ( not x700 ) true ) ) ( = tmp346 0 ) )
+ ( implies ( and ( not x701 ) ( and x700 true ) ) ( = tmp346 6 ) )
+ ( implies ( and x701 ( and ( not x700 ) true ) ) ( = tmp346 8 ) )
+ ( implies ( and x701 ( and x700 true ) ) ( = tmp346 14 ) )
+ ( implies ( and ( not x675 ) ( and ( not x676 ) true ) ) ( = tmp345 0 ) )
+ ( implies ( and ( not x675 ) ( and x676 true ) ) ( = tmp345 8 ) )
+ ( implies ( and x675 ( and ( not x676 ) true ) ) ( = tmp345 8 ) )
+ ( implies ( and x675 ( and x676 true ) ) ( = tmp345 16 ) )
+ ( implies ( and ( not x703 ) ( and ( not x702 ) true ) ) ( = tmp344 0 ) )
+ ( implies ( and ( not x703 ) ( and x702 true ) ) ( = tmp344 6 ) )
+ ( implies ( and x703 ( and ( not x702 ) true ) ) ( = tmp344 6 ) )
+ ( implies ( and x703 ( and x702 true ) ) ( = tmp344 12 ) )
+ ( implies ( and ( not x673 ) ( and ( not x674 ) true ) ) ( = tmp343 0 ) )
+ ( implies ( and ( not x673 ) ( and x674 true ) ) ( = tmp343 8 ) )
+ ( implies ( and x673 ( and ( not x674 ) true ) ) ( = tmp343 8 ) )
+ ( implies ( and x673 ( and x674 true ) ) ( = tmp343 16 ) )
+ ( implies ( and ( not x705 ) ( and ( not x704 ) true ) ) ( = tmp342 0 ) )
+ ( implies ( and ( not x705 ) ( and x704 true ) ) ( = tmp342 4 ) )
+ ( implies ( and x705 ( and ( not x704 ) true ) ) ( = tmp342 2 ) )
+ ( implies ( and x705 ( and x704 true ) ) ( = tmp342 6 ) )
+ ( implies ( and ( not x671 ) ( and ( not x672 ) true ) ) ( = tmp341 0 ) )
+ ( implies ( and ( not x671 ) ( and x672 true ) ) ( = tmp341 8 ) )
+ ( implies ( and x671 ( and ( not x672 ) true ) ) ( = tmp341 8 ) )
+ ( implies ( and x671 ( and x672 true ) ) ( = tmp341 16 ) )
+ ( implies ( and ( not x707 ) ( and ( not x706 ) true ) ) ( = tmp340 0 ) )
+ ( implies ( and ( not x707 ) ( and x706 true ) ) ( = tmp340 2 ) )
+ ( implies ( and x707 ( and ( not x706 ) true ) ) ( = tmp340 4 ) )
+ ( implies ( and x707 ( and x706 true ) ) ( = tmp340 6 ) )
+ ( implies ( and ( not x669 ) ( and ( not x670 ) true ) ) ( = tmp339 0 ) )
+ ( implies ( and ( not x669 ) ( and x670 true ) ) ( = tmp339 8 ) )
+ ( implies ( and x669 ( and ( not x670 ) true ) ) ( = tmp339 8 ) )
+ ( implies ( and x669 ( and x670 true ) ) ( = tmp339 16 ) )
+ ( implies ( and ( not x709 ) ( and ( not x708 ) true ) ) ( = tmp338 0 ) )
+ ( implies ( and ( not x709 ) ( and x708 true ) ) ( = tmp338 6 ) )
+ ( implies ( and x709 ( and ( not x708 ) true ) ) ( = tmp338 6 ) )
+ ( implies ( and x709 ( and x708 true ) ) ( = tmp338 12 ) )
+ ( implies ( and ( not x667 ) ( and ( not x668 ) true ) ) ( = tmp337 0 ) )
+ ( implies ( and ( not x667 ) ( and x668 true ) ) ( = tmp337 8 ) )
+ ( implies ( and x667 ( and ( not x668 ) true ) ) ( = tmp337 8 ) )
+ ( implies ( and x667 ( and x668 true ) ) ( = tmp337 16 ) )
+ ( implies ( and ( not x711 ) ( and ( not x710 ) true ) ) ( = tmp336 0 ) )
+ ( implies ( and ( not x711 ) ( and x710 true ) ) ( = tmp336 6 ) )
+ ( implies ( and x711 ( and ( not x710 ) true ) ) ( = tmp336 6 ) )
+ ( implies ( and x711 ( and x710 true ) ) ( = tmp336 12 ) )
+ ( implies ( and ( not x665 ) ( and ( not x666 ) true ) ) ( = tmp335 0 ) )
+ ( implies ( and ( not x665 ) ( and x666 true ) ) ( = tmp335 8 ) )
+ ( implies ( and x665 ( and ( not x666 ) true ) ) ( = tmp335 8 ) )
+ ( implies ( and x665 ( and x666 true ) ) ( = tmp335 16 ) )
+ ( implies ( and ( not x642 ) ( and ( not x641 ) true ) ) ( = tmp334 0 ) )
+ ( implies ( and ( not x642 ) ( and x641 true ) ) ( = tmp334 6 ) )
+ ( implies ( and x642 ( and ( not x641 ) true ) ) ( = tmp334 8 ) )
+ ( implies ( and x642 ( and x641 true ) ) ( = tmp334 14 ) )
+ ( implies ( and ( not x639 ) ( and ( not x640 ) true ) ) ( = tmp333 0 ) )
+ ( implies ( and ( not x639 ) ( and x640 true ) ) ( = tmp333 6 ) )
+ ( implies ( and x639 ( and ( not x640 ) true ) ) ( = tmp333 6 ) )
+ ( implies ( and x639 ( and x640 true ) ) ( = tmp333 12 ) )
+ ( implies ( and ( not x644 ) ( and ( not x643 ) true ) ) ( = tmp332 0 ) )
+ ( implies ( and ( not x644 ) ( and x643 true ) ) ( = tmp332 8 ) )
+ ( implies ( and x644 ( and ( not x643 ) true ) ) ( = tmp332 8 ) )
+ ( implies ( and x644 ( and x643 true ) ) ( = tmp332 16 ) )
+ ( implies ( and ( not x637 ) ( and ( not x638 ) true ) ) ( = tmp331 0 ) )
+ ( implies ( and ( not x637 ) ( and x638 true ) ) ( = tmp331 6 ) )
+ ( implies ( and x637 ( and ( not x638 ) true ) ) ( = tmp331 6 ) )
+ ( implies ( and x637 ( and x638 true ) ) ( = tmp331 12 ) )
+ ( implies ( and ( not x646 ) ( and ( not x645 ) true ) ) ( = tmp330 0 ) )
+ ( implies ( and ( not x646 ) ( and x645 true ) ) ( = tmp330 8 ) )
+ ( implies ( and x646 ( and ( not x645 ) true ) ) ( = tmp330 8 ) )
+ ( implies ( and x646 ( and x645 true ) ) ( = tmp330 16 ) )
+ ( implies ( and ( not x635 ) ( and ( not x636 ) true ) ) ( = tmp329 0 ) )
+ ( implies ( and ( not x635 ) ( and x636 true ) ) ( = tmp329 6 ) )
+ ( implies ( and x635 ( and ( not x636 ) true ) ) ( = tmp329 8 ) )
+ ( implies ( and x635 ( and x636 true ) ) ( = tmp329 14 ) )
+ ( implies ( and ( not x648 ) ( and ( not x647 ) true ) ) ( = tmp328 0 ) )
+ ( implies ( and ( not x648 ) ( and x647 true ) ) ( = tmp328 8 ) )
+ ( implies ( and x648 ( and ( not x647 ) true ) ) ( = tmp328 6 ) )
+ ( implies ( and x648 ( and x647 true ) ) ( = tmp328 14 ) )
+ ( implies ( and ( not x633 ) ( and ( not x634 ) true ) ) ( = tmp327 0 ) )
+ ( implies ( and ( not x633 ) ( and x634 true ) ) ( = tmp327 8 ) )
+ ( implies ( and x633 ( and ( not x634 ) true ) ) ( = tmp327 8 ) )
+ ( implies ( and x633 ( and x634 true ) ) ( = tmp327 16 ) )
+ ( implies ( and ( not x650 ) ( and ( not x649 ) true ) ) ( = tmp326 0 ) )
+ ( implies ( and ( not x650 ) ( and x649 true ) ) ( = tmp326 6 ) )
+ ( implies ( and x650 ( and ( not x649 ) true ) ) ( = tmp326 6 ) )
+ ( implies ( and x650 ( and x649 true ) ) ( = tmp326 12 ) )
+ ( implies ( and ( not x631 ) ( and ( not x632 ) true ) ) ( = tmp325 0 ) )
+ ( implies ( and ( not x631 ) ( and x632 true ) ) ( = tmp325 6 ) )
+ ( implies ( and x631 ( and ( not x632 ) true ) ) ( = tmp325 6 ) )
+ ( implies ( and x631 ( and x632 true ) ) ( = tmp325 12 ) )
+ ( implies ( and ( not x652 ) ( and ( not x651 ) true ) ) ( = tmp324 0 ) )
+ ( implies ( and ( not x652 ) ( and x651 true ) ) ( = tmp324 6 ) )
+ ( implies ( and x652 ( and ( not x651 ) true ) ) ( = tmp324 2 ) )
+ ( implies ( and x652 ( and x651 true ) ) ( = tmp324 8 ) )
+ ( implies ( and ( not x629 ) ( and ( not x630 ) true ) ) ( = tmp323 0 ) )
+ ( implies ( and ( not x629 ) ( and x630 true ) ) ( = tmp323 2 ) )
+ ( implies ( and x629 ( and ( not x630 ) true ) ) ( = tmp323 4 ) )
+ ( implies ( and x629 ( and x630 true ) ) ( = tmp323 6 ) )
+ ( implies ( and ( not x654 ) ( and ( not x653 ) true ) ) ( = tmp322 0 ) )
+ ( implies ( and ( not x654 ) ( and x653 true ) ) ( = tmp322 4 ) )
+ ( implies ( and x654 ( and ( not x653 ) true ) ) ( = tmp322 4 ) )
+ ( implies ( and x654 ( and x653 true ) ) ( = tmp322 8 ) )
+ ( implies ( and ( not x627 ) ( and ( not x628 ) true ) ) ( = tmp321 0 ) )
+ ( implies ( and ( not x627 ) ( and x628 true ) ) ( = tmp321 4 ) )
+ ( implies ( and x627 ( and ( not x628 ) true ) ) ( = tmp321 4 ) )
+ ( implies ( and x627 ( and x628 true ) ) ( = tmp321 8 ) )
+ ( implies ( and ( not x656 ) ( and ( not x655 ) true ) ) ( = tmp320 0 ) )
+ ( implies ( and ( not x656 ) ( and x655 true ) ) ( = tmp320 4 ) )
+ ( implies ( and x656 ( and ( not x655 ) true ) ) ( = tmp320 2 ) )
+ ( implies ( and x656 ( and x655 true ) ) ( = tmp320 6 ) )
+ ( implies ( and ( not x625 ) ( and ( not x626 ) true ) ) ( = tmp319 0 ) )
+ ( implies ( and ( not x625 ) ( and x626 true ) ) ( = tmp319 4 ) )
+ ( implies ( and x625 ( and ( not x626 ) true ) ) ( = tmp319 6 ) )
+ ( implies ( and x625 ( and x626 true ) ) ( = tmp319 10 ) )
+ ( implies ( and ( not x658 ) ( and ( not x657 ) true ) ) ( = tmp318 0 ) )
+ ( implies ( and ( not x658 ) ( and x657 true ) ) ( = tmp318 4 ) )
+ ( implies ( and x658 ( and ( not x657 ) true ) ) ( = tmp318 6 ) )
+ ( implies ( and x658 ( and x657 true ) ) ( = tmp318 10 ) )
+ ( implies ( and ( not x623 ) ( and ( not x624 ) true ) ) ( = tmp317 0 ) )
+ ( implies ( and ( not x623 ) ( and x624 true ) ) ( = tmp317 6 ) )
+ ( implies ( and x623 ( and ( not x624 ) true ) ) ( = tmp317 8 ) )
+ ( implies ( and x623 ( and x624 true ) ) ( = tmp317 14 ) )
+ ( implies ( and ( not x660 ) ( and ( not x659 ) true ) ) ( = tmp316 0 ) )
+ ( implies ( and ( not x660 ) ( and x659 true ) ) ( = tmp316 8 ) )
+ ( implies ( and x660 ( and ( not x659 ) true ) ) ( = tmp316 6 ) )
+ ( implies ( and x660 ( and x659 true ) ) ( = tmp316 14 ) )
+ ( implies ( and ( not x621 ) ( and ( not x622 ) true ) ) ( = tmp315 0 ) )
+ ( implies ( and ( not x621 ) ( and x622 true ) ) ( = tmp315 6 ) )
+ ( implies ( and x621 ( and ( not x622 ) true ) ) ( = tmp315 6 ) )
+ ( implies ( and x621 ( and x622 true ) ) ( = tmp315 12 ) )
+ ( implies ( and ( not x662 ) ( and ( not x661 ) true ) ) ( = tmp314 0 ) )
+ ( implies ( and ( not x662 ) ( and x661 true ) ) ( = tmp314 6 ) )
+ ( implies ( and x662 ( and ( not x661 ) true ) ) ( = tmp314 6 ) )
+ ( implies ( and x662 ( and x661 true ) ) ( = tmp314 12 ) )
+ ( implies ( and ( not x619 ) ( and ( not x620 ) true ) ) ( = tmp313 0 ) )
+ ( implies ( and ( not x619 ) ( and x620 true ) ) ( = tmp313 6 ) )
+ ( implies ( and x619 ( and ( not x620 ) true ) ) ( = tmp313 8 ) )
+ ( implies ( and x619 ( and x620 true ) ) ( = tmp313 14 ) )
+ ( implies ( and ( not x664 ) ( and ( not x663 ) true ) ) ( = tmp312 0 ) )
+ ( implies ( and ( not x664 ) ( and x663 true ) ) ( = tmp312 6 ) )
+ ( implies ( and x664 ( and ( not x663 ) true ) ) ( = tmp312 6 ) )
+ ( implies ( and x664 ( and x663 true ) ) ( = tmp312 12 ) )
+ ( implies ( and ( not x617 ) ( and ( not x618 ) true ) ) ( = tmp311 0 ) )
+ ( implies ( and ( not x617 ) ( and x618 true ) ) ( = tmp311 8 ) )
+ ( implies ( and x617 ( and ( not x618 ) true ) ) ( = tmp311 8 ) )
+ ( implies ( and x617 ( and x618 true ) ) ( = tmp311 16 ) )
+ ( implies ( and ( not x594 ) true ) ( = tmp310 0 ) )
+ ( implies ( and x594 true ) ( = tmp310 1 ) )
+ ( implies ( and ( not x592 ) ( and ( not x593 ) true ) ) ( = tmp309 0 ) )
+ ( implies ( and ( not x592 ) ( and x593 true ) ) ( = tmp309 2 ) )
+ ( implies ( and x592 ( and ( not x593 ) true ) ) ( = tmp309 4 ) )
+ ( implies ( and x592 ( and x593 true ) ) ( = tmp309 6 ) )
+ ( implies ( and ( not x596 ) ( and ( not x595 ) true ) ) ( = tmp308 0 ) )
+ ( implies ( and ( not x596 ) ( and x595 true ) ) ( = tmp308 1 ) )
+ ( implies ( and x596 ( and ( not x595 ) true ) ) ( = tmp308 4 ) )
+ ( implies ( and x596 ( and x595 true ) ) ( = tmp308 5 ) )
+ ( implies ( and ( not x590 ) ( and ( not x591 ) true ) ) ( = tmp307 0 ) )
+ ( implies ( and ( not x590 ) ( and x591 true ) ) ( = tmp307 4 ) )
+ ( implies ( and x590 ( and ( not x591 ) true ) ) ( = tmp307 4 ) )
+ ( implies ( and x590 ( and x591 true ) ) ( = tmp307 8 ) )
+ ( implies ( and ( not x598 ) ( and ( not x597 ) true ) ) ( = tmp306 0 ) )
+ ( implies ( and ( not x598 ) ( and x597 true ) ) ( = tmp306 4 ) )
+ ( implies ( and x598 ( and ( not x597 ) true ) ) ( = tmp306 4 ) )
+ ( implies ( and x598 ( and x597 true ) ) ( = tmp306 8 ) )
+ ( implies ( and ( not x588 ) ( and ( not x589 ) true ) ) ( = tmp305 0 ) )
+ ( implies ( and ( not x588 ) ( and x589 true ) ) ( = tmp305 2 ) )
+ ( implies ( and x588 ( and ( not x589 ) true ) ) ( = tmp305 4 ) )
+ ( implies ( and x588 ( and x589 true ) ) ( = tmp305 6 ) )
+ ( implies ( and ( not x600 ) ( and ( not x599 ) true ) ) ( = tmp304 0 ) )
+ ( implies ( and ( not x600 ) ( and x599 true ) ) ( = tmp304 4 ) )
+ ( implies ( and x600 ( and ( not x599 ) true ) ) ( = tmp304 4 ) )
+ ( implies ( and x600 ( and x599 true ) ) ( = tmp304 8 ) )
+ ( implies ( and ( not x586 ) ( and ( not x587 ) true ) ) ( = tmp303 0 ) )
+ ( implies ( and ( not x586 ) ( and x587 true ) ) ( = tmp303 6 ) )
+ ( implies ( and x586 ( and ( not x587 ) true ) ) ( = tmp303 6 ) )
+ ( implies ( and x586 ( and x587 true ) ) ( = tmp303 12 ) )
+ ( implies ( and ( not x602 ) ( and ( not x601 ) true ) ) ( = tmp302 0 ) )
+ ( implies ( and ( not x602 ) ( and x601 true ) ) ( = tmp302 6 ) )
+ ( implies ( and x602 ( and ( not x601 ) true ) ) ( = tmp302 6 ) )
+ ( implies ( and x602 ( and x601 true ) ) ( = tmp302 12 ) )
+ ( implies ( and ( not x584 ) ( and ( not x585 ) true ) ) ( = tmp301 0 ) )
+ ( implies ( and ( not x584 ) ( and x585 true ) ) ( = tmp301 6 ) )
+ ( implies ( and x584 ( and ( not x585 ) true ) ) ( = tmp301 8 ) )
+ ( implies ( and x584 ( and x585 true ) ) ( = tmp301 14 ) )
+ ( implies ( and ( not x604 ) ( and ( not x603 ) true ) ) ( = tmp300 0 ) )
+ ( implies ( and ( not x604 ) ( and x603 true ) ) ( = tmp300 6 ) )
+ ( implies ( and x604 ( and ( not x603 ) true ) ) ( = tmp300 6 ) )
+ ( implies ( and x604 ( and x603 true ) ) ( = tmp300 12 ) )
+ ( implies ( and ( not x582 ) ( and ( not x583 ) true ) ) ( = tmp299 0 ) )
+ ( implies ( and ( not x582 ) ( and x583 true ) ) ( = tmp299 8 ) )
+ ( implies ( and x582 ( and ( not x583 ) true ) ) ( = tmp299 8 ) )
+ ( implies ( and x582 ( and x583 true ) ) ( = tmp299 16 ) )
+ ( implies ( and ( not x606 ) ( and ( not x605 ) true ) ) ( = tmp298 0 ) )
+ ( implies ( and ( not x606 ) ( and x605 true ) ) ( = tmp298 6 ) )
+ ( implies ( and x606 ( and ( not x605 ) true ) ) ( = tmp298 6 ) )
+ ( implies ( and x606 ( and x605 true ) ) ( = tmp298 12 ) )
+ ( implies ( and ( not x580 ) ( and ( not x581 ) true ) ) ( = tmp297 0 ) )
+ ( implies ( and ( not x580 ) ( and x581 true ) ) ( = tmp297 6 ) )
+ ( implies ( and x580 ( and ( not x581 ) true ) ) ( = tmp297 6 ) )
+ ( implies ( and x580 ( and x581 true ) ) ( = tmp297 12 ) )
+ ( implies ( and ( not x608 ) ( and ( not x607 ) true ) ) ( = tmp296 0 ) )
+ ( implies ( and ( not x608 ) ( and x607 true ) ) ( = tmp296 6 ) )
+ ( implies ( and x608 ( and ( not x607 ) true ) ) ( = tmp296 4 ) )
+ ( implies ( and x608 ( and x607 true ) ) ( = tmp296 10 ) )
+ ( implies ( and ( not x578 ) ( and ( not x579 ) true ) ) ( = tmp295 0 ) )
+ ( implies ( and ( not x578 ) ( and x579 true ) ) ( = tmp295 6 ) )
+ ( implies ( and x578 ( and ( not x579 ) true ) ) ( = tmp295 6 ) )
+ ( implies ( and x578 ( and x579 true ) ) ( = tmp295 12 ) )
+ ( implies ( and ( not x610 ) ( and ( not x609 ) true ) ) ( = tmp294 0 ) )
+ ( implies ( and ( not x610 ) ( and x609 true ) ) ( = tmp294 2 ) )
+ ( implies ( and x610 ( and ( not x609 ) true ) ) ( = tmp294 2 ) )
+ ( implies ( and x610 ( and x609 true ) ) ( = tmp294 4 ) )
+ ( implies ( and ( not x576 ) ( and ( not x577 ) true ) ) ( = tmp293 0 ) )
+ ( implies ( and ( not x576 ) ( and x577 true ) ) ( = tmp293 6 ) )
+ ( implies ( and x576 ( and ( not x577 ) true ) ) ( = tmp293 6 ) )
+ ( implies ( and x576 ( and x577 true ) ) ( = tmp293 12 ) )
+ ( implies ( and ( not x612 ) ( and ( not x611 ) true ) ) ( = tmp292 0 ) )
+ ( implies ( and ( not x612 ) ( and x611 true ) ) ( = tmp292 4 ) )
+ ( implies ( and x612 ( and ( not x611 ) true ) ) ( = tmp292 4 ) )
+ ( implies ( and x612 ( and x611 true ) ) ( = tmp292 8 ) )
+ ( implies ( and ( not x574 ) ( and ( not x575 ) true ) ) ( = tmp291 0 ) )
+ ( implies ( and ( not x574 ) ( and x575 true ) ) ( = tmp291 6 ) )
+ ( implies ( and x574 ( and ( not x575 ) true ) ) ( = tmp291 6 ) )
+ ( implies ( and x574 ( and x575 true ) ) ( = tmp291 12 ) )
+ ( implies ( and ( not x614 ) ( and ( not x613 ) true ) ) ( = tmp290 0 ) )
+ ( implies ( and ( not x614 ) ( and x613 true ) ) ( = tmp290 4 ) )
+ ( implies ( and x614 ( and ( not x613 ) true ) ) ( = tmp290 4 ) )
+ ( implies ( and x614 ( and x613 true ) ) ( = tmp290 8 ) )
+ ( implies ( and ( not x572 ) ( and ( not x573 ) true ) ) ( = tmp289 0 ) )
+ ( implies ( and ( not x572 ) ( and x573 true ) ) ( = tmp289 4 ) )
+ ( implies ( and x572 ( and ( not x573 ) true ) ) ( = tmp289 4 ) )
+ ( implies ( and x572 ( and x573 true ) ) ( = tmp289 8 ) )
+ ( implies ( and ( not x616 ) ( and ( not x615 ) true ) ) ( = tmp288 0 ) )
+ ( implies ( and ( not x616 ) ( and x615 true ) ) ( = tmp288 4 ) )
+ ( implies ( and x616 ( and ( not x615 ) true ) ) ( = tmp288 4 ) )
+ ( implies ( and x616 ( and x615 true ) ) ( = tmp288 8 ) )
+ ( implies ( and ( not x570 ) ( and ( not x571 ) true ) ) ( = tmp287 0 ) )
+ ( implies ( and ( not x570 ) ( and x571 true ) ) ( = tmp287 6 ) )
+ ( implies ( and x570 ( and ( not x571 ) true ) ) ( = tmp287 6 ) )
+ ( implies ( and x570 ( and x571 true ) ) ( = tmp287 12 ) )
+ ( implies ( and ( not x547 ) ( and ( not x546 ) true ) ) ( = tmp286 0 ) )
+ ( implies ( and ( not x547 ) ( and x546 true ) ) ( = tmp286 6 ) )
+ ( implies ( and x547 ( and ( not x546 ) true ) ) ( = tmp286 6 ) )
+ ( implies ( and x547 ( and x546 true ) ) ( = tmp286 12 ) )
+ ( implies ( and ( not x544 ) ( and ( not x545 ) true ) ) ( = tmp285 0 ) )
+ ( implies ( and ( not x544 ) ( and x545 true ) ) ( = tmp285 6 ) )
+ ( implies ( and x544 ( and ( not x545 ) true ) ) ( = tmp285 4 ) )
+ ( implies ( and x544 ( and x545 true ) ) ( = tmp285 10 ) )
+ ( implies ( and ( not x549 ) ( and ( not x548 ) true ) ) ( = tmp284 0 ) )
+ ( implies ( and ( not x549 ) ( and x548 true ) ) ( = tmp284 6 ) )
+ ( implies ( and x549 ( and ( not x548 ) true ) ) ( = tmp284 6 ) )
+ ( implies ( and x549 ( and x548 true ) ) ( = tmp284 12 ) )
+ ( implies ( and ( not x542 ) ( and ( not x543 ) true ) ) ( = tmp283 0 ) )
+ ( implies ( and ( not x542 ) ( and x543 true ) ) ( = tmp283 4 ) )
+ ( implies ( and x542 ( and ( not x543 ) true ) ) ( = tmp283 4 ) )
+ ( implies ( and x542 ( and x543 true ) ) ( = tmp283 8 ) )
+ ( implies ( and ( not x551 ) ( and ( not x550 ) true ) ) ( = tmp282 0 ) )
+ ( implies ( and ( not x551 ) ( and x550 true ) ) ( = tmp282 6 ) )
+ ( implies ( and x551 ( and ( not x550 ) true ) ) ( = tmp282 6 ) )
+ ( implies ( and x551 ( and x550 true ) ) ( = tmp282 12 ) )
+ ( implies ( and ( not x540 ) ( and ( not x541 ) true ) ) ( = tmp281 0 ) )
+ ( implies ( and ( not x540 ) ( and x541 true ) ) ( = tmp281 2 ) )
+ ( implies ( and x540 ( and ( not x541 ) true ) ) ( = tmp281 2 ) )
+ ( implies ( and x540 ( and x541 true ) ) ( = tmp281 4 ) )
+ ( implies ( and ( not x553 ) ( and ( not x552 ) true ) ) ( = tmp280 0 ) )
+ ( implies ( and ( not x553 ) ( and x552 true ) ) ( = tmp280 8 ) )
+ ( implies ( and x553 ( and ( not x552 ) true ) ) ( = tmp280 8 ) )
+ ( implies ( and x553 ( and x552 true ) ) ( = tmp280 16 ) )
+ ( implies ( and ( not x538 ) ( and ( not x539 ) true ) ) ( = tmp279 0 ) )
+ ( implies ( and ( not x538 ) ( and x539 true ) ) ( = tmp279 2 ) )
+ ( implies ( and x538 ( and ( not x539 ) true ) ) ( = tmp279 2 ) )
+ ( implies ( and x538 ( and x539 true ) ) ( = tmp279 4 ) )
+ ( implies ( and ( not x555 ) ( and ( not x554 ) true ) ) ( = tmp278 0 ) )
+ ( implies ( and ( not x555 ) ( and x554 true ) ) ( = tmp278 8 ) )
+ ( implies ( and x555 ( and ( not x554 ) true ) ) ( = tmp278 6 ) )
+ ( implies ( and x555 ( and x554 true ) ) ( = tmp278 14 ) )
+ ( implies ( and ( not x536 ) ( and ( not x537 ) true ) ) ( = tmp277 0 ) )
+ ( implies ( and ( not x536 ) ( and x537 true ) ) ( = tmp277 2 ) )
+ ( implies ( and x536 ( and ( not x537 ) true ) ) ( = tmp277 2 ) )
+ ( implies ( and x536 ( and x537 true ) ) ( = tmp277 4 ) )
+ ( implies ( and ( not x557 ) ( and ( not x556 ) true ) ) ( = tmp276 0 ) )
+ ( implies ( and ( not x557 ) ( and x556 true ) ) ( = tmp276 6 ) )
+ ( implies ( and x557 ( and ( not x556 ) true ) ) ( = tmp276 6 ) )
+ ( implies ( and x557 ( and x556 true ) ) ( = tmp276 12 ) )
+ ( implies ( and ( not x534 ) ( and ( not x535 ) true ) ) ( = tmp275 0 ) )
+ ( implies ( and ( not x534 ) ( and x535 true ) ) ( = tmp275 2 ) )
+ ( implies ( and x534 ( and ( not x535 ) true ) ) ( = tmp275 2 ) )
+ ( implies ( and x534 ( and x535 true ) ) ( = tmp275 4 ) )
+ ( implies ( and ( not x559 ) ( and ( not x558 ) true ) ) ( = tmp274 0 ) )
+ ( implies ( and ( not x559 ) ( and x558 true ) ) ( = tmp274 6 ) )
+ ( implies ( and x559 ( and ( not x558 ) true ) ) ( = tmp274 6 ) )
+ ( implies ( and x559 ( and x558 true ) ) ( = tmp274 12 ) )
+ ( implies ( and ( not x532 ) ( and ( not x533 ) true ) ) ( = tmp273 0 ) )
+ ( implies ( and ( not x532 ) ( and x533 true ) ) ( = tmp273 4 ) )
+ ( implies ( and x532 ( and ( not x533 ) true ) ) ( = tmp273 4 ) )
+ ( implies ( and x532 ( and x533 true ) ) ( = tmp273 8 ) )
+ ( implies ( and ( not x561 ) ( and ( not x560 ) true ) ) ( = tmp272 0 ) )
+ ( implies ( and ( not x561 ) ( and x560 true ) ) ( = tmp272 6 ) )
+ ( implies ( and x561 ( and ( not x560 ) true ) ) ( = tmp272 6 ) )
+ ( implies ( and x561 ( and x560 true ) ) ( = tmp272 12 ) )
+ ( implies ( and ( not x530 ) ( and ( not x531 ) true ) ) ( = tmp271 0 ) )
+ ( implies ( and ( not x530 ) ( and x531 true ) ) ( = tmp271 6 ) )
+ ( implies ( and x530 ( and ( not x531 ) true ) ) ( = tmp271 6 ) )
+ ( implies ( and x530 ( and x531 true ) ) ( = tmp271 12 ) )
+ ( implies ( and ( not x563 ) ( and ( not x562 ) true ) ) ( = tmp270 0 ) )
+ ( implies ( and ( not x563 ) ( and x562 true ) ) ( = tmp270 8 ) )
+ ( implies ( and x563 ( and ( not x562 ) true ) ) ( = tmp270 8 ) )
+ ( implies ( and x563 ( and x562 true ) ) ( = tmp270 16 ) )
+ ( implies ( and ( not x528 ) ( and ( not x529 ) true ) ) ( = tmp269 0 ) )
+ ( implies ( and ( not x528 ) ( and x529 true ) ) ( = tmp269 6 ) )
+ ( implies ( and x528 ( and ( not x529 ) true ) ) ( = tmp269 8 ) )
+ ( implies ( and x528 ( and x529 true ) ) ( = tmp269 14 ) )
+ ( implies ( and ( not x565 ) ( and ( not x564 ) true ) ) ( = tmp268 0 ) )
+ ( implies ( and ( not x565 ) ( and x564 true ) ) ( = tmp268 6 ) )
+ ( implies ( and x565 ( and ( not x564 ) true ) ) ( = tmp268 6 ) )
+ ( implies ( and x565 ( and x564 true ) ) ( = tmp268 12 ) )
+ ( implies ( and ( not x526 ) ( and ( not x527 ) true ) ) ( = tmp267 0 ) )
+ ( implies ( and ( not x526 ) ( and x527 true ) ) ( = tmp267 8 ) )
+ ( implies ( and x526 ( and ( not x527 ) true ) ) ( = tmp267 8 ) )
+ ( implies ( and x526 ( and x527 true ) ) ( = tmp267 16 ) )
+ ( implies ( and ( not x567 ) ( and ( not x566 ) true ) ) ( = tmp266 0 ) )
+ ( implies ( and ( not x567 ) ( and x566 true ) ) ( = tmp266 6 ) )
+ ( implies ( and x567 ( and ( not x566 ) true ) ) ( = tmp266 6 ) )
+ ( implies ( and x567 ( and x566 true ) ) ( = tmp266 12 ) )
+ ( implies ( and ( not x524 ) ( and ( not x525 ) true ) ) ( = tmp265 0 ) )
+ ( implies ( and ( not x524 ) ( and x525 true ) ) ( = tmp265 8 ) )
+ ( implies ( and x524 ( and ( not x525 ) true ) ) ( = tmp265 8 ) )
+ ( implies ( and x524 ( and x525 true ) ) ( = tmp265 16 ) )
+ ( implies ( and ( not x569 ) ( and ( not x568 ) true ) ) ( = tmp264 0 ) )
+ ( implies ( and ( not x569 ) ( and x568 true ) ) ( = tmp264 4 ) )
+ ( implies ( and x569 ( and ( not x568 ) true ) ) ( = tmp264 6 ) )
+ ( implies ( and x569 ( and x568 true ) ) ( = tmp264 10 ) )
+ ( implies ( and ( not x522 ) ( and ( not x523 ) true ) ) ( = tmp263 0 ) )
+ ( implies ( and ( not x522 ) ( and x523 true ) ) ( = tmp263 6 ) )
+ ( implies ( and x522 ( and ( not x523 ) true ) ) ( = tmp263 6 ) )
+ ( implies ( and x522 ( and x523 true ) ) ( = tmp263 12 ) )
+ ( implies ( and ( not x499 ) true ) ( = tmp262 0 ) )
+ ( implies ( and x499 true ) ( = tmp262 2 ) )
+ ( implies ( and ( not x497 ) ( and ( not x498 ) true ) ) ( = tmp261 0 ) )
+ ( implies ( and ( not x497 ) ( and x498 true ) ) ( = tmp261 2 ) )
+ ( implies ( and x497 ( and ( not x498 ) true ) ) ( = tmp261 4 ) )
+ ( implies ( and x497 ( and x498 true ) ) ( = tmp261 6 ) )
+ ( implies ( and ( not x501 ) ( and ( not x500 ) true ) ) ( = tmp260 0 ) )
+ ( implies ( and ( not x501 ) ( and x500 true ) ) ( = tmp260 4 ) )
+ ( implies ( and x501 ( and ( not x500 ) true ) ) ( = tmp260 4 ) )
+ ( implies ( and x501 ( and x500 true ) ) ( = tmp260 8 ) )
+ ( implies ( and ( not x495 ) ( and ( not x496 ) true ) ) ( = tmp259 0 ) )
+ ( implies ( and ( not x495 ) ( and x496 true ) ) ( = tmp259 4 ) )
+ ( implies ( and x495 ( and ( not x496 ) true ) ) ( = tmp259 2 ) )
+ ( implies ( and x495 ( and x496 true ) ) ( = tmp259 6 ) )
+ ( implies ( and ( not x503 ) ( and ( not x502 ) true ) ) ( = tmp258 0 ) )
+ ( implies ( and ( not x503 ) ( and x502 true ) ) ( = tmp258 4 ) )
+ ( implies ( and x503 ( and ( not x502 ) true ) ) ( = tmp258 4 ) )
+ ( implies ( and x503 ( and x502 true ) ) ( = tmp258 8 ) )
+ ( implies ( and ( not x493 ) ( and ( not x494 ) true ) ) ( = tmp257 0 ) )
+ ( implies ( and ( not x493 ) ( and x494 true ) ) ( = tmp257 2 ) )
+ ( implies ( and x493 ( and ( not x494 ) true ) ) ( = tmp257 4 ) )
+ ( implies ( and x493 ( and x494 true ) ) ( = tmp257 6 ) )
+ ( implies ( and ( not x505 ) ( and ( not x504 ) true ) ) ( = tmp256 0 ) )
+ ( implies ( and ( not x505 ) ( and x504 true ) ) ( = tmp256 2 ) )
+ ( implies ( and x505 ( and ( not x504 ) true ) ) ( = tmp256 2 ) )
+ ( implies ( and x505 ( and x504 true ) ) ( = tmp256 4 ) )
+ ( implies ( and ( not x491 ) ( and ( not x492 ) true ) ) ( = tmp255 0 ) )
+ ( implies ( and ( not x491 ) ( and x492 true ) ) ( = tmp255 6 ) )
+ ( implies ( and x491 ( and ( not x492 ) true ) ) ( = tmp255 6 ) )
+ ( implies ( and x491 ( and x492 true ) ) ( = tmp255 12 ) )
+ ( implies ( and ( not x507 ) ( and ( not x506 ) true ) ) ( = tmp254 0 ) )
+ ( implies ( and ( not x507 ) ( and x506 true ) ) ( = tmp254 4 ) )
+ ( implies ( and x507 ( and ( not x506 ) true ) ) ( = tmp254 6 ) )
+ ( implies ( and x507 ( and x506 true ) ) ( = tmp254 10 ) )
+ ( implies ( and ( not x489 ) ( and ( not x490 ) true ) ) ( = tmp253 0 ) )
+ ( implies ( and ( not x489 ) ( and x490 true ) ) ( = tmp253 6 ) )
+ ( implies ( and x489 ( and ( not x490 ) true ) ) ( = tmp253 6 ) )
+ ( implies ( and x489 ( and x490 true ) ) ( = tmp253 12 ) )
+ ( implies ( and ( not x509 ) ( and ( not x508 ) true ) ) ( = tmp252 0 ) )
+ ( implies ( and ( not x509 ) ( and x508 true ) ) ( = tmp252 4 ) )
+ ( implies ( and x509 ( and ( not x508 ) true ) ) ( = tmp252 4 ) )
+ ( implies ( and x509 ( and x508 true ) ) ( = tmp252 8 ) )
+ ( implies ( and ( not x487 ) ( and ( not x488 ) true ) ) ( = tmp251 0 ) )
+ ( implies ( and ( not x487 ) ( and x488 true ) ) ( = tmp251 6 ) )
+ ( implies ( and x487 ( and ( not x488 ) true ) ) ( = tmp251 6 ) )
+ ( implies ( and x487 ( and x488 true ) ) ( = tmp251 12 ) )
+ ( implies ( and ( not x511 ) ( and ( not x510 ) true ) ) ( = tmp250 0 ) )
+ ( implies ( and ( not x511 ) ( and x510 true ) ) ( = tmp250 6 ) )
+ ( implies ( and x511 ( and ( not x510 ) true ) ) ( = tmp250 6 ) )
+ ( implies ( and x511 ( and x510 true ) ) ( = tmp250 12 ) )
+ ( implies ( and ( not x485 ) ( and ( not x486 ) true ) ) ( = tmp249 0 ) )
+ ( implies ( and ( not x485 ) ( and x486 true ) ) ( = tmp249 6 ) )
+ ( implies ( and x485 ( and ( not x486 ) true ) ) ( = tmp249 4 ) )
+ ( implies ( and x485 ( and x486 true ) ) ( = tmp249 10 ) )
+ ( implies ( and ( not x513 ) ( and ( not x512 ) true ) ) ( = tmp248 0 ) )
+ ( implies ( and ( not x513 ) ( and x512 true ) ) ( = tmp248 6 ) )
+ ( implies ( and x513 ( and ( not x512 ) true ) ) ( = tmp248 6 ) )
+ ( implies ( and x513 ( and x512 true ) ) ( = tmp248 12 ) )
+ ( implies ( and ( not x483 ) ( and ( not x484 ) true ) ) ( = tmp247 0 ) )
+ ( implies ( and ( not x483 ) ( and x484 true ) ) ( = tmp247 4 ) )
+ ( implies ( and x483 ( and ( not x484 ) true ) ) ( = tmp247 2 ) )
+ ( implies ( and x483 ( and x484 true ) ) ( = tmp247 6 ) )
+ ( implies ( and ( not x515 ) ( and ( not x514 ) true ) ) ( = tmp246 0 ) )
+ ( implies ( and ( not x515 ) ( and x514 true ) ) ( = tmp246 4 ) )
+ ( implies ( and x515 ( and ( not x514 ) true ) ) ( = tmp246 6 ) )
+ ( implies ( and x515 ( and x514 true ) ) ( = tmp246 10 ) )
+ ( implies ( and ( not x481 ) ( and ( not x482 ) true ) ) ( = tmp245 0 ) )
+ ( implies ( and ( not x481 ) ( and x482 true ) ) ( = tmp245 2 ) )
+ ( implies ( and x481 ( and ( not x482 ) true ) ) ( = tmp245 4 ) )
+ ( implies ( and x481 ( and x482 true ) ) ( = tmp245 6 ) )
+ ( implies ( and ( not x517 ) ( and ( not x516 ) true ) ) ( = tmp244 0 ) )
+ ( implies ( and ( not x517 ) ( and x516 true ) ) ( = tmp244 6 ) )
+ ( implies ( and x517 ( and ( not x516 ) true ) ) ( = tmp244 6 ) )
+ ( implies ( and x517 ( and x516 true ) ) ( = tmp244 12 ) )
+ ( implies ( and ( not x479 ) ( and ( not x480 ) true ) ) ( = tmp243 0 ) )
+ ( implies ( and ( not x479 ) ( and x480 true ) ) ( = tmp243 4 ) )
+ ( implies ( and x479 ( and ( not x480 ) true ) ) ( = tmp243 2 ) )
+ ( implies ( and x479 ( and x480 true ) ) ( = tmp243 6 ) )
+ ( implies ( and ( not x519 ) ( and ( not x518 ) true ) ) ( = tmp242 0 ) )
+ ( implies ( and ( not x519 ) ( and x518 true ) ) ( = tmp242 6 ) )
+ ( implies ( and x519 ( and ( not x518 ) true ) ) ( = tmp242 8 ) )
+ ( implies ( and x519 ( and x518 true ) ) ( = tmp242 14 ) )
+ ( implies ( and ( not x477 ) ( and ( not x478 ) true ) ) ( = tmp241 0 ) )
+ ( implies ( and ( not x477 ) ( and x478 true ) ) ( = tmp241 4 ) )
+ ( implies ( and x477 ( and ( not x478 ) true ) ) ( = tmp241 6 ) )
+ ( implies ( and x477 ( and x478 true ) ) ( = tmp241 10 ) )
+ ( implies ( and ( not x521 ) ( and ( not x520 ) true ) ) ( = tmp240 0 ) )
+ ( implies ( and ( not x521 ) ( and x520 true ) ) ( = tmp240 8 ) )
+ ( implies ( and x521 ( and ( not x520 ) true ) ) ( = tmp240 8 ) )
+ ( implies ( and x521 ( and x520 true ) ) ( = tmp240 16 ) )
+ ( implies ( and ( not x475 ) ( and ( not x476 ) true ) ) ( = tmp239 0 ) )
+ ( implies ( and ( not x475 ) ( and x476 true ) ) ( = tmp239 6 ) )
+ ( implies ( and x475 ( and ( not x476 ) true ) ) ( = tmp239 4 ) )
+ ( implies ( and x475 ( and x476 true ) ) ( = tmp239 10 ) )
+ ( implies ( and ( not x452 ) true ) ( = tmp238 0 ) )
+ ( implies ( and x452 true ) ( = tmp238 4 ) )
+ ( implies ( and ( not x450 ) ( and ( not x451 ) true ) ) ( = tmp237 0 ) )
+ ( implies ( and ( not x450 ) ( and x451 true ) ) ( = tmp237 4 ) )
+ ( implies ( and x450 ( and ( not x451 ) true ) ) ( = tmp237 4 ) )
+ ( implies ( and x450 ( and x451 true ) ) ( = tmp237 8 ) )
+ ( implies ( and ( not x454 ) ( and ( not x453 ) true ) ) ( = tmp236 0 ) )
+ ( implies ( and ( not x454 ) ( and x453 true ) ) ( = tmp236 2 ) )
+ ( implies ( and x454 ( and ( not x453 ) true ) ) ( = tmp236 1 ) )
+ ( implies ( and x454 ( and x453 true ) ) ( = tmp236 3 ) )
+ ( implies ( and ( not x448 ) ( and ( not x449 ) true ) ) ( = tmp235 0 ) )
+ ( implies ( and ( not x448 ) ( and x449 true ) ) ( = tmp235 4 ) )
+ ( implies ( and x448 ( and ( not x449 ) true ) ) ( = tmp235 4 ) )
+ ( implies ( and x448 ( and x449 true ) ) ( = tmp235 8 ) )
+ ( implies ( and ( not x456 ) ( and ( not x455 ) true ) ) ( = tmp234 0 ) )
+ ( implies ( and ( not x456 ) ( and x455 true ) ) ( = tmp234 2 ) )
+ ( implies ( and x456 ( and ( not x455 ) true ) ) ( = tmp234 4 ) )
+ ( implies ( and x456 ( and x455 true ) ) ( = tmp234 6 ) )
+ ( implies ( and ( not x446 ) ( and ( not x447 ) true ) ) ( = tmp233 0 ) )
+ ( implies ( and ( not x446 ) ( and x447 true ) ) ( = tmp233 4 ) )
+ ( implies ( and x446 ( and ( not x447 ) true ) ) ( = tmp233 4 ) )
+ ( implies ( and x446 ( and x447 true ) ) ( = tmp233 8 ) )
+ ( implies ( and ( not x458 ) ( and ( not x457 ) true ) ) ( = tmp232 0 ) )
+ ( implies ( and ( not x458 ) ( and x457 true ) ) ( = tmp232 4 ) )
+ ( implies ( and x458 ( and ( not x457 ) true ) ) ( = tmp232 6 ) )
+ ( implies ( and x458 ( and x457 true ) ) ( = tmp232 10 ) )
+ ( implies ( and ( not x444 ) ( and ( not x445 ) true ) ) ( = tmp231 0 ) )
+ ( implies ( and ( not x444 ) ( and x445 true ) ) ( = tmp231 4 ) )
+ ( implies ( and x444 ( and ( not x445 ) true ) ) ( = tmp231 4 ) )
+ ( implies ( and x444 ( and x445 true ) ) ( = tmp231 8 ) )
+ ( implies ( and ( not x460 ) ( and ( not x459 ) true ) ) ( = tmp230 0 ) )
+ ( implies ( and ( not x460 ) ( and x459 true ) ) ( = tmp230 6 ) )
+ ( implies ( and x460 ( and ( not x459 ) true ) ) ( = tmp230 6 ) )
+ ( implies ( and x460 ( and x459 true ) ) ( = tmp230 12 ) )
+ ( implies ( and ( not x442 ) ( and ( not x443 ) true ) ) ( = tmp229 0 ) )
+ ( implies ( and ( not x442 ) ( and x443 true ) ) ( = tmp229 2 ) )
+ ( implies ( and x442 ( and ( not x443 ) true ) ) ( = tmp229 2 ) )
+ ( implies ( and x442 ( and x443 true ) ) ( = tmp229 4 ) )
+ ( implies ( and ( not x462 ) ( and ( not x461 ) true ) ) ( = tmp228 0 ) )
+ ( implies ( and ( not x462 ) ( and x461 true ) ) ( = tmp228 6 ) )
+ ( implies ( and x462 ( and ( not x461 ) true ) ) ( = tmp228 8 ) )
+ ( implies ( and x462 ( and x461 true ) ) ( = tmp228 14 ) )
+ ( implies ( and ( not x440 ) ( and ( not x441 ) true ) ) ( = tmp227 0 ) )
+ ( implies ( and ( not x440 ) ( and x441 true ) ) ( = tmp227 2 ) )
+ ( implies ( and x440 ( and ( not x441 ) true ) ) ( = tmp227 2 ) )
+ ( implies ( and x440 ( and x441 true ) ) ( = tmp227 4 ) )
+ ( implies ( and ( not x464 ) ( and ( not x463 ) true ) ) ( = tmp226 0 ) )
+ ( implies ( and ( not x464 ) ( and x463 true ) ) ( = tmp226 8 ) )
+ ( implies ( and x464 ( and ( not x463 ) true ) ) ( = tmp226 8 ) )
+ ( implies ( and x464 ( and x463 true ) ) ( = tmp226 16 ) )
+ ( implies ( and ( not x438 ) ( and ( not x439 ) true ) ) ( = tmp225 0 ) )
+ ( implies ( and ( not x438 ) ( and x439 true ) ) ( = tmp225 4 ) )
+ ( implies ( and x438 ( and ( not x439 ) true ) ) ( = tmp225 4 ) )
+ ( implies ( and x438 ( and x439 true ) ) ( = tmp225 8 ) )
+ ( implies ( and ( not x466 ) ( and ( not x465 ) true ) ) ( = tmp224 0 ) )
+ ( implies ( and ( not x466 ) ( and x465 true ) ) ( = tmp224 8 ) )
+ ( implies ( and x466 ( and ( not x465 ) true ) ) ( = tmp224 8 ) )
+ ( implies ( and x466 ( and x465 true ) ) ( = tmp224 16 ) )
+ ( implies ( and ( not x436 ) ( and ( not x437 ) true ) ) ( = tmp223 0 ) )
+ ( implies ( and ( not x436 ) ( and x437 true ) ) ( = tmp223 4 ) )
+ ( implies ( and x436 ( and ( not x437 ) true ) ) ( = tmp223 4 ) )
+ ( implies ( and x436 ( and x437 true ) ) ( = tmp223 8 ) )
+ ( implies ( and ( not x468 ) ( and ( not x467 ) true ) ) ( = tmp222 0 ) )
+ ( implies ( and ( not x468 ) ( and x467 true ) ) ( = tmp222 8 ) )
+ ( implies ( and x468 ( and ( not x467 ) true ) ) ( = tmp222 8 ) )
+ ( implies ( and x468 ( and x467 true ) ) ( = tmp222 16 ) )
+ ( implies ( and ( not x434 ) ( and ( not x435 ) true ) ) ( = tmp221 0 ) )
+ ( implies ( and ( not x434 ) ( and x435 true ) ) ( = tmp221 4 ) )
+ ( implies ( and x434 ( and ( not x435 ) true ) ) ( = tmp221 4 ) )
+ ( implies ( and x434 ( and x435 true ) ) ( = tmp221 8 ) )
+ ( implies ( and ( not x470 ) ( and ( not x469 ) true ) ) ( = tmp220 0 ) )
+ ( implies ( and ( not x470 ) ( and x469 true ) ) ( = tmp220 6 ) )
+ ( implies ( and x470 ( and ( not x469 ) true ) ) ( = tmp220 6 ) )
+ ( implies ( and x470 ( and x469 true ) ) ( = tmp220 12 ) )
+ ( implies ( and ( not x432 ) ( and ( not x433 ) true ) ) ( = tmp219 0 ) )
+ ( implies ( and ( not x432 ) ( and x433 true ) ) ( = tmp219 4 ) )
+ ( implies ( and x432 ( and ( not x433 ) true ) ) ( = tmp219 4 ) )
+ ( implies ( and x432 ( and x433 true ) ) ( = tmp219 8 ) )
+ ( implies ( and ( not x472 ) ( and ( not x471 ) true ) ) ( = tmp218 0 ) )
+ ( implies ( and ( not x472 ) ( and x471 true ) ) ( = tmp218 6 ) )
+ ( implies ( and x472 ( and ( not x471 ) true ) ) ( = tmp218 6 ) )
+ ( implies ( and x472 ( and x471 true ) ) ( = tmp218 12 ) )
+ ( implies ( and ( not x430 ) ( and ( not x431 ) true ) ) ( = tmp217 0 ) )
+ ( implies ( and ( not x430 ) ( and x431 true ) ) ( = tmp217 4 ) )
+ ( implies ( and x430 ( and ( not x431 ) true ) ) ( = tmp217 2 ) )
+ ( implies ( and x430 ( and x431 true ) ) ( = tmp217 6 ) )
+ ( implies ( and ( not x474 ) ( and ( not x473 ) true ) ) ( = tmp216 0 ) )
+ ( implies ( and ( not x474 ) ( and x473 true ) ) ( = tmp216 6 ) )
+ ( implies ( and x474 ( and ( not x473 ) true ) ) ( = tmp216 4 ) )
+ ( implies ( and x474 ( and x473 true ) ) ( = tmp216 10 ) )
+ ( implies ( and ( not x428 ) ( and ( not x429 ) true ) ) ( = tmp215 0 ) )
+ ( implies ( and ( not x428 ) ( and x429 true ) ) ( = tmp215 2 ) )
+ ( implies ( and x428 ( and ( not x429 ) true ) ) ( = tmp215 1 ) )
+ ( implies ( and x428 ( and x429 true ) ) ( = tmp215 3 ) )
+ ( implies ( and ( not x405 ) ( and ( not x404 ) true ) ) ( = tmp214 0 ) )
+ ( implies ( and ( not x405 ) ( and x404 true ) ) ( = tmp214 6 ) )
+ ( implies ( and x405 ( and ( not x404 ) true ) ) ( = tmp214 4 ) )
+ ( implies ( and x405 ( and x404 true ) ) ( = tmp214 10 ) )
+ ( implies ( and ( not x402 ) ( and ( not x403 ) true ) ) ( = tmp213 0 ) )
+ ( implies ( and ( not x402 ) ( and x403 true ) ) ( = tmp213 6 ) )
+ ( implies ( and x402 ( and ( not x403 ) true ) ) ( = tmp213 6 ) )
+ ( implies ( and x402 ( and x403 true ) ) ( = tmp213 12 ) )
+ ( implies ( and ( not x407 ) ( and ( not x406 ) true ) ) ( = tmp212 0 ) )
+ ( implies ( and ( not x407 ) ( and x406 true ) ) ( = tmp212 4 ) )
+ ( implies ( and x407 ( and ( not x406 ) true ) ) ( = tmp212 2 ) )
+ ( implies ( and x407 ( and x406 true ) ) ( = tmp212 6 ) )
+ ( implies ( and ( not x400 ) ( and ( not x401 ) true ) ) ( = tmp211 0 ) )
+ ( implies ( and ( not x400 ) ( and x401 true ) ) ( = tmp211 6 ) )
+ ( implies ( and x400 ( and ( not x401 ) true ) ) ( = tmp211 4 ) )
+ ( implies ( and x400 ( and x401 true ) ) ( = tmp211 10 ) )
+ ( implies ( and ( not x409 ) ( and ( not x408 ) true ) ) ( = tmp210 0 ) )
+ ( implies ( and ( not x409 ) ( and x408 true ) ) ( = tmp210 2 ) )
+ ( implies ( and x409 ( and ( not x408 ) true ) ) ( = tmp210 4 ) )
+ ( implies ( and x409 ( and x408 true ) ) ( = tmp210 6 ) )
+ ( implies ( and ( not x398 ) ( and ( not x399 ) true ) ) ( = tmp209 0 ) )
+ ( implies ( and ( not x398 ) ( and x399 true ) ) ( = tmp209 4 ) )
+ ( implies ( and x398 ( and ( not x399 ) true ) ) ( = tmp209 4 ) )
+ ( implies ( and x398 ( and x399 true ) ) ( = tmp209 8 ) )
+ ( implies ( and ( not x411 ) ( and ( not x410 ) true ) ) ( = tmp208 0 ) )
+ ( implies ( and ( not x411 ) ( and x410 true ) ) ( = tmp208 4 ) )
+ ( implies ( and x411 ( and ( not x410 ) true ) ) ( = tmp208 4 ) )
+ ( implies ( and x411 ( and x410 true ) ) ( = tmp208 8 ) )
+ ( implies ( and ( not x396 ) ( and ( not x397 ) true ) ) ( = tmp207 0 ) )
+ ( implies ( and ( not x396 ) ( and x397 true ) ) ( = tmp207 4 ) )
+ ( implies ( and x396 ( and ( not x397 ) true ) ) ( = tmp207 4 ) )
+ ( implies ( and x396 ( and x397 true ) ) ( = tmp207 8 ) )
+ ( implies ( and ( not x413 ) ( and ( not x412 ) true ) ) ( = tmp206 0 ) )
+ ( implies ( and ( not x413 ) ( and x412 true ) ) ( = tmp206 4 ) )
+ ( implies ( and x413 ( and ( not x412 ) true ) ) ( = tmp206 4 ) )
+ ( implies ( and x413 ( and x412 true ) ) ( = tmp206 8 ) )
+ ( implies ( and ( not x394 ) ( and ( not x395 ) true ) ) ( = tmp205 0 ) )
+ ( implies ( and ( not x394 ) ( and x395 true ) ) ( = tmp205 4 ) )
+ ( implies ( and x394 ( and ( not x395 ) true ) ) ( = tmp205 4 ) )
+ ( implies ( and x394 ( and x395 true ) ) ( = tmp205 8 ) )
+ ( implies ( and ( not x415 ) ( and ( not x414 ) true ) ) ( = tmp204 0 ) )
+ ( implies ( and ( not x415 ) ( and x414 true ) ) ( = tmp204 4 ) )
+ ( implies ( and x415 ( and ( not x414 ) true ) ) ( = tmp204 4 ) )
+ ( implies ( and x415 ( and x414 true ) ) ( = tmp204 8 ) )
+ ( implies ( and ( not x392 ) ( and ( not x393 ) true ) ) ( = tmp203 0 ) )
+ ( implies ( and ( not x392 ) ( and x393 true ) ) ( = tmp203 2 ) )
+ ( implies ( and x392 ( and ( not x393 ) true ) ) ( = tmp203 2 ) )
+ ( implies ( and x392 ( and x393 true ) ) ( = tmp203 4 ) )
+ ( implies ( and ( not x417 ) ( and ( not x416 ) true ) ) ( = tmp202 0 ) )
+ ( implies ( and ( not x417 ) ( and x416 true ) ) ( = tmp202 4 ) )
+ ( implies ( and x417 ( and ( not x416 ) true ) ) ( = tmp202 6 ) )
+ ( implies ( and x417 ( and x416 true ) ) ( = tmp202 10 ) )
+ ( implies ( and ( not x390 ) ( and ( not x391 ) true ) ) ( = tmp201 0 ) )
+ ( implies ( and ( not x390 ) ( and x391 true ) ) ( = tmp201 2 ) )
+ ( implies ( and x390 ( and ( not x391 ) true ) ) ( = tmp201 2 ) )
+ ( implies ( and x390 ( and x391 true ) ) ( = tmp201 4 ) )
+ ( implies ( and ( not x419 ) ( and ( not x418 ) true ) ) ( = tmp200 0 ) )
+ ( implies ( and ( not x419 ) ( and x418 true ) ) ( = tmp200 6 ) )
+ ( implies ( and x419 ( and ( not x418 ) true ) ) ( = tmp200 6 ) )
+ ( implies ( and x419 ( and x418 true ) ) ( = tmp200 12 ) )
+ ( implies ( and ( not x388 ) ( and ( not x389 ) true ) ) ( = tmp199 0 ) )
+ ( implies ( and ( not x388 ) ( and x389 true ) ) ( = tmp199 2 ) )
+ ( implies ( and x388 ( and ( not x389 ) true ) ) ( = tmp199 2 ) )
+ ( implies ( and x388 ( and x389 true ) ) ( = tmp199 4 ) )
+ ( implies ( and ( not x421 ) ( and ( not x420 ) true ) ) ( = tmp198 0 ) )
+ ( implies ( and ( not x421 ) ( and x420 true ) ) ( = tmp198 6 ) )
+ ( implies ( and x421 ( and ( not x420 ) true ) ) ( = tmp198 6 ) )
+ ( implies ( and x421 ( and x420 true ) ) ( = tmp198 12 ) )
+ ( implies ( and ( not x386 ) ( and ( not x387 ) true ) ) ( = tmp197 0 ) )
+ ( implies ( and ( not x386 ) ( and x387 true ) ) ( = tmp197 4 ) )
+ ( implies ( and x386 ( and ( not x387 ) true ) ) ( = tmp197 4 ) )
+ ( implies ( and x386 ( and x387 true ) ) ( = tmp197 8 ) )
+ ( implies ( and ( not x423 ) ( and ( not x422 ) true ) ) ( = tmp196 0 ) )
+ ( implies ( and ( not x423 ) ( and x422 true ) ) ( = tmp196 6 ) )
+ ( implies ( and x423 ( and ( not x422 ) true ) ) ( = tmp196 4 ) )
+ ( implies ( and x423 ( and x422 true ) ) ( = tmp196 10 ) )
+ ( implies ( and ( not x384 ) ( and ( not x385 ) true ) ) ( = tmp195 0 ) )
+ ( implies ( and ( not x384 ) ( and x385 true ) ) ( = tmp195 6 ) )
+ ( implies ( and x384 ( and ( not x385 ) true ) ) ( = tmp195 6 ) )
+ ( implies ( and x384 ( and x385 true ) ) ( = tmp195 12 ) )
+ ( implies ( and ( not x425 ) ( and ( not x424 ) true ) ) ( = tmp194 0 ) )
+ ( implies ( and ( not x425 ) ( and x424 true ) ) ( = tmp194 4 ) )
+ ( implies ( and x425 ( and ( not x424 ) true ) ) ( = tmp194 4 ) )
+ ( implies ( and x425 ( and x424 true ) ) ( = tmp194 8 ) )
+ ( implies ( and ( not x382 ) ( and ( not x383 ) true ) ) ( = tmp193 0 ) )
+ ( implies ( and ( not x382 ) ( and x383 true ) ) ( = tmp193 6 ) )
+ ( implies ( and x382 ( and ( not x383 ) true ) ) ( = tmp193 6 ) )
+ ( implies ( and x382 ( and x383 true ) ) ( = tmp193 12 ) )
+ ( implies ( and ( not x427 ) ( and ( not x426 ) true ) ) ( = tmp192 0 ) )
+ ( implies ( and ( not x427 ) ( and x426 true ) ) ( = tmp192 4 ) )
+ ( implies ( and x427 ( and ( not x426 ) true ) ) ( = tmp192 4 ) )
+ ( implies ( and x427 ( and x426 true ) ) ( = tmp192 8 ) )
+ ( implies ( and ( not x380 ) ( and ( not x381 ) true ) ) ( = tmp191 0 ) )
+ ( implies ( and ( not x380 ) ( and x381 true ) ) ( = tmp191 4 ) )
+ ( implies ( and x380 ( and ( not x381 ) true ) ) ( = tmp191 4 ) )
+ ( implies ( and x380 ( and x381 true ) ) ( = tmp191 8 ) )
+ ( implies ( and ( not x357 ) ( and ( not x356 ) true ) ) ( = tmp190 0 ) )
+ ( implies ( and ( not x357 ) ( and x356 true ) ) ( = tmp190 2 ) )
+ ( implies ( and x357 ( and ( not x356 ) true ) ) ( = tmp190 2 ) )
+ ( implies ( and x357 ( and x356 true ) ) ( = tmp190 4 ) )
+ ( implies ( and ( not x354 ) ( and ( not x355 ) true ) ) ( = tmp189 0 ) )
+ ( implies ( and ( not x354 ) ( and x355 true ) ) ( = tmp189 2 ) )
+ ( implies ( and x354 ( and ( not x355 ) true ) ) ( = tmp189 2 ) )
+ ( implies ( and x354 ( and x355 true ) ) ( = tmp189 4 ) )
+ ( implies ( and ( not x359 ) ( and ( not x358 ) true ) ) ( = tmp188 0 ) )
+ ( implies ( and ( not x359 ) ( and x358 true ) ) ( = tmp188 4 ) )
+ ( implies ( and x359 ( and ( not x358 ) true ) ) ( = tmp188 4 ) )
+ ( implies ( and x359 ( and x358 true ) ) ( = tmp188 8 ) )
+ ( implies ( and ( not x352 ) ( and ( not x353 ) true ) ) ( = tmp187 0 ) )
+ ( implies ( and ( not x352 ) ( and x353 true ) ) ( = tmp187 4 ) )
+ ( implies ( and x352 ( and ( not x353 ) true ) ) ( = tmp187 4 ) )
+ ( implies ( and x352 ( and x353 true ) ) ( = tmp187 8 ) )
+ ( implies ( and ( not x361 ) ( and ( not x360 ) true ) ) ( = tmp186 0 ) )
+ ( implies ( and ( not x361 ) ( and x360 true ) ) ( = tmp186 4 ) )
+ ( implies ( and x361 ( and ( not x360 ) true ) ) ( = tmp186 4 ) )
+ ( implies ( and x361 ( and x360 true ) ) ( = tmp186 8 ) )
+ ( implies ( and ( not x350 ) ( and ( not x351 ) true ) ) ( = tmp185 0 ) )
+ ( implies ( and ( not x350 ) ( and x351 true ) ) ( = tmp185 6 ) )
+ ( implies ( and x350 ( and ( not x351 ) true ) ) ( = tmp185 6 ) )
+ ( implies ( and x350 ( and x351 true ) ) ( = tmp185 12 ) )
+ ( implies ( and ( not x363 ) ( and ( not x362 ) true ) ) ( = tmp184 0 ) )
+ ( implies ( and ( not x363 ) ( and x362 true ) ) ( = tmp184 4 ) )
+ ( implies ( and x363 ( and ( not x362 ) true ) ) ( = tmp184 4 ) )
+ ( implies ( and x363 ( and x362 true ) ) ( = tmp184 8 ) )
+ ( implies ( and ( not x348 ) ( and ( not x349 ) true ) ) ( = tmp183 0 ) )
+ ( implies ( and ( not x348 ) ( and x349 true ) ) ( = tmp183 6 ) )
+ ( implies ( and x348 ( and ( not x349 ) true ) ) ( = tmp183 6 ) )
+ ( implies ( and x348 ( and x349 true ) ) ( = tmp183 12 ) )
+ ( implies ( and ( not x365 ) ( and ( not x364 ) true ) ) ( = tmp182 0 ) )
+ ( implies ( and ( not x365 ) ( and x364 true ) ) ( = tmp182 4 ) )
+ ( implies ( and x365 ( and ( not x364 ) true ) ) ( = tmp182 6 ) )
+ ( implies ( and x365 ( and x364 true ) ) ( = tmp182 10 ) )
+ ( implies ( and ( not x346 ) ( and ( not x347 ) true ) ) ( = tmp181 0 ) )
+ ( implies ( and ( not x346 ) ( and x347 true ) ) ( = tmp181 8 ) )
+ ( implies ( and x346 ( and ( not x347 ) true ) ) ( = tmp181 8 ) )
+ ( implies ( and x346 ( and x347 true ) ) ( = tmp181 16 ) )
+ ( implies ( and ( not x367 ) ( and ( not x366 ) true ) ) ( = tmp180 0 ) )
+ ( implies ( and ( not x367 ) ( and x366 true ) ) ( = tmp180 6 ) )
+ ( implies ( and x367 ( and ( not x366 ) true ) ) ( = tmp180 6 ) )
+ ( implies ( and x367 ( and x366 true ) ) ( = tmp180 12 ) )
+ ( implies ( and ( not x344 ) ( and ( not x345 ) true ) ) ( = tmp179 0 ) )
+ ( implies ( and ( not x344 ) ( and x345 true ) ) ( = tmp179 8 ) )
+ ( implies ( and x344 ( and ( not x345 ) true ) ) ( = tmp179 8 ) )
+ ( implies ( and x344 ( and x345 true ) ) ( = tmp179 16 ) )
+ ( implies ( and ( not x369 ) ( and ( not x368 ) true ) ) ( = tmp178 0 ) )
+ ( implies ( and ( not x369 ) ( and x368 true ) ) ( = tmp178 6 ) )
+ ( implies ( and x369 ( and ( not x368 ) true ) ) ( = tmp178 6 ) )
+ ( implies ( and x369 ( and x368 true ) ) ( = tmp178 12 ) )
+ ( implies ( and ( not x342 ) ( and ( not x343 ) true ) ) ( = tmp177 0 ) )
+ ( implies ( and ( not x342 ) ( and x343 true ) ) ( = tmp177 8 ) )
+ ( implies ( and x342 ( and ( not x343 ) true ) ) ( = tmp177 6 ) )
+ ( implies ( and x342 ( and x343 true ) ) ( = tmp177 14 ) )
+ ( implies ( and ( not x371 ) ( and ( not x370 ) true ) ) ( = tmp176 0 ) )
+ ( implies ( and ( not x371 ) ( and x370 true ) ) ( = tmp176 6 ) )
+ ( implies ( and x371 ( and ( not x370 ) true ) ) ( = tmp176 6 ) )
+ ( implies ( and x371 ( and x370 true ) ) ( = tmp176 12 ) )
+ ( implies ( and ( not x340 ) ( and ( not x341 ) true ) ) ( = tmp175 0 ) )
+ ( implies ( and ( not x340 ) ( and x341 true ) ) ( = tmp175 6 ) )
+ ( implies ( and x340 ( and ( not x341 ) true ) ) ( = tmp175 6 ) )
+ ( implies ( and x340 ( and x341 true ) ) ( = tmp175 12 ) )
+ ( implies ( and ( not x373 ) ( and ( not x372 ) true ) ) ( = tmp174 0 ) )
+ ( implies ( and ( not x373 ) ( and x372 true ) ) ( = tmp174 6 ) )
+ ( implies ( and x373 ( and ( not x372 ) true ) ) ( = tmp174 6 ) )
+ ( implies ( and x373 ( and x372 true ) ) ( = tmp174 12 ) )
+ ( implies ( and ( not x338 ) ( and ( not x339 ) true ) ) ( = tmp173 0 ) )
+ ( implies ( and ( not x338 ) ( and x339 true ) ) ( = tmp173 6 ) )
+ ( implies ( and x338 ( and ( not x339 ) true ) ) ( = tmp173 4 ) )
+ ( implies ( and x338 ( and x339 true ) ) ( = tmp173 10 ) )
+ ( implies ( and ( not x375 ) ( and ( not x374 ) true ) ) ( = tmp172 0 ) )
+ ( implies ( and ( not x375 ) ( and x374 true ) ) ( = tmp172 6 ) )
+ ( implies ( and x375 ( and ( not x374 ) true ) ) ( = tmp172 4 ) )
+ ( implies ( and x375 ( and x374 true ) ) ( = tmp172 10 ) )
+ ( implies ( and ( not x336 ) ( and ( not x337 ) true ) ) ( = tmp171 0 ) )
+ ( implies ( and ( not x336 ) ( and x337 true ) ) ( = tmp171 4 ) )
+ ( implies ( and x336 ( and ( not x337 ) true ) ) ( = tmp171 2 ) )
+ ( implies ( and x336 ( and x337 true ) ) ( = tmp171 6 ) )
+ ( implies ( and ( not x377 ) ( and ( not x376 ) true ) ) ( = tmp170 0 ) )
+ ( implies ( and ( not x377 ) ( and x376 true ) ) ( = tmp170 4 ) )
+ ( implies ( and x377 ( and ( not x376 ) true ) ) ( = tmp170 2 ) )
+ ( implies ( and x377 ( and x376 true ) ) ( = tmp170 6 ) )
+ ( implies ( and ( not x334 ) ( and ( not x335 ) true ) ) ( = tmp169 0 ) )
+ ( implies ( and ( not x334 ) ( and x335 true ) ) ( = tmp169 4 ) )
+ ( implies ( and x334 ( and ( not x335 ) true ) ) ( = tmp169 4 ) )
+ ( implies ( and x334 ( and x335 true ) ) ( = tmp169 8 ) )
+ ( implies ( and ( not x379 ) ( and ( not x378 ) true ) ) ( = tmp168 0 ) )
+ ( implies ( and ( not x379 ) ( and x378 true ) ) ( = tmp168 1 ) )
+ ( implies ( and x379 ( and ( not x378 ) true ) ) ( = tmp168 1 ) )
+ ( implies ( and x379 ( and x378 true ) ) ( = tmp168 2 ) )
+ ( implies ( and ( not x332 ) ( and ( not x333 ) true ) ) ( = tmp167 0 ) )
+ ( implies ( and ( not x332 ) ( and x333 true ) ) ( = tmp167 4 ) )
+ ( implies ( and x332 ( and ( not x333 ) true ) ) ( = tmp167 4 ) )
+ ( implies ( and x332 ( and x333 true ) ) ( = tmp167 8 ) )
+ ( implies ( and ( not x309 ) ( and ( not x308 ) true ) ) ( = tmp166 0 ) )
+ ( implies ( and ( not x309 ) ( and x308 true ) ) ( = tmp166 4 ) )
+ ( implies ( and x309 ( and ( not x308 ) true ) ) ( = tmp166 4 ) )
+ ( implies ( and x309 ( and x308 true ) ) ( = tmp166 8 ) )
+ ( implies ( and ( not x306 ) ( and ( not x307 ) true ) ) ( = tmp165 0 ) )
+ ( implies ( and ( not x306 ) ( and x307 true ) ) ( = tmp165 4 ) )
+ ( implies ( and x306 ( and ( not x307 ) true ) ) ( = tmp165 4 ) )
+ ( implies ( and x306 ( and x307 true ) ) ( = tmp165 8 ) )
+ ( implies ( and ( not x311 ) ( and ( not x310 ) true ) ) ( = tmp164 0 ) )
+ ( implies ( and ( not x311 ) ( and x310 true ) ) ( = tmp164 4 ) )
+ ( implies ( and x311 ( and ( not x310 ) true ) ) ( = tmp164 4 ) )
+ ( implies ( and x311 ( and x310 true ) ) ( = tmp164 8 ) )
+ ( implies ( and ( not x304 ) ( and ( not x305 ) true ) ) ( = tmp163 0 ) )
+ ( implies ( and ( not x304 ) ( and x305 true ) ) ( = tmp163 4 ) )
+ ( implies ( and x304 ( and ( not x305 ) true ) ) ( = tmp163 6 ) )
+ ( implies ( and x304 ( and x305 true ) ) ( = tmp163 10 ) )
+ ( implies ( and ( not x313 ) ( and ( not x312 ) true ) ) ( = tmp162 0 ) )
+ ( implies ( and ( not x313 ) ( and x312 true ) ) ( = tmp162 4 ) )
+ ( implies ( and x313 ( and ( not x312 ) true ) ) ( = tmp162 4 ) )
+ ( implies ( and x313 ( and x312 true ) ) ( = tmp162 8 ) )
+ ( implies ( and ( not x302 ) ( and ( not x303 ) true ) ) ( = tmp161 0 ) )
+ ( implies ( and ( not x302 ) ( and x303 true ) ) ( = tmp161 6 ) )
+ ( implies ( and x302 ( and ( not x303 ) true ) ) ( = tmp161 6 ) )
+ ( implies ( and x302 ( and x303 true ) ) ( = tmp161 12 ) )
+ ( implies ( and ( not x315 ) ( and ( not x314 ) true ) ) ( = tmp160 0 ) )
+ ( implies ( and ( not x315 ) ( and x314 true ) ) ( = tmp160 6 ) )
+ ( implies ( and x315 ( and ( not x314 ) true ) ) ( = tmp160 6 ) )
+ ( implies ( and x315 ( and x314 true ) ) ( = tmp160 12 ) )
+ ( implies ( and ( not x300 ) ( and ( not x301 ) true ) ) ( = tmp159 0 ) )
+ ( implies ( and ( not x300 ) ( and x301 true ) ) ( = tmp159 6 ) )
+ ( implies ( and x300 ( and ( not x301 ) true ) ) ( = tmp159 6 ) )
+ ( implies ( and x300 ( and x301 true ) ) ( = tmp159 12 ) )
+ ( implies ( and ( not x317 ) ( and ( not x316 ) true ) ) ( = tmp158 0 ) )
+ ( implies ( and ( not x317 ) ( and x316 true ) ) ( = tmp158 6 ) )
+ ( implies ( and x317 ( and ( not x316 ) true ) ) ( = tmp158 6 ) )
+ ( implies ( and x317 ( and x316 true ) ) ( = tmp158 12 ) )
+ ( implies ( and ( not x298 ) ( and ( not x299 ) true ) ) ( = tmp157 0 ) )
+ ( implies ( and ( not x298 ) ( and x299 true ) ) ( = tmp157 6 ) )
+ ( implies ( and x298 ( and ( not x299 ) true ) ) ( = tmp157 4 ) )
+ ( implies ( and x298 ( and x299 true ) ) ( = tmp157 10 ) )
+ ( implies ( and ( not x319 ) ( and ( not x318 ) true ) ) ( = tmp156 0 ) )
+ ( implies ( and ( not x319 ) ( and x318 true ) ) ( = tmp156 6 ) )
+ ( implies ( and x319 ( and ( not x318 ) true ) ) ( = tmp156 6 ) )
+ ( implies ( and x319 ( and x318 true ) ) ( = tmp156 12 ) )
+ ( implies ( and ( not x296 ) ( and ( not x297 ) true ) ) ( = tmp155 0 ) )
+ ( implies ( and ( not x296 ) ( and x297 true ) ) ( = tmp155 4 ) )
+ ( implies ( and x296 ( and ( not x297 ) true ) ) ( = tmp155 4 ) )
+ ( implies ( and x296 ( and x297 true ) ) ( = tmp155 8 ) )
+ ( implies ( and ( not x321 ) ( and ( not x320 ) true ) ) ( = tmp154 0 ) )
+ ( implies ( and ( not x321 ) ( and x320 true ) ) ( = tmp154 6 ) )
+ ( implies ( and x321 ( and ( not x320 ) true ) ) ( = tmp154 6 ) )
+ ( implies ( and x321 ( and x320 true ) ) ( = tmp154 12 ) )
+ ( implies ( and ( not x294 ) ( and ( not x295 ) true ) ) ( = tmp153 0 ) )
+ ( implies ( and ( not x294 ) ( and x295 true ) ) ( = tmp153 4 ) )
+ ( implies ( and x294 ( and ( not x295 ) true ) ) ( = tmp153 4 ) )
+ ( implies ( and x294 ( and x295 true ) ) ( = tmp153 8 ) )
+ ( implies ( and ( not x323 ) ( and ( not x322 ) true ) ) ( = tmp152 0 ) )
+ ( implies ( and ( not x323 ) ( and x322 true ) ) ( = tmp152 4 ) )
+ ( implies ( and x323 ( and ( not x322 ) true ) ) ( = tmp152 4 ) )
+ ( implies ( and x323 ( and x322 true ) ) ( = tmp152 8 ) )
+ ( implies ( and ( not x292 ) ( and ( not x293 ) true ) ) ( = tmp151 0 ) )
+ ( implies ( and ( not x292 ) ( and x293 true ) ) ( = tmp151 6 ) )
+ ( implies ( and x292 ( and ( not x293 ) true ) ) ( = tmp151 4 ) )
+ ( implies ( and x292 ( and x293 true ) ) ( = tmp151 10 ) )
+ ( implies ( and ( not x325 ) ( and ( not x324 ) true ) ) ( = tmp150 0 ) )
+ ( implies ( and ( not x325 ) ( and x324 true ) ) ( = tmp150 4 ) )
+ ( implies ( and x325 ( and ( not x324 ) true ) ) ( = tmp150 4 ) )
+ ( implies ( and x325 ( and x324 true ) ) ( = tmp150 8 ) )
+ ( implies ( and ( not x290 ) ( and ( not x291 ) true ) ) ( = tmp149 0 ) )
+ ( implies ( and ( not x290 ) ( and x291 true ) ) ( = tmp149 4 ) )
+ ( implies ( and x290 ( and ( not x291 ) true ) ) ( = tmp149 2 ) )
+ ( implies ( and x290 ( and x291 true ) ) ( = tmp149 6 ) )
+ ( implies ( and ( not x327 ) ( and ( not x326 ) true ) ) ( = tmp148 0 ) )
+ ( implies ( and ( not x327 ) ( and x326 true ) ) ( = tmp148 4 ) )
+ ( implies ( and x327 ( and ( not x326 ) true ) ) ( = tmp148 4 ) )
+ ( implies ( and x327 ( and x326 true ) ) ( = tmp148 8 ) )
+ ( implies ( and ( not x288 ) ( and ( not x289 ) true ) ) ( = tmp147 0 ) )
+ ( implies ( and ( not x288 ) ( and x289 true ) ) ( = tmp147 1 ) )
+ ( implies ( and x288 ( and ( not x289 ) true ) ) ( = tmp147 2 ) )
+ ( implies ( and x288 ( and x289 true ) ) ( = tmp147 3 ) )
+ ( implies ( and ( not x329 ) ( and ( not x328 ) true ) ) ( = tmp146 0 ) )
+ ( implies ( and ( not x329 ) ( and x328 true ) ) ( = tmp146 4 ) )
+ ( implies ( and x329 ( and ( not x328 ) true ) ) ( = tmp146 4 ) )
+ ( implies ( and x329 ( and x328 true ) ) ( = tmp146 8 ) )
+ ( implies ( and ( not x286 ) ( and ( not x287 ) true ) ) ( = tmp145 0 ) )
+ ( implies ( and ( not x286 ) ( and x287 true ) ) ( = tmp145 4 ) )
+ ( implies ( and x286 ( and ( not x287 ) true ) ) ( = tmp145 4 ) )
+ ( implies ( and x286 ( and x287 true ) ) ( = tmp145 8 ) )
+ ( implies ( and ( not x331 ) ( and ( not x330 ) true ) ) ( = tmp144 0 ) )
+ ( implies ( and ( not x331 ) ( and x330 true ) ) ( = tmp144 4 ) )
+ ( implies ( and x331 ( and ( not x330 ) true ) ) ( = tmp144 4 ) )
+ ( implies ( and x331 ( and x330 true ) ) ( = tmp144 8 ) )
+ ( implies ( and ( not x284 ) ( and ( not x285 ) true ) ) ( = tmp143 0 ) )
+ ( implies ( and ( not x284 ) ( and x285 true ) ) ( = tmp143 4 ) )
+ ( implies ( and x284 ( and ( not x285 ) true ) ) ( = tmp143 4 ) )
+ ( implies ( and x284 ( and x285 true ) ) ( = tmp143 8 ) )
+ ( implies ( and ( not x263 ) ( and ( not x262 ) true ) ) ( = tmp142 0 ) )
+ ( implies ( and ( not x263 ) ( and x262 true ) ) ( = tmp142 2 ) )
+ ( implies ( and x263 ( and ( not x262 ) true ) ) ( = tmp142 2 ) )
+ ( implies ( and x263 ( and x262 true ) ) ( = tmp142 4 ) )
+ ( implies ( and ( not x260 ) ( and ( not x261 ) true ) ) ( = tmp141 0 ) )
+ ( implies ( and ( not x260 ) ( and x261 true ) ) ( = tmp141 1 ) )
+ ( implies ( and x260 ( and ( not x261 ) true ) ) ( = tmp141 1 ) )
+ ( implies ( and x260 ( and x261 true ) ) ( = tmp141 2 ) )
+ ( implies ( and ( not x265 ) ( and ( not x264 ) true ) ) ( = tmp140 0 ) )
+ ( implies ( and ( not x265 ) ( and x264 true ) ) ( = tmp140 4 ) )
+ ( implies ( and x265 ( and ( not x264 ) true ) ) ( = tmp140 4 ) )
+ ( implies ( and x265 ( and x264 true ) ) ( = tmp140 8 ) )
+ ( implies ( and ( not x258 ) ( and ( not x259 ) true ) ) ( = tmp139 0 ) )
+ ( implies ( and ( not x258 ) ( and x259 true ) ) ( = tmp139 2 ) )
+ ( implies ( and x258 ( and ( not x259 ) true ) ) ( = tmp139 2 ) )
+ ( implies ( and x258 ( and x259 true ) ) ( = tmp139 4 ) )
+ ( implies ( and ( not x267 ) ( and ( not x266 ) true ) ) ( = tmp138 0 ) )
+ ( implies ( and ( not x267 ) ( and x266 true ) ) ( = tmp138 4 ) )
+ ( implies ( and x267 ( and ( not x266 ) true ) ) ( = tmp138 4 ) )
+ ( implies ( and x267 ( and x266 true ) ) ( = tmp138 8 ) )
+ ( implies ( and ( not x256 ) ( and ( not x257 ) true ) ) ( = tmp137 0 ) )
+ ( implies ( and ( not x256 ) ( and x257 true ) ) ( = tmp137 2 ) )
+ ( implies ( and x256 ( and ( not x257 ) true ) ) ( = tmp137 2 ) )
+ ( implies ( and x256 ( and x257 true ) ) ( = tmp137 4 ) )
+ ( implies ( and ( not x269 ) ( and ( not x268 ) true ) ) ( = tmp136 0 ) )
+ ( implies ( and ( not x269 ) ( and x268 true ) ) ( = tmp136 4 ) )
+ ( implies ( and x269 ( and ( not x268 ) true ) ) ( = tmp136 4 ) )
+ ( implies ( and x269 ( and x268 true ) ) ( = tmp136 8 ) )
+ ( implies ( and ( not x254 ) ( and ( not x255 ) true ) ) ( = tmp135 0 ) )
+ ( implies ( and ( not x254 ) ( and x255 true ) ) ( = tmp135 2 ) )
+ ( implies ( and x254 ( and ( not x255 ) true ) ) ( = tmp135 2 ) )
+ ( implies ( and x254 ( and x255 true ) ) ( = tmp135 4 ) )
+ ( implies ( and ( not x271 ) ( and ( not x270 ) true ) ) ( = tmp134 0 ) )
+ ( implies ( and ( not x271 ) ( and x270 true ) ) ( = tmp134 4 ) )
+ ( implies ( and x271 ( and ( not x270 ) true ) ) ( = tmp134 4 ) )
+ ( implies ( and x271 ( and x270 true ) ) ( = tmp134 8 ) )
+ ( implies ( and ( not x252 ) ( and ( not x253 ) true ) ) ( = tmp133 0 ) )
+ ( implies ( and ( not x252 ) ( and x253 true ) ) ( = tmp133 2 ) )
+ ( implies ( and x252 ( and ( not x253 ) true ) ) ( = tmp133 2 ) )
+ ( implies ( and x252 ( and x253 true ) ) ( = tmp133 4 ) )
+ ( implies ( and ( not x273 ) ( and ( not x272 ) true ) ) ( = tmp132 0 ) )
+ ( implies ( and ( not x273 ) ( and x272 true ) ) ( = tmp132 4 ) )
+ ( implies ( and x273 ( and ( not x272 ) true ) ) ( = tmp132 4 ) )
+ ( implies ( and x273 ( and x272 true ) ) ( = tmp132 8 ) )
+ ( implies ( and ( not x250 ) ( and ( not x251 ) true ) ) ( = tmp131 0 ) )
+ ( implies ( and ( not x250 ) ( and x251 true ) ) ( = tmp131 1 ) )
+ ( implies ( and x250 ( and ( not x251 ) true ) ) ( = tmp131 1 ) )
+ ( implies ( and x250 ( and x251 true ) ) ( = tmp131 2 ) )
+ ( implies ( and ( not x275 ) ( and ( not x274 ) true ) ) ( = tmp130 0 ) )
+ ( implies ( and ( not x275 ) ( and x274 true ) ) ( = tmp130 2 ) )
+ ( implies ( and x275 ( and ( not x274 ) true ) ) ( = tmp130 2 ) )
+ ( implies ( and x275 ( and x274 true ) ) ( = tmp130 4 ) )
+ ( implies ( and ( not x248 ) ( and ( not x249 ) true ) ) ( = tmp129 0 ) )
+ ( implies ( and ( not x248 ) ( and x249 true ) ) ( = tmp129 1 ) )
+ ( implies ( and x248 ( and ( not x249 ) true ) ) ( = tmp129 1 ) )
+ ( implies ( and x248 ( and x249 true ) ) ( = tmp129 2 ) )
+ ( implies ( and ( not x277 ) ( and ( not x276 ) true ) ) ( = tmp128 0 ) )
+ ( implies ( and ( not x277 ) ( and x276 true ) ) ( = tmp128 2 ) )
+ ( implies ( and x277 ( and ( not x276 ) true ) ) ( = tmp128 4 ) )
+ ( implies ( and x277 ( and x276 true ) ) ( = tmp128 6 ) )
+ ( implies ( and ( not x246 ) ( and ( not x247 ) true ) ) ( = tmp127 0 ) )
+ ( implies ( and ( not x246 ) ( and x247 true ) ) ( = tmp127 1 ) )
+ ( implies ( and x246 ( and ( not x247 ) true ) ) ( = tmp127 1 ) )
+ ( implies ( and x246 ( and x247 true ) ) ( = tmp127 2 ) )
+ ( implies ( and ( not x279 ) ( and ( not x278 ) true ) ) ( = tmp126 0 ) )
+ ( implies ( and ( not x279 ) ( and x278 true ) ) ( = tmp126 4 ) )
+ ( implies ( and x279 ( and ( not x278 ) true ) ) ( = tmp126 4 ) )
+ ( implies ( and x279 ( and x278 true ) ) ( = tmp126 8 ) )
+ ( implies ( and ( not x244 ) ( and ( not x245 ) true ) ) ( = tmp125 0 ) )
+ ( implies ( and ( not x244 ) ( and x245 true ) ) ( = tmp125 1 ) )
+ ( implies ( and x244 ( and ( not x245 ) true ) ) ( = tmp125 2 ) )
+ ( implies ( and x244 ( and x245 true ) ) ( = tmp125 3 ) )
+ ( implies ( and ( not x281 ) ( and ( not x280 ) true ) ) ( = tmp124 0 ) )
+ ( implies ( and ( not x281 ) ( and x280 true ) ) ( = tmp124 6 ) )
+ ( implies ( and x281 ( and ( not x280 ) true ) ) ( = tmp124 6 ) )
+ ( implies ( and x281 ( and x280 true ) ) ( = tmp124 12 ) )
+ ( implies ( and ( not x242 ) ( and ( not x243 ) true ) ) ( = tmp123 0 ) )
+ ( implies ( and ( not x242 ) ( and x243 true ) ) ( = tmp123 2 ) )
+ ( implies ( and x242 ( and ( not x243 ) true ) ) ( = tmp123 2 ) )
+ ( implies ( and x242 ( and x243 true ) ) ( = tmp123 4 ) )
+ ( implies ( and ( not x283 ) ( and ( not x282 ) true ) ) ( = tmp122 0 ) )
+ ( implies ( and ( not x283 ) ( and x282 true ) ) ( = tmp122 6 ) )
+ ( implies ( and x283 ( and ( not x282 ) true ) ) ( = tmp122 6 ) )
+ ( implies ( and x283 ( and x282 true ) ) ( = tmp122 12 ) )
+ ( implies ( and ( not x240 ) ( and ( not x241 ) true ) ) ( = tmp121 0 ) )
+ ( implies ( and ( not x240 ) ( and x241 true ) ) ( = tmp121 2 ) )
+ ( implies ( and x240 ( and ( not x241 ) true ) ) ( = tmp121 2 ) )
+ ( implies ( and x240 ( and x241 true ) ) ( = tmp121 4 ) )
+ ( implies ( and ( not x217 ) ( and ( not x216 ) true ) ) ( = tmp120 0 ) )
+ ( implies ( and ( not x217 ) ( and x216 true ) ) ( = tmp120 2 ) )
+ ( implies ( and x217 ( and ( not x216 ) true ) ) ( = tmp120 1 ) )
+ ( implies ( and x217 ( and x216 true ) ) ( = tmp120 3 ) )
+ ( implies ( and ( not x214 ) ( and ( not x215 ) true ) ) ( = tmp119 0 ) )
+ ( implies ( and ( not x214 ) ( and x215 true ) ) ( = tmp119 2 ) )
+ ( implies ( and x214 ( and ( not x215 ) true ) ) ( = tmp119 2 ) )
+ ( implies ( and x214 ( and x215 true ) ) ( = tmp119 4 ) )
+ ( implies ( and ( not x219 ) ( and ( not x218 ) true ) ) ( = tmp118 0 ) )
+ ( implies ( and ( not x219 ) ( and x218 true ) ) ( = tmp118 1 ) )
+ ( implies ( and x219 ( and ( not x218 ) true ) ) ( = tmp118 2 ) )
+ ( implies ( and x219 ( and x218 true ) ) ( = tmp118 3 ) )
+ ( implies ( and ( not x212 ) ( and ( not x213 ) true ) ) ( = tmp117 0 ) )
+ ( implies ( and ( not x212 ) ( and x213 true ) ) ( = tmp117 4 ) )
+ ( implies ( and x212 ( and ( not x213 ) true ) ) ( = tmp117 4 ) )
+ ( implies ( and x212 ( and x213 true ) ) ( = tmp117 8 ) )
+ ( implies ( and ( not x221 ) ( and ( not x220 ) true ) ) ( = tmp116 0 ) )
+ ( implies ( and ( not x221 ) ( and x220 true ) ) ( = tmp116 2 ) )
+ ( implies ( and x221 ( and ( not x220 ) true ) ) ( = tmp116 2 ) )
+ ( implies ( and x221 ( and x220 true ) ) ( = tmp116 4 ) )
+ ( implies ( and ( not x210 ) ( and ( not x211 ) true ) ) ( = tmp115 0 ) )
+ ( implies ( and ( not x210 ) ( and x211 true ) ) ( = tmp115 4 ) )
+ ( implies ( and x210 ( and ( not x211 ) true ) ) ( = tmp115 6 ) )
+ ( implies ( and x210 ( and x211 true ) ) ( = tmp115 10 ) )
+ ( implies ( and ( not x223 ) ( and ( not x222 ) true ) ) ( = tmp114 0 ) )
+ ( implies ( and ( not x223 ) ( and x222 true ) ) ( = tmp114 2 ) )
+ ( implies ( and x223 ( and ( not x222 ) true ) ) ( = tmp114 2 ) )
+ ( implies ( and x223 ( and x222 true ) ) ( = tmp114 4 ) )
+ ( implies ( and ( not x208 ) ( and ( not x209 ) true ) ) ( = tmp113 0 ) )
+ ( implies ( and ( not x208 ) ( and x209 true ) ) ( = tmp113 6 ) )
+ ( implies ( and x208 ( and ( not x209 ) true ) ) ( = tmp113 6 ) )
+ ( implies ( and x208 ( and x209 true ) ) ( = tmp113 12 ) )
+ ( implies ( and ( not x225 ) ( and ( not x224 ) true ) ) ( = tmp112 0 ) )
+ ( implies ( and ( not x225 ) ( and x224 true ) ) ( = tmp112 2 ) )
+ ( implies ( and x225 ( and ( not x224 ) true ) ) ( = tmp112 2 ) )
+ ( implies ( and x225 ( and x224 true ) ) ( = tmp112 4 ) )
+ ( implies ( and ( not x206 ) ( and ( not x207 ) true ) ) ( = tmp111 0 ) )
+ ( implies ( and ( not x206 ) ( and x207 true ) ) ( = tmp111 6 ) )
+ ( implies ( and x206 ( and ( not x207 ) true ) ) ( = tmp111 6 ) )
+ ( implies ( and x206 ( and x207 true ) ) ( = tmp111 12 ) )
+ ( implies ( and ( not x227 ) ( and ( not x226 ) true ) ) ( = tmp110 0 ) )
+ ( implies ( and ( not x227 ) ( and x226 true ) ) ( = tmp110 2 ) )
+ ( implies ( and x227 ( and ( not x226 ) true ) ) ( = tmp110 2 ) )
+ ( implies ( and x227 ( and x226 true ) ) ( = tmp110 4 ) )
+ ( implies ( and ( not x204 ) ( and ( not x205 ) true ) ) ( = tmp109 0 ) )
+ ( implies ( and ( not x204 ) ( and x205 true ) ) ( = tmp109 6 ) )
+ ( implies ( and x204 ( and ( not x205 ) true ) ) ( = tmp109 6 ) )
+ ( implies ( and x204 ( and x205 true ) ) ( = tmp109 12 ) )
+ ( implies ( and ( not x229 ) ( and ( not x228 ) true ) ) ( = tmp108 0 ) )
+ ( implies ( and ( not x229 ) ( and x228 true ) ) ( = tmp108 2 ) )
+ ( implies ( and x229 ( and ( not x228 ) true ) ) ( = tmp108 2 ) )
+ ( implies ( and x229 ( and x228 true ) ) ( = tmp108 4 ) )
+ ( implies ( and ( not x202 ) ( and ( not x203 ) true ) ) ( = tmp107 0 ) )
+ ( implies ( and ( not x202 ) ( and x203 true ) ) ( = tmp107 6 ) )
+ ( implies ( and x202 ( and ( not x203 ) true ) ) ( = tmp107 6 ) )
+ ( implies ( and x202 ( and x203 true ) ) ( = tmp107 12 ) )
+ ( implies ( and ( not x231 ) ( and ( not x230 ) true ) ) ( = tmp106 0 ) )
+ ( implies ( and ( not x231 ) ( and x230 true ) ) ( = tmp106 2 ) )
+ ( implies ( and x231 ( and ( not x230 ) true ) ) ( = tmp106 2 ) )
+ ( implies ( and x231 ( and x230 true ) ) ( = tmp106 4 ) )
+ ( implies ( and ( not x200 ) ( and ( not x201 ) true ) ) ( = tmp105 0 ) )
+ ( implies ( and ( not x200 ) ( and x201 true ) ) ( = tmp105 4 ) )
+ ( implies ( and x200 ( and ( not x201 ) true ) ) ( = tmp105 4 ) )
+ ( implies ( and x200 ( and x201 true ) ) ( = tmp105 8 ) )
+ ( implies ( and ( not x233 ) ( and ( not x232 ) true ) ) ( = tmp104 0 ) )
+ ( implies ( and ( not x233 ) ( and x232 true ) ) ( = tmp104 2 ) )
+ ( implies ( and x233 ( and ( not x232 ) true ) ) ( = tmp104 2 ) )
+ ( implies ( and x233 ( and x232 true ) ) ( = tmp104 4 ) )
+ ( implies ( and ( not x198 ) ( and ( not x199 ) true ) ) ( = tmp103 0 ) )
+ ( implies ( and ( not x198 ) ( and x199 true ) ) ( = tmp103 4 ) )
+ ( implies ( and x198 ( and ( not x199 ) true ) ) ( = tmp103 4 ) )
+ ( implies ( and x198 ( and x199 true ) ) ( = tmp103 8 ) )
+ ( implies ( and ( not x235 ) ( and ( not x234 ) true ) ) ( = tmp102 0 ) )
+ ( implies ( and ( not x235 ) ( and x234 true ) ) ( = tmp102 2 ) )
+ ( implies ( and x235 ( and ( not x234 ) true ) ) ( = tmp102 2 ) )
+ ( implies ( and x235 ( and x234 true ) ) ( = tmp102 4 ) )
+ ( implies ( and ( not x196 ) ( and ( not x197 ) true ) ) ( = tmp101 0 ) )
+ ( implies ( and ( not x196 ) ( and x197 true ) ) ( = tmp101 4 ) )
+ ( implies ( and x196 ( and ( not x197 ) true ) ) ( = tmp101 4 ) )
+ ( implies ( and x196 ( and x197 true ) ) ( = tmp101 8 ) )
+ ( implies ( and ( not x237 ) ( and ( not x236 ) true ) ) ( = tmp100 0 ) )
+ ( implies ( and ( not x237 ) ( and x236 true ) ) ( = tmp100 2 ) )
+ ( implies ( and x237 ( and ( not x236 ) true ) ) ( = tmp100 2 ) )
+ ( implies ( and x237 ( and x236 true ) ) ( = tmp100 4 ) )
+ ( implies ( and ( not x194 ) ( and ( not x195 ) true ) ) ( = tmp99 0 ) )
+ ( implies ( and ( not x194 ) ( and x195 true ) ) ( = tmp99 6 ) )
+ ( implies ( and x194 ( and ( not x195 ) true ) ) ( = tmp99 6 ) )
+ ( implies ( and x194 ( and x195 true ) ) ( = tmp99 12 ) )
+ ( implies ( and ( not x239 ) ( and ( not x238 ) true ) ) ( = tmp98 0 ) )
+ ( implies ( and ( not x239 ) ( and x238 true ) ) ( = tmp98 2 ) )
+ ( implies ( and x239 ( and ( not x238 ) true ) ) ( = tmp98 2 ) )
+ ( implies ( and x239 ( and x238 true ) ) ( = tmp98 4 ) )
+ ( implies ( and ( not x192 ) ( and ( not x193 ) true ) ) ( = tmp97 0 ) )
+ ( implies ( and ( not x192 ) ( and x193 true ) ) ( = tmp97 6 ) )
+ ( implies ( and x192 ( and ( not x193 ) true ) ) ( = tmp97 6 ) )
+ ( implies ( and x192 ( and x193 true ) ) ( = tmp97 12 ) )
+ ( implies ( and ( not x169 ) ( and ( not x168 ) true ) ) ( = tmp96 0 ) )
+ ( implies ( and ( not x169 ) ( and x168 true ) ) ( = tmp96 4 ) )
+ ( implies ( and x169 ( and ( not x168 ) true ) ) ( = tmp96 4 ) )
+ ( implies ( and x169 ( and x168 true ) ) ( = tmp96 8 ) )
+ ( implies ( and ( not x166 ) ( and ( not x167 ) true ) ) ( = tmp95 0 ) )
+ ( implies ( and ( not x166 ) ( and x167 true ) ) ( = tmp95 4 ) )
+ ( implies ( and x166 ( and ( not x167 ) true ) ) ( = tmp95 4 ) )
+ ( implies ( and x166 ( and x167 true ) ) ( = tmp95 8 ) )
+ ( implies ( and ( not x171 ) ( and ( not x170 ) true ) ) ( = tmp94 0 ) )
+ ( implies ( and ( not x171 ) ( and x170 true ) ) ( = tmp94 6 ) )
+ ( implies ( and x171 ( and ( not x170 ) true ) ) ( = tmp94 4 ) )
+ ( implies ( and x171 ( and x170 true ) ) ( = tmp94 10 ) )
+ ( implies ( and ( not x164 ) ( and ( not x165 ) true ) ) ( = tmp93 0 ) )
+ ( implies ( and ( not x164 ) ( and x165 true ) ) ( = tmp93 6 ) )
+ ( implies ( and x164 ( and ( not x165 ) true ) ) ( = tmp93 6 ) )
+ ( implies ( and x164 ( and x165 true ) ) ( = tmp93 12 ) )
+ ( implies ( and ( not x173 ) ( and ( not x172 ) true ) ) ( = tmp92 0 ) )
+ ( implies ( and ( not x173 ) ( and x172 true ) ) ( = tmp92 4 ) )
+ ( implies ( and x173 ( and ( not x172 ) true ) ) ( = tmp92 4 ) )
+ ( implies ( and x173 ( and x172 true ) ) ( = tmp92 8 ) )
+ ( implies ( and ( not x162 ) ( and ( not x163 ) true ) ) ( = tmp91 0 ) )
+ ( implies ( and ( not x162 ) ( and x163 true ) ) ( = tmp91 6 ) )
+ ( implies ( and x162 ( and ( not x163 ) true ) ) ( = tmp91 6 ) )
+ ( implies ( and x162 ( and x163 true ) ) ( = tmp91 12 ) )
+ ( implies ( and ( not x175 ) ( and ( not x174 ) true ) ) ( = tmp90 0 ) )
+ ( implies ( and ( not x175 ) ( and x174 true ) ) ( = tmp90 2 ) )
+ ( implies ( and x175 ( and ( not x174 ) true ) ) ( = tmp90 2 ) )
+ ( implies ( and x175 ( and x174 true ) ) ( = tmp90 4 ) )
+ ( implies ( and ( not x160 ) ( and ( not x161 ) true ) ) ( = tmp89 0 ) )
+ ( implies ( and ( not x160 ) ( and x161 true ) ) ( = tmp89 6 ) )
+ ( implies ( and x160 ( and ( not x161 ) true ) ) ( = tmp89 6 ) )
+ ( implies ( and x160 ( and x161 true ) ) ( = tmp89 12 ) )
+ ( implies ( and ( not x177 ) ( and ( not x176 ) true ) ) ( = tmp88 0 ) )
+ ( implies ( and ( not x177 ) ( and x176 true ) ) ( = tmp88 4 ) )
+ ( implies ( and x177 ( and ( not x176 ) true ) ) ( = tmp88 6 ) )
+ ( implies ( and x177 ( and x176 true ) ) ( = tmp88 10 ) )
+ ( implies ( and ( not x158 ) ( and ( not x159 ) true ) ) ( = tmp87 0 ) )
+ ( implies ( and ( not x158 ) ( and x159 true ) ) ( = tmp87 6 ) )
+ ( implies ( and x158 ( and ( not x159 ) true ) ) ( = tmp87 6 ) )
+ ( implies ( and x158 ( and x159 true ) ) ( = tmp87 12 ) )
+ ( implies ( and ( not x179 ) ( and ( not x178 ) true ) ) ( = tmp86 0 ) )
+ ( implies ( and ( not x179 ) ( and x178 true ) ) ( = tmp86 6 ) )
+ ( implies ( and x179 ( and ( not x178 ) true ) ) ( = tmp86 6 ) )
+ ( implies ( and x179 ( and x178 true ) ) ( = tmp86 12 ) )
+ ( implies ( and ( not x156 ) ( and ( not x157 ) true ) ) ( = tmp85 0 ) )
+ ( implies ( and ( not x156 ) ( and x157 true ) ) ( = tmp85 6 ) )
+ ( implies ( and x156 ( and ( not x157 ) true ) ) ( = tmp85 4 ) )
+ ( implies ( and x156 ( and x157 true ) ) ( = tmp85 10 ) )
+ ( implies ( and ( not x181 ) ( and ( not x180 ) true ) ) ( = tmp84 0 ) )
+ ( implies ( and ( not x181 ) ( and x180 true ) ) ( = tmp84 6 ) )
+ ( implies ( and x181 ( and ( not x180 ) true ) ) ( = tmp84 6 ) )
+ ( implies ( and x181 ( and x180 true ) ) ( = tmp84 12 ) )
+ ( implies ( and ( not x154 ) ( and ( not x155 ) true ) ) ( = tmp83 0 ) )
+ ( implies ( and ( not x154 ) ( and x155 true ) ) ( = tmp83 4 ) )
+ ( implies ( and x154 ( and ( not x155 ) true ) ) ( = tmp83 4 ) )
+ ( implies ( and x154 ( and x155 true ) ) ( = tmp83 8 ) )
+ ( implies ( and ( not x183 ) ( and ( not x182 ) true ) ) ( = tmp82 0 ) )
+ ( implies ( and ( not x183 ) ( and x182 true ) ) ( = tmp82 4 ) )
+ ( implies ( and x183 ( and ( not x182 ) true ) ) ( = tmp82 4 ) )
+ ( implies ( and x183 ( and x182 true ) ) ( = tmp82 8 ) )
+ ( implies ( and ( not x152 ) ( and ( not x153 ) true ) ) ( = tmp81 0 ) )
+ ( implies ( and ( not x152 ) ( and x153 true ) ) ( = tmp81 4 ) )
+ ( implies ( and x152 ( and ( not x153 ) true ) ) ( = tmp81 4 ) )
+ ( implies ( and x152 ( and x153 true ) ) ( = tmp81 8 ) )
+ ( implies ( and ( not x185 ) ( and ( not x184 ) true ) ) ( = tmp80 0 ) )
+ ( implies ( and ( not x185 ) ( and x184 true ) ) ( = tmp80 6 ) )
+ ( implies ( and x185 ( and ( not x184 ) true ) ) ( = tmp80 6 ) )
+ ( implies ( and x185 ( and x184 true ) ) ( = tmp80 12 ) )
+ ( implies ( and ( not x150 ) ( and ( not x151 ) true ) ) ( = tmp79 0 ) )
+ ( implies ( and ( not x150 ) ( and x151 true ) ) ( = tmp79 2 ) )
+ ( implies ( and x150 ( and ( not x151 ) true ) ) ( = tmp79 1 ) )
+ ( implies ( and x150 ( and x151 true ) ) ( = tmp79 3 ) )
+ ( implies ( and ( not x187 ) ( and ( not x186 ) true ) ) ( = tmp78 0 ) )
+ ( implies ( and ( not x187 ) ( and x186 true ) ) ( = tmp78 6 ) )
+ ( implies ( and x187 ( and ( not x186 ) true ) ) ( = tmp78 6 ) )
+ ( implies ( and x187 ( and x186 true ) ) ( = tmp78 12 ) )
+ ( implies ( and ( not x148 ) ( and ( not x149 ) true ) ) ( = tmp77 0 ) )
+ ( implies ( and ( not x148 ) ( and x149 true ) ) ( = tmp77 2 ) )
+ ( implies ( and x148 ( and ( not x149 ) true ) ) ( = tmp77 4 ) )
+ ( implies ( and x148 ( and x149 true ) ) ( = tmp77 6 ) )
+ ( implies ( and ( not x189 ) ( and ( not x188 ) true ) ) ( = tmp76 0 ) )
+ ( implies ( and ( not x189 ) ( and x188 true ) ) ( = tmp76 4 ) )
+ ( implies ( and x189 ( and ( not x188 ) true ) ) ( = tmp76 2 ) )
+ ( implies ( and x189 ( and x188 true ) ) ( = tmp76 6 ) )
+ ( implies ( and ( not x146 ) ( and ( not x147 ) true ) ) ( = tmp75 0 ) )
+ ( implies ( and ( not x146 ) ( and x147 true ) ) ( = tmp75 4 ) )
+ ( implies ( and x146 ( and ( not x147 ) true ) ) ( = tmp75 4 ) )
+ ( implies ( and x146 ( and x147 true ) ) ( = tmp75 8 ) )
+ ( implies ( and ( not x191 ) ( and ( not x190 ) true ) ) ( = tmp74 0 ) )
+ ( implies ( and ( not x191 ) ( and x190 true ) ) ( = tmp74 2 ) )
+ ( implies ( and x191 ( and ( not x190 ) true ) ) ( = tmp74 2 ) )
+ ( implies ( and x191 ( and x190 true ) ) ( = tmp74 4 ) )
+ ( implies ( and ( not x144 ) ( and ( not x145 ) true ) ) ( = tmp73 0 ) )
+ ( implies ( and ( not x144 ) ( and x145 true ) ) ( = tmp73 4 ) )
+ ( implies ( and x144 ( and ( not x145 ) true ) ) ( = tmp73 4 ) )
+ ( implies ( and x144 ( and x145 true ) ) ( = tmp73 8 ) )
+ ( implies ( and ( not x121 ) true ) ( = tmp72 0 ) )
+ ( implies ( and x121 true ) ( = tmp72 4 ) )
+ ( implies ( and ( not x119 ) ( and ( not x120 ) true ) ) ( = tmp71 0 ) )
+ ( implies ( and ( not x119 ) ( and x120 true ) ) ( = tmp71 2 ) )
+ ( implies ( and x119 ( and ( not x120 ) true ) ) ( = tmp71 1 ) )
+ ( implies ( and x119 ( and x120 true ) ) ( = tmp71 3 ) )
+ ( implies ( and ( not x123 ) ( and ( not x122 ) true ) ) ( = tmp70 0 ) )
+ ( implies ( and ( not x123 ) ( and x122 true ) ) ( = tmp70 4 ) )
+ ( implies ( and x123 ( and ( not x122 ) true ) ) ( = tmp70 6 ) )
+ ( implies ( and x123 ( and x122 true ) ) ( = tmp70 10 ) )
+ ( implies ( and ( not x117 ) ( and ( not x118 ) true ) ) ( = tmp69 0 ) )
+ ( implies ( and ( not x117 ) ( and x118 true ) ) ( = tmp69 1 ) )
+ ( implies ( and x117 ( and ( not x118 ) true ) ) ( = tmp69 2 ) )
+ ( implies ( and x117 ( and x118 true ) ) ( = tmp69 3 ) )
+ ( implies ( and ( not x125 ) ( and ( not x124 ) true ) ) ( = tmp68 0 ) )
+ ( implies ( and ( not x125 ) ( and x124 true ) ) ( = tmp68 6 ) )
+ ( implies ( and x125 ( and ( not x124 ) true ) ) ( = tmp68 6 ) )
+ ( implies ( and x125 ( and x124 true ) ) ( = tmp68 12 ) )
+ ( implies ( and ( not x115 ) ( and ( not x116 ) true ) ) ( = tmp67 0 ) )
+ ( implies ( and ( not x115 ) ( and x116 true ) ) ( = tmp67 2 ) )
+ ( implies ( and x115 ( and ( not x116 ) true ) ) ( = tmp67 4 ) )
+ ( implies ( and x115 ( and x116 true ) ) ( = tmp67 6 ) )
+ ( implies ( and ( not x127 ) ( and ( not x126 ) true ) ) ( = tmp66 0 ) )
+ ( implies ( and ( not x127 ) ( and x126 true ) ) ( = tmp66 4 ) )
+ ( implies ( and x127 ( and ( not x126 ) true ) ) ( = tmp66 4 ) )
+ ( implies ( and x127 ( and x126 true ) ) ( = tmp66 8 ) )
+ ( implies ( and ( not x113 ) ( and ( not x114 ) true ) ) ( = tmp65 0 ) )
+ ( implies ( and ( not x113 ) ( and x114 true ) ) ( = tmp65 4 ) )
+ ( implies ( and x113 ( and ( not x114 ) true ) ) ( = tmp65 4 ) )
+ ( implies ( and x113 ( and x114 true ) ) ( = tmp65 8 ) )
+ ( implies ( and ( not x129 ) ( and ( not x128 ) true ) ) ( = tmp64 0 ) )
+ ( implies ( and ( not x129 ) ( and x128 true ) ) ( = tmp64 2 ) )
+ ( implies ( and x129 ( and ( not x128 ) true ) ) ( = tmp64 2 ) )
+ ( implies ( and x129 ( and x128 true ) ) ( = tmp64 4 ) )
+ ( implies ( and ( not x111 ) ( and ( not x112 ) true ) ) ( = tmp63 0 ) )
+ ( implies ( and ( not x111 ) ( and x112 true ) ) ( = tmp63 4 ) )
+ ( implies ( and x111 ( and ( not x112 ) true ) ) ( = tmp63 4 ) )
+ ( implies ( and x111 ( and x112 true ) ) ( = tmp63 8 ) )
+ ( implies ( and ( not x131 ) ( and ( not x130 ) true ) ) ( = tmp62 0 ) )
+ ( implies ( and ( not x131 ) ( and x130 true ) ) ( = tmp62 2 ) )
+ ( implies ( and x131 ( and ( not x130 ) true ) ) ( = tmp62 4 ) )
+ ( implies ( and x131 ( and x130 true ) ) ( = tmp62 6 ) )
+ ( implies ( and ( not x109 ) ( and ( not x110 ) true ) ) ( = tmp61 0 ) )
+ ( implies ( and ( not x109 ) ( and x110 true ) ) ( = tmp61 4 ) )
+ ( implies ( and x109 ( and ( not x110 ) true ) ) ( = tmp61 4 ) )
+ ( implies ( and x109 ( and x110 true ) ) ( = tmp61 8 ) )
+ ( implies ( and ( not x133 ) ( and ( not x132 ) true ) ) ( = tmp60 0 ) )
+ ( implies ( and ( not x133 ) ( and x132 true ) ) ( = tmp60 4 ) )
+ ( implies ( and x133 ( and ( not x132 ) true ) ) ( = tmp60 2 ) )
+ ( implies ( and x133 ( and x132 true ) ) ( = tmp60 6 ) )
+ ( implies ( and ( not x107 ) ( and ( not x108 ) true ) ) ( = tmp59 0 ) )
+ ( implies ( and ( not x107 ) ( and x108 true ) ) ( = tmp59 4 ) )
+ ( implies ( and x107 ( and ( not x108 ) true ) ) ( = tmp59 6 ) )
+ ( implies ( and x107 ( and x108 true ) ) ( = tmp59 10 ) )
+ ( implies ( and ( not x135 ) ( and ( not x134 ) true ) ) ( = tmp58 0 ) )
+ ( implies ( and ( not x135 ) ( and x134 true ) ) ( = tmp58 2 ) )
+ ( implies ( and x135 ( and ( not x134 ) true ) ) ( = tmp58 4 ) )
+ ( implies ( and x135 ( and x134 true ) ) ( = tmp58 6 ) )
+ ( implies ( and ( not x105 ) ( and ( not x106 ) true ) ) ( = tmp57 0 ) )
+ ( implies ( and ( not x105 ) ( and x106 true ) ) ( = tmp57 6 ) )
+ ( implies ( and x105 ( and ( not x106 ) true ) ) ( = tmp57 6 ) )
+ ( implies ( and x105 ( and x106 true ) ) ( = tmp57 12 ) )
+ ( implies ( and ( not x137 ) ( and ( not x136 ) true ) ) ( = tmp56 0 ) )
+ ( implies ( and ( not x137 ) ( and x136 true ) ) ( = tmp56 4 ) )
+ ( implies ( and x137 ( and ( not x136 ) true ) ) ( = tmp56 4 ) )
+ ( implies ( and x137 ( and x136 true ) ) ( = tmp56 8 ) )
+ ( implies ( and ( not x103 ) ( and ( not x104 ) true ) ) ( = tmp55 0 ) )
+ ( implies ( and ( not x103 ) ( and x104 true ) ) ( = tmp55 6 ) )
+ ( implies ( and x103 ( and ( not x104 ) true ) ) ( = tmp55 6 ) )
+ ( implies ( and x103 ( and x104 true ) ) ( = tmp55 12 ) )
+ ( implies ( and ( not x139 ) ( and ( not x138 ) true ) ) ( = tmp54 0 ) )
+ ( implies ( and ( not x139 ) ( and x138 true ) ) ( = tmp54 4 ) )
+ ( implies ( and x139 ( and ( not x138 ) true ) ) ( = tmp54 1 ) )
+ ( implies ( and x139 ( and x138 true ) ) ( = tmp54 5 ) )
+ ( implies ( and ( not x101 ) ( and ( not x102 ) true ) ) ( = tmp53 0 ) )
+ ( implies ( and ( not x101 ) ( and x102 true ) ) ( = tmp53 6 ) )
+ ( implies ( and x101 ( and ( not x102 ) true ) ) ( = tmp53 6 ) )
+ ( implies ( and x101 ( and x102 true ) ) ( = tmp53 12 ) )
+ ( implies ( and ( not x141 ) ( and ( not x140 ) true ) ) ( = tmp52 0 ) )
+ ( implies ( and ( not x141 ) ( and x140 true ) ) ( = tmp52 2 ) )
+ ( implies ( and x141 ( and ( not x140 ) true ) ) ( = tmp52 4 ) )
+ ( implies ( and x141 ( and x140 true ) ) ( = tmp52 6 ) )
+ ( implies ( and ( not x99 ) ( and ( not x100 ) true ) ) ( = tmp51 0 ) )
+ ( implies ( and ( not x99 ) ( and x100 true ) ) ( = tmp51 4 ) )
+ ( implies ( and x99 ( and ( not x100 ) true ) ) ( = tmp51 4 ) )
+ ( implies ( and x99 ( and x100 true ) ) ( = tmp51 8 ) )
+ ( implies ( and ( not x143 ) ( and ( not x142 ) true ) ) ( = tmp50 0 ) )
+ ( implies ( and ( not x143 ) ( and x142 true ) ) ( = tmp50 6 ) )
+ ( implies ( and x143 ( and ( not x142 ) true ) ) ( = tmp50 6 ) )
+ ( implies ( and x143 ( and x142 true ) ) ( = tmp50 12 ) )
+ ( implies ( and ( not x97 ) ( and ( not x98 ) true ) ) ( = tmp49 0 ) )
+ ( implies ( and ( not x97 ) ( and x98 true ) ) ( = tmp49 4 ) )
+ ( implies ( and x97 ( and ( not x98 ) true ) ) ( = tmp49 2 ) )
+ ( implies ( and x97 ( and x98 true ) ) ( = tmp49 6 ) )
+ ( implies ( and ( not x74 ) ( and ( not x73 ) true ) ) ( = tmp48 0 ) )
+ ( implies ( and ( not x74 ) ( and x73 true ) ) ( = tmp48 2 ) )
+ ( implies ( and x74 ( and ( not x73 ) true ) ) ( = tmp48 4 ) )
+ ( implies ( and x74 ( and x73 true ) ) ( = tmp48 6 ) )
+ ( implies ( and ( not x71 ) ( and ( not x72 ) true ) ) ( = tmp47 0 ) )
+ ( implies ( and ( not x71 ) ( and x72 true ) ) ( = tmp47 1 ) )
+ ( implies ( and x71 ( and ( not x72 ) true ) ) ( = tmp47 2 ) )
+ ( implies ( and x71 ( and x72 true ) ) ( = tmp47 3 ) )
+ ( implies ( and ( not x76 ) ( and ( not x75 ) true ) ) ( = tmp46 0 ) )
+ ( implies ( and ( not x76 ) ( and x75 true ) ) ( = tmp46 2 ) )
+ ( implies ( and x76 ( and ( not x75 ) true ) ) ( = tmp46 2 ) )
+ ( implies ( and x76 ( and x75 true ) ) ( = tmp46 4 ) )
+ ( implies ( and ( not x69 ) ( and ( not x70 ) true ) ) ( = tmp45 0 ) )
+ ( implies ( and ( not x69 ) ( and x70 true ) ) ( = tmp45 4 ) )
+ ( implies ( and x69 ( and ( not x70 ) true ) ) ( = tmp45 4 ) )
+ ( implies ( and x69 ( and x70 true ) ) ( = tmp45 8 ) )
+ ( implies ( and ( not x78 ) ( and ( not x77 ) true ) ) ( = tmp44 0 ) )
+ ( implies ( and ( not x78 ) ( and x77 true ) ) ( = tmp44 4 ) )
+ ( implies ( and x78 ( and ( not x77 ) true ) ) ( = tmp44 4 ) )
+ ( implies ( and x78 ( and x77 true ) ) ( = tmp44 8 ) )
+ ( implies ( and ( not x67 ) ( and ( not x68 ) true ) ) ( = tmp43 0 ) )
+ ( implies ( and ( not x67 ) ( and x68 true ) ) ( = tmp43 4 ) )
+ ( implies ( and x67 ( and ( not x68 ) true ) ) ( = tmp43 4 ) )
+ ( implies ( and x67 ( and x68 true ) ) ( = tmp43 8 ) )
+ ( implies ( and ( not x80 ) ( and ( not x79 ) true ) ) ( = tmp42 0 ) )
+ ( implies ( and ( not x80 ) ( and x79 true ) ) ( = tmp42 4 ) )
+ ( implies ( and x80 ( and ( not x79 ) true ) ) ( = tmp42 2 ) )
+ ( implies ( and x80 ( and x79 true ) ) ( = tmp42 6 ) )
+ ( implies ( and ( not x65 ) ( and ( not x66 ) true ) ) ( = tmp41 0 ) )
+ ( implies ( and ( not x65 ) ( and x66 true ) ) ( = tmp41 4 ) )
+ ( implies ( and x65 ( and ( not x66 ) true ) ) ( = tmp41 6 ) )
+ ( implies ( and x65 ( and x66 true ) ) ( = tmp41 10 ) )
+ ( implies ( and ( not x82 ) ( and ( not x81 ) true ) ) ( = tmp40 0 ) )
+ ( implies ( and ( not x82 ) ( and x81 true ) ) ( = tmp40 2 ) )
+ ( implies ( and x82 ( and ( not x81 ) true ) ) ( = tmp40 4 ) )
+ ( implies ( and x82 ( and x81 true ) ) ( = tmp40 6 ) )
+ ( implies ( and ( not x63 ) ( and ( not x64 ) true ) ) ( = tmp39 0 ) )
+ ( implies ( and ( not x63 ) ( and x64 true ) ) ( = tmp39 6 ) )
+ ( implies ( and x63 ( and ( not x64 ) true ) ) ( = tmp39 4 ) )
+ ( implies ( and x63 ( and x64 true ) ) ( = tmp39 10 ) )
+ ( implies ( and ( not x84 ) ( and ( not x83 ) true ) ) ( = tmp38 0 ) )
+ ( implies ( and ( not x84 ) ( and x83 true ) ) ( = tmp38 4 ) )
+ ( implies ( and x84 ( and ( not x83 ) true ) ) ( = tmp38 4 ) )
+ ( implies ( and x84 ( and x83 true ) ) ( = tmp38 8 ) )
+ ( implies ( and ( not x61 ) ( and ( not x62 ) true ) ) ( = tmp37 0 ) )
+ ( implies ( and ( not x61 ) ( and x62 true ) ) ( = tmp37 2 ) )
+ ( implies ( and x61 ( and ( not x62 ) true ) ) ( = tmp37 2 ) )
+ ( implies ( and x61 ( and x62 true ) ) ( = tmp37 4 ) )
+ ( implies ( and ( not x86 ) ( and ( not x85 ) true ) ) ( = tmp36 0 ) )
+ ( implies ( and ( not x86 ) ( and x85 true ) ) ( = tmp36 4 ) )
+ ( implies ( and x86 ( and ( not x85 ) true ) ) ( = tmp36 4 ) )
+ ( implies ( and x86 ( and x85 true ) ) ( = tmp36 8 ) )
+ ( implies ( and ( not x59 ) ( and ( not x60 ) true ) ) ( = tmp35 0 ) )
+ ( implies ( and ( not x59 ) ( and x60 true ) ) ( = tmp35 4 ) )
+ ( implies ( and x59 ( and ( not x60 ) true ) ) ( = tmp35 4 ) )
+ ( implies ( and x59 ( and x60 true ) ) ( = tmp35 8 ) )
+ ( implies ( and ( not x88 ) ( and ( not x87 ) true ) ) ( = tmp34 0 ) )
+ ( implies ( and ( not x88 ) ( and x87 true ) ) ( = tmp34 4 ) )
+ ( implies ( and x88 ( and ( not x87 ) true ) ) ( = tmp34 4 ) )
+ ( implies ( and x88 ( and x87 true ) ) ( = tmp34 8 ) )
+ ( implies ( and ( not x57 ) ( and ( not x58 ) true ) ) ( = tmp33 0 ) )
+ ( implies ( and ( not x57 ) ( and x58 true ) ) ( = tmp33 4 ) )
+ ( implies ( and x57 ( and ( not x58 ) true ) ) ( = tmp33 2 ) )
+ ( implies ( and x57 ( and x58 true ) ) ( = tmp33 6 ) )
+ ( implies ( and ( not x90 ) ( and ( not x89 ) true ) ) ( = tmp32 0 ) )
+ ( implies ( and ( not x90 ) ( and x89 true ) ) ( = tmp32 4 ) )
+ ( implies ( and x90 ( and ( not x89 ) true ) ) ( = tmp32 4 ) )
+ ( implies ( and x90 ( and x89 true ) ) ( = tmp32 8 ) )
+ ( implies ( and ( not x55 ) ( and ( not x56 ) true ) ) ( = tmp31 0 ) )
+ ( implies ( and ( not x55 ) ( and x56 true ) ) ( = tmp31 4 ) )
+ ( implies ( and x55 ( and ( not x56 ) true ) ) ( = tmp31 4 ) )
+ ( implies ( and x55 ( and x56 true ) ) ( = tmp31 8 ) )
+ ( implies ( and ( not x92 ) ( and ( not x91 ) true ) ) ( = tmp30 0 ) )
+ ( implies ( and ( not x92 ) ( and x91 true ) ) ( = tmp30 4 ) )
+ ( implies ( and x92 ( and ( not x91 ) true ) ) ( = tmp30 2 ) )
+ ( implies ( and x92 ( and x91 true ) ) ( = tmp30 6 ) )
+ ( implies ( and ( not x53 ) ( and ( not x54 ) true ) ) ( = tmp29 0 ) )
+ ( implies ( and ( not x53 ) ( and x54 true ) ) ( = tmp29 4 ) )
+ ( implies ( and x53 ( and ( not x54 ) true ) ) ( = tmp29 4 ) )
+ ( implies ( and x53 ( and x54 true ) ) ( = tmp29 8 ) )
+ ( implies ( and ( not x94 ) ( and ( not x93 ) true ) ) ( = tmp28 0 ) )
+ ( implies ( and ( not x94 ) ( and x93 true ) ) ( = tmp28 2 ) )
+ ( implies ( and x94 ( and ( not x93 ) true ) ) ( = tmp28 4 ) )
+ ( implies ( and x94 ( and x93 true ) ) ( = tmp28 6 ) )
+ ( implies ( and ( not x51 ) ( and ( not x52 ) true ) ) ( = tmp27 0 ) )
+ ( implies ( and ( not x51 ) ( and x52 true ) ) ( = tmp27 4 ) )
+ ( implies ( and x51 ( and ( not x52 ) true ) ) ( = tmp27 2 ) )
+ ( implies ( and x51 ( and x52 true ) ) ( = tmp27 6 ) )
+ ( implies ( and ( not x96 ) ( and ( not x95 ) true ) ) ( = tmp26 0 ) )
+ ( implies ( and ( not x96 ) ( and x95 true ) ) ( = tmp26 4 ) )
+ ( implies ( and x96 ( and ( not x95 ) true ) ) ( = tmp26 4 ) )
+ ( implies ( and x96 ( and x95 true ) ) ( = tmp26 8 ) )
+ ( implies ( and ( not x49 ) ( and ( not x50 ) true ) ) ( = tmp25 0 ) )
+ ( implies ( and ( not x49 ) ( and x50 true ) ) ( = tmp25 2 ) )
+ ( implies ( and x49 ( and ( not x50 ) true ) ) ( = tmp25 2 ) )
+ ( implies ( and x49 ( and x50 true ) ) ( = tmp25 4 ) )
+ ( implies ( and ( not x26 ) true ) ( = tmp24 0 ) )
+ ( implies ( and x26 true ) ( = tmp24 4 ) )
+ ( implies ( and ( not x24 ) ( and ( not x25 ) true ) ) ( = tmp23 0 ) )
+ ( implies ( and ( not x24 ) ( and x25 true ) ) ( = tmp23 4 ) )
+ ( implies ( and x24 ( and ( not x25 ) true ) ) ( = tmp23 2 ) )
+ ( implies ( and x24 ( and x25 true ) ) ( = tmp23 6 ) )
+ ( implies ( and ( not x28 ) ( and ( not x27 ) true ) ) ( = tmp22 0 ) )
+ ( implies ( and ( not x28 ) ( and x27 true ) ) ( = tmp22 4 ) )
+ ( implies ( and x28 ( and ( not x27 ) true ) ) ( = tmp22 4 ) )
+ ( implies ( and x28 ( and x27 true ) ) ( = tmp22 8 ) )
+ ( implies ( and ( not x22 ) ( and ( not x23 ) true ) ) ( = tmp21 0 ) )
+ ( implies ( and ( not x22 ) ( and x23 true ) ) ( = tmp21 2 ) )
+ ( implies ( and x22 ( and ( not x23 ) true ) ) ( = tmp21 2 ) )
+ ( implies ( and x22 ( and x23 true ) ) ( = tmp21 4 ) )
+ ( implies ( and ( not x30 ) ( and ( not x29 ) true ) ) ( = tmp20 0 ) )
+ ( implies ( and ( not x30 ) ( and x29 true ) ) ( = tmp20 4 ) )
+ ( implies ( and x30 ( and ( not x29 ) true ) ) ( = tmp20 2 ) )
+ ( implies ( and x30 ( and x29 true ) ) ( = tmp20 6 ) )
+ ( implies ( and ( not x20 ) ( and ( not x21 ) true ) ) ( = tmp19 0 ) )
+ ( implies ( and ( not x20 ) ( and x21 true ) ) ( = tmp19 2 ) )
+ ( implies ( and x20 ( and ( not x21 ) true ) ) ( = tmp19 2 ) )
+ ( implies ( and x20 ( and x21 true ) ) ( = tmp19 4 ) )
+ ( implies ( and ( not x32 ) ( and ( not x31 ) true ) ) ( = tmp18 0 ) )
+ ( implies ( and ( not x32 ) ( and x31 true ) ) ( = tmp18 2 ) )
+ ( implies ( and x32 ( and ( not x31 ) true ) ) ( = tmp18 2 ) )
+ ( implies ( and x32 ( and x31 true ) ) ( = tmp18 4 ) )
+ ( implies ( and ( not x18 ) ( and ( not x19 ) true ) ) ( = tmp17 0 ) )
+ ( implies ( and ( not x18 ) ( and x19 true ) ) ( = tmp17 2 ) )
+ ( implies ( and x18 ( and ( not x19 ) true ) ) ( = tmp17 1 ) )
+ ( implies ( and x18 ( and x19 true ) ) ( = tmp17 3 ) )
+ ( implies ( and ( not x34 ) ( and ( not x33 ) true ) ) ( = tmp16 0 ) )
+ ( implies ( and ( not x34 ) ( and x33 true ) ) ( = tmp16 4 ) )
+ ( implies ( and x34 ( and ( not x33 ) true ) ) ( = tmp16 4 ) )
+ ( implies ( and x34 ( and x33 true ) ) ( = tmp16 8 ) )
+ ( implies ( and ( not x16 ) ( and ( not x17 ) true ) ) ( = tmp15 0 ) )
+ ( implies ( and ( not x16 ) ( and x17 true ) ) ( = tmp15 1 ) )
+ ( implies ( and x16 ( and ( not x17 ) true ) ) ( = tmp15 2 ) )
+ ( implies ( and x16 ( and x17 true ) ) ( = tmp15 3 ) )
+ ( implies ( and ( not x36 ) ( and ( not x35 ) true ) ) ( = tmp14 0 ) )
+ ( implies ( and ( not x36 ) ( and x35 true ) ) ( = tmp14 6 ) )
+ ( implies ( and x36 ( and ( not x35 ) true ) ) ( = tmp14 6 ) )
+ ( implies ( and x36 ( and x35 true ) ) ( = tmp14 12 ) )
+ ( implies ( and ( not x14 ) ( and ( not x15 ) true ) ) ( = tmp13 0 ) )
+ ( implies ( and ( not x14 ) ( and x15 true ) ) ( = tmp13 2 ) )
+ ( implies ( and x14 ( and ( not x15 ) true ) ) ( = tmp13 2 ) )
+ ( implies ( and x14 ( and x15 true ) ) ( = tmp13 4 ) )
+ ( implies ( and ( not x38 ) ( and ( not x37 ) true ) ) ( = tmp12 0 ) )
+ ( implies ( and ( not x38 ) ( and x37 true ) ) ( = tmp12 6 ) )
+ ( implies ( and x38 ( and ( not x37 ) true ) ) ( = tmp12 6 ) )
+ ( implies ( and x38 ( and x37 true ) ) ( = tmp12 12 ) )
+ ( implies ( and ( not x12 ) ( and ( not x13 ) true ) ) ( = tmp11 0 ) )
+ ( implies ( and ( not x12 ) ( and x13 true ) ) ( = tmp11 2 ) )
+ ( implies ( and x12 ( and ( not x13 ) true ) ) ( = tmp11 2 ) )
+ ( implies ( and x12 ( and x13 true ) ) ( = tmp11 4 ) )
+ ( implies ( and ( not x40 ) ( and ( not x39 ) true ) ) ( = tmp10 0 ) )
+ ( implies ( and ( not x40 ) ( and x39 true ) ) ( = tmp10 8 ) )
+ ( implies ( and x40 ( and ( not x39 ) true ) ) ( = tmp10 6 ) )
+ ( implies ( and x40 ( and x39 true ) ) ( = tmp10 14 ) )
+ ( implies ( and ( not x10 ) ( and ( not x11 ) true ) ) ( = tmp9 0 ) )
+ ( implies ( and ( not x10 ) ( and x11 true ) ) ( = tmp9 2 ) )
+ ( implies ( and x10 ( and ( not x11 ) true ) ) ( = tmp9 2 ) )
+ ( implies ( and x10 ( and x11 true ) ) ( = tmp9 4 ) )
+ ( implies ( and ( not x42 ) ( and ( not x41 ) true ) ) ( = tmp8 0 ) )
+ ( implies ( and ( not x42 ) ( and x41 true ) ) ( = tmp8 6 ) )
+ ( implies ( and x42 ( and ( not x41 ) true ) ) ( = tmp8 6 ) )
+ ( implies ( and x42 ( and x41 true ) ) ( = tmp8 12 ) )
+ ( implies ( and ( not x8 ) ( and ( not x9 ) true ) ) ( = tmp7 0 ) )
+ ( implies ( and ( not x8 ) ( and x9 true ) ) ( = tmp7 2 ) )
+ ( implies ( and x8 ( and ( not x9 ) true ) ) ( = tmp7 4 ) )
+ ( implies ( and x8 ( and x9 true ) ) ( = tmp7 6 ) )
+ ( implies ( and ( not x44 ) ( and ( not x43 ) true ) ) ( = tmp6 0 ) )
+ ( implies ( and ( not x44 ) ( and x43 true ) ) ( = tmp6 6 ) )
+ ( implies ( and x44 ( and ( not x43 ) true ) ) ( = tmp6 4 ) )
+ ( implies ( and x44 ( and x43 true ) ) ( = tmp6 10 ) )
+ ( implies ( and ( not x6 ) ( and ( not x7 ) true ) ) ( = tmp5 0 ) )
+ ( implies ( and ( not x6 ) ( and x7 true ) ) ( = tmp5 4 ) )
+ ( implies ( and x6 ( and ( not x7 ) true ) ) ( = tmp5 4 ) )
+ ( implies ( and x6 ( and x7 true ) ) ( = tmp5 8 ) )
+ ( implies ( and ( not x46 ) ( and ( not x45 ) true ) ) ( = tmp4 0 ) )
+ ( implies ( and ( not x46 ) ( and x45 true ) ) ( = tmp4 4 ) )
+ ( implies ( and x46 ( and ( not x45 ) true ) ) ( = tmp4 4 ) )
+ ( implies ( and x46 ( and x45 true ) ) ( = tmp4 8 ) )
+ ( implies ( and ( not x4 ) ( and ( not x5 ) true ) ) ( = tmp3 0 ) )
+ ( implies ( and ( not x4 ) ( and x5 true ) ) ( = tmp3 4 ) )
+ ( implies ( and x4 ( and ( not x5 ) true ) ) ( = tmp3 4 ) )
+ ( implies ( and x4 ( and x5 true ) ) ( = tmp3 8 ) )
+ ( implies ( and ( not x48 ) ( and ( not x47 ) true ) ) ( = tmp2 0 ) )
+ ( implies ( and ( not x48 ) ( and x47 true ) ) ( = tmp2 4 ) )
+ ( implies ( and x48 ( and ( not x47 ) true ) ) ( = tmp2 4 ) )
+ ( implies ( and x48 ( and x47 true ) ) ( = tmp2 8 ) )
+ ( implies ( and ( not x2 ) ( and ( not x3 ) true ) ) ( = tmp1 0 ) )
+ ( implies ( and ( not x2 ) ( and x3 true ) ) ( = tmp1 4 ) )
+ ( implies ( and x2 ( and ( not x3 ) true ) ) ( = tmp1 4 ) )
+ ( implies ( and x2 ( and x3 true ) ) ( = tmp1 8 ) )
+ )
+)
diff --git a/test/regress/regress0/arith/miplib-opt1217--27.smt.expect b/test/regress/regress0/arith/miplib-opt1217--27.smt.expect
new file mode 100644
index 000000000..f6ae1d85b
--- /dev/null
+++ b/test/regress/regress0/arith/miplib-opt1217--27.smt.expect
@@ -0,0 +1,3 @@
+% COMMAND-LINE: --enable-miplib-trick
+% EXPECT: unsat
+% EXIT: 20
diff --git a/test/regress/regress0/arith/miplib-opt1217--27.smt2 b/test/regress/regress0/arith/miplib-opt1217--27.smt2
new file mode 100644
index 000000000..e6ac8e69e
--- /dev/null
+++ b/test/regress/regress0/arith/miplib-opt1217--27.smt2
@@ -0,0 +1,1550 @@
+; COMMAND-LINE: --enable-miplib-trick
+; EXPECT: unsat
+; EXIT: 20
+(set-logic QF_LRA)
+(set-info :source |
+Relaxation of the Mixed-Integer Programming
+optimization problem opt1217 from the MIPLIB (http://miplib.zib.de/)
+by Enric Rodriguez-Carbonell (erodri@lsi.upc.edu)
+|)
+(set-info :smt-lib-version 2.0)
+(set-info :category "industrial")
+(set-info :status unsat)
+(declare-fun tmp766 () Real)
+(declare-fun tmp765 () Real)
+(declare-fun tmp764 () Real)
+(declare-fun tmp763 () Real)
+(declare-fun tmp762 () Real)
+(declare-fun tmp761 () Real)
+(declare-fun tmp760 () Real)
+(declare-fun tmp759 () Real)
+(declare-fun tmp758 () Real)
+(declare-fun tmp757 () Real)
+(declare-fun tmp756 () Real)
+(declare-fun tmp755 () Real)
+(declare-fun tmp754 () Real)
+(declare-fun tmp753 () Real)
+(declare-fun tmp752 () Real)
+(declare-fun tmp751 () Real)
+(declare-fun tmp750 () Real)
+(declare-fun tmp749 () Real)
+(declare-fun tmp748 () Real)
+(declare-fun tmp747 () Real)
+(declare-fun tmp746 () Real)
+(declare-fun tmp745 () Real)
+(declare-fun tmp744 () Real)
+(declare-fun tmp743 () Real)
+(declare-fun tmp742 () Real)
+(declare-fun tmp741 () Real)
+(declare-fun tmp740 () Real)
+(declare-fun tmp739 () Real)
+(declare-fun tmp738 () Real)
+(declare-fun tmp737 () Real)
+(declare-fun tmp736 () Real)
+(declare-fun tmp735 () Real)
+(declare-fun tmp734 () Real)
+(declare-fun tmp733 () Real)
+(declare-fun tmp732 () Real)
+(declare-fun tmp731 () Real)
+(declare-fun tmp730 () Real)
+(declare-fun tmp729 () Real)
+(declare-fun tmp728 () Real)
+(declare-fun tmp727 () Real)
+(declare-fun tmp726 () Real)
+(declare-fun tmp725 () Real)
+(declare-fun tmp724 () Real)
+(declare-fun tmp723 () Real)
+(declare-fun tmp722 () Real)
+(declare-fun tmp721 () Real)
+(declare-fun tmp720 () Real)
+(declare-fun tmp719 () Real)
+(declare-fun tmp718 () Real)
+(declare-fun tmp717 () Real)
+(declare-fun tmp716 () Real)
+(declare-fun tmp715 () Real)
+(declare-fun tmp714 () Real)
+(declare-fun tmp713 () Real)
+(declare-fun tmp712 () Real)
+(declare-fun tmp711 () Real)
+(declare-fun tmp710 () Real)
+(declare-fun tmp709 () Real)
+(declare-fun tmp708 () Real)
+(declare-fun tmp707 () Real)
+(declare-fun tmp706 () Real)
+(declare-fun tmp705 () Real)
+(declare-fun tmp704 () Real)
+(declare-fun tmp703 () Real)
+(declare-fun tmp702 () Real)
+(declare-fun tmp701 () Real)
+(declare-fun tmp700 () Real)
+(declare-fun tmp699 () Real)
+(declare-fun tmp698 () Real)
+(declare-fun tmp697 () Real)
+(declare-fun tmp696 () Real)
+(declare-fun tmp695 () Real)
+(declare-fun tmp694 () Real)
+(declare-fun tmp693 () Real)
+(declare-fun tmp692 () Real)
+(declare-fun tmp691 () Real)
+(declare-fun tmp690 () Real)
+(declare-fun tmp689 () Real)
+(declare-fun tmp688 () Real)
+(declare-fun tmp687 () Real)
+(declare-fun tmp686 () Real)
+(declare-fun tmp685 () Real)
+(declare-fun tmp684 () Real)
+(declare-fun tmp683 () Real)
+(declare-fun tmp682 () Real)
+(declare-fun tmp681 () Real)
+(declare-fun tmp680 () Real)
+(declare-fun tmp679 () Real)
+(declare-fun tmp678 () Real)
+(declare-fun tmp677 () Real)
+(declare-fun tmp676 () Real)
+(declare-fun tmp675 () Real)
+(declare-fun tmp674 () Real)
+(declare-fun tmp673 () Real)
+(declare-fun tmp672 () Real)
+(declare-fun tmp671 () Real)
+(declare-fun tmp670 () Real)
+(declare-fun tmp669 () Real)
+(declare-fun tmp668 () Real)
+(declare-fun tmp667 () Real)
+(declare-fun tmp666 () Real)
+(declare-fun tmp665 () Real)
+(declare-fun tmp664 () Real)
+(declare-fun tmp663 () Real)
+(declare-fun tmp662 () Real)
+(declare-fun tmp661 () Real)
+(declare-fun tmp660 () Real)
+(declare-fun tmp659 () Real)
+(declare-fun tmp658 () Real)
+(declare-fun tmp657 () Real)
+(declare-fun tmp656 () Real)
+(declare-fun tmp655 () Real)
+(declare-fun tmp654 () Real)
+(declare-fun tmp653 () Real)
+(declare-fun tmp652 () Real)
+(declare-fun tmp651 () Real)
+(declare-fun tmp650 () Real)
+(declare-fun tmp649 () Real)
+(declare-fun tmp648 () Real)
+(declare-fun tmp647 () Real)
+(declare-fun tmp646 () Real)
+(declare-fun tmp645 () Real)
+(declare-fun tmp644 () Real)
+(declare-fun tmp643 () Real)
+(declare-fun tmp642 () Real)
+(declare-fun tmp641 () Real)
+(declare-fun tmp640 () Real)
+(declare-fun tmp639 () Real)
+(declare-fun tmp638 () Real)
+(declare-fun tmp637 () Real)
+(declare-fun tmp636 () Real)
+(declare-fun tmp635 () Real)
+(declare-fun tmp634 () Real)
+(declare-fun tmp633 () Real)
+(declare-fun tmp632 () Real)
+(declare-fun tmp631 () Real)
+(declare-fun tmp630 () Real)
+(declare-fun tmp629 () Real)
+(declare-fun tmp628 () Real)
+(declare-fun tmp627 () Real)
+(declare-fun tmp626 () Real)
+(declare-fun tmp625 () Real)
+(declare-fun tmp624 () Real)
+(declare-fun tmp623 () Real)
+(declare-fun tmp622 () Real)
+(declare-fun tmp621 () Real)
+(declare-fun tmp620 () Real)
+(declare-fun tmp619 () Real)
+(declare-fun tmp618 () Real)
+(declare-fun tmp617 () Real)
+(declare-fun tmp616 () Real)
+(declare-fun tmp615 () Real)
+(declare-fun tmp614 () Real)
+(declare-fun tmp613 () Real)
+(declare-fun tmp612 () Real)
+(declare-fun tmp611 () Real)
+(declare-fun tmp610 () Real)
+(declare-fun tmp609 () Real)
+(declare-fun tmp608 () Real)
+(declare-fun tmp607 () Real)
+(declare-fun tmp606 () Real)
+(declare-fun tmp605 () Real)
+(declare-fun tmp604 () Real)
+(declare-fun tmp603 () Real)
+(declare-fun tmp602 () Real)
+(declare-fun tmp601 () Real)
+(declare-fun tmp600 () Real)
+(declare-fun tmp599 () Real)
+(declare-fun tmp598 () Real)
+(declare-fun tmp597 () Real)
+(declare-fun tmp596 () Real)
+(declare-fun tmp595 () Real)
+(declare-fun tmp594 () Real)
+(declare-fun tmp593 () Real)
+(declare-fun tmp592 () Real)
+(declare-fun tmp591 () Real)
+(declare-fun tmp590 () Real)
+(declare-fun tmp589 () Real)
+(declare-fun tmp588 () Real)
+(declare-fun tmp587 () Real)
+(declare-fun tmp586 () Real)
+(declare-fun tmp585 () Real)
+(declare-fun tmp584 () Real)
+(declare-fun tmp583 () Real)
+(declare-fun tmp582 () Real)
+(declare-fun tmp581 () Real)
+(declare-fun tmp580 () Real)
+(declare-fun tmp579 () Real)
+(declare-fun tmp578 () Real)
+(declare-fun tmp577 () Real)
+(declare-fun tmp576 () Real)
+(declare-fun tmp575 () Real)
+(declare-fun tmp574 () Real)
+(declare-fun tmp573 () Real)
+(declare-fun tmp572 () Real)
+(declare-fun tmp571 () Real)
+(declare-fun tmp570 () Real)
+(declare-fun tmp569 () Real)
+(declare-fun tmp568 () Real)
+(declare-fun tmp567 () Real)
+(declare-fun tmp566 () Real)
+(declare-fun tmp565 () Real)
+(declare-fun tmp564 () Real)
+(declare-fun tmp563 () Real)
+(declare-fun tmp562 () Real)
+(declare-fun tmp561 () Real)
+(declare-fun tmp560 () Real)
+(declare-fun tmp559 () Real)
+(declare-fun tmp558 () Real)
+(declare-fun tmp557 () Real)
+(declare-fun tmp556 () Real)
+(declare-fun tmp555 () Real)
+(declare-fun tmp554 () Real)
+(declare-fun tmp553 () Real)
+(declare-fun tmp552 () Real)
+(declare-fun tmp551 () Real)
+(declare-fun tmp550 () Real)
+(declare-fun tmp549 () Real)
+(declare-fun tmp548 () Real)
+(declare-fun tmp547 () Real)
+(declare-fun tmp546 () Real)
+(declare-fun tmp545 () Real)
+(declare-fun tmp544 () Real)
+(declare-fun tmp543 () Real)
+(declare-fun tmp542 () Real)
+(declare-fun tmp541 () Real)
+(declare-fun tmp540 () Real)
+(declare-fun tmp539 () Real)
+(declare-fun tmp538 () Real)
+(declare-fun tmp537 () Real)
+(declare-fun tmp536 () Real)
+(declare-fun tmp535 () Real)
+(declare-fun tmp534 () Real)
+(declare-fun tmp533 () Real)
+(declare-fun tmp532 () Real)
+(declare-fun tmp531 () Real)
+(declare-fun tmp530 () Real)
+(declare-fun tmp529 () Real)
+(declare-fun tmp528 () Real)
+(declare-fun tmp527 () Real)
+(declare-fun tmp526 () Real)
+(declare-fun tmp525 () Real)
+(declare-fun tmp524 () Real)
+(declare-fun tmp523 () Real)
+(declare-fun tmp522 () Real)
+(declare-fun tmp521 () Real)
+(declare-fun tmp520 () Real)
+(declare-fun tmp519 () Real)
+(declare-fun tmp518 () Real)
+(declare-fun tmp517 () Real)
+(declare-fun tmp516 () Real)
+(declare-fun tmp515 () Real)
+(declare-fun tmp514 () Real)
+(declare-fun tmp513 () Real)
+(declare-fun tmp512 () Real)
+(declare-fun tmp511 () Real)
+(declare-fun tmp510 () Real)
+(declare-fun tmp509 () Real)
+(declare-fun tmp508 () Real)
+(declare-fun tmp507 () Real)
+(declare-fun tmp506 () Real)
+(declare-fun tmp505 () Real)
+(declare-fun tmp504 () Real)
+(declare-fun tmp503 () Real)
+(declare-fun tmp502 () Real)
+(declare-fun tmp501 () Real)
+(declare-fun tmp500 () Real)
+(declare-fun tmp499 () Real)
+(declare-fun tmp498 () Real)
+(declare-fun tmp497 () Real)
+(declare-fun tmp496 () Real)
+(declare-fun tmp495 () Real)
+(declare-fun tmp494 () Real)
+(declare-fun tmp493 () Real)
+(declare-fun tmp492 () Real)
+(declare-fun tmp491 () Real)
+(declare-fun tmp490 () Real)
+(declare-fun tmp489 () Real)
+(declare-fun tmp488 () Real)
+(declare-fun tmp487 () Real)
+(declare-fun tmp486 () Real)
+(declare-fun tmp485 () Real)
+(declare-fun tmp484 () Real)
+(declare-fun tmp483 () Real)
+(declare-fun tmp482 () Real)
+(declare-fun tmp481 () Real)
+(declare-fun tmp480 () Real)
+(declare-fun tmp479 () Real)
+(declare-fun tmp478 () Real)
+(declare-fun tmp477 () Real)
+(declare-fun tmp476 () Real)
+(declare-fun tmp475 () Real)
+(declare-fun tmp474 () Real)
+(declare-fun tmp473 () Real)
+(declare-fun tmp472 () Real)
+(declare-fun tmp471 () Real)
+(declare-fun tmp470 () Real)
+(declare-fun tmp469 () Real)
+(declare-fun tmp468 () Real)
+(declare-fun tmp467 () Real)
+(declare-fun tmp466 () Real)
+(declare-fun tmp465 () Real)
+(declare-fun tmp464 () Real)
+(declare-fun tmp463 () Real)
+(declare-fun tmp462 () Real)
+(declare-fun tmp461 () Real)
+(declare-fun tmp460 () Real)
+(declare-fun tmp459 () Real)
+(declare-fun tmp458 () Real)
+(declare-fun tmp457 () Real)
+(declare-fun tmp456 () Real)
+(declare-fun tmp455 () Real)
+(declare-fun tmp454 () Real)
+(declare-fun tmp453 () Real)
+(declare-fun tmp452 () Real)
+(declare-fun tmp451 () Real)
+(declare-fun tmp450 () Real)
+(declare-fun tmp449 () Real)
+(declare-fun tmp448 () Real)
+(declare-fun tmp447 () Real)
+(declare-fun tmp446 () Real)
+(declare-fun tmp445 () Real)
+(declare-fun tmp444 () Real)
+(declare-fun tmp443 () Real)
+(declare-fun tmp442 () Real)
+(declare-fun tmp441 () Real)
+(declare-fun tmp440 () Real)
+(declare-fun tmp439 () Real)
+(declare-fun tmp438 () Real)
+(declare-fun tmp437 () Real)
+(declare-fun tmp436 () Real)
+(declare-fun tmp435 () Real)
+(declare-fun tmp434 () Real)
+(declare-fun tmp433 () Real)
+(declare-fun tmp432 () Real)
+(declare-fun tmp431 () Real)
+(declare-fun tmp430 () Real)
+(declare-fun tmp429 () Real)
+(declare-fun tmp428 () Real)
+(declare-fun tmp427 () Real)
+(declare-fun tmp426 () Real)
+(declare-fun tmp425 () Real)
+(declare-fun tmp424 () Real)
+(declare-fun tmp423 () Real)
+(declare-fun tmp422 () Real)
+(declare-fun tmp421 () Real)
+(declare-fun tmp420 () Real)
+(declare-fun tmp419 () Real)
+(declare-fun tmp418 () Real)
+(declare-fun tmp417 () Real)
+(declare-fun tmp416 () Real)
+(declare-fun tmp415 () Real)
+(declare-fun tmp414 () Real)
+(declare-fun tmp413 () Real)
+(declare-fun tmp412 () Real)
+(declare-fun tmp411 () Real)
+(declare-fun tmp410 () Real)
+(declare-fun tmp409 () Real)
+(declare-fun tmp408 () Real)
+(declare-fun tmp407 () Real)
+(declare-fun tmp406 () Real)
+(declare-fun tmp405 () Real)
+(declare-fun tmp404 () Real)
+(declare-fun tmp403 () Real)
+(declare-fun tmp402 () Real)
+(declare-fun tmp401 () Real)
+(declare-fun tmp400 () Real)
+(declare-fun tmp399 () Real)
+(declare-fun tmp398 () Real)
+(declare-fun tmp397 () Real)
+(declare-fun tmp396 () Real)
+(declare-fun tmp395 () Real)
+(declare-fun tmp394 () Real)
+(declare-fun tmp393 () Real)
+(declare-fun tmp392 () Real)
+(declare-fun tmp391 () Real)
+(declare-fun tmp390 () Real)
+(declare-fun tmp389 () Real)
+(declare-fun tmp388 () Real)
+(declare-fun tmp387 () Real)
+(declare-fun tmp386 () Real)
+(declare-fun tmp385 () Real)
+(declare-fun tmp384 () Real)
+(declare-fun tmp383 () Real)
+(declare-fun tmp382 () Real)
+(declare-fun tmp381 () Real)
+(declare-fun tmp380 () Real)
+(declare-fun tmp379 () Real)
+(declare-fun tmp378 () Real)
+(declare-fun tmp377 () Real)
+(declare-fun tmp376 () Real)
+(declare-fun tmp375 () Real)
+(declare-fun tmp374 () Real)
+(declare-fun tmp373 () Real)
+(declare-fun tmp372 () Real)
+(declare-fun tmp371 () Real)
+(declare-fun tmp370 () Real)
+(declare-fun tmp369 () Real)
+(declare-fun tmp368 () Real)
+(declare-fun tmp367 () Real)
+(declare-fun tmp366 () Real)
+(declare-fun tmp365 () Real)
+(declare-fun tmp364 () Real)
+(declare-fun tmp363 () Real)
+(declare-fun tmp362 () Real)
+(declare-fun tmp361 () Real)
+(declare-fun tmp360 () Real)
+(declare-fun tmp359 () Real)
+(declare-fun tmp358 () Real)
+(declare-fun tmp357 () Real)
+(declare-fun tmp356 () Real)
+(declare-fun tmp355 () Real)
+(declare-fun tmp354 () Real)
+(declare-fun tmp353 () Real)
+(declare-fun tmp352 () Real)
+(declare-fun tmp351 () Real)
+(declare-fun tmp350 () Real)
+(declare-fun tmp349 () Real)
+(declare-fun tmp348 () Real)
+(declare-fun tmp347 () Real)
+(declare-fun tmp346 () Real)
+(declare-fun tmp345 () Real)
+(declare-fun tmp344 () Real)
+(declare-fun tmp343 () Real)
+(declare-fun tmp342 () Real)
+(declare-fun tmp341 () Real)
+(declare-fun tmp340 () Real)
+(declare-fun tmp339 () Real)
+(declare-fun tmp338 () Real)
+(declare-fun tmp337 () Real)
+(declare-fun tmp336 () Real)
+(declare-fun tmp335 () Real)
+(declare-fun tmp334 () Real)
+(declare-fun tmp333 () Real)
+(declare-fun tmp332 () Real)
+(declare-fun tmp331 () Real)
+(declare-fun tmp330 () Real)
+(declare-fun tmp329 () Real)
+(declare-fun tmp328 () Real)
+(declare-fun tmp327 () Real)
+(declare-fun tmp326 () Real)
+(declare-fun tmp325 () Real)
+(declare-fun tmp324 () Real)
+(declare-fun tmp323 () Real)
+(declare-fun tmp322 () Real)
+(declare-fun tmp321 () Real)
+(declare-fun tmp320 () Real)
+(declare-fun tmp319 () Real)
+(declare-fun tmp318 () Real)
+(declare-fun tmp317 () Real)
+(declare-fun tmp316 () Real)
+(declare-fun tmp315 () Real)
+(declare-fun tmp314 () Real)
+(declare-fun tmp313 () Real)
+(declare-fun tmp312 () Real)
+(declare-fun tmp311 () Real)
+(declare-fun tmp310 () Real)
+(declare-fun tmp309 () Real)
+(declare-fun tmp308 () Real)
+(declare-fun tmp307 () Real)
+(declare-fun tmp306 () Real)
+(declare-fun tmp305 () Real)
+(declare-fun tmp304 () Real)
+(declare-fun tmp303 () Real)
+(declare-fun tmp302 () Real)
+(declare-fun tmp301 () Real)
+(declare-fun tmp300 () Real)
+(declare-fun tmp299 () Real)
+(declare-fun tmp298 () Real)
+(declare-fun tmp297 () Real)
+(declare-fun tmp296 () Real)
+(declare-fun tmp295 () Real)
+(declare-fun tmp294 () Real)
+(declare-fun tmp293 () Real)
+(declare-fun tmp292 () Real)
+(declare-fun tmp291 () Real)
+(declare-fun tmp290 () Real)
+(declare-fun tmp289 () Real)
+(declare-fun tmp288 () Real)
+(declare-fun tmp287 () Real)
+(declare-fun tmp286 () Real)
+(declare-fun tmp285 () Real)
+(declare-fun tmp284 () Real)
+(declare-fun tmp283 () Real)
+(declare-fun tmp282 () Real)
+(declare-fun tmp281 () Real)
+(declare-fun tmp280 () Real)
+(declare-fun tmp279 () Real)
+(declare-fun tmp278 () Real)
+(declare-fun tmp277 () Real)
+(declare-fun tmp276 () Real)
+(declare-fun tmp275 () Real)
+(declare-fun tmp274 () Real)
+(declare-fun tmp273 () Real)
+(declare-fun tmp272 () Real)
+(declare-fun tmp271 () Real)
+(declare-fun tmp270 () Real)
+(declare-fun tmp269 () Real)
+(declare-fun tmp268 () Real)
+(declare-fun tmp267 () Real)
+(declare-fun tmp266 () Real)
+(declare-fun tmp265 () Real)
+(declare-fun tmp264 () Real)
+(declare-fun tmp263 () Real)
+(declare-fun tmp262 () Real)
+(declare-fun tmp261 () Real)
+(declare-fun tmp260 () Real)
+(declare-fun tmp259 () Real)
+(declare-fun tmp258 () Real)
+(declare-fun tmp257 () Real)
+(declare-fun tmp256 () Real)
+(declare-fun tmp255 () Real)
+(declare-fun tmp254 () Real)
+(declare-fun tmp253 () Real)
+(declare-fun tmp252 () Real)
+(declare-fun tmp251 () Real)
+(declare-fun tmp250 () Real)
+(declare-fun tmp249 () Real)
+(declare-fun tmp248 () Real)
+(declare-fun tmp247 () Real)
+(declare-fun tmp246 () Real)
+(declare-fun tmp245 () Real)
+(declare-fun tmp244 () Real)
+(declare-fun tmp243 () Real)
+(declare-fun tmp242 () Real)
+(declare-fun tmp241 () Real)
+(declare-fun tmp240 () Real)
+(declare-fun tmp239 () Real)
+(declare-fun tmp238 () Real)
+(declare-fun tmp237 () Real)
+(declare-fun tmp236 () Real)
+(declare-fun tmp235 () Real)
+(declare-fun tmp234 () Real)
+(declare-fun tmp233 () Real)
+(declare-fun tmp232 () Real)
+(declare-fun tmp231 () Real)
+(declare-fun tmp230 () Real)
+(declare-fun tmp229 () Real)
+(declare-fun tmp228 () Real)
+(declare-fun tmp227 () Real)
+(declare-fun tmp226 () Real)
+(declare-fun tmp225 () Real)
+(declare-fun tmp224 () Real)
+(declare-fun tmp223 () Real)
+(declare-fun tmp222 () Real)
+(declare-fun tmp221 () Real)
+(declare-fun tmp220 () Real)
+(declare-fun tmp219 () Real)
+(declare-fun tmp218 () Real)
+(declare-fun tmp217 () Real)
+(declare-fun tmp216 () Real)
+(declare-fun tmp215 () Real)
+(declare-fun tmp214 () Real)
+(declare-fun tmp213 () Real)
+(declare-fun tmp212 () Real)
+(declare-fun tmp211 () Real)
+(declare-fun tmp210 () Real)
+(declare-fun tmp209 () Real)
+(declare-fun tmp208 () Real)
+(declare-fun tmp207 () Real)
+(declare-fun tmp206 () Real)
+(declare-fun tmp205 () Real)
+(declare-fun tmp204 () Real)
+(declare-fun tmp203 () Real)
+(declare-fun tmp202 () Real)
+(declare-fun tmp201 () Real)
+(declare-fun tmp200 () Real)
+(declare-fun tmp199 () Real)
+(declare-fun tmp198 () Real)
+(declare-fun tmp197 () Real)
+(declare-fun tmp196 () Real)
+(declare-fun tmp195 () Real)
+(declare-fun tmp194 () Real)
+(declare-fun tmp193 () Real)
+(declare-fun tmp192 () Real)
+(declare-fun tmp191 () Real)
+(declare-fun tmp190 () Real)
+(declare-fun tmp189 () Real)
+(declare-fun tmp188 () Real)
+(declare-fun tmp187 () Real)
+(declare-fun tmp186 () Real)
+(declare-fun tmp185 () Real)
+(declare-fun tmp184 () Real)
+(declare-fun tmp183 () Real)
+(declare-fun tmp182 () Real)
+(declare-fun tmp181 () Real)
+(declare-fun tmp180 () Real)
+(declare-fun tmp179 () Real)
+(declare-fun tmp178 () Real)
+(declare-fun tmp177 () Real)
+(declare-fun tmp176 () Real)
+(declare-fun tmp175 () Real)
+(declare-fun tmp174 () Real)
+(declare-fun tmp173 () Real)
+(declare-fun tmp172 () Real)
+(declare-fun tmp171 () Real)
+(declare-fun tmp170 () Real)
+(declare-fun tmp169 () Real)
+(declare-fun tmp168 () Real)
+(declare-fun tmp167 () Real)
+(declare-fun tmp166 () Real)
+(declare-fun tmp165 () Real)
+(declare-fun tmp164 () Real)
+(declare-fun tmp163 () Real)
+(declare-fun tmp162 () Real)
+(declare-fun tmp161 () Real)
+(declare-fun tmp160 () Real)
+(declare-fun tmp159 () Real)
+(declare-fun tmp158 () Real)
+(declare-fun tmp157 () Real)
+(declare-fun tmp156 () Real)
+(declare-fun tmp155 () Real)
+(declare-fun tmp154 () Real)
+(declare-fun tmp153 () Real)
+(declare-fun tmp152 () Real)
+(declare-fun tmp151 () Real)
+(declare-fun tmp150 () Real)
+(declare-fun tmp149 () Real)
+(declare-fun tmp148 () Real)
+(declare-fun tmp147 () Real)
+(declare-fun tmp146 () Real)
+(declare-fun tmp145 () Real)
+(declare-fun tmp144 () Real)
+(declare-fun tmp143 () Real)
+(declare-fun tmp142 () Real)
+(declare-fun tmp141 () Real)
+(declare-fun tmp140 () Real)
+(declare-fun tmp139 () Real)
+(declare-fun tmp138 () Real)
+(declare-fun tmp137 () Real)
+(declare-fun tmp136 () Real)
+(declare-fun tmp135 () Real)
+(declare-fun tmp134 () Real)
+(declare-fun tmp133 () Real)
+(declare-fun tmp132 () Real)
+(declare-fun tmp131 () Real)
+(declare-fun tmp130 () Real)
+(declare-fun tmp129 () Real)
+(declare-fun tmp128 () Real)
+(declare-fun tmp127 () Real)
+(declare-fun tmp126 () Real)
+(declare-fun tmp125 () Real)
+(declare-fun tmp124 () Real)
+(declare-fun tmp123 () Real)
+(declare-fun tmp122 () Real)
+(declare-fun tmp121 () Real)
+(declare-fun tmp120 () Real)
+(declare-fun tmp119 () Real)
+(declare-fun tmp118 () Real)
+(declare-fun tmp117 () Real)
+(declare-fun tmp116 () Real)
+(declare-fun tmp115 () Real)
+(declare-fun tmp114 () Real)
+(declare-fun tmp113 () Real)
+(declare-fun tmp112 () Real)
+(declare-fun tmp111 () Real)
+(declare-fun tmp110 () Real)
+(declare-fun tmp109 () Real)
+(declare-fun tmp108 () Real)
+(declare-fun tmp107 () Real)
+(declare-fun tmp106 () Real)
+(declare-fun tmp105 () Real)
+(declare-fun tmp104 () Real)
+(declare-fun tmp103 () Real)
+(declare-fun tmp102 () Real)
+(declare-fun tmp101 () Real)
+(declare-fun tmp100 () Real)
+(declare-fun tmp99 () Real)
+(declare-fun tmp98 () Real)
+(declare-fun tmp97 () Real)
+(declare-fun tmp96 () Real)
+(declare-fun tmp95 () Real)
+(declare-fun tmp94 () Real)
+(declare-fun tmp93 () Real)
+(declare-fun tmp92 () Real)
+(declare-fun tmp91 () Real)
+(declare-fun tmp90 () Real)
+(declare-fun tmp89 () Real)
+(declare-fun tmp88 () Real)
+(declare-fun tmp87 () Real)
+(declare-fun tmp86 () Real)
+(declare-fun tmp85 () Real)
+(declare-fun tmp84 () Real)
+(declare-fun tmp83 () Real)
+(declare-fun tmp82 () Real)
+(declare-fun tmp81 () Real)
+(declare-fun tmp80 () Real)
+(declare-fun tmp79 () Real)
+(declare-fun tmp78 () Real)
+(declare-fun tmp77 () Real)
+(declare-fun tmp76 () Real)
+(declare-fun tmp75 () Real)
+(declare-fun tmp74 () Real)
+(declare-fun tmp73 () Real)
+(declare-fun tmp72 () Real)
+(declare-fun tmp71 () Real)
+(declare-fun tmp70 () Real)
+(declare-fun tmp69 () Real)
+(declare-fun tmp68 () Real)
+(declare-fun tmp67 () Real)
+(declare-fun tmp66 () Real)
+(declare-fun tmp65 () Real)
+(declare-fun tmp64 () Real)
+(declare-fun tmp63 () Real)
+(declare-fun tmp62 () Real)
+(declare-fun tmp61 () Real)
+(declare-fun tmp60 () Real)
+(declare-fun tmp59 () Real)
+(declare-fun tmp58 () Real)
+(declare-fun tmp57 () Real)
+(declare-fun tmp56 () Real)
+(declare-fun tmp55 () Real)
+(declare-fun tmp54 () Real)
+(declare-fun tmp53 () Real)
+(declare-fun tmp52 () Real)
+(declare-fun tmp51 () Real)
+(declare-fun tmp50 () Real)
+(declare-fun tmp49 () Real)
+(declare-fun tmp48 () Real)
+(declare-fun tmp47 () Real)
+(declare-fun tmp46 () Real)
+(declare-fun tmp45 () Real)
+(declare-fun tmp44 () Real)
+(declare-fun tmp43 () Real)
+(declare-fun tmp42 () Real)
+(declare-fun tmp41 () Real)
+(declare-fun tmp40 () Real)
+(declare-fun tmp39 () Real)
+(declare-fun tmp38 () Real)
+(declare-fun tmp37 () Real)
+(declare-fun tmp36 () Real)
+(declare-fun tmp35 () Real)
+(declare-fun tmp34 () Real)
+(declare-fun tmp33 () Real)
+(declare-fun tmp32 () Real)
+(declare-fun tmp31 () Real)
+(declare-fun tmp30 () Real)
+(declare-fun tmp29 () Real)
+(declare-fun tmp28 () Real)
+(declare-fun tmp27 () Real)
+(declare-fun tmp26 () Real)
+(declare-fun tmp25 () Real)
+(declare-fun tmp24 () Real)
+(declare-fun tmp23 () Real)
+(declare-fun tmp22 () Real)
+(declare-fun tmp21 () Real)
+(declare-fun tmp20 () Real)
+(declare-fun tmp19 () Real)
+(declare-fun tmp18 () Real)
+(declare-fun tmp17 () Real)
+(declare-fun tmp16 () Real)
+(declare-fun tmp15 () Real)
+(declare-fun tmp14 () Real)
+(declare-fun tmp13 () Real)
+(declare-fun tmp12 () Real)
+(declare-fun tmp11 () Real)
+(declare-fun tmp10 () Real)
+(declare-fun tmp9 () Real)
+(declare-fun tmp8 () Real)
+(declare-fun tmp7 () Real)
+(declare-fun tmp6 () Real)
+(declare-fun tmp5 () Real)
+(declare-fun tmp4 () Real)
+(declare-fun tmp3 () Real)
+(declare-fun tmp2 () Real)
+(declare-fun tmp1 () Real)
+(declare-fun x1 () Real)
+(declare-fun x2 () Bool)
+(declare-fun x3 () Bool)
+(declare-fun x4 () Bool)
+(declare-fun x5 () Bool)
+(declare-fun x6 () Bool)
+(declare-fun x7 () Bool)
+(declare-fun x8 () Bool)
+(declare-fun x9 () Bool)
+(declare-fun x10 () Bool)
+(declare-fun x11 () Bool)
+(declare-fun x12 () Bool)
+(declare-fun x13 () Bool)
+(declare-fun x14 () Bool)
+(declare-fun x15 () Bool)
+(declare-fun x16 () Bool)
+(declare-fun x17 () Bool)
+(declare-fun x18 () Bool)
+(declare-fun x19 () Bool)
+(declare-fun x20 () Bool)
+(declare-fun x21 () Bool)
+(declare-fun x22 () Bool)
+(declare-fun x23 () Bool)
+(declare-fun x24 () Bool)
+(declare-fun x25 () Bool)
+(declare-fun x26 () Bool)
+(declare-fun x27 () Bool)
+(declare-fun x28 () Bool)
+(declare-fun x29 () Bool)
+(declare-fun x30 () Bool)
+(declare-fun x31 () Bool)
+(declare-fun x32 () Bool)
+(declare-fun x33 () Bool)
+(declare-fun x34 () Bool)
+(declare-fun x35 () Bool)
+(declare-fun x36 () Bool)
+(declare-fun x37 () Bool)
+(declare-fun x38 () Bool)
+(declare-fun x39 () Bool)
+(declare-fun x40 () Bool)
+(declare-fun x41 () Bool)
+(declare-fun x42 () Bool)
+(declare-fun x43 () Bool)
+(declare-fun x44 () Bool)
+(declare-fun x45 () Bool)
+(declare-fun x46 () Bool)
+(declare-fun x47 () Bool)
+(declare-fun x48 () Bool)
+(declare-fun x49 () Bool)
+(declare-fun x50 () Bool)
+(declare-fun x51 () Bool)
+(declare-fun x52 () Bool)
+(declare-fun x53 () Bool)
+(declare-fun x54 () Bool)
+(declare-fun x55 () Bool)
+(declare-fun x56 () Bool)
+(declare-fun x57 () Bool)
+(declare-fun x58 () Bool)
+(declare-fun x59 () Bool)
+(declare-fun x60 () Bool)
+(declare-fun x61 () Bool)
+(declare-fun x62 () Bool)
+(declare-fun x63 () Bool)
+(declare-fun x64 () Bool)
+(declare-fun x65 () Bool)
+(declare-fun x66 () Bool)
+(declare-fun x67 () Bool)
+(declare-fun x68 () Bool)
+(declare-fun x69 () Bool)
+(declare-fun x70 () Bool)
+(declare-fun x71 () Bool)
+(declare-fun x72 () Bool)
+(declare-fun x73 () Bool)
+(declare-fun x74 () Bool)
+(declare-fun x75 () Bool)
+(declare-fun x76 () Bool)
+(declare-fun x77 () Bool)
+(declare-fun x78 () Bool)
+(declare-fun x79 () Bool)
+(declare-fun x80 () Bool)
+(declare-fun x81 () Bool)
+(declare-fun x82 () Bool)
+(declare-fun x83 () Bool)
+(declare-fun x84 () Bool)
+(declare-fun x85 () Bool)
+(declare-fun x86 () Bool)
+(declare-fun x87 () Bool)
+(declare-fun x88 () Bool)
+(declare-fun x89 () Bool)
+(declare-fun x90 () Bool)
+(declare-fun x91 () Bool)
+(declare-fun x92 () Bool)
+(declare-fun x93 () Bool)
+(declare-fun x94 () Bool)
+(declare-fun x95 () Bool)
+(declare-fun x96 () Bool)
+(declare-fun x97 () Bool)
+(declare-fun x98 () Bool)
+(declare-fun x99 () Bool)
+(declare-fun x100 () Bool)
+(declare-fun x101 () Bool)
+(declare-fun x102 () Bool)
+(declare-fun x103 () Bool)
+(declare-fun x104 () Bool)
+(declare-fun x105 () Bool)
+(declare-fun x106 () Bool)
+(declare-fun x107 () Bool)
+(declare-fun x108 () Bool)
+(declare-fun x109 () Bool)
+(declare-fun x110 () Bool)
+(declare-fun x111 () Bool)
+(declare-fun x112 () Bool)
+(declare-fun x113 () Bool)
+(declare-fun x114 () Bool)
+(declare-fun x115 () Bool)
+(declare-fun x116 () Bool)
+(declare-fun x117 () Bool)
+(declare-fun x118 () Bool)
+(declare-fun x119 () Bool)
+(declare-fun x120 () Bool)
+(declare-fun x121 () Bool)
+(declare-fun x122 () Bool)
+(declare-fun x123 () Bool)
+(declare-fun x124 () Bool)
+(declare-fun x125 () Bool)
+(declare-fun x126 () Bool)
+(declare-fun x127 () Bool)
+(declare-fun x128 () Bool)
+(declare-fun x129 () Bool)
+(declare-fun x130 () Bool)
+(declare-fun x131 () Bool)
+(declare-fun x132 () Bool)
+(declare-fun x133 () Bool)
+(declare-fun x134 () Bool)
+(declare-fun x135 () Bool)
+(declare-fun x136 () Bool)
+(declare-fun x137 () Bool)
+(declare-fun x138 () Bool)
+(declare-fun x139 () Bool)
+(declare-fun x140 () Bool)
+(declare-fun x141 () Bool)
+(declare-fun x142 () Bool)
+(declare-fun x143 () Bool)
+(declare-fun x144 () Bool)
+(declare-fun x145 () Bool)
+(declare-fun x146 () Bool)
+(declare-fun x147 () Bool)
+(declare-fun x148 () Bool)
+(declare-fun x149 () Bool)
+(declare-fun x150 () Bool)
+(declare-fun x151 () Bool)
+(declare-fun x152 () Bool)
+(declare-fun x153 () Bool)
+(declare-fun x154 () Bool)
+(declare-fun x155 () Bool)
+(declare-fun x156 () Bool)
+(declare-fun x157 () Bool)
+(declare-fun x158 () Bool)
+(declare-fun x159 () Bool)
+(declare-fun x160 () Bool)
+(declare-fun x161 () Bool)
+(declare-fun x162 () Bool)
+(declare-fun x163 () Bool)
+(declare-fun x164 () Bool)
+(declare-fun x165 () Bool)
+(declare-fun x166 () Bool)
+(declare-fun x167 () Bool)
+(declare-fun x168 () Bool)
+(declare-fun x169 () Bool)
+(declare-fun x170 () Bool)
+(declare-fun x171 () Bool)
+(declare-fun x172 () Bool)
+(declare-fun x173 () Bool)
+(declare-fun x174 () Bool)
+(declare-fun x175 () Bool)
+(declare-fun x176 () Bool)
+(declare-fun x177 () Bool)
+(declare-fun x178 () Bool)
+(declare-fun x179 () Bool)
+(declare-fun x180 () Bool)
+(declare-fun x181 () Bool)
+(declare-fun x182 () Bool)
+(declare-fun x183 () Bool)
+(declare-fun x184 () Bool)
+(declare-fun x185 () Bool)
+(declare-fun x186 () Bool)
+(declare-fun x187 () Bool)
+(declare-fun x188 () Bool)
+(declare-fun x189 () Bool)
+(declare-fun x190 () Bool)
+(declare-fun x191 () Bool)
+(declare-fun x192 () Bool)
+(declare-fun x193 () Bool)
+(declare-fun x194 () Bool)
+(declare-fun x195 () Bool)
+(declare-fun x196 () Bool)
+(declare-fun x197 () Bool)
+(declare-fun x198 () Bool)
+(declare-fun x199 () Bool)
+(declare-fun x200 () Bool)
+(declare-fun x201 () Bool)
+(declare-fun x202 () Bool)
+(declare-fun x203 () Bool)
+(declare-fun x204 () Bool)
+(declare-fun x205 () Bool)
+(declare-fun x206 () Bool)
+(declare-fun x207 () Bool)
+(declare-fun x208 () Bool)
+(declare-fun x209 () Bool)
+(declare-fun x210 () Bool)
+(declare-fun x211 () Bool)
+(declare-fun x212 () Bool)
+(declare-fun x213 () Bool)
+(declare-fun x214 () Bool)
+(declare-fun x215 () Bool)
+(declare-fun x216 () Bool)
+(declare-fun x217 () Bool)
+(declare-fun x218 () Bool)
+(declare-fun x219 () Bool)
+(declare-fun x220 () Bool)
+(declare-fun x221 () Bool)
+(declare-fun x222 () Bool)
+(declare-fun x223 () Bool)
+(declare-fun x224 () Bool)
+(declare-fun x225 () Bool)
+(declare-fun x226 () Bool)
+(declare-fun x227 () Bool)
+(declare-fun x228 () Bool)
+(declare-fun x229 () Bool)
+(declare-fun x230 () Bool)
+(declare-fun x231 () Bool)
+(declare-fun x232 () Bool)
+(declare-fun x233 () Bool)
+(declare-fun x234 () Bool)
+(declare-fun x235 () Bool)
+(declare-fun x236 () Bool)
+(declare-fun x237 () Bool)
+(declare-fun x238 () Bool)
+(declare-fun x239 () Bool)
+(declare-fun x240 () Bool)
+(declare-fun x241 () Bool)
+(declare-fun x242 () Bool)
+(declare-fun x243 () Bool)
+(declare-fun x244 () Bool)
+(declare-fun x245 () Bool)
+(declare-fun x246 () Bool)
+(declare-fun x247 () Bool)
+(declare-fun x248 () Bool)
+(declare-fun x249 () Bool)
+(declare-fun x250 () Bool)
+(declare-fun x251 () Bool)
+(declare-fun x252 () Bool)
+(declare-fun x253 () Bool)
+(declare-fun x254 () Bool)
+(declare-fun x255 () Bool)
+(declare-fun x256 () Bool)
+(declare-fun x257 () Bool)
+(declare-fun x258 () Bool)
+(declare-fun x259 () Bool)
+(declare-fun x260 () Bool)
+(declare-fun x261 () Bool)
+(declare-fun x262 () Bool)
+(declare-fun x263 () Bool)
+(declare-fun x264 () Bool)
+(declare-fun x265 () Bool)
+(declare-fun x266 () Bool)
+(declare-fun x267 () Bool)
+(declare-fun x268 () Bool)
+(declare-fun x269 () Bool)
+(declare-fun x270 () Bool)
+(declare-fun x271 () Bool)
+(declare-fun x272 () Bool)
+(declare-fun x273 () Bool)
+(declare-fun x274 () Bool)
+(declare-fun x275 () Bool)
+(declare-fun x276 () Bool)
+(declare-fun x277 () Bool)
+(declare-fun x278 () Bool)
+(declare-fun x279 () Bool)
+(declare-fun x280 () Bool)
+(declare-fun x281 () Bool)
+(declare-fun x282 () Bool)
+(declare-fun x283 () Bool)
+(declare-fun x284 () Bool)
+(declare-fun x285 () Bool)
+(declare-fun x286 () Bool)
+(declare-fun x287 () Bool)
+(declare-fun x288 () Bool)
+(declare-fun x289 () Bool)
+(declare-fun x290 () Bool)
+(declare-fun x291 () Bool)
+(declare-fun x292 () Bool)
+(declare-fun x293 () Bool)
+(declare-fun x294 () Bool)
+(declare-fun x295 () Bool)
+(declare-fun x296 () Bool)
+(declare-fun x297 () Bool)
+(declare-fun x298 () Bool)
+(declare-fun x299 () Bool)
+(declare-fun x300 () Bool)
+(declare-fun x301 () Bool)
+(declare-fun x302 () Bool)
+(declare-fun x303 () Bool)
+(declare-fun x304 () Bool)
+(declare-fun x305 () Bool)
+(declare-fun x306 () Bool)
+(declare-fun x307 () Bool)
+(declare-fun x308 () Bool)
+(declare-fun x309 () Bool)
+(declare-fun x310 () Bool)
+(declare-fun x311 () Bool)
+(declare-fun x312 () Bool)
+(declare-fun x313 () Bool)
+(declare-fun x314 () Bool)
+(declare-fun x315 () Bool)
+(declare-fun x316 () Bool)
+(declare-fun x317 () Bool)
+(declare-fun x318 () Bool)
+(declare-fun x319 () Bool)
+(declare-fun x320 () Bool)
+(declare-fun x321 () Bool)
+(declare-fun x322 () Bool)
+(declare-fun x323 () Bool)
+(declare-fun x324 () Bool)
+(declare-fun x325 () Bool)
+(declare-fun x326 () Bool)
+(declare-fun x327 () Bool)
+(declare-fun x328 () Bool)
+(declare-fun x329 () Bool)
+(declare-fun x330 () Bool)
+(declare-fun x331 () Bool)
+(declare-fun x332 () Bool)
+(declare-fun x333 () Bool)
+(declare-fun x334 () Bool)
+(declare-fun x335 () Bool)
+(declare-fun x336 () Bool)
+(declare-fun x337 () Bool)
+(declare-fun x338 () Bool)
+(declare-fun x339 () Bool)
+(declare-fun x340 () Bool)
+(declare-fun x341 () Bool)
+(declare-fun x342 () Bool)
+(declare-fun x343 () Bool)
+(declare-fun x344 () Bool)
+(declare-fun x345 () Bool)
+(declare-fun x346 () Bool)
+(declare-fun x347 () Bool)
+(declare-fun x348 () Bool)
+(declare-fun x349 () Bool)
+(declare-fun x350 () Bool)
+(declare-fun x351 () Bool)
+(declare-fun x352 () Bool)
+(declare-fun x353 () Bool)
+(declare-fun x354 () Bool)
+(declare-fun x355 () Bool)
+(declare-fun x356 () Bool)
+(declare-fun x357 () Bool)
+(declare-fun x358 () Bool)
+(declare-fun x359 () Bool)
+(declare-fun x360 () Bool)
+(declare-fun x361 () Bool)
+(declare-fun x362 () Bool)
+(declare-fun x363 () Bool)
+(declare-fun x364 () Bool)
+(declare-fun x365 () Bool)
+(declare-fun x366 () Bool)
+(declare-fun x367 () Bool)
+(declare-fun x368 () Bool)
+(declare-fun x369 () Bool)
+(declare-fun x370 () Bool)
+(declare-fun x371 () Bool)
+(declare-fun x372 () Bool)
+(declare-fun x373 () Bool)
+(declare-fun x374 () Bool)
+(declare-fun x375 () Bool)
+(declare-fun x376 () Bool)
+(declare-fun x377 () Bool)
+(declare-fun x378 () Bool)
+(declare-fun x379 () Bool)
+(declare-fun x380 () Bool)
+(declare-fun x381 () Bool)
+(declare-fun x382 () Bool)
+(declare-fun x383 () Bool)
+(declare-fun x384 () Bool)
+(declare-fun x385 () Bool)
+(declare-fun x386 () Bool)
+(declare-fun x387 () Bool)
+(declare-fun x388 () Bool)
+(declare-fun x389 () Bool)
+(declare-fun x390 () Bool)
+(declare-fun x391 () Bool)
+(declare-fun x392 () Bool)
+(declare-fun x393 () Bool)
+(declare-fun x394 () Bool)
+(declare-fun x395 () Bool)
+(declare-fun x396 () Bool)
+(declare-fun x397 () Bool)
+(declare-fun x398 () Bool)
+(declare-fun x399 () Bool)
+(declare-fun x400 () Bool)
+(declare-fun x401 () Bool)
+(declare-fun x402 () Bool)
+(declare-fun x403 () Bool)
+(declare-fun x404 () Bool)
+(declare-fun x405 () Bool)
+(declare-fun x406 () Bool)
+(declare-fun x407 () Bool)
+(declare-fun x408 () Bool)
+(declare-fun x409 () Bool)
+(declare-fun x410 () Bool)
+(declare-fun x411 () Bool)
+(declare-fun x412 () Bool)
+(declare-fun x413 () Bool)
+(declare-fun x414 () Bool)
+(declare-fun x415 () Bool)
+(declare-fun x416 () Bool)
+(declare-fun x417 () Bool)
+(declare-fun x418 () Bool)
+(declare-fun x419 () Bool)
+(declare-fun x420 () Bool)
+(declare-fun x421 () Bool)
+(declare-fun x422 () Bool)
+(declare-fun x423 () Bool)
+(declare-fun x424 () Bool)
+(declare-fun x425 () Bool)
+(declare-fun x426 () Bool)
+(declare-fun x427 () Bool)
+(declare-fun x428 () Bool)
+(declare-fun x429 () Bool)
+(declare-fun x430 () Bool)
+(declare-fun x431 () Bool)
+(declare-fun x432 () Bool)
+(declare-fun x433 () Bool)
+(declare-fun x434 () Bool)
+(declare-fun x435 () Bool)
+(declare-fun x436 () Bool)
+(declare-fun x437 () Bool)
+(declare-fun x438 () Bool)
+(declare-fun x439 () Bool)
+(declare-fun x440 () Bool)
+(declare-fun x441 () Bool)
+(declare-fun x442 () Bool)
+(declare-fun x443 () Bool)
+(declare-fun x444 () Bool)
+(declare-fun x445 () Bool)
+(declare-fun x446 () Bool)
+(declare-fun x447 () Bool)
+(declare-fun x448 () Bool)
+(declare-fun x449 () Bool)
+(declare-fun x450 () Bool)
+(declare-fun x451 () Bool)
+(declare-fun x452 () Bool)
+(declare-fun x453 () Bool)
+(declare-fun x454 () Bool)
+(declare-fun x455 () Bool)
+(declare-fun x456 () Bool)
+(declare-fun x457 () Bool)
+(declare-fun x458 () Bool)
+(declare-fun x459 () Bool)
+(declare-fun x460 () Bool)
+(declare-fun x461 () Bool)
+(declare-fun x462 () Bool)
+(declare-fun x463 () Bool)
+(declare-fun x464 () Bool)
+(declare-fun x465 () Bool)
+(declare-fun x466 () Bool)
+(declare-fun x467 () Bool)
+(declare-fun x468 () Bool)
+(declare-fun x469 () Bool)
+(declare-fun x470 () Bool)
+(declare-fun x471 () Bool)
+(declare-fun x472 () Bool)
+(declare-fun x473 () Bool)
+(declare-fun x474 () Bool)
+(declare-fun x475 () Bool)
+(declare-fun x476 () Bool)
+(declare-fun x477 () Bool)
+(declare-fun x478 () Bool)
+(declare-fun x479 () Bool)
+(declare-fun x480 () Bool)
+(declare-fun x481 () Bool)
+(declare-fun x482 () Bool)
+(declare-fun x483 () Bool)
+(declare-fun x484 () Bool)
+(declare-fun x485 () Bool)
+(declare-fun x486 () Bool)
+(declare-fun x487 () Bool)
+(declare-fun x488 () Bool)
+(declare-fun x489 () Bool)
+(declare-fun x490 () Bool)
+(declare-fun x491 () Bool)
+(declare-fun x492 () Bool)
+(declare-fun x493 () Bool)
+(declare-fun x494 () Bool)
+(declare-fun x495 () Bool)
+(declare-fun x496 () Bool)
+(declare-fun x497 () Bool)
+(declare-fun x498 () Bool)
+(declare-fun x499 () Bool)
+(declare-fun x500 () Bool)
+(declare-fun x501 () Bool)
+(declare-fun x502 () Bool)
+(declare-fun x503 () Bool)
+(declare-fun x504 () Bool)
+(declare-fun x505 () Bool)
+(declare-fun x506 () Bool)
+(declare-fun x507 () Bool)
+(declare-fun x508 () Bool)
+(declare-fun x509 () Bool)
+(declare-fun x510 () Bool)
+(declare-fun x511 () Bool)
+(declare-fun x512 () Bool)
+(declare-fun x513 () Bool)
+(declare-fun x514 () Bool)
+(declare-fun x515 () Bool)
+(declare-fun x516 () Bool)
+(declare-fun x517 () Bool)
+(declare-fun x518 () Bool)
+(declare-fun x519 () Bool)
+(declare-fun x520 () Bool)
+(declare-fun x521 () Bool)
+(declare-fun x522 () Bool)
+(declare-fun x523 () Bool)
+(declare-fun x524 () Bool)
+(declare-fun x525 () Bool)
+(declare-fun x526 () Bool)
+(declare-fun x527 () Bool)
+(declare-fun x528 () Bool)
+(declare-fun x529 () Bool)
+(declare-fun x530 () Bool)
+(declare-fun x531 () Bool)
+(declare-fun x532 () Bool)
+(declare-fun x533 () Bool)
+(declare-fun x534 () Bool)
+(declare-fun x535 () Bool)
+(declare-fun x536 () Bool)
+(declare-fun x537 () Bool)
+(declare-fun x538 () Bool)
+(declare-fun x539 () Bool)
+(declare-fun x540 () Bool)
+(declare-fun x541 () Bool)
+(declare-fun x542 () Bool)
+(declare-fun x543 () Bool)
+(declare-fun x544 () Bool)
+(declare-fun x545 () Bool)
+(declare-fun x546 () Bool)
+(declare-fun x547 () Bool)
+(declare-fun x548 () Bool)
+(declare-fun x549 () Bool)
+(declare-fun x550 () Bool)
+(declare-fun x551 () Bool)
+(declare-fun x552 () Bool)
+(declare-fun x553 () Bool)
+(declare-fun x554 () Bool)
+(declare-fun x555 () Bool)
+(declare-fun x556 () Bool)
+(declare-fun x557 () Bool)
+(declare-fun x558 () Bool)
+(declare-fun x559 () Bool)
+(declare-fun x560 () Bool)
+(declare-fun x561 () Bool)
+(declare-fun x562 () Bool)
+(declare-fun x563 () Bool)
+(declare-fun x564 () Bool)
+(declare-fun x565 () Bool)
+(declare-fun x566 () Bool)
+(declare-fun x567 () Bool)
+(declare-fun x568 () Bool)
+(declare-fun x569 () Bool)
+(declare-fun x570 () Bool)
+(declare-fun x571 () Bool)
+(declare-fun x572 () Bool)
+(declare-fun x573 () Bool)
+(declare-fun x574 () Bool)
+(declare-fun x575 () Bool)
+(declare-fun x576 () Bool)
+(declare-fun x577 () Bool)
+(declare-fun x578 () Bool)
+(declare-fun x579 () Bool)
+(declare-fun x580 () Bool)
+(declare-fun x581 () Bool)
+(declare-fun x582 () Bool)
+(declare-fun x583 () Bool)
+(declare-fun x584 () Bool)
+(declare-fun x585 () Bool)
+(declare-fun x586 () Bool)
+(declare-fun x587 () Bool)
+(declare-fun x588 () Bool)
+(declare-fun x589 () Bool)
+(declare-fun x590 () Bool)
+(declare-fun x591 () Bool)
+(declare-fun x592 () Bool)
+(declare-fun x593 () Bool)
+(declare-fun x594 () Bool)
+(declare-fun x595 () Bool)
+(declare-fun x596 () Bool)
+(declare-fun x597 () Bool)
+(declare-fun x598 () Bool)
+(declare-fun x599 () Bool)
+(declare-fun x600 () Bool)
+(declare-fun x601 () Bool)
+(declare-fun x602 () Bool)
+(declare-fun x603 () Bool)
+(declare-fun x604 () Bool)
+(declare-fun x605 () Bool)
+(declare-fun x606 () Bool)
+(declare-fun x607 () Bool)
+(declare-fun x608 () Bool)
+(declare-fun x609 () Bool)
+(declare-fun x610 () Bool)
+(declare-fun x611 () Bool)
+(declare-fun x612 () Bool)
+(declare-fun x613 () Bool)
+(declare-fun x614 () Bool)
+(declare-fun x615 () Bool)
+(declare-fun x616 () Bool)
+(declare-fun x617 () Bool)
+(declare-fun x618 () Bool)
+(declare-fun x619 () Bool)
+(declare-fun x620 () Bool)
+(declare-fun x621 () Bool)
+(declare-fun x622 () Bool)
+(declare-fun x623 () Bool)
+(declare-fun x624 () Bool)
+(declare-fun x625 () Bool)
+(declare-fun x626 () Bool)
+(declare-fun x627 () Bool)
+(declare-fun x628 () Bool)
+(declare-fun x629 () Bool)
+(declare-fun x630 () Bool)
+(declare-fun x631 () Bool)
+(declare-fun x632 () Bool)
+(declare-fun x633 () Bool)
+(declare-fun x634 () Bool)
+(declare-fun x635 () Bool)
+(declare-fun x636 () Bool)
+(declare-fun x637 () Bool)
+(declare-fun x638 () Bool)
+(declare-fun x639 () Bool)
+(declare-fun x640 () Bool)
+(declare-fun x641 () Bool)
+(declare-fun x642 () Bool)
+(declare-fun x643 () Bool)
+(declare-fun x644 () Bool)
+(declare-fun x645 () Bool)
+(declare-fun x646 () Bool)
+(declare-fun x647 () Bool)
+(declare-fun x648 () Bool)
+(declare-fun x649 () Bool)
+(declare-fun x650 () Bool)
+(declare-fun x651 () Bool)
+(declare-fun x652 () Bool)
+(declare-fun x653 () Bool)
+(declare-fun x654 () Bool)
+(declare-fun x655 () Bool)
+(declare-fun x656 () Bool)
+(declare-fun x657 () Bool)
+(declare-fun x658 () Bool)
+(declare-fun x659 () Bool)
+(declare-fun x660 () Bool)
+(declare-fun x661 () Bool)
+(declare-fun x662 () Bool)
+(declare-fun x663 () Bool)
+(declare-fun x664 () Bool)
+(declare-fun x665 () Bool)
+(declare-fun x666 () Bool)
+(declare-fun x667 () Bool)
+(declare-fun x668 () Bool)
+(declare-fun x669 () Bool)
+(declare-fun x670 () Bool)
+(declare-fun x671 () Bool)
+(declare-fun x672 () Bool)
+(declare-fun x673 () Bool)
+(declare-fun x674 () Bool)
+(declare-fun x675 () Bool)
+(declare-fun x676 () Bool)
+(declare-fun x677 () Bool)
+(declare-fun x678 () Bool)
+(declare-fun x679 () Bool)
+(declare-fun x680 () Bool)
+(declare-fun x681 () Bool)
+(declare-fun x682 () Bool)
+(declare-fun x683 () Bool)
+(declare-fun x684 () Bool)
+(declare-fun x685 () Bool)
+(declare-fun x686 () Bool)
+(declare-fun x687 () Bool)
+(declare-fun x688 () Bool)
+(declare-fun x689 () Bool)
+(declare-fun x690 () Bool)
+(declare-fun x691 () Bool)
+(declare-fun x692 () Bool)
+(declare-fun x693 () Bool)
+(declare-fun x694 () Bool)
+(declare-fun x695 () Bool)
+(declare-fun x696 () Bool)
+(declare-fun x697 () Bool)
+(declare-fun x698 () Bool)
+(declare-fun x699 () Bool)
+(declare-fun x700 () Bool)
+(declare-fun x701 () Bool)
+(declare-fun x702 () Bool)
+(declare-fun x703 () Bool)
+(declare-fun x704 () Bool)
+(declare-fun x705 () Bool)
+(declare-fun x706 () Bool)
+(declare-fun x707 () Bool)
+(declare-fun x708 () Bool)
+(declare-fun x709 () Bool)
+(declare-fun x710 () Bool)
+(declare-fun x711 () Bool)
+(declare-fun x712 () Bool)
+(declare-fun x713 () Bool)
+(declare-fun x714 () Bool)
+(declare-fun x715 () Bool)
+(declare-fun x716 () Bool)
+(declare-fun x717 () Bool)
+(declare-fun x718 () Bool)
+(declare-fun x719 () Bool)
+(declare-fun x720 () Bool)
+(declare-fun x721 () Bool)
+(declare-fun x722 () Bool)
+(declare-fun x723 () Bool)
+(declare-fun x724 () Bool)
+(declare-fun x725 () Bool)
+(declare-fun x726 () Bool)
+(declare-fun x727 () Bool)
+(declare-fun x728 () Bool)
+(declare-fun x729 () Bool)
+(declare-fun x730 () Bool)
+(declare-fun x731 () Bool)
+(declare-fun x732 () Bool)
+(declare-fun x733 () Bool)
+(declare-fun x734 () Bool)
+(declare-fun x735 () Bool)
+(declare-fun x736 () Bool)
+(declare-fun x737 () Bool)
+(declare-fun x738 () Bool)
+(declare-fun x739 () Bool)
+(declare-fun x740 () Bool)
+(declare-fun x741 () Bool)
+(declare-fun x742 () Bool)
+(declare-fun x743 () Bool)
+(declare-fun x744 () Bool)
+(declare-fun x745 () Bool)
+(declare-fun x746 () Bool)
+(declare-fun x747 () Bool)
+(declare-fun x748 () Bool)
+(declare-fun x749 () Bool)
+(declare-fun x750 () Bool)
+(declare-fun x751 () Bool)
+(declare-fun x752 () Bool)
+(declare-fun x753 () Bool)
+(declare-fun x754 () Bool)
+(declare-fun x755 () Bool)
+(declare-fun x756 () Bool)
+(declare-fun x757 () Bool)
+(declare-fun x758 () Bool)
+(declare-fun x759 () Bool)
+(declare-fun x760 () Bool)
+(declare-fun x761 () Bool)
+(declare-fun x762 () Bool)
+(declare-fun x763 () Bool)
+(declare-fun x764 () Bool)
+(declare-fun x765 () Bool)
+(declare-fun x766 () Bool)
+(declare-fun x767 () Bool)
+(declare-fun x768 () Bool)
+(declare-fun x769 () Bool)
+(assert (let ((?v_1 (not x474)) (?v_1953 (not x427))) (let ((?v_2 (and ?v_1953 true)) (?v_4 (and x427 true)) (?v_3 (= tmp766 1)) (?v_5 (not x331)) (?v_1995 (not x379))) (let ((?v_6 (and ?v_1995 true)) (?v_8 (and x379 true)) (?v_7 (= tmp765 1)) (?v_9 (not x569)) (?v_1850 (not x521))) (let ((?v_10 (and ?v_1850 true)) (?v_12 (and x521 true)) (?v_11 (= tmp764 1)) (?v_13 (not x239)) (?v_2102 (not x283))) (let ((?v_14 (and ?v_2102 true)) (?v_16 (and x283 true)) (?v_15 (= tmp763 1)) (?v_17 (not x664)) (?v_1741 (not x616))) (let ((?v_18 (and ?v_1741 true)) (?v_20 (and x616 true)) (?v_19 (= tmp762 1)) (?v_21 (not x143)) (?v_2213 (not x191))) (let ((?v_22 (and ?v_2213 true)) (?v_24 (and x191 true)) (?v_23 (= tmp761 1)) (?v_25 (not x759)) (?v_1638 (not x711))) (let ((?v_26 (and ?v_1638 true)) (?v_28 (and x711 true)) (?v_27 (= tmp760 1)) (?v_29 (not x48)) (?v_2309 (not x96))) (let ((?v_30 (and ?v_2309 true)) (?v_32 (and x96 true)) (?v_31 (= tmp759 1)) (?v_33 (not x473)) (?v_34 (and (not x426) true)) (?v_36 (and x426 true)) (?v_35 (= tmp758 1)) (?v_37 (not x330)) (?v_38 (and (not x378) true)) (?v_40 (and x378 true)) (?v_39 (= tmp757 1)) (?v_41 (not x568)) (?v_42 (and (not x520) true)) (?v_44 (and x520 true)) (?v_43 (= tmp756 1)) (?v_45 (not x238)) (?v_46 (and (not x282) true)) (?v_48 (and x282 true)) (?v_47 (= tmp755 1)) (?v_49 (not x663)) (?v_50 (and (not x615) true)) (?v_52 (and x615 true)) (?v_51 (= tmp754 1)) (?v_53 (not x142)) (?v_54 (and (not x190) true)) (?v_56 (and x190 true)) (?v_55 (= tmp753 1)) (?v_57 (not x758)) (?v_58 (and (not x710) true)) (?v_60 (and x710 true)) (?v_59 (= tmp752 1)) (?v_61 (not x47)) (?v_62 (and (not x95) true)) (?v_64 (and x95 true)) (?v_63 (= tmp751 1)) (?v_65 (not x472)) (?v_1949 (not x425))) (let ((?v_66 (and ?v_1949 true)) (?v_68 (and x425 true)) (?v_67 (= tmp750 1)) (?v_69 (not x329)) (?v_1992 (not x377))) (let ((?v_70 (and ?v_1992 true)) (?v_72 (and x377 true)) (?v_71 (= tmp749 1)) (?v_73 (not x567)) (?v_1848 (not x519))) (let ((?v_74 (and ?v_1848 true)) (?v_76 (and x519 true)) (?v_75 (= tmp748 1)) (?v_77 (not x237)) (?v_2098 (not x281))) (let ((?v_78 (and ?v_2098 true)) (?v_80 (and x281 true)) (?v_79 (= tmp747 1)) (?v_81 (not x662)) (?v_1737 (not x614))) (let ((?v_82 (and ?v_1737 true)) (?v_84 (and x614 true)) (?v_83 (= tmp746 1)) (?v_85 (not x141)) (?v_2210 (not x189))) (let ((?v_86 (and ?v_2210 true)) (?v_88 (and x189 true)) (?v_87 (= tmp745 1)) (?v_89 (not x757)) (?v_1634 (not x709))) (let ((?v_90 (and ?v_1634 true)) (?v_92 (and x709 true)) (?v_91 (= tmp744 1)) (?v_93 (not x46)) (?v_2307 (not x94))) (let ((?v_94 (and ?v_2307 true)) (?v_96 (and x94 true)) (?v_95 (= tmp743 1)) (?v_97 (not x471)) (?v_98 (and (not x424) true)) (?v_100 (and x424 true)) (?v_99 (= tmp742 1)) (?v_101 (not x328)) (?v_102 (and (not x376) true)) (?v_104 (and x376 true)) (?v_103 (= tmp741 1)) (?v_105 (not x566)) (?v_106 (and (not x518) true)) (?v_108 (and x518 true)) (?v_107 (= tmp740 1)) (?v_109 (not x236)) (?v_110 (and (not x280) true)) (?v_112 (and x280 true)) (?v_111 (= tmp739 1)) (?v_113 (not x661)) (?v_114 (and (not x613) true)) (?v_116 (and x613 true)) (?v_115 (= tmp738 1)) (?v_117 (not x140)) (?v_118 (and (not x188) true)) (?v_120 (and x188 true)) (?v_119 (= tmp737 1)) (?v_121 (not x756)) (?v_122 (and (not x708) true)) (?v_124 (and x708 true)) (?v_123 (= tmp736 1)) (?v_125 (not x45)) (?v_126 (and (not x93) true)) (?v_128 (and x93 true)) (?v_127 (= tmp735 1)) (?v_129 (not x470)) (?v_1946 (not x423))) (let ((?v_130 (and ?v_1946 true)) (?v_132 (and x423 true)) (?v_131 (= tmp734 1)) (?v_133 (not x327)) (?v_1990 (not x375))) (let ((?v_134 (and ?v_1990 true)) (?v_136 (and x375 true)) (?v_135 (= tmp733 1)) (?v_137 (not x565)) (?v_1845 (not x517))) (let ((?v_138 (and ?v_1845 true)) (?v_140 (and x517 true)) (?v_139 (= tmp732 1)) (?v_141 (not x235)) (?v_2095 (not x279))) (let ((?v_142 (and ?v_2095 true)) (?v_144 (and x279 true)) (?v_143 (= tmp731 1)) (?v_145 (not x660)) (?v_1733 (not x612))) (let ((?v_146 (and ?v_1733 true)) (?v_148 (and x612 true)) (?v_147 (= tmp730 1)) (?v_149 (not x139)) (?v_2207 (not x187))) (let ((?v_150 (and ?v_2207 true)) (?v_152 (and x187 true)) (?v_151 (= tmp729 1)) (?v_153 (not x755)) (?v_1631 (not x707))) (let ((?v_154 (and ?v_1631 true)) (?v_156 (and x707 true)) (?v_155 (= tmp728 1)) (?v_157 (not x44)) (?v_2304 (not x92))) (let ((?v_158 (and ?v_2304 true)) (?v_160 (and x92 true)) (?v_159 (= tmp727 1)) (?v_161 (not x469)) (?v_162 (and (not x422) true)) (?v_164 (and x422 true)) (?v_163 (= tmp726 1)) (?v_165 (not x326)) (?v_166 (and (not x374) true)) (?v_168 (and x374 true)) (?v_167 (= tmp725 1)) (?v_169 (not x564)) (?v_170 (and (not x516) true)) (?v_172 (and x516 true)) (?v_171 (= tmp724 1)) (?v_173 (not x234)) (?v_174 (and (not x278) true)) (?v_176 (and x278 true)) (?v_175 (= tmp723 1)) (?v_177 (not x659)) (?v_178 (and (not x611) true)) (?v_180 (and x611 true)) (?v_179 (= tmp722 1)) (?v_181 (not x138)) (?v_182 (and (not x186) true)) (?v_184 (and x186 true)) (?v_183 (= tmp721 1)) (?v_185 (not x754)) (?v_186 (and (not x706) true)) (?v_188 (and x706 true)) (?v_187 (= tmp720 1)) (?v_189 (not x43)) (?v_190 (and (not x91) true)) (?v_192 (and x91 true)) (?v_191 (= tmp719 1)) (?v_193 (not x468)) (?v_1942 (not x421))) (let ((?v_194 (and ?v_1942 true)) (?v_196 (and x421 true)) (?v_195 (= tmp718 1)) (?v_197 (not x325)) (?v_1987 (not x373))) (let ((?v_198 (and ?v_1987 true)) (?v_200 (and x373 true)) (?v_199 (= tmp717 1)) (?v_201 (not x563)) (?v_1843 (not x515))) (let ((?v_202 (and ?v_1843 true)) (?v_204 (and x515 true)) (?v_203 (= tmp716 1)) (?v_205 (not x233)) (?v_2092 (not x277))) (let ((?v_206 (and ?v_2092 true)) (?v_208 (and x277 true)) (?v_207 (= tmp715 1)) (?v_209 (not x658)) (?v_1729 (not x610))) (let ((?v_210 (and ?v_1729 true)) (?v_212 (and x610 true)) (?v_211 (= tmp714 1)) (?v_213 (not x137)) (?v_2204 (not x185))) (let ((?v_214 (and ?v_2204 true)) (?v_216 (and x185 true)) (?v_215 (= tmp713 1)) (?v_217 (not x753)) (?v_1626 (not x705))) (let ((?v_218 (and ?v_1626 true)) (?v_220 (and x705 true)) (?v_219 (= tmp712 1)) (?v_221 (not x42)) (?v_2300 (not x90))) (let ((?v_222 (and ?v_2300 true)) (?v_224 (and x90 true)) (?v_223 (= tmp711 1)) (?v_225 (not x467)) (?v_226 (and (not x420) true)) (?v_228 (and x420 true)) (?v_227 (= tmp710 1)) (?v_229 (not x324)) (?v_230 (and (not x372) true)) (?v_232 (and x372 true)) (?v_231 (= tmp709 1)) (?v_233 (not x562)) (?v_234 (and (not x514) true)) (?v_236 (and x514 true)) (?v_235 (= tmp708 1)) (?v_237 (not x232)) (?v_238 (and (not x276) true)) (?v_240 (and x276 true)) (?v_239 (= tmp707 1)) (?v_241 (not x704)) (?v_242 (and (not x657) true)) (?v_244 (and x657 true)) (?v_243 (= tmp706 1)) (?v_245 (not x136)) (?v_246 (and (not x184) true)) (?v_248 (and x184 true)) (?v_247 (= tmp705 1)) (?v_249 (not x769)) (?v_250 (and (not x752) true)) (?v_252 (and x752 true)) (?v_251 (= tmp704 1)) (?v_253 (not x41)) (?v_254 (and (not x89) true)) (?v_256 (and x89 true)) (?v_255 (= tmp703 1)) (?v_257 (not x466)) (?v_1938 (not x419))) (let ((?v_258 (and ?v_1938 true)) (?v_260 (and x419 true)) (?v_259 (= tmp702 1)) (?v_261 (not x323)) (?v_1981 (not x371))) (let ((?v_262 (and ?v_1981 true)) (?v_264 (and x371 true)) (?v_263 (= tmp701 1)) (?v_265 (not x561)) (?v_1839 (not x513))) (let ((?v_266 (and ?v_1839 true)) (?v_268 (and x513 true)) (?v_267 (= tmp700 1)) (?v_269 (not x231)) (?v_2088 (not x275))) (let ((?v_270 (and ?v_2088 true)) (?v_272 (and x275 true)) (?v_271 (= tmp699 1)) (?v_273 (not x656)) (?v_274 (and (not x609) true)) (?v_276 (and x609 true)) (?v_275 (= tmp698 1)) (?v_277 (not x135)) (?v_2200 (not x183))) (let ((?v_278 (and ?v_2200 true)) (?v_280 (and x183 true)) (?v_279 (= tmp697 1)) (?v_281 (not x751)) (?v_1620 (not x703))) (let ((?v_282 (and ?v_1620 true)) (?v_284 (and x703 true)) (?v_283 (= tmp696 1)) (?v_285 (not x40)) (?v_2297 (not x88))) (let ((?v_286 (and ?v_2297 true)) (?v_288 (and x88 true)) (?v_287 (= tmp695 1)) (?v_289 (not x465)) (?v_290 (and (not x418) true)) (?v_292 (and x418 true)) (?v_291 (= tmp694 1)) (?v_293 (not x322)) (?v_294 (and (not x370) true)) (?v_296 (and x370 true)) (?v_295 (= tmp693 1)) (?v_297 (not x560)) (?v_298 (and (not x512) true)) (?v_300 (and x512 true)) (?v_299 (= tmp692 1)) (?v_301 (not x230)) (?v_302 (and (not x274) true)) (?v_304 (and x274 true)) (?v_303 (= tmp691 1)) (?v_305 (not x655)) (?v_1724 (not x608))) (let ((?v_306 (and ?v_1724 true)) (?v_308 (and x608 true)) (?v_307 (= tmp690 1)) (?v_309 (not x134)) (?v_310 (and (not x182) true)) (?v_312 (and x182 true)) (?v_311 (= tmp689 1)) (?v_313 (not x750)) (?v_314 (and (not x702) true)) (?v_316 (and x702 true)) (?v_315 (= tmp688 1)) (?v_317 (not x39)) (?v_318 (and (not x87) true)) (?v_320 (and x87 true)) (?v_319 (= tmp687 1)) (?v_321 (not x464)) (?v_1935 (not x417))) (let ((?v_322 (and ?v_1935 true)) (?v_324 (and x417 true)) (?v_323 (= tmp686 1)) (?v_325 (not x321)) (?v_1977 (not x369))) (let ((?v_326 (and ?v_1977 true)) (?v_328 (and x369 true)) (?v_327 (= tmp685 1)) (?v_329 (not x559)) (?v_1835 (not x511))) (let ((?v_330 (and ?v_1835 true)) (?v_332 (and x511 true)) (?v_331 (= tmp684 1)) (?v_333 (not x229)) (?v_2084 (not x273))) (let ((?v_334 (and ?v_2084 true)) (?v_336 (and x273 true)) (?v_335 (= tmp683 1)) (?v_337 (not x654)) (?v_338 (and (not x607) true)) (?v_340 (and x607 true)) (?v_339 (= tmp682 1)) (?v_341 (not x133)) (?v_2196 (not x181))) (let ((?v_342 (and ?v_2196 true)) (?v_344 (and x181 true)) (?v_343 (= tmp681 1)) (?v_345 (not x749)) (?v_1616 (not x701))) (let ((?v_346 (and ?v_1616 true)) (?v_348 (and x701 true)) (?v_347 (= tmp680 1)) (?v_349 (not x38)) (?v_2293 (not x86))) (let ((?v_350 (and ?v_2293 true)) (?v_352 (and x86 true)) (?v_351 (= tmp679 1)) (?v_353 (not x463)) (?v_354 (and (not x416) true)) (?v_356 (and x416 true)) (?v_355 (= tmp678 1)) (?v_357 (not x320)) (?v_358 (and (not x368) true)) (?v_360 (and x368 true)) (?v_359 (= tmp677 1)) (?v_361 (not x558)) (?v_362 (and (not x510) true)) (?v_364 (and x510 true)) (?v_363 (= tmp676 1)) (?v_365 (not x228)) (?v_366 (and (not x272) true)) (?v_368 (and x272 true)) (?v_367 (= tmp675 1)) (?v_369 (not x653)) (?v_1719 (not x606))) (let ((?v_370 (and ?v_1719 true)) (?v_372 (and x606 true)) (?v_371 (= tmp674 1)) (?v_373 (not x132)) (?v_374 (and (not x180) true)) (?v_376 (and x180 true)) (?v_375 (= tmp673 1)) (?v_377 (not x748)) (?v_378 (and (not x700) true)) (?v_380 (and x700 true)) (?v_379 (= tmp672 1)) (?v_381 (not x37)) (?v_382 (and (not x85) true)) (?v_384 (and x85 true)) (?v_383 (= tmp671 1)) (?v_385 (not x462)) (?v_1931 (not x415))) (let ((?v_386 (and ?v_1931 true)) (?v_388 (and x415 true)) (?v_387 (= tmp670 1)) (?v_389 (not x319)) (?v_1974 (not x367))) (let ((?v_390 (and ?v_1974 true)) (?v_392 (and x367 true)) (?v_391 (= tmp669 1)) (?v_393 (not x557)) (?v_1831 (not x509))) (let ((?v_394 (and ?v_1831 true)) (?v_396 (and x509 true)) (?v_395 (= tmp668 1)) (?v_397 (not x227)) (?v_2081 (not x271))) (let ((?v_398 (and ?v_2081 true)) (?v_400 (and x271 true)) (?v_399 (= tmp667 1)) (?v_401 (not x652)) (?v_402 (and (not x605) true)) (?v_404 (and x605 true)) (?v_403 (= tmp666 1)) (?v_405 (not x131)) (?v_2193 (not x179))) (let ((?v_406 (and ?v_2193 true)) (?v_408 (and x179 true)) (?v_407 (= tmp665 1)) (?v_409 (not x747)) (?v_1615 (not x699))) (let ((?v_410 (and ?v_1615 true)) (?v_412 (and x699 true)) (?v_411 (= tmp664 1)) (?v_413 (not x36)) (?v_2289 (not x84))) (let ((?v_414 (and ?v_2289 true)) (?v_416 (and x84 true)) (?v_415 (= tmp663 1)) (?v_417 (not x461)) (?v_418 (and (not x414) true)) (?v_420 (and x414 true)) (?v_419 (= tmp662 1)) (?v_421 (not x318)) (?v_422 (and (not x366) true)) (?v_424 (and x366 true)) (?v_423 (= tmp661 1)) (?v_425 (not x556)) (?v_426 (and (not x508) true)) (?v_428 (and x508 true)) (?v_427 (= tmp660 1)) (?v_429 (not x226)) (?v_430 (and (not x270) true)) (?v_432 (and x270 true)) (?v_431 (= tmp659 1)) (?v_433 (not x651)) (?v_1716 (not x604))) (let ((?v_434 (and ?v_1716 true)) (?v_436 (and x604 true)) (?v_435 (= tmp658 1)) (?v_437 (not x130)) (?v_438 (and (not x178) true)) (?v_440 (and x178 true)) (?v_439 (= tmp657 1)) (?v_441 (not x746)) (?v_442 (and (not x698) true)) (?v_444 (and x698 true)) (?v_443 (= tmp656 1)) (?v_445 (not x35)) (?v_446 (and (not x83) true)) (?v_448 (and x83 true)) (?v_447 (= tmp655 1)) (?v_449 (not x460)) (?v_1927 (not x413))) (let ((?v_450 (and ?v_1927 true)) (?v_452 (and x413 true)) (?v_451 (= tmp654 1)) (?v_453 (not x317)) (?v_1971 (not x365))) (let ((?v_454 (and ?v_1971 true)) (?v_456 (and x365 true)) (?v_455 (= tmp653 1)) (?v_457 (not x555)) (?v_1826 (not x507))) (let ((?v_458 (and ?v_1826 true)) (?v_460 (and x507 true)) (?v_459 (= tmp652 1)) (?v_461 (not x225)) (?v_2077 (not x269))) (let ((?v_462 (and ?v_2077 true)) (?v_464 (and x269 true)) (?v_463 (= tmp651 1)) (?v_465 (not x650)) (?v_466 (and (not x603) true)) (?v_468 (and x603 true)) (?v_467 (= tmp650 1)) (?v_469 (not x129)) (?v_2190 (not x177))) (let ((?v_470 (and ?v_2190 true)) (?v_472 (and x177 true)) (?v_471 (= tmp649 1)) (?v_473 (not x745)) (?v_1611 (not x697))) (let ((?v_474 (and ?v_1611 true)) (?v_476 (and x697 true)) (?v_475 (= tmp648 1)) (?v_477 (not x34)) (?v_2287 (not x82))) (let ((?v_478 (and ?v_2287 true)) (?v_480 (and x82 true)) (?v_479 (= tmp647 1)) (?v_481 (not x459)) (?v_482 (and (not x412) true)) (?v_484 (and x412 true)) (?v_483 (= tmp646 1)) (?v_485 (not x316)) (?v_486 (and (not x364) true)) (?v_488 (and x364 true)) (?v_487 (= tmp645 1)) (?v_489 (not x554)) (?v_490 (and (not x506) true)) (?v_492 (and x506 true)) (?v_491 (= tmp644 1)) (?v_493 (not x224)) (?v_494 (and (not x268) true)) (?v_496 (and x268 true)) (?v_495 (= tmp643 1)) (?v_497 (not x649)) (?v_1713 (not x602))) (let ((?v_498 (and ?v_1713 true)) (?v_500 (and x602 true)) (?v_499 (= tmp642 1)) (?v_501 (not x128)) (?v_502 (and (not x176) true)) (?v_504 (and x176 true)) (?v_503 (= tmp641 1)) (?v_505 (not x744)) (?v_506 (and (not x696) true)) (?v_508 (and x696 true)) (?v_507 (= tmp640 1)) (?v_509 (not x33)) (?v_510 (and (not x81) true)) (?v_512 (and x81 true)) (?v_511 (= tmp639 1)) (?v_513 (not x458)) (?v_1923 (not x411))) (let ((?v_514 (and ?v_1923 true)) (?v_516 (and x411 true)) (?v_515 (= tmp638 1)) (?v_517 (not x315)) (?v_1968 (not x363))) (let ((?v_518 (and ?v_1968 true)) (?v_520 (and x363 true)) (?v_519 (= tmp637 1)) (?v_521 (not x553)) (?v_1822 (not x505))) (let ((?v_522 (and ?v_1822 true)) (?v_524 (and x505 true)) (?v_523 (= tmp636 1)) (?v_525 (not x223)) (?v_2073 (not x267))) (let ((?v_526 (and ?v_2073 true)) (?v_528 (and x267 true)) (?v_527 (= tmp635 1)) (?v_529 (not x648)) (?v_530 (and (not x601) true)) (?v_532 (and x601 true)) (?v_531 (= tmp634 1)) (?v_533 (not x127)) (?v_2187 (not x175))) (let ((?v_534 (and ?v_2187 true)) (?v_536 (and x175 true)) (?v_535 (= tmp633 1)) (?v_537 (not x743)) (?v_1609 (not x695))) (let ((?v_538 (and ?v_1609 true)) (?v_540 (and x695 true)) (?v_539 (= tmp632 1)) (?v_541 (not x32)) (?v_2286 (not x80))) (let ((?v_542 (and ?v_2286 true)) (?v_544 (and x80 true)) (?v_543 (= tmp631 1)) (?v_545 (not x457)) (?v_546 (and (not x410) true)) (?v_548 (and x410 true)) (?v_547 (= tmp630 1)) (?v_549 (not x314)) (?v_550 (and (not x362) true)) (?v_552 (and x362 true)) (?v_551 (= tmp629 1)) (?v_553 (not x552)) (?v_554 (and (not x504) true)) (?v_556 (and x504 true)) (?v_555 (= tmp628 1)) (?v_557 (not x222)) (?v_558 (and (not x266) true)) (?v_560 (and x266 true)) (?v_559 (= tmp627 1)) (?v_561 (not x647)) (?v_1710 (not x600))) (let ((?v_562 (and ?v_1710 true)) (?v_564 (and x600 true)) (?v_563 (= tmp626 1)) (?v_565 (not x126)) (?v_566 (and (not x174) true)) (?v_568 (and x174 true)) (?v_567 (= tmp625 1)) (?v_569 (not x742)) (?v_570 (and (not x694) true)) (?v_572 (and x694 true)) (?v_571 (= tmp624 1)) (?v_573 (not x31)) (?v_574 (and (not x79) true)) (?v_576 (and x79 true)) (?v_575 (= tmp623 1)) (?v_577 (not x456)) (?v_1920 (not x409))) (let ((?v_578 (and ?v_1920 true)) (?v_580 (and x409 true)) (?v_579 (= tmp622 1)) (?v_581 (not x313)) (?v_1964 (not x361))) (let ((?v_582 (and ?v_1964 true)) (?v_584 (and x361 true)) (?v_583 (= tmp621 1)) (?v_585 (not x551)) (?v_1819 (not x503))) (let ((?v_586 (and ?v_1819 true)) (?v_588 (and x503 true)) (?v_587 (= tmp620 1)) (?v_589 (not x221)) (?v_2070 (not x265))) (let ((?v_590 (and ?v_2070 true)) (?v_592 (and x265 true)) (?v_591 (= tmp619 1)) (?v_593 (not x646)) (?v_594 (and (not x599) true)) (?v_596 (and x599 true)) (?v_595 (= tmp618 1)) (?v_597 (not x125)) (?v_2183 (not x173))) (let ((?v_598 (and ?v_2183 true)) (?v_600 (and x173 true)) (?v_599 (= tmp617 1)) (?v_601 (not x741)) (?v_1606 (not x693))) (let ((?v_602 (and ?v_1606 true)) (?v_604 (and x693 true)) (?v_603 (= tmp616 1)) (?v_605 (not x30)) (?v_2282 (not x78))) (let ((?v_606 (and ?v_2282 true)) (?v_608 (and x78 true)) (?v_607 (= tmp615 1)) (?v_609 (not x455)) (?v_610 (and (not x408) true)) (?v_612 (and x408 true)) (?v_611 (= tmp614 1)) (?v_613 (not x312)) (?v_614 (and (not x360) true)) (?v_616 (and x360 true)) (?v_615 (= tmp613 1)) (?v_617 (not x550)) (?v_618 (and (not x502) true)) (?v_620 (and x502 true)) (?v_619 (= tmp612 1)) (?v_621 (not x220)) (?v_622 (and (not x264) true)) (?v_624 (and x264 true)) (?v_623 (= tmp611 1)) (?v_625 (not x645)) (?v_1705 (not x598))) (let ((?v_626 (and ?v_1705 true)) (?v_628 (and x598 true)) (?v_627 (= tmp610 1)) (?v_629 (not x124)) (?v_630 (and (not x172) true)) (?v_632 (and x172 true)) (?v_631 (= tmp609 1)) (?v_633 (not x740)) (?v_634 (and (not x692) true)) (?v_636 (and x692 true)) (?v_635 (= tmp608 1)) (?v_637 (not x29)) (?v_638 (and (not x77) true)) (?v_640 (and x77 true)) (?v_639 (= tmp607 1)) (?v_641 (not x501)) (?v_1918 (not x407))) (let ((?v_642 (and ?v_1918 true)) (?v_644 (and x407 true)) (?v_643 (= tmp606 1)) (?v_645 (not x311)) (?v_1960 (not x359))) (let ((?v_646 (and ?v_1960 true)) (?v_648 (and x359 true)) (?v_647 (= tmp605 1)) (?v_649 (not x597)) (?v_1750 (not x549))) (let ((?v_650 (and ?v_1750 true)) (?v_652 (and x549 true)) (?v_651 (= tmp604 1)) (?v_653 (not x219)) (?v_2066 (not x263))) (let ((?v_654 (and ?v_2066 true)) (?v_656 (and x263 true)) (?v_655 (= tmp603 1)) (?v_657 (not x691)) (?v_1647 (not x644))) (let ((?v_658 (and ?v_1647 true)) (?v_660 (and x644 true)) (?v_659 (= tmp602 1)) (?v_661 (not x123)) (?v_2180 (not x171))) (let ((?v_662 (and ?v_2180 true)) (?v_664 (and x171 true)) (?v_663 (= tmp601 1)) (?v_665 (not x768)) (?v_1543 (not x739))) (let ((?v_666 (and ?v_1543 true)) (?v_668 (and x739 true)) (?v_667 (= tmp600 1)) (?v_669 (not x28)) (?v_2278 (not x76))) (let ((?v_670 (and ?v_2278 true)) (?v_672 (and x76 true)) (?v_671 (= tmp599 1)) (?v_673 (not x454)) (?v_674 (and (not x406) true)) (?v_676 (and x406 true)) (?v_675 (= tmp598 1)) (?v_677 (not x310)) (?v_678 (and (not x358) true)) (?v_680 (and x358 true)) (?v_679 (= tmp597 1)) (?v_681 (not x548)) (?v_682 (and (not x500) true)) (?v_684 (and x500 true)) (?v_683 (= tmp596 1)) (?v_685 (not x218)) (?v_686 (and (not x262) true)) (?v_688 (and x262 true)) (?v_687 (= tmp595 1)) (?v_689 (not x643)) (?v_1702 (not x596))) (let ((?v_690 (and ?v_1702 true)) (?v_692 (and x596 true)) (?v_691 (= tmp594 1)) (?v_693 (not x122)) (?v_694 (and (not x170) true)) (?v_696 (and x170 true)) (?v_695 (= tmp593 1)) (?v_697 (not x738)) (?v_698 (and (not x690) true)) (?v_700 (and x690 true)) (?v_699 (= tmp592 1)) (?v_701 (not x27)) (?v_702 (and (not x75) true)) (?v_704 (and x75 true)) (?v_703 (= tmp591 1)) (?v_705 (not x453)) (?v_1915 (not x405))) (let ((?v_706 (and ?v_1915 true)) (?v_708 (and x405 true)) (?v_707 (= tmp590 1)) (?v_709 (not x309)) (?v_1957 (not x357))) (let ((?v_710 (and ?v_1957 true)) (?v_712 (and x357 true)) (?v_711 (= tmp589 1)) (?v_713 (not x547)) (?v_714 (and (not x499) true)) (?v_716 (and x499 true)) (?v_715 (= tmp588 1)) (?v_717 (not x217)) (?v_718 (and (not x261) true)) (?v_720 (and x261 true)) (?v_719 (= tmp587 1)) (?v_721 (not x642)) (?v_722 (and (not x595) true)) (?v_724 (and x595 true)) (?v_723 (= tmp586 1)) (?v_725 (not x121)) (?v_2177 (not x169))) (let ((?v_726 (and ?v_2177 true)) (?v_728 (and x169 true)) (?v_727 (= tmp585 1)) (?v_729 (not x737)) (?v_730 (and (not x689) true)) (?v_732 (and x689 true)) (?v_731 (= tmp584 1)) (?v_733 (not x26)) (?v_2276 (not x74))) (let ((?v_734 (and ?v_2276 true)) (?v_736 (and x74 true)) (?v_735 (= tmp583 1)) (?v_737 (not x452)) (?v_738 (and (not x404) true)) (?v_740 (and x404 true)) (?v_739 (= tmp582 1)) (?v_741 (not x308)) (?v_742 (and (not x356) true)) (?v_744 (and x356 true)) (?v_743 (= tmp581 1)) (?v_745 (not x546)) (?v_746 (and (not x498) true)) (?v_748 (and x498 true)) (?v_747 (= tmp580 1)) (?v_749 (not x216)) (?v_2068 (not x260))) (let ((?v_750 (and ?v_2068 true)) (?v_752 (and x260 true)) (?v_751 (= tmp579 1)) (?v_753 (not x641)) (?v_754 (and (not x594) true)) (?v_756 (and x594 true)) (?v_755 (= tmp578 1)) (?v_757 (not x120)) (?v_758 (and (not x168) true)) (?v_760 (and x168 true)) (?v_759 (= tmp577 1)) (?v_761 (not x736)) (?v_762 (and (not x688) true)) (?v_764 (and x688 true)) (?v_763 (= tmp576 1)) (?v_765 (not x25)) (?v_766 (and (not x73) true)) (?v_768 (and x73 true)) (?v_767 (= tmp575 1)) (?v_769 (not x451)) (?v_770 (and (not x403) true)) (?v_772 (and x403 true)) (?v_771 (= tmp574 1)) (?v_773 (not x307)) (?v_774 (and (not x355) true)) (?v_776 (and x355 true)) (?v_775 (= tmp573 1)) (?v_777 (not x545)) (?v_1814 (not x497))) (let ((?v_778 (and ?v_1814 true)) (?v_780 (and x497 true)) (?v_779 (= tmp572 1)) (?v_781 (not x215)) (?v_782 (and (not x259) true)) (?v_784 (and x259 true)) (?v_783 (= tmp571 1)) (?v_785 (not x640)) (?v_786 (and (not x593) true)) (?v_788 (and x593 true)) (?v_787 (= tmp570 1)) (?v_789 (not x119)) (?v_790 (and (not x167) true)) (?v_792 (and x167 true)) (?v_791 (= tmp569 1)) (?v_793 (not x735)) (?v_1603 (not x687))) (let ((?v_794 (and ?v_1603 true)) (?v_796 (and x687 true)) (?v_795 (= tmp568 1)) (?v_797 (not x24)) (?v_798 (and (not x72) true)) (?v_800 (and x72 true)) (?v_799 (= tmp567 1)) (?v_801 (not x496)) (?v_1853 (not x450))) (let ((?v_802 (and ?v_1853 true)) (?v_804 (and x450 true)) (?v_803 (= tmp566 1)) (?v_805 (not x354)) (?v_1916 (not x402))) (let ((?v_806 (and ?v_1916 true)) (?v_808 (and x402 true)) (?v_807 (= tmp565 1)) (?v_809 (not x592)) (?v_1747 (not x544))) (let ((?v_810 (and ?v_1747 true)) (?v_812 (and x544 true)) (?v_811 (= tmp564 1)) (?v_813 (not x258)) (?v_2002 (not x306))) (let ((?v_814 (and ?v_2002 true)) (?v_816 (and x306 true)) (?v_815 (= tmp563 1)) (?v_817 (not x734)) (?v_1643 (not x639))) (let ((?v_818 (and ?v_1643 true)) (?v_820 (and x639 true)) (?v_819 (= tmp562 1)) (?v_821 (not x166)) (?v_2108 (not x214))) (let ((?v_822 (and ?v_2108 true)) (?v_824 (and x214 true)) (?v_823 (= tmp561 1)) (?v_825 (not x767)) (?v_826 (and (not x766) true)) (?v_828 (and x766 true)) (?v_827 (= tmp560 1)) (?v_829 (not x23)) (?v_2277 (not x71))) (let ((?v_830 (and ?v_2277 true)) (?v_832 (and x71 true)) (?v_831 (= tmp559 1)) (?v_833 (not x449)) (?v_834 (and (not x401) true)) (?v_836 (and x401 true)) (?v_835 (= tmp558 1)) (?v_837 (not x305)) (?v_838 (and (not x353) true)) (?v_840 (and x353 true)) (?v_839 (= tmp557 1)) (?v_841 (not x543)) (?v_1816 (not x495))) (let ((?v_842 (and ?v_1816 true)) (?v_844 (and x495 true)) (?v_843 (= tmp556 1)) (?v_845 (not x213)) (?v_846 (and (not x257) true)) (?v_848 (and x257 true)) (?v_847 (= tmp555 1)) (?v_849 (not x638)) (?v_850 (and (not x591) true)) (?v_852 (and x591 true)) (?v_851 (= tmp554 1)) (?v_853 (not x118)) (?v_854 (and (not x165) true)) (?v_856 (and x165 true)) (?v_855 (= tmp553 1)) (?v_857 (not x733)) (?v_858 (and (not x686) true)) (?v_860 (and x686 true)) (?v_859 (= tmp552 1)) (?v_861 (not x22)) (?v_862 (and (not x70) true)) (?v_864 (and x70 true)) (?v_863 (= tmp551 1)) (?v_865 (not x448)) (?v_1919 (not x400))) (let ((?v_866 (and ?v_1919 true)) (?v_868 (and x400 true)) (?v_867 (= tmp550 1)) (?v_869 (not x304)) (?v_1962 (not x352))) (let ((?v_870 (and ?v_1962 true)) (?v_872 (and x352 true)) (?v_871 (= tmp549 1)) (?v_873 (not x542)) (?v_874 (and (not x494) true)) (?v_876 (and x494 true)) (?v_875 (= tmp548 1)) (?v_877 (not x212)) (?v_2075 (not x256))) (let ((?v_878 (and ?v_2075 true)) (?v_880 (and x256 true)) (?v_879 (= tmp547 1)) (?v_881 (not x637)) (?v_1703 (not x590))) (let ((?v_882 (and ?v_1703 true)) (?v_884 (and x590 true)) (?v_883 (= tmp546 1)) (?v_885 (not x117)) (?v_2181 (not x164))) (let ((?v_886 (and ?v_2181 true)) (?v_888 (and x164 true)) (?v_887 (= tmp545 1)) (?v_889 (not x732)) (?v_1605 (not x685))) (let ((?v_890 (and ?v_1605 true)) (?v_892 (and x685 true)) (?v_891 (= tmp544 1)) (?v_893 (not x21)) (?v_2280 (not x69))) (let ((?v_894 (and ?v_2280 true)) (?v_896 (and x69 true)) (?v_895 (= tmp543 1)) (?v_897 (not x447)) (?v_898 (and (not x399) true)) (?v_900 (and x399 true)) (?v_899 (= tmp542 1)) (?v_901 (not x303)) (?v_902 (and (not x351) true)) (?v_904 (and x351 true)) (?v_903 (= tmp541 1)) (?v_905 (not x541)) (?v_1821 (not x493))) (let ((?v_906 (and ?v_1821 true)) (?v_908 (and x493 true)) (?v_907 (= tmp540 1)) (?v_909 (not x211)) (?v_910 (and (not x255) true)) (?v_912 (and x255 true)) (?v_911 (= tmp539 1)) (?v_913 (not x636)) (?v_914 (and (not x589) true)) (?v_916 (and x589 true)) (?v_915 (= tmp538 1)) (?v_917 (not x116)) (?v_918 (and (not x163) true)) (?v_920 (and x163 true)) (?v_919 (= tmp537 1)) (?v_921 (not x731)) (?v_922 (and (not x684) true)) (?v_924 (and x684 true)) (?v_923 (= tmp536 1)) (?v_925 (not x20)) (?v_926 (and (not x68) true)) (?v_928 (and x68 true)) (?v_927 (= tmp535 1)) (?v_929 (not x446)) (?v_1921 (not x398))) (let ((?v_930 (and ?v_1921 true)) (?v_932 (and x398 true)) (?v_931 (= tmp534 1)) (?v_933 (not x302)) (?v_1966 (not x350))) (let ((?v_934 (and ?v_1966 true)) (?v_936 (and x350 true)) (?v_935 (= tmp533 1)) (?v_937 (not x540)) (?v_938 (and (not x492) true)) (?v_940 (and x492 true)) (?v_939 (= tmp532 1)) (?v_941 (not x210)) (?v_2079 (not x254))) (let ((?v_942 (and ?v_2079 true)) (?v_944 (and x254 true)) (?v_943 (= tmp531 1)) (?v_945 (not x635)) (?v_1709 (not x588))) (let ((?v_946 (and ?v_1709 true)) (?v_948 (and x588 true)) (?v_947 (= tmp530 1)) (?v_949 (not x115)) (?v_2185 (not x162))) (let ((?v_950 (and ?v_2185 true)) (?v_952 (and x162 true)) (?v_951 (= tmp529 1)) (?v_953 (not x730)) (?v_1608 (not x683))) (let ((?v_954 (and ?v_1608 true)) (?v_956 (and x683 true)) (?v_955 (= tmp528 1)) (?v_957 (not x19)) (?v_2284 (not x67))) (let ((?v_958 (and ?v_2284 true)) (?v_960 (and x67 true)) (?v_959 (= tmp527 1)) (?v_961 (not x445)) (?v_962 (and (not x397) true)) (?v_964 (and x397 true)) (?v_963 (= tmp526 1)) (?v_965 (not x301)) (?v_966 (and (not x349) true)) (?v_968 (and x349 true)) (?v_967 (= tmp525 1)) (?v_969 (not x539)) (?v_1824 (not x491))) (let ((?v_970 (and ?v_1824 true)) (?v_972 (and x491 true)) (?v_971 (= tmp524 1)) (?v_973 (not x209)) (?v_974 (and (not x253) true)) (?v_976 (and x253 true)) (?v_975 (= tmp523 1)) (?v_977 (not x634)) (?v_978 (and (not x587) true)) (?v_980 (and x587 true)) (?v_979 (= tmp522 1)) (?v_981 (not x114)) (?v_982 (and (not x161) true)) (?v_984 (and x161 true)) (?v_983 (= tmp521 1)) (?v_985 (not x729)) (?v_986 (and (not x682) true)) (?v_988 (and x682 true)) (?v_987 (= tmp520 1)) (?v_989 (not x18)) (?v_990 (and (not x66) true)) (?v_992 (and x66 true)) (?v_991 (= tmp519 1)) (?v_993 (not x490)) (?v_1869 (not x444))) (let ((?v_994 (and ?v_1869 true)) (?v_996 (and x444 true)) (?v_995 (= tmp518 1)) (?v_997 (not x348)) (?v_1925 (not x396))) (let ((?v_998 (and ?v_1925 true)) (?v_1000 (and x396 true)) (?v_999 (= tmp517 1)) (?v_1001 (not x586)) (?v_1766 (not x538))) (let ((?v_1002 (and ?v_1766 true)) (?v_1004 (and x538 true)) (?v_1003 (= tmp516 1)) (?v_1005 (not x252)) (?v_2020 (not x300))) (let ((?v_1006 (and ?v_2020 true)) (?v_1008 (and x300 true)) (?v_1007 (= tmp515 1)) (?v_1009 (not x681)) (?v_1661 (not x633))) (let ((?v_1010 (and ?v_1661 true)) (?v_1012 (and x633 true)) (?v_1011 (= tmp514 1)) (?v_1013 (not x160)) (?v_2125 (not x208))) (let ((?v_1014 (and ?v_2125 true)) (?v_1016 (and x208 true)) (?v_1015 (= tmp513 1)) (?v_1017 (not x765)) (?v_1558 (not x728))) (let ((?v_1018 (and ?v_1558 true)) (?v_1020 (and x728 true)) (?v_1019 (= tmp512 1)) (?v_1021 (not x65)) (?v_2231 (not x113))) (let ((?v_1022 (and ?v_2231 true)) (?v_1024 (and x113 true)) (?v_1023 (= tmp511 1)) (?v_1025 (not x443)) (?v_1026 (and (not x395) true)) (?v_1028 (and x395 true)) (?v_1027 (= tmp510 1)) (?v_1029 (not x299)) (?v_1030 (and (not x347) true)) (?v_1032 (and x347 true)) (?v_1031 (= tmp509 1)) (?v_1033 (not x537)) (?v_1827 (not x489))) (let ((?v_1034 (and ?v_1827 true)) (?v_1036 (and x489 true)) (?v_1035 (= tmp508 1)) (?v_1037 (not x207)) (?v_1038 (and (not x251) true)) (?v_1040 (and x251 true)) (?v_1039 (= tmp507 1)) (?v_1041 (not x632)) (?v_1042 (and (not x585) true)) (?v_1044 (and x585 true)) (?v_1043 (= tmp506 1)) (?v_1045 (not x112)) (?v_1046 (and (not x159) true)) (?v_1048 (and x159 true)) (?v_1047 (= tmp505 1)) (?v_1049 (not x727)) (?v_1050 (and (not x680) true)) (?v_1052 (and x680 true)) (?v_1051 (= tmp504 1)) (?v_1053 (not x17)) (?v_1054 (and (not x64) true)) (?v_1056 (and x64 true)) (?v_1055 (= tmp503 1)) (?v_1057 (not x442)) (?v_1929 (not x394))) (let ((?v_1058 (and ?v_1929 true)) (?v_1060 (and x394 true)) (?v_1059 (= tmp502 1)) (?v_1061 (not x298)) (?v_1972 (not x346))) (let ((?v_1062 (and ?v_1972 true)) (?v_1064 (and x346 true)) (?v_1063 (= tmp501 1)) (?v_1065 (not x536)) (?v_1066 (and (not x488) true)) (?v_1068 (and x488 true)) (?v_1067 (= tmp500 1)) (?v_1069 (not x206)) (?v_2086 (not x250))) (let ((?v_1070 (and ?v_2086 true)) (?v_1072 (and x250 true)) (?v_1071 (= tmp499 1)) (?v_1073 (not x631)) (?v_1715 (not x584))) (let ((?v_1074 (and ?v_1715 true)) (?v_1076 (and x584 true)) (?v_1075 (= tmp498 1)) (?v_1077 (not x111)) (?v_2191 (not x158))) (let ((?v_1078 (and ?v_2191 true)) (?v_1080 (and x158 true)) (?v_1079 (= tmp497 1)) (?v_1081 (not x726)) (?v_1613 (not x679))) (let ((?v_1082 (and ?v_1613 true)) (?v_1084 (and x679 true)) (?v_1083 (= tmp496 1)) (?v_1085 (not x16)) (?v_2288 (not x63))) (let ((?v_1086 (and ?v_2288 true)) (?v_1088 (and x63 true)) (?v_1087 (= tmp495 1)) (?v_1089 (not x441)) (?v_1090 (and (not x393) true)) (?v_1092 (and x393 true)) (?v_1091 (= tmp494 1)) (?v_1093 (not x297)) (?v_1094 (and (not x345) true)) (?v_1096 (and x345 true)) (?v_1095 (= tmp493 1)) (?v_1097 (not x535)) (?v_1833 (not x487))) (let ((?v_1098 (and ?v_1833 true)) (?v_1100 (and x487 true)) (?v_1099 (= tmp492 1)) (?v_1101 (not x205)) (?v_1102 (and (not x249) true)) (?v_1104 (and x249 true)) (?v_1103 (= tmp491 1)) (?v_1105 (not x630)) (?v_1106 (and (not x583) true)) (?v_1108 (and x583 true)) (?v_1107 (= tmp490 1)) (?v_1109 (not x110)) (?v_1110 (and (not x157) true)) (?v_1112 (and x157 true)) (?v_1111 (= tmp489 1)) (?v_1113 (not x725)) (?v_1114 (and (not x678) true)) (?v_1116 (and x678 true)) (?v_1115 (= tmp488 1)) (?v_1117 (not x15)) (?v_1118 (and (not x62) true)) (?v_1120 (and x62 true)) (?v_1119 (= tmp487 1)) (?v_1121 (not x486)) (?v_1881 (not x440))) (let ((?v_1122 (and ?v_1881 true)) (?v_1124 (and x440 true)) (?v_1123 (= tmp486 1)) (?v_1125 (not x344)) (?v_1933 (not x392))) (let ((?v_1126 (and ?v_1933 true)) (?v_1128 (and x392 true)) (?v_1127 (= tmp485 1)) (?v_1129 (not x582)) (?v_1778 (not x534))) (let ((?v_1130 (and ?v_1778 true)) (?v_1132 (and x534 true)) (?v_1131 (= tmp484 1)) (?v_1133 (not x204)) (?v_2032 (not x296))) (let ((?v_1134 (and ?v_2032 true)) (?v_1136 (and x296 true)) (?v_1135 (= tmp483 1)) (?v_1137 (not x677)) (?v_1673 (not x629))) (let ((?v_1138 (and ?v_1673 true)) (?v_1140 (and x629 true)) (?v_1139 (= tmp482 1)) (?v_1141 (not x109)) (?v_2195 (not x156))) (let ((?v_1142 (and ?v_2195 true)) (?v_1144 (and x156 true)) (?v_1143 (= tmp481 1)) (?v_1145 (not x764)) (?v_1571 (not x724))) (let ((?v_1146 (and ?v_1571 true)) (?v_1148 (and x724 true)) (?v_1147 (= tmp480 1)) (?v_1149 (not x14)) (?v_2291 (not x61))) (let ((?v_1150 (and ?v_2291 true)) (?v_1152 (and x61 true)) (?v_1151 (= tmp479 1)) (?v_1153 (not x485)) (?v_1154 (and (not x439) true)) (?v_1156 (and x439 true)) (?v_1155 (= tmp478 1)) (?v_1157 (not x343)) (?v_1158 (and (not x391) true)) (?v_1160 (and x391 true)) (?v_1159 (= tmp477 1)) (?v_1161 (not x581)) (?v_1162 (and (not x533) true)) (?v_1164 (and x533 true)) (?v_1163 (= tmp476 1)) (?v_1165 (not x203)) (?v_1166 (and (not x295) true)) (?v_1168 (and x295 true)) (?v_1167 (= tmp475 1)) (?v_1169 (not x676)) (?v_1170 (and (not x628) true)) (?v_1172 (and x628 true)) (?v_1171 (= tmp474 1)) (?v_1173 (not x108)) (?v_1174 (and (not x155) true)) (?v_1176 (and x155 true)) (?v_1175 (= tmp473 1)) (?v_1177 (not x763)) (?v_1178 (and (not x723) true)) (?v_1180 (and x723 true)) (?v_1179 (= tmp472 1)) (?v_1181 (not x13)) (?v_1182 (and (not x60) true)) (?v_1184 (and x60 true)) (?v_1183 (= tmp471 1)) (?v_1185 (not x484)) (?v_1888 (not x438))) (let ((?v_1186 (and ?v_1888 true)) (?v_1188 (and x438 true)) (?v_1187 (= tmp470 1)) (?v_1189 (not x342)) (?v_1936 (not x390))) (let ((?v_1190 (and ?v_1936 true)) (?v_1192 (and x390 true)) (?v_1191 (= tmp469 1)) (?v_1193 (not x580)) (?v_1785 (not x532))) (let ((?v_1194 (and ?v_1785 true)) (?v_1196 (and x532 true)) (?v_1195 (= tmp468 1)) (?v_1197 (not x202)) (?v_2039 (not x294))) (let ((?v_1198 (and ?v_2039 true)) (?v_1200 (and x294 true)) (?v_1199 (= tmp467 1)) (?v_1201 (not x675)) (?v_1679 (not x627))) (let ((?v_1202 (and ?v_1679 true)) (?v_1204 (and x627 true)) (?v_1203 (= tmp466 1)) (?v_1205 (not x107)) (?v_2198 (not x154))) (let ((?v_1206 (and ?v_2198 true)) (?v_1208 (and x154 true)) (?v_1207 (= tmp465 1)) (?v_1209 (not x762)) (?v_1578 (not x722))) (let ((?v_1210 (and ?v_1578 true)) (?v_1212 (and x722 true)) (?v_1211 (= tmp464 1)) (?v_1213 (not x12)) (?v_2295 (not x59))) (let ((?v_1214 (and ?v_2295 true)) (?v_1216 (and x59 true)) (?v_1215 (= tmp463 1)) (?v_1217 (not x483)) (?v_1218 (and (not x437) true)) (?v_1220 (and x437 true)) (?v_1219 (= tmp462 1)) (?v_1221 (not x341)) (?v_1222 (and (not x389) true)) (?v_1224 (and x389 true)) (?v_1223 (= tmp461 1)) (?v_1225 (not x579)) (?v_1226 (and (not x531) true)) (?v_1228 (and x531 true)) (?v_1227 (= tmp460 1)) (?v_1229 (not x201)) (?v_1230 (and (not x293) true)) (?v_1232 (and x293 true)) (?v_1231 (= tmp459 1)) (?v_1233 (not x674)) (?v_1234 (and (not x626) true)) (?v_1236 (and x626 true)) (?v_1235 (= tmp458 1)) (?v_1237 (not x106)) (?v_1238 (and (not x153) true)) (?v_1240 (and x153 true)) (?v_1239 (= tmp457 1)) (?v_1241 (not x761)) (?v_1242 (and (not x721) true)) (?v_1244 (and x721 true)) (?v_1243 (= tmp456 1)) (?v_1245 (not x11)) (?v_1246 (and (not x58) true)) (?v_1248 (and x58 true)) (?v_1247 (= tmp455 1)) (?v_1249 (not x436)) (?v_1940 (not x388))) (let ((?v_1250 (and ?v_1940 true)) (?v_1252 (and x388 true)) (?v_1251 (= tmp454 1)) (?v_1253 (not x292)) (?v_1983 (not x340))) (let ((?v_1254 (and ?v_1983 true)) (?v_1256 (and x340 true)) (?v_1255 (= tmp453 1)) (?v_1257 (not x530)) (?v_1258 (and (not x482) true)) (?v_1260 (and x482 true)) (?v_1259 (= tmp452 1)) (?v_1261 (not x200)) (?v_2090 (not x248))) (let ((?v_1262 (and ?v_2090 true)) (?v_1264 (and x248 true)) (?v_1263 (= tmp451 1)) (?v_1265 (not x625)) (?v_1725 (not x578))) (let ((?v_1266 (and ?v_1725 true)) (?v_1268 (and x578 true)) (?v_1267 (= tmp450 1)) (?v_1269 (not x105)) (?v_2202 (not x152))) (let ((?v_1270 (and ?v_2202 true)) (?v_1272 (and x152 true)) (?v_1271 (= tmp449 1)) (?v_1273 (not x720)) (?v_1622 (not x673))) (let ((?v_1274 (and ?v_1622 true)) (?v_1276 (and x673 true)) (?v_1275 (= tmp448 1)) (?v_1277 (not x10)) (?v_2299 (not x57))) (let ((?v_1278 (and ?v_2299 true)) (?v_1280 (and x57 true)) (?v_1279 (= tmp447 1)) (?v_1281 (not x435)) (?v_1282 (and (not x387) true)) (?v_1284 (and x387 true)) (?v_1283 (= tmp446 1)) (?v_1285 (not x291)) (?v_1286 (and (not x339) true)) (?v_1288 (and x339 true)) (?v_1287 (= tmp445 1)) (?v_1289 (not x529)) (?v_1844 (not x481))) (let ((?v_1290 (and ?v_1844 true)) (?v_1292 (and x481 true)) (?v_1291 (= tmp444 1)) (?v_1293 (not x199)) (?v_1294 (and (not x247) true)) (?v_1296 (and x247 true)) (?v_1295 (= tmp443 1)) (?v_1297 (not x624)) (?v_1298 (and (not x577) true)) (?v_1300 (and x577 true)) (?v_1299 (= tmp442 1)) (?v_1301 (not x104)) (?v_1302 (and (not x151) true)) (?v_1304 (and x151 true)) (?v_1303 (= tmp441 1)) (?v_1305 (not x719)) (?v_1306 (and (not x672) true)) (?v_1308 (and x672 true)) (?v_1307 (= tmp440 1)) (?v_1309 (not x9)) (?v_1310 (and (not x56) true)) (?v_1312 (and x56 true)) (?v_1311 (= tmp439 1)) (?v_1313 (not x434)) (?v_1944 (not x386))) (let ((?v_1314 (and ?v_1944 true)) (?v_1316 (and x386 true)) (?v_1315 (= tmp438 1)) (?v_1317 (not x290)) (?v_1989 (not x338))) (let ((?v_1318 (and ?v_1989 true)) (?v_1320 (and x338 true)) (?v_1319 (= tmp437 1)) (?v_1321 (not x528)) (?v_1322 (and (not x480) true)) (?v_1324 (and x480 true)) (?v_1323 (= tmp436 1)) (?v_1325 (not x198)) (?v_2093 (not x246))) (let ((?v_1326 (and ?v_2093 true)) (?v_1328 (and x246 true)) (?v_1327 (= tmp435 1)) (?v_1329 (not x623)) (?v_1731 (not x576))) (let ((?v_1330 (and ?v_1731 true)) (?v_1332 (and x576 true)) (?v_1331 (= tmp434 1)) (?v_1333 (not x103)) (?v_2206 (not x150))) (let ((?v_1334 (and ?v_2206 true)) (?v_1336 (and x150 true)) (?v_1335 (= tmp433 1)) (?v_1337 (not x718)) (?v_1629 (not x671))) (let ((?v_1338 (and ?v_1629 true)) (?v_1340 (and x671 true)) (?v_1339 (= tmp432 1)) (?v_1341 (not x8)) (?v_2302 (not x55))) (let ((?v_1342 (and ?v_2302 true)) (?v_1344 (and x55 true)) (?v_1343 (= tmp431 1)) (?v_1345 (not x433)) (?v_1346 (and (not x385) true)) (?v_1348 (and x385 true)) (?v_1347 (= tmp430 1)) (?v_1349 (not x289)) (?v_1350 (and (not x337) true)) (?v_1352 (and x337 true)) (?v_1351 (= tmp429 1)) (?v_1353 (not x527)) (?v_1847 (not x479))) (let ((?v_1354 (and ?v_1847 true)) (?v_1356 (and x479 true)) (?v_1355 (= tmp428 1)) (?v_1357 (not x197)) (?v_1358 (and (not x245) true)) (?v_1360 (and x245 true)) (?v_1359 (= tmp427 1)) (?v_1361 (not x622)) (?v_1362 (and (not x575) true)) (?v_1364 (and x575 true)) (?v_1363 (= tmp426 1)) (?v_1365 (not x102)) (?v_1366 (and (not x149) true)) (?v_1368 (and x149 true)) (?v_1367 (= tmp425 1)) (?v_1369 (not x717)) (?v_1370 (and (not x670) true)) (?v_1372 (and x670 true)) (?v_1371 (= tmp424 1)) (?v_1373 (not x7)) (?v_1374 (and (not x54) true)) (?v_1376 (and x54 true)) (?v_1375 (= tmp423 1)) (?v_1377 (not x432)) (?v_1947 (not x384))) (let ((?v_1378 (and ?v_1947 true)) (?v_1380 (and x384 true)) (?v_1379 (= tmp422 1)) (?v_1381 (not x288)) (?v_1991 (not x336))) (let ((?v_1382 (and ?v_1991 true)) (?v_1384 (and x336 true)) (?v_1383 (= tmp421 1)) (?v_1385 (not x526)) (?v_1386 (and (not x478) true)) (?v_1388 (and x478 true)) (?v_1387 (= tmp420 1)) (?v_1389 (not x196)) (?v_2097 (not x244))) (let ((?v_1390 (and ?v_2097 true)) (?v_1392 (and x244 true)) (?v_1391 (= tmp419 1)) (?v_1393 (not x621)) (?v_1735 (not x574))) (let ((?v_1394 (and ?v_1735 true)) (?v_1396 (and x574 true)) (?v_1395 (= tmp418 1)) (?v_1397 (not x101)) (?v_2209 (not x148))) (let ((?v_1398 (and ?v_2209 true)) (?v_1400 (and x148 true)) (?v_1399 (= tmp417 1)) (?v_1401 (not x716)) (?v_1632 (not x669))) (let ((?v_1402 (and ?v_1632 true)) (?v_1404 (and x669 true)) (?v_1403 (= tmp416 1)) (?v_1405 (not x6)) (?v_2305 (not x53))) (let ((?v_1406 (and ?v_2305 true)) (?v_1408 (and x53 true)) (?v_1407 (= tmp415 1)) (?v_1409 (not x431)) (?v_1410 (and (not x383) true)) (?v_1412 (and x383 true)) (?v_1411 (= tmp414 1)) (?v_1413 (not x287)) (?v_1414 (and (not x335) true)) (?v_1416 (and x335 true)) (?v_1415 (= tmp413 1)) (?v_1417 (not x525)) (?v_1849 (not x477))) (let ((?v_1418 (and ?v_1849 true)) (?v_1420 (and x477 true)) (?v_1419 (= tmp412 1)) (?v_1421 (not x195)) (?v_1422 (and (not x243) true)) (?v_1424 (and x243 true)) (?v_1423 (= tmp411 1)) (?v_1425 (not x620)) (?v_1426 (and (not x573) true)) (?v_1428 (and x573 true)) (?v_1427 (= tmp410 1)) (?v_1429 (not x100)) (?v_1430 (and (not x147) true)) (?v_1432 (and x147 true)) (?v_1431 (= tmp409 1)) (?v_1433 (not x715)) (?v_1434 (and (not x668) true)) (?v_1436 (and x668 true)) (?v_1435 (= tmp408 1)) (?v_1437 (not x5)) (?v_1438 (and (not x52) true)) (?v_1440 (and x52 true)) (?v_1439 (= tmp407 1)) (?v_1441 (not x430)) (?v_1951 (not x382))) (let ((?v_1442 (and ?v_1951 true)) (?v_1444 (and x382 true)) (?v_1443 (= tmp406 1)) (?v_1445 (not x286)) (?v_1993 (not x334))) (let ((?v_1446 (and ?v_1993 true)) (?v_1448 (and x334 true)) (?v_1447 (= tmp405 1)) (?v_1449 (not x524)) (?v_1450 (and (not x476) true)) (?v_1452 (and x476 true)) (?v_1451 (= tmp404 1)) (?v_1453 (not x194)) (?v_2100 (not x242))) (let ((?v_1454 (and ?v_2100 true)) (?v_1456 (and x242 true)) (?v_1455 (= tmp403 1)) (?v_1457 (not x619)) (?v_1739 (not x572))) (let ((?v_1458 (and ?v_1739 true)) (?v_1460 (and x572 true)) (?v_1459 (= tmp402 1)) (?v_1461 (not x99)) (?v_2211 (not x146))) (let ((?v_1462 (and ?v_2211 true)) (?v_1464 (and x146 true)) (?v_1463 (= tmp401 1)) (?v_1465 (not x714)) (?v_1636 (not x667))) (let ((?v_1466 (and ?v_1636 true)) (?v_1468 (and x667 true)) (?v_1467 (= tmp400 1)) (?v_1469 (not x4)) (?v_2308 (not x51))) (let ((?v_1470 (and ?v_2308 true)) (?v_1472 (and x51 true)) (?v_1471 (= tmp399 1)) (?v_1473 (not x429)) (?v_1474 (and (not x381) true)) (?v_1476 (and x381 true)) (?v_1475 (= tmp398 1)) (?v_1477 (not x285)) (?v_1478 (and (not x333) true)) (?v_1480 (and x333 true)) (?v_1479 (= tmp397 1)) (?v_1481 (not x523)) (?v_1852 (not x475))) (let ((?v_1482 (and ?v_1852 true)) (?v_1484 (and x475 true)) (?v_1483 (= tmp396 1)) (?v_1485 (not x193)) (?v_1486 (and (not x241) true)) (?v_1488 (and x241 true)) (?v_1487 (= tmp395 1)) (?v_1489 (not x618)) (?v_1490 (and (not x571) true)) (?v_1492 (and x571 true)) (?v_1491 (= tmp394 1)) (?v_1493 (not x98)) (?v_1494 (and (not x145) true)) (?v_1496 (and x145 true)) (?v_1495 (= tmp393 1)) (?v_1497 (not x713)) (?v_1498 (and (not x666) true)) (?v_1500 (and x666 true)) (?v_1499 (= tmp392 1)) (?v_1501 (not x3)) (?v_1502 (and (not x50) true)) (?v_1504 (and x50 true)) (?v_1503 (= tmp391 1)) (?v_1505 (not x428)) (?v_1955 (not x380))) (let ((?v_1506 (and ?v_1955 true)) (?v_1508 (and x380 true)) (?v_1507 (= tmp390 1)) (?v_1509 (not x284)) (?v_1997 (not x332))) (let ((?v_1510 (and ?v_1997 true)) (?v_1512 (and x332 true)) (?v_1511 (= tmp389 1)) (?v_1513 (not x570)) (?v_1810 (not x522))) (let ((?v_1514 (and ?v_1810 true)) (?v_1516 (and x522 true)) (?v_1515 (= tmp388 1)) (?v_1517 (not x192)) (?v_2104 (not x240))) (let ((?v_1518 (and ?v_2104 true)) (?v_1520 (and x240 true)) (?v_1519 (= tmp387 1)) (?v_1521 (not x665)) (?v_1698 (not x617))) (let ((?v_1522 (and ?v_1698 true)) (?v_1524 (and x617 true)) (?v_1523 (= tmp386 1)) (?v_1525 (not x97)) (?v_2215 (not x144))) (let ((?v_1526 (and ?v_2215 true)) (?v_1528 (and x144 true)) (?v_1527 (= tmp385 1)) (?v_1529 (not x760)) (?v_1599 (not x712))) (let ((?v_1530 (and ?v_1599 true)) (?v_1532 (and x712 true)) (?v_1531 (= tmp384 1)) (?v_1533 (not x2)) (?v_2311 (not x49))) (let ((?v_1534 (and ?v_2311 true)) (?v_1536 (and x49 true)) (?v_1535 (= tmp383 1)) (?v_1537 (and ?v_761 true)) (?v_1539 (and x736 true)) (?v_1538 (= tmp382 6)) (?v_1540 (and ?v_793 true)) (?v_1542 (and x735 true)) (?v_1541 (= tmp381 4)) (?v_1544 (and ?v_697 true)) (?v_1546 (and x738 true)) (?v_1545 (= tmp380 6)) (?v_1547 (and ?v_857 true)) (?v_1549 (and x733 true)) (?v_1548 (= tmp379 6)) (?v_1550 (and ?v_633 true)) (?v_1551 (and x740 true)) (?v_1552 (and ?v_921 true)) (?v_1554 (and x731 true)) (?v_1553 (= tmp377 8)) (?v_1555 (and ?v_569 true)) (?v_1557 (and x742 true)) (?v_1556 (= tmp376 8)) (?v_1559 (and ?v_985 true)) (?v_1561 (and x729 true)) (?v_1560 (= tmp375 8)) (?v_1562 (and ?v_505 true)) (?v_1564 (and x744 true)) (?v_1563 (= tmp374 8)) (?v_1565 (and ?v_1049 true)) (?v_1567 (and x727 true)) (?v_1566 (= tmp373 8)) (?v_1568 (and ?v_441 true)) (?v_1570 (and x746 true)) (?v_1569 (= tmp372 8)) (?v_1572 (and ?v_1113 true)) (?v_1574 (and x725 true)) (?v_1573 (= tmp371 8)) (?v_1575 (and ?v_377 true)) (?v_1577 (and x748 true)) (?v_1576 (= tmp370 6)) (?v_1579 (= tmp369 8)) (?v_1580 (and ?v_313 true)) (?v_1581 (and x750 true)) (?v_1582 (= tmp367 8)) (?v_1583 (= tmp366 8)) (?v_1584 (and ?v_1305 true)) (?v_1585 (and x719 true)) (?v_1586 (and ?v_185 true)) (?v_1588 (and x754 true)) (?v_1587 (= tmp364 8)) (?v_1589 (and ?v_1369 true)) (?v_1590 (and x717 true)) (?v_1591 (and ?v_121 true)) (?v_1593 (and x756 true)) (?v_1592 (= tmp362 8)) (?v_1594 (and ?v_1433 true)) (?v_1596 (and x715 true)) (?v_1595 (= tmp361 8)) (?v_1597 (and ?v_57 true)) (?v_1598 (and x758 true)) (?v_1600 (and ?v_1497 true)) (?v_1602 (and x713 true)) (?v_1601 (= tmp359 8)) (?v_1604 (= tmp356 2)) (?v_1607 (= tmp354 4)) (?v_1610 (= tmp352 4)) (?v_1612 (= tmp350 2)) (?v_1614 (= tmp349 6)) (?v_1617 (and ?v_1169 true)) (?v_1619 (and x676 true)) (?v_1618 (= tmp345 8)) (?v_1621 (= tmp344 6)) (?v_1623 (and ?v_1233 true)) (?v_1625 (and x674 true)) (?v_1624 (= tmp343 8)) (?v_1627 (and ?v_241 true)) (?v_1628 (and x704 true)) (?v_1630 (= tmp341 8)) (?v_1633 (= tmp339 8)) (?v_1635 (= tmp338 6)) (?v_1637 (= tmp337 8)) (?v_1639 (= tmp336 6)) (?v_1640 (= tmp335 8)) (?v_1641 (and ?v_753 true)) (?v_1642 (and x641 true)) (?v_1644 (and ?v_785 true)) (?v_1646 (and x640 true)) (?v_1645 (= tmp333 6)) (?v_1648 (and ?v_689 true)) (?v_1650 (and x643 true)) (?v_1649 (= tmp332 8)) (?v_1651 (and ?v_849 true)) (?v_1653 (and x638 true)) (?v_1652 (= tmp331 6)) (?v_1654 (and ?v_625 true)) (?v_1656 (and x645 true)) (?v_1655 (= tmp330 8)) (?v_1657 (and ?v_913 true)) (?v_1658 (and x636 true)) (?v_1659 (and ?v_561 true)) (?v_1660 (and x647 true)) (?v_1662 (and ?v_977 true)) (?v_1664 (and x634 true)) (?v_1663 (= tmp327 8)) (?v_1665 (and ?v_497 true)) (?v_1667 (and x649 true)) (?v_1666 (= tmp326 6)) (?v_1668 (and ?v_1041 true)) (?v_1670 (and x632 true)) (?v_1669 (= tmp325 6)) (?v_1671 (and ?v_433 true)) (?v_1672 (and x651 true)) (?v_1674 (and ?v_1105 true)) (?v_1675 (and x630 true)) (?v_1676 (and ?v_369 true)) (?v_1678 (and x653 true)) (?v_1677 (= tmp322 4)) (?v_1680 (= tmp321 4)) (?v_1681 (and ?v_305 true)) (?v_1682 (and x655 true)) (?v_1683 (and ?v_1297 true)) (?v_1684 (and x624 true)) (?v_1685 (and ?v_177 true)) (?v_1686 (and x659 true)) (?v_1687 (and ?v_1361 true)) (?v_1689 (and x622 true)) (?v_1688 (= tmp315 6)) (?v_1690 (and ?v_113 true)) (?v_1692 (and x661 true)) (?v_1691 (= tmp314 6)) (?v_1693 (and ?v_1425 true)) (?v_1694 (and x620 true)) (?v_1695 (and ?v_49 true)) (?v_1697 (and x663 true)) (?v_1696 (= tmp312 6)) (?v_1699 (and ?v_1489 true)) (?v_1701 (and x618 true)) (?v_1700 (= tmp311 8)) (?v_1704 (= tmp307 4)) (?v_1706 (and ?v_649 true)) (?v_1708 (and x597 true)) (?v_1707 (= tmp306 4)) (?v_1711 (= tmp304 4)) (?v_1712 (= tmp303 6)) (?v_1714 (= tmp302 6)) (?v_1717 (= tmp300 6)) (?v_1718 (= tmp299 8)) (?v_1720 (= tmp298 6)) (?v_1721 (and ?v_1161 true)) (?v_1723 (and x581 true)) (?v_1722 (= tmp297 6)) (?v_1726 (and ?v_1225 true)) (?v_1728 (and x579 true)) (?v_1727 (= tmp295 6)) (?v_1730 (= tmp294 2)) (?v_1732 (= tmp293 6)) (?v_1734 (= tmp292 4)) (?v_1736 (= tmp291 6)) (?v_1738 (= tmp290 4)) (?v_1740 (= tmp289 4)) (?v_1742 (= tmp288 4)) (?v_1743 (= tmp287 6)) (?v_1744 (and ?v_745 true)) (?v_1746 (and x546 true)) (?v_1745 (= tmp286 6)) (?v_1748 (and ?v_777 true)) (?v_1749 (and x545 true)) (?v_1751 (and ?v_681 true)) (?v_1753 (and x548 true)) (?v_1752 (= tmp284 6)) (?v_1754 (and ?v_841 true)) (?v_1756 (and x543 true)) (?v_1755 (= tmp283 4)) (?v_1757 (and ?v_617 true)) (?v_1759 (and x550 true)) (?v_1758 (= tmp282 6)) (?v_1760 (and ?v_905 true)) (?v_1762 (and x541 true)) (?v_1761 (= tmp281 2)) (?v_1763 (and ?v_553 true)) (?v_1765 (and x552 true)) (?v_1764 (= tmp280 8)) (?v_1767 (and ?v_969 true)) (?v_1769 (and x539 true)) (?v_1768 (= tmp279 2)) (?v_1770 (and ?v_489 true)) (?v_1771 (and x554 true)) (?v_1772 (and ?v_1033 true)) (?v_1774 (and x537 true)) (?v_1773 (= tmp277 2)) (?v_1775 (and ?v_425 true)) (?v_1777 (and x556 true)) (?v_1776 (= tmp276 6)) (?v_1779 (and ?v_1097 true)) (?v_1781 (and x535 true)) (?v_1780 (= tmp275 2)) (?v_1782 (and ?v_361 true)) (?v_1784 (and x558 true)) (?v_1783 (= tmp274 6)) (?v_1786 (= tmp273 4)) (?v_1787 (and ?v_297 true)) (?v_1789 (and x560 true)) (?v_1788 (= tmp272 6)) (?v_1790 (= tmp271 6)) (?v_1791 (and ?v_233 true)) (?v_1793 (and x562 true)) (?v_1792 (= tmp270 8)) (?v_1794 (and ?v_1289 true)) (?v_1795 (and x529 true)) (?v_1796 (and ?v_169 true)) (?v_1798 (and x564 true)) (?v_1797 (= tmp268 6)) (?v_1799 (and ?v_1353 true)) (?v_1801 (and x527 true)) (?v_1800 (= tmp267 8)) (?v_1802 (and ?v_105 true)) (?v_1804 (and x566 true)) (?v_1803 (= tmp266 6)) (?v_1805 (and ?v_1417 true)) (?v_1807 (and x525 true)) (?v_1806 (= tmp265 8)) (?v_1808 (and ?v_41 true)) (?v_1809 (and x568 true)) (?v_1811 (and ?v_1481 true)) (?v_1813 (and x523 true)) (?v_1812 (= tmp263 6)) (?v_1815 (= tmp260 4)) (?v_1817 (and ?v_801 true)) (?v_1818 (and x496 true)) (?v_1820 (= tmp258 4)) (?v_1823 (= tmp256 2)) (?v_1825 (= tmp255 6)) (?v_1828 (and ?v_993 true)) (?v_1830 (and x490 true)) (?v_1829 (= tmp253 6)) (?v_1832 (= tmp252 4)) (?v_1834 (= tmp251 6)) (?v_1836 (= tmp250 6)) (?v_1837 (and ?v_1121 true)) (?v_1838 (and x486 true)) (?v_1840 (= tmp248 6)) (?v_1841 (and ?v_1185 true)) (?v_1842 (and x484 true)) (?v_1846 (= tmp244 6)) (?v_1851 (= tmp240 8)) (?v_1854 (and ?v_769 true)) (?v_1856 (and x451 true)) (?v_1855 (= tmp237 4)) (?v_1857 (and ?v_705 true)) (?v_1858 (and x453 true)) (?v_1859 (and ?v_833 true)) (?v_1861 (and x449 true)) (?v_1860 (= tmp235 4)) (?v_1862 (and ?v_609 true)) (?v_1863 (and x455 true)) (?v_1864 (and ?v_897 true)) (?v_1866 (and x447 true)) (?v_1865 (= tmp233 4)) (?v_1867 (and ?v_545 true)) (?v_1868 (and x457 true)) (?v_1870 (and ?v_961 true)) (?v_1872 (and x445 true)) (?v_1871 (= tmp231 4)) (?v_1873 (and ?v_481 true)) (?v_1875 (and x459 true)) (?v_1874 (= tmp230 6)) (?v_1876 (and ?v_1025 true)) (?v_1878 (and x443 true)) (?v_1877 (= tmp229 2)) (?v_1879 (and ?v_417 true)) (?v_1880 (and x461 true)) (?v_1882 (and ?v_1089 true)) (?v_1884 (and x441 true)) (?v_1883 (= tmp227 2)) (?v_1885 (and ?v_353 true)) (?v_1887 (and x463 true)) (?v_1886 (= tmp226 8)) (?v_1889 (= tmp225 4)) (?v_1890 (and ?v_289 true)) (?v_1892 (and x465 true)) (?v_1891 (= tmp224 8)) (?v_1893 (= tmp223 4)) (?v_1894 (and ?v_225 true)) (?v_1896 (and x467 true)) (?v_1895 (= tmp222 8)) (?v_1897 (and ?v_1281 true)) (?v_1899 (and x435 true)) (?v_1898 (= tmp221 4)) (?v_1900 (and ?v_161 true)) (?v_1902 (and x469 true)) (?v_1901 (= tmp220 6)) (?v_1903 (and ?v_1345 true)) (?v_1905 (and x433 true)) (?v_1904 (= tmp219 4)) (?v_1906 (and ?v_97 true)) (?v_1908 (and x471 true)) (?v_1907 (= tmp218 6)) (?v_1909 (and ?v_1409 true)) (?v_1910 (and x431 true)) (?v_1911 (and ?v_33 true)) (?v_1912 (and x473 true)) (?v_1913 (and ?v_1473 true)) (?v_1914 (and x429 true)) (?v_1917 (= tmp213 6)) (?v_1922 (= tmp209 4)) (?v_1924 (= tmp208 4)) (?v_1926 (= tmp207 4)) (?v_1928 (= tmp206 4)) (?v_1930 (= tmp205 4)) (?v_1932 (= tmp204 4)) (?v_1934 (= tmp203 2)) (?v_1937 (= tmp201 2)) (?v_1939 (= tmp200 6)) (?v_1941 (= tmp199 2)) (?v_1943 (= tmp198 6)) (?v_1945 (= tmp197 4)) (?v_1948 (= tmp195 6)) (?v_1950 (= tmp194 4)) (?v_1952 (= tmp193 6)) (?v_1954 (= tmp192 4)) (?v_1956 (= tmp191 4)) (?v_1958 (= tmp190 2)) (?v_1959 (= tmp189 2)) (?v_1961 (= tmp188 4)) (?v_1963 (= tmp187 4)) (?v_1965 (= tmp186 4)) (?v_1967 (= tmp185 6)) (?v_1969 (= tmp184 4)) (?v_1970 (= tmp183 6)) (?v_1973 (= tmp181 8)) (?v_1975 (= tmp180 6)) (?v_1976 (= tmp179 8)) (?v_1978 (= tmp178 6)) (?v_1979 (and ?v_1157 true)) (?v_1980 (and x343 true)) (?v_1982 (= tmp176 6)) (?v_1984 (and ?v_1221 true)) (?v_1986 (and x341 true)) (?v_1985 (= tmp175 6)) (?v_1988 (= tmp174 6)) (?v_1994 (= tmp169 4)) (?v_1996 (= tmp168 1)) (?v_1998 (= tmp167 4)) (?v_1999 (and ?v_741 true)) (?v_2001 (and x308 true)) (?v_2000 (= tmp166 4)) (?v_2003 (and ?v_773 true)) (?v_2005 (and x307 true)) (?v_2004 (= tmp165 4)) (?v_2006 (and ?v_677 true)) (?v_2008 (and x310 true)) (?v_2007 (= tmp164 4)) (?v_2009 (and ?v_837 true)) (?v_2010 (and x305 true)) (?v_2011 (and ?v_613 true)) (?v_2013 (and x312 true)) (?v_2012 (= tmp162 4)) (?v_2014 (and ?v_901 true)) (?v_2016 (and x303 true)) (?v_2015 (= tmp161 6)) (?v_2017 (and ?v_549 true)) (?v_2019 (and x314 true)) (?v_2018 (= tmp160 6)) (?v_2021 (and ?v_965 true)) (?v_2023 (and x301 true)) (?v_2022 (= tmp159 6)) (?v_2024 (and ?v_485 true)) (?v_2026 (and x316 true)) (?v_2025 (= tmp158 6)) (?v_2027 (and ?v_1029 true)) (?v_2028 (and x299 true)) (?v_2029 (and ?v_421 true)) (?v_2031 (and x318 true)) (?v_2030 (= tmp156 6)) (?v_2033 (and ?v_1093 true)) (?v_2035 (and x297 true)) (?v_2034 (= tmp155 4)) (?v_2036 (and ?v_357 true)) (?v_2038 (and x320 true)) (?v_2037 (= tmp154 6)) (?v_2040 (= tmp153 4)) (?v_2041 (and ?v_293 true)) (?v_2043 (and x322 true)) (?v_2042 (= tmp152 4)) (?v_2044 (and ?v_229 true)) (?v_2046 (and x324 true)) (?v_2045 (= tmp150 4)) (?v_2047 (and ?v_1285 true)) (?v_2048 (and x291 true)) (?v_2049 (and ?v_165 true)) (?v_2051 (and x326 true)) (?v_2050 (= tmp148 4)) (?v_2052 (and ?v_1349 true)) (?v_2053 (and x289 true)) (?v_2054 (and ?v_101 true)) (?v_2056 (and x328 true)) (?v_2055 (= tmp146 4)) (?v_2057 (and ?v_1413 true)) (?v_2059 (and x287 true)) (?v_2058 (= tmp145 4)) (?v_2060 (and ?v_37 true)) (?v_2062 (and x330 true)) (?v_2061 (= tmp144 4)) (?v_2063 (and ?v_1477 true)) (?v_2065 (and x285 true)) (?v_2064 (= tmp143 4)) (?v_2067 (= tmp142 2)) (?v_2069 (= tmp141 1)) (?v_2071 (= tmp140 4)) (?v_2072 (= tmp139 2)) (?v_2074 (= tmp138 4)) (?v_2076 (= tmp137 2)) (?v_2078 (= tmp136 4)) (?v_2080 (= tmp135 2)) (?v_2082 (= tmp134 4)) (?v_2083 (= tmp133 2)) (?v_2085 (= tmp132 4)) (?v_2087 (= tmp131 1)) (?v_2089 (= tmp130 2)) (?v_2091 (= tmp129 1)) (?v_2094 (= tmp127 1)) (?v_2096 (= tmp126 4)) (?v_2099 (= tmp124 6)) (?v_2101 (= tmp123 2)) (?v_2103 (= tmp122 6)) (?v_2105 (= tmp121 2)) (?v_2106 (and ?v_749 true)) (?v_2107 (and x216 true)) (?v_2109 (and ?v_781 true)) (?v_2111 (and x215 true)) (?v_2110 (= tmp119 2)) (?v_2112 (and ?v_685 true)) (?v_2113 (and x218 true)) (?v_2114 (and ?v_845 true)) (?v_2116 (and x213 true)) (?v_2115 (= tmp117 4)) (?v_2117 (and ?v_621 true)) (?v_2119 (and x220 true)) (?v_2118 (= tmp116 2)) (?v_2120 (and ?v_909 true)) (?v_2121 (and x211 true)) (?v_2122 (and ?v_557 true)) (?v_2124 (and x222 true)) (?v_2123 (= tmp114 2)) (?v_2126 (and ?v_973 true)) (?v_2128 (and x209 true)) (?v_2127 (= tmp113 6)) (?v_2129 (and ?v_493 true)) (?v_2131 (and x224 true)) (?v_2130 (= tmp112 2)) (?v_2132 (and ?v_1037 true)) (?v_2134 (and x207 true)) (?v_2133 (= tmp111 6)) (?v_2135 (and ?v_429 true)) (?v_2137 (and x226 true)) (?v_2136 (= tmp110 2)) (?v_2138 (and ?v_1101 true)) (?v_2140 (and x205 true)) (?v_2139 (= tmp109 6)) (?v_2141 (and ?v_365 true)) (?v_2143 (and x228 true)) (?v_2142 (= tmp108 2)) (?v_2144 (and ?v_1165 true)) (?v_2146 (and x203 true)) (?v_2145 (= tmp107 6)) (?v_2147 (and ?v_301 true)) (?v_2149 (and x230 true)) (?v_2148 (= tmp106 2)) (?v_2150 (and ?v_1229 true)) (?v_2152 (and x201 true)) (?v_2151 (= tmp105 4)) (?v_2153 (and ?v_237 true)) (?v_2155 (and x232 true)) (?v_2154 (= tmp104 2)) (?v_2156 (and ?v_1293 true)) (?v_2158 (and x199 true)) (?v_2157 (= tmp103 4)) (?v_2159 (and ?v_173 true)) (?v_2161 (and x234 true)) (?v_2160 (= tmp102 2)) (?v_2162 (and ?v_1357 true)) (?v_2164 (and x197 true)) (?v_2163 (= tmp101 4)) (?v_2165 (and ?v_109 true)) (?v_2167 (and x236 true)) (?v_2166 (= tmp100 2)) (?v_2168 (and ?v_1421 true)) (?v_2170 (and x195 true)) (?v_2169 (= tmp99 6)) (?v_2171 (and ?v_45 true)) (?v_2173 (and x238 true)) (?v_2172 (= tmp98 2)) (?v_2174 (and ?v_1485 true)) (?v_2176 (and x193 true)) (?v_2175 (= tmp97 6)) (?v_2178 (= tmp96 4)) (?v_2179 (= tmp95 4)) (?v_2182 (= tmp93 6)) (?v_2184 (= tmp92 4)) (?v_2186 (= tmp91 6)) (?v_2188 (= tmp90 2)) (?v_2189 (= tmp89 6)) (?v_2192 (= tmp87 6)) (?v_2194 (= tmp86 6)) (?v_2197 (= tmp84 6)) (?v_2199 (= tmp83 4)) (?v_2201 (= tmp82 4)) (?v_2203 (= tmp81 4)) (?v_2205 (= tmp80 6)) (?v_2208 (= tmp78 6)) (?v_2212 (= tmp75 4)) (?v_2214 (= tmp74 2)) (?v_2216 (= tmp73 4)) (?v_2217 (and ?v_757 true)) (?v_2218 (and x120 true)) (?v_2219 (and ?v_693 true)) (?v_2220 (and x122 true)) (?v_2221 (and ?v_853 true)) (?v_2222 (and x118 true)) (?v_2223 (and ?v_629 true)) (?v_2225 (and x124 true)) (?v_2224 (= tmp68 6)) (?v_2226 (and ?v_917 true)) (?v_2227 (and x116 true)) (?v_2228 (and ?v_565 true)) (?v_2230 (and x126 true)) (?v_2229 (= tmp66 4)) (?v_2232 (and ?v_981 true)) (?v_2234 (and x114 true)) (?v_2233 (= tmp65 4)) (?v_2235 (and ?v_501 true)) (?v_2237 (and x128 true)) (?v_2236 (= tmp64 2)) (?v_2238 (and ?v_1045 true)) (?v_2240 (and x112 true)) (?v_2239 (= tmp63 4)) (?v_2241 (and ?v_437 true)) (?v_2242 (and x130 true)) (?v_2243 (and ?v_1109 true)) (?v_2245 (and x110 true)) (?v_2244 (= tmp61 4)) (?v_2246 (and ?v_373 true)) (?v_2247 (and x132 true)) (?v_2248 (and ?v_1173 true)) (?v_2249 (and x108 true)) (?v_2250 (and ?v_309 true)) (?v_2251 (and x134 true)) (?v_2252 (and ?v_1237 true)) (?v_2254 (and x106 true)) (?v_2253 (= tmp57 6)) (?v_2255 (and ?v_245 true)) (?v_2257 (and x136 true)) (?v_2256 (= tmp56 4)) (?v_2258 (and ?v_1301 true)) (?v_2260 (and x104 true)) (?v_2259 (= tmp55 6)) (?v_2261 (and ?v_181 true)) (?v_2262 (and x138 true)) (?v_2263 (and ?v_1365 true)) (?v_2265 (and x102 true)) (?v_2264 (= tmp53 6)) (?v_2266 (and ?v_117 true)) (?v_2267 (and x140 true)) (?v_2268 (and ?v_1429 true)) (?v_2270 (and x100 true)) (?v_2269 (= tmp51 4)) (?v_2271 (and ?v_53 true)) (?v_2273 (and x142 true)) (?v_2272 (= tmp50 6)) (?v_2274 (and ?v_1493 true)) (?v_2275 (and x98 true)) (?v_2279 (= tmp46 2)) (?v_2281 (= tmp45 4)) (?v_2283 (= tmp44 4)) (?v_2285 (= tmp43 4)) (?v_2290 (= tmp38 4)) (?v_2292 (= tmp37 2)) (?v_2294 (= tmp36 4)) (?v_2296 (= tmp35 4)) (?v_2298 (= tmp34 4)) (?v_2301 (= tmp32 4)) (?v_2303 (= tmp31 4)) (?v_2306 (= tmp29 4)) (?v_2310 (= tmp26 4)) (?v_2312 (= tmp25 2)) (?v_2313 (and ?v_765 true)) (?v_2314 (and x25 true)) (?v_2315 (and ?v_701 true)) (?v_2317 (and x27 true)) (?v_2316 (= tmp22 4)) (?v_2318 (and ?v_829 true)) (?v_2320 (and x23 true)) (?v_2319 (= tmp21 2)) (?v_2321 (and ?v_637 true)) (?v_2322 (and x29 true)) (?v_2323 (and ?v_893 true)) (?v_2325 (and x21 true)) (?v_2324 (= tmp19 2)) (?v_2326 (and ?v_573 true)) (?v_2328 (and x31 true)) (?v_2327 (= tmp18 2)) (?v_2329 (and ?v_957 true)) (?v_2330 (and x19 true)) (?v_2331 (and ?v_509 true)) (?v_2333 (and x33 true)) (?v_2332 (= tmp16 4)) (?v_2334 (and ?v_1053 true)) (?v_2335 (and x17 true)) (?v_2336 (and ?v_445 true)) (?v_2338 (and x35 true)) (?v_2337 (= tmp14 6)) (?v_2339 (and ?v_1117 true)) (?v_2341 (and x15 true)) (?v_2340 (= tmp13 2)) (?v_2342 (and ?v_381 true)) (?v_2344 (and x37 true)) (?v_2343 (= tmp12 6)) (?v_2345 (and ?v_1181 true)) (?v_2347 (and x13 true)) (?v_2346 (= tmp11 2)) (?v_2348 (and ?v_317 true)) (?v_2349 (and x39 true)) (?v_2350 (and ?v_1245 true)) (?v_2352 (and x11 true)) (?v_2351 (= tmp9 2)) (?v_2353 (and ?v_253 true)) (?v_2355 (and x41 true)) (?v_2354 (= tmp8 6)) (?v_2356 (and ?v_1309 true)) (?v_2357 (and x9 true)) (?v_2358 (and ?v_189 true)) (?v_2359 (and x43 true)) (?v_2360 (and ?v_1373 true)) (?v_2362 (and x7 true)) (?v_2361 (= tmp5 4)) (?v_2363 (and ?v_125 true)) (?v_2365 (and x45 true)) (?v_2364 (= tmp4 4)) (?v_2366 (and ?v_1437 true)) (?v_2368 (and x5 true)) (?v_2367 (= tmp3 4)) (?v_2369 (and ?v_61 true)) (?v_2371 (and x47 true)) (?v_2370 (= tmp2 4)) (?v_2372 (and ?v_1501 true)) (?v_2374 (and x3 true)) (?v_2373 (= tmp1 4)) (?v_0 (* (- 1) x1))) (and (<= (+ 0 ?v_0) (- 27)) (= (+ (+ (* 1 tmp766) 0) (+ (* 1 tmp764) (+ (* 1 tmp762) (+ (* 1 tmp760) (+ (* 1 tmp759) (+ (* 1 tmp761) (+ (* 1 tmp763) (+ (* 1 tmp765) 0)))))))) 1) (= (+ (+ (* 1 tmp758) 0) (+ (* 1 tmp756) (+ (* 1 tmp754) (+ (* 1 tmp752) (+ (* 1 tmp751) (+ (* 1 tmp753) (+ (* 1 tmp755) (+ (* 1 tmp757) 0)))))))) 1) (= (+ (+ (* 1 tmp750) 0) (+ (* 1 tmp748) (+ (* 1 tmp746) (+ (* 1 tmp744) (+ (* 1 tmp743) (+ (* 1 tmp745) (+ (* 1 tmp747) (+ (* 1 tmp749) 0)))))))) 1) (= (+ (+ (* 1 tmp742) 0) (+ (* 1 tmp740) (+ (* 1 tmp738) (+ (* 1 tmp736) (+ (* 1 tmp735) (+ (* 1 tmp737) (+ (* 1 tmp739) (+ (* 1 tmp741) 0)))))))) 1) (= (+ (+ (* 1 tmp734) 0) (+ (* 1 tmp732) (+ (* 1 tmp730) (+ (* 1 tmp728) (+ (* 1 tmp727) (+ (* 1 tmp729) (+ (* 1 tmp731) (+ (* 1 tmp733) 0)))))))) 1) (= (+ (+ (* 1 tmp726) 0) (+ (* 1 tmp724) (+ (* 1 tmp722) (+ (* 1 tmp720) (+ (* 1 tmp719) (+ (* 1 tmp721) (+ (* 1 tmp723) (+ (* 1 tmp725) 0)))))))) 1) (= (+ (+ (* 1 tmp718) 0) (+ (* 1 tmp716) (+ (* 1 tmp714) (+ (* 1 tmp712) (+ (* 1 tmp711) (+ (* 1 tmp713) (+ (* 1 tmp715) (+ (* 1 tmp717) 0)))))))) 1) (= (+ (+ (* 1 tmp710) 0) (+ (* 1 tmp708) (+ (* 1 tmp706) (+ (* 1 tmp704) (+ (* 1 tmp703) (+ (* 1 tmp705) (+ (* 1 tmp707) (+ (* 1 tmp709) 0)))))))) 1) (= (+ (+ (* 1 tmp702) 0) (+ (* 1 tmp700) (+ (* 1 tmp698) (+ (* 1 tmp696) (+ (* 1 tmp695) (+ (* 1 tmp697) (+ (* 1 tmp699) (+ (* 1 tmp701) 0)))))))) 1) (= (+ (+ (* 1 tmp694) 0) (+ (* 1 tmp692) (+ (* 1 tmp690) (+ (* 1 tmp688) (+ (* 1 tmp687) (+ (* 1 tmp689) (+ (* 1 tmp691) (+ (* 1 tmp693) 0)))))))) 1) (= (+ (+ (* 1 tmp686) 0) (+ (* 1 tmp684) (+ (* 1 tmp682) (+ (* 1 tmp680) (+ (* 1 tmp679) (+ (* 1 tmp681) (+ (* 1 tmp683) (+ (* 1 tmp685) 0)))))))) 1) (= (+ (+ (* 1 tmp678) 0) (+ (* 1 tmp676) (+ (* 1 tmp674) (+ (* 1 tmp672) (+ (* 1 tmp671) (+ (* 1 tmp673) (+ (* 1 tmp675) (+ (* 1 tmp677) 0)))))))) 1) (= (+ (+ (* 1 tmp670) 0) (+ (* 1 tmp668) (+ (* 1 tmp666) (+ (* 1 tmp664) (+ (* 1 tmp663) (+ (* 1 tmp665) (+ (* 1 tmp667) (+ (* 1 tmp669) 0)))))))) 1) (= (+ (+ (* 1 tmp662) 0) (+ (* 1 tmp660) (+ (* 1 tmp658) (+ (* 1 tmp656) (+ (* 1 tmp655) (+ (* 1 tmp657) (+ (* 1 tmp659) (+ (* 1 tmp661) 0)))))))) 1) (= (+ (+ (* 1 tmp654) 0) (+ (* 1 tmp652) (+ (* 1 tmp650) (+ (* 1 tmp648) (+ (* 1 tmp647) (+ (* 1 tmp649) (+ (* 1 tmp651) (+ (* 1 tmp653) 0)))))))) 1) (= (+ (+ (* 1 tmp646) 0) (+ (* 1 tmp644) (+ (* 1 tmp642) (+ (* 1 tmp640) (+ (* 1 tmp639) (+ (* 1 tmp641) (+ (* 1 tmp643) (+ (* 1 tmp645) 0)))))))) 1) (= (+ (+ (* 1 tmp638) 0) (+ (* 1 tmp636) (+ (* 1 tmp634) (+ (* 1 tmp632) (+ (* 1 tmp631) (+ (* 1 tmp633) (+ (* 1 tmp635) (+ (* 1 tmp637) 0)))))))) 1) (= (+ (+ (* 1 tmp630) 0) (+ (* 1 tmp628) (+ (* 1 tmp626) (+ (* 1 tmp624) (+ (* 1 tmp623) (+ (* 1 tmp625) (+ (* 1 tmp627) (+ (* 1 tmp629) 0)))))))) 1) (= (+ (+ (* 1 tmp622) 0) (+ (* 1 tmp620) (+ (* 1 tmp618) (+ (* 1 tmp616) (+ (* 1 tmp615) (+ (* 1 tmp617) (+ (* 1 tmp619) (+ (* 1 tmp621) 0)))))))) 1) (= (+ (+ (* 1 tmp614) 0) (+ (* 1 tmp612) (+ (* 1 tmp610) (+ (* 1 tmp608) (+ (* 1 tmp607) (+ (* 1 tmp609) (+ (* 1 tmp611) (+ (* 1 tmp613) 0)))))))) 1) (= (+ (+ (* 1 tmp606) 0) (+ (* 1 tmp604) (+ (* 1 tmp602) (+ (* 1 tmp600) (+ (* 1 tmp599) (+ (* 1 tmp601) (+ (* 1 tmp603) (+ (* 1 tmp605) 0)))))))) 1) (= (+ (+ (* 1 tmp598) 0) (+ (* 1 tmp596) (+ (* 1 tmp594) (+ (* 1 tmp592) (+ (* 1 tmp591) (+ (* 1 tmp593) (+ (* 1 tmp595) (+ (* 1 tmp597) 0)))))))) 1) (= (+ (+ (* 1 tmp590) 0) (+ (* 1 tmp588) (+ (* 1 tmp586) (+ (* 1 tmp584) (+ (* 1 tmp583) (+ (* 1 tmp585) (+ (* 1 tmp587) (+ (* 1 tmp589) 0)))))))) 1) (= (+ (+ (* 1 tmp582) 0) (+ (* 1 tmp580) (+ (* 1 tmp578) (+ (* 1 tmp576) (+ (* 1 tmp575) (+ (* 1 tmp577) (+ (* 1 tmp579) (+ (* 1 tmp581) 0)))))))) 1) (= (+ (+ (* 1 tmp574) 0) (+ (* 1 tmp572) (+ (* 1 tmp570) (+ (* 1 tmp568) (+ (* 1 tmp567) (+ (* 1 tmp569) (+ (* 1 tmp571) (+ (* 1 tmp573) 0)))))))) 1) (= (+ (+ (* 1 tmp566) 0) (+ (* 1 tmp564) (+ (* 1 tmp562) (+ (* 1 tmp560) (+ (* 1 tmp559) (+ (* 1 tmp561) (+ (* 1 tmp563) (+ (* 1 tmp565) 0)))))))) 1) (= (+ (+ (* 1 tmp558) 0) (+ (* 1 tmp556) (+ (* 1 tmp554) (+ (* 1 tmp552) (+ (* 1 tmp551) (+ (* 1 tmp553) (+ (* 1 tmp555) (+ (* 1 tmp557) 0)))))))) 1) (= (+ (+ (* 1 tmp550) 0) (+ (* 1 tmp548) (+ (* 1 tmp546) (+ (* 1 tmp544) (+ (* 1 tmp543) (+ (* 1 tmp545) (+ (* 1 tmp547) (+ (* 1 tmp549) 0)))))))) 1) (= (+ (+ (* 1 tmp542) 0) (+ (* 1 tmp540) (+ (* 1 tmp538) (+ (* 1 tmp536) (+ (* 1 tmp535) (+ (* 1 tmp537) (+ (* 1 tmp539) (+ (* 1 tmp541) 0)))))))) 1) (= (+ (+ (* 1 tmp534) 0) (+ (* 1 tmp532) (+ (* 1 tmp530) (+ (* 1 tmp528) (+ (* 1 tmp527) (+ (* 1 tmp529) (+ (* 1 tmp531) (+ (* 1 tmp533) 0)))))))) 1) (= (+ (+ (* 1 tmp526) 0) (+ (* 1 tmp524) (+ (* 1 tmp522) (+ (* 1 tmp520) (+ (* 1 tmp519) (+ (* 1 tmp521) (+ (* 1 tmp523) (+ (* 1 tmp525) 0)))))))) 1) (= (+ (+ (* 1 tmp518) 0) (+ (* 1 tmp516) (+ (* 1 tmp514) (+ (* 1 tmp512) (+ (* 1 tmp511) (+ (* 1 tmp513) (+ (* 1 tmp515) (+ (* 1 tmp517) 0)))))))) 1) (= (+ (+ (* 1 tmp510) 0) (+ (* 1 tmp508) (+ (* 1 tmp506) (+ (* 1 tmp504) (+ (* 1 tmp503) (+ (* 1 tmp505) (+ (* 1 tmp507) (+ (* 1 tmp509) 0)))))))) 1) (= (+ (+ (* 1 tmp502) 0) (+ (* 1 tmp500) (+ (* 1 tmp498) (+ (* 1 tmp496) (+ (* 1 tmp495) (+ (* 1 tmp497) (+ (* 1 tmp499) (+ (* 1 tmp501) 0)))))))) 1) (= (+ (+ (* 1 tmp494) 0) (+ (* 1 tmp492) (+ (* 1 tmp490) (+ (* 1 tmp488) (+ (* 1 tmp487) (+ (* 1 tmp489) (+ (* 1 tmp491) (+ (* 1 tmp493) 0)))))))) 1) (= (+ (+ (* 1 tmp486) 0) (+ (* 1 tmp484) (+ (* 1 tmp482) (+ (* 1 tmp480) (+ (* 1 tmp479) (+ (* 1 tmp481) (+ (* 1 tmp483) (+ (* 1 tmp485) 0)))))))) 1) (= (+ (+ (* 1 tmp478) 0) (+ (* 1 tmp476) (+ (* 1 tmp474) (+ (* 1 tmp472) (+ (* 1 tmp471) (+ (* 1 tmp473) (+ (* 1 tmp475) (+ (* 1 tmp477) 0)))))))) 1) (= (+ (+ (* 1 tmp470) 0) (+ (* 1 tmp468) (+ (* 1 tmp466) (+ (* 1 tmp464) (+ (* 1 tmp463) (+ (* 1 tmp465) (+ (* 1 tmp467) (+ (* 1 tmp469) 0)))))))) 1) (= (+ (+ (* 1 tmp462) 0) (+ (* 1 tmp460) (+ (* 1 tmp458) (+ (* 1 tmp456) (+ (* 1 tmp455) (+ (* 1 tmp457) (+ (* 1 tmp459) (+ (* 1 tmp461) 0)))))))) 1) (= (+ (+ (* 1 tmp454) 0) (+ (* 1 tmp452) (+ (* 1 tmp450) (+ (* 1 tmp448) (+ (* 1 tmp447) (+ (* 1 tmp449) (+ (* 1 tmp451) (+ (* 1 tmp453) 0)))))))) 1) (= (+ (+ (* 1 tmp446) 0) (+ (* 1 tmp444) (+ (* 1 tmp442) (+ (* 1 tmp440) (+ (* 1 tmp439) (+ (* 1 tmp441) (+ (* 1 tmp443) (+ (* 1 tmp445) 0)))))))) 1) (= (+ (+ (* 1 tmp438) 0) (+ (* 1 tmp436) (+ (* 1 tmp434) (+ (* 1 tmp432) (+ (* 1 tmp431) (+ (* 1 tmp433) (+ (* 1 tmp435) (+ (* 1 tmp437) 0)))))))) 1) (= (+ (+ (* 1 tmp430) 0) (+ (* 1 tmp428) (+ (* 1 tmp426) (+ (* 1 tmp424) (+ (* 1 tmp423) (+ (* 1 tmp425) (+ (* 1 tmp427) (+ (* 1 tmp429) 0)))))))) 1) (= (+ (+ (* 1 tmp422) 0) (+ (* 1 tmp420) (+ (* 1 tmp418) (+ (* 1 tmp416) (+ (* 1 tmp415) (+ (* 1 tmp417) (+ (* 1 tmp419) (+ (* 1 tmp421) 0)))))))) 1) (= (+ (+ (* 1 tmp414) 0) (+ (* 1 tmp412) (+ (* 1 tmp410) (+ (* 1 tmp408) (+ (* 1 tmp407) (+ (* 1 tmp409) (+ (* 1 tmp411) (+ (* 1 tmp413) 0)))))))) 1) (= (+ (+ (* 1 tmp406) 0) (+ (* 1 tmp404) (+ (* 1 tmp402) (+ (* 1 tmp400) (+ (* 1 tmp399) (+ (* 1 tmp401) (+ (* 1 tmp403) (+ (* 1 tmp405) 0)))))))) 1) (= (+ (+ (* 1 tmp398) 0) (+ (* 1 tmp396) (+ (* 1 tmp394) (+ (* 1 tmp392) (+ (* 1 tmp391) (+ (* 1 tmp393) (+ (* 1 tmp395) (+ (* 1 tmp397) 0)))))))) 1) (= (+ (+ (* 1 tmp390) 0) (+ (* 1 tmp388) (+ (* 1 tmp386) (+ (* 1 tmp384) (+ (* 1 tmp383) (+ (* 1 tmp385) (+ (* 1 tmp387) (+ (* 1 tmp389) 0)))))))) 1) (>= (+ (+ (* 1 tmp382) 0) (+ (* 1 tmp380) (+ (* 1 tmp378) (+ (* 1 tmp376) (+ (* 1 tmp374) (+ (* 1 tmp372) (+ (* 1 tmp370) (+ (* 1 tmp368) (+ (* 1 tmp366) (+ (* 1 tmp364) (+ (* 1 tmp362) (+ (* 1 tmp360) (+ ?v_0 (+ (* 1 tmp359) (+ (* 1 tmp361) (+ (* 1 tmp363) (+ (* 1 tmp365) (+ (* 1 tmp367) (+ (* 1 tmp369) (+ (* 1 tmp371) (+ (* 1 tmp373) (+ (* 1 tmp375) (+ (* 1 tmp377) (+ (* 1 tmp379) (+ (* 1 tmp381) 0))))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp358) 0) (+ (* 1 tmp356) (+ (* 1 tmp354) (+ (* 1 tmp352) (+ (* 1 tmp350) (+ (* 1 tmp348) (+ (* 1 tmp346) (+ (* 1 tmp344) (+ (* 1 tmp342) (+ (* 1 tmp340) (+ (* 1 tmp338) (+ (* 1 tmp336) (+ ?v_0 (+ (* 1 tmp335) (+ (* 1 tmp337) (+ (* 1 tmp339) (+ (* 1 tmp341) (+ (* 1 tmp343) (+ (* 1 tmp345) (+ (* 1 tmp347) (+ (* 1 tmp349) (+ (* 1 tmp351) (+ (* 1 tmp353) (+ (* 1 tmp355) (+ (* 1 tmp357) 0))))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp334) 0) (+ (* 1 tmp332) (+ (* 1 tmp330) (+ (* 1 tmp328) (+ (* 1 tmp326) (+ (* 1 tmp324) (+ (* 1 tmp322) (+ (* 1 tmp320) (+ (* 1 tmp318) (+ (* 1 tmp316) (+ (* 1 tmp314) (+ (* 1 tmp312) (+ ?v_0 (+ (* 1 tmp311) (+ (* 1 tmp313) (+ (* 1 tmp315) (+ (* 1 tmp317) (+ (* 1 tmp319) (+ (* 1 tmp321) (+ (* 1 tmp323) (+ (* 1 tmp325) (+ (* 1 tmp327) (+ (* 1 tmp329) (+ (* 1 tmp331) (+ (* 1 tmp333) 0))))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp310) 0) (+ (* 1 tmp308) (+ (* 1 tmp306) (+ (* 1 tmp304) (+ (* 1 tmp302) (+ (* 1 tmp300) (+ (* 1 tmp298) (+ (* 1 tmp296) (+ (* 1 tmp294) (+ (* 1 tmp292) (+ (* 1 tmp290) (+ (* 1 tmp288) (+ ?v_0 (+ (* 1 tmp287) (+ (* 1 tmp289) (+ (* 1 tmp291) (+ (* 1 tmp293) (+ (* 1 tmp295) (+ (* 1 tmp297) (+ (* 1 tmp299) (+ (* 1 tmp301) (+ (* 1 tmp303) (+ (* 1 tmp305) (+ (* 1 tmp307) (+ (* 1 tmp309) 0))))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp286) 0) (+ (* 1 tmp284) (+ (* 1 tmp282) (+ (* 1 tmp280) (+ (* 1 tmp278) (+ (* 1 tmp276) (+ (* 1 tmp274) (+ (* 1 tmp272) (+ (* 1 tmp270) (+ (* 1 tmp268) (+ (* 1 tmp266) (+ (* 1 tmp264) (+ ?v_0 (+ (* 1 tmp263) (+ (* 1 tmp265) (+ (* 1 tmp267) (+ (* 1 tmp269) (+ (* 1 tmp271) (+ (* 1 tmp273) (+ (* 1 tmp275) (+ (* 1 tmp277) (+ (* 1 tmp279) (+ (* 1 tmp281) (+ (* 1 tmp283) (+ (* 1 tmp285) 0))))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp262) 0) (+ (* 1 tmp260) (+ (* 1 tmp258) (+ (* 1 tmp256) (+ (* 1 tmp254) (+ (* 1 tmp252) (+ (* 1 tmp250) (+ (* 1 tmp248) (+ (* 1 tmp246) (+ (* 1 tmp244) (+ (* 1 tmp242) (+ (* 1 tmp240) (+ ?v_0 (+ (* 1 tmp239) (+ (* 1 tmp241) (+ (* 1 tmp243) (+ (* 1 tmp245) (+ (* 1 tmp247) (+ (* 1 tmp249) (+ (* 1 tmp251) (+ (* 1 tmp253) (+ (* 1 tmp255) (+ (* 1 tmp257) (+ (* 1 tmp259) (+ (* 1 tmp261) 0))))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp238) 0) (+ (* 1 tmp236) (+ (* 1 tmp234) (+ (* 1 tmp232) (+ (* 1 tmp230) (+ (* 1 tmp228) (+ (* 1 tmp226) (+ (* 1 tmp224) (+ (* 1 tmp222) (+ (* 1 tmp220) (+ (* 1 tmp218) (+ (* 1 tmp216) (+ ?v_0 (+ (* 1 tmp215) (+ (* 1 tmp217) (+ (* 1 tmp219) (+ (* 1 tmp221) (+ (* 1 tmp223) (+ (* 1 tmp225) (+ (* 1 tmp227) (+ (* 1 tmp229) (+ (* 1 tmp231) (+ (* 1 tmp233) (+ (* 1 tmp235) (+ (* 1 tmp237) 0))))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp214) 0) (+ (* 1 tmp212) (+ (* 1 tmp210) (+ (* 1 tmp208) (+ (* 1 tmp206) (+ (* 1 tmp204) (+ (* 1 tmp202) (+ (* 1 tmp200) (+ (* 1 tmp198) (+ (* 1 tmp196) (+ (* 1 tmp194) (+ (* 1 tmp192) (+ ?v_0 (+ (* 1 tmp191) (+ (* 1 tmp193) (+ (* 1 tmp195) (+ (* 1 tmp197) (+ (* 1 tmp199) (+ (* 1 tmp201) (+ (* 1 tmp203) (+ (* 1 tmp205) (+ (* 1 tmp207) (+ (* 1 tmp209) (+ (* 1 tmp211) (+ (* 1 tmp213) 0))))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp190) 0) (+ (* 1 tmp188) (+ (* 1 tmp186) (+ (* 1 tmp184) (+ (* 1 tmp182) (+ (* 1 tmp180) (+ (* 1 tmp178) (+ (* 1 tmp176) (+ (* 1 tmp174) (+ (* 1 tmp172) (+ (* 1 tmp170) (+ (* 1 tmp168) (+ ?v_0 (+ (* 1 tmp167) (+ (* 1 tmp169) (+ (* 1 tmp171) (+ (* 1 tmp173) (+ (* 1 tmp175) (+ (* 1 tmp177) (+ (* 1 tmp179) (+ (* 1 tmp181) (+ (* 1 tmp183) (+ (* 1 tmp185) (+ (* 1 tmp187) (+ (* 1 tmp189) 0))))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp166) 0) (+ (* 1 tmp164) (+ (* 1 tmp162) (+ (* 1 tmp160) (+ (* 1 tmp158) (+ (* 1 tmp156) (+ (* 1 tmp154) (+ (* 1 tmp152) (+ (* 1 tmp150) (+ (* 1 tmp148) (+ (* 1 tmp146) (+ (* 1 tmp144) (+ ?v_0 (+ (* 1 tmp143) (+ (* 1 tmp145) (+ (* 1 tmp147) (+ (* 1 tmp149) (+ (* 1 tmp151) (+ (* 1 tmp153) (+ (* 1 tmp155) (+ (* 1 tmp157) (+ (* 1 tmp159) (+ (* 1 tmp161) (+ (* 1 tmp163) (+ (* 1 tmp165) 0))))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp142) 0) (+ (* 1 tmp140) (+ (* 1 tmp138) (+ (* 1 tmp136) (+ (* 1 tmp134) (+ (* 1 tmp132) (+ (* 1 tmp130) (+ (* 1 tmp128) (+ (* 1 tmp126) (+ (* 1 tmp124) (+ (* 1 tmp122) (+ ?v_0 (+ (* 1 tmp121) (+ (* 1 tmp123) (+ (* 1 tmp125) (+ (* 1 tmp127) (+ (* 1 tmp129) (+ (* 1 tmp131) (+ (* 1 tmp133) (+ (* 1 tmp135) (+ (* 1 tmp137) (+ (* 1 tmp139) (+ (* 1 tmp141) 0))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp120) 0) (+ (* 1 tmp118) (+ (* 1 tmp116) (+ (* 1 tmp114) (+ (* 1 tmp112) (+ (* 1 tmp110) (+ (* 1 tmp108) (+ (* 1 tmp106) (+ (* 1 tmp104) (+ (* 1 tmp102) (+ (* 1 tmp100) (+ (* 1 tmp98) (+ ?v_0 (+ (* 1 tmp97) (+ (* 1 tmp99) (+ (* 1 tmp101) (+ (* 1 tmp103) (+ (* 1 tmp105) (+ (* 1 tmp107) (+ (* 1 tmp109) (+ (* 1 tmp111) (+ (* 1 tmp113) (+ (* 1 tmp115) (+ (* 1 tmp117) (+ (* 1 tmp119) 0))))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp96) 0) (+ (* 1 tmp94) (+ (* 1 tmp92) (+ (* 1 tmp90) (+ (* 1 tmp88) (+ (* 1 tmp86) (+ (* 1 tmp84) (+ (* 1 tmp82) (+ (* 1 tmp80) (+ (* 1 tmp78) (+ (* 1 tmp76) (+ (* 1 tmp74) (+ ?v_0 (+ (* 1 tmp73) (+ (* 1 tmp75) (+ (* 1 tmp77) (+ (* 1 tmp79) (+ (* 1 tmp81) (+ (* 1 tmp83) (+ (* 1 tmp85) (+ (* 1 tmp87) (+ (* 1 tmp89) (+ (* 1 tmp91) (+ (* 1 tmp93) (+ (* 1 tmp95) 0))))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp72) 0) (+ (* 1 tmp70) (+ (* 1 tmp68) (+ (* 1 tmp66) (+ (* 1 tmp64) (+ (* 1 tmp62) (+ (* 1 tmp60) (+ (* 1 tmp58) (+ (* 1 tmp56) (+ (* 1 tmp54) (+ (* 1 tmp52) (+ (* 1 tmp50) (+ ?v_0 (+ (* 1 tmp49) (+ (* 1 tmp51) (+ (* 1 tmp53) (+ (* 1 tmp55) (+ (* 1 tmp57) (+ (* 1 tmp59) (+ (* 1 tmp61) (+ (* 1 tmp63) (+ (* 1 tmp65) (+ (* 1 tmp67) (+ (* 1 tmp69) (+ (* 1 tmp71) 0))))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp48) 0) (+ (* 1 tmp46) (+ (* 1 tmp44) (+ (* 1 tmp42) (+ (* 1 tmp40) (+ (* 1 tmp38) (+ (* 1 tmp36) (+ (* 1 tmp34) (+ (* 1 tmp32) (+ (* 1 tmp30) (+ (* 1 tmp28) (+ (* 1 tmp26) (+ ?v_0 (+ (* 1 tmp25) (+ (* 1 tmp27) (+ (* 1 tmp29) (+ (* 1 tmp31) (+ (* 1 tmp33) (+ (* 1 tmp35) (+ (* 1 tmp37) (+ (* 1 tmp39) (+ (* 1 tmp41) (+ (* 1 tmp43) (+ (* 1 tmp45) (+ (* 1 tmp47) 0))))))))))))))))))))))))) 0) (>= (+ (+ (* 1 tmp24) 0) (+ (* 1 tmp22) (+ (* 1 tmp20) (+ (* 1 tmp18) (+ (* 1 tmp16) (+ (* 1 tmp14) (+ (* 1 tmp12) (+ (* 1 tmp10) (+ (* 1 tmp8) (+ (* 1 tmp6) (+ (* 1 tmp4) (+ (* 1 tmp2) (+ ?v_0 (+ (* 1 tmp1) (+ (* 1 tmp3) (+ (* 1 tmp5) (+ (* 1 tmp7) (+ (* 1 tmp9) (+ (* 1 tmp11) (+ (* 1 tmp13) (+ (* 1 tmp15) (+ (* 1 tmp17) (+ (* 1 tmp19) (+ (* 1 tmp21) (+ (* 1 tmp23) 0))))))))))))))))))))))))) 0) (<= x1 384) (>= x1 0) (=> (and ?v_1 ?v_2) (= tmp766 0)) (=> (and ?v_1 ?v_4) ?v_3) (=> (and x474 ?v_2) ?v_3) (=> (and x474 ?v_4) (= tmp766 2)) (=> (and ?v_5 ?v_6) (= tmp765 0)) (=> (and ?v_5 ?v_8) ?v_7) (=> (and x331 ?v_6) ?v_7) (=> (and x331 ?v_8) (= tmp765 2)) (=> (and ?v_9 ?v_10) (= tmp764 0)) (=> (and ?v_9 ?v_12) ?v_11) (=> (and x569 ?v_10) ?v_11) (=> (and x569 ?v_12) (= tmp764 2)) (=> (and ?v_13 ?v_14) (= tmp763 0)) (=> (and ?v_13 ?v_16) ?v_15) (=> (and x239 ?v_14) ?v_15) (=> (and x239 ?v_16) (= tmp763 2)) (=> (and ?v_17 ?v_18) (= tmp762 0)) (=> (and ?v_17 ?v_20) ?v_19) (=> (and x664 ?v_18) ?v_19) (=> (and x664 ?v_20) (= tmp762 2)) (=> (and ?v_21 ?v_22) (= tmp761 0)) (=> (and ?v_21 ?v_24) ?v_23) (=> (and x143 ?v_22) ?v_23) (=> (and x143 ?v_24) (= tmp761 2)) (=> (and ?v_25 ?v_26) (= tmp760 0)) (=> (and ?v_25 ?v_28) ?v_27) (=> (and x759 ?v_26) ?v_27) (=> (and x759 ?v_28) (= tmp760 2)) (=> (and ?v_29 ?v_30) (= tmp759 0)) (=> (and ?v_29 ?v_32) ?v_31) (=> (and x48 ?v_30) ?v_31) (=> (and x48 ?v_32) (= tmp759 2)) (=> (and ?v_33 ?v_34) (= tmp758 0)) (=> (and ?v_33 ?v_36) ?v_35) (=> (and x473 ?v_34) ?v_35) (=> (and x473 ?v_36) (= tmp758 2)) (=> (and ?v_37 ?v_38) (= tmp757 0)) (=> (and ?v_37 ?v_40) ?v_39) (=> (and x330 ?v_38) ?v_39) (=> (and x330 ?v_40) (= tmp757 2)) (=> (and ?v_41 ?v_42) (= tmp756 0)) (=> (and ?v_41 ?v_44) ?v_43) (=> (and x568 ?v_42) ?v_43) (=> (and x568 ?v_44) (= tmp756 2)) (=> (and ?v_45 ?v_46) (= tmp755 0)) (=> (and ?v_45 ?v_48) ?v_47) (=> (and x238 ?v_46) ?v_47) (=> (and x238 ?v_48) (= tmp755 2)) (=> (and ?v_49 ?v_50) (= tmp754 0)) (=> (and ?v_49 ?v_52) ?v_51) (=> (and x663 ?v_50) ?v_51) (=> (and x663 ?v_52) (= tmp754 2)) (=> (and ?v_53 ?v_54) (= tmp753 0)) (=> (and ?v_53 ?v_56) ?v_55) (=> (and x142 ?v_54) ?v_55) (=> (and x142 ?v_56) (= tmp753 2)) (=> (and ?v_57 ?v_58) (= tmp752 0)) (=> (and ?v_57 ?v_60) ?v_59) (=> (and x758 ?v_58) ?v_59) (=> (and x758 ?v_60) (= tmp752 2)) (=> (and ?v_61 ?v_62) (= tmp751 0)) (=> (and ?v_61 ?v_64) ?v_63) (=> (and x47 ?v_62) ?v_63) (=> (and x47 ?v_64) (= tmp751 2)) (=> (and ?v_65 ?v_66) (= tmp750 0)) (=> (and ?v_65 ?v_68) ?v_67) (=> (and x472 ?v_66) ?v_67) (=> (and x472 ?v_68) (= tmp750 2)) (=> (and ?v_69 ?v_70) (= tmp749 0)) (=> (and ?v_69 ?v_72) ?v_71) (=> (and x329 ?v_70) ?v_71) (=> (and x329 ?v_72) (= tmp749 2)) (=> (and ?v_73 ?v_74) (= tmp748 0)) (=> (and ?v_73 ?v_76) ?v_75) (=> (and x567 ?v_74) ?v_75) (=> (and x567 ?v_76) (= tmp748 2)) (=> (and ?v_77 ?v_78) (= tmp747 0)) (=> (and ?v_77 ?v_80) ?v_79) (=> (and x237 ?v_78) ?v_79) (=> (and x237 ?v_80) (= tmp747 2)) (=> (and ?v_81 ?v_82) (= tmp746 0)) (=> (and ?v_81 ?v_84) ?v_83) (=> (and x662 ?v_82) ?v_83) (=> (and x662 ?v_84) (= tmp746 2)) (=> (and ?v_85 ?v_86) (= tmp745 0)) (=> (and ?v_85 ?v_88) ?v_87) (=> (and x141 ?v_86) ?v_87) (=> (and x141 ?v_88) (= tmp745 2)) (=> (and ?v_89 ?v_90) (= tmp744 0)) (=> (and ?v_89 ?v_92) ?v_91) (=> (and x757 ?v_90) ?v_91) (=> (and x757 ?v_92) (= tmp744 2)) (=> (and ?v_93 ?v_94) (= tmp743 0)) (=> (and ?v_93 ?v_96) ?v_95) (=> (and x46 ?v_94) ?v_95) (=> (and x46 ?v_96) (= tmp743 2)) (=> (and ?v_97 ?v_98) (= tmp742 0)) (=> (and ?v_97 ?v_100) ?v_99) (=> (and x471 ?v_98) ?v_99) (=> (and x471 ?v_100) (= tmp742 2)) (=> (and ?v_101 ?v_102) (= tmp741 0)) (=> (and ?v_101 ?v_104) ?v_103) (=> (and x328 ?v_102) ?v_103) (=> (and x328 ?v_104) (= tmp741 2)) (=> (and ?v_105 ?v_106) (= tmp740 0)) (=> (and ?v_105 ?v_108) ?v_107) (=> (and x566 ?v_106) ?v_107) (=> (and x566 ?v_108) (= tmp740 2)) (=> (and ?v_109 ?v_110) (= tmp739 0)) (=> (and ?v_109 ?v_112) ?v_111) (=> (and x236 ?v_110) ?v_111) (=> (and x236 ?v_112) (= tmp739 2)) (=> (and ?v_113 ?v_114) (= tmp738 0)) (=> (and ?v_113 ?v_116) ?v_115) (=> (and x661 ?v_114) ?v_115) (=> (and x661 ?v_116) (= tmp738 2)) (=> (and ?v_117 ?v_118) (= tmp737 0)) (=> (and ?v_117 ?v_120) ?v_119) (=> (and x140 ?v_118) ?v_119) (=> (and x140 ?v_120) (= tmp737 2)) (=> (and ?v_121 ?v_122) (= tmp736 0)) (=> (and ?v_121 ?v_124) ?v_123) (=> (and x756 ?v_122) ?v_123) (=> (and x756 ?v_124) (= tmp736 2)) (=> (and ?v_125 ?v_126) (= tmp735 0)) (=> (and ?v_125 ?v_128) ?v_127) (=> (and x45 ?v_126) ?v_127) (=> (and x45 ?v_128) (= tmp735 2)) (=> (and ?v_129 ?v_130) (= tmp734 0)) (=> (and ?v_129 ?v_132) ?v_131) (=> (and x470 ?v_130) ?v_131) (=> (and x470 ?v_132) (= tmp734 2)) (=> (and ?v_133 ?v_134) (= tmp733 0)) (=> (and ?v_133 ?v_136) ?v_135) (=> (and x327 ?v_134) ?v_135) (=> (and x327 ?v_136) (= tmp733 2)) (=> (and ?v_137 ?v_138) (= tmp732 0)) (=> (and ?v_137 ?v_140) ?v_139) (=> (and x565 ?v_138) ?v_139) (=> (and x565 ?v_140) (= tmp732 2)) (=> (and ?v_141 ?v_142) (= tmp731 0)) (=> (and ?v_141 ?v_144) ?v_143) (=> (and x235 ?v_142) ?v_143) (=> (and x235 ?v_144) (= tmp731 2)) (=> (and ?v_145 ?v_146) (= tmp730 0)) (=> (and ?v_145 ?v_148) ?v_147) (=> (and x660 ?v_146) ?v_147) (=> (and x660 ?v_148) (= tmp730 2)) (=> (and ?v_149 ?v_150) (= tmp729 0)) (=> (and ?v_149 ?v_152) ?v_151) (=> (and x139 ?v_150) ?v_151) (=> (and x139 ?v_152) (= tmp729 2)) (=> (and ?v_153 ?v_154) (= tmp728 0)) (=> (and ?v_153 ?v_156) ?v_155) (=> (and x755 ?v_154) ?v_155) (=> (and x755 ?v_156) (= tmp728 2)) (=> (and ?v_157 ?v_158) (= tmp727 0)) (=> (and ?v_157 ?v_160) ?v_159) (=> (and x44 ?v_158) ?v_159) (=> (and x44 ?v_160) (= tmp727 2)) (=> (and ?v_161 ?v_162) (= tmp726 0)) (=> (and ?v_161 ?v_164) ?v_163) (=> (and x469 ?v_162) ?v_163) (=> (and x469 ?v_164) (= tmp726 2)) (=> (and ?v_165 ?v_166) (= tmp725 0)) (=> (and ?v_165 ?v_168) ?v_167) (=> (and x326 ?v_166) ?v_167) (=> (and x326 ?v_168) (= tmp725 2)) (=> (and ?v_169 ?v_170) (= tmp724 0)) (=> (and ?v_169 ?v_172) ?v_171) (=> (and x564 ?v_170) ?v_171) (=> (and x564 ?v_172) (= tmp724 2)) (=> (and ?v_173 ?v_174) (= tmp723 0)) (=> (and ?v_173 ?v_176) ?v_175) (=> (and x234 ?v_174) ?v_175) (=> (and x234 ?v_176) (= tmp723 2)) (=> (and ?v_177 ?v_178) (= tmp722 0)) (=> (and ?v_177 ?v_180) ?v_179) (=> (and x659 ?v_178) ?v_179) (=> (and x659 ?v_180) (= tmp722 2)) (=> (and ?v_181 ?v_182) (= tmp721 0)) (=> (and ?v_181 ?v_184) ?v_183) (=> (and x138 ?v_182) ?v_183) (=> (and x138 ?v_184) (= tmp721 2)) (=> (and ?v_185 ?v_186) (= tmp720 0)) (=> (and ?v_185 ?v_188) ?v_187) (=> (and x754 ?v_186) ?v_187) (=> (and x754 ?v_188) (= tmp720 2)) (=> (and ?v_189 ?v_190) (= tmp719 0)) (=> (and ?v_189 ?v_192) ?v_191) (=> (and x43 ?v_190) ?v_191) (=> (and x43 ?v_192) (= tmp719 2)) (=> (and ?v_193 ?v_194) (= tmp718 0)) (=> (and ?v_193 ?v_196) ?v_195) (=> (and x468 ?v_194) ?v_195) (=> (and x468 ?v_196) (= tmp718 2)) (=> (and ?v_197 ?v_198) (= tmp717 0)) (=> (and ?v_197 ?v_200) ?v_199) (=> (and x325 ?v_198) ?v_199) (=> (and x325 ?v_200) (= tmp717 2)) (=> (and ?v_201 ?v_202) (= tmp716 0)) (=> (and ?v_201 ?v_204) ?v_203) (=> (and x563 ?v_202) ?v_203) (=> (and x563 ?v_204) (= tmp716 2)) (=> (and ?v_205 ?v_206) (= tmp715 0)) (=> (and ?v_205 ?v_208) ?v_207) (=> (and x233 ?v_206) ?v_207) (=> (and x233 ?v_208) (= tmp715 2)) (=> (and ?v_209 ?v_210) (= tmp714 0)) (=> (and ?v_209 ?v_212) ?v_211) (=> (and x658 ?v_210) ?v_211) (=> (and x658 ?v_212) (= tmp714 2)) (=> (and ?v_213 ?v_214) (= tmp713 0)) (=> (and ?v_213 ?v_216) ?v_215) (=> (and x137 ?v_214) ?v_215) (=> (and x137 ?v_216) (= tmp713 2)) (=> (and ?v_217 ?v_218) (= tmp712 0)) (=> (and ?v_217 ?v_220) ?v_219) (=> (and x753 ?v_218) ?v_219) (=> (and x753 ?v_220) (= tmp712 2)) (=> (and ?v_221 ?v_222) (= tmp711 0)) (=> (and ?v_221 ?v_224) ?v_223) (=> (and x42 ?v_222) ?v_223) (=> (and x42 ?v_224) (= tmp711 2)) (=> (and ?v_225 ?v_226) (= tmp710 0)) (=> (and ?v_225 ?v_228) ?v_227) (=> (and x467 ?v_226) ?v_227) (=> (and x467 ?v_228) (= tmp710 2)) (=> (and ?v_229 ?v_230) (= tmp709 0)) (=> (and ?v_229 ?v_232) ?v_231) (=> (and x324 ?v_230) ?v_231) (=> (and x324 ?v_232) (= tmp709 2)) (=> (and ?v_233 ?v_234) (= tmp708 0)) (=> (and ?v_233 ?v_236) ?v_235) (=> (and x562 ?v_234) ?v_235) (=> (and x562 ?v_236) (= tmp708 2)) (=> (and ?v_237 ?v_238) (= tmp707 0)) (=> (and ?v_237 ?v_240) ?v_239) (=> (and x232 ?v_238) ?v_239) (=> (and x232 ?v_240) (= tmp707 2)) (=> (and ?v_241 ?v_242) (= tmp706 0)) (=> (and ?v_241 ?v_244) ?v_243) (=> (and x704 ?v_242) ?v_243) (=> (and x704 ?v_244) (= tmp706 2)) (=> (and ?v_245 ?v_246) (= tmp705 0)) (=> (and ?v_245 ?v_248) ?v_247) (=> (and x136 ?v_246) ?v_247) (=> (and x136 ?v_248) (= tmp705 2)) (=> (and ?v_249 ?v_250) (= tmp704 0)) (=> (and ?v_249 ?v_252) ?v_251) (=> (and x769 ?v_250) ?v_251) (=> (and x769 ?v_252) (= tmp704 2)) (=> (and ?v_253 ?v_254) (= tmp703 0)) (=> (and ?v_253 ?v_256) ?v_255) (=> (and x41 ?v_254) ?v_255) (=> (and x41 ?v_256) (= tmp703 2)) (=> (and ?v_257 ?v_258) (= tmp702 0)) (=> (and ?v_257 ?v_260) ?v_259) (=> (and x466 ?v_258) ?v_259) (=> (and x466 ?v_260) (= tmp702 2)) (=> (and ?v_261 ?v_262) (= tmp701 0)) (=> (and ?v_261 ?v_264) ?v_263) (=> (and x323 ?v_262) ?v_263) (=> (and x323 ?v_264) (= tmp701 2)) (=> (and ?v_265 ?v_266) (= tmp700 0)) (=> (and ?v_265 ?v_268) ?v_267) (=> (and x561 ?v_266) ?v_267) (=> (and x561 ?v_268) (= tmp700 2)) (=> (and ?v_269 ?v_270) (= tmp699 0)) (=> (and ?v_269 ?v_272) ?v_271) (=> (and x231 ?v_270) ?v_271) (=> (and x231 ?v_272) (= tmp699 2)) (=> (and ?v_273 ?v_274) (= tmp698 0)) (=> (and ?v_273 ?v_276) ?v_275) (=> (and x656 ?v_274) ?v_275) (=> (and x656 ?v_276) (= tmp698 2)) (=> (and ?v_277 ?v_278) (= tmp697 0)) (=> (and ?v_277 ?v_280) ?v_279) (=> (and x135 ?v_278) ?v_279) (=> (and x135 ?v_280) (= tmp697 2)) (=> (and ?v_281 ?v_282) (= tmp696 0)) (=> (and ?v_281 ?v_284) ?v_283) (=> (and x751 ?v_282) ?v_283) (=> (and x751 ?v_284) (= tmp696 2)) (=> (and ?v_285 ?v_286) (= tmp695 0)) (=> (and ?v_285 ?v_288) ?v_287) (=> (and x40 ?v_286) ?v_287) (=> (and x40 ?v_288) (= tmp695 2)) (=> (and ?v_289 ?v_290) (= tmp694 0)) (=> (and ?v_289 ?v_292) ?v_291) (=> (and x465 ?v_290) ?v_291) (=> (and x465 ?v_292) (= tmp694 2)) (=> (and ?v_293 ?v_294) (= tmp693 0)) (=> (and ?v_293 ?v_296) ?v_295) (=> (and x322 ?v_294) ?v_295) (=> (and x322 ?v_296) (= tmp693 2)) (=> (and ?v_297 ?v_298) (= tmp692 0)) (=> (and ?v_297 ?v_300) ?v_299) (=> (and x560 ?v_298) ?v_299) (=> (and x560 ?v_300) (= tmp692 2)) (=> (and ?v_301 ?v_302) (= tmp691 0)) (=> (and ?v_301 ?v_304) ?v_303) (=> (and x230 ?v_302) ?v_303) (=> (and x230 ?v_304) (= tmp691 2)) (=> (and ?v_305 ?v_306) (= tmp690 0)) (=> (and ?v_305 ?v_308) ?v_307) (=> (and x655 ?v_306) ?v_307) (=> (and x655 ?v_308) (= tmp690 2)) (=> (and ?v_309 ?v_310) (= tmp689 0)) (=> (and ?v_309 ?v_312) ?v_311) (=> (and x134 ?v_310) ?v_311) (=> (and x134 ?v_312) (= tmp689 2)) (=> (and ?v_313 ?v_314) (= tmp688 0)) (=> (and ?v_313 ?v_316) ?v_315) (=> (and x750 ?v_314) ?v_315) (=> (and x750 ?v_316) (= tmp688 2)) (=> (and ?v_317 ?v_318) (= tmp687 0)) (=> (and ?v_317 ?v_320) ?v_319) (=> (and x39 ?v_318) ?v_319) (=> (and x39 ?v_320) (= tmp687 2)) (=> (and ?v_321 ?v_322) (= tmp686 0)) (=> (and ?v_321 ?v_324) ?v_323) (=> (and x464 ?v_322) ?v_323) (=> (and x464 ?v_324) (= tmp686 2)) (=> (and ?v_325 ?v_326) (= tmp685 0)) (=> (and ?v_325 ?v_328) ?v_327) (=> (and x321 ?v_326) ?v_327) (=> (and x321 ?v_328) (= tmp685 2)) (=> (and ?v_329 ?v_330) (= tmp684 0)) (=> (and ?v_329 ?v_332) ?v_331) (=> (and x559 ?v_330) ?v_331) (=> (and x559 ?v_332) (= tmp684 2)) (=> (and ?v_333 ?v_334) (= tmp683 0)) (=> (and ?v_333 ?v_336) ?v_335) (=> (and x229 ?v_334) ?v_335) (=> (and x229 ?v_336) (= tmp683 2)) (=> (and ?v_337 ?v_338) (= tmp682 0)) (=> (and ?v_337 ?v_340) ?v_339) (=> (and x654 ?v_338) ?v_339) (=> (and x654 ?v_340) (= tmp682 2)) (=> (and ?v_341 ?v_342) (= tmp681 0)) (=> (and ?v_341 ?v_344) ?v_343) (=> (and x133 ?v_342) ?v_343) (=> (and x133 ?v_344) (= tmp681 2)) (=> (and ?v_345 ?v_346) (= tmp680 0)) (=> (and ?v_345 ?v_348) ?v_347) (=> (and x749 ?v_346) ?v_347) (=> (and x749 ?v_348) (= tmp680 2)) (=> (and ?v_349 ?v_350) (= tmp679 0)) (=> (and ?v_349 ?v_352) ?v_351) (=> (and x38 ?v_350) ?v_351) (=> (and x38 ?v_352) (= tmp679 2)) (=> (and ?v_353 ?v_354) (= tmp678 0)) (=> (and ?v_353 ?v_356) ?v_355) (=> (and x463 ?v_354) ?v_355) (=> (and x463 ?v_356) (= tmp678 2)) (=> (and ?v_357 ?v_358) (= tmp677 0)) (=> (and ?v_357 ?v_360) ?v_359) (=> (and x320 ?v_358) ?v_359) (=> (and x320 ?v_360) (= tmp677 2)) (=> (and ?v_361 ?v_362) (= tmp676 0)) (=> (and ?v_361 ?v_364) ?v_363) (=> (and x558 ?v_362) ?v_363) (=> (and x558 ?v_364) (= tmp676 2)) (=> (and ?v_365 ?v_366) (= tmp675 0)) (=> (and ?v_365 ?v_368) ?v_367) (=> (and x228 ?v_366) ?v_367) (=> (and x228 ?v_368) (= tmp675 2)) (=> (and ?v_369 ?v_370) (= tmp674 0)) (=> (and ?v_369 ?v_372) ?v_371) (=> (and x653 ?v_370) ?v_371) (=> (and x653 ?v_372) (= tmp674 2)) (=> (and ?v_373 ?v_374) (= tmp673 0)) (=> (and ?v_373 ?v_376) ?v_375) (=> (and x132 ?v_374) ?v_375) (=> (and x132 ?v_376) (= tmp673 2)) (=> (and ?v_377 ?v_378) (= tmp672 0)) (=> (and ?v_377 ?v_380) ?v_379) (=> (and x748 ?v_378) ?v_379) (=> (and x748 ?v_380) (= tmp672 2)) (=> (and ?v_381 ?v_382) (= tmp671 0)) (=> (and ?v_381 ?v_384) ?v_383) (=> (and x37 ?v_382) ?v_383) (=> (and x37 ?v_384) (= tmp671 2)) (=> (and ?v_385 ?v_386) (= tmp670 0)) (=> (and ?v_385 ?v_388) ?v_387) (=> (and x462 ?v_386) ?v_387) (=> (and x462 ?v_388) (= tmp670 2)) (=> (and ?v_389 ?v_390) (= tmp669 0)) (=> (and ?v_389 ?v_392) ?v_391) (=> (and x319 ?v_390) ?v_391) (=> (and x319 ?v_392) (= tmp669 2)) (=> (and ?v_393 ?v_394) (= tmp668 0)) (=> (and ?v_393 ?v_396) ?v_395) (=> (and x557 ?v_394) ?v_395) (=> (and x557 ?v_396) (= tmp668 2)) (=> (and ?v_397 ?v_398) (= tmp667 0)) (=> (and ?v_397 ?v_400) ?v_399) (=> (and x227 ?v_398) ?v_399) (=> (and x227 ?v_400) (= tmp667 2)) (=> (and ?v_401 ?v_402) (= tmp666 0)) (=> (and ?v_401 ?v_404) ?v_403) (=> (and x652 ?v_402) ?v_403) (=> (and x652 ?v_404) (= tmp666 2)) (=> (and ?v_405 ?v_406) (= tmp665 0)) (=> (and ?v_405 ?v_408) ?v_407) (=> (and x131 ?v_406) ?v_407) (=> (and x131 ?v_408) (= tmp665 2)) (=> (and ?v_409 ?v_410) (= tmp664 0)) (=> (and ?v_409 ?v_412) ?v_411) (=> (and x747 ?v_410) ?v_411) (=> (and x747 ?v_412) (= tmp664 2)) (=> (and ?v_413 ?v_414) (= tmp663 0)) (=> (and ?v_413 ?v_416) ?v_415) (=> (and x36 ?v_414) ?v_415) (=> (and x36 ?v_416) (= tmp663 2)) (=> (and ?v_417 ?v_418) (= tmp662 0)) (=> (and ?v_417 ?v_420) ?v_419) (=> (and x461 ?v_418) ?v_419) (=> (and x461 ?v_420) (= tmp662 2)) (=> (and ?v_421 ?v_422) (= tmp661 0)) (=> (and ?v_421 ?v_424) ?v_423) (=> (and x318 ?v_422) ?v_423) (=> (and x318 ?v_424) (= tmp661 2)) (=> (and ?v_425 ?v_426) (= tmp660 0)) (=> (and ?v_425 ?v_428) ?v_427) (=> (and x556 ?v_426) ?v_427) (=> (and x556 ?v_428) (= tmp660 2)) (=> (and ?v_429 ?v_430) (= tmp659 0)) (=> (and ?v_429 ?v_432) ?v_431) (=> (and x226 ?v_430) ?v_431) (=> (and x226 ?v_432) (= tmp659 2)) (=> (and ?v_433 ?v_434) (= tmp658 0)) (=> (and ?v_433 ?v_436) ?v_435) (=> (and x651 ?v_434) ?v_435) (=> (and x651 ?v_436) (= tmp658 2)) (=> (and ?v_437 ?v_438) (= tmp657 0)) (=> (and ?v_437 ?v_440) ?v_439) (=> (and x130 ?v_438) ?v_439) (=> (and x130 ?v_440) (= tmp657 2)) (=> (and ?v_441 ?v_442) (= tmp656 0)) (=> (and ?v_441 ?v_444) ?v_443) (=> (and x746 ?v_442) ?v_443) (=> (and x746 ?v_444) (= tmp656 2)) (=> (and ?v_445 ?v_446) (= tmp655 0)) (=> (and ?v_445 ?v_448) ?v_447) (=> (and x35 ?v_446) ?v_447) (=> (and x35 ?v_448) (= tmp655 2)) (=> (and ?v_449 ?v_450) (= tmp654 0)) (=> (and ?v_449 ?v_452) ?v_451) (=> (and x460 ?v_450) ?v_451) (=> (and x460 ?v_452) (= tmp654 2)) (=> (and ?v_453 ?v_454) (= tmp653 0)) (=> (and ?v_453 ?v_456) ?v_455) (=> (and x317 ?v_454) ?v_455) (=> (and x317 ?v_456) (= tmp653 2)) (=> (and ?v_457 ?v_458) (= tmp652 0)) (=> (and ?v_457 ?v_460) ?v_459) (=> (and x555 ?v_458) ?v_459) (=> (and x555 ?v_460) (= tmp652 2)) (=> (and ?v_461 ?v_462) (= tmp651 0)) (=> (and ?v_461 ?v_464) ?v_463) (=> (and x225 ?v_462) ?v_463) (=> (and x225 ?v_464) (= tmp651 2)) (=> (and ?v_465 ?v_466) (= tmp650 0)) (=> (and ?v_465 ?v_468) ?v_467) (=> (and x650 ?v_466) ?v_467) (=> (and x650 ?v_468) (= tmp650 2)) (=> (and ?v_469 ?v_470) (= tmp649 0)) (=> (and ?v_469 ?v_472) ?v_471) (=> (and x129 ?v_470) ?v_471) (=> (and x129 ?v_472) (= tmp649 2)) (=> (and ?v_473 ?v_474) (= tmp648 0)) (=> (and ?v_473 ?v_476) ?v_475) (=> (and x745 ?v_474) ?v_475) (=> (and x745 ?v_476) (= tmp648 2)) (=> (and ?v_477 ?v_478) (= tmp647 0)) (=> (and ?v_477 ?v_480) ?v_479) (=> (and x34 ?v_478) ?v_479) (=> (and x34 ?v_480) (= tmp647 2)) (=> (and ?v_481 ?v_482) (= tmp646 0)) (=> (and ?v_481 ?v_484) ?v_483) (=> (and x459 ?v_482) ?v_483) (=> (and x459 ?v_484) (= tmp646 2)) (=> (and ?v_485 ?v_486) (= tmp645 0)) (=> (and ?v_485 ?v_488) ?v_487) (=> (and x316 ?v_486) ?v_487) (=> (and x316 ?v_488) (= tmp645 2)) (=> (and ?v_489 ?v_490) (= tmp644 0)) (=> (and ?v_489 ?v_492) ?v_491) (=> (and x554 ?v_490) ?v_491) (=> (and x554 ?v_492) (= tmp644 2)) (=> (and ?v_493 ?v_494) (= tmp643 0)) (=> (and ?v_493 ?v_496) ?v_495) (=> (and x224 ?v_494) ?v_495) (=> (and x224 ?v_496) (= tmp643 2)) (=> (and ?v_497 ?v_498) (= tmp642 0)) (=> (and ?v_497 ?v_500) ?v_499) (=> (and x649 ?v_498) ?v_499) (=> (and x649 ?v_500) (= tmp642 2)) (=> (and ?v_501 ?v_502) (= tmp641 0)) (=> (and ?v_501 ?v_504) ?v_503) (=> (and x128 ?v_502) ?v_503) (=> (and x128 ?v_504) (= tmp641 2)) (=> (and ?v_505 ?v_506) (= tmp640 0)) (=> (and ?v_505 ?v_508) ?v_507) (=> (and x744 ?v_506) ?v_507) (=> (and x744 ?v_508) (= tmp640 2)) (=> (and ?v_509 ?v_510) (= tmp639 0)) (=> (and ?v_509 ?v_512) ?v_511) (=> (and x33 ?v_510) ?v_511) (=> (and x33 ?v_512) (= tmp639 2)) (=> (and ?v_513 ?v_514) (= tmp638 0)) (=> (and ?v_513 ?v_516) ?v_515) (=> (and x458 ?v_514) ?v_515) (=> (and x458 ?v_516) (= tmp638 2)) (=> (and ?v_517 ?v_518) (= tmp637 0)) (=> (and ?v_517 ?v_520) ?v_519) (=> (and x315 ?v_518) ?v_519) (=> (and x315 ?v_520) (= tmp637 2)) (=> (and ?v_521 ?v_522) (= tmp636 0)) (=> (and ?v_521 ?v_524) ?v_523) (=> (and x553 ?v_522) ?v_523) (=> (and x553 ?v_524) (= tmp636 2)) (=> (and ?v_525 ?v_526) (= tmp635 0)) (=> (and ?v_525 ?v_528) ?v_527) (=> (and x223 ?v_526) ?v_527) (=> (and x223 ?v_528) (= tmp635 2)) (=> (and ?v_529 ?v_530) (= tmp634 0)) (=> (and ?v_529 ?v_532) ?v_531) (=> (and x648 ?v_530) ?v_531) (=> (and x648 ?v_532) (= tmp634 2)) (=> (and ?v_533 ?v_534) (= tmp633 0)) (=> (and ?v_533 ?v_536) ?v_535) (=> (and x127 ?v_534) ?v_535) (=> (and x127 ?v_536) (= tmp633 2)) (=> (and ?v_537 ?v_538) (= tmp632 0)) (=> (and ?v_537 ?v_540) ?v_539) (=> (and x743 ?v_538) ?v_539) (=> (and x743 ?v_540) (= tmp632 2)) (=> (and ?v_541 ?v_542) (= tmp631 0)) (=> (and ?v_541 ?v_544) ?v_543) (=> (and x32 ?v_542) ?v_543) (=> (and x32 ?v_544) (= tmp631 2)) (=> (and ?v_545 ?v_546) (= tmp630 0)) (=> (and ?v_545 ?v_548) ?v_547) (=> (and x457 ?v_546) ?v_547) (=> (and x457 ?v_548) (= tmp630 2)) (=> (and ?v_549 ?v_550) (= tmp629 0)) (=> (and ?v_549 ?v_552) ?v_551) (=> (and x314 ?v_550) ?v_551) (=> (and x314 ?v_552) (= tmp629 2)) (=> (and ?v_553 ?v_554) (= tmp628 0)) (=> (and ?v_553 ?v_556) ?v_555) (=> (and x552 ?v_554) ?v_555) (=> (and x552 ?v_556) (= tmp628 2)) (=> (and ?v_557 ?v_558) (= tmp627 0)) (=> (and ?v_557 ?v_560) ?v_559) (=> (and x222 ?v_558) ?v_559) (=> (and x222 ?v_560) (= tmp627 2)) (=> (and ?v_561 ?v_562) (= tmp626 0)) (=> (and ?v_561 ?v_564) ?v_563) (=> (and x647 ?v_562) ?v_563) (=> (and x647 ?v_564) (= tmp626 2)) (=> (and ?v_565 ?v_566) (= tmp625 0)) (=> (and ?v_565 ?v_568) ?v_567) (=> (and x126 ?v_566) ?v_567) (=> (and x126 ?v_568) (= tmp625 2)) (=> (and ?v_569 ?v_570) (= tmp624 0)) (=> (and ?v_569 ?v_572) ?v_571) (=> (and x742 ?v_570) ?v_571) (=> (and x742 ?v_572) (= tmp624 2)) (=> (and ?v_573 ?v_574) (= tmp623 0)) (=> (and ?v_573 ?v_576) ?v_575) (=> (and x31 ?v_574) ?v_575) (=> (and x31 ?v_576) (= tmp623 2)) (=> (and ?v_577 ?v_578) (= tmp622 0)) (=> (and ?v_577 ?v_580) ?v_579) (=> (and x456 ?v_578) ?v_579) (=> (and x456 ?v_580) (= tmp622 2)) (=> (and ?v_581 ?v_582) (= tmp621 0)) (=> (and ?v_581 ?v_584) ?v_583) (=> (and x313 ?v_582) ?v_583) (=> (and x313 ?v_584) (= tmp621 2)) (=> (and ?v_585 ?v_586) (= tmp620 0)) (=> (and ?v_585 ?v_588) ?v_587) (=> (and x551 ?v_586) ?v_587) (=> (and x551 ?v_588) (= tmp620 2)) (=> (and ?v_589 ?v_590) (= tmp619 0)) (=> (and ?v_589 ?v_592) ?v_591) (=> (and x221 ?v_590) ?v_591) (=> (and x221 ?v_592) (= tmp619 2)) (=> (and ?v_593 ?v_594) (= tmp618 0)) (=> (and ?v_593 ?v_596) ?v_595) (=> (and x646 ?v_594) ?v_595) (=> (and x646 ?v_596) (= tmp618 2)) (=> (and ?v_597 ?v_598) (= tmp617 0)) (=> (and ?v_597 ?v_600) ?v_599) (=> (and x125 ?v_598) ?v_599) (=> (and x125 ?v_600) (= tmp617 2)) (=> (and ?v_601 ?v_602) (= tmp616 0)) (=> (and ?v_601 ?v_604) ?v_603) (=> (and x741 ?v_602) ?v_603) (=> (and x741 ?v_604) (= tmp616 2)) (=> (and ?v_605 ?v_606) (= tmp615 0)) (=> (and ?v_605 ?v_608) ?v_607) (=> (and x30 ?v_606) ?v_607) (=> (and x30 ?v_608) (= tmp615 2)) (=> (and ?v_609 ?v_610) (= tmp614 0)) (=> (and ?v_609 ?v_612) ?v_611) (=> (and x455 ?v_610) ?v_611) (=> (and x455 ?v_612) (= tmp614 2)) (=> (and ?v_613 ?v_614) (= tmp613 0)) (=> (and ?v_613 ?v_616) ?v_615) (=> (and x312 ?v_614) ?v_615) (=> (and x312 ?v_616) (= tmp613 2)) (=> (and ?v_617 ?v_618) (= tmp612 0)) (=> (and ?v_617 ?v_620) ?v_619) (=> (and x550 ?v_618) ?v_619) (=> (and x550 ?v_620) (= tmp612 2)) (=> (and ?v_621 ?v_622) (= tmp611 0)) (=> (and ?v_621 ?v_624) ?v_623) (=> (and x220 ?v_622) ?v_623) (=> (and x220 ?v_624) (= tmp611 2)) (=> (and ?v_625 ?v_626) (= tmp610 0)) (=> (and ?v_625 ?v_628) ?v_627) (=> (and x645 ?v_626) ?v_627) (=> (and x645 ?v_628) (= tmp610 2)) (=> (and ?v_629 ?v_630) (= tmp609 0)) (=> (and ?v_629 ?v_632) ?v_631) (=> (and x124 ?v_630) ?v_631) (=> (and x124 ?v_632) (= tmp609 2)) (=> (and ?v_633 ?v_634) (= tmp608 0)) (=> (and ?v_633 ?v_636) ?v_635) (=> (and x740 ?v_634) ?v_635) (=> (and x740 ?v_636) (= tmp608 2)) (=> (and ?v_637 ?v_638) (= tmp607 0)) (=> (and ?v_637 ?v_640) ?v_639) (=> (and x29 ?v_638) ?v_639) (=> (and x29 ?v_640) (= tmp607 2)) (=> (and ?v_641 ?v_642) (= tmp606 0)) (=> (and ?v_641 ?v_644) ?v_643) (=> (and x501 ?v_642) ?v_643) (=> (and x501 ?v_644) (= tmp606 2)) (=> (and ?v_645 ?v_646) (= tmp605 0)) (=> (and ?v_645 ?v_648) ?v_647) (=> (and x311 ?v_646) ?v_647) (=> (and x311 ?v_648) (= tmp605 2)) (=> (and ?v_649 ?v_650) (= tmp604 0)) (=> (and ?v_649 ?v_652) ?v_651) (=> (and x597 ?v_650) ?v_651) (=> (and x597 ?v_652) (= tmp604 2)) (=> (and ?v_653 ?v_654) (= tmp603 0)) (=> (and ?v_653 ?v_656) ?v_655) (=> (and x219 ?v_654) ?v_655) (=> (and x219 ?v_656) (= tmp603 2)) (=> (and ?v_657 ?v_658) (= tmp602 0)) (=> (and ?v_657 ?v_660) ?v_659) (=> (and x691 ?v_658) ?v_659) (=> (and x691 ?v_660) (= tmp602 2)) (=> (and ?v_661 ?v_662) (= tmp601 0)) (=> (and ?v_661 ?v_664) ?v_663) (=> (and x123 ?v_662) ?v_663) (=> (and x123 ?v_664) (= tmp601 2)) (=> (and ?v_665 ?v_666) (= tmp600 0)) (=> (and ?v_665 ?v_668) ?v_667) (=> (and x768 ?v_666) ?v_667) (=> (and x768 ?v_668) (= tmp600 2)) (=> (and ?v_669 ?v_670) (= tmp599 0)) (=> (and ?v_669 ?v_672) ?v_671) (=> (and x28 ?v_670) ?v_671) (=> (and x28 ?v_672) (= tmp599 2)) (=> (and ?v_673 ?v_674) (= tmp598 0)) (=> (and ?v_673 ?v_676) ?v_675) (=> (and x454 ?v_674) ?v_675) (=> (and x454 ?v_676) (= tmp598 2)) (=> (and ?v_677 ?v_678) (= tmp597 0)) (=> (and ?v_677 ?v_680) ?v_679) (=> (and x310 ?v_678) ?v_679) (=> (and x310 ?v_680) (= tmp597 2)) (=> (and ?v_681 ?v_682) (= tmp596 0)) (=> (and ?v_681 ?v_684) ?v_683) (=> (and x548 ?v_682) ?v_683) (=> (and x548 ?v_684) (= tmp596 2)) (=> (and ?v_685 ?v_686) (= tmp595 0)) (=> (and ?v_685 ?v_688) ?v_687) (=> (and x218 ?v_686) ?v_687) (=> (and x218 ?v_688) (= tmp595 2)) (=> (and ?v_689 ?v_690) (= tmp594 0)) (=> (and ?v_689 ?v_692) ?v_691) (=> (and x643 ?v_690) ?v_691) (=> (and x643 ?v_692) (= tmp594 2)) (=> (and ?v_693 ?v_694) (= tmp593 0)) (=> (and ?v_693 ?v_696) ?v_695) (=> (and x122 ?v_694) ?v_695) (=> (and x122 ?v_696) (= tmp593 2)) (=> (and ?v_697 ?v_698) (= tmp592 0)) (=> (and ?v_697 ?v_700) ?v_699) (=> (and x738 ?v_698) ?v_699) (=> (and x738 ?v_700) (= tmp592 2)) (=> (and ?v_701 ?v_702) (= tmp591 0)) (=> (and ?v_701 ?v_704) ?v_703) (=> (and x27 ?v_702) ?v_703) (=> (and x27 ?v_704) (= tmp591 2)) (=> (and ?v_705 ?v_706) (= tmp590 0)) (=> (and ?v_705 ?v_708) ?v_707) (=> (and x453 ?v_706) ?v_707) (=> (and x453 ?v_708) (= tmp590 2)) (=> (and ?v_709 ?v_710) (= tmp589 0)) (=> (and ?v_709 ?v_712) ?v_711) (=> (and x309 ?v_710) ?v_711) (=> (and x309 ?v_712) (= tmp589 2)) (=> (and ?v_713 ?v_714) (= tmp588 0)) (=> (and ?v_713 ?v_716) ?v_715) (=> (and x547 ?v_714) ?v_715) (=> (and x547 ?v_716) (= tmp588 2)) (=> (and ?v_717 ?v_718) (= tmp587 0)) (=> (and ?v_717 ?v_720) ?v_719) (=> (and x217 ?v_718) ?v_719) (=> (and x217 ?v_720) (= tmp587 2)) (=> (and ?v_721 ?v_722) (= tmp586 0)) (=> (and ?v_721 ?v_724) ?v_723) (=> (and x642 ?v_722) ?v_723) (=> (and x642 ?v_724) (= tmp586 2)) (=> (and ?v_725 ?v_726) (= tmp585 0)) (=> (and ?v_725 ?v_728) ?v_727) (=> (and x121 ?v_726) ?v_727) (=> (and x121 ?v_728) (= tmp585 2)) (=> (and ?v_729 ?v_730) (= tmp584 0)) (=> (and ?v_729 ?v_732) ?v_731) (=> (and x737 ?v_730) ?v_731) (=> (and x737 ?v_732) (= tmp584 2)) (=> (and ?v_733 ?v_734) (= tmp583 0)) (=> (and ?v_733 ?v_736) ?v_735) (=> (and x26 ?v_734) ?v_735) (=> (and x26 ?v_736) (= tmp583 2)) (=> (and ?v_737 ?v_738) (= tmp582 0)) (=> (and ?v_737 ?v_740) ?v_739) (=> (and x452 ?v_738) ?v_739) (=> (and x452 ?v_740) (= tmp582 2)) (=> (and ?v_741 ?v_742) (= tmp581 0)) (=> (and ?v_741 ?v_744) ?v_743) (=> (and x308 ?v_742) ?v_743) (=> (and x308 ?v_744) (= tmp581 2)) (=> (and ?v_745 ?v_746) (= tmp580 0)) (=> (and ?v_745 ?v_748) ?v_747) (=> (and x546 ?v_746) ?v_747) (=> (and x546 ?v_748) (= tmp580 2)) (=> (and ?v_749 ?v_750) (= tmp579 0)) (=> (and ?v_749 ?v_752) ?v_751) (=> (and x216 ?v_750) ?v_751) (=> (and x216 ?v_752) (= tmp579 2)) (=> (and ?v_753 ?v_754) (= tmp578 0)) (=> (and ?v_753 ?v_756) ?v_755) (=> (and x641 ?v_754) ?v_755) (=> (and x641 ?v_756) (= tmp578 2)) (=> (and ?v_757 ?v_758) (= tmp577 0)) (=> (and ?v_757 ?v_760) ?v_759) (=> (and x120 ?v_758) ?v_759) (=> (and x120 ?v_760) (= tmp577 2)) (=> (and ?v_761 ?v_762) (= tmp576 0)) (=> (and ?v_761 ?v_764) ?v_763) (=> (and x736 ?v_762) ?v_763) (=> (and x736 ?v_764) (= tmp576 2)) (=> (and ?v_765 ?v_766) (= tmp575 0)) (=> (and ?v_765 ?v_768) ?v_767) (=> (and x25 ?v_766) ?v_767) (=> (and x25 ?v_768) (= tmp575 2)) (=> (and ?v_769 ?v_770) (= tmp574 0)) (=> (and ?v_769 ?v_772) ?v_771) (=> (and x451 ?v_770) ?v_771) (=> (and x451 ?v_772) (= tmp574 2)) (=> (and ?v_773 ?v_774) (= tmp573 0)) (=> (and ?v_773 ?v_776) ?v_775) (=> (and x307 ?v_774) ?v_775) (=> (and x307 ?v_776) (= tmp573 2)) (=> (and ?v_777 ?v_778) (= tmp572 0)) (=> (and ?v_777 ?v_780) ?v_779) (=> (and x545 ?v_778) ?v_779) (=> (and x545 ?v_780) (= tmp572 2)) (=> (and ?v_781 ?v_782) (= tmp571 0)) (=> (and ?v_781 ?v_784) ?v_783) (=> (and x215 ?v_782) ?v_783) (=> (and x215 ?v_784) (= tmp571 2)) (=> (and ?v_785 ?v_786) (= tmp570 0)) (=> (and ?v_785 ?v_788) ?v_787) (=> (and x640 ?v_786) ?v_787) (=> (and x640 ?v_788) (= tmp570 2)) (=> (and ?v_789 ?v_790) (= tmp569 0)) (=> (and ?v_789 ?v_792) ?v_791) (=> (and x119 ?v_790) ?v_791) (=> (and x119 ?v_792) (= tmp569 2)) (=> (and ?v_793 ?v_794) (= tmp568 0)) (=> (and ?v_793 ?v_796) ?v_795) (=> (and x735 ?v_794) ?v_795) (=> (and x735 ?v_796) (= tmp568 2)) (=> (and ?v_797 ?v_798) (= tmp567 0)) (=> (and ?v_797 ?v_800) ?v_799) (=> (and x24 ?v_798) ?v_799) (=> (and x24 ?v_800) (= tmp567 2)) (=> (and ?v_801 ?v_802) (= tmp566 0)) (=> (and ?v_801 ?v_804) ?v_803) (=> (and x496 ?v_802) ?v_803) (=> (and x496 ?v_804) (= tmp566 2)) (=> (and ?v_805 ?v_806) (= tmp565 0)) (=> (and ?v_805 ?v_808) ?v_807) (=> (and x354 ?v_806) ?v_807) (=> (and x354 ?v_808) (= tmp565 2)) (=> (and ?v_809 ?v_810) (= tmp564 0)) (=> (and ?v_809 ?v_812) ?v_811) (=> (and x592 ?v_810) ?v_811) (=> (and x592 ?v_812) (= tmp564 2)) (=> (and ?v_813 ?v_814) (= tmp563 0)) (=> (and ?v_813 ?v_816) ?v_815) (=> (and x258 ?v_814) ?v_815) (=> (and x258 ?v_816) (= tmp563 2)) (=> (and ?v_817 ?v_818) (= tmp562 0)) (=> (and ?v_817 ?v_820) ?v_819) (=> (and x734 ?v_818) ?v_819) (=> (and x734 ?v_820) (= tmp562 2)) (=> (and ?v_821 ?v_822) (= tmp561 0)) (=> (and ?v_821 ?v_824) ?v_823) (=> (and x166 ?v_822) ?v_823) (=> (and x166 ?v_824) (= tmp561 2)) (=> (and ?v_825 ?v_826) (= tmp560 0)) (=> (and ?v_825 ?v_828) ?v_827) (=> (and x767 ?v_826) ?v_827) (=> (and x767 ?v_828) (= tmp560 2)) (=> (and ?v_829 ?v_830) (= tmp559 0)) (=> (and ?v_829 ?v_832) ?v_831) (=> (and x23 ?v_830) ?v_831) (=> (and x23 ?v_832) (= tmp559 2)) (=> (and ?v_833 ?v_834) (= tmp558 0)) (=> (and ?v_833 ?v_836) ?v_835) (=> (and x449 ?v_834) ?v_835) (=> (and x449 ?v_836) (= tmp558 2)) (=> (and ?v_837 ?v_838) (= tmp557 0)) (=> (and ?v_837 ?v_840) ?v_839) (=> (and x305 ?v_838) ?v_839) (=> (and x305 ?v_840) (= tmp557 2)) (=> (and ?v_841 ?v_842) (= tmp556 0)) (=> (and ?v_841 ?v_844) ?v_843) (=> (and x543 ?v_842) ?v_843) (=> (and x543 ?v_844) (= tmp556 2)) (=> (and ?v_845 ?v_846) (= tmp555 0)) (=> (and ?v_845 ?v_848) ?v_847) (=> (and x213 ?v_846) ?v_847) (=> (and x213 ?v_848) (= tmp555 2)) (=> (and ?v_849 ?v_850) (= tmp554 0)) (=> (and ?v_849 ?v_852) ?v_851) (=> (and x638 ?v_850) ?v_851) (=> (and x638 ?v_852) (= tmp554 2)) (=> (and ?v_853 ?v_854) (= tmp553 0)) (=> (and ?v_853 ?v_856) ?v_855) (=> (and x118 ?v_854) ?v_855) (=> (and x118 ?v_856) (= tmp553 2)) (=> (and ?v_857 ?v_858) (= tmp552 0)) (=> (and ?v_857 ?v_860) ?v_859) (=> (and x733 ?v_858) ?v_859) (=> (and x733 ?v_860) (= tmp552 2)) (=> (and ?v_861 ?v_862) (= tmp551 0)) (=> (and ?v_861 ?v_864) ?v_863) (=> (and x22 ?v_862) ?v_863) (=> (and x22 ?v_864) (= tmp551 2)) (=> (and ?v_865 ?v_866) (= tmp550 0)) (=> (and ?v_865 ?v_868) ?v_867) (=> (and x448 ?v_866) ?v_867) (=> (and x448 ?v_868) (= tmp550 2)) (=> (and ?v_869 ?v_870) (= tmp549 0)) (=> (and ?v_869 ?v_872) ?v_871) (=> (and x304 ?v_870) ?v_871) (=> (and x304 ?v_872) (= tmp549 2)) (=> (and ?v_873 ?v_874) (= tmp548 0)) (=> (and ?v_873 ?v_876) ?v_875) (=> (and x542 ?v_874) ?v_875) (=> (and x542 ?v_876) (= tmp548 2)) (=> (and ?v_877 ?v_878) (= tmp547 0)) (=> (and ?v_877 ?v_880) ?v_879) (=> (and x212 ?v_878) ?v_879) (=> (and x212 ?v_880) (= tmp547 2)) (=> (and ?v_881 ?v_882) (= tmp546 0)) (=> (and ?v_881 ?v_884) ?v_883) (=> (and x637 ?v_882) ?v_883) (=> (and x637 ?v_884) (= tmp546 2)) (=> (and ?v_885 ?v_886) (= tmp545 0)) (=> (and ?v_885 ?v_888) ?v_887) (=> (and x117 ?v_886) ?v_887) (=> (and x117 ?v_888) (= tmp545 2)) (=> (and ?v_889 ?v_890) (= tmp544 0)) (=> (and ?v_889 ?v_892) ?v_891) (=> (and x732 ?v_890) ?v_891) (=> (and x732 ?v_892) (= tmp544 2)) (=> (and ?v_893 ?v_894) (= tmp543 0)) (=> (and ?v_893 ?v_896) ?v_895) (=> (and x21 ?v_894) ?v_895) (=> (and x21 ?v_896) (= tmp543 2)) (=> (and ?v_897 ?v_898) (= tmp542 0)) (=> (and ?v_897 ?v_900) ?v_899) (=> (and x447 ?v_898) ?v_899) (=> (and x447 ?v_900) (= tmp542 2)) (=> (and ?v_901 ?v_902) (= tmp541 0)) (=> (and ?v_901 ?v_904) ?v_903) (=> (and x303 ?v_902) ?v_903) (=> (and x303 ?v_904) (= tmp541 2)) (=> (and ?v_905 ?v_906) (= tmp540 0)) (=> (and ?v_905 ?v_908) ?v_907) (=> (and x541 ?v_906) ?v_907) (=> (and x541 ?v_908) (= tmp540 2)) (=> (and ?v_909 ?v_910) (= tmp539 0)) (=> (and ?v_909 ?v_912) ?v_911) (=> (and x211 ?v_910) ?v_911) (=> (and x211 ?v_912) (= tmp539 2)) (=> (and ?v_913 ?v_914) (= tmp538 0)) (=> (and ?v_913 ?v_916) ?v_915) (=> (and x636 ?v_914) ?v_915) (=> (and x636 ?v_916) (= tmp538 2)) (=> (and ?v_917 ?v_918) (= tmp537 0)) (=> (and ?v_917 ?v_920) ?v_919) (=> (and x116 ?v_918) ?v_919) (=> (and x116 ?v_920) (= tmp537 2)) (=> (and ?v_921 ?v_922) (= tmp536 0)) (=> (and ?v_921 ?v_924) ?v_923) (=> (and x731 ?v_922) ?v_923) (=> (and x731 ?v_924) (= tmp536 2)) (=> (and ?v_925 ?v_926) (= tmp535 0)) (=> (and ?v_925 ?v_928) ?v_927) (=> (and x20 ?v_926) ?v_927) (=> (and x20 ?v_928) (= tmp535 2)) (=> (and ?v_929 ?v_930) (= tmp534 0)) (=> (and ?v_929 ?v_932) ?v_931) (=> (and x446 ?v_930) ?v_931) (=> (and x446 ?v_932) (= tmp534 2)) (=> (and ?v_933 ?v_934) (= tmp533 0)) (=> (and ?v_933 ?v_936) ?v_935) (=> (and x302 ?v_934) ?v_935) (=> (and x302 ?v_936) (= tmp533 2)) (=> (and ?v_937 ?v_938) (= tmp532 0)) (=> (and ?v_937 ?v_940) ?v_939) (=> (and x540 ?v_938) ?v_939) (=> (and x540 ?v_940) (= tmp532 2)) (=> (and ?v_941 ?v_942) (= tmp531 0)) (=> (and ?v_941 ?v_944) ?v_943) (=> (and x210 ?v_942) ?v_943) (=> (and x210 ?v_944) (= tmp531 2)) (=> (and ?v_945 ?v_946) (= tmp530 0)) (=> (and ?v_945 ?v_948) ?v_947) (=> (and x635 ?v_946) ?v_947) (=> (and x635 ?v_948) (= tmp530 2)) (=> (and ?v_949 ?v_950) (= tmp529 0)) (=> (and ?v_949 ?v_952) ?v_951) (=> (and x115 ?v_950) ?v_951) (=> (and x115 ?v_952) (= tmp529 2)) (=> (and ?v_953 ?v_954) (= tmp528 0)) (=> (and ?v_953 ?v_956) ?v_955) (=> (and x730 ?v_954) ?v_955) (=> (and x730 ?v_956) (= tmp528 2)) (=> (and ?v_957 ?v_958) (= tmp527 0)) (=> (and ?v_957 ?v_960) ?v_959) (=> (and x19 ?v_958) ?v_959) (=> (and x19 ?v_960) (= tmp527 2)) (=> (and ?v_961 ?v_962) (= tmp526 0)) (=> (and ?v_961 ?v_964) ?v_963) (=> (and x445 ?v_962) ?v_963) (=> (and x445 ?v_964) (= tmp526 2)) (=> (and ?v_965 ?v_966) (= tmp525 0)) (=> (and ?v_965 ?v_968) ?v_967) (=> (and x301 ?v_966) ?v_967) (=> (and x301 ?v_968) (= tmp525 2)) (=> (and ?v_969 ?v_970) (= tmp524 0)) (=> (and ?v_969 ?v_972) ?v_971) (=> (and x539 ?v_970) ?v_971) (=> (and x539 ?v_972) (= tmp524 2)) (=> (and ?v_973 ?v_974) (= tmp523 0)) (=> (and ?v_973 ?v_976) ?v_975) (=> (and x209 ?v_974) ?v_975) (=> (and x209 ?v_976) (= tmp523 2)) (=> (and ?v_977 ?v_978) (= tmp522 0)) (=> (and ?v_977 ?v_980) ?v_979) (=> (and x634 ?v_978) ?v_979) (=> (and x634 ?v_980) (= tmp522 2)) (=> (and ?v_981 ?v_982) (= tmp521 0)) (=> (and ?v_981 ?v_984) ?v_983) (=> (and x114 ?v_982) ?v_983) (=> (and x114 ?v_984) (= tmp521 2)) (=> (and ?v_985 ?v_986) (= tmp520 0)) (=> (and ?v_985 ?v_988) ?v_987) (=> (and x729 ?v_986) ?v_987) (=> (and x729 ?v_988) (= tmp520 2)) (=> (and ?v_989 ?v_990) (= tmp519 0)) (=> (and ?v_989 ?v_992) ?v_991) (=> (and x18 ?v_990) ?v_991) (=> (and x18 ?v_992) (= tmp519 2)) (=> (and ?v_993 ?v_994) (= tmp518 0)) (=> (and ?v_993 ?v_996) ?v_995) (=> (and x490 ?v_994) ?v_995) (=> (and x490 ?v_996) (= tmp518 2)) (=> (and ?v_997 ?v_998) (= tmp517 0)) (=> (and ?v_997 ?v_1000) ?v_999) (=> (and x348 ?v_998) ?v_999) (=> (and x348 ?v_1000) (= tmp517 2)) (=> (and ?v_1001 ?v_1002) (= tmp516 0)) (=> (and ?v_1001 ?v_1004) ?v_1003) (=> (and x586 ?v_1002) ?v_1003) (=> (and x586 ?v_1004) (= tmp516 2)) (=> (and ?v_1005 ?v_1006) (= tmp515 0)) (=> (and ?v_1005 ?v_1008) ?v_1007) (=> (and x252 ?v_1006) ?v_1007) (=> (and x252 ?v_1008) (= tmp515 2)) (=> (and ?v_1009 ?v_1010) (= tmp514 0)) (=> (and ?v_1009 ?v_1012) ?v_1011) (=> (and x681 ?v_1010) ?v_1011) (=> (and x681 ?v_1012) (= tmp514 2)) (=> (and ?v_1013 ?v_1014) (= tmp513 0)) (=> (and ?v_1013 ?v_1016) ?v_1015) (=> (and x160 ?v_1014) ?v_1015) (=> (and x160 ?v_1016) (= tmp513 2)) (=> (and ?v_1017 ?v_1018) (= tmp512 0)) (=> (and ?v_1017 ?v_1020) ?v_1019) (=> (and x765 ?v_1018) ?v_1019) (=> (and x765 ?v_1020) (= tmp512 2)) (=> (and ?v_1021 ?v_1022) (= tmp511 0)) (=> (and ?v_1021 ?v_1024) ?v_1023) (=> (and x65 ?v_1022) ?v_1023) (=> (and x65 ?v_1024) (= tmp511 2)) (=> (and ?v_1025 ?v_1026) (= tmp510 0)) (=> (and ?v_1025 ?v_1028) ?v_1027) (=> (and x443 ?v_1026) ?v_1027) (=> (and x443 ?v_1028) (= tmp510 2)) (=> (and ?v_1029 ?v_1030) (= tmp509 0)) (=> (and ?v_1029 ?v_1032) ?v_1031) (=> (and x299 ?v_1030) ?v_1031) (=> (and x299 ?v_1032) (= tmp509 2)) (=> (and ?v_1033 ?v_1034) (= tmp508 0)) (=> (and ?v_1033 ?v_1036) ?v_1035) (=> (and x537 ?v_1034) ?v_1035) (=> (and x537 ?v_1036) (= tmp508 2)) (=> (and ?v_1037 ?v_1038) (= tmp507 0)) (=> (and ?v_1037 ?v_1040) ?v_1039) (=> (and x207 ?v_1038) ?v_1039) (=> (and x207 ?v_1040) (= tmp507 2)) (=> (and ?v_1041 ?v_1042) (= tmp506 0)) (=> (and ?v_1041 ?v_1044) ?v_1043) (=> (and x632 ?v_1042) ?v_1043) (=> (and x632 ?v_1044) (= tmp506 2)) (=> (and ?v_1045 ?v_1046) (= tmp505 0)) (=> (and ?v_1045 ?v_1048) ?v_1047) (=> (and x112 ?v_1046) ?v_1047) (=> (and x112 ?v_1048) (= tmp505 2)) (=> (and ?v_1049 ?v_1050) (= tmp504 0)) (=> (and ?v_1049 ?v_1052) ?v_1051) (=> (and x727 ?v_1050) ?v_1051) (=> (and x727 ?v_1052) (= tmp504 2)) (=> (and ?v_1053 ?v_1054) (= tmp503 0)) (=> (and ?v_1053 ?v_1056) ?v_1055) (=> (and x17 ?v_1054) ?v_1055) (=> (and x17 ?v_1056) (= tmp503 2)) (=> (and ?v_1057 ?v_1058) (= tmp502 0)) (=> (and ?v_1057 ?v_1060) ?v_1059) (=> (and x442 ?v_1058) ?v_1059) (=> (and x442 ?v_1060) (= tmp502 2)) (=> (and ?v_1061 ?v_1062) (= tmp501 0)) (=> (and ?v_1061 ?v_1064) ?v_1063) (=> (and x298 ?v_1062) ?v_1063) (=> (and x298 ?v_1064) (= tmp501 2)) (=> (and ?v_1065 ?v_1066) (= tmp500 0)) (=> (and ?v_1065 ?v_1068) ?v_1067) (=> (and x536 ?v_1066) ?v_1067) (=> (and x536 ?v_1068) (= tmp500 2)) (=> (and ?v_1069 ?v_1070) (= tmp499 0)) (=> (and ?v_1069 ?v_1072) ?v_1071) (=> (and x206 ?v_1070) ?v_1071) (=> (and x206 ?v_1072) (= tmp499 2)) (=> (and ?v_1073 ?v_1074) (= tmp498 0)) (=> (and ?v_1073 ?v_1076) ?v_1075) (=> (and x631 ?v_1074) ?v_1075) (=> (and x631 ?v_1076) (= tmp498 2)) (=> (and ?v_1077 ?v_1078) (= tmp497 0)) (=> (and ?v_1077 ?v_1080) ?v_1079) (=> (and x111 ?v_1078) ?v_1079) (=> (and x111 ?v_1080) (= tmp497 2)) (=> (and ?v_1081 ?v_1082) (= tmp496 0)) (=> (and ?v_1081 ?v_1084) ?v_1083) (=> (and x726 ?v_1082) ?v_1083) (=> (and x726 ?v_1084) (= tmp496 2)) (=> (and ?v_1085 ?v_1086) (= tmp495 0)) (=> (and ?v_1085 ?v_1088) ?v_1087) (=> (and x16 ?v_1086) ?v_1087) (=> (and x16 ?v_1088) (= tmp495 2)) (=> (and ?v_1089 ?v_1090) (= tmp494 0)) (=> (and ?v_1089 ?v_1092) ?v_1091) (=> (and x441 ?v_1090) ?v_1091) (=> (and x441 ?v_1092) (= tmp494 2)) (=> (and ?v_1093 ?v_1094) (= tmp493 0)) (=> (and ?v_1093 ?v_1096) ?v_1095) (=> (and x297 ?v_1094) ?v_1095) (=> (and x297 ?v_1096) (= tmp493 2)) (=> (and ?v_1097 ?v_1098) (= tmp492 0)) (=> (and ?v_1097 ?v_1100) ?v_1099) (=> (and x535 ?v_1098) ?v_1099) (=> (and x535 ?v_1100) (= tmp492 2)) (=> (and ?v_1101 ?v_1102) (= tmp491 0)) (=> (and ?v_1101 ?v_1104) ?v_1103) (=> (and x205 ?v_1102) ?v_1103) (=> (and x205 ?v_1104) (= tmp491 2)) (=> (and ?v_1105 ?v_1106) (= tmp490 0)) (=> (and ?v_1105 ?v_1108) ?v_1107) (=> (and x630 ?v_1106) ?v_1107) (=> (and x630 ?v_1108) (= tmp490 2)) (=> (and ?v_1109 ?v_1110) (= tmp489 0)) (=> (and ?v_1109 ?v_1112) ?v_1111) (=> (and x110 ?v_1110) ?v_1111) (=> (and x110 ?v_1112) (= tmp489 2)) (=> (and ?v_1113 ?v_1114) (= tmp488 0)) (=> (and ?v_1113 ?v_1116) ?v_1115) (=> (and x725 ?v_1114) ?v_1115) (=> (and x725 ?v_1116) (= tmp488 2)) (=> (and ?v_1117 ?v_1118) (= tmp487 0)) (=> (and ?v_1117 ?v_1120) ?v_1119) (=> (and x15 ?v_1118) ?v_1119) (=> (and x15 ?v_1120) (= tmp487 2)) (=> (and ?v_1121 ?v_1122) (= tmp486 0)) (=> (and ?v_1121 ?v_1124) ?v_1123) (=> (and x486 ?v_1122) ?v_1123) (=> (and x486 ?v_1124) (= tmp486 2)) (=> (and ?v_1125 ?v_1126) (= tmp485 0)) (=> (and ?v_1125 ?v_1128) ?v_1127) (=> (and x344 ?v_1126) ?v_1127) (=> (and x344 ?v_1128) (= tmp485 2)) (=> (and ?v_1129 ?v_1130) (= tmp484 0)) (=> (and ?v_1129 ?v_1132) ?v_1131) (=> (and x582 ?v_1130) ?v_1131) (=> (and x582 ?v_1132) (= tmp484 2)) (=> (and ?v_1133 ?v_1134) (= tmp483 0)) (=> (and ?v_1133 ?v_1136) ?v_1135) (=> (and x204 ?v_1134) ?v_1135) (=> (and x204 ?v_1136) (= tmp483 2)) (=> (and ?v_1137 ?v_1138) (= tmp482 0)) (=> (and ?v_1137 ?v_1140) ?v_1139) (=> (and x677 ?v_1138) ?v_1139) (=> (and x677 ?v_1140) (= tmp482 2)) (=> (and ?v_1141 ?v_1142) (= tmp481 0)) (=> (and ?v_1141 ?v_1144) ?v_1143) (=> (and x109 ?v_1142) ?v_1143) (=> (and x109 ?v_1144) (= tmp481 2)) (=> (and ?v_1145 ?v_1146) (= tmp480 0)) (=> (and ?v_1145 ?v_1148) ?v_1147) (=> (and x764 ?v_1146) ?v_1147) (=> (and x764 ?v_1148) (= tmp480 2)) (=> (and ?v_1149 ?v_1150) (= tmp479 0)) (=> (and ?v_1149 ?v_1152) ?v_1151) (=> (and x14 ?v_1150) ?v_1151) (=> (and x14 ?v_1152) (= tmp479 2)) (=> (and ?v_1153 ?v_1154) (= tmp478 0)) (=> (and ?v_1153 ?v_1156) ?v_1155) (=> (and x485 ?v_1154) ?v_1155) (=> (and x485 ?v_1156) (= tmp478 2)) (=> (and ?v_1157 ?v_1158) (= tmp477 0)) (=> (and ?v_1157 ?v_1160) ?v_1159) (=> (and x343 ?v_1158) ?v_1159) (=> (and x343 ?v_1160) (= tmp477 2)) (=> (and ?v_1161 ?v_1162) (= tmp476 0)) (=> (and ?v_1161 ?v_1164) ?v_1163) (=> (and x581 ?v_1162) ?v_1163) (=> (and x581 ?v_1164) (= tmp476 2)) (=> (and ?v_1165 ?v_1166) (= tmp475 0)) (=> (and ?v_1165 ?v_1168) ?v_1167) (=> (and x203 ?v_1166) ?v_1167) (=> (and x203 ?v_1168) (= tmp475 2)) (=> (and ?v_1169 ?v_1170) (= tmp474 0)) (=> (and ?v_1169 ?v_1172) ?v_1171) (=> (and x676 ?v_1170) ?v_1171) (=> (and x676 ?v_1172) (= tmp474 2)) (=> (and ?v_1173 ?v_1174) (= tmp473 0)) (=> (and ?v_1173 ?v_1176) ?v_1175) (=> (and x108 ?v_1174) ?v_1175) (=> (and x108 ?v_1176) (= tmp473 2)) (=> (and ?v_1177 ?v_1178) (= tmp472 0)) (=> (and ?v_1177 ?v_1180) ?v_1179) (=> (and x763 ?v_1178) ?v_1179) (=> (and x763 ?v_1180) (= tmp472 2)) (=> (and ?v_1181 ?v_1182) (= tmp471 0)) (=> (and ?v_1181 ?v_1184) ?v_1183) (=> (and x13 ?v_1182) ?v_1183) (=> (and x13 ?v_1184) (= tmp471 2)) (=> (and ?v_1185 ?v_1186) (= tmp470 0)) (=> (and ?v_1185 ?v_1188) ?v_1187) (=> (and x484 ?v_1186) ?v_1187) (=> (and x484 ?v_1188) (= tmp470 2)) (=> (and ?v_1189 ?v_1190) (= tmp469 0)) (=> (and ?v_1189 ?v_1192) ?v_1191) (=> (and x342 ?v_1190) ?v_1191) (=> (and x342 ?v_1192) (= tmp469 2)) (=> (and ?v_1193 ?v_1194) (= tmp468 0)) (=> (and ?v_1193 ?v_1196) ?v_1195) (=> (and x580 ?v_1194) ?v_1195) (=> (and x580 ?v_1196) (= tmp468 2)) (=> (and ?v_1197 ?v_1198) (= tmp467 0)) (=> (and ?v_1197 ?v_1200) ?v_1199) (=> (and x202 ?v_1198) ?v_1199) (=> (and x202 ?v_1200) (= tmp467 2)) (=> (and ?v_1201 ?v_1202) (= tmp466 0)) (=> (and ?v_1201 ?v_1204) ?v_1203) (=> (and x675 ?v_1202) ?v_1203) (=> (and x675 ?v_1204) (= tmp466 2)) (=> (and ?v_1205 ?v_1206) (= tmp465 0)) (=> (and ?v_1205 ?v_1208) ?v_1207) (=> (and x107 ?v_1206) ?v_1207) (=> (and x107 ?v_1208) (= tmp465 2)) (=> (and ?v_1209 ?v_1210) (= tmp464 0)) (=> (and ?v_1209 ?v_1212) ?v_1211) (=> (and x762 ?v_1210) ?v_1211) (=> (and x762 ?v_1212) (= tmp464 2)) (=> (and ?v_1213 ?v_1214) (= tmp463 0)) (=> (and ?v_1213 ?v_1216) ?v_1215) (=> (and x12 ?v_1214) ?v_1215) (=> (and x12 ?v_1216) (= tmp463 2)) (=> (and ?v_1217 ?v_1218) (= tmp462 0)) (=> (and ?v_1217 ?v_1220) ?v_1219) (=> (and x483 ?v_1218) ?v_1219) (=> (and x483 ?v_1220) (= tmp462 2)) (=> (and ?v_1221 ?v_1222) (= tmp461 0)) (=> (and ?v_1221 ?v_1224) ?v_1223) (=> (and x341 ?v_1222) ?v_1223) (=> (and x341 ?v_1224) (= tmp461 2)) (=> (and ?v_1225 ?v_1226) (= tmp460 0)) (=> (and ?v_1225 ?v_1228) ?v_1227) (=> (and x579 ?v_1226) ?v_1227) (=> (and x579 ?v_1228) (= tmp460 2)) (=> (and ?v_1229 ?v_1230) (= tmp459 0)) (=> (and ?v_1229 ?v_1232) ?v_1231) (=> (and x201 ?v_1230) ?v_1231) (=> (and x201 ?v_1232) (= tmp459 2)) (=> (and ?v_1233 ?v_1234) (= tmp458 0)) (=> (and ?v_1233 ?v_1236) ?v_1235) (=> (and x674 ?v_1234) ?v_1235) (=> (and x674 ?v_1236) (= tmp458 2)) (=> (and ?v_1237 ?v_1238) (= tmp457 0)) (=> (and ?v_1237 ?v_1240) ?v_1239) (=> (and x106 ?v_1238) ?v_1239) (=> (and x106 ?v_1240) (= tmp457 2)) (=> (and ?v_1241 ?v_1242) (= tmp456 0)) (=> (and ?v_1241 ?v_1244) ?v_1243) (=> (and x761 ?v_1242) ?v_1243) (=> (and x761 ?v_1244) (= tmp456 2)) (=> (and ?v_1245 ?v_1246) (= tmp455 0)) (=> (and ?v_1245 ?v_1248) ?v_1247) (=> (and x11 ?v_1246) ?v_1247) (=> (and x11 ?v_1248) (= tmp455 2)) (=> (and ?v_1249 ?v_1250) (= tmp454 0)) (=> (and ?v_1249 ?v_1252) ?v_1251) (=> (and x436 ?v_1250) ?v_1251) (=> (and x436 ?v_1252) (= tmp454 2)) (=> (and ?v_1253 ?v_1254) (= tmp453 0)) (=> (and ?v_1253 ?v_1256) ?v_1255) (=> (and x292 ?v_1254) ?v_1255) (=> (and x292 ?v_1256) (= tmp453 2)) (=> (and ?v_1257 ?v_1258) (= tmp452 0)) (=> (and ?v_1257 ?v_1260) ?v_1259) (=> (and x530 ?v_1258) ?v_1259) (=> (and x530 ?v_1260) (= tmp452 2)) (=> (and ?v_1261 ?v_1262) (= tmp451 0)) (=> (and ?v_1261 ?v_1264) ?v_1263) (=> (and x200 ?v_1262) ?v_1263) (=> (and x200 ?v_1264) (= tmp451 2)) (=> (and ?v_1265 ?v_1266) (= tmp450 0)) (=> (and ?v_1265 ?v_1268) ?v_1267) (=> (and x625 ?v_1266) ?v_1267) (=> (and x625 ?v_1268) (= tmp450 2)) (=> (and ?v_1269 ?v_1270) (= tmp449 0)) (=> (and ?v_1269 ?v_1272) ?v_1271) (=> (and x105 ?v_1270) ?v_1271) (=> (and x105 ?v_1272) (= tmp449 2)) (=> (and ?v_1273 ?v_1274) (= tmp448 0)) (=> (and ?v_1273 ?v_1276) ?v_1275) (=> (and x720 ?v_1274) ?v_1275) (=> (and x720 ?v_1276) (= tmp448 2)) (=> (and ?v_1277 ?v_1278) (= tmp447 0)) (=> (and ?v_1277 ?v_1280) ?v_1279) (=> (and x10 ?v_1278) ?v_1279) (=> (and x10 ?v_1280) (= tmp447 2)) (=> (and ?v_1281 ?v_1282) (= tmp446 0)) (=> (and ?v_1281 ?v_1284) ?v_1283) (=> (and x435 ?v_1282) ?v_1283) (=> (and x435 ?v_1284) (= tmp446 2)) (=> (and ?v_1285 ?v_1286) (= tmp445 0)) (=> (and ?v_1285 ?v_1288) ?v_1287) (=> (and x291 ?v_1286) ?v_1287) (=> (and x291 ?v_1288) (= tmp445 2)) (=> (and ?v_1289 ?v_1290) (= tmp444 0)) (=> (and ?v_1289 ?v_1292) ?v_1291) (=> (and x529 ?v_1290) ?v_1291) (=> (and x529 ?v_1292) (= tmp444 2)) (=> (and ?v_1293 ?v_1294) (= tmp443 0)) (=> (and ?v_1293 ?v_1296) ?v_1295) (=> (and x199 ?v_1294) ?v_1295) (=> (and x199 ?v_1296) (= tmp443 2)) (=> (and ?v_1297 ?v_1298) (= tmp442 0)) (=> (and ?v_1297 ?v_1300) ?v_1299) (=> (and x624 ?v_1298) ?v_1299) (=> (and x624 ?v_1300) (= tmp442 2)) (=> (and ?v_1301 ?v_1302) (= tmp441 0)) (=> (and ?v_1301 ?v_1304) ?v_1303) (=> (and x104 ?v_1302) ?v_1303) (=> (and x104 ?v_1304) (= tmp441 2)) (=> (and ?v_1305 ?v_1306) (= tmp440 0)) (=> (and ?v_1305 ?v_1308) ?v_1307) (=> (and x719 ?v_1306) ?v_1307) (=> (and x719 ?v_1308) (= tmp440 2)) (=> (and ?v_1309 ?v_1310) (= tmp439 0)) (=> (and ?v_1309 ?v_1312) ?v_1311) (=> (and x9 ?v_1310) ?v_1311) (=> (and x9 ?v_1312) (= tmp439 2)) (=> (and ?v_1313 ?v_1314) (= tmp438 0)) (=> (and ?v_1313 ?v_1316) ?v_1315) (=> (and x434 ?v_1314) ?v_1315) (=> (and x434 ?v_1316) (= tmp438 2)) (=> (and ?v_1317 ?v_1318) (= tmp437 0)) (=> (and ?v_1317 ?v_1320) ?v_1319) (=> (and x290 ?v_1318) ?v_1319) (=> (and x290 ?v_1320) (= tmp437 2)) (=> (and ?v_1321 ?v_1322) (= tmp436 0)) (=> (and ?v_1321 ?v_1324) ?v_1323) (=> (and x528 ?v_1322) ?v_1323) (=> (and x528 ?v_1324) (= tmp436 2)) (=> (and ?v_1325 ?v_1326) (= tmp435 0)) (=> (and ?v_1325 ?v_1328) ?v_1327) (=> (and x198 ?v_1326) ?v_1327) (=> (and x198 ?v_1328) (= tmp435 2)) (=> (and ?v_1329 ?v_1330) (= tmp434 0)) (=> (and ?v_1329 ?v_1332) ?v_1331) (=> (and x623 ?v_1330) ?v_1331) (=> (and x623 ?v_1332) (= tmp434 2)) (=> (and ?v_1333 ?v_1334) (= tmp433 0)) (=> (and ?v_1333 ?v_1336) ?v_1335) (=> (and x103 ?v_1334) ?v_1335) (=> (and x103 ?v_1336) (= tmp433 2)) (=> (and ?v_1337 ?v_1338) (= tmp432 0)) (=> (and ?v_1337 ?v_1340) ?v_1339) (=> (and x718 ?v_1338) ?v_1339) (=> (and x718 ?v_1340) (= tmp432 2)) (=> (and ?v_1341 ?v_1342) (= tmp431 0)) (=> (and ?v_1341 ?v_1344) ?v_1343) (=> (and x8 ?v_1342) ?v_1343) (=> (and x8 ?v_1344) (= tmp431 2)) (=> (and ?v_1345 ?v_1346) (= tmp430 0)) (=> (and ?v_1345 ?v_1348) ?v_1347) (=> (and x433 ?v_1346) ?v_1347) (=> (and x433 ?v_1348) (= tmp430 2)) (=> (and ?v_1349 ?v_1350) (= tmp429 0)) (=> (and ?v_1349 ?v_1352) ?v_1351) (=> (and x289 ?v_1350) ?v_1351) (=> (and x289 ?v_1352) (= tmp429 2)) (=> (and ?v_1353 ?v_1354) (= tmp428 0)) (=> (and ?v_1353 ?v_1356) ?v_1355) (=> (and x527 ?v_1354) ?v_1355) (=> (and x527 ?v_1356) (= tmp428 2)) (=> (and ?v_1357 ?v_1358) (= tmp427 0)) (=> (and ?v_1357 ?v_1360) ?v_1359) (=> (and x197 ?v_1358) ?v_1359) (=> (and x197 ?v_1360) (= tmp427 2)) (=> (and ?v_1361 ?v_1362) (= tmp426 0)) (=> (and ?v_1361 ?v_1364) ?v_1363) (=> (and x622 ?v_1362) ?v_1363) (=> (and x622 ?v_1364) (= tmp426 2)) (=> (and ?v_1365 ?v_1366) (= tmp425 0)) (=> (and ?v_1365 ?v_1368) ?v_1367) (=> (and x102 ?v_1366) ?v_1367) (=> (and x102 ?v_1368) (= tmp425 2)) (=> (and ?v_1369 ?v_1370) (= tmp424 0)) (=> (and ?v_1369 ?v_1372) ?v_1371) (=> (and x717 ?v_1370) ?v_1371) (=> (and x717 ?v_1372) (= tmp424 2)) (=> (and ?v_1373 ?v_1374) (= tmp423 0)) (=> (and ?v_1373 ?v_1376) ?v_1375) (=> (and x7 ?v_1374) ?v_1375) (=> (and x7 ?v_1376) (= tmp423 2)) (=> (and ?v_1377 ?v_1378) (= tmp422 0)) (=> (and ?v_1377 ?v_1380) ?v_1379) (=> (and x432 ?v_1378) ?v_1379) (=> (and x432 ?v_1380) (= tmp422 2)) (=> (and ?v_1381 ?v_1382) (= tmp421 0)) (=> (and ?v_1381 ?v_1384) ?v_1383) (=> (and x288 ?v_1382) ?v_1383) (=> (and x288 ?v_1384) (= tmp421 2)) (=> (and ?v_1385 ?v_1386) (= tmp420 0)) (=> (and ?v_1385 ?v_1388) ?v_1387) (=> (and x526 ?v_1386) ?v_1387) (=> (and x526 ?v_1388) (= tmp420 2)) (=> (and ?v_1389 ?v_1390) (= tmp419 0)) (=> (and ?v_1389 ?v_1392) ?v_1391) (=> (and x196 ?v_1390) ?v_1391) (=> (and x196 ?v_1392) (= tmp419 2)) (=> (and ?v_1393 ?v_1394) (= tmp418 0)) (=> (and ?v_1393 ?v_1396) ?v_1395) (=> (and x621 ?v_1394) ?v_1395) (=> (and x621 ?v_1396) (= tmp418 2)) (=> (and ?v_1397 ?v_1398) (= tmp417 0)) (=> (and ?v_1397 ?v_1400) ?v_1399) (=> (and x101 ?v_1398) ?v_1399) (=> (and x101 ?v_1400) (= tmp417 2)) (=> (and ?v_1401 ?v_1402) (= tmp416 0)) (=> (and ?v_1401 ?v_1404) ?v_1403) (=> (and x716 ?v_1402) ?v_1403) (=> (and x716 ?v_1404) (= tmp416 2)) (=> (and ?v_1405 ?v_1406) (= tmp415 0)) (=> (and ?v_1405 ?v_1408) ?v_1407) (=> (and x6 ?v_1406) ?v_1407) (=> (and x6 ?v_1408) (= tmp415 2)) (=> (and ?v_1409 ?v_1410) (= tmp414 0)) (=> (and ?v_1409 ?v_1412) ?v_1411) (=> (and x431 ?v_1410) ?v_1411) (=> (and x431 ?v_1412) (= tmp414 2)) (=> (and ?v_1413 ?v_1414) (= tmp413 0)) (=> (and ?v_1413 ?v_1416) ?v_1415) (=> (and x287 ?v_1414) ?v_1415) (=> (and x287 ?v_1416) (= tmp413 2)) (=> (and ?v_1417 ?v_1418) (= tmp412 0)) (=> (and ?v_1417 ?v_1420) ?v_1419) (=> (and x525 ?v_1418) ?v_1419) (=> (and x525 ?v_1420) (= tmp412 2)) (=> (and ?v_1421 ?v_1422) (= tmp411 0)) (=> (and ?v_1421 ?v_1424) ?v_1423) (=> (and x195 ?v_1422) ?v_1423) (=> (and x195 ?v_1424) (= tmp411 2)) (=> (and ?v_1425 ?v_1426) (= tmp410 0)) (=> (and ?v_1425 ?v_1428) ?v_1427) (=> (and x620 ?v_1426) ?v_1427) (=> (and x620 ?v_1428) (= tmp410 2)) (=> (and ?v_1429 ?v_1430) (= tmp409 0)) (=> (and ?v_1429 ?v_1432) ?v_1431) (=> (and x100 ?v_1430) ?v_1431) (=> (and x100 ?v_1432) (= tmp409 2)) (=> (and ?v_1433 ?v_1434) (= tmp408 0)) (=> (and ?v_1433 ?v_1436) ?v_1435) (=> (and x715 ?v_1434) ?v_1435) (=> (and x715 ?v_1436) (= tmp408 2)) (=> (and ?v_1437 ?v_1438) (= tmp407 0)) (=> (and ?v_1437 ?v_1440) ?v_1439) (=> (and x5 ?v_1438) ?v_1439) (=> (and x5 ?v_1440) (= tmp407 2)) (=> (and ?v_1441 ?v_1442) (= tmp406 0)) (=> (and ?v_1441 ?v_1444) ?v_1443) (=> (and x430 ?v_1442) ?v_1443) (=> (and x430 ?v_1444) (= tmp406 2)) (=> (and ?v_1445 ?v_1446) (= tmp405 0)) (=> (and ?v_1445 ?v_1448) ?v_1447) (=> (and x286 ?v_1446) ?v_1447) (=> (and x286 ?v_1448) (= tmp405 2)) (=> (and ?v_1449 ?v_1450) (= tmp404 0)) (=> (and ?v_1449 ?v_1452) ?v_1451) (=> (and x524 ?v_1450) ?v_1451) (=> (and x524 ?v_1452) (= tmp404 2)) (=> (and ?v_1453 ?v_1454) (= tmp403 0)) (=> (and ?v_1453 ?v_1456) ?v_1455) (=> (and x194 ?v_1454) ?v_1455) (=> (and x194 ?v_1456) (= tmp403 2)) (=> (and ?v_1457 ?v_1458) (= tmp402 0)) (=> (and ?v_1457 ?v_1460) ?v_1459) (=> (and x619 ?v_1458) ?v_1459) (=> (and x619 ?v_1460) (= tmp402 2)) (=> (and ?v_1461 ?v_1462) (= tmp401 0)) (=> (and ?v_1461 ?v_1464) ?v_1463) (=> (and x99 ?v_1462) ?v_1463) (=> (and x99 ?v_1464) (= tmp401 2)) (=> (and ?v_1465 ?v_1466) (= tmp400 0)) (=> (and ?v_1465 ?v_1468) ?v_1467) (=> (and x714 ?v_1466) ?v_1467) (=> (and x714 ?v_1468) (= tmp400 2)) (=> (and ?v_1469 ?v_1470) (= tmp399 0)) (=> (and ?v_1469 ?v_1472) ?v_1471) (=> (and x4 ?v_1470) ?v_1471) (=> (and x4 ?v_1472) (= tmp399 2)) (=> (and ?v_1473 ?v_1474) (= tmp398 0)) (=> (and ?v_1473 ?v_1476) ?v_1475) (=> (and x429 ?v_1474) ?v_1475) (=> (and x429 ?v_1476) (= tmp398 2)) (=> (and ?v_1477 ?v_1478) (= tmp397 0)) (=> (and ?v_1477 ?v_1480) ?v_1479) (=> (and x285 ?v_1478) ?v_1479) (=> (and x285 ?v_1480) (= tmp397 2)) (=> (and ?v_1481 ?v_1482) (= tmp396 0)) (=> (and ?v_1481 ?v_1484) ?v_1483) (=> (and x523 ?v_1482) ?v_1483) (=> (and x523 ?v_1484) (= tmp396 2)) (=> (and ?v_1485 ?v_1486) (= tmp395 0)) (=> (and ?v_1485 ?v_1488) ?v_1487) (=> (and x193 ?v_1486) ?v_1487) (=> (and x193 ?v_1488) (= tmp395 2)) (=> (and ?v_1489 ?v_1490) (= tmp394 0)) (=> (and ?v_1489 ?v_1492) ?v_1491) (=> (and x618 ?v_1490) ?v_1491) (=> (and x618 ?v_1492) (= tmp394 2)) (=> (and ?v_1493 ?v_1494) (= tmp393 0)) (=> (and ?v_1493 ?v_1496) ?v_1495) (=> (and x98 ?v_1494) ?v_1495) (=> (and x98 ?v_1496) (= tmp393 2)) (=> (and ?v_1497 ?v_1498) (= tmp392 0)) (=> (and ?v_1497 ?v_1500) ?v_1499) (=> (and x713 ?v_1498) ?v_1499) (=> (and x713 ?v_1500) (= tmp392 2)) (=> (and ?v_1501 ?v_1502) (= tmp391 0)) (=> (and ?v_1501 ?v_1504) ?v_1503) (=> (and x3 ?v_1502) ?v_1503) (=> (and x3 ?v_1504) (= tmp391 2)) (=> (and ?v_1505 ?v_1506) (= tmp390 0)) (=> (and ?v_1505 ?v_1508) ?v_1507) (=> (and x428 ?v_1506) ?v_1507) (=> (and x428 ?v_1508) (= tmp390 2)) (=> (and ?v_1509 ?v_1510) (= tmp389 0)) (=> (and ?v_1509 ?v_1512) ?v_1511) (=> (and x284 ?v_1510) ?v_1511) (=> (and x284 ?v_1512) (= tmp389 2)) (=> (and ?v_1513 ?v_1514) (= tmp388 0)) (=> (and ?v_1513 ?v_1516) ?v_1515) (=> (and x570 ?v_1514) ?v_1515) (=> (and x570 ?v_1516) (= tmp388 2)) (=> (and ?v_1517 ?v_1518) (= tmp387 0)) (=> (and ?v_1517 ?v_1520) ?v_1519) (=> (and x192 ?v_1518) ?v_1519) (=> (and x192 ?v_1520) (= tmp387 2)) (=> (and ?v_1521 ?v_1522) (= tmp386 0)) (=> (and ?v_1521 ?v_1524) ?v_1523) (=> (and x665 ?v_1522) ?v_1523) (=> (and x665 ?v_1524) (= tmp386 2)) (=> (and ?v_1525 ?v_1526) (= tmp385 0)) (=> (and ?v_1525 ?v_1528) ?v_1527) (=> (and x97 ?v_1526) ?v_1527) (=> (and x97 ?v_1528) (= tmp385 2)) (=> (and ?v_1529 ?v_1530) (= tmp384 0)) (=> (and ?v_1529 ?v_1532) ?v_1531) (=> (and x760 ?v_1530) ?v_1531) (=> (and x760 ?v_1532) (= tmp384 2)) (=> (and ?v_1533 ?v_1534) (= tmp383 0)) (=> (and ?v_1533 ?v_1536) ?v_1535) (=> (and x2 ?v_1534) ?v_1535) (=> (and x2 ?v_1536) (= tmp383 2)) (=> (and ?v_729 ?v_1537) (= tmp382 0)) (=> (and ?v_729 ?v_1539) ?v_1538) (=> (and x737 ?v_1537) ?v_1538) (=> (and x737 ?v_1539) (= tmp382 12)) (=> (and ?v_817 ?v_1540) (= tmp381 0)) (=> (and ?v_817 ?v_1542) ?v_1541) (=> (and x734 ?v_1540) ?v_1541) (=> (and x734 ?v_1542) (= tmp381 8)) (=> (and ?v_1543 ?v_1544) (= tmp380 0)) (=> (and ?v_1543 ?v_1546) ?v_1545) (=> (and x739 ?v_1544) ?v_1545) (=> (and x739 ?v_1546) (= tmp380 12)) (=> (and ?v_889 ?v_1547) (= tmp379 0)) (=> (and ?v_889 ?v_1549) ?v_1548) (=> (and x732 ?v_1547) ?v_1548) (=> (and x732 ?v_1549) (= tmp379 12)) (=> (and ?v_601 ?v_1550) (= tmp378 0)) (=> (and ?v_601 ?v_1551) (= tmp378 6)) (=> (and x741 ?v_1550) (= tmp378 8)) (=> (and x741 ?v_1551) (= tmp378 14)) (=> (and ?v_953 ?v_1552) (= tmp377 0)) (=> (and ?v_953 ?v_1554) ?v_1553) (=> (and x730 ?v_1552) ?v_1553) (=> (and x730 ?v_1554) (= tmp377 16)) (=> (and ?v_537 ?v_1555) (= tmp376 0)) (=> (and ?v_537 ?v_1557) ?v_1556) (=> (and x743 ?v_1555) ?v_1556) (=> (and x743 ?v_1557) (= tmp376 16)) (=> (and ?v_1558 ?v_1559) (= tmp375 0)) (=> (and ?v_1558 ?v_1561) ?v_1560) (=> (and x728 ?v_1559) ?v_1560) (=> (and x728 ?v_1561) (= tmp375 16)) (=> (and ?v_473 ?v_1562) (= tmp374 0)) (=> (and ?v_473 ?v_1564) ?v_1563) (=> (and x745 ?v_1562) ?v_1563) (=> (and x745 ?v_1564) (= tmp374 16)) (=> (and ?v_1081 ?v_1565) (= tmp373 0)) (=> (and ?v_1081 ?v_1567) ?v_1566) (=> (and x726 ?v_1565) ?v_1566) (=> (and x726 ?v_1567) (= tmp373 16)) (=> (and ?v_409 ?v_1568) (= tmp372 0)) (=> (and ?v_409 ?v_1570) ?v_1569) (=> (and x747 ?v_1568) ?v_1569) (=> (and x747 ?v_1570) (= tmp372 16)) (=> (and ?v_1571 ?v_1572) (= tmp371 0)) (=> (and ?v_1571 ?v_1574) ?v_1573) (=> (and x724 ?v_1572) ?v_1573) (=> (and x724 ?v_1574) (= tmp371 16)) (=> (and ?v_345 ?v_1575) (= tmp370 0)) (=> (and ?v_345 ?v_1577) ?v_1576) (=> (and x749 ?v_1575) ?v_1576) (=> (and x749 ?v_1577) (= tmp370 12)) (=> (and ?v_1578 ?v_1178) (= tmp369 0)) (=> (and ?v_1578 ?v_1180) ?v_1579) (=> (and x722 ?v_1178) ?v_1579) (=> (and x722 ?v_1180) (= tmp369 16)) (=> (and ?v_281 ?v_1580) (= tmp368 0)) (=> (and ?v_281 ?v_1581) (= tmp368 2)) (=> (and x751 ?v_1580) (= tmp368 6)) (=> (and x751 ?v_1581) (= tmp368 8)) (=> (and ?v_1273 ?v_1242) (= tmp367 0)) (=> (and ?v_1273 ?v_1244) ?v_1582) (=> (and x720 ?v_1242) ?v_1582) (=> (and x720 ?v_1244) (= tmp367 16)) (=> (and ?v_217 ?v_250) (= tmp366 0)) (=> (and ?v_217 ?v_252) ?v_1583) (=> (and x753 ?v_250) ?v_1583) (=> (and x753 ?v_252) (= tmp366 16)) (=> (and ?v_1337 ?v_1584) (= tmp365 0)) (=> (and ?v_1337 ?v_1585) (= tmp365 8)) (=> (and x718 ?v_1584) (= tmp365 6)) (=> (and x718 ?v_1585) (= tmp365 14)) (=> (and ?v_153 ?v_1586) (= tmp364 0)) (=> (and ?v_153 ?v_1588) ?v_1587) (=> (and x755 ?v_1586) ?v_1587) (=> (and x755 ?v_1588) (= tmp364 16)) (=> (and ?v_1401 ?v_1589) (= tmp363 0)) (=> (and ?v_1401 ?v_1590) (= tmp363 4)) (=> (and x716 ?v_1589) (= tmp363 6)) (=> (and x716 ?v_1590) (= tmp363 10)) (=> (and ?v_89 ?v_1591) (= tmp362 0)) (=> (and ?v_89 ?v_1593) ?v_1592) (=> (and x757 ?v_1591) ?v_1592) (=> (and x757 ?v_1593) (= tmp362 16)) (=> (and ?v_1465 ?v_1594) (= tmp361 0)) (=> (and ?v_1465 ?v_1596) ?v_1595) (=> (and x714 ?v_1594) ?v_1595) (=> (and x714 ?v_1596) (= tmp361 16)) (=> (and ?v_25 ?v_1597) (= tmp360 0)) (=> (and ?v_25 ?v_1598) (= tmp360 6)) (=> (and x759 ?v_1597) (= tmp360 8)) (=> (and x759 ?v_1598) (= tmp360 14)) (=> (and ?v_1599 ?v_1600) (= tmp359 0)) (=> (and ?v_1599 ?v_1602) ?v_1601) (=> (and x712 ?v_1600) ?v_1601) (=> (and x712 ?v_1602) (= tmp359 16)) (=> ?v_730 (= tmp358 0)) (=> ?v_732 (= tmp358 4)) (=> (and ?v_1603 ?v_762) (= tmp357 0)) (=> (and ?v_1603 ?v_764) (= tmp357 4)) (=> (and x687 ?v_762) (= tmp357 2)) (=> (and x687 ?v_764) (= tmp357 6)) (=> (and ?v_657 ?v_698) (= tmp356 0)) (=> (and ?v_657 ?v_700) ?v_1604) (=> (and x691 ?v_698) ?v_1604) (=> (and x691 ?v_700) (= tmp356 4)) (=> (and ?v_1605 ?v_858) (= tmp355 0)) (=> (and ?v_1605 ?v_860) (= tmp355 4)) (=> (and x685 ?v_858) (= tmp355 6)) (=> (and x685 ?v_860) (= tmp355 10)) (=> (and ?v_1606 ?v_634) (= tmp354 0)) (=> (and ?v_1606 ?v_636) ?v_1607) (=> (and x693 ?v_634) ?v_1607) (=> (and x693 ?v_636) (= tmp354 8)) (=> (and ?v_1608 ?v_922) (= tmp353 0)) (=> (and ?v_1608 ?v_924) (= tmp353 6)) (=> (and x683 ?v_922) (= tmp353 8)) (=> (and x683 ?v_924) (= tmp353 14)) (=> (and ?v_1609 ?v_570) (= tmp352 0)) (=> (and ?v_1609 ?v_572) ?v_1610) (=> (and x695 ?v_570) ?v_1610) (=> (and x695 ?v_572) (= tmp352 8)) (=> (and ?v_1009 ?v_986) (= tmp351 0)) (=> (and ?v_1009 ?v_988) (= tmp351 8)) (=> (and x681 ?v_986) (= tmp351 6)) (=> (and x681 ?v_988) (= tmp351 14)) (=> (and ?v_1611 ?v_506) (= tmp350 0)) (=> (and ?v_1611 ?v_508) ?v_1612) (=> (and x697 ?v_506) ?v_1612) (=> (and x697 ?v_508) (= tmp350 4)) (=> (and ?v_1613 ?v_1050) (= tmp349 0)) (=> (and ?v_1613 ?v_1052) ?v_1614) (=> (and x679 ?v_1050) ?v_1614) (=> (and x679 ?v_1052) (= tmp349 12)) (=> (and ?v_1615 ?v_442) (= tmp348 0)) (=> (and ?v_1615 ?v_444) (= tmp348 4)) (=> (and x699 ?v_442) (= tmp348 6)) (=> (and x699 ?v_444) (= tmp348 10)) (=> (and ?v_1137 ?v_1114) (= tmp347 0)) (=> (and ?v_1137 ?v_1116) (= tmp347 6)) (=> (and x677 ?v_1114) (= tmp347 8)) (=> (and x677 ?v_1116) (= tmp347 14)) (=> (and ?v_1616 ?v_378) (= tmp346 0)) (=> (and ?v_1616 ?v_380) (= tmp346 6)) (=> (and x701 ?v_378) (= tmp346 8)) (=> (and x701 ?v_380) (= tmp346 14)) (=> (and ?v_1201 ?v_1617) (= tmp345 0)) (=> (and ?v_1201 ?v_1619) ?v_1618) (=> (and x675 ?v_1617) ?v_1618) (=> (and x675 ?v_1619) (= tmp345 16)) (=> (and ?v_1620 ?v_314) (= tmp344 0)) (=> (and ?v_1620 ?v_316) ?v_1621) (=> (and x703 ?v_314) ?v_1621) (=> (and x703 ?v_316) (= tmp344 12)) (=> (and ?v_1622 ?v_1623) (= tmp343 0)) (=> (and ?v_1622 ?v_1625) ?v_1624) (=> (and x673 ?v_1623) ?v_1624) (=> (and x673 ?v_1625) (= tmp343 16)) (=> (and ?v_1626 ?v_1627) (= tmp342 0)) (=> (and ?v_1626 ?v_1628) (= tmp342 4)) (=> (and x705 ?v_1627) (= tmp342 2)) (=> (and x705 ?v_1628) (= tmp342 6)) (=> (and ?v_1629 ?v_1306) (= tmp341 0)) (=> (and ?v_1629 ?v_1308) ?v_1630) (=> (and x671 ?v_1306) ?v_1630) (=> (and x671 ?v_1308) (= tmp341 16)) (=> (and ?v_1631 ?v_186) (= tmp340 0)) (=> (and ?v_1631 ?v_188) (= tmp340 2)) (=> (and x707 ?v_186) (= tmp340 4)) (=> (and x707 ?v_188) (= tmp340 6)) (=> (and ?v_1632 ?v_1370) (= tmp339 0)) (=> (and ?v_1632 ?v_1372) ?v_1633) (=> (and x669 ?v_1370) ?v_1633) (=> (and x669 ?v_1372) (= tmp339 16)) (=> (and ?v_1634 ?v_122) (= tmp338 0)) (=> (and ?v_1634 ?v_124) ?v_1635) (=> (and x709 ?v_122) ?v_1635) (=> (and x709 ?v_124) (= tmp338 12)) (=> (and ?v_1636 ?v_1434) (= tmp337 0)) (=> (and ?v_1636 ?v_1436) ?v_1637) (=> (and x667 ?v_1434) ?v_1637) (=> (and x667 ?v_1436) (= tmp337 16)) (=> (and ?v_1638 ?v_58) (= tmp336 0)) (=> (and ?v_1638 ?v_60) ?v_1639) (=> (and x711 ?v_58) ?v_1639) (=> (and x711 ?v_60) (= tmp336 12)) (=> (and ?v_1521 ?v_1498) (= tmp335 0)) (=> (and ?v_1521 ?v_1500) ?v_1640) (=> (and x665 ?v_1498) ?v_1640) (=> (and x665 ?v_1500) (= tmp335 16)) (=> (and ?v_721 ?v_1641) (= tmp334 0)) (=> (and ?v_721 ?v_1642) (= tmp334 6)) (=> (and x642 ?v_1641) (= tmp334 8)) (=> (and x642 ?v_1642) (= tmp334 14)) (=> (and ?v_1643 ?v_1644) (= tmp333 0)) (=> (and ?v_1643 ?v_1646) ?v_1645) (=> (and x639 ?v_1644) ?v_1645) (=> (and x639 ?v_1646) (= tmp333 12)) (=> (and ?v_1647 ?v_1648) (= tmp332 0)) (=> (and ?v_1647 ?v_1650) ?v_1649) (=> (and x644 ?v_1648) ?v_1649) (=> (and x644 ?v_1650) (= tmp332 16)) (=> (and ?v_881 ?v_1651) (= tmp331 0)) (=> (and ?v_881 ?v_1653) ?v_1652) (=> (and x637 ?v_1651) ?v_1652) (=> (and x637 ?v_1653) (= tmp331 12)) (=> (and ?v_593 ?v_1654) (= tmp330 0)) (=> (and ?v_593 ?v_1656) ?v_1655) (=> (and x646 ?v_1654) ?v_1655) (=> (and x646 ?v_1656) (= tmp330 16)) (=> (and ?v_945 ?v_1657) (= tmp329 0)) (=> (and ?v_945 ?v_1658) (= tmp329 6)) (=> (and x635 ?v_1657) (= tmp329 8)) (=> (and x635 ?v_1658) (= tmp329 14)) (=> (and ?v_529 ?v_1659) (= tmp328 0)) (=> (and ?v_529 ?v_1660) (= tmp328 8)) (=> (and x648 ?v_1659) (= tmp328 6)) (=> (and x648 ?v_1660) (= tmp328 14)) (=> (and ?v_1661 ?v_1662) (= tmp327 0)) (=> (and ?v_1661 ?v_1664) ?v_1663) (=> (and x633 ?v_1662) ?v_1663) (=> (and x633 ?v_1664) (= tmp327 16)) (=> (and ?v_465 ?v_1665) (= tmp326 0)) (=> (and ?v_465 ?v_1667) ?v_1666) (=> (and x650 ?v_1665) ?v_1666) (=> (and x650 ?v_1667) (= tmp326 12)) (=> (and ?v_1073 ?v_1668) (= tmp325 0)) (=> (and ?v_1073 ?v_1670) ?v_1669) (=> (and x631 ?v_1668) ?v_1669) (=> (and x631 ?v_1670) (= tmp325 12)) (=> (and ?v_401 ?v_1671) (= tmp324 0)) (=> (and ?v_401 ?v_1672) (= tmp324 6)) (=> (and x652 ?v_1671) (= tmp324 2)) (=> (and x652 ?v_1672) (= tmp324 8)) (=> (and ?v_1673 ?v_1674) (= tmp323 0)) (=> (and ?v_1673 ?v_1675) (= tmp323 2)) (=> (and x629 ?v_1674) (= tmp323 4)) (=> (and x629 ?v_1675) (= tmp323 6)) (=> (and ?v_337 ?v_1676) (= tmp322 0)) (=> (and ?v_337 ?v_1678) ?v_1677) (=> (and x654 ?v_1676) ?v_1677) (=> (and x654 ?v_1678) (= tmp322 8)) (=> (and ?v_1679 ?v_1170) (= tmp321 0)) (=> (and ?v_1679 ?v_1172) ?v_1680) (=> (and x627 ?v_1170) ?v_1680) (=> (and x627 ?v_1172) (= tmp321 8)) (=> (and ?v_273 ?v_1681) (= tmp320 0)) (=> (and ?v_273 ?v_1682) (= tmp320 4)) (=> (and x656 ?v_1681) (= tmp320 2)) (=> (and x656 ?v_1682) (= tmp320 6)) (=> (and ?v_1265 ?v_1234) (= tmp319 0)) (=> (and ?v_1265 ?v_1236) (= tmp319 4)) (=> (and x625 ?v_1234) (= tmp319 6)) (=> (and x625 ?v_1236) (= tmp319 10)) (=> (and ?v_209 ?v_242) (= tmp318 0)) (=> (and ?v_209 ?v_244) (= tmp318 4)) (=> (and x658 ?v_242) (= tmp318 6)) (=> (and x658 ?v_244) (= tmp318 10)) (=> (and ?v_1329 ?v_1683) (= tmp317 0)) (=> (and ?v_1329 ?v_1684) (= tmp317 6)) (=> (and x623 ?v_1683) (= tmp317 8)) (=> (and x623 ?v_1684) (= tmp317 14)) (=> (and ?v_145 ?v_1685) (= tmp316 0)) (=> (and ?v_145 ?v_1686) (= tmp316 8)) (=> (and x660 ?v_1685) (= tmp316 6)) (=> (and x660 ?v_1686) (= tmp316 14)) (=> (and ?v_1393 ?v_1687) (= tmp315 0)) (=> (and ?v_1393 ?v_1689) ?v_1688) (=> (and x621 ?v_1687) ?v_1688) (=> (and x621 ?v_1689) (= tmp315 12)) (=> (and ?v_81 ?v_1690) (= tmp314 0)) (=> (and ?v_81 ?v_1692) ?v_1691) (=> (and x662 ?v_1690) ?v_1691) (=> (and x662 ?v_1692) (= tmp314 12)) (=> (and ?v_1457 ?v_1693) (= tmp313 0)) (=> (and ?v_1457 ?v_1694) (= tmp313 6)) (=> (and x619 ?v_1693) (= tmp313 8)) (=> (and x619 ?v_1694) (= tmp313 14)) (=> (and ?v_17 ?v_1695) (= tmp312 0)) (=> (and ?v_17 ?v_1697) ?v_1696) (=> (and x664 ?v_1695) ?v_1696) (=> (and x664 ?v_1697) (= tmp312 12)) (=> (and ?v_1698 ?v_1699) (= tmp311 0)) (=> (and ?v_1698 ?v_1701) ?v_1700) (=> (and x617 ?v_1699) ?v_1700) (=> (and x617 ?v_1701) (= tmp311 16)) (=> ?v_754 (= tmp310 0)) (=> ?v_756 (= tmp310 1)) (=> (and ?v_809 ?v_786) (= tmp309 0)) (=> (and ?v_809 ?v_788) (= tmp309 2)) (=> (and x592 ?v_786) (= tmp309 4)) (=> (and x592 ?v_788) (= tmp309 6)) (=> (and ?v_1702 ?v_722) (= tmp308 0)) (=> (and ?v_1702 ?v_724) (= tmp308 1)) (=> (and x596 ?v_722) (= tmp308 4)) (=> (and x596 ?v_724) (= tmp308 5)) (=> (and ?v_1703 ?v_850) (= tmp307 0)) (=> (and ?v_1703 ?v_852) ?v_1704) (=> (and x590 ?v_850) ?v_1704) (=> (and x590 ?v_852) (= tmp307 8)) (=> (and ?v_1705 ?v_1706) (= tmp306 0)) (=> (and ?v_1705 ?v_1708) ?v_1707) (=> (and x598 ?v_1706) ?v_1707) (=> (and x598 ?v_1708) (= tmp306 8)) (=> (and ?v_1709 ?v_914) (= tmp305 0)) (=> (and ?v_1709 ?v_916) (= tmp305 2)) (=> (and x588 ?v_914) (= tmp305 4)) (=> (and x588 ?v_916) (= tmp305 6)) (=> (and ?v_1710 ?v_594) (= tmp304 0)) (=> (and ?v_1710 ?v_596) ?v_1711) (=> (and x600 ?v_594) ?v_1711) (=> (and x600 ?v_596) (= tmp304 8)) (=> (and ?v_1001 ?v_978) (= tmp303 0)) (=> (and ?v_1001 ?v_980) ?v_1712) (=> (and x586 ?v_978) ?v_1712) (=> (and x586 ?v_980) (= tmp303 12)) (=> (and ?v_1713 ?v_530) (= tmp302 0)) (=> (and ?v_1713 ?v_532) ?v_1714) (=> (and x602 ?v_530) ?v_1714) (=> (and x602 ?v_532) (= tmp302 12)) (=> (and ?v_1715 ?v_1042) (= tmp301 0)) (=> (and ?v_1715 ?v_1044) (= tmp301 6)) (=> (and x584 ?v_1042) (= tmp301 8)) (=> (and x584 ?v_1044) (= tmp301 14)) (=> (and ?v_1716 ?v_466) (= tmp300 0)) (=> (and ?v_1716 ?v_468) ?v_1717) (=> (and x604 ?v_466) ?v_1717) (=> (and x604 ?v_468) (= tmp300 12)) (=> (and ?v_1129 ?v_1106) (= tmp299 0)) (=> (and ?v_1129 ?v_1108) ?v_1718) (=> (and x582 ?v_1106) ?v_1718) (=> (and x582 ?v_1108) (= tmp299 16)) (=> (and ?v_1719 ?v_402) (= tmp298 0)) (=> (and ?v_1719 ?v_404) ?v_1720) (=> (and x606 ?v_402) ?v_1720) (=> (and x606 ?v_404) (= tmp298 12)) (=> (and ?v_1193 ?v_1721) (= tmp297 0)) (=> (and ?v_1193 ?v_1723) ?v_1722) (=> (and x580 ?v_1721) ?v_1722) (=> (and x580 ?v_1723) (= tmp297 12)) (=> (and ?v_1724 ?v_338) (= tmp296 0)) (=> (and ?v_1724 ?v_340) (= tmp296 6)) (=> (and x608 ?v_338) (= tmp296 4)) (=> (and x608 ?v_340) (= tmp296 10)) (=> (and ?v_1725 ?v_1726) (= tmp295 0)) (=> (and ?v_1725 ?v_1728) ?v_1727) (=> (and x578 ?v_1726) ?v_1727) (=> (and x578 ?v_1728) (= tmp295 12)) (=> (and ?v_1729 ?v_274) (= tmp294 0)) (=> (and ?v_1729 ?v_276) ?v_1730) (=> (and x610 ?v_274) ?v_1730) (=> (and x610 ?v_276) (= tmp294 4)) (=> (and ?v_1731 ?v_1298) (= tmp293 0)) (=> (and ?v_1731 ?v_1300) ?v_1732) (=> (and x576 ?v_1298) ?v_1732) (=> (and x576 ?v_1300) (= tmp293 12)) (=> (and ?v_1733 ?v_178) (= tmp292 0)) (=> (and ?v_1733 ?v_180) ?v_1734) (=> (and x612 ?v_178) ?v_1734) (=> (and x612 ?v_180) (= tmp292 8)) (=> (and ?v_1735 ?v_1362) (= tmp291 0)) (=> (and ?v_1735 ?v_1364) ?v_1736) (=> (and x574 ?v_1362) ?v_1736) (=> (and x574 ?v_1364) (= tmp291 12)) (=> (and ?v_1737 ?v_114) (= tmp290 0)) (=> (and ?v_1737 ?v_116) ?v_1738) (=> (and x614 ?v_114) ?v_1738) (=> (and x614 ?v_116) (= tmp290 8)) (=> (and ?v_1739 ?v_1426) (= tmp289 0)) (=> (and ?v_1739 ?v_1428) ?v_1740) (=> (and x572 ?v_1426) ?v_1740) (=> (and x572 ?v_1428) (= tmp289 8)) (=> (and ?v_1741 ?v_50) (= tmp288 0)) (=> (and ?v_1741 ?v_52) ?v_1742) (=> (and x616 ?v_50) ?v_1742) (=> (and x616 ?v_52) (= tmp288 8)) (=> (and ?v_1513 ?v_1490) (= tmp287 0)) (=> (and ?v_1513 ?v_1492) ?v_1743) (=> (and x570 ?v_1490) ?v_1743) (=> (and x570 ?v_1492) (= tmp287 12)) (=> (and ?v_713 ?v_1744) (= tmp286 0)) (=> (and ?v_713 ?v_1746) ?v_1745) (=> (and x547 ?v_1744) ?v_1745) (=> (and x547 ?v_1746) (= tmp286 12)) (=> (and ?v_1747 ?v_1748) (= tmp285 0)) (=> (and ?v_1747 ?v_1749) (= tmp285 6)) (=> (and x544 ?v_1748) (= tmp285 4)) (=> (and x544 ?v_1749) (= tmp285 10)) (=> (and ?v_1750 ?v_1751) (= tmp284 0)) (=> (and ?v_1750 ?v_1753) ?v_1752) (=> (and x549 ?v_1751) ?v_1752) (=> (and x549 ?v_1753) (= tmp284 12)) (=> (and ?v_873 ?v_1754) (= tmp283 0)) (=> (and ?v_873 ?v_1756) ?v_1755) (=> (and x542 ?v_1754) ?v_1755) (=> (and x542 ?v_1756) (= tmp283 8)) (=> (and ?v_585 ?v_1757) (= tmp282 0)) (=> (and ?v_585 ?v_1759) ?v_1758) (=> (and x551 ?v_1757) ?v_1758) (=> (and x551 ?v_1759) (= tmp282 12)) (=> (and ?v_937 ?v_1760) (= tmp281 0)) (=> (and ?v_937 ?v_1762) ?v_1761) (=> (and x540 ?v_1760) ?v_1761) (=> (and x540 ?v_1762) (= tmp281 4)) (=> (and ?v_521 ?v_1763) (= tmp280 0)) (=> (and ?v_521 ?v_1765) ?v_1764) (=> (and x553 ?v_1763) ?v_1764) (=> (and x553 ?v_1765) (= tmp280 16)) (=> (and ?v_1766 ?v_1767) (= tmp279 0)) (=> (and ?v_1766 ?v_1769) ?v_1768) (=> (and x538 ?v_1767) ?v_1768) (=> (and x538 ?v_1769) (= tmp279 4)) (=> (and ?v_457 ?v_1770) (= tmp278 0)) (=> (and ?v_457 ?v_1771) (= tmp278 8)) (=> (and x555 ?v_1770) (= tmp278 6)) (=> (and x555 ?v_1771) (= tmp278 14)) (=> (and ?v_1065 ?v_1772) (= tmp277 0)) (=> (and ?v_1065 ?v_1774) ?v_1773) (=> (and x536 ?v_1772) ?v_1773) (=> (and x536 ?v_1774) (= tmp277 4)) (=> (and ?v_393 ?v_1775) (= tmp276 0)) (=> (and ?v_393 ?v_1777) ?v_1776) (=> (and x557 ?v_1775) ?v_1776) (=> (and x557 ?v_1777) (= tmp276 12)) (=> (and ?v_1778 ?v_1779) (= tmp275 0)) (=> (and ?v_1778 ?v_1781) ?v_1780) (=> (and x534 ?v_1779) ?v_1780) (=> (and x534 ?v_1781) (= tmp275 4)) (=> (and ?v_329 ?v_1782) (= tmp274 0)) (=> (and ?v_329 ?v_1784) ?v_1783) (=> (and x559 ?v_1782) ?v_1783) (=> (and x559 ?v_1784) (= tmp274 12)) (=> (and ?v_1785 ?v_1162) (= tmp273 0)) (=> (and ?v_1785 ?v_1164) ?v_1786) (=> (and x532 ?v_1162) ?v_1786) (=> (and x532 ?v_1164) (= tmp273 8)) (=> (and ?v_265 ?v_1787) (= tmp272 0)) (=> (and ?v_265 ?v_1789) ?v_1788) (=> (and x561 ?v_1787) ?v_1788) (=> (and x561 ?v_1789) (= tmp272 12)) (=> (and ?v_1257 ?v_1226) (= tmp271 0)) (=> (and ?v_1257 ?v_1228) ?v_1790) (=> (and x530 ?v_1226) ?v_1790) (=> (and x530 ?v_1228) (= tmp271 12)) (=> (and ?v_201 ?v_1791) (= tmp270 0)) (=> (and ?v_201 ?v_1793) ?v_1792) (=> (and x563 ?v_1791) ?v_1792) (=> (and x563 ?v_1793) (= tmp270 16)) (=> (and ?v_1321 ?v_1794) (= tmp269 0)) (=> (and ?v_1321 ?v_1795) (= tmp269 6)) (=> (and x528 ?v_1794) (= tmp269 8)) (=> (and x528 ?v_1795) (= tmp269 14)) (=> (and ?v_137 ?v_1796) (= tmp268 0)) (=> (and ?v_137 ?v_1798) ?v_1797) (=> (and x565 ?v_1796) ?v_1797) (=> (and x565 ?v_1798) (= tmp268 12)) (=> (and ?v_1385 ?v_1799) (= tmp267 0)) (=> (and ?v_1385 ?v_1801) ?v_1800) (=> (and x526 ?v_1799) ?v_1800) (=> (and x526 ?v_1801) (= tmp267 16)) (=> (and ?v_73 ?v_1802) (= tmp266 0)) (=> (and ?v_73 ?v_1804) ?v_1803) (=> (and x567 ?v_1802) ?v_1803) (=> (and x567 ?v_1804) (= tmp266 12)) (=> (and ?v_1449 ?v_1805) (= tmp265 0)) (=> (and ?v_1449 ?v_1807) ?v_1806) (=> (and x524 ?v_1805) ?v_1806) (=> (and x524 ?v_1807) (= tmp265 16)) (=> (and ?v_9 ?v_1808) (= tmp264 0)) (=> (and ?v_9 ?v_1809) (= tmp264 4)) (=> (and x569 ?v_1808) (= tmp264 6)) (=> (and x569 ?v_1809) (= tmp264 10)) (=> (and ?v_1810 ?v_1811) (= tmp263 0)) (=> (and ?v_1810 ?v_1813) ?v_1812) (=> (and x522 ?v_1811) ?v_1812) (=> (and x522 ?v_1813) (= tmp263 12)) (=> ?v_714 (= tmp262 0)) (=> ?v_716 (= tmp262 2)) (=> (and ?v_1814 ?v_746) (= tmp261 0)) (=> (and ?v_1814 ?v_748) (= tmp261 2)) (=> (and x497 ?v_746) (= tmp261 4)) (=> (and x497 ?v_748) (= tmp261 6)) (=> (and ?v_641 ?v_682) (= tmp260 0)) (=> (and ?v_641 ?v_684) ?v_1815) (=> (and x501 ?v_682) ?v_1815) (=> (and x501 ?v_684) (= tmp260 8)) (=> (and ?v_1816 ?v_1817) (= tmp259 0)) (=> (and ?v_1816 ?v_1818) (= tmp259 4)) (=> (and x495 ?v_1817) (= tmp259 2)) (=> (and x495 ?v_1818) (= tmp259 6)) (=> (and ?v_1819 ?v_618) (= tmp258 0)) (=> (and ?v_1819 ?v_620) ?v_1820) (=> (and x503 ?v_618) ?v_1820) (=> (and x503 ?v_620) (= tmp258 8)) (=> (and ?v_1821 ?v_874) (= tmp257 0)) (=> (and ?v_1821 ?v_876) (= tmp257 2)) (=> (and x493 ?v_874) (= tmp257 4)) (=> (and x493 ?v_876) (= tmp257 6)) (=> (and ?v_1822 ?v_554) (= tmp256 0)) (=> (and ?v_1822 ?v_556) ?v_1823) (=> (and x505 ?v_554) ?v_1823) (=> (and x505 ?v_556) (= tmp256 4)) (=> (and ?v_1824 ?v_938) (= tmp255 0)) (=> (and ?v_1824 ?v_940) ?v_1825) (=> (and x491 ?v_938) ?v_1825) (=> (and x491 ?v_940) (= tmp255 12)) (=> (and ?v_1826 ?v_490) (= tmp254 0)) (=> (and ?v_1826 ?v_492) (= tmp254 4)) (=> (and x507 ?v_490) (= tmp254 6)) (=> (and x507 ?v_492) (= tmp254 10)) (=> (and ?v_1827 ?v_1828) (= tmp253 0)) (=> (and ?v_1827 ?v_1830) ?v_1829) (=> (and x489 ?v_1828) ?v_1829) (=> (and x489 ?v_1830) (= tmp253 12)) (=> (and ?v_1831 ?v_426) (= tmp252 0)) (=> (and ?v_1831 ?v_428) ?v_1832) (=> (and x509 ?v_426) ?v_1832) (=> (and x509 ?v_428) (= tmp252 8)) (=> (and ?v_1833 ?v_1066) (= tmp251 0)) (=> (and ?v_1833 ?v_1068) ?v_1834) (=> (and x487 ?v_1066) ?v_1834) (=> (and x487 ?v_1068) (= tmp251 12)) (=> (and ?v_1835 ?v_362) (= tmp250 0)) (=> (and ?v_1835 ?v_364) ?v_1836) (=> (and x511 ?v_362) ?v_1836) (=> (and x511 ?v_364) (= tmp250 12)) (=> (and ?v_1153 ?v_1837) (= tmp249 0)) (=> (and ?v_1153 ?v_1838) (= tmp249 6)) (=> (and x485 ?v_1837) (= tmp249 4)) (=> (and x485 ?v_1838) (= tmp249 10)) (=> (and ?v_1839 ?v_298) (= tmp248 0)) (=> (and ?v_1839 ?v_300) ?v_1840) (=> (and x513 ?v_298) ?v_1840) (=> (and x513 ?v_300) (= tmp248 12)) (=> (and ?v_1217 ?v_1841) (= tmp247 0)) (=> (and ?v_1217 ?v_1842) (= tmp247 4)) (=> (and x483 ?v_1841) (= tmp247 2)) (=> (and x483 ?v_1842) (= tmp247 6)) (=> (and ?v_1843 ?v_234) (= tmp246 0)) (=> (and ?v_1843 ?v_236) (= tmp246 4)) (=> (and x515 ?v_234) (= tmp246 6)) (=> (and x515 ?v_236) (= tmp246 10)) (=> (and ?v_1844 ?v_1258) (= tmp245 0)) (=> (and ?v_1844 ?v_1260) (= tmp245 2)) (=> (and x481 ?v_1258) (= tmp245 4)) (=> (and x481 ?v_1260) (= tmp245 6)) (=> (and ?v_1845 ?v_170) (= tmp244 0)) (=> (and ?v_1845 ?v_172) ?v_1846) (=> (and x517 ?v_170) ?v_1846) (=> (and x517 ?v_172) (= tmp244 12)) (=> (and ?v_1847 ?v_1322) (= tmp243 0)) (=> (and ?v_1847 ?v_1324) (= tmp243 4)) (=> (and x479 ?v_1322) (= tmp243 2)) (=> (and x479 ?v_1324) (= tmp243 6)) (=> (and ?v_1848 ?v_106) (= tmp242 0)) (=> (and ?v_1848 ?v_108) (= tmp242 6)) (=> (and x519 ?v_106) (= tmp242 8)) (=> (and x519 ?v_108) (= tmp242 14)) (=> (and ?v_1849 ?v_1386) (= tmp241 0)) (=> (and ?v_1849 ?v_1388) (= tmp241 4)) (=> (and x477 ?v_1386) (= tmp241 6)) (=> (and x477 ?v_1388) (= tmp241 10)) (=> (and ?v_1850 ?v_42) (= tmp240 0)) (=> (and ?v_1850 ?v_44) ?v_1851) (=> (and x521 ?v_42) ?v_1851) (=> (and x521 ?v_44) (= tmp240 16)) (=> (and ?v_1852 ?v_1450) (= tmp239 0)) (=> (and ?v_1852 ?v_1452) (= tmp239 6)) (=> (and x475 ?v_1450) (= tmp239 4)) (=> (and x475 ?v_1452) (= tmp239 10)) (=> (and ?v_737 true) (= tmp238 0)) (=> (and x452 true) (= tmp238 4)) (=> (and ?v_1853 ?v_1854) (= tmp237 0)) (=> (and ?v_1853 ?v_1856) ?v_1855) (=> (and x450 ?v_1854) ?v_1855) (=> (and x450 ?v_1856) (= tmp237 8)) (=> (and ?v_673 ?v_1857) (= tmp236 0)) (=> (and ?v_673 ?v_1858) (= tmp236 2)) (=> (and x454 ?v_1857) (= tmp236 1)) (=> (and x454 ?v_1858) (= tmp236 3)) (=> (and ?v_865 ?v_1859) (= tmp235 0)) (=> (and ?v_865 ?v_1861) ?v_1860) (=> (and x448 ?v_1859) ?v_1860) (=> (and x448 ?v_1861) (= tmp235 8)) (=> (and ?v_577 ?v_1862) (= tmp234 0)) (=> (and ?v_577 ?v_1863) (= tmp234 2)) (=> (and x456 ?v_1862) (= tmp234 4)) (=> (and x456 ?v_1863) (= tmp234 6)) (=> (and ?v_929 ?v_1864) (= tmp233 0)) (=> (and ?v_929 ?v_1866) ?v_1865) (=> (and x446 ?v_1864) ?v_1865) (=> (and x446 ?v_1866) (= tmp233 8)) (=> (and ?v_513 ?v_1867) (= tmp232 0)) (=> (and ?v_513 ?v_1868) (= tmp232 4)) (=> (and x458 ?v_1867) (= tmp232 6)) (=> (and x458 ?v_1868) (= tmp232 10)) (=> (and ?v_1869 ?v_1870) (= tmp231 0)) (=> (and ?v_1869 ?v_1872) ?v_1871) (=> (and x444 ?v_1870) ?v_1871) (=> (and x444 ?v_1872) (= tmp231 8)) (=> (and ?v_449 ?v_1873) (= tmp230 0)) (=> (and ?v_449 ?v_1875) ?v_1874) (=> (and x460 ?v_1873) ?v_1874) (=> (and x460 ?v_1875) (= tmp230 12)) (=> (and ?v_1057 ?v_1876) (= tmp229 0)) (=> (and ?v_1057 ?v_1878) ?v_1877) (=> (and x442 ?v_1876) ?v_1877) (=> (and x442 ?v_1878) (= tmp229 4)) (=> (and ?v_385 ?v_1879) (= tmp228 0)) (=> (and ?v_385 ?v_1880) (= tmp228 6)) (=> (and x462 ?v_1879) (= tmp228 8)) (=> (and x462 ?v_1880) (= tmp228 14)) (=> (and ?v_1881 ?v_1882) (= tmp227 0)) (=> (and ?v_1881 ?v_1884) ?v_1883) (=> (and x440 ?v_1882) ?v_1883) (=> (and x440 ?v_1884) (= tmp227 4)) (=> (and ?v_321 ?v_1885) (= tmp226 0)) (=> (and ?v_321 ?v_1887) ?v_1886) (=> (and x464 ?v_1885) ?v_1886) (=> (and x464 ?v_1887) (= tmp226 16)) (=> (and ?v_1888 ?v_1154) (= tmp225 0)) (=> (and ?v_1888 ?v_1156) ?v_1889) (=> (and x438 ?v_1154) ?v_1889) (=> (and x438 ?v_1156) (= tmp225 8)) (=> (and ?v_257 ?v_1890) (= tmp224 0)) (=> (and ?v_257 ?v_1892) ?v_1891) (=> (and x466 ?v_1890) ?v_1891) (=> (and x466 ?v_1892) (= tmp224 16)) (=> (and ?v_1249 ?v_1218) (= tmp223 0)) (=> (and ?v_1249 ?v_1220) ?v_1893) (=> (and x436 ?v_1218) ?v_1893) (=> (and x436 ?v_1220) (= tmp223 8)) (=> (and ?v_193 ?v_1894) (= tmp222 0)) (=> (and ?v_193 ?v_1896) ?v_1895) (=> (and x468 ?v_1894) ?v_1895) (=> (and x468 ?v_1896) (= tmp222 16)) (=> (and ?v_1313 ?v_1897) (= tmp221 0)) (=> (and ?v_1313 ?v_1899) ?v_1898) (=> (and x434 ?v_1897) ?v_1898) (=> (and x434 ?v_1899) (= tmp221 8)) (=> (and ?v_129 ?v_1900) (= tmp220 0)) (=> (and ?v_129 ?v_1902) ?v_1901) (=> (and x470 ?v_1900) ?v_1901) (=> (and x470 ?v_1902) (= tmp220 12)) (=> (and ?v_1377 ?v_1903) (= tmp219 0)) (=> (and ?v_1377 ?v_1905) ?v_1904) (=> (and x432 ?v_1903) ?v_1904) (=> (and x432 ?v_1905) (= tmp219 8)) (=> (and ?v_65 ?v_1906) (= tmp218 0)) (=> (and ?v_65 ?v_1908) ?v_1907) (=> (and x472 ?v_1906) ?v_1907) (=> (and x472 ?v_1908) (= tmp218 12)) (=> (and ?v_1441 ?v_1909) (= tmp217 0)) (=> (and ?v_1441 ?v_1910) (= tmp217 4)) (=> (and x430 ?v_1909) (= tmp217 2)) (=> (and x430 ?v_1910) (= tmp217 6)) (=> (and ?v_1 ?v_1911) (= tmp216 0)) (=> (and ?v_1 ?v_1912) (= tmp216 6)) (=> (and x474 ?v_1911) (= tmp216 4)) (=> (and x474 ?v_1912) (= tmp216 10)) (=> (and ?v_1505 ?v_1913) (= tmp215 0)) (=> (and ?v_1505 ?v_1914) (= tmp215 2)) (=> (and x428 ?v_1913) (= tmp215 1)) (=> (and x428 ?v_1914) (= tmp215 3)) (=> (and ?v_1915 ?v_738) (= tmp214 0)) (=> (and ?v_1915 ?v_740) (= tmp214 6)) (=> (and x405 ?v_738) (= tmp214 4)) (=> (and x405 ?v_740) (= tmp214 10)) (=> (and ?v_1916 ?v_770) (= tmp213 0)) (=> (and ?v_1916 ?v_772) ?v_1917) (=> (and x402 ?v_770) ?v_1917) (=> (and x402 ?v_772) (= tmp213 12)) (=> (and ?v_1918 ?v_674) (= tmp212 0)) (=> (and ?v_1918 ?v_676) (= tmp212 4)) (=> (and x407 ?v_674) (= tmp212 2)) (=> (and x407 ?v_676) (= tmp212 6)) (=> (and ?v_1919 ?v_834) (= tmp211 0)) (=> (and ?v_1919 ?v_836) (= tmp211 6)) (=> (and x400 ?v_834) (= tmp211 4)) (=> (and x400 ?v_836) (= tmp211 10)) (=> (and ?v_1920 ?v_610) (= tmp210 0)) (=> (and ?v_1920 ?v_612) (= tmp210 2)) (=> (and x409 ?v_610) (= tmp210 4)) (=> (and x409 ?v_612) (= tmp210 6)) (=> (and ?v_1921 ?v_898) (= tmp209 0)) (=> (and ?v_1921 ?v_900) ?v_1922) (=> (and x398 ?v_898) ?v_1922) (=> (and x398 ?v_900) (= tmp209 8)) (=> (and ?v_1923 ?v_546) (= tmp208 0)) (=> (and ?v_1923 ?v_548) ?v_1924) (=> (and x411 ?v_546) ?v_1924) (=> (and x411 ?v_548) (= tmp208 8)) (=> (and ?v_1925 ?v_962) (= tmp207 0)) (=> (and ?v_1925 ?v_964) ?v_1926) (=> (and x396 ?v_962) ?v_1926) (=> (and x396 ?v_964) (= tmp207 8)) (=> (and ?v_1927 ?v_482) (= tmp206 0)) (=> (and ?v_1927 ?v_484) ?v_1928) (=> (and x413 ?v_482) ?v_1928) (=> (and x413 ?v_484) (= tmp206 8)) (=> (and ?v_1929 ?v_1026) (= tmp205 0)) (=> (and ?v_1929 ?v_1028) ?v_1930) (=> (and x394 ?v_1026) ?v_1930) (=> (and x394 ?v_1028) (= tmp205 8)) (=> (and ?v_1931 ?v_418) (= tmp204 0)) (=> (and ?v_1931 ?v_420) ?v_1932) (=> (and x415 ?v_418) ?v_1932) (=> (and x415 ?v_420) (= tmp204 8)) (=> (and ?v_1933 ?v_1090) (= tmp203 0)) (=> (and ?v_1933 ?v_1092) ?v_1934) (=> (and x392 ?v_1090) ?v_1934) (=> (and x392 ?v_1092) (= tmp203 4)) (=> (and ?v_1935 ?v_354) (= tmp202 0)) (=> (and ?v_1935 ?v_356) (= tmp202 4)) (=> (and x417 ?v_354) (= tmp202 6)) (=> (and x417 ?v_356) (= tmp202 10)) (=> (and ?v_1936 ?v_1158) (= tmp201 0)) (=> (and ?v_1936 ?v_1160) ?v_1937) (=> (and x390 ?v_1158) ?v_1937) (=> (and x390 ?v_1160) (= tmp201 4)) (=> (and ?v_1938 ?v_290) (= tmp200 0)) (=> (and ?v_1938 ?v_292) ?v_1939) (=> (and x419 ?v_290) ?v_1939) (=> (and x419 ?v_292) (= tmp200 12)) (=> (and ?v_1940 ?v_1222) (= tmp199 0)) (=> (and ?v_1940 ?v_1224) ?v_1941) (=> (and x388 ?v_1222) ?v_1941) (=> (and x388 ?v_1224) (= tmp199 4)) (=> (and ?v_1942 ?v_226) (= tmp198 0)) (=> (and ?v_1942 ?v_228) ?v_1943) (=> (and x421 ?v_226) ?v_1943) (=> (and x421 ?v_228) (= tmp198 12)) (=> (and ?v_1944 ?v_1282) (= tmp197 0)) (=> (and ?v_1944 ?v_1284) ?v_1945) (=> (and x386 ?v_1282) ?v_1945) (=> (and x386 ?v_1284) (= tmp197 8)) (=> (and ?v_1946 ?v_162) (= tmp196 0)) (=> (and ?v_1946 ?v_164) (= tmp196 6)) (=> (and x423 ?v_162) (= tmp196 4)) (=> (and x423 ?v_164) (= tmp196 10)) (=> (and ?v_1947 ?v_1346) (= tmp195 0)) (=> (and ?v_1947 ?v_1348) ?v_1948) (=> (and x384 ?v_1346) ?v_1948) (=> (and x384 ?v_1348) (= tmp195 12)) (=> (and ?v_1949 ?v_98) (= tmp194 0)) (=> (and ?v_1949 ?v_100) ?v_1950) (=> (and x425 ?v_98) ?v_1950) (=> (and x425 ?v_100) (= tmp194 8)) (=> (and ?v_1951 ?v_1410) (= tmp193 0)) (=> (and ?v_1951 ?v_1412) ?v_1952) (=> (and x382 ?v_1410) ?v_1952) (=> (and x382 ?v_1412) (= tmp193 12)) (=> (and ?v_1953 ?v_34) (= tmp192 0)) (=> (and ?v_1953 ?v_36) ?v_1954) (=> (and x427 ?v_34) ?v_1954) (=> (and x427 ?v_36) (= tmp192 8)) (=> (and ?v_1955 ?v_1474) (= tmp191 0)) (=> (and ?v_1955 ?v_1476) ?v_1956) (=> (and x380 ?v_1474) ?v_1956) (=> (and x380 ?v_1476) (= tmp191 8)) (=> (and ?v_1957 ?v_742) (= tmp190 0)) (=> (and ?v_1957 ?v_744) ?v_1958) (=> (and x357 ?v_742) ?v_1958) (=> (and x357 ?v_744) (= tmp190 4)) (=> (and ?v_805 ?v_774) (= tmp189 0)) (=> (and ?v_805 ?v_776) ?v_1959) (=> (and x354 ?v_774) ?v_1959) (=> (and x354 ?v_776) (= tmp189 4)) (=> (and ?v_1960 ?v_678) (= tmp188 0)) (=> (and ?v_1960 ?v_680) ?v_1961) (=> (and x359 ?v_678) ?v_1961) (=> (and x359 ?v_680) (= tmp188 8)) (=> (and ?v_1962 ?v_838) (= tmp187 0)) (=> (and ?v_1962 ?v_840) ?v_1963) (=> (and x352 ?v_838) ?v_1963) (=> (and x352 ?v_840) (= tmp187 8)) (=> (and ?v_1964 ?v_614) (= tmp186 0)) (=> (and ?v_1964 ?v_616) ?v_1965) (=> (and x361 ?v_614) ?v_1965) (=> (and x361 ?v_616) (= tmp186 8)) (=> (and ?v_1966 ?v_902) (= tmp185 0)) (=> (and ?v_1966 ?v_904) ?v_1967) (=> (and x350 ?v_902) ?v_1967) (=> (and x350 ?v_904) (= tmp185 12)) (=> (and ?v_1968 ?v_550) (= tmp184 0)) (=> (and ?v_1968 ?v_552) ?v_1969) (=> (and x363 ?v_550) ?v_1969) (=> (and x363 ?v_552) (= tmp184 8)) (=> (and ?v_997 ?v_966) (= tmp183 0)) (=> (and ?v_997 ?v_968) ?v_1970) (=> (and x348 ?v_966) ?v_1970) (=> (and x348 ?v_968) (= tmp183 12)) (=> (and ?v_1971 ?v_486) (= tmp182 0)) (=> (and ?v_1971 ?v_488) (= tmp182 4)) (=> (and x365 ?v_486) (= tmp182 6)) (=> (and x365 ?v_488) (= tmp182 10)) (=> (and ?v_1972 ?v_1030) (= tmp181 0)) (=> (and ?v_1972 ?v_1032) ?v_1973) (=> (and x346 ?v_1030) ?v_1973) (=> (and x346 ?v_1032) (= tmp181 16)) (=> (and ?v_1974 ?v_422) (= tmp180 0)) (=> (and ?v_1974 ?v_424) ?v_1975) (=> (and x367 ?v_422) ?v_1975) (=> (and x367 ?v_424) (= tmp180 12)) (=> (and ?v_1125 ?v_1094) (= tmp179 0)) (=> (and ?v_1125 ?v_1096) ?v_1976) (=> (and x344 ?v_1094) ?v_1976) (=> (and x344 ?v_1096) (= tmp179 16)) (=> (and ?v_1977 ?v_358) (= tmp178 0)) (=> (and ?v_1977 ?v_360) ?v_1978) (=> (and x369 ?v_358) ?v_1978) (=> (and x369 ?v_360) (= tmp178 12)) (=> (and ?v_1189 ?v_1979) (= tmp177 0)) (=> (and ?v_1189 ?v_1980) (= tmp177 8)) (=> (and x342 ?v_1979) (= tmp177 6)) (=> (and x342 ?v_1980) (= tmp177 14)) (=> (and ?v_1981 ?v_294) (= tmp176 0)) (=> (and ?v_1981 ?v_296) ?v_1982) (=> (and x371 ?v_294) ?v_1982) (=> (and x371 ?v_296) (= tmp176 12)) (=> (and ?v_1983 ?v_1984) (= tmp175 0)) (=> (and ?v_1983 ?v_1986) ?v_1985) (=> (and x340 ?v_1984) ?v_1985) (=> (and x340 ?v_1986) (= tmp175 12)) (=> (and ?v_1987 ?v_230) (= tmp174 0)) (=> (and ?v_1987 ?v_232) ?v_1988) (=> (and x373 ?v_230) ?v_1988) (=> (and x373 ?v_232) (= tmp174 12)) (=> (and ?v_1989 ?v_1286) (= tmp173 0)) (=> (and ?v_1989 ?v_1288) (= tmp173 6)) (=> (and x338 ?v_1286) (= tmp173 4)) (=> (and x338 ?v_1288) (= tmp173 10)) (=> (and ?v_1990 ?v_166) (= tmp172 0)) (=> (and ?v_1990 ?v_168) (= tmp172 6)) (=> (and x375 ?v_166) (= tmp172 4)) (=> (and x375 ?v_168) (= tmp172 10)) (=> (and ?v_1991 ?v_1350) (= tmp171 0)) (=> (and ?v_1991 ?v_1352) (= tmp171 4)) (=> (and x336 ?v_1350) (= tmp171 2)) (=> (and x336 ?v_1352) (= tmp171 6)) (=> (and ?v_1992 ?v_102) (= tmp170 0)) (=> (and ?v_1992 ?v_104) (= tmp170 4)) (=> (and x377 ?v_102) (= tmp170 2)) (=> (and x377 ?v_104) (= tmp170 6)) (=> (and ?v_1993 ?v_1414) (= tmp169 0)) (=> (and ?v_1993 ?v_1416) ?v_1994) (=> (and x334 ?v_1414) ?v_1994) (=> (and x334 ?v_1416) (= tmp169 8)) (=> (and ?v_1995 ?v_38) (= tmp168 0)) (=> (and ?v_1995 ?v_40) ?v_1996) (=> (and x379 ?v_38) ?v_1996) (=> (and x379 ?v_40) (= tmp168 2)) (=> (and ?v_1997 ?v_1478) (= tmp167 0)) (=> (and ?v_1997 ?v_1480) ?v_1998) (=> (and x332 ?v_1478) ?v_1998) (=> (and x332 ?v_1480) (= tmp167 8)) (=> (and ?v_709 ?v_1999) (= tmp166 0)) (=> (and ?v_709 ?v_2001) ?v_2000) (=> (and x309 ?v_1999) ?v_2000) (=> (and x309 ?v_2001) (= tmp166 8)) (=> (and ?v_2002 ?v_2003) (= tmp165 0)) (=> (and ?v_2002 ?v_2005) ?v_2004) (=> (and x306 ?v_2003) ?v_2004) (=> (and x306 ?v_2005) (= tmp165 8)) (=> (and ?v_645 ?v_2006) (= tmp164 0)) (=> (and ?v_645 ?v_2008) ?v_2007) (=> (and x311 ?v_2006) ?v_2007) (=> (and x311 ?v_2008) (= tmp164 8)) (=> (and ?v_869 ?v_2009) (= tmp163 0)) (=> (and ?v_869 ?v_2010) (= tmp163 4)) (=> (and x304 ?v_2009) (= tmp163 6)) (=> (and x304 ?v_2010) (= tmp163 10)) (=> (and ?v_581 ?v_2011) (= tmp162 0)) (=> (and ?v_581 ?v_2013) ?v_2012) (=> (and x313 ?v_2011) ?v_2012) (=> (and x313 ?v_2013) (= tmp162 8)) (=> (and ?v_933 ?v_2014) (= tmp161 0)) (=> (and ?v_933 ?v_2016) ?v_2015) (=> (and x302 ?v_2014) ?v_2015) (=> (and x302 ?v_2016) (= tmp161 12)) (=> (and ?v_517 ?v_2017) (= tmp160 0)) (=> (and ?v_517 ?v_2019) ?v_2018) (=> (and x315 ?v_2017) ?v_2018) (=> (and x315 ?v_2019) (= tmp160 12)) (=> (and ?v_2020 ?v_2021) (= tmp159 0)) (=> (and ?v_2020 ?v_2023) ?v_2022) (=> (and x300 ?v_2021) ?v_2022) (=> (and x300 ?v_2023) (= tmp159 12)) (=> (and ?v_453 ?v_2024) (= tmp158 0)) (=> (and ?v_453 ?v_2026) ?v_2025) (=> (and x317 ?v_2024) ?v_2025) (=> (and x317 ?v_2026) (= tmp158 12)) (=> (and ?v_1061 ?v_2027) (= tmp157 0)) (=> (and ?v_1061 ?v_2028) (= tmp157 6)) (=> (and x298 ?v_2027) (= tmp157 4)) (=> (and x298 ?v_2028) (= tmp157 10)) (=> (and ?v_389 ?v_2029) (= tmp156 0)) (=> (and ?v_389 ?v_2031) ?v_2030) (=> (and x319 ?v_2029) ?v_2030) (=> (and x319 ?v_2031) (= tmp156 12)) (=> (and ?v_2032 ?v_2033) (= tmp155 0)) (=> (and ?v_2032 ?v_2035) ?v_2034) (=> (and x296 ?v_2033) ?v_2034) (=> (and x296 ?v_2035) (= tmp155 8)) (=> (and ?v_325 ?v_2036) (= tmp154 0)) (=> (and ?v_325 ?v_2038) ?v_2037) (=> (and x321 ?v_2036) ?v_2037) (=> (and x321 ?v_2038) (= tmp154 12)) (=> (and ?v_2039 ?v_1166) (= tmp153 0)) (=> (and ?v_2039 ?v_1168) ?v_2040) (=> (and x294 ?v_1166) ?v_2040) (=> (and x294 ?v_1168) (= tmp153 8)) (=> (and ?v_261 ?v_2041) (= tmp152 0)) (=> (and ?v_261 ?v_2043) ?v_2042) (=> (and x323 ?v_2041) ?v_2042) (=> (and x323 ?v_2043) (= tmp152 8)) (=> (and ?v_1253 ?v_1230) (= tmp151 0)) (=> (and ?v_1253 ?v_1232) (= tmp151 6)) (=> (and x292 ?v_1230) (= tmp151 4)) (=> (and x292 ?v_1232) (= tmp151 10)) (=> (and ?v_197 ?v_2044) (= tmp150 0)) (=> (and ?v_197 ?v_2046) ?v_2045) (=> (and x325 ?v_2044) ?v_2045) (=> (and x325 ?v_2046) (= tmp150 8)) (=> (and ?v_1317 ?v_2047) (= tmp149 0)) (=> (and ?v_1317 ?v_2048) (= tmp149 4)) (=> (and x290 ?v_2047) (= tmp149 2)) (=> (and x290 ?v_2048) (= tmp149 6)) (=> (and ?v_133 ?v_2049) (= tmp148 0)) (=> (and ?v_133 ?v_2051) ?v_2050) (=> (and x327 ?v_2049) ?v_2050) (=> (and x327 ?v_2051) (= tmp148 8)) (=> (and ?v_1381 ?v_2052) (= tmp147 0)) (=> (and ?v_1381 ?v_2053) (= tmp147 1)) (=> (and x288 ?v_2052) (= tmp147 2)) (=> (and x288 ?v_2053) (= tmp147 3)) (=> (and ?v_69 ?v_2054) (= tmp146 0)) (=> (and ?v_69 ?v_2056) ?v_2055) (=> (and x329 ?v_2054) ?v_2055) (=> (and x329 ?v_2056) (= tmp146 8)) (=> (and ?v_1445 ?v_2057) (= tmp145 0)) (=> (and ?v_1445 ?v_2059) ?v_2058) (=> (and x286 ?v_2057) ?v_2058) (=> (and x286 ?v_2059) (= tmp145 8)) (=> (and ?v_5 ?v_2060) (= tmp144 0)) (=> (and ?v_5 ?v_2062) ?v_2061) (=> (and x331 ?v_2060) ?v_2061) (=> (and x331 ?v_2062) (= tmp144 8)) (=> (and ?v_1509 ?v_2063) (= tmp143 0)) (=> (and ?v_1509 ?v_2065) ?v_2064) (=> (and x284 ?v_2063) ?v_2064) (=> (and x284 ?v_2065) (= tmp143 8)) (=> (and ?v_2066 ?v_686) (= tmp142 0)) (=> (and ?v_2066 ?v_688) ?v_2067) (=> (and x263 ?v_686) ?v_2067) (=> (and x263 ?v_688) (= tmp142 4)) (=> (and ?v_2068 ?v_718) (= tmp141 0)) (=> (and ?v_2068 ?v_720) ?v_2069) (=> (and x260 ?v_718) ?v_2069) (=> (and x260 ?v_720) (= tmp141 2)) (=> (and ?v_2070 ?v_622) (= tmp140 0)) (=> (and ?v_2070 ?v_624) ?v_2071) (=> (and x265 ?v_622) ?v_2071) (=> (and x265 ?v_624) (= tmp140 8)) (=> (and ?v_813 ?v_782) (= tmp139 0)) (=> (and ?v_813 ?v_784) ?v_2072) (=> (and x258 ?v_782) ?v_2072) (=> (and x258 ?v_784) (= tmp139 4)) (=> (and ?v_2073 ?v_558) (= tmp138 0)) (=> (and ?v_2073 ?v_560) ?v_2074) (=> (and x267 ?v_558) ?v_2074) (=> (and x267 ?v_560) (= tmp138 8)) (=> (and ?v_2075 ?v_846) (= tmp137 0)) (=> (and ?v_2075 ?v_848) ?v_2076) (=> (and x256 ?v_846) ?v_2076) (=> (and x256 ?v_848) (= tmp137 4)) (=> (and ?v_2077 ?v_494) (= tmp136 0)) (=> (and ?v_2077 ?v_496) ?v_2078) (=> (and x269 ?v_494) ?v_2078) (=> (and x269 ?v_496) (= tmp136 8)) (=> (and ?v_2079 ?v_910) (= tmp135 0)) (=> (and ?v_2079 ?v_912) ?v_2080) (=> (and x254 ?v_910) ?v_2080) (=> (and x254 ?v_912) (= tmp135 4)) (=> (and ?v_2081 ?v_430) (= tmp134 0)) (=> (and ?v_2081 ?v_432) ?v_2082) (=> (and x271 ?v_430) ?v_2082) (=> (and x271 ?v_432) (= tmp134 8)) (=> (and ?v_1005 ?v_974) (= tmp133 0)) (=> (and ?v_1005 ?v_976) ?v_2083) (=> (and x252 ?v_974) ?v_2083) (=> (and x252 ?v_976) (= tmp133 4)) (=> (and ?v_2084 ?v_366) (= tmp132 0)) (=> (and ?v_2084 ?v_368) ?v_2085) (=> (and x273 ?v_366) ?v_2085) (=> (and x273 ?v_368) (= tmp132 8)) (=> (and ?v_2086 ?v_1038) (= tmp131 0)) (=> (and ?v_2086 ?v_1040) ?v_2087) (=> (and x250 ?v_1038) ?v_2087) (=> (and x250 ?v_1040) (= tmp131 2)) (=> (and ?v_2088 ?v_302) (= tmp130 0)) (=> (and ?v_2088 ?v_304) ?v_2089) (=> (and x275 ?v_302) ?v_2089) (=> (and x275 ?v_304) (= tmp130 4)) (=> (and ?v_2090 ?v_1102) (= tmp129 0)) (=> (and ?v_2090 ?v_1104) ?v_2091) (=> (and x248 ?v_1102) ?v_2091) (=> (and x248 ?v_1104) (= tmp129 2)) (=> (and ?v_2092 ?v_238) (= tmp128 0)) (=> (and ?v_2092 ?v_240) (= tmp128 2)) (=> (and x277 ?v_238) (= tmp128 4)) (=> (and x277 ?v_240) (= tmp128 6)) (=> (and ?v_2093 ?v_1294) (= tmp127 0)) (=> (and ?v_2093 ?v_1296) ?v_2094) (=> (and x246 ?v_1294) ?v_2094) (=> (and x246 ?v_1296) (= tmp127 2)) (=> (and ?v_2095 ?v_174) (= tmp126 0)) (=> (and ?v_2095 ?v_176) ?v_2096) (=> (and x279 ?v_174) ?v_2096) (=> (and x279 ?v_176) (= tmp126 8)) (=> (and ?v_2097 ?v_1358) (= tmp125 0)) (=> (and ?v_2097 ?v_1360) (= tmp125 1)) (=> (and x244 ?v_1358) (= tmp125 2)) (=> (and x244 ?v_1360) (= tmp125 3)) (=> (and ?v_2098 ?v_110) (= tmp124 0)) (=> (and ?v_2098 ?v_112) ?v_2099) (=> (and x281 ?v_110) ?v_2099) (=> (and x281 ?v_112) (= tmp124 12)) (=> (and ?v_2100 ?v_1422) (= tmp123 0)) (=> (and ?v_2100 ?v_1424) ?v_2101) (=> (and x242 ?v_1422) ?v_2101) (=> (and x242 ?v_1424) (= tmp123 4)) (=> (and ?v_2102 ?v_46) (= tmp122 0)) (=> (and ?v_2102 ?v_48) ?v_2103) (=> (and x283 ?v_46) ?v_2103) (=> (and x283 ?v_48) (= tmp122 12)) (=> (and ?v_2104 ?v_1486) (= tmp121 0)) (=> (and ?v_2104 ?v_1488) ?v_2105) (=> (and x240 ?v_1486) ?v_2105) (=> (and x240 ?v_1488) (= tmp121 4)) (=> (and ?v_717 ?v_2106) (= tmp120 0)) (=> (and ?v_717 ?v_2107) (= tmp120 2)) (=> (and x217 ?v_2106) (= tmp120 1)) (=> (and x217 ?v_2107) (= tmp120 3)) (=> (and ?v_2108 ?v_2109) (= tmp119 0)) (=> (and ?v_2108 ?v_2111) ?v_2110) (=> (and x214 ?v_2109) ?v_2110) (=> (and x214 ?v_2111) (= tmp119 4)) (=> (and ?v_653 ?v_2112) (= tmp118 0)) (=> (and ?v_653 ?v_2113) (= tmp118 1)) (=> (and x219 ?v_2112) (= tmp118 2)) (=> (and x219 ?v_2113) (= tmp118 3)) (=> (and ?v_877 ?v_2114) (= tmp117 0)) (=> (and ?v_877 ?v_2116) ?v_2115) (=> (and x212 ?v_2114) ?v_2115) (=> (and x212 ?v_2116) (= tmp117 8)) (=> (and ?v_589 ?v_2117) (= tmp116 0)) (=> (and ?v_589 ?v_2119) ?v_2118) (=> (and x221 ?v_2117) ?v_2118) (=> (and x221 ?v_2119) (= tmp116 4)) (=> (and ?v_941 ?v_2120) (= tmp115 0)) (=> (and ?v_941 ?v_2121) (= tmp115 4)) (=> (and x210 ?v_2120) (= tmp115 6)) (=> (and x210 ?v_2121) (= tmp115 10)) (=> (and ?v_525 ?v_2122) (= tmp114 0)) (=> (and ?v_525 ?v_2124) ?v_2123) (=> (and x223 ?v_2122) ?v_2123) (=> (and x223 ?v_2124) (= tmp114 4)) (=> (and ?v_2125 ?v_2126) (= tmp113 0)) (=> (and ?v_2125 ?v_2128) ?v_2127) (=> (and x208 ?v_2126) ?v_2127) (=> (and x208 ?v_2128) (= tmp113 12)) (=> (and ?v_461 ?v_2129) (= tmp112 0)) (=> (and ?v_461 ?v_2131) ?v_2130) (=> (and x225 ?v_2129) ?v_2130) (=> (and x225 ?v_2131) (= tmp112 4)) (=> (and ?v_1069 ?v_2132) (= tmp111 0)) (=> (and ?v_1069 ?v_2134) ?v_2133) (=> (and x206 ?v_2132) ?v_2133) (=> (and x206 ?v_2134) (= tmp111 12)) (=> (and ?v_397 ?v_2135) (= tmp110 0)) (=> (and ?v_397 ?v_2137) ?v_2136) (=> (and x227 ?v_2135) ?v_2136) (=> (and x227 ?v_2137) (= tmp110 4)) (=> (and ?v_1133 ?v_2138) (= tmp109 0)) (=> (and ?v_1133 ?v_2140) ?v_2139) (=> (and x204 ?v_2138) ?v_2139) (=> (and x204 ?v_2140) (= tmp109 12)) (=> (and ?v_333 ?v_2141) (= tmp108 0)) (=> (and ?v_333 ?v_2143) ?v_2142) (=> (and x229 ?v_2141) ?v_2142) (=> (and x229 ?v_2143) (= tmp108 4)) (=> (and ?v_1197 ?v_2144) (= tmp107 0)) (=> (and ?v_1197 ?v_2146) ?v_2145) (=> (and x202 ?v_2144) ?v_2145) (=> (and x202 ?v_2146) (= tmp107 12)) (=> (and ?v_269 ?v_2147) (= tmp106 0)) (=> (and ?v_269 ?v_2149) ?v_2148) (=> (and x231 ?v_2147) ?v_2148) (=> (and x231 ?v_2149) (= tmp106 4)) (=> (and ?v_1261 ?v_2150) (= tmp105 0)) (=> (and ?v_1261 ?v_2152) ?v_2151) (=> (and x200 ?v_2150) ?v_2151) (=> (and x200 ?v_2152) (= tmp105 8)) (=> (and ?v_205 ?v_2153) (= tmp104 0)) (=> (and ?v_205 ?v_2155) ?v_2154) (=> (and x233 ?v_2153) ?v_2154) (=> (and x233 ?v_2155) (= tmp104 4)) (=> (and ?v_1325 ?v_2156) (= tmp103 0)) (=> (and ?v_1325 ?v_2158) ?v_2157) (=> (and x198 ?v_2156) ?v_2157) (=> (and x198 ?v_2158) (= tmp103 8)) (=> (and ?v_141 ?v_2159) (= tmp102 0)) (=> (and ?v_141 ?v_2161) ?v_2160) (=> (and x235 ?v_2159) ?v_2160) (=> (and x235 ?v_2161) (= tmp102 4)) (=> (and ?v_1389 ?v_2162) (= tmp101 0)) (=> (and ?v_1389 ?v_2164) ?v_2163) (=> (and x196 ?v_2162) ?v_2163) (=> (and x196 ?v_2164) (= tmp101 8)) (=> (and ?v_77 ?v_2165) (= tmp100 0)) (=> (and ?v_77 ?v_2167) ?v_2166) (=> (and x237 ?v_2165) ?v_2166) (=> (and x237 ?v_2167) (= tmp100 4)) (=> (and ?v_1453 ?v_2168) (= tmp99 0)) (=> (and ?v_1453 ?v_2170) ?v_2169) (=> (and x194 ?v_2168) ?v_2169) (=> (and x194 ?v_2170) (= tmp99 12)) (=> (and ?v_13 ?v_2171) (= tmp98 0)) (=> (and ?v_13 ?v_2173) ?v_2172) (=> (and x239 ?v_2171) ?v_2172) (=> (and x239 ?v_2173) (= tmp98 4)) (=> (and ?v_1517 ?v_2174) (= tmp97 0)) (=> (and ?v_1517 ?v_2176) ?v_2175) (=> (and x192 ?v_2174) ?v_2175) (=> (and x192 ?v_2176) (= tmp97 12)) (=> (and ?v_2177 ?v_758) (= tmp96 0)) (=> (and ?v_2177 ?v_760) ?v_2178) (=> (and x169 ?v_758) ?v_2178) (=> (and x169 ?v_760) (= tmp96 8)) (=> (and ?v_821 ?v_790) (= tmp95 0)) (=> (and ?v_821 ?v_792) ?v_2179) (=> (and x166 ?v_790) ?v_2179) (=> (and x166 ?v_792) (= tmp95 8)) (=> (and ?v_2180 ?v_694) (= tmp94 0)) (=> (and ?v_2180 ?v_696) (= tmp94 6)) (=> (and x171 ?v_694) (= tmp94 4)) (=> (and x171 ?v_696) (= tmp94 10)) (=> (and ?v_2181 ?v_854) (= tmp93 0)) (=> (and ?v_2181 ?v_856) ?v_2182) (=> (and x164 ?v_854) ?v_2182) (=> (and x164 ?v_856) (= tmp93 12)) (=> (and ?v_2183 ?v_630) (= tmp92 0)) (=> (and ?v_2183 ?v_632) ?v_2184) (=> (and x173 ?v_630) ?v_2184) (=> (and x173 ?v_632) (= tmp92 8)) (=> (and ?v_2185 ?v_918) (= tmp91 0)) (=> (and ?v_2185 ?v_920) ?v_2186) (=> (and x162 ?v_918) ?v_2186) (=> (and x162 ?v_920) (= tmp91 12)) (=> (and ?v_2187 ?v_566) (= tmp90 0)) (=> (and ?v_2187 ?v_568) ?v_2188) (=> (and x175 ?v_566) ?v_2188) (=> (and x175 ?v_568) (= tmp90 4)) (=> (and ?v_1013 ?v_982) (= tmp89 0)) (=> (and ?v_1013 ?v_984) ?v_2189) (=> (and x160 ?v_982) ?v_2189) (=> (and x160 ?v_984) (= tmp89 12)) (=> (and ?v_2190 ?v_502) (= tmp88 0)) (=> (and ?v_2190 ?v_504) (= tmp88 4)) (=> (and x177 ?v_502) (= tmp88 6)) (=> (and x177 ?v_504) (= tmp88 10)) (=> (and ?v_2191 ?v_1046) (= tmp87 0)) (=> (and ?v_2191 ?v_1048) ?v_2192) (=> (and x158 ?v_1046) ?v_2192) (=> (and x158 ?v_1048) (= tmp87 12)) (=> (and ?v_2193 ?v_438) (= tmp86 0)) (=> (and ?v_2193 ?v_440) ?v_2194) (=> (and x179 ?v_438) ?v_2194) (=> (and x179 ?v_440) (= tmp86 12)) (=> (and ?v_2195 ?v_1110) (= tmp85 0)) (=> (and ?v_2195 ?v_1112) (= tmp85 6)) (=> (and x156 ?v_1110) (= tmp85 4)) (=> (and x156 ?v_1112) (= tmp85 10)) (=> (and ?v_2196 ?v_374) (= tmp84 0)) (=> (and ?v_2196 ?v_376) ?v_2197) (=> (and x181 ?v_374) ?v_2197) (=> (and x181 ?v_376) (= tmp84 12)) (=> (and ?v_2198 ?v_1174) (= tmp83 0)) (=> (and ?v_2198 ?v_1176) ?v_2199) (=> (and x154 ?v_1174) ?v_2199) (=> (and x154 ?v_1176) (= tmp83 8)) (=> (and ?v_2200 ?v_310) (= tmp82 0)) (=> (and ?v_2200 ?v_312) ?v_2201) (=> (and x183 ?v_310) ?v_2201) (=> (and x183 ?v_312) (= tmp82 8)) (=> (and ?v_2202 ?v_1238) (= tmp81 0)) (=> (and ?v_2202 ?v_1240) ?v_2203) (=> (and x152 ?v_1238) ?v_2203) (=> (and x152 ?v_1240) (= tmp81 8)) (=> (and ?v_2204 ?v_246) (= tmp80 0)) (=> (and ?v_2204 ?v_248) ?v_2205) (=> (and x185 ?v_246) ?v_2205) (=> (and x185 ?v_248) (= tmp80 12)) (=> (and ?v_2206 ?v_1302) (= tmp79 0)) (=> (and ?v_2206 ?v_1304) (= tmp79 2)) (=> (and x150 ?v_1302) (= tmp79 1)) (=> (and x150 ?v_1304) (= tmp79 3)) (=> (and ?v_2207 ?v_182) (= tmp78 0)) (=> (and ?v_2207 ?v_184) ?v_2208) (=> (and x187 ?v_182) ?v_2208) (=> (and x187 ?v_184) (= tmp78 12)) (=> (and ?v_2209 ?v_1366) (= tmp77 0)) (=> (and ?v_2209 ?v_1368) (= tmp77 2)) (=> (and x148 ?v_1366) (= tmp77 4)) (=> (and x148 ?v_1368) (= tmp77 6)) (=> (and ?v_2210 ?v_118) (= tmp76 0)) (=> (and ?v_2210 ?v_120) (= tmp76 4)) (=> (and x189 ?v_118) (= tmp76 2)) (=> (and x189 ?v_120) (= tmp76 6)) (=> (and ?v_2211 ?v_1430) (= tmp75 0)) (=> (and ?v_2211 ?v_1432) ?v_2212) (=> (and x146 ?v_1430) ?v_2212) (=> (and x146 ?v_1432) (= tmp75 8)) (=> (and ?v_2213 ?v_54) (= tmp74 0)) (=> (and ?v_2213 ?v_56) ?v_2214) (=> (and x191 ?v_54) ?v_2214) (=> (and x191 ?v_56) (= tmp74 4)) (=> (and ?v_2215 ?v_1494) (= tmp73 0)) (=> (and ?v_2215 ?v_1496) ?v_2216) (=> (and x144 ?v_1494) ?v_2216) (=> (and x144 ?v_1496) (= tmp73 8)) (=> (and ?v_725 true) (= tmp72 0)) (=> (and x121 true) (= tmp72 4)) (=> (and ?v_789 ?v_2217) (= tmp71 0)) (=> (and ?v_789 ?v_2218) (= tmp71 2)) (=> (and x119 ?v_2217) (= tmp71 1)) (=> (and x119 ?v_2218) (= tmp71 3)) (=> (and ?v_661 ?v_2219) (= tmp70 0)) (=> (and ?v_661 ?v_2220) (= tmp70 4)) (=> (and x123 ?v_2219) (= tmp70 6)) (=> (and x123 ?v_2220) (= tmp70 10)) (=> (and ?v_885 ?v_2221) (= tmp69 0)) (=> (and ?v_885 ?v_2222) (= tmp69 1)) (=> (and x117 ?v_2221) (= tmp69 2)) (=> (and x117 ?v_2222) (= tmp69 3)) (=> (and ?v_597 ?v_2223) (= tmp68 0)) (=> (and ?v_597 ?v_2225) ?v_2224) (=> (and x125 ?v_2223) ?v_2224) (=> (and x125 ?v_2225) (= tmp68 12)) (=> (and ?v_949 ?v_2226) (= tmp67 0)) (=> (and ?v_949 ?v_2227) (= tmp67 2)) (=> (and x115 ?v_2226) (= tmp67 4)) (=> (and x115 ?v_2227) (= tmp67 6)) (=> (and ?v_533 ?v_2228) (= tmp66 0)) (=> (and ?v_533 ?v_2230) ?v_2229) (=> (and x127 ?v_2228) ?v_2229) (=> (and x127 ?v_2230) (= tmp66 8)) (=> (and ?v_2231 ?v_2232) (= tmp65 0)) (=> (and ?v_2231 ?v_2234) ?v_2233) (=> (and x113 ?v_2232) ?v_2233) (=> (and x113 ?v_2234) (= tmp65 8)) (=> (and ?v_469 ?v_2235) (= tmp64 0)) (=> (and ?v_469 ?v_2237) ?v_2236) (=> (and x129 ?v_2235) ?v_2236) (=> (and x129 ?v_2237) (= tmp64 4)) (=> (and ?v_1077 ?v_2238) (= tmp63 0)) (=> (and ?v_1077 ?v_2240) ?v_2239) (=> (and x111 ?v_2238) ?v_2239) (=> (and x111 ?v_2240) (= tmp63 8)) (=> (and ?v_405 ?v_2241) (= tmp62 0)) (=> (and ?v_405 ?v_2242) (= tmp62 2)) (=> (and x131 ?v_2241) (= tmp62 4)) (=> (and x131 ?v_2242) (= tmp62 6)) (=> (and ?v_1141 ?v_2243) (= tmp61 0)) (=> (and ?v_1141 ?v_2245) ?v_2244) (=> (and x109 ?v_2243) ?v_2244) (=> (and x109 ?v_2245) (= tmp61 8)) (=> (and ?v_341 ?v_2246) (= tmp60 0)) (=> (and ?v_341 ?v_2247) (= tmp60 4)) (=> (and x133 ?v_2246) (= tmp60 2)) (=> (and x133 ?v_2247) (= tmp60 6)) (=> (and ?v_1205 ?v_2248) (= tmp59 0)) (=> (and ?v_1205 ?v_2249) (= tmp59 4)) (=> (and x107 ?v_2248) (= tmp59 6)) (=> (and x107 ?v_2249) (= tmp59 10)) (=> (and ?v_277 ?v_2250) (= tmp58 0)) (=> (and ?v_277 ?v_2251) (= tmp58 2)) (=> (and x135 ?v_2250) (= tmp58 4)) (=> (and x135 ?v_2251) (= tmp58 6)) (=> (and ?v_1269 ?v_2252) (= tmp57 0)) (=> (and ?v_1269 ?v_2254) ?v_2253) (=> (and x105 ?v_2252) ?v_2253) (=> (and x105 ?v_2254) (= tmp57 12)) (=> (and ?v_213 ?v_2255) (= tmp56 0)) (=> (and ?v_213 ?v_2257) ?v_2256) (=> (and x137 ?v_2255) ?v_2256) (=> (and x137 ?v_2257) (= tmp56 8)) (=> (and ?v_1333 ?v_2258) (= tmp55 0)) (=> (and ?v_1333 ?v_2260) ?v_2259) (=> (and x103 ?v_2258) ?v_2259) (=> (and x103 ?v_2260) (= tmp55 12)) (=> (and ?v_149 ?v_2261) (= tmp54 0)) (=> (and ?v_149 ?v_2262) (= tmp54 4)) (=> (and x139 ?v_2261) (= tmp54 1)) (=> (and x139 ?v_2262) (= tmp54 5)) (=> (and ?v_1397 ?v_2263) (= tmp53 0)) (=> (and ?v_1397 ?v_2265) ?v_2264) (=> (and x101 ?v_2263) ?v_2264) (=> (and x101 ?v_2265) (= tmp53 12)) (=> (and ?v_85 ?v_2266) (= tmp52 0)) (=> (and ?v_85 ?v_2267) (= tmp52 2)) (=> (and x141 ?v_2266) (= tmp52 4)) (=> (and x141 ?v_2267) (= tmp52 6)) (=> (and ?v_1461 ?v_2268) (= tmp51 0)) (=> (and ?v_1461 ?v_2270) ?v_2269) (=> (and x99 ?v_2268) ?v_2269) (=> (and x99 ?v_2270) (= tmp51 8)) (=> (and ?v_21 ?v_2271) (= tmp50 0)) (=> (and ?v_21 ?v_2273) ?v_2272) (=> (and x143 ?v_2271) ?v_2272) (=> (and x143 ?v_2273) (= tmp50 12)) (=> (and ?v_1525 ?v_2274) (= tmp49 0)) (=> (and ?v_1525 ?v_2275) (= tmp49 4)) (=> (and x97 ?v_2274) (= tmp49 2)) (=> (and x97 ?v_2275) (= tmp49 6)) (=> (and ?v_2276 ?v_766) (= tmp48 0)) (=> (and ?v_2276 ?v_768) (= tmp48 2)) (=> (and x74 ?v_766) (= tmp48 4)) (=> (and x74 ?v_768) (= tmp48 6)) (=> (and ?v_2277 ?v_798) (= tmp47 0)) (=> (and ?v_2277 ?v_800) (= tmp47 1)) (=> (and x71 ?v_798) (= tmp47 2)) (=> (and x71 ?v_800) (= tmp47 3)) (=> (and ?v_2278 ?v_702) (= tmp46 0)) (=> (and ?v_2278 ?v_704) ?v_2279) (=> (and x76 ?v_702) ?v_2279) (=> (and x76 ?v_704) (= tmp46 4)) (=> (and ?v_2280 ?v_862) (= tmp45 0)) (=> (and ?v_2280 ?v_864) ?v_2281) (=> (and x69 ?v_862) ?v_2281) (=> (and x69 ?v_864) (= tmp45 8)) (=> (and ?v_2282 ?v_638) (= tmp44 0)) (=> (and ?v_2282 ?v_640) ?v_2283) (=> (and x78 ?v_638) ?v_2283) (=> (and x78 ?v_640) (= tmp44 8)) (=> (and ?v_2284 ?v_926) (= tmp43 0)) (=> (and ?v_2284 ?v_928) ?v_2285) (=> (and x67 ?v_926) ?v_2285) (=> (and x67 ?v_928) (= tmp43 8)) (=> (and ?v_2286 ?v_574) (= tmp42 0)) (=> (and ?v_2286 ?v_576) (= tmp42 4)) (=> (and x80 ?v_574) (= tmp42 2)) (=> (and x80 ?v_576) (= tmp42 6)) (=> (and ?v_1021 ?v_990) (= tmp41 0)) (=> (and ?v_1021 ?v_992) (= tmp41 4)) (=> (and x65 ?v_990) (= tmp41 6)) (=> (and x65 ?v_992) (= tmp41 10)) (=> (and ?v_2287 ?v_510) (= tmp40 0)) (=> (and ?v_2287 ?v_512) (= tmp40 2)) (=> (and x82 ?v_510) (= tmp40 4)) (=> (and x82 ?v_512) (= tmp40 6)) (=> (and ?v_2288 ?v_1054) (= tmp39 0)) (=> (and ?v_2288 ?v_1056) (= tmp39 6)) (=> (and x63 ?v_1054) (= tmp39 4)) (=> (and x63 ?v_1056) (= tmp39 10)) (=> (and ?v_2289 ?v_446) (= tmp38 0)) (=> (and ?v_2289 ?v_448) ?v_2290) (=> (and x84 ?v_446) ?v_2290) (=> (and x84 ?v_448) (= tmp38 8)) (=> (and ?v_2291 ?v_1118) (= tmp37 0)) (=> (and ?v_2291 ?v_1120) ?v_2292) (=> (and x61 ?v_1118) ?v_2292) (=> (and x61 ?v_1120) (= tmp37 4)) (=> (and ?v_2293 ?v_382) (= tmp36 0)) (=> (and ?v_2293 ?v_384) ?v_2294) (=> (and x86 ?v_382) ?v_2294) (=> (and x86 ?v_384) (= tmp36 8)) (=> (and ?v_2295 ?v_1182) (= tmp35 0)) (=> (and ?v_2295 ?v_1184) ?v_2296) (=> (and x59 ?v_1182) ?v_2296) (=> (and x59 ?v_1184) (= tmp35 8)) (=> (and ?v_2297 ?v_318) (= tmp34 0)) (=> (and ?v_2297 ?v_320) ?v_2298) (=> (and x88 ?v_318) ?v_2298) (=> (and x88 ?v_320) (= tmp34 8)) (=> (and ?v_2299 ?v_1246) (= tmp33 0)) (=> (and ?v_2299 ?v_1248) (= tmp33 4)) (=> (and x57 ?v_1246) (= tmp33 2)) (=> (and x57 ?v_1248) (= tmp33 6)) (=> (and ?v_2300 ?v_254) (= tmp32 0)) (=> (and ?v_2300 ?v_256) ?v_2301) (=> (and x90 ?v_254) ?v_2301) (=> (and x90 ?v_256) (= tmp32 8)) (=> (and ?v_2302 ?v_1310) (= tmp31 0)) (=> (and ?v_2302 ?v_1312) ?v_2303) (=> (and x55 ?v_1310) ?v_2303) (=> (and x55 ?v_1312) (= tmp31 8)) (=> (and ?v_2304 ?v_190) (= tmp30 0)) (=> (and ?v_2304 ?v_192) (= tmp30 4)) (=> (and x92 ?v_190) (= tmp30 2)) (=> (and x92 ?v_192) (= tmp30 6)) (=> (and ?v_2305 ?v_1374) (= tmp29 0)) (=> (and ?v_2305 ?v_1376) ?v_2306) (=> (and x53 ?v_1374) ?v_2306) (=> (and x53 ?v_1376) (= tmp29 8)) (=> (and ?v_2307 ?v_126) (= tmp28 0)) (=> (and ?v_2307 ?v_128) (= tmp28 2)) (=> (and x94 ?v_126) (= tmp28 4)) (=> (and x94 ?v_128) (= tmp28 6)) (=> (and ?v_2308 ?v_1438) (= tmp27 0)) (=> (and ?v_2308 ?v_1440) (= tmp27 4)) (=> (and x51 ?v_1438) (= tmp27 2)) (=> (and x51 ?v_1440) (= tmp27 6)) (=> (and ?v_2309 ?v_62) (= tmp26 0)) (=> (and ?v_2309 ?v_64) ?v_2310) (=> (and x96 ?v_62) ?v_2310) (=> (and x96 ?v_64) (= tmp26 8)) (=> (and ?v_2311 ?v_1502) (= tmp25 0)) (=> (and ?v_2311 ?v_1504) ?v_2312) (=> (and x49 ?v_1502) ?v_2312) (=> (and x49 ?v_1504) (= tmp25 4)) (=> (and ?v_733 true) (= tmp24 0)) (=> (and x26 true) (= tmp24 4)) (=> (and ?v_797 ?v_2313) (= tmp23 0)) (=> (and ?v_797 ?v_2314) (= tmp23 4)) (=> (and x24 ?v_2313) (= tmp23 2)) (=> (and x24 ?v_2314) (= tmp23 6)) (=> (and ?v_669 ?v_2315) (= tmp22 0)) (=> (and ?v_669 ?v_2317) ?v_2316) (=> (and x28 ?v_2315) ?v_2316) (=> (and x28 ?v_2317) (= tmp22 8)) (=> (and ?v_861 ?v_2318) (= tmp21 0)) (=> (and ?v_861 ?v_2320) ?v_2319) (=> (and x22 ?v_2318) ?v_2319) (=> (and x22 ?v_2320) (= tmp21 4)) (=> (and ?v_605 ?v_2321) (= tmp20 0)) (=> (and ?v_605 ?v_2322) (= tmp20 4)) (=> (and x30 ?v_2321) (= tmp20 2)) (=> (and x30 ?v_2322) (= tmp20 6)) (=> (and ?v_925 ?v_2323) (= tmp19 0)) (=> (and ?v_925 ?v_2325) ?v_2324) (=> (and x20 ?v_2323) ?v_2324) (=> (and x20 ?v_2325) (= tmp19 4)) (=> (and ?v_541 ?v_2326) (= tmp18 0)) (=> (and ?v_541 ?v_2328) ?v_2327) (=> (and x32 ?v_2326) ?v_2327) (=> (and x32 ?v_2328) (= tmp18 4)) (=> (and ?v_989 ?v_2329) (= tmp17 0)) (=> (and ?v_989 ?v_2330) (= tmp17 2)) (=> (and x18 ?v_2329) (= tmp17 1)) (=> (and x18 ?v_2330) (= tmp17 3)) (=> (and ?v_477 ?v_2331) (= tmp16 0)) (=> (and ?v_477 ?v_2333) ?v_2332) (=> (and x34 ?v_2331) ?v_2332) (=> (and x34 ?v_2333) (= tmp16 8)) (=> (and ?v_1085 ?v_2334) (= tmp15 0)) (=> (and ?v_1085 ?v_2335) (= tmp15 1)) (=> (and x16 ?v_2334) (= tmp15 2)) (=> (and x16 ?v_2335) (= tmp15 3)) (=> (and ?v_413 ?v_2336) (= tmp14 0)) (=> (and ?v_413 ?v_2338) ?v_2337) (=> (and x36 ?v_2336) ?v_2337) (=> (and x36 ?v_2338) (= tmp14 12)) (=> (and ?v_1149 ?v_2339) (= tmp13 0)) (=> (and ?v_1149 ?v_2341) ?v_2340) (=> (and x14 ?v_2339) ?v_2340) (=> (and x14 ?v_2341) (= tmp13 4)) (=> (and ?v_349 ?v_2342) (= tmp12 0)) (=> (and ?v_349 ?v_2344) ?v_2343) (=> (and x38 ?v_2342) ?v_2343) (=> (and x38 ?v_2344) (= tmp12 12)) (=> (and ?v_1213 ?v_2345) (= tmp11 0)) (=> (and ?v_1213 ?v_2347) ?v_2346) (=> (and x12 ?v_2345) ?v_2346) (=> (and x12 ?v_2347) (= tmp11 4)) (=> (and ?v_285 ?v_2348) (= tmp10 0)) (=> (and ?v_285 ?v_2349) (= tmp10 8)) (=> (and x40 ?v_2348) (= tmp10 6)) (=> (and x40 ?v_2349) (= tmp10 14)) (=> (and ?v_1277 ?v_2350) (= tmp9 0)) (=> (and ?v_1277 ?v_2352) ?v_2351) (=> (and x10 ?v_2350) ?v_2351) (=> (and x10 ?v_2352) (= tmp9 4)) (=> (and ?v_221 ?v_2353) (= tmp8 0)) (=> (and ?v_221 ?v_2355) ?v_2354) (=> (and x42 ?v_2353) ?v_2354) (=> (and x42 ?v_2355) (= tmp8 12)) (=> (and ?v_1341 ?v_2356) (= tmp7 0)) (=> (and ?v_1341 ?v_2357) (= tmp7 2)) (=> (and x8 ?v_2356) (= tmp7 4)) (=> (and x8 ?v_2357) (= tmp7 6)) (=> (and ?v_157 ?v_2358) (= tmp6 0)) (=> (and ?v_157 ?v_2359) (= tmp6 6)) (=> (and x44 ?v_2358) (= tmp6 4)) (=> (and x44 ?v_2359) (= tmp6 10)) (=> (and ?v_1405 ?v_2360) (= tmp5 0)) (=> (and ?v_1405 ?v_2362) ?v_2361) (=> (and x6 ?v_2360) ?v_2361) (=> (and x6 ?v_2362) (= tmp5 8)) (=> (and ?v_93 ?v_2363) (= tmp4 0)) (=> (and ?v_93 ?v_2365) ?v_2364) (=> (and x46 ?v_2363) ?v_2364) (=> (and x46 ?v_2365) (= tmp4 8)) (=> (and ?v_1469 ?v_2366) (= tmp3 0)) (=> (and ?v_1469 ?v_2368) ?v_2367) (=> (and x4 ?v_2366) ?v_2367) (=> (and x4 ?v_2368) (= tmp3 8)) (=> (and ?v_29 ?v_2369) (= tmp2 0)) (=> (and ?v_29 ?v_2371) ?v_2370) (=> (and x48 ?v_2369) ?v_2370) (=> (and x48 ?v_2371) (= tmp2 8)) (=> (and ?v_1533 ?v_2372) (= tmp1 0)) (=> (and ?v_1533 ?v_2374) ?v_2373) (=> (and x2 ?v_2372) ?v_2373) (=> (and x2 ?v_2374) (= tmp1 8))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+(check-sat)
+(exit)
diff --git a/test/regress/regress0/arith/miplib-pp08a-3000.smt b/test/regress/regress0/arith/miplib-pp08a-3000.smt
new file mode 100644
index 000000000..21c588ad3
--- /dev/null
+++ b/test/regress/regress0/arith/miplib-pp08a-3000.smt
@@ -0,0 +1,1427 @@
+(benchmark mip_pp08a
+:source {
+Relaxation of the Mixed-Integer Programming
+optimization problem pp08a from the MIPLIB (http://miplib.zib.de/)
+by Enric Rodriguez-Carbonell (erodri@lsi.upc.edu)
+}
+ :status unsat
+ :category { industrial }
+ :difficulty { 2 }
+ :logic QF_LRA
+
+ :extrafuns ((tmp75 Real))
+ :extrafuns ((tmp74 Real))
+ :extrafuns ((tmp73 Real))
+ :extrafuns ((tmp72 Real))
+ :extrafuns ((tmp71 Real))
+ :extrafuns ((tmp70 Real))
+ :extrafuns ((tmp69 Real))
+ :extrafuns ((tmp68 Real))
+ :extrafuns ((tmp67 Real))
+ :extrafuns ((tmp66 Real))
+ :extrafuns ((tmp65 Real))
+ :extrafuns ((tmp64 Real))
+ :extrafuns ((tmp63 Real))
+ :extrafuns ((tmp62 Real))
+ :extrafuns ((tmp61 Real))
+ :extrafuns ((tmp60 Real))
+ :extrafuns ((tmp59 Real))
+ :extrafuns ((tmp58 Real))
+ :extrafuns ((tmp57 Real))
+ :extrafuns ((tmp56 Real))
+ :extrafuns ((tmp55 Real))
+ :extrafuns ((tmp54 Real))
+ :extrafuns ((tmp53 Real))
+ :extrafuns ((tmp52 Real))
+ :extrafuns ((tmp51 Real))
+ :extrafuns ((tmp50 Real))
+ :extrafuns ((tmp49 Real))
+ :extrafuns ((tmp48 Real))
+ :extrafuns ((tmp47 Real))
+ :extrafuns ((tmp46 Real))
+ :extrafuns ((tmp45 Real))
+ :extrafuns ((tmp44 Real))
+ :extrafuns ((tmp43 Real))
+ :extrafuns ((tmp42 Real))
+ :extrafuns ((tmp41 Real))
+ :extrafuns ((tmp40 Real))
+ :extrafuns ((tmp39 Real))
+ :extrafuns ((tmp38 Real))
+ :extrafuns ((tmp37 Real))
+ :extrafuns ((tmp36 Real))
+ :extrafuns ((tmp35 Real))
+ :extrafuns ((tmp34 Real))
+ :extrafuns ((tmp33 Real))
+ :extrafuns ((tmp32 Real))
+ :extrafuns ((tmp31 Real))
+ :extrafuns ((tmp30 Real))
+ :extrafuns ((tmp29 Real))
+ :extrafuns ((tmp28 Real))
+ :extrafuns ((tmp27 Real))
+ :extrafuns ((tmp26 Real))
+ :extrafuns ((tmp25 Real))
+ :extrafuns ((tmp24 Real))
+ :extrafuns ((tmp23 Real))
+ :extrafuns ((tmp22 Real))
+ :extrafuns ((tmp21 Real))
+ :extrafuns ((tmp20 Real))
+ :extrafuns ((tmp19 Real))
+ :extrafuns ((tmp18 Real))
+ :extrafuns ((tmp17 Real))
+ :extrafuns ((tmp16 Real))
+ :extrafuns ((tmp15 Real))
+ :extrafuns ((tmp14 Real))
+ :extrafuns ((tmp13 Real))
+ :extrafuns ((tmp12 Real))
+ :extrafuns ((tmp11 Real))
+ :extrafuns ((tmp10 Real))
+ :extrafuns ((tmp9 Real))
+ :extrafuns ((tmp8 Real))
+ :extrafuns ((tmp7 Real))
+ :extrafuns ((tmp6 Real))
+ :extrafuns ((tmp5 Real))
+ :extrafuns ((tmp4 Real))
+ :extrafuns ((tmp3 Real))
+ :extrafuns ((tmp2 Real))
+ :extrafuns ((tmp1 Real))
+ :extrafuns ((x113 Real))
+ :extrafuns ((x114 Real))
+ :extrafuns ((x115 Real))
+ :extrafuns ((x116 Real))
+ :extrafuns ((x117 Real))
+ :extrafuns ((x118 Real))
+ :extrafuns ((x119 Real))
+ :extrafuns ((x120 Real))
+ :extrafuns ((x121 Real))
+ :extrafuns ((x122 Real))
+ :extrafuns ((x123 Real))
+ :extrafuns ((x124 Real))
+ :extrafuns ((x125 Real))
+ :extrafuns ((x126 Real))
+ :extrafuns ((x127 Real))
+ :extrafuns ((x128 Real))
+ :extrafuns ((x129 Real))
+ :extrafuns ((x130 Real))
+ :extrafuns ((x131 Real))
+ :extrafuns ((x132 Real))
+ :extrafuns ((x133 Real))
+ :extrafuns ((x134 Real))
+ :extrafuns ((x135 Real))
+ :extrafuns ((x136 Real))
+ :extrafuns ((x137 Real))
+ :extrafuns ((x138 Real))
+ :extrafuns ((x139 Real))
+ :extrafuns ((x140 Real))
+ :extrafuns ((x141 Real))
+ :extrafuns ((x142 Real))
+ :extrafuns ((x143 Real))
+ :extrafuns ((x144 Real))
+ :extrafuns ((x145 Real))
+ :extrafuns ((x146 Real))
+ :extrafuns ((x147 Real))
+ :extrafuns ((x148 Real))
+ :extrafuns ((x149 Real))
+ :extrafuns ((x150 Real))
+ :extrafuns ((x151 Real))
+ :extrafuns ((x152 Real))
+ :extrafuns ((x153 Real))
+ :extrafuns ((x154 Real))
+ :extrafuns ((x155 Real))
+ :extrafuns ((x156 Real))
+ :extrafuns ((x157 Real))
+ :extrafuns ((x158 Real))
+ :extrafuns ((x159 Real))
+ :extrafuns ((x160 Real))
+ :extrafuns ((x161 Real))
+ :extrafuns ((x162 Real))
+ :extrafuns ((x163 Real))
+ :extrafuns ((x164 Real))
+ :extrafuns ((x165 Real))
+ :extrafuns ((x166 Real))
+ :extrafuns ((x167 Real))
+ :extrafuns ((x168 Real))
+ :extrafuns ((x169 Real))
+ :extrafuns ((x170 Real))
+ :extrafuns ((x171 Real))
+ :extrafuns ((x172 Real))
+ :extrafuns ((x173 Real))
+ :extrafuns ((x174 Real))
+ :extrafuns ((x175 Real))
+ :extrafuns ((x176 Real))
+ :extrafuns ((x112 Real))
+ :extrafuns ((x111 Real))
+ :extrafuns ((x110 Real))
+ :extrafuns ((x109 Real))
+ :extrafuns ((x108 Real))
+ :extrafuns ((x107 Real))
+ :extrafuns ((x106 Real))
+ :extrafuns ((x105 Real))
+ :extrafuns ((x104 Real))
+ :extrafuns ((x103 Real))
+ :extrafuns ((x102 Real))
+ :extrafuns ((x101 Real))
+ :extrafuns ((x100 Real))
+ :extrafuns ((x99 Real))
+ :extrafuns ((x98 Real))
+ :extrafuns ((x97 Real))
+ :extrafuns ((x96 Real))
+ :extrafuns ((x95 Real))
+ :extrafuns ((x94 Real))
+ :extrafuns ((x93 Real))
+ :extrafuns ((x92 Real))
+ :extrafuns ((x91 Real))
+ :extrafuns ((x90 Real))
+ :extrafuns ((x89 Real))
+ :extrafuns ((x88 Real))
+ :extrafuns ((x87 Real))
+ :extrafuns ((x86 Real))
+ :extrafuns ((x85 Real))
+ :extrafuns ((x84 Real))
+ :extrafuns ((x83 Real))
+ :extrafuns ((x82 Real))
+ :extrafuns ((x81 Real))
+ :extrafuns ((x80 Real))
+ :extrafuns ((x79 Real))
+ :extrafuns ((x78 Real))
+ :extrafuns ((x77 Real))
+ :extrafuns ((x76 Real))
+ :extrafuns ((x75 Real))
+ :extrafuns ((x74 Real))
+ :extrafuns ((x73 Real))
+ :extrafuns ((x72 Real))
+ :extrafuns ((x71 Real))
+ :extrafuns ((x70 Real))
+ :extrafuns ((x69 Real))
+ :extrafuns ((x68 Real))
+ :extrafuns ((x67 Real))
+ :extrafuns ((x66 Real))
+ :extrafuns ((x65 Real))
+ :extrafuns ((x64 Real))
+ :extrafuns ((x63 Real))
+ :extrafuns ((x62 Real))
+ :extrafuns ((x61 Real))
+ :extrafuns ((x60 Real))
+ :extrafuns ((x59 Real))
+ :extrafuns ((x58 Real))
+ :extrafuns ((x57 Real))
+ :extrafuns ((x56 Real))
+ :extrafuns ((x55 Real))
+ :extrafuns ((x54 Real))
+ :extrafuns ((x53 Real))
+ :extrafuns ((x52 Real))
+ :extrafuns ((x51 Real))
+ :extrafuns ((x50 Real))
+ :extrafuns ((x49 Real))
+ :extrafuns ((x48 Real))
+ :extrafuns ((x47 Real))
+ :extrafuns ((x46 Real))
+ :extrafuns ((x45 Real))
+ :extrafuns ((x44 Real))
+ :extrafuns ((x43 Real))
+ :extrafuns ((x42 Real))
+ :extrafuns ((x41 Real))
+ :extrafuns ((x40 Real))
+ :extrafuns ((x39 Real))
+ :extrafuns ((x38 Real))
+ :extrafuns ((x37 Real))
+ :extrafuns ((x36 Real))
+ :extrafuns ((x35 Real))
+ :extrafuns ((x34 Real))
+ :extrafuns ((x33 Real))
+ :extrafuns ((x32 Real))
+ :extrafuns ((x31 Real))
+ :extrafuns ((x30 Real))
+ :extrafuns ((x29 Real))
+ :extrafuns ((x28 Real))
+ :extrafuns ((x27 Real))
+ :extrafuns ((x26 Real))
+ :extrafuns ((x25 Real))
+ :extrafuns ((x24 Real))
+ :extrafuns ((x23 Real))
+ :extrafuns ((x22 Real))
+ :extrafuns ((x21 Real))
+ :extrafuns ((x20 Real))
+ :extrafuns ((x19 Real))
+ :extrafuns ((x18 Real))
+ :extrafuns ((x17 Real))
+ :extrafuns ((x16 Real))
+ :extrafuns ((x15 Real))
+ :extrafuns ((x14 Real))
+ :extrafuns ((x13 Real))
+ :extrafuns ((x12 Real))
+ :extrafuns ((x11 Real))
+ :extrafuns ((x10 Real))
+ :extrafuns ((x9 Real))
+ :extrafuns ((x8 Real))
+ :extrafuns ((x7 Real))
+ :extrafuns ((x6 Real))
+ :extrafuns ((x5 Real))
+ :extrafuns ((x4 Real))
+ :extrafuns ((x3 Real))
+ :extrafuns ((x2 Real))
+ :extrafuns ((x1 Real))
+ :extrapreds ((x177))
+ :extrapreds ((x178))
+ :extrapreds ((x179))
+ :extrapreds ((x180))
+ :extrapreds ((x181))
+ :extrapreds ((x182))
+ :extrapreds ((x183))
+ :extrapreds ((x184))
+ :extrapreds ((x185))
+ :extrapreds ((x186))
+ :extrapreds ((x187))
+ :extrapreds ((x188))
+ :extrapreds ((x189))
+ :extrapreds ((x190))
+ :extrapreds ((x191))
+ :extrapreds ((x192))
+ :extrapreds ((x193))
+ :extrapreds ((x194))
+ :extrapreds ((x195))
+ :extrapreds ((x196))
+ :extrapreds ((x197))
+ :extrapreds ((x198))
+ :extrapreds ((x199))
+ :extrapreds ((x200))
+ :extrapreds ((x201))
+ :extrapreds ((x202))
+ :extrapreds ((x203))
+ :extrapreds ((x204))
+ :extrapreds ((x205))
+ :extrapreds ((x206))
+ :extrapreds ((x207))
+ :extrapreds ((x208))
+ :extrapreds ((x209))
+ :extrapreds ((x210))
+ :extrapreds ((x211))
+ :extrapreds ((x212))
+ :extrapreds ((x213))
+ :extrapreds ((x214))
+ :extrapreds ((x215))
+ :extrapreds ((x216))
+ :extrapreds ((x217))
+ :extrapreds ((x218))
+ :extrapreds ((x219))
+ :extrapreds ((x220))
+ :extrapreds ((x221))
+ :extrapreds ((x222))
+ :extrapreds ((x223))
+ :extrapreds ((x224))
+ :extrapreds ((x225))
+ :extrapreds ((x226))
+ :extrapreds ((x227))
+ :extrapreds ((x228))
+ :extrapreds ((x229))
+ :extrapreds ((x230))
+ :extrapreds ((x231))
+ :extrapreds ((x232))
+ :extrapreds ((x233))
+ :extrapreds ((x234))
+ :extrapreds ((x235))
+ :extrapreds ((x236))
+ :extrapreds ((x237))
+ :extrapreds ((x238))
+ :extrapreds ((x239))
+ :extrapreds ((x240))
+
+ :formula( and
+ ( <= ( + ( + ( * 1 tmp75 ) 0 ) ( + ( * 1 tmp73 ) ( + ( * 1 tmp71 ) ( + ( * 1 tmp69 ) ( + ( * 1 tmp67 ) ( + ( * 1 tmp65 ) ( + ( * 2 x112 ) ( + ( * 2 x111 ) ( + ( * 2 x110 ) ( + ( * 2 x109 ) ( + ( * 2 x108 ) ( + ( * 2 x107 ) ( + ( * 2 x106 ) ( + ( * 2 x105 ) ( + ( * 2 x104 ) ( + ( * 2 x103 ) ( + ( * 2 x102 ) ( + ( * 2 x101 ) ( + ( * 2 x100 ) ( + ( * 2 x99 ) ( + ( * 2 x98 ) ( + ( * 2 x97 ) ( + ( * 2 x96 ) ( + ( * 2 x95 ) ( + ( * 2 x94 ) ( + ( * 2 x93 ) ( + ( * 2 x92 ) ( + ( * 2 x91 ) ( + ( * 2 x90 ) ( + ( * 2 x89 ) ( + ( * 2 x88 ) ( + ( * 2 x87 ) ( + ( * 2 x86 ) ( + ( * 2 x85 ) ( + ( * 2 x84 ) ( + ( * 2 x83 ) ( + ( * 2 x82 ) ( + ( * 2 x81 ) ( + ( * 2 x80 ) ( + ( * 2 x79 ) ( + ( * 2 x78 ) ( + ( * 2 x77 ) ( + ( * 2 x76 ) ( + ( * 2 x75 ) ( + ( * 2 x74 ) ( + ( * 2 x73 ) ( + ( * 2 x72 ) ( + ( * 2 x71 ) ( + ( * 2 x70 ) ( + ( * 2 x69 ) ( + ( * 2 x68 ) ( + ( * 2 x67 ) ( + ( * 2 x66 ) ( + ( * 2 x65 ) ( + ( * 2 x64 ) ( + ( * 2 x63 ) ( + ( * 2 x62 ) ( + ( * 2 x61 ) ( + ( * 2 x60 ) ( + ( * 2 x59 ) ( + ( * 2 x58 ) ( + ( * 2 x57 ) ( + ( * 1 x56 ) ( + ( * 1 x55 ) ( + ( * 1 x54 ) ( + ( * 1 x53 ) ( + ( * 1 x52 ) ( + ( * 1 x51 ) ( + ( * 1 x50 ) ( + ( * 1 x49 ) ( + ( * 1 x48 ) ( + ( * 1 x47 ) ( + ( * 1 x46 ) ( + ( * 1 x45 ) ( + ( * 1 x44 ) ( + ( * 1 x43 ) ( + ( * 1 x42 ) ( + ( * 1 x41 ) ( + ( * 1 x40 ) ( + ( * 1 x39 ) ( + ( * 1 x38 ) ( + ( * 1 x37 ) ( + ( * 1 x36 ) ( + ( * 1 x35 ) ( + ( * 1 x34 ) ( + ( * 1 x33 ) ( + ( * 1 x32 ) ( + ( * 1 x31 ) ( + ( * 1 x30 ) ( + ( * 1 x29 ) ( + ( * 1 x28 ) ( + ( * 1 x27 ) ( + ( * 1 x26 ) ( + ( * 1 x25 ) ( + ( * 1 x24 ) ( + ( * 1 x23 ) ( + ( * 1 x22 ) ( + ( * 1 x21 ) ( + ( * 1 x20 ) ( + ( * 1 x19 ) ( + ( * 1 x18 ) ( + ( * 1 x17 ) ( + ( * 1 x16 ) ( + ( * 1 x15 ) ( + ( * 1 x14 ) ( + ( * 1 x13 ) ( + ( * 1 x12 ) ( + ( * 1 x11 ) ( + ( * 1 x10 ) ( + ( * 1 x9 ) ( + ( * 1 x8 ) ( + ( * 1 x7 ) ( + ( * 1 x6 ) ( + ( * 1 x5 ) ( + ( * 1 x4 ) ( + ( * 1 x3 ) ( + ( * 1 x2 ) ( + ( * 1 x1 ) ( + ( * 1 tmp66 ) ( + ( * 1 tmp68 ) ( + ( * 1 tmp70 ) ( + ( * 1 tmp72 ) ( + ( * 1 tmp74 ) 0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3000 )
+ ( <= ( + ( + ( * 1 tmp64 ) 0 ) ( + ( * 1 x176 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp63 ) 0 ) ( + ( * 1 x175 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp62 ) 0 ) ( + ( * 1 x174 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp61 ) 0 ) ( + ( * 1 x173 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp60 ) 0 ) ( + ( * 1 x172 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp59 ) 0 ) ( + ( * 1 x171 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp58 ) 0 ) ( + ( * 1 x170 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp57 ) 0 ) ( + ( * 1 x169 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp56 ) 0 ) ( + ( * 1 x168 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp55 ) 0 ) ( + ( * 1 x167 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp54 ) 0 ) ( + ( * 1 x166 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp53 ) 0 ) ( + ( * 1 x165 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp52 ) 0 ) ( + ( * 1 x164 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp51 ) 0 ) ( + ( * 1 x163 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp50 ) 0 ) ( + ( * 1 x162 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp49 ) 0 ) ( + ( * 1 x161 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp48 ) 0 ) ( + ( * 1 x160 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp47 ) 0 ) ( + ( * 1 x159 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp46 ) 0 ) ( + ( * 1 x158 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp45 ) 0 ) ( + ( * 1 x157 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp44 ) 0 ) ( + ( * 1 x156 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp43 ) 0 ) ( + ( * 1 x155 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp42 ) 0 ) ( + ( * 1 x154 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp41 ) 0 ) ( + ( * 1 x153 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp40 ) 0 ) ( + ( * 1 x152 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp39 ) 0 ) ( + ( * 1 x151 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp38 ) 0 ) ( + ( * 1 x150 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp37 ) 0 ) ( + ( * 1 x149 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp36 ) 0 ) ( + ( * 1 x148 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp35 ) 0 ) ( + ( * 1 x147 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp34 ) 0 ) ( + ( * 1 x146 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp33 ) 0 ) ( + ( * 1 x145 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp32 ) 0 ) ( + ( * 1 x144 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp31 ) 0 ) ( + ( * 1 x143 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp30 ) 0 ) ( + ( * 1 x142 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp29 ) 0 ) ( + ( * 1 x141 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp28 ) 0 ) ( + ( * 1 x140 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp27 ) 0 ) ( + ( * 1 x139 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp26 ) 0 ) ( + ( * 1 x138 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp25 ) 0 ) ( + ( * 1 x137 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp24 ) 0 ) ( + ( * 1 x136 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp23 ) 0 ) ( + ( * 1 x135 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp22 ) 0 ) ( + ( * 1 x134 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp21 ) 0 ) ( + ( * 1 x133 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp20 ) 0 ) ( + ( * 1 x132 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp19 ) 0 ) ( + ( * 1 x131 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp18 ) 0 ) ( + ( * 1 x130 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp17 ) 0 ) ( + ( * 1 x129 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp16 ) 0 ) ( + ( * 1 x128 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp15 ) 0 ) ( + ( * 1 x127 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp14 ) 0 ) ( + ( * 1 x126 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp13 ) 0 ) ( + ( * 1 x125 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp12 ) 0 ) ( + ( * 1 x124 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp11 ) 0 ) ( + ( * 1 x123 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp10 ) 0 ) ( + ( * 1 x122 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp9 ) 0 ) ( + ( * 1 x121 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp8 ) 0 ) ( + ( * 1 x120 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp7 ) 0 ) ( + ( * 1 x119 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp6 ) 0 ) ( + ( * 1 x118 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp5 ) 0 ) ( + ( * 1 x117 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp4 ) 0 ) ( + ( * 1 x116 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp3 ) 0 ) ( + ( * 1 x115 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp2 ) 0 ) ( + ( * 1 x114 ) 0 ) ) 0 )
+ ( <= ( + ( + ( * 1 tmp1 ) 0 ) ( + ( * 1 x113 ) 0 ) ) 0 )
+ ( <= ( + ( + ( + ( + ( + ( + ( + ( + 0 ( * 1 x120 ) ) ( * 1 x128 ) ) ( * 1 x136 ) ) ( * 1 x144 ) ) ( * 1 x152 ) ) ( * 1 x160 ) ) ( * 1 x168 ) ) ( * 1 x176 ) ) 500 )
+ ( <= ( + ( + ( + ( + ( + ( + ( + ( + 0 ( * 1 x119 ) ) ( * 1 x127 ) ) ( * 1 x135 ) ) ( * 1 x143 ) ) ( * 1 x151 ) ) ( * 1 x159 ) ) ( * 1 x167 ) ) ( * 1 x175 ) ) 400 )
+ ( <= ( + ( + ( + ( + ( + ( + ( + ( + 0 ( * 1 x118 ) ) ( * 1 x126 ) ) ( * 1 x134 ) ) ( * 1 x142 ) ) ( * 1 x150 ) ) ( * 1 x158 ) ) ( * 1 x166 ) ) ( * 1 x174 ) ) 400 )
+ ( <= ( + ( + ( + ( + ( + ( + ( + ( + 0 ( * 1 x117 ) ) ( * 1 x125 ) ) ( * 1 x133 ) ) ( * 1 x141 ) ) ( * 1 x149 ) ) ( * 1 x157 ) ) ( * 1 x165 ) ) ( * 1 x173 ) ) 400 )
+ ( <= ( + ( + ( + ( + ( + ( + ( + ( + 0 ( * 1 x116 ) ) ( * 1 x124 ) ) ( * 1 x132 ) ) ( * 1 x140 ) ) ( * 1 x148 ) ) ( * 1 x156 ) ) ( * 1 x164 ) ) ( * 1 x172 ) ) 400 )
+ ( <= ( + ( + ( + ( + ( + ( + ( + ( + 0 ( * 1 x115 ) ) ( * 1 x123 ) ) ( * 1 x131 ) ) ( * 1 x139 ) ) ( * 1 x147 ) ) ( * 1 x155 ) ) ( * 1 x163 ) ) ( * 1 x171 ) ) 350 )
+ ( <= ( + ( + ( + ( + ( + ( + ( + ( + 0 ( * 1 x114 ) ) ( * 1 x122 ) ) ( * 1 x130 ) ) ( * 1 x138 ) ) ( * 1 x146 ) ) ( * 1 x154 ) ) ( * 1 x162 ) ) ( * 1 x170 ) ) 350 )
+ ( <= ( + ( + ( + ( + ( + ( + ( + ( + 0 ( * 1 x113 ) ) ( * 1 x121 ) ) ( * 1 x129 ) ) ( * 1 x137 ) ) ( * 1 x145 ) ) ( * 1 x153 ) ) ( * 1 x161 ) ) ( * 1 x169 ) ) 350 )
+ ( = ( + ( + ( + 0 ( * 1 x56 ) ) ( * (~ 1) x112 ) ) ( * 1 x176 ) ) 30 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x55 ) ) ( * (~ 1) x56 ) ) ( * (~ 1) x111 ) ) ( * 1 x112 ) ) ( * 1 x175 ) ) 20 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x54 ) ) ( * (~ 1) x55 ) ) ( * (~ 1) x110 ) ) ( * 1 x111 ) ) ( * 1 x174 ) ) 10 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x53 ) ) ( * (~ 1) x54 ) ) ( * (~ 1) x109 ) ) ( * 1 x110 ) ) ( * 1 x173 ) ) 10 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x52 ) ) ( * (~ 1) x53 ) ) ( * (~ 1) x108 ) ) ( * 1 x109 ) ) ( * 1 x172 ) ) 0 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x51 ) ) ( * (~ 1) x52 ) ) ( * (~ 1) x107 ) ) ( * 1 x108 ) ) ( * 1 x171 ) ) 0 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x50 ) ) ( * (~ 1) x51 ) ) ( * (~ 1) x106 ) ) ( * 1 x107 ) ) ( * 1 x170 ) ) 20 )
+ ( = ( + ( + ( + 0 ( * (~ 1) x50 ) ) ( * 1 x106 ) ) ( * 1 x169 ) ) 10 )
+ ( = ( + ( + ( + 0 ( * 1 x49 ) ) ( * (~ 1) x105 ) ) ( * 1 x168 ) ) 40 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x48 ) ) ( * (~ 1) x49 ) ) ( * (~ 1) x104 ) ) ( * 1 x105 ) ) ( * 1 x167 ) ) 40 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x47 ) ) ( * (~ 1) x48 ) ) ( * (~ 1) x103 ) ) ( * 1 x104 ) ) ( * 1 x166 ) ) 60 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x46 ) ) ( * (~ 1) x47 ) ) ( * (~ 1) x102 ) ) ( * 1 x103 ) ) ( * 1 x165 ) ) 20 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x45 ) ) ( * (~ 1) x46 ) ) ( * (~ 1) x101 ) ) ( * 1 x102 ) ) ( * 1 x164 ) ) 10 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x44 ) ) ( * (~ 1) x45 ) ) ( * (~ 1) x100 ) ) ( * 1 x101 ) ) ( * 1 x163 ) ) 50 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x43 ) ) ( * (~ 1) x44 ) ) ( * (~ 1) x99 ) ) ( * 1 x100 ) ) ( * 1 x162 ) ) 20 )
+ ( = ( + ( + ( + 0 ( * (~ 1) x43 ) ) ( * 1 x99 ) ) ( * 1 x161 ) ) 0 )
+ ( = ( + ( + ( + 0 ( * 1 x42 ) ) ( * (~ 1) x98 ) ) ( * 1 x160 ) ) 50 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x41 ) ) ( * (~ 1) x42 ) ) ( * (~ 1) x97 ) ) ( * 1 x98 ) ) ( * 1 x159 ) ) 40 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x40 ) ) ( * (~ 1) x41 ) ) ( * (~ 1) x96 ) ) ( * 1 x97 ) ) ( * 1 x158 ) ) 20 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x39 ) ) ( * (~ 1) x40 ) ) ( * (~ 1) x95 ) ) ( * 1 x96 ) ) ( * 1 x157 ) ) 100 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x38 ) ) ( * (~ 1) x39 ) ) ( * (~ 1) x94 ) ) ( * 1 x95 ) ) ( * 1 x156 ) ) 40 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x37 ) ) ( * (~ 1) x38 ) ) ( * (~ 1) x93 ) ) ( * 1 x94 ) ) ( * 1 x155 ) ) 40 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x36 ) ) ( * (~ 1) x37 ) ) ( * (~ 1) x92 ) ) ( * 1 x93 ) ) ( * 1 x154 ) ) 40 )
+ ( = ( + ( + ( + 0 ( * (~ 1) x36 ) ) ( * 1 x92 ) ) ( * 1 x153 ) ) 70 )
+ ( = ( + ( + ( + 0 ( * 1 x35 ) ) ( * (~ 1) x91 ) ) ( * 1 x152 ) ) 10 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x34 ) ) ( * (~ 1) x35 ) ) ( * (~ 1) x90 ) ) ( * 1 x91 ) ) ( * 1 x151 ) ) 20 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x33 ) ) ( * (~ 1) x34 ) ) ( * (~ 1) x89 ) ) ( * 1 x90 ) ) ( * 1 x150 ) ) 10 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x32 ) ) ( * (~ 1) x33 ) ) ( * (~ 1) x88 ) ) ( * 1 x89 ) ) ( * 1 x149 ) ) 10 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x31 ) ) ( * (~ 1) x32 ) ) ( * (~ 1) x87 ) ) ( * 1 x88 ) ) ( * 1 x148 ) ) 40 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x30 ) ) ( * (~ 1) x31 ) ) ( * (~ 1) x86 ) ) ( * 1 x87 ) ) ( * 1 x147 ) ) 20 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x29 ) ) ( * (~ 1) x30 ) ) ( * (~ 1) x85 ) ) ( * 1 x86 ) ) ( * 1 x146 ) ) 0 )
+ ( = ( + ( + ( + 0 ( * (~ 1) x29 ) ) ( * 1 x85 ) ) ( * 1 x145 ) ) 50 )
+ ( = ( + ( + ( + 0 ( * 1 x28 ) ) ( * (~ 1) x84 ) ) ( * 1 x144 ) ) 100 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x27 ) ) ( * (~ 1) x28 ) ) ( * (~ 1) x83 ) ) ( * 1 x84 ) ) ( * 1 x143 ) ) 100 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x26 ) ) ( * (~ 1) x27 ) ) ( * (~ 1) x82 ) ) ( * 1 x83 ) ) ( * 1 x142 ) ) 90 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x25 ) ) ( * (~ 1) x26 ) ) ( * (~ 1) x81 ) ) ( * 1 x82 ) ) ( * 1 x141 ) ) 160 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x24 ) ) ( * (~ 1) x25 ) ) ( * (~ 1) x80 ) ) ( * 1 x81 ) ) ( * 1 x140 ) ) 150 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x23 ) ) ( * (~ 1) x24 ) ) ( * (~ 1) x79 ) ) ( * 1 x80 ) ) ( * 1 x139 ) ) 100 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x22 ) ) ( * (~ 1) x23 ) ) ( * (~ 1) x78 ) ) ( * 1 x79 ) ) ( * 1 x138 ) ) 100 )
+ ( = ( + ( + ( + 0 ( * (~ 1) x22 ) ) ( * 1 x78 ) ) ( * 1 x137 ) ) 0 )
+ ( = ( + ( + ( + 0 ( * 1 x21 ) ) ( * (~ 1) x77 ) ) ( * 1 x136 ) ) 160 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x20 ) ) ( * (~ 1) x21 ) ) ( * (~ 1) x76 ) ) ( * 1 x77 ) ) ( * 1 x135 ) ) 90 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x19 ) ) ( * (~ 1) x20 ) ) ( * (~ 1) x75 ) ) ( * 1 x76 ) ) ( * 1 x134 ) ) 80 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x18 ) ) ( * (~ 1) x19 ) ) ( * (~ 1) x74 ) ) ( * 1 x75 ) ) ( * 1 x133 ) ) 40 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x17 ) ) ( * (~ 1) x18 ) ) ( * (~ 1) x73 ) ) ( * 1 x74 ) ) ( * 1 x132 ) ) 100 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x16 ) ) ( * (~ 1) x17 ) ) ( * (~ 1) x72 ) ) ( * 1 x73 ) ) ( * 1 x131 ) ) 0 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x15 ) ) ( * (~ 1) x16 ) ) ( * (~ 1) x71 ) ) ( * 1 x72 ) ) ( * 1 x130 ) ) 50 )
+ ( = ( + ( + ( + 0 ( * (~ 1) x15 ) ) ( * 1 x71 ) ) ( * 1 x129 ) ) 40 )
+ ( = ( + ( + ( + 0 ( * 1 x14 ) ) ( * (~ 1) x70 ) ) ( * 1 x128 ) ) 50 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x13 ) ) ( * (~ 1) x14 ) ) ( * (~ 1) x69 ) ) ( * 1 x70 ) ) ( * 1 x127 ) ) 40 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x12 ) ) ( * (~ 1) x13 ) ) ( * (~ 1) x68 ) ) ( * 1 x69 ) ) ( * 1 x126 ) ) 0 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x11 ) ) ( * (~ 1) x12 ) ) ( * (~ 1) x67 ) ) ( * 1 x68 ) ) ( * 1 x125 ) ) 30 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x10 ) ) ( * (~ 1) x11 ) ) ( * (~ 1) x66 ) ) ( * 1 x67 ) ) ( * 1 x124 ) ) 10 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x9 ) ) ( * (~ 1) x10 ) ) ( * (~ 1) x65 ) ) ( * 1 x66 ) ) ( * 1 x123 ) ) 50 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x8 ) ) ( * (~ 1) x9 ) ) ( * (~ 1) x64 ) ) ( * 1 x65 ) ) ( * 1 x122 ) ) 40 )
+ ( = ( + ( + ( + 0 ( * (~ 1) x8 ) ) ( * 1 x64 ) ) ( * 1 x121 ) ) 20 )
+ ( = ( + ( + ( + 0 ( * 1 x7 ) ) ( * (~ 1) x63 ) ) ( * 1 x120 ) ) 100 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x6 ) ) ( * (~ 1) x7 ) ) ( * (~ 1) x62 ) ) ( * 1 x63 ) ) ( * 1 x119 ) ) 0 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x5 ) ) ( * (~ 1) x6 ) ) ( * (~ 1) x61 ) ) ( * 1 x62 ) ) ( * 1 x118 ) ) 80 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x4 ) ) ( * (~ 1) x5 ) ) ( * (~ 1) x60 ) ) ( * 1 x61 ) ) ( * 1 x117 ) ) 20 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x3 ) ) ( * (~ 1) x4 ) ) ( * (~ 1) x59 ) ) ( * 1 x60 ) ) ( * 1 x116 ) ) 100 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x2 ) ) ( * (~ 1) x3 ) ) ( * (~ 1) x58 ) ) ( * 1 x59 ) ) ( * 1 x115 ) ) 50 )
+ ( = ( + ( + ( + ( + ( + 0 ( * 1 x1 ) ) ( * (~ 1) x2 ) ) ( * (~ 1) x57 ) ) ( * 1 x58 ) ) ( * 1 x114 ) ) 70 )
+ ( = ( + ( + ( + 0 ( * (~ 1) x1 ) ) ( * 1 x57 ) ) ( * 1 x113 ) ) 0 )
+ ( >= x1 0 )
+ ( >= x2 0 )
+ ( >= x3 0 )
+ ( >= x4 0 )
+ ( >= x5 0 )
+ ( >= x6 0 )
+ ( >= x7 0 )
+ ( >= x8 0 )
+ ( >= x9 0 )
+ ( >= x10 0 )
+ ( >= x11 0 )
+ ( >= x12 0 )
+ ( >= x13 0 )
+ ( >= x14 0 )
+ ( >= x15 0 )
+ ( >= x16 0 )
+ ( >= x17 0 )
+ ( >= x18 0 )
+ ( >= x19 0 )
+ ( >= x20 0 )
+ ( >= x21 0 )
+ ( >= x22 0 )
+ ( >= x23 0 )
+ ( >= x24 0 )
+ ( >= x25 0 )
+ ( >= x26 0 )
+ ( >= x27 0 )
+ ( >= x28 0 )
+ ( >= x29 0 )
+ ( >= x30 0 )
+ ( >= x31 0 )
+ ( >= x32 0 )
+ ( >= x33 0 )
+ ( >= x34 0 )
+ ( >= x35 0 )
+ ( >= x36 0 )
+ ( >= x37 0 )
+ ( >= x38 0 )
+ ( >= x39 0 )
+ ( >= x40 0 )
+ ( >= x41 0 )
+ ( >= x42 0 )
+ ( >= x43 0 )
+ ( >= x44 0 )
+ ( >= x45 0 )
+ ( >= x46 0 )
+ ( >= x47 0 )
+ ( >= x48 0 )
+ ( >= x49 0 )
+ ( >= x50 0 )
+ ( >= x51 0 )
+ ( >= x52 0 )
+ ( >= x53 0 )
+ ( >= x54 0 )
+ ( >= x55 0 )
+ ( >= x56 0 )
+ ( >= x57 0 )
+ ( >= x58 0 )
+ ( >= x59 0 )
+ ( >= x60 0 )
+ ( >= x61 0 )
+ ( >= x62 0 )
+ ( >= x63 0 )
+ ( >= x64 0 )
+ ( >= x65 0 )
+ ( >= x66 0 )
+ ( >= x67 0 )
+ ( >= x68 0 )
+ ( >= x69 0 )
+ ( >= x70 0 )
+ ( >= x71 0 )
+ ( >= x72 0 )
+ ( >= x73 0 )
+ ( >= x74 0 )
+ ( >= x75 0 )
+ ( >= x76 0 )
+ ( >= x77 0 )
+ ( >= x78 0 )
+ ( >= x79 0 )
+ ( >= x80 0 )
+ ( >= x81 0 )
+ ( >= x82 0 )
+ ( >= x83 0 )
+ ( >= x84 0 )
+ ( >= x85 0 )
+ ( >= x86 0 )
+ ( >= x87 0 )
+ ( >= x88 0 )
+ ( >= x89 0 )
+ ( >= x90 0 )
+ ( >= x91 0 )
+ ( >= x92 0 )
+ ( >= x93 0 )
+ ( >= x94 0 )
+ ( >= x95 0 )
+ ( >= x96 0 )
+ ( >= x97 0 )
+ ( >= x98 0 )
+ ( >= x99 0 )
+ ( >= x100 0 )
+ ( >= x101 0 )
+ ( >= x102 0 )
+ ( >= x103 0 )
+ ( >= x104 0 )
+ ( >= x105 0 )
+ ( >= x106 0 )
+ ( >= x107 0 )
+ ( >= x108 0 )
+ ( >= x109 0 )
+ ( >= x110 0 )
+ ( >= x111 0 )
+ ( >= x112 0 )
+ ( >= x176 0 )
+ ( >= x175 0 )
+ ( >= x174 0 )
+ ( >= x173 0 )
+ ( >= x172 0 )
+ ( >= x171 0 )
+ ( >= x170 0 )
+ ( >= x169 0 )
+ ( >= x168 0 )
+ ( >= x167 0 )
+ ( >= x166 0 )
+ ( >= x165 0 )
+ ( >= x164 0 )
+ ( >= x163 0 )
+ ( >= x162 0 )
+ ( >= x161 0 )
+ ( >= x160 0 )
+ ( >= x159 0 )
+ ( >= x158 0 )
+ ( >= x157 0 )
+ ( >= x156 0 )
+ ( >= x155 0 )
+ ( >= x154 0 )
+ ( >= x153 0 )
+ ( >= x152 0 )
+ ( >= x151 0 )
+ ( >= x150 0 )
+ ( >= x149 0 )
+ ( >= x148 0 )
+ ( >= x147 0 )
+ ( >= x146 0 )
+ ( >= x145 0 )
+ ( >= x144 0 )
+ ( >= x143 0 )
+ ( >= x142 0 )
+ ( >= x141 0 )
+ ( >= x140 0 )
+ ( >= x139 0 )
+ ( >= x138 0 )
+ ( >= x137 0 )
+ ( >= x136 0 )
+ ( >= x135 0 )
+ ( >= x134 0 )
+ ( >= x133 0 )
+ ( >= x132 0 )
+ ( >= x131 0 )
+ ( >= x130 0 )
+ ( >= x129 0 )
+ ( >= x128 0 )
+ ( >= x127 0 )
+ ( >= x126 0 )
+ ( >= x125 0 )
+ ( >= x124 0 )
+ ( >= x123 0 )
+ ( >= x122 0 )
+ ( >= x121 0 )
+ ( >= x120 0 )
+ ( >= x119 0 )
+ ( >= x118 0 )
+ ( >= x117 0 )
+ ( >= x116 0 )
+ ( >= x115 0 )
+ ( >= x114 0 )
+ ( >= x113 0 )
+ ( implies ( and ( not x207 ) ( and ( not x208 ) ( and ( not x209 ) ( and ( not x210 ) true ) ) ) ) ( = tmp75 0 ) )
+ ( implies ( and ( not x207 ) ( and ( not x208 ) ( and ( not x209 ) ( and x210 true ) ) ) ) ( = tmp75 400 ) )
+ ( implies ( and ( not x207 ) ( and ( not x208 ) ( and x209 ( and ( not x210 ) true ) ) ) ) ( = tmp75 400 ) )
+ ( implies ( and ( not x207 ) ( and ( not x208 ) ( and x209 ( and x210 true ) ) ) ) ( = tmp75 800 ) )
+ ( implies ( and ( not x207 ) ( and x208 ( and ( not x209 ) ( and ( not x210 ) true ) ) ) ) ( = tmp75 300 ) )
+ ( implies ( and ( not x207 ) ( and x208 ( and ( not x209 ) ( and x210 true ) ) ) ) ( = tmp75 700 ) )
+ ( implies ( and ( not x207 ) ( and x208 ( and x209 ( and ( not x210 ) true ) ) ) ) ( = tmp75 700 ) )
+ ( implies ( and ( not x207 ) ( and x208 ( and x209 ( and x210 true ) ) ) ) ( = tmp75 1100 ) )
+ ( implies ( and x207 ( and ( not x208 ) ( and ( not x209 ) ( and ( not x210 ) true ) ) ) ) ( = tmp75 300 ) )
+ ( implies ( and x207 ( and ( not x208 ) ( and ( not x209 ) ( and x210 true ) ) ) ) ( = tmp75 700 ) )
+ ( implies ( and x207 ( and ( not x208 ) ( and x209 ( and ( not x210 ) true ) ) ) ) ( = tmp75 700 ) )
+ ( implies ( and x207 ( and ( not x208 ) ( and x209 ( and x210 true ) ) ) ) ( = tmp75 1100 ) )
+ ( implies ( and x207 ( and x208 ( and ( not x209 ) ( and ( not x210 ) true ) ) ) ) ( = tmp75 600 ) )
+ ( implies ( and x207 ( and x208 ( and ( not x209 ) ( and x210 true ) ) ) ) ( = tmp75 1000 ) )
+ ( implies ( and x207 ( and x208 ( and x209 ( and ( not x210 ) true ) ) ) ) ( = tmp75 1000 ) )
+ ( implies ( and x207 ( and x208 ( and x209 ( and x210 true ) ) ) ) ( = tmp75 1400 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and ( not x214 ) ( and ( not x213 ) ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 0 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and ( not x214 ) ( and ( not x213 ) ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 400 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and ( not x214 ) ( and ( not x213 ) ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 400 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and ( not x214 ) ( and ( not x213 ) ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and ( not x214 ) ( and x213 ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 400 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and ( not x214 ) ( and x213 ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and ( not x214 ) ( and x213 ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and ( not x214 ) ( and x213 ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and x214 ( and ( not x213 ) ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 400 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and x214 ( and ( not x213 ) ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and x214 ( and ( not x213 ) ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and x214 ( and ( not x213 ) ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and x214 ( and x213 ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and x214 ( and x213 ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and x214 ( and x213 ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and ( not x216 ) ( and ( not x215 ) ( and x214 ( and x213 ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and ( not x214 ) ( and ( not x213 ) ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 400 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and ( not x214 ) ( and ( not x213 ) ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and ( not x214 ) ( and ( not x213 ) ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and ( not x214 ) ( and ( not x213 ) ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and ( not x214 ) ( and x213 ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and ( not x214 ) ( and x213 ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and ( not x214 ) ( and x213 ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and ( not x214 ) ( and x213 ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and x214 ( and ( not x213 ) ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and x214 ( and ( not x213 ) ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and x214 ( and ( not x213 ) ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and x214 ( and ( not x213 ) ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and x214 ( and x213 ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and x214 ( and x213 ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and x214 ( and x213 ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and ( not x216 ) ( and x215 ( and x214 ( and x213 ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 2000 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and ( not x214 ) ( and ( not x213 ) ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 400 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and ( not x214 ) ( and ( not x213 ) ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and ( not x214 ) ( and ( not x213 ) ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and ( not x214 ) ( and ( not x213 ) ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and ( not x214 ) ( and x213 ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and ( not x214 ) ( and x213 ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and ( not x214 ) ( and x213 ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and ( not x214 ) ( and x213 ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and x214 ( and ( not x213 ) ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and x214 ( and ( not x213 ) ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and x214 ( and ( not x213 ) ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and x214 ( and ( not x213 ) ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and x214 ( and x213 ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and x214 ( and x213 ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and x214 ( and x213 ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and x216 ( and ( not x215 ) ( and x214 ( and x213 ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 2000 ) )
+ ( implies ( and x216 ( and x215 ( and ( not x214 ) ( and ( not x213 ) ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 800 ) )
+ ( implies ( and x216 ( and x215 ( and ( not x214 ) ( and ( not x213 ) ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and x216 ( and x215 ( and ( not x214 ) ( and ( not x213 ) ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and x216 ( and x215 ( and ( not x214 ) ( and ( not x213 ) ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and x216 ( and x215 ( and ( not x214 ) ( and x213 ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and x216 ( and x215 ( and ( not x214 ) ( and x213 ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and x216 ( and x215 ( and ( not x214 ) ( and x213 ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and x216 ( and x215 ( and ( not x214 ) ( and x213 ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 2000 ) )
+ ( implies ( and x216 ( and x215 ( and x214 ( and ( not x213 ) ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1200 ) )
+ ( implies ( and x216 ( and x215 ( and x214 ( and ( not x213 ) ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and x216 ( and x215 ( and x214 ( and ( not x213 ) ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and x216 ( and x215 ( and x214 ( and ( not x213 ) ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 2000 ) )
+ ( implies ( and x216 ( and x215 ( and x214 ( and x213 ( and ( not x212 ) ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 1600 ) )
+ ( implies ( and x216 ( and x215 ( and x214 ( and x213 ( and ( not x212 ) ( and x211 true ) ) ) ) ) ) ( = tmp74 2000 ) )
+ ( implies ( and x216 ( and x215 ( and x214 ( and x213 ( and x212 ( and ( not x211 ) true ) ) ) ) ) ) ( = tmp74 2000 ) )
+ ( implies ( and x216 ( and x215 ( and x214 ( and x213 ( and x212 ( and x211 true ) ) ) ) ) ) ( = tmp74 2400 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and ( not x203 ) ( and ( not x204 ) ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 0 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and ( not x203 ) ( and ( not x204 ) ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 300 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and ( not x203 ) ( and ( not x204 ) ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 300 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and ( not x203 ) ( and ( not x204 ) ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and ( not x203 ) ( and x204 ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 300 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and ( not x203 ) ( and x204 ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and ( not x203 ) ( and x204 ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and ( not x203 ) ( and x204 ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and x203 ( and ( not x204 ) ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 300 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and x203 ( and ( not x204 ) ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and x203 ( and ( not x204 ) ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and x203 ( and ( not x204 ) ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and x203 ( and x204 ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and x203 ( and x204 ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and x203 ( and x204 ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and ( not x201 ) ( and ( not x202 ) ( and x203 ( and x204 ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and ( not x203 ) ( and ( not x204 ) ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 300 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and ( not x203 ) ( and ( not x204 ) ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and ( not x203 ) ( and ( not x204 ) ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and ( not x203 ) ( and ( not x204 ) ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and ( not x203 ) ( and x204 ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and ( not x203 ) ( and x204 ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and ( not x203 ) ( and x204 ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and ( not x203 ) ( and x204 ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and x203 ( and ( not x204 ) ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and x203 ( and ( not x204 ) ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and x203 ( and ( not x204 ) ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and x203 ( and ( not x204 ) ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and x203 ( and x204 ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and x203 ( and x204 ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and x203 ( and x204 ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and ( not x201 ) ( and x202 ( and x203 ( and x204 ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 1500 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and ( not x203 ) ( and ( not x204 ) ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 300 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and ( not x203 ) ( and ( not x204 ) ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and ( not x203 ) ( and ( not x204 ) ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and ( not x203 ) ( and ( not x204 ) ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and ( not x203 ) ( and x204 ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and ( not x203 ) ( and x204 ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and ( not x203 ) ( and x204 ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and ( not x203 ) ( and x204 ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and x203 ( and ( not x204 ) ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and x203 ( and ( not x204 ) ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and x203 ( and ( not x204 ) ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and x203 ( and ( not x204 ) ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and x203 ( and x204 ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and x203 ( and x204 ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and x203 ( and x204 ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and x201 ( and ( not x202 ) ( and x203 ( and x204 ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 1500 ) )
+ ( implies ( and x201 ( and x202 ( and ( not x203 ) ( and ( not x204 ) ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 600 ) )
+ ( implies ( and x201 ( and x202 ( and ( not x203 ) ( and ( not x204 ) ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and x201 ( and x202 ( and ( not x203 ) ( and ( not x204 ) ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and x201 ( and x202 ( and ( not x203 ) ( and ( not x204 ) ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and x201 ( and x202 ( and ( not x203 ) ( and x204 ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and x201 ( and x202 ( and ( not x203 ) ( and x204 ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and x201 ( and x202 ( and ( not x203 ) ( and x204 ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and x201 ( and x202 ( and ( not x203 ) ( and x204 ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 1500 ) )
+ ( implies ( and x201 ( and x202 ( and x203 ( and ( not x204 ) ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 900 ) )
+ ( implies ( and x201 ( and x202 ( and x203 ( and ( not x204 ) ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and x201 ( and x202 ( and x203 ( and ( not x204 ) ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and x201 ( and x202 ( and x203 ( and ( not x204 ) ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 1500 ) )
+ ( implies ( and x201 ( and x202 ( and x203 ( and x204 ( and ( not x205 ) ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 1200 ) )
+ ( implies ( and x201 ( and x202 ( and x203 ( and x204 ( and ( not x205 ) ( and x206 true ) ) ) ) ) ) ( = tmp73 1500 ) )
+ ( implies ( and x201 ( and x202 ( and x203 ( and x204 ( and x205 ( and ( not x206 ) true ) ) ) ) ) ) ( = tmp73 1500 ) )
+ ( implies ( and x201 ( and x202 ( and x203 ( and x204 ( and x205 ( and x206 true ) ) ) ) ) ) ( = tmp73 1800 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and ( not x220 ) ( and ( not x219 ) ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 0 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and ( not x220 ) ( and ( not x219 ) ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 250 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and ( not x220 ) ( and ( not x219 ) ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 250 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and ( not x220 ) ( and ( not x219 ) ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and ( not x220 ) ( and x219 ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 250 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and ( not x220 ) ( and x219 ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and ( not x220 ) ( and x219 ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and ( not x220 ) ( and x219 ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and x220 ( and ( not x219 ) ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 250 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and x220 ( and ( not x219 ) ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and x220 ( and ( not x219 ) ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and x220 ( and ( not x219 ) ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and x220 ( and x219 ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and x220 ( and x219 ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and x220 ( and x219 ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and ( not x222 ) ( and ( not x221 ) ( and x220 ( and x219 ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and ( not x220 ) ( and ( not x219 ) ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 250 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and ( not x220 ) ( and ( not x219 ) ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and ( not x220 ) ( and ( not x219 ) ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and ( not x220 ) ( and ( not x219 ) ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and ( not x220 ) ( and x219 ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and ( not x220 ) ( and x219 ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and ( not x220 ) ( and x219 ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and ( not x220 ) ( and x219 ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and x220 ( and ( not x219 ) ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and x220 ( and ( not x219 ) ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and x220 ( and ( not x219 ) ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and x220 ( and ( not x219 ) ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and x220 ( and x219 ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and x220 ( and x219 ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and x220 ( and x219 ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and ( not x222 ) ( and x221 ( and x220 ( and x219 ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 1250 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and ( not x220 ) ( and ( not x219 ) ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 250 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and ( not x220 ) ( and ( not x219 ) ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and ( not x220 ) ( and ( not x219 ) ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and ( not x220 ) ( and ( not x219 ) ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and ( not x220 ) ( and x219 ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and ( not x220 ) ( and x219 ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and ( not x220 ) ( and x219 ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and ( not x220 ) ( and x219 ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and x220 ( and ( not x219 ) ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and x220 ( and ( not x219 ) ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and x220 ( and ( not x219 ) ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and x220 ( and ( not x219 ) ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and x220 ( and x219 ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and x220 ( and x219 ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and x220 ( and x219 ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and x222 ( and ( not x221 ) ( and x220 ( and x219 ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 1250 ) )
+ ( implies ( and x222 ( and x221 ( and ( not x220 ) ( and ( not x219 ) ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 500 ) )
+ ( implies ( and x222 ( and x221 ( and ( not x220 ) ( and ( not x219 ) ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and x222 ( and x221 ( and ( not x220 ) ( and ( not x219 ) ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and x222 ( and x221 ( and ( not x220 ) ( and ( not x219 ) ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and x222 ( and x221 ( and ( not x220 ) ( and x219 ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and x222 ( and x221 ( and ( not x220 ) ( and x219 ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and x222 ( and x221 ( and ( not x220 ) ( and x219 ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and x222 ( and x221 ( and ( not x220 ) ( and x219 ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 1250 ) )
+ ( implies ( and x222 ( and x221 ( and x220 ( and ( not x219 ) ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 750 ) )
+ ( implies ( and x222 ( and x221 ( and x220 ( and ( not x219 ) ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and x222 ( and x221 ( and x220 ( and ( not x219 ) ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and x222 ( and x221 ( and x220 ( and ( not x219 ) ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 1250 ) )
+ ( implies ( and x222 ( and x221 ( and x220 ( and x219 ( and ( not x218 ) ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 1000 ) )
+ ( implies ( and x222 ( and x221 ( and x220 ( and x219 ( and ( not x218 ) ( and x217 true ) ) ) ) ) ) ( = tmp72 1250 ) )
+ ( implies ( and x222 ( and x221 ( and x220 ( and x219 ( and x218 ( and ( not x217 ) true ) ) ) ) ) ) ( = tmp72 1250 ) )
+ ( implies ( and x222 ( and x221 ( and x220 ( and x219 ( and x218 ( and x217 true ) ) ) ) ) ) ( = tmp72 1500 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and ( not x197 ) ( and ( not x198 ) ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 0 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and ( not x197 ) ( and ( not x198 ) ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 200 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and ( not x197 ) ( and ( not x198 ) ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 200 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and ( not x197 ) ( and ( not x198 ) ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and ( not x197 ) ( and x198 ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 200 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and ( not x197 ) ( and x198 ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and ( not x197 ) ( and x198 ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and ( not x197 ) ( and x198 ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and x197 ( and ( not x198 ) ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 200 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and x197 ( and ( not x198 ) ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and x197 ( and ( not x198 ) ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and x197 ( and ( not x198 ) ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and x197 ( and x198 ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and x197 ( and x198 ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and x197 ( and x198 ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and ( not x195 ) ( and ( not x196 ) ( and x197 ( and x198 ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and ( not x197 ) ( and ( not x198 ) ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 200 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and ( not x197 ) ( and ( not x198 ) ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and ( not x197 ) ( and ( not x198 ) ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and ( not x197 ) ( and ( not x198 ) ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and ( not x197 ) ( and x198 ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and ( not x197 ) ( and x198 ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and ( not x197 ) ( and x198 ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and ( not x197 ) ( and x198 ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and x197 ( and ( not x198 ) ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and x197 ( and ( not x198 ) ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and x197 ( and ( not x198 ) ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and x197 ( and ( not x198 ) ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and x197 ( and x198 ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and x197 ( and x198 ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and x197 ( and x198 ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and ( not x195 ) ( and x196 ( and x197 ( and x198 ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 1000 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and ( not x197 ) ( and ( not x198 ) ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 200 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and ( not x197 ) ( and ( not x198 ) ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and ( not x197 ) ( and ( not x198 ) ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and ( not x197 ) ( and ( not x198 ) ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and ( not x197 ) ( and x198 ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and ( not x197 ) ( and x198 ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and ( not x197 ) ( and x198 ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and ( not x197 ) ( and x198 ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and x197 ( and ( not x198 ) ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and x197 ( and ( not x198 ) ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and x197 ( and ( not x198 ) ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and x197 ( and ( not x198 ) ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and x197 ( and x198 ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and x197 ( and x198 ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and x197 ( and x198 ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and x195 ( and ( not x196 ) ( and x197 ( and x198 ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 1000 ) )
+ ( implies ( and x195 ( and x196 ( and ( not x197 ) ( and ( not x198 ) ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 400 ) )
+ ( implies ( and x195 ( and x196 ( and ( not x197 ) ( and ( not x198 ) ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and x195 ( and x196 ( and ( not x197 ) ( and ( not x198 ) ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and x195 ( and x196 ( and ( not x197 ) ( and ( not x198 ) ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and x195 ( and x196 ( and ( not x197 ) ( and x198 ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and x195 ( and x196 ( and ( not x197 ) ( and x198 ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and x195 ( and x196 ( and ( not x197 ) ( and x198 ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and x195 ( and x196 ( and ( not x197 ) ( and x198 ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 1000 ) )
+ ( implies ( and x195 ( and x196 ( and x197 ( and ( not x198 ) ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 600 ) )
+ ( implies ( and x195 ( and x196 ( and x197 ( and ( not x198 ) ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and x195 ( and x196 ( and x197 ( and ( not x198 ) ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and x195 ( and x196 ( and x197 ( and ( not x198 ) ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 1000 ) )
+ ( implies ( and x195 ( and x196 ( and x197 ( and x198 ( and ( not x199 ) ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 800 ) )
+ ( implies ( and x195 ( and x196 ( and x197 ( and x198 ( and ( not x199 ) ( and x200 true ) ) ) ) ) ) ( = tmp71 1000 ) )
+ ( implies ( and x195 ( and x196 ( and x197 ( and x198 ( and x199 ( and ( not x200 ) true ) ) ) ) ) ) ( = tmp71 1000 ) )
+ ( implies ( and x195 ( and x196 ( and x197 ( and x198 ( and x199 ( and x200 true ) ) ) ) ) ) ( = tmp71 1200 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and ( not x226 ) ( and ( not x225 ) ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 0 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and ( not x226 ) ( and ( not x225 ) ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 250 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and ( not x226 ) ( and ( not x225 ) ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 250 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and ( not x226 ) ( and ( not x225 ) ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 500 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and ( not x226 ) ( and x225 ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 500 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and ( not x226 ) ( and x225 ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 750 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and ( not x226 ) ( and x225 ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 750 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and ( not x226 ) ( and x225 ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 1000 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and x226 ( and ( not x225 ) ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 500 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and x226 ( and ( not x225 ) ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 750 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and x226 ( and ( not x225 ) ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 750 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and x226 ( and ( not x225 ) ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 1000 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and x226 ( and x225 ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1000 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and x226 ( and x225 ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 1250 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and x226 ( and x225 ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1250 ) )
+ ( implies ( and ( not x228 ) ( and ( not x227 ) ( and x226 ( and x225 ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 1500 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and ( not x226 ) ( and ( not x225 ) ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 500 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and ( not x226 ) ( and ( not x225 ) ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 750 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and ( not x226 ) ( and ( not x225 ) ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 750 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and ( not x226 ) ( and ( not x225 ) ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 1000 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and ( not x226 ) ( and x225 ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1000 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and ( not x226 ) ( and x225 ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 1250 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and ( not x226 ) ( and x225 ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1250 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and ( not x226 ) ( and x225 ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 1500 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and x226 ( and ( not x225 ) ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1000 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and x226 ( and ( not x225 ) ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 1250 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and x226 ( and ( not x225 ) ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1250 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and x226 ( and ( not x225 ) ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 1500 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and x226 ( and x225 ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1500 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and x226 ( and x225 ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 1750 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and x226 ( and x225 ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1750 ) )
+ ( implies ( and ( not x228 ) ( and x227 ( and x226 ( and x225 ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 2000 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and ( not x226 ) ( and ( not x225 ) ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 500 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and ( not x226 ) ( and ( not x225 ) ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 750 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and ( not x226 ) ( and ( not x225 ) ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 750 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and ( not x226 ) ( and ( not x225 ) ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 1000 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and ( not x226 ) ( and x225 ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1000 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and ( not x226 ) ( and x225 ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 1250 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and ( not x226 ) ( and x225 ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1250 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and ( not x226 ) ( and x225 ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 1500 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and x226 ( and ( not x225 ) ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1000 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and x226 ( and ( not x225 ) ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 1250 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and x226 ( and ( not x225 ) ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1250 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and x226 ( and ( not x225 ) ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 1500 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and x226 ( and x225 ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1500 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and x226 ( and x225 ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 1750 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and x226 ( and x225 ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1750 ) )
+ ( implies ( and x228 ( and ( not x227 ) ( and x226 ( and x225 ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 2000 ) )
+ ( implies ( and x228 ( and x227 ( and ( not x226 ) ( and ( not x225 ) ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1000 ) )
+ ( implies ( and x228 ( and x227 ( and ( not x226 ) ( and ( not x225 ) ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 1250 ) )
+ ( implies ( and x228 ( and x227 ( and ( not x226 ) ( and ( not x225 ) ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1250 ) )
+ ( implies ( and x228 ( and x227 ( and ( not x226 ) ( and ( not x225 ) ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 1500 ) )
+ ( implies ( and x228 ( and x227 ( and ( not x226 ) ( and x225 ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1500 ) )
+ ( implies ( and x228 ( and x227 ( and ( not x226 ) ( and x225 ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 1750 ) )
+ ( implies ( and x228 ( and x227 ( and ( not x226 ) ( and x225 ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1750 ) )
+ ( implies ( and x228 ( and x227 ( and ( not x226 ) ( and x225 ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 2000 ) )
+ ( implies ( and x228 ( and x227 ( and x226 ( and ( not x225 ) ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1500 ) )
+ ( implies ( and x228 ( and x227 ( and x226 ( and ( not x225 ) ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 1750 ) )
+ ( implies ( and x228 ( and x227 ( and x226 ( and ( not x225 ) ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 1750 ) )
+ ( implies ( and x228 ( and x227 ( and x226 ( and ( not x225 ) ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 2000 ) )
+ ( implies ( and x228 ( and x227 ( and x226 ( and x225 ( and ( not x224 ) ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 2000 ) )
+ ( implies ( and x228 ( and x227 ( and x226 ( and x225 ( and ( not x224 ) ( and x223 true ) ) ) ) ) ) ( = tmp70 2250 ) )
+ ( implies ( and x228 ( and x227 ( and x226 ( and x225 ( and x224 ( and ( not x223 ) true ) ) ) ) ) ) ( = tmp70 2250 ) )
+ ( implies ( and x228 ( and x227 ( and x226 ( and x225 ( and x224 ( and x223 true ) ) ) ) ) ) ( = tmp70 2500 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and ( not x191 ) ( and ( not x192 ) ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 0 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and ( not x191 ) ( and ( not x192 ) ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 200 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and ( not x191 ) ( and ( not x192 ) ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 200 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and ( not x191 ) ( and ( not x192 ) ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and ( not x191 ) ( and x192 ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 200 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and ( not x191 ) ( and x192 ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and ( not x191 ) ( and x192 ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and ( not x191 ) ( and x192 ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and x191 ( and ( not x192 ) ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 200 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and x191 ( and ( not x192 ) ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and x191 ( and ( not x192 ) ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and x191 ( and ( not x192 ) ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and x191 ( and x192 ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and x191 ( and x192 ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and x191 ( and x192 ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and ( not x189 ) ( and ( not x190 ) ( and x191 ( and x192 ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and ( not x191 ) ( and ( not x192 ) ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 200 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and ( not x191 ) ( and ( not x192 ) ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and ( not x191 ) ( and ( not x192 ) ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and ( not x191 ) ( and ( not x192 ) ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and ( not x191 ) ( and x192 ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and ( not x191 ) ( and x192 ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and ( not x191 ) ( and x192 ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and ( not x191 ) ( and x192 ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and x191 ( and ( not x192 ) ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and x191 ( and ( not x192 ) ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and x191 ( and ( not x192 ) ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and x191 ( and ( not x192 ) ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and x191 ( and x192 ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and x191 ( and x192 ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and x191 ( and x192 ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and ( not x189 ) ( and x190 ( and x191 ( and x192 ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 1000 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and ( not x191 ) ( and ( not x192 ) ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 200 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and ( not x191 ) ( and ( not x192 ) ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and ( not x191 ) ( and ( not x192 ) ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and ( not x191 ) ( and ( not x192 ) ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and ( not x191 ) ( and x192 ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and ( not x191 ) ( and x192 ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and ( not x191 ) ( and x192 ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and ( not x191 ) ( and x192 ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and x191 ( and ( not x192 ) ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and x191 ( and ( not x192 ) ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and x191 ( and ( not x192 ) ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and x191 ( and ( not x192 ) ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and x191 ( and x192 ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and x191 ( and x192 ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and x191 ( and x192 ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and x189 ( and ( not x190 ) ( and x191 ( and x192 ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 1000 ) )
+ ( implies ( and x189 ( and x190 ( and ( not x191 ) ( and ( not x192 ) ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 400 ) )
+ ( implies ( and x189 ( and x190 ( and ( not x191 ) ( and ( not x192 ) ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and x189 ( and x190 ( and ( not x191 ) ( and ( not x192 ) ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and x189 ( and x190 ( and ( not x191 ) ( and ( not x192 ) ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and x189 ( and x190 ( and ( not x191 ) ( and x192 ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and x189 ( and x190 ( and ( not x191 ) ( and x192 ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and x189 ( and x190 ( and ( not x191 ) ( and x192 ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and x189 ( and x190 ( and ( not x191 ) ( and x192 ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 1000 ) )
+ ( implies ( and x189 ( and x190 ( and x191 ( and ( not x192 ) ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 600 ) )
+ ( implies ( and x189 ( and x190 ( and x191 ( and ( not x192 ) ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and x189 ( and x190 ( and x191 ( and ( not x192 ) ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and x189 ( and x190 ( and x191 ( and ( not x192 ) ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 1000 ) )
+ ( implies ( and x189 ( and x190 ( and x191 ( and x192 ( and ( not x193 ) ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 800 ) )
+ ( implies ( and x189 ( and x190 ( and x191 ( and x192 ( and ( not x193 ) ( and x194 true ) ) ) ) ) ) ( = tmp69 1000 ) )
+ ( implies ( and x189 ( and x190 ( and x191 ( and x192 ( and x193 ( and ( not x194 ) true ) ) ) ) ) ) ( = tmp69 1000 ) )
+ ( implies ( and x189 ( and x190 ( and x191 ( and x192 ( and x193 ( and x194 true ) ) ) ) ) ) ( = tmp69 1200 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and ( not x232 ) ( and ( not x231 ) ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 0 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and ( not x232 ) ( and ( not x231 ) ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 500 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and ( not x232 ) ( and ( not x231 ) ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 500 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and ( not x232 ) ( and ( not x231 ) ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 1000 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and ( not x232 ) ( and x231 ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 500 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and ( not x232 ) ( and x231 ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 1000 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and ( not x232 ) ( and x231 ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1000 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and ( not x232 ) ( and x231 ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 1500 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and x232 ( and ( not x231 ) ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 500 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and x232 ( and ( not x231 ) ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 1000 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and x232 ( and ( not x231 ) ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1000 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and x232 ( and ( not x231 ) ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 1500 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and x232 ( and x231 ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1000 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and x232 ( and x231 ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 1500 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and x232 ( and x231 ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1500 ) )
+ ( implies ( and ( not x234 ) ( and ( not x233 ) ( and x232 ( and x231 ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 2000 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and ( not x232 ) ( and ( not x231 ) ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 300 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and ( not x232 ) ( and ( not x231 ) ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 800 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and ( not x232 ) ( and ( not x231 ) ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 800 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and ( not x232 ) ( and ( not x231 ) ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 1300 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and ( not x232 ) ( and x231 ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 800 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and ( not x232 ) ( and x231 ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 1300 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and ( not x232 ) ( and x231 ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1300 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and ( not x232 ) ( and x231 ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 1800 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and x232 ( and ( not x231 ) ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 800 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and x232 ( and ( not x231 ) ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 1300 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and x232 ( and ( not x231 ) ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1300 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and x232 ( and ( not x231 ) ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 1800 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and x232 ( and x231 ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1300 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and x232 ( and x231 ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 1800 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and x232 ( and x231 ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1800 ) )
+ ( implies ( and ( not x234 ) ( and x233 ( and x232 ( and x231 ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 2300 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and ( not x232 ) ( and ( not x231 ) ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 300 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and ( not x232 ) ( and ( not x231 ) ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 800 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and ( not x232 ) ( and ( not x231 ) ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 800 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and ( not x232 ) ( and ( not x231 ) ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 1300 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and ( not x232 ) ( and x231 ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 800 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and ( not x232 ) ( and x231 ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 1300 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and ( not x232 ) ( and x231 ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1300 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and ( not x232 ) ( and x231 ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 1800 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and x232 ( and ( not x231 ) ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 800 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and x232 ( and ( not x231 ) ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 1300 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and x232 ( and ( not x231 ) ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1300 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and x232 ( and ( not x231 ) ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 1800 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and x232 ( and x231 ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1300 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and x232 ( and x231 ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 1800 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and x232 ( and x231 ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1800 ) )
+ ( implies ( and x234 ( and ( not x233 ) ( and x232 ( and x231 ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 2300 ) )
+ ( implies ( and x234 ( and x233 ( and ( not x232 ) ( and ( not x231 ) ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 600 ) )
+ ( implies ( and x234 ( and x233 ( and ( not x232 ) ( and ( not x231 ) ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 1100 ) )
+ ( implies ( and x234 ( and x233 ( and ( not x232 ) ( and ( not x231 ) ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1100 ) )
+ ( implies ( and x234 ( and x233 ( and ( not x232 ) ( and ( not x231 ) ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 1600 ) )
+ ( implies ( and x234 ( and x233 ( and ( not x232 ) ( and x231 ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1100 ) )
+ ( implies ( and x234 ( and x233 ( and ( not x232 ) ( and x231 ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 1600 ) )
+ ( implies ( and x234 ( and x233 ( and ( not x232 ) ( and x231 ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1600 ) )
+ ( implies ( and x234 ( and x233 ( and ( not x232 ) ( and x231 ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 2100 ) )
+ ( implies ( and x234 ( and x233 ( and x232 ( and ( not x231 ) ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1100 ) )
+ ( implies ( and x234 ( and x233 ( and x232 ( and ( not x231 ) ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 1600 ) )
+ ( implies ( and x234 ( and x233 ( and x232 ( and ( not x231 ) ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1600 ) )
+ ( implies ( and x234 ( and x233 ( and x232 ( and ( not x231 ) ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 2100 ) )
+ ( implies ( and x234 ( and x233 ( and x232 ( and x231 ( and ( not x230 ) ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 1600 ) )
+ ( implies ( and x234 ( and x233 ( and x232 ( and x231 ( and ( not x230 ) ( and x229 true ) ) ) ) ) ) ( = tmp68 2100 ) )
+ ( implies ( and x234 ( and x233 ( and x232 ( and x231 ( and x230 ( and ( not x229 ) true ) ) ) ) ) ) ( = tmp68 2100 ) )
+ ( implies ( and x234 ( and x233 ( and x232 ( and x231 ( and x230 ( and x229 true ) ) ) ) ) ) ( = tmp68 2600 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and ( not x185 ) ( and ( not x186 ) ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 0 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and ( not x185 ) ( and ( not x186 ) ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 200 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and ( not x185 ) ( and ( not x186 ) ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 200 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and ( not x185 ) ( and ( not x186 ) ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 400 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and ( not x185 ) ( and x186 ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 200 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and ( not x185 ) ( and x186 ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 400 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and ( not x185 ) ( and x186 ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 400 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and ( not x185 ) ( and x186 ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 600 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and x185 ( and ( not x186 ) ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 200 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and x185 ( and ( not x186 ) ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 400 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and x185 ( and ( not x186 ) ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 400 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and x185 ( and ( not x186 ) ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 600 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and x185 ( and x186 ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 400 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and x185 ( and x186 ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 600 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and x185 ( and x186 ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 600 ) )
+ ( implies ( and ( not x183 ) ( and ( not x184 ) ( and x185 ( and x186 ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 800 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and ( not x185 ) ( and ( not x186 ) ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 100 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and ( not x185 ) ( and ( not x186 ) ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 300 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and ( not x185 ) ( and ( not x186 ) ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 300 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and ( not x185 ) ( and ( not x186 ) ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 500 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and ( not x185 ) ( and x186 ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 300 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and ( not x185 ) ( and x186 ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 500 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and ( not x185 ) ( and x186 ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 500 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and ( not x185 ) ( and x186 ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 700 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and x185 ( and ( not x186 ) ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 300 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and x185 ( and ( not x186 ) ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 500 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and x185 ( and ( not x186 ) ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 500 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and x185 ( and ( not x186 ) ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 700 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and x185 ( and x186 ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 500 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and x185 ( and x186 ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 700 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and x185 ( and x186 ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 700 ) )
+ ( implies ( and ( not x183 ) ( and x184 ( and x185 ( and x186 ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 900 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and ( not x185 ) ( and ( not x186 ) ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 100 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and ( not x185 ) ( and ( not x186 ) ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 300 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and ( not x185 ) ( and ( not x186 ) ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 300 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and ( not x185 ) ( and ( not x186 ) ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 500 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and ( not x185 ) ( and x186 ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 300 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and ( not x185 ) ( and x186 ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 500 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and ( not x185 ) ( and x186 ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 500 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and ( not x185 ) ( and x186 ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 700 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and x185 ( and ( not x186 ) ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 300 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and x185 ( and ( not x186 ) ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 500 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and x185 ( and ( not x186 ) ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 500 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and x185 ( and ( not x186 ) ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 700 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and x185 ( and x186 ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 500 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and x185 ( and x186 ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 700 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and x185 ( and x186 ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 700 ) )
+ ( implies ( and x183 ( and ( not x184 ) ( and x185 ( and x186 ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 900 ) )
+ ( implies ( and x183 ( and x184 ( and ( not x185 ) ( and ( not x186 ) ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 200 ) )
+ ( implies ( and x183 ( and x184 ( and ( not x185 ) ( and ( not x186 ) ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 400 ) )
+ ( implies ( and x183 ( and x184 ( and ( not x185 ) ( and ( not x186 ) ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 400 ) )
+ ( implies ( and x183 ( and x184 ( and ( not x185 ) ( and ( not x186 ) ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 600 ) )
+ ( implies ( and x183 ( and x184 ( and ( not x185 ) ( and x186 ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 400 ) )
+ ( implies ( and x183 ( and x184 ( and ( not x185 ) ( and x186 ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 600 ) )
+ ( implies ( and x183 ( and x184 ( and ( not x185 ) ( and x186 ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 600 ) )
+ ( implies ( and x183 ( and x184 ( and ( not x185 ) ( and x186 ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 800 ) )
+ ( implies ( and x183 ( and x184 ( and x185 ( and ( not x186 ) ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 400 ) )
+ ( implies ( and x183 ( and x184 ( and x185 ( and ( not x186 ) ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 600 ) )
+ ( implies ( and x183 ( and x184 ( and x185 ( and ( not x186 ) ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 600 ) )
+ ( implies ( and x183 ( and x184 ( and x185 ( and ( not x186 ) ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 800 ) )
+ ( implies ( and x183 ( and x184 ( and x185 ( and x186 ( and ( not x187 ) ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 600 ) )
+ ( implies ( and x183 ( and x184 ( and x185 ( and x186 ( and ( not x187 ) ( and x188 true ) ) ) ) ) ) ( = tmp67 800 ) )
+ ( implies ( and x183 ( and x184 ( and x185 ( and x186 ( and x187 ( and ( not x188 ) true ) ) ) ) ) ) ( = tmp67 800 ) )
+ ( implies ( and x183 ( and x184 ( and x185 ( and x186 ( and x187 ( and x188 true ) ) ) ) ) ) ( = tmp67 1000 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and ( not x238 ) ( and ( not x237 ) ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 0 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and ( not x238 ) ( and ( not x237 ) ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 300 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and ( not x238 ) ( and ( not x237 ) ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 300 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and ( not x238 ) ( and ( not x237 ) ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and ( not x238 ) ( and x237 ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 300 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and ( not x238 ) ( and x237 ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and ( not x238 ) ( and x237 ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and ( not x238 ) ( and x237 ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and x238 ( and ( not x237 ) ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 300 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and x238 ( and ( not x237 ) ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and x238 ( and ( not x237 ) ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and x238 ( and ( not x237 ) ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and x238 ( and x237 ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and x238 ( and x237 ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and x238 ( and x237 ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and ( not x240 ) ( and ( not x239 ) ( and x238 ( and x237 ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and ( not x238 ) ( and ( not x237 ) ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 300 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and ( not x238 ) ( and ( not x237 ) ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and ( not x238 ) ( and ( not x237 ) ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and ( not x238 ) ( and ( not x237 ) ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and ( not x238 ) ( and x237 ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and ( not x238 ) ( and x237 ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and ( not x238 ) ( and x237 ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and ( not x238 ) ( and x237 ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and x238 ( and ( not x237 ) ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and x238 ( and ( not x237 ) ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and x238 ( and ( not x237 ) ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and x238 ( and ( not x237 ) ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and x238 ( and x237 ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and x238 ( and x237 ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and x238 ( and x237 ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and ( not x240 ) ( and x239 ( and x238 ( and x237 ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 1500 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and ( not x238 ) ( and ( not x237 ) ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 300 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and ( not x238 ) ( and ( not x237 ) ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and ( not x238 ) ( and ( not x237 ) ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and ( not x238 ) ( and ( not x237 ) ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and ( not x238 ) ( and x237 ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and ( not x238 ) ( and x237 ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and ( not x238 ) ( and x237 ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and ( not x238 ) ( and x237 ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and x238 ( and ( not x237 ) ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and x238 ( and ( not x237 ) ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and x238 ( and ( not x237 ) ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and x238 ( and ( not x237 ) ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and x238 ( and x237 ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and x238 ( and x237 ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and x238 ( and x237 ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and x240 ( and ( not x239 ) ( and x238 ( and x237 ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 1500 ) )
+ ( implies ( and x240 ( and x239 ( and ( not x238 ) ( and ( not x237 ) ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 600 ) )
+ ( implies ( and x240 ( and x239 ( and ( not x238 ) ( and ( not x237 ) ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and x240 ( and x239 ( and ( not x238 ) ( and ( not x237 ) ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and x240 ( and x239 ( and ( not x238 ) ( and ( not x237 ) ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and x240 ( and x239 ( and ( not x238 ) ( and x237 ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and x240 ( and x239 ( and ( not x238 ) ( and x237 ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and x240 ( and x239 ( and ( not x238 ) ( and x237 ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and x240 ( and x239 ( and ( not x238 ) ( and x237 ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 1500 ) )
+ ( implies ( and x240 ( and x239 ( and x238 ( and ( not x237 ) ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 900 ) )
+ ( implies ( and x240 ( and x239 ( and x238 ( and ( not x237 ) ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and x240 ( and x239 ( and x238 ( and ( not x237 ) ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and x240 ( and x239 ( and x238 ( and ( not x237 ) ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 1500 ) )
+ ( implies ( and x240 ( and x239 ( and x238 ( and x237 ( and ( not x236 ) ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 1200 ) )
+ ( implies ( and x240 ( and x239 ( and x238 ( and x237 ( and ( not x236 ) ( and x235 true ) ) ) ) ) ) ( = tmp66 1500 ) )
+ ( implies ( and x240 ( and x239 ( and x238 ( and x237 ( and x236 ( and ( not x235 ) true ) ) ) ) ) ) ( = tmp66 1500 ) )
+ ( implies ( and x240 ( and x239 ( and x238 ( and x237 ( and x236 ( and x235 true ) ) ) ) ) ) ( = tmp66 1800 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and ( not x179 ) ( and ( not x180 ) ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 0 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and ( not x179 ) ( and ( not x180 ) ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 100 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and ( not x179 ) ( and ( not x180 ) ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 100 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and ( not x179 ) ( and ( not x180 ) ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and ( not x179 ) ( and x180 ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 100 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and ( not x179 ) ( and x180 ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and ( not x179 ) ( and x180 ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and ( not x179 ) ( and x180 ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and x179 ( and ( not x180 ) ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 100 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and x179 ( and ( not x180 ) ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and x179 ( and ( not x180 ) ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and x179 ( and ( not x180 ) ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and x179 ( and x180 ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and x179 ( and x180 ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and x179 ( and x180 ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and ( not x177 ) ( and ( not x178 ) ( and x179 ( and x180 ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and ( not x179 ) ( and ( not x180 ) ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 100 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and ( not x179 ) ( and ( not x180 ) ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and ( not x179 ) ( and ( not x180 ) ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and ( not x179 ) ( and ( not x180 ) ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and ( not x179 ) ( and x180 ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and ( not x179 ) ( and x180 ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and ( not x179 ) ( and x180 ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and ( not x179 ) ( and x180 ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and x179 ( and ( not x180 ) ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and x179 ( and ( not x180 ) ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and x179 ( and ( not x180 ) ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and x179 ( and ( not x180 ) ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and x179 ( and x180 ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and x179 ( and x180 ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and x179 ( and x180 ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and ( not x177 ) ( and x178 ( and x179 ( and x180 ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 500 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and ( not x179 ) ( and ( not x180 ) ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 100 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and ( not x179 ) ( and ( not x180 ) ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and ( not x179 ) ( and ( not x180 ) ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and ( not x179 ) ( and ( not x180 ) ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and ( not x179 ) ( and x180 ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and ( not x179 ) ( and x180 ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and ( not x179 ) ( and x180 ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and ( not x179 ) ( and x180 ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and x179 ( and ( not x180 ) ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and x179 ( and ( not x180 ) ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and x179 ( and ( not x180 ) ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and x179 ( and ( not x180 ) ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and x179 ( and x180 ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and x179 ( and x180 ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and x179 ( and x180 ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and x177 ( and ( not x178 ) ( and x179 ( and x180 ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 500 ) )
+ ( implies ( and x177 ( and x178 ( and ( not x179 ) ( and ( not x180 ) ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 200 ) )
+ ( implies ( and x177 ( and x178 ( and ( not x179 ) ( and ( not x180 ) ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and x177 ( and x178 ( and ( not x179 ) ( and ( not x180 ) ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and x177 ( and x178 ( and ( not x179 ) ( and ( not x180 ) ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and x177 ( and x178 ( and ( not x179 ) ( and x180 ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and x177 ( and x178 ( and ( not x179 ) ( and x180 ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and x177 ( and x178 ( and ( not x179 ) ( and x180 ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and x177 ( and x178 ( and ( not x179 ) ( and x180 ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 500 ) )
+ ( implies ( and x177 ( and x178 ( and x179 ( and ( not x180 ) ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 300 ) )
+ ( implies ( and x177 ( and x178 ( and x179 ( and ( not x180 ) ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and x177 ( and x178 ( and x179 ( and ( not x180 ) ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and x177 ( and x178 ( and x179 ( and ( not x180 ) ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 500 ) )
+ ( implies ( and x177 ( and x178 ( and x179 ( and x180 ( and ( not x181 ) ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 400 ) )
+ ( implies ( and x177 ( and x178 ( and x179 ( and x180 ( and ( not x181 ) ( and x182 true ) ) ) ) ) ) ( = tmp65 500 ) )
+ ( implies ( and x177 ( and x178 ( and x179 ( and x180 ( and x181 ( and ( not x182 ) true ) ) ) ) ) ) ( = tmp65 500 ) )
+ ( implies ( and x177 ( and x178 ( and x179 ( and x180 ( and x181 ( and x182 true ) ) ) ) ) ) ( = tmp65 600 ) )
+ ( implies ( and ( not x240 ) true ) ( = tmp64 0 ) )
+ ( implies ( and x240 true ) ( = tmp64 (~ 100) ) )
+ ( implies ( and ( not x239 ) true ) ( = tmp63 0 ) )
+ ( implies ( and x239 true ) ( = tmp63 (~ 100) ) )
+ ( implies ( and ( not x238 ) true ) ( = tmp62 0 ) )
+ ( implies ( and x238 true ) ( = tmp62 (~ 100) ) )
+ ( implies ( and ( not x237 ) true ) ( = tmp61 0 ) )
+ ( implies ( and x237 true ) ( = tmp61 (~ 100) ) )
+ ( implies ( and ( not x236 ) true ) ( = tmp60 0 ) )
+ ( implies ( and x236 true ) ( = tmp60 (~ 100) ) )
+ ( implies ( and ( not x235 ) true ) ( = tmp59 0 ) )
+ ( implies ( and x235 true ) ( = tmp59 (~ 100) ) )
+ ( implies ( and ( not x234 ) true ) ( = tmp58 0 ) )
+ ( implies ( and x234 true ) ( = tmp58 (~ 100) ) )
+ ( implies ( and ( not x233 ) true ) ( = tmp57 0 ) )
+ ( implies ( and x233 true ) ( = tmp57 (~ 100) ) )
+ ( implies ( and ( not x232 ) true ) ( = tmp56 0 ) )
+ ( implies ( and x232 true ) ( = tmp56 (~ 240) ) )
+ ( implies ( and ( not x231 ) true ) ( = tmp55 0 ) )
+ ( implies ( and x231 true ) ( = tmp55 (~ 240) ) )
+ ( implies ( and ( not x230 ) true ) ( = tmp54 0 ) )
+ ( implies ( and x230 true ) ( = tmp54 (~ 240) ) )
+ ( implies ( and ( not x229 ) true ) ( = tmp53 0 ) )
+ ( implies ( and x229 true ) ( = tmp53 (~ 240) ) )
+ ( implies ( and ( not x228 ) true ) ( = tmp52 0 ) )
+ ( implies ( and x228 true ) ( = tmp52 (~ 240) ) )
+ ( implies ( and ( not x227 ) true ) ( = tmp51 0 ) )
+ ( implies ( and x227 true ) ( = tmp51 (~ 240) ) )
+ ( implies ( and ( not x226 ) true ) ( = tmp50 0 ) )
+ ( implies ( and x226 true ) ( = tmp50 (~ 240) ) )
+ ( implies ( and ( not x225 ) true ) ( = tmp49 0 ) )
+ ( implies ( and x225 true ) ( = tmp49 (~ 240) ) )
+ ( implies ( and ( not x224 ) true ) ( = tmp48 0 ) )
+ ( implies ( and x224 true ) ( = tmp48 (~ 400) ) )
+ ( implies ( and ( not x223 ) true ) ( = tmp47 0 ) )
+ ( implies ( and x223 true ) ( = tmp47 (~ 400) ) )
+ ( implies ( and ( not x222 ) true ) ( = tmp46 0 ) )
+ ( implies ( and x222 true ) ( = tmp46 (~ 400) ) )
+ ( implies ( and ( not x221 ) true ) ( = tmp45 0 ) )
+ ( implies ( and x221 true ) ( = tmp45 (~ 400) ) )
+ ( implies ( and ( not x220 ) true ) ( = tmp44 0 ) )
+ ( implies ( and x220 true ) ( = tmp44 (~ 400) ) )
+ ( implies ( and ( not x219 ) true ) ( = tmp43 0 ) )
+ ( implies ( and x219 true ) ( = tmp43 (~ 350) ) )
+ ( implies ( and ( not x218 ) true ) ( = tmp42 0 ) )
+ ( implies ( and x218 true ) ( = tmp42 (~ 350) ) )
+ ( implies ( and ( not x217 ) true ) ( = tmp41 0 ) )
+ ( implies ( and x217 true ) ( = tmp41 (~ 350) ) )
+ ( implies ( and ( not x216 ) true ) ( = tmp40 0 ) )
+ ( implies ( and x216 true ) ( = tmp40 (~ 160) ) )
+ ( implies ( and ( not x215 ) true ) ( = tmp39 0 ) )
+ ( implies ( and x215 true ) ( = tmp39 (~ 160) ) )
+ ( implies ( and ( not x214 ) true ) ( = tmp38 0 ) )
+ ( implies ( and x214 true ) ( = tmp38 (~ 160) ) )
+ ( implies ( and ( not x213 ) true ) ( = tmp37 0 ) )
+ ( implies ( and x213 true ) ( = tmp37 (~ 160) ) )
+ ( implies ( and ( not x212 ) true ) ( = tmp36 0 ) )
+ ( implies ( and x212 true ) ( = tmp36 (~ 160) ) )
+ ( implies ( and ( not x211 ) true ) ( = tmp35 0 ) )
+ ( implies ( and x211 true ) ( = tmp35 (~ 160) ) )
+ ( implies ( and ( not x210 ) true ) ( = tmp34 0 ) )
+ ( implies ( and x210 true ) ( = tmp34 (~ 160) ) )
+ ( implies ( and ( not x209 ) true ) ( = tmp33 0 ) )
+ ( implies ( and x209 true ) ( = tmp33 (~ 160) ) )
+ ( implies ( and ( not x208 ) true ) ( = tmp32 0 ) )
+ ( implies ( and x208 true ) ( = tmp32 (~ 500) ) )
+ ( implies ( and ( not x207 ) true ) ( = tmp31 0 ) )
+ ( implies ( and x207 true ) ( = tmp31 (~ 400) ) )
+ ( implies ( and ( not x206 ) true ) ( = tmp30 0 ) )
+ ( implies ( and x206 true ) ( = tmp30 (~ 400) ) )
+ ( implies ( and ( not x205 ) true ) ( = tmp29 0 ) )
+ ( implies ( and x205 true ) ( = tmp29 (~ 400) ) )
+ ( implies ( and ( not x204 ) true ) ( = tmp28 0 ) )
+ ( implies ( and x204 true ) ( = tmp28 (~ 400) ) )
+ ( implies ( and ( not x203 ) true ) ( = tmp27 0 ) )
+ ( implies ( and x203 true ) ( = tmp27 (~ 350) ) )
+ ( implies ( and ( not x202 ) true ) ( = tmp26 0 ) )
+ ( implies ( and x202 true ) ( = tmp26 (~ 350) ) )
+ ( implies ( and ( not x201 ) true ) ( = tmp25 0 ) )
+ ( implies ( and x201 true ) ( = tmp25 (~ 350) ) )
+ ( implies ( and ( not x200 ) true ) ( = tmp24 0 ) )
+ ( implies ( and x200 true ) ( = tmp24 (~ 500) ) )
+ ( implies ( and ( not x199 ) true ) ( = tmp23 0 ) )
+ ( implies ( and x199 true ) ( = tmp23 (~ 400) ) )
+ ( implies ( and ( not x198 ) true ) ( = tmp22 0 ) )
+ ( implies ( and x198 true ) ( = tmp22 (~ 400) ) )
+ ( implies ( and ( not x197 ) true ) ( = tmp21 0 ) )
+ ( implies ( and x197 true ) ( = tmp21 (~ 400) ) )
+ ( implies ( and ( not x196 ) true ) ( = tmp20 0 ) )
+ ( implies ( and x196 true ) ( = tmp20 (~ 400) ) )
+ ( implies ( and ( not x195 ) true ) ( = tmp19 0 ) )
+ ( implies ( and x195 true ) ( = tmp19 (~ 350) ) )
+ ( implies ( and ( not x194 ) true ) ( = tmp18 0 ) )
+ ( implies ( and x194 true ) ( = tmp18 (~ 350) ) )
+ ( implies ( and ( not x193 ) true ) ( = tmp17 0 ) )
+ ( implies ( and x193 true ) ( = tmp17 (~ 350) ) )
+ ( implies ( and ( not x192 ) true ) ( = tmp16 0 ) )
+ ( implies ( and x192 true ) ( = tmp16 (~ 240) ) )
+ ( implies ( and ( not x191 ) true ) ( = tmp15 0 ) )
+ ( implies ( and x191 true ) ( = tmp15 (~ 240) ) )
+ ( implies ( and ( not x190 ) true ) ( = tmp14 0 ) )
+ ( implies ( and x190 true ) ( = tmp14 (~ 240) ) )
+ ( implies ( and ( not x189 ) true ) ( = tmp13 0 ) )
+ ( implies ( and x189 true ) ( = tmp13 (~ 240) ) )
+ ( implies ( and ( not x188 ) true ) ( = tmp12 0 ) )
+ ( implies ( and x188 true ) ( = tmp12 (~ 240) ) )
+ ( implies ( and ( not x187 ) true ) ( = tmp11 0 ) )
+ ( implies ( and x187 true ) ( = tmp11 (~ 240) ) )
+ ( implies ( and ( not x186 ) true ) ( = tmp10 0 ) )
+ ( implies ( and x186 true ) ( = tmp10 (~ 240) ) )
+ ( implies ( and ( not x185 ) true ) ( = tmp9 0 ) )
+ ( implies ( and x185 true ) ( = tmp9 (~ 240) ) )
+ ( implies ( and ( not x184 ) true ) ( = tmp8 0 ) )
+ ( implies ( and x184 true ) ( = tmp8 (~ 420) ) )
+ ( implies ( and ( not x183 ) true ) ( = tmp7 0 ) )
+ ( implies ( and x183 true ) ( = tmp7 (~ 400) ) )
+ ( implies ( and ( not x182 ) true ) ( = tmp6 0 ) )
+ ( implies ( and x182 true ) ( = tmp6 (~ 400) ) )
+ ( implies ( and ( not x181 ) true ) ( = tmp5 0 ) )
+ ( implies ( and x181 true ) ( = tmp5 (~ 400) ) )
+ ( implies ( and ( not x180 ) true ) ( = tmp4 0 ) )
+ ( implies ( and x180 true ) ( = tmp4 (~ 400) ) )
+ ( implies ( and ( not x179 ) true ) ( = tmp3 0 ) )
+ ( implies ( and x179 true ) ( = tmp3 (~ 350) ) )
+ ( implies ( and ( not x178 ) true ) ( = tmp2 0 ) )
+ ( implies ( and x178 true ) ( = tmp2 (~ 350) ) )
+ ( implies ( and ( not x177 ) true ) ( = tmp1 0 ) )
+ ( implies ( and x177 true ) ( = tmp1 (~ 350) ) )
+ )
+)
diff --git a/test/regress/regress0/arith/miplib-pp08a-3000.smt.expect b/test/regress/regress0/arith/miplib-pp08a-3000.smt.expect
new file mode 100644
index 000000000..f6ae1d85b
--- /dev/null
+++ b/test/regress/regress0/arith/miplib-pp08a-3000.smt.expect
@@ -0,0 +1,3 @@
+% COMMAND-LINE: --enable-miplib-trick
+% EXPECT: unsat
+% EXIT: 20
diff --git a/test/regress/regress0/arith/miplib-pp08a-3000.smt2 b/test/regress/regress0/arith/miplib-pp08a-3000.smt2
new file mode 100644
index 000000000..e94506a23
--- /dev/null
+++ b/test/regress/regress0/arith/miplib-pp08a-3000.smt2
@@ -0,0 +1,330 @@
+; COMMAND-LINE: --enable-miplib-trick
+; EXPECT: unsat
+; EXIT: 10
+(set-logic QF_LRA)
+(set-info :source |
+Relaxation of the Mixed-Integer Programming
+optimization problem pp08a from the MIPLIB (http://miplib.zib.de/)
+by Enric Rodriguez-Carbonell (erodri@lsi.upc.edu)
+|)
+(set-info :smt-lib-version 2.0)
+(set-info :category "industrial")
+(set-info :status unsat)
+(declare-fun tmp75 () Real)
+(declare-fun tmp74 () Real)
+(declare-fun tmp73 () Real)
+(declare-fun tmp72 () Real)
+(declare-fun tmp71 () Real)
+(declare-fun tmp70 () Real)
+(declare-fun tmp69 () Real)
+(declare-fun tmp68 () Real)
+(declare-fun tmp67 () Real)
+(declare-fun tmp66 () Real)
+(declare-fun tmp65 () Real)
+(declare-fun tmp64 () Real)
+(declare-fun tmp63 () Real)
+(declare-fun tmp62 () Real)
+(declare-fun tmp61 () Real)
+(declare-fun tmp60 () Real)
+(declare-fun tmp59 () Real)
+(declare-fun tmp58 () Real)
+(declare-fun tmp57 () Real)
+(declare-fun tmp56 () Real)
+(declare-fun tmp55 () Real)
+(declare-fun tmp54 () Real)
+(declare-fun tmp53 () Real)
+(declare-fun tmp52 () Real)
+(declare-fun tmp51 () Real)
+(declare-fun tmp50 () Real)
+(declare-fun tmp49 () Real)
+(declare-fun tmp48 () Real)
+(declare-fun tmp47 () Real)
+(declare-fun tmp46 () Real)
+(declare-fun tmp45 () Real)
+(declare-fun tmp44 () Real)
+(declare-fun tmp43 () Real)
+(declare-fun tmp42 () Real)
+(declare-fun tmp41 () Real)
+(declare-fun tmp40 () Real)
+(declare-fun tmp39 () Real)
+(declare-fun tmp38 () Real)
+(declare-fun tmp37 () Real)
+(declare-fun tmp36 () Real)
+(declare-fun tmp35 () Real)
+(declare-fun tmp34 () Real)
+(declare-fun tmp33 () Real)
+(declare-fun tmp32 () Real)
+(declare-fun tmp31 () Real)
+(declare-fun tmp30 () Real)
+(declare-fun tmp29 () Real)
+(declare-fun tmp28 () Real)
+(declare-fun tmp27 () Real)
+(declare-fun tmp26 () Real)
+(declare-fun tmp25 () Real)
+(declare-fun tmp24 () Real)
+(declare-fun tmp23 () Real)
+(declare-fun tmp22 () Real)
+(declare-fun tmp21 () Real)
+(declare-fun tmp20 () Real)
+(declare-fun tmp19 () Real)
+(declare-fun tmp18 () Real)
+(declare-fun tmp17 () Real)
+(declare-fun tmp16 () Real)
+(declare-fun tmp15 () Real)
+(declare-fun tmp14 () Real)
+(declare-fun tmp13 () Real)
+(declare-fun tmp12 () Real)
+(declare-fun tmp11 () Real)
+(declare-fun tmp10 () Real)
+(declare-fun tmp9 () Real)
+(declare-fun tmp8 () Real)
+(declare-fun tmp7 () Real)
+(declare-fun tmp6 () Real)
+(declare-fun tmp5 () Real)
+(declare-fun tmp4 () Real)
+(declare-fun tmp3 () Real)
+(declare-fun tmp2 () Real)
+(declare-fun tmp1 () Real)
+(declare-fun x113 () Real)
+(declare-fun x114 () Real)
+(declare-fun x115 () Real)
+(declare-fun x116 () Real)
+(declare-fun x117 () Real)
+(declare-fun x118 () Real)
+(declare-fun x119 () Real)
+(declare-fun x120 () Real)
+(declare-fun x121 () Real)
+(declare-fun x122 () Real)
+(declare-fun x123 () Real)
+(declare-fun x124 () Real)
+(declare-fun x125 () Real)
+(declare-fun x126 () Real)
+(declare-fun x127 () Real)
+(declare-fun x128 () Real)
+(declare-fun x129 () Real)
+(declare-fun x130 () Real)
+(declare-fun x131 () Real)
+(declare-fun x132 () Real)
+(declare-fun x133 () Real)
+(declare-fun x134 () Real)
+(declare-fun x135 () Real)
+(declare-fun x136 () Real)
+(declare-fun x137 () Real)
+(declare-fun x138 () Real)
+(declare-fun x139 () Real)
+(declare-fun x140 () Real)
+(declare-fun x141 () Real)
+(declare-fun x142 () Real)
+(declare-fun x143 () Real)
+(declare-fun x144 () Real)
+(declare-fun x145 () Real)
+(declare-fun x146 () Real)
+(declare-fun x147 () Real)
+(declare-fun x148 () Real)
+(declare-fun x149 () Real)
+(declare-fun x150 () Real)
+(declare-fun x151 () Real)
+(declare-fun x152 () Real)
+(declare-fun x153 () Real)
+(declare-fun x154 () Real)
+(declare-fun x155 () Real)
+(declare-fun x156 () Real)
+(declare-fun x157 () Real)
+(declare-fun x158 () Real)
+(declare-fun x159 () Real)
+(declare-fun x160 () Real)
+(declare-fun x161 () Real)
+(declare-fun x162 () Real)
+(declare-fun x163 () Real)
+(declare-fun x164 () Real)
+(declare-fun x165 () Real)
+(declare-fun x166 () Real)
+(declare-fun x167 () Real)
+(declare-fun x168 () Real)
+(declare-fun x169 () Real)
+(declare-fun x170 () Real)
+(declare-fun x171 () Real)
+(declare-fun x172 () Real)
+(declare-fun x173 () Real)
+(declare-fun x174 () Real)
+(declare-fun x175 () Real)
+(declare-fun x176 () Real)
+(declare-fun x112 () Real)
+(declare-fun x111 () Real)
+(declare-fun x110 () Real)
+(declare-fun x109 () Real)
+(declare-fun x108 () Real)
+(declare-fun x107 () Real)
+(declare-fun x106 () Real)
+(declare-fun x105 () Real)
+(declare-fun x104 () Real)
+(declare-fun x103 () Real)
+(declare-fun x102 () Real)
+(declare-fun x101 () Real)
+(declare-fun x100 () Real)
+(declare-fun x99 () Real)
+(declare-fun x98 () Real)
+(declare-fun x97 () Real)
+(declare-fun x96 () Real)
+(declare-fun x95 () Real)
+(declare-fun x94 () Real)
+(declare-fun x93 () Real)
+(declare-fun x92 () Real)
+(declare-fun x91 () Real)
+(declare-fun x90 () Real)
+(declare-fun x89 () Real)
+(declare-fun x88 () Real)
+(declare-fun x87 () Real)
+(declare-fun x86 () Real)
+(declare-fun x85 () Real)
+(declare-fun x84 () Real)
+(declare-fun x83 () Real)
+(declare-fun x82 () Real)
+(declare-fun x81 () Real)
+(declare-fun x80 () Real)
+(declare-fun x79 () Real)
+(declare-fun x78 () Real)
+(declare-fun x77 () Real)
+(declare-fun x76 () Real)
+(declare-fun x75 () Real)
+(declare-fun x74 () Real)
+(declare-fun x73 () Real)
+(declare-fun x72 () Real)
+(declare-fun x71 () Real)
+(declare-fun x70 () Real)
+(declare-fun x69 () Real)
+(declare-fun x68 () Real)
+(declare-fun x67 () Real)
+(declare-fun x66 () Real)
+(declare-fun x65 () Real)
+(declare-fun x64 () Real)
+(declare-fun x63 () Real)
+(declare-fun x62 () Real)
+(declare-fun x61 () Real)
+(declare-fun x60 () Real)
+(declare-fun x59 () Real)
+(declare-fun x58 () Real)
+(declare-fun x57 () Real)
+(declare-fun x56 () Real)
+(declare-fun x55 () Real)
+(declare-fun x54 () Real)
+(declare-fun x53 () Real)
+(declare-fun x52 () Real)
+(declare-fun x51 () Real)
+(declare-fun x50 () Real)
+(declare-fun x49 () Real)
+(declare-fun x48 () Real)
+(declare-fun x47 () Real)
+(declare-fun x46 () Real)
+(declare-fun x45 () Real)
+(declare-fun x44 () Real)
+(declare-fun x43 () Real)
+(declare-fun x42 () Real)
+(declare-fun x41 () Real)
+(declare-fun x40 () Real)
+(declare-fun x39 () Real)
+(declare-fun x38 () Real)
+(declare-fun x37 () Real)
+(declare-fun x36 () Real)
+(declare-fun x35 () Real)
+(declare-fun x34 () Real)
+(declare-fun x33 () Real)
+(declare-fun x32 () Real)
+(declare-fun x31 () Real)
+(declare-fun x30 () Real)
+(declare-fun x29 () Real)
+(declare-fun x28 () Real)
+(declare-fun x27 () Real)
+(declare-fun x26 () Real)
+(declare-fun x25 () Real)
+(declare-fun x24 () Real)
+(declare-fun x23 () Real)
+(declare-fun x22 () Real)
+(declare-fun x21 () Real)
+(declare-fun x20 () Real)
+(declare-fun x19 () Real)
+(declare-fun x18 () Real)
+(declare-fun x17 () Real)
+(declare-fun x16 () Real)
+(declare-fun x15 () Real)
+(declare-fun x14 () Real)
+(declare-fun x13 () Real)
+(declare-fun x12 () Real)
+(declare-fun x11 () Real)
+(declare-fun x10 () Real)
+(declare-fun x9 () Real)
+(declare-fun x8 () Real)
+(declare-fun x7 () Real)
+(declare-fun x6 () Real)
+(declare-fun x5 () Real)
+(declare-fun x4 () Real)
+(declare-fun x3 () Real)
+(declare-fun x2 () Real)
+(declare-fun x1 () Real)
+(declare-fun x177 () Bool)
+(declare-fun x178 () Bool)
+(declare-fun x179 () Bool)
+(declare-fun x180 () Bool)
+(declare-fun x181 () Bool)
+(declare-fun x182 () Bool)
+(declare-fun x183 () Bool)
+(declare-fun x184 () Bool)
+(declare-fun x185 () Bool)
+(declare-fun x186 () Bool)
+(declare-fun x187 () Bool)
+(declare-fun x188 () Bool)
+(declare-fun x189 () Bool)
+(declare-fun x190 () Bool)
+(declare-fun x191 () Bool)
+(declare-fun x192 () Bool)
+(declare-fun x193 () Bool)
+(declare-fun x194 () Bool)
+(declare-fun x195 () Bool)
+(declare-fun x196 () Bool)
+(declare-fun x197 () Bool)
+(declare-fun x198 () Bool)
+(declare-fun x199 () Bool)
+(declare-fun x200 () Bool)
+(declare-fun x201 () Bool)
+(declare-fun x202 () Bool)
+(declare-fun x203 () Bool)
+(declare-fun x204 () Bool)
+(declare-fun x205 () Bool)
+(declare-fun x206 () Bool)
+(declare-fun x207 () Bool)
+(declare-fun x208 () Bool)
+(declare-fun x209 () Bool)
+(declare-fun x210 () Bool)
+(declare-fun x211 () Bool)
+(declare-fun x212 () Bool)
+(declare-fun x213 () Bool)
+(declare-fun x214 () Bool)
+(declare-fun x215 () Bool)
+(declare-fun x216 () Bool)
+(declare-fun x217 () Bool)
+(declare-fun x218 () Bool)
+(declare-fun x219 () Bool)
+(declare-fun x220 () Bool)
+(declare-fun x221 () Bool)
+(declare-fun x222 () Bool)
+(declare-fun x223 () Bool)
+(declare-fun x224 () Bool)
+(declare-fun x225 () Bool)
+(declare-fun x226 () Bool)
+(declare-fun x227 () Bool)
+(declare-fun x228 () Bool)
+(declare-fun x229 () Bool)
+(declare-fun x230 () Bool)
+(declare-fun x231 () Bool)
+(declare-fun x232 () Bool)
+(declare-fun x233 () Bool)
+(declare-fun x234 () Bool)
+(declare-fun x235 () Bool)
+(declare-fun x236 () Bool)
+(declare-fun x237 () Bool)
+(declare-fun x238 () Bool)
+(declare-fun x239 () Bool)
+(declare-fun x240 () Bool)
+(assert (let ((?v_64 (* 1 x56)) (?v_65 (* 1 x55)) (?v_66 (* 1 x54)) (?v_67 (* 1 x53)) (?v_68 (* 1 x52)) (?v_69 (* 1 x51)) (?v_70 (* 1 x50)) (?v_71 (* 1 x49)) (?v_72 (* 1 x48)) (?v_73 (* 1 x47)) (?v_74 (* 1 x46)) (?v_75 (* 1 x45)) (?v_76 (* 1 x44)) (?v_77 (* 1 x43)) (?v_78 (* 1 x42)) (?v_79 (* 1 x41)) (?v_80 (* 1 x40)) (?v_81 (* 1 x39)) (?v_82 (* 1 x38)) (?v_83 (* 1 x37)) (?v_84 (* 1 x36)) (?v_85 (* 1 x35)) (?v_86 (* 1 x34)) (?v_87 (* 1 x33)) (?v_88 (* 1 x32)) (?v_89 (* 1 x31)) (?v_90 (* 1 x30)) (?v_91 (* 1 x29)) (?v_92 (* 1 x28)) (?v_93 (* 1 x27)) (?v_94 (* 1 x26)) (?v_95 (* 1 x25)) (?v_96 (* 1 x24)) (?v_97 (* 1 x23)) (?v_98 (* 1 x22)) (?v_99 (* 1 x21)) (?v_100 (* 1 x20)) (?v_101 (* 1 x19)) (?v_102 (* 1 x18)) (?v_103 (* 1 x17)) (?v_104 (* 1 x16)) (?v_105 (* 1 x15)) (?v_106 (* 1 x14)) (?v_107 (* 1 x13)) (?v_108 (* 1 x12)) (?v_109 (* 1 x11)) (?v_110 (* 1 x10)) (?v_111 (* 1 x9)) (?v_112 (* 1 x8)) (?v_113 (* 1 x7)) (?v_114 (* 1 x6)) (?v_115 (* 1 x5)) (?v_116 (* 1 x4)) (?v_117 (* 1 x3)) (?v_118 (* 1 x2)) (?v_119 (* 1 x1)) (?v_7 (* 1 x176)) (?v_15 (* 1 x175)) (?v_23 (* 1 x174)) (?v_31 (* 1 x173)) (?v_39 (* 1 x172)) (?v_47 (* 1 x171)) (?v_55 (* 1 x170)) (?v_63 (* 1 x169)) (?v_6 (* 1 x168)) (?v_14 (* 1 x167)) (?v_22 (* 1 x166)) (?v_30 (* 1 x165)) (?v_38 (* 1 x164)) (?v_46 (* 1 x163)) (?v_54 (* 1 x162)) (?v_62 (* 1 x161)) (?v_5 (* 1 x160)) (?v_13 (* 1 x159)) (?v_21 (* 1 x158)) (?v_29 (* 1 x157)) (?v_37 (* 1 x156)) (?v_45 (* 1 x155)) (?v_53 (* 1 x154)) (?v_61 (* 1 x153)) (?v_4 (* 1 x152)) (?v_12 (* 1 x151)) (?v_20 (* 1 x150)) (?v_28 (* 1 x149)) (?v_36 (* 1 x148)) (?v_44 (* 1 x147)) (?v_52 (* 1 x146)) (?v_60 (* 1 x145)) (?v_3 (* 1 x144)) (?v_11 (* 1 x143)) (?v_19 (* 1 x142)) (?v_27 (* 1 x141)) (?v_35 (* 1 x140)) (?v_43 (* 1 x139)) (?v_51 (* 1 x138)) (?v_59 (* 1 x137)) (?v_2 (* 1 x136)) (?v_10 (* 1 x135)) (?v_18 (* 1 x134)) (?v_26 (* 1 x133)) (?v_34 (* 1 x132)) (?v_42 (* 1 x131)) (?v_50 (* 1 x130)) (?v_58 (* 1 x129)) (?v_1 (* 1 x128)) (?v_9 (* 1 x127)) (?v_17 (* 1 x126)) (?v_25 (* 1 x125)) (?v_33 (* 1 x124)) (?v_41 (* 1 x123)) (?v_49 (* 1 x122)) (?v_57 (* 1 x121)) (?v_0 (* 1 x120)) (?v_8 (* 1 x119)) (?v_16 (* 1 x118)) (?v_24 (* 1 x117)) (?v_32 (* 1 x116)) (?v_40 (* 1 x115)) (?v_48 (* 1 x114)) (?v_56 (* 1 x113)) (?v_120 (not x207)) (?v_121 (not x208)) (?v_122 (not x209)) (?v_123 (and (not x210) true))) (let ((?v_126 (and ?v_122 ?v_123))) (let ((?v_131 (and ?v_121 ?v_126)) (?v_125 (and x210 true))) (let ((?v_127 (and ?v_122 ?v_125))) (let ((?v_133 (and ?v_121 ?v_127)) (?v_124 (= tmp75 400)) (?v_128 (and x209 ?v_123))) (let ((?v_134 (and ?v_121 ?v_128)) (?v_130 (and x209 ?v_125))) (let ((?v_135 (and ?v_121 ?v_130)) (?v_137 (and x208 ?v_126)) (?v_132 (= tmp75 300)) (?v_138 (and x208 ?v_127)) (?v_129 (= tmp75 700)) (?v_139 (and x208 ?v_128)) (?v_141 (and x208 ?v_130)) (?v_136 (= tmp75 1100)) (?v_140 (= tmp75 1000)) (?v_142 (not x216)) (?v_143 (not x215)) (?v_144 (not x214)) (?v_145 (not x213)) (?v_146 (not x212)) (?v_147 (and (not x211) true))) (let ((?v_150 (and ?v_146 ?v_147))) (let ((?v_155 (and ?v_145 ?v_150))) (let ((?v_164 (and ?v_144 ?v_155))) (let ((?v_181 (and ?v_143 ?v_164)) (?v_149 (and x211 true))) (let ((?v_151 (and ?v_146 ?v_149))) (let ((?v_156 (and ?v_145 ?v_151))) (let ((?v_165 (and ?v_144 ?v_156))) (let ((?v_182 (and ?v_143 ?v_165)) (?v_148 (= tmp74 400)) (?v_153 (and x212 ?v_147))) (let ((?v_157 (and ?v_145 ?v_153))) (let ((?v_166 (and ?v_144 ?v_157))) (let ((?v_183 (and ?v_143 ?v_166)) (?v_154 (and x212 ?v_149))) (let ((?v_158 (and ?v_145 ?v_154))) (let ((?v_167 (and ?v_144 ?v_158))) (let ((?v_184 (and ?v_143 ?v_167)) (?v_152 (= tmp74 800)) (?v_160 (and x213 ?v_150))) (let ((?v_168 (and ?v_144 ?v_160))) (let ((?v_185 (and ?v_143 ?v_168)) (?v_161 (and x213 ?v_151))) (let ((?v_169 (and ?v_144 ?v_161))) (let ((?v_186 (and ?v_143 ?v_169)) (?v_162 (and x213 ?v_153))) (let ((?v_170 (and ?v_144 ?v_162))) (let ((?v_187 (and ?v_143 ?v_170)) (?v_163 (and x213 ?v_154))) (let ((?v_171 (and ?v_144 ?v_163))) (let ((?v_188 (and ?v_143 ?v_171)) (?v_159 (= tmp74 1200)) (?v_173 (and x214 ?v_155))) (let ((?v_189 (and ?v_143 ?v_173)) (?v_174 (and x214 ?v_156))) (let ((?v_190 (and ?v_143 ?v_174)) (?v_175 (and x214 ?v_157))) (let ((?v_191 (and ?v_143 ?v_175)) (?v_176 (and x214 ?v_158))) (let ((?v_192 (and ?v_143 ?v_176)) (?v_177 (and x214 ?v_160))) (let ((?v_193 (and ?v_143 ?v_177)) (?v_178 (and x214 ?v_161))) (let ((?v_194 (and ?v_143 ?v_178)) (?v_179 (and x214 ?v_162))) (let ((?v_195 (and ?v_143 ?v_179)) (?v_180 (and x214 ?v_163))) (let ((?v_196 (and ?v_143 ?v_180)) (?v_172 (= tmp74 1600)) (?v_198 (and x215 ?v_164)) (?v_199 (and x215 ?v_165)) (?v_200 (and x215 ?v_166)) (?v_201 (and x215 ?v_167)) (?v_202 (and x215 ?v_168)) (?v_203 (and x215 ?v_169)) (?v_204 (and x215 ?v_170)) (?v_205 (and x215 ?v_171)) (?v_206 (and x215 ?v_173)) (?v_207 (and x215 ?v_174)) (?v_208 (and x215 ?v_175)) (?v_209 (and x215 ?v_176)) (?v_210 (and x215 ?v_177)) (?v_211 (and x215 ?v_178)) (?v_212 (and x215 ?v_179)) (?v_213 (and x215 ?v_180)) (?v_197 (= tmp74 2000)) (?v_214 (not x201)) (?v_215 (not x202)) (?v_216 (not x203)) (?v_217 (not x204)) (?v_218 (not x205)) (?v_219 (and (not x206) true))) (let ((?v_222 (and ?v_218 ?v_219))) (let ((?v_227 (and ?v_217 ?v_222))) (let ((?v_236 (and ?v_216 ?v_227))) (let ((?v_253 (and ?v_215 ?v_236)) (?v_221 (and x206 true))) (let ((?v_223 (and ?v_218 ?v_221))) (let ((?v_228 (and ?v_217 ?v_223))) (let ((?v_237 (and ?v_216 ?v_228))) (let ((?v_254 (and ?v_215 ?v_237)) (?v_220 (= tmp73 300)) (?v_225 (and x205 ?v_219))) (let ((?v_229 (and ?v_217 ?v_225))) (let ((?v_238 (and ?v_216 ?v_229))) (let ((?v_255 (and ?v_215 ?v_238)) (?v_226 (and x205 ?v_221))) (let ((?v_230 (and ?v_217 ?v_226))) (let ((?v_239 (and ?v_216 ?v_230))) (let ((?v_256 (and ?v_215 ?v_239)) (?v_224 (= tmp73 600)) (?v_232 (and x204 ?v_222))) (let ((?v_240 (and ?v_216 ?v_232))) (let ((?v_257 (and ?v_215 ?v_240)) (?v_233 (and x204 ?v_223))) (let ((?v_241 (and ?v_216 ?v_233))) (let ((?v_258 (and ?v_215 ?v_241)) (?v_234 (and x204 ?v_225))) (let ((?v_242 (and ?v_216 ?v_234))) (let ((?v_259 (and ?v_215 ?v_242)) (?v_235 (and x204 ?v_226))) (let ((?v_243 (and ?v_216 ?v_235))) (let ((?v_260 (and ?v_215 ?v_243)) (?v_231 (= tmp73 900)) (?v_245 (and x203 ?v_227))) (let ((?v_261 (and ?v_215 ?v_245)) (?v_246 (and x203 ?v_228))) (let ((?v_262 (and ?v_215 ?v_246)) (?v_247 (and x203 ?v_229))) (let ((?v_263 (and ?v_215 ?v_247)) (?v_248 (and x203 ?v_230))) (let ((?v_264 (and ?v_215 ?v_248)) (?v_249 (and x203 ?v_232))) (let ((?v_265 (and ?v_215 ?v_249)) (?v_250 (and x203 ?v_233))) (let ((?v_266 (and ?v_215 ?v_250)) (?v_251 (and x203 ?v_234))) (let ((?v_267 (and ?v_215 ?v_251)) (?v_252 (and x203 ?v_235))) (let ((?v_268 (and ?v_215 ?v_252)) (?v_244 (= tmp73 1200)) (?v_270 (and x202 ?v_236)) (?v_271 (and x202 ?v_237)) (?v_272 (and x202 ?v_238)) (?v_273 (and x202 ?v_239)) (?v_274 (and x202 ?v_240)) (?v_275 (and x202 ?v_241)) (?v_276 (and x202 ?v_242)) (?v_277 (and x202 ?v_243)) (?v_278 (and x202 ?v_245)) (?v_279 (and x202 ?v_246)) (?v_280 (and x202 ?v_247)) (?v_281 (and x202 ?v_248)) (?v_282 (and x202 ?v_249)) (?v_283 (and x202 ?v_250)) (?v_284 (and x202 ?v_251)) (?v_285 (and x202 ?v_252)) (?v_269 (= tmp73 1500)) (?v_286 (not x222)) (?v_287 (not x221)) (?v_288 (not x220)) (?v_289 (not x219)) (?v_290 (not x218)) (?v_291 (and (not x217) true))) (let ((?v_294 (and ?v_290 ?v_291))) (let ((?v_299 (and ?v_289 ?v_294))) (let ((?v_308 (and ?v_288 ?v_299))) (let ((?v_325 (and ?v_287 ?v_308)) (?v_293 (and x217 true))) (let ((?v_295 (and ?v_290 ?v_293))) (let ((?v_300 (and ?v_289 ?v_295))) (let ((?v_309 (and ?v_288 ?v_300))) (let ((?v_326 (and ?v_287 ?v_309)) (?v_292 (= tmp72 250)) (?v_297 (and x218 ?v_291))) (let ((?v_301 (and ?v_289 ?v_297))) (let ((?v_310 (and ?v_288 ?v_301))) (let ((?v_327 (and ?v_287 ?v_310)) (?v_298 (and x218 ?v_293))) (let ((?v_302 (and ?v_289 ?v_298))) (let ((?v_311 (and ?v_288 ?v_302))) (let ((?v_328 (and ?v_287 ?v_311)) (?v_296 (= tmp72 500)) (?v_304 (and x219 ?v_294))) (let ((?v_312 (and ?v_288 ?v_304))) (let ((?v_329 (and ?v_287 ?v_312)) (?v_305 (and x219 ?v_295))) (let ((?v_313 (and ?v_288 ?v_305))) (let ((?v_330 (and ?v_287 ?v_313)) (?v_306 (and x219 ?v_297))) (let ((?v_314 (and ?v_288 ?v_306))) (let ((?v_331 (and ?v_287 ?v_314)) (?v_307 (and x219 ?v_298))) (let ((?v_315 (and ?v_288 ?v_307))) (let ((?v_332 (and ?v_287 ?v_315)) (?v_303 (= tmp72 750)) (?v_317 (and x220 ?v_299))) (let ((?v_333 (and ?v_287 ?v_317)) (?v_318 (and x220 ?v_300))) (let ((?v_334 (and ?v_287 ?v_318)) (?v_319 (and x220 ?v_301))) (let ((?v_335 (and ?v_287 ?v_319)) (?v_320 (and x220 ?v_302))) (let ((?v_336 (and ?v_287 ?v_320)) (?v_321 (and x220 ?v_304))) (let ((?v_337 (and ?v_287 ?v_321)) (?v_322 (and x220 ?v_305))) (let ((?v_338 (and ?v_287 ?v_322)) (?v_323 (and x220 ?v_306))) (let ((?v_339 (and ?v_287 ?v_323)) (?v_324 (and x220 ?v_307))) (let ((?v_340 (and ?v_287 ?v_324)) (?v_316 (= tmp72 1000)) (?v_342 (and x221 ?v_308)) (?v_343 (and x221 ?v_309)) (?v_344 (and x221 ?v_310)) (?v_345 (and x221 ?v_311)) (?v_346 (and x221 ?v_312)) (?v_347 (and x221 ?v_313)) (?v_348 (and x221 ?v_314)) (?v_349 (and x221 ?v_315)) (?v_350 (and x221 ?v_317)) (?v_351 (and x221 ?v_318)) (?v_352 (and x221 ?v_319)) (?v_353 (and x221 ?v_320)) (?v_354 (and x221 ?v_321)) (?v_355 (and x221 ?v_322)) (?v_356 (and x221 ?v_323)) (?v_357 (and x221 ?v_324)) (?v_341 (= tmp72 1250)) (?v_358 (not x195)) (?v_359 (not x196)) (?v_360 (not x197)) (?v_361 (not x198)) (?v_362 (not x199)) (?v_363 (and (not x200) true))) (let ((?v_366 (and ?v_362 ?v_363))) (let ((?v_371 (and ?v_361 ?v_366))) (let ((?v_380 (and ?v_360 ?v_371))) (let ((?v_397 (and ?v_359 ?v_380)) (?v_365 (and x200 true))) (let ((?v_367 (and ?v_362 ?v_365))) (let ((?v_372 (and ?v_361 ?v_367))) (let ((?v_381 (and ?v_360 ?v_372))) (let ((?v_398 (and ?v_359 ?v_381)) (?v_364 (= tmp71 200)) (?v_369 (and x199 ?v_363))) (let ((?v_373 (and ?v_361 ?v_369))) (let ((?v_382 (and ?v_360 ?v_373))) (let ((?v_399 (and ?v_359 ?v_382)) (?v_370 (and x199 ?v_365))) (let ((?v_374 (and ?v_361 ?v_370))) (let ((?v_383 (and ?v_360 ?v_374))) (let ((?v_400 (and ?v_359 ?v_383)) (?v_368 (= tmp71 400)) (?v_376 (and x198 ?v_366))) (let ((?v_384 (and ?v_360 ?v_376))) (let ((?v_401 (and ?v_359 ?v_384)) (?v_377 (and x198 ?v_367))) (let ((?v_385 (and ?v_360 ?v_377))) (let ((?v_402 (and ?v_359 ?v_385)) (?v_378 (and x198 ?v_369))) (let ((?v_386 (and ?v_360 ?v_378))) (let ((?v_403 (and ?v_359 ?v_386)) (?v_379 (and x198 ?v_370))) (let ((?v_387 (and ?v_360 ?v_379))) (let ((?v_404 (and ?v_359 ?v_387)) (?v_375 (= tmp71 600)) (?v_389 (and x197 ?v_371))) (let ((?v_405 (and ?v_359 ?v_389)) (?v_390 (and x197 ?v_372))) (let ((?v_406 (and ?v_359 ?v_390)) (?v_391 (and x197 ?v_373))) (let ((?v_407 (and ?v_359 ?v_391)) (?v_392 (and x197 ?v_374))) (let ((?v_408 (and ?v_359 ?v_392)) (?v_393 (and x197 ?v_376))) (let ((?v_409 (and ?v_359 ?v_393)) (?v_394 (and x197 ?v_377))) (let ((?v_410 (and ?v_359 ?v_394)) (?v_395 (and x197 ?v_378))) (let ((?v_411 (and ?v_359 ?v_395)) (?v_396 (and x197 ?v_379))) (let ((?v_412 (and ?v_359 ?v_396)) (?v_388 (= tmp71 800)) (?v_414 (and x196 ?v_380)) (?v_415 (and x196 ?v_381)) (?v_416 (and x196 ?v_382)) (?v_417 (and x196 ?v_383)) (?v_418 (and x196 ?v_384)) (?v_419 (and x196 ?v_385)) (?v_420 (and x196 ?v_386)) (?v_421 (and x196 ?v_387)) (?v_422 (and x196 ?v_389)) (?v_423 (and x196 ?v_390)) (?v_424 (and x196 ?v_391)) (?v_425 (and x196 ?v_392)) (?v_426 (and x196 ?v_393)) (?v_427 (and x196 ?v_394)) (?v_428 (and x196 ?v_395)) (?v_429 (and x196 ?v_396)) (?v_413 (= tmp71 1000)) (?v_430 (not x228)) (?v_431 (not x227)) (?v_432 (not x226)) (?v_433 (not x225)) (?v_434 (not x224)) (?v_435 (and (not x223) true))) (let ((?v_438 (and ?v_434 ?v_435))) (let ((?v_444 (and ?v_433 ?v_438))) (let ((?v_454 (and ?v_432 ?v_444))) (let ((?v_472 (and ?v_431 ?v_454)) (?v_437 (and x223 true))) (let ((?v_440 (and ?v_434 ?v_437))) (let ((?v_445 (and ?v_433 ?v_440))) (let ((?v_455 (and ?v_432 ?v_445))) (let ((?v_473 (and ?v_431 ?v_455)) (?v_436 (= tmp70 250)) (?v_441 (and x224 ?v_435))) (let ((?v_446 (and ?v_433 ?v_441))) (let ((?v_456 (and ?v_432 ?v_446))) (let ((?v_474 (and ?v_431 ?v_456)) (?v_443 (and x224 ?v_437))) (let ((?v_447 (and ?v_433 ?v_443))) (let ((?v_457 (and ?v_432 ?v_447))) (let ((?v_475 (and ?v_431 ?v_457)) (?v_439 (= tmp70 500)) (?v_449 (and x225 ?v_438))) (let ((?v_458 (and ?v_432 ?v_449))) (let ((?v_476 (and ?v_431 ?v_458)) (?v_450 (and x225 ?v_440))) (let ((?v_459 (and ?v_432 ?v_450))) (let ((?v_477 (and ?v_431 ?v_459)) (?v_442 (= tmp70 750)) (?v_451 (and x225 ?v_441))) (let ((?v_460 (and ?v_432 ?v_451))) (let ((?v_478 (and ?v_431 ?v_460)) (?v_453 (and x225 ?v_443))) (let ((?v_461 (and ?v_432 ?v_453))) (let ((?v_479 (and ?v_431 ?v_461)) (?v_448 (= tmp70 1000)) (?v_463 (and x226 ?v_444))) (let ((?v_480 (and ?v_431 ?v_463)) (?v_464 (and x226 ?v_445))) (let ((?v_481 (and ?v_431 ?v_464)) (?v_465 (and x226 ?v_446))) (let ((?v_482 (and ?v_431 ?v_465)) (?v_466 (and x226 ?v_447))) (let ((?v_483 (and ?v_431 ?v_466)) (?v_467 (and x226 ?v_449))) (let ((?v_484 (and ?v_431 ?v_467)) (?v_468 (and x226 ?v_450))) (let ((?v_485 (and ?v_431 ?v_468)) (?v_452 (= tmp70 1250)) (?v_469 (and x226 ?v_451))) (let ((?v_486 (and ?v_431 ?v_469)) (?v_471 (and x226 ?v_453))) (let ((?v_487 (and ?v_431 ?v_471)) (?v_462 (= tmp70 1500)) (?v_489 (and x227 ?v_454)) (?v_490 (and x227 ?v_455)) (?v_491 (and x227 ?v_456)) (?v_492 (and x227 ?v_457)) (?v_493 (and x227 ?v_458)) (?v_494 (and x227 ?v_459)) (?v_495 (and x227 ?v_460)) (?v_496 (and x227 ?v_461)) (?v_497 (and x227 ?v_463)) (?v_498 (and x227 ?v_464)) (?v_499 (and x227 ?v_465)) (?v_500 (and x227 ?v_466)) (?v_501 (and x227 ?v_467)) (?v_502 (and x227 ?v_468)) (?v_470 (= tmp70 1750)) (?v_503 (and x227 ?v_469)) (?v_505 (and x227 ?v_471)) (?v_488 (= tmp70 2000)) (?v_504 (= tmp70 2250)) (?v_506 (not x189)) (?v_507 (not x190)) (?v_508 (not x191)) (?v_509 (not x192)) (?v_510 (not x193)) (?v_511 (and (not x194) true))) (let ((?v_514 (and ?v_510 ?v_511))) (let ((?v_519 (and ?v_509 ?v_514))) (let ((?v_528 (and ?v_508 ?v_519))) (let ((?v_545 (and ?v_507 ?v_528)) (?v_513 (and x194 true))) (let ((?v_515 (and ?v_510 ?v_513))) (let ((?v_520 (and ?v_509 ?v_515))) (let ((?v_529 (and ?v_508 ?v_520))) (let ((?v_546 (and ?v_507 ?v_529)) (?v_512 (= tmp69 200)) (?v_517 (and x193 ?v_511))) (let ((?v_521 (and ?v_509 ?v_517))) (let ((?v_530 (and ?v_508 ?v_521))) (let ((?v_547 (and ?v_507 ?v_530)) (?v_518 (and x193 ?v_513))) (let ((?v_522 (and ?v_509 ?v_518))) (let ((?v_531 (and ?v_508 ?v_522))) (let ((?v_548 (and ?v_507 ?v_531)) (?v_516 (= tmp69 400)) (?v_524 (and x192 ?v_514))) (let ((?v_532 (and ?v_508 ?v_524))) (let ((?v_549 (and ?v_507 ?v_532)) (?v_525 (and x192 ?v_515))) (let ((?v_533 (and ?v_508 ?v_525))) (let ((?v_550 (and ?v_507 ?v_533)) (?v_526 (and x192 ?v_517))) (let ((?v_534 (and ?v_508 ?v_526))) (let ((?v_551 (and ?v_507 ?v_534)) (?v_527 (and x192 ?v_518))) (let ((?v_535 (and ?v_508 ?v_527))) (let ((?v_552 (and ?v_507 ?v_535)) (?v_523 (= tmp69 600)) (?v_537 (and x191 ?v_519))) (let ((?v_553 (and ?v_507 ?v_537)) (?v_538 (and x191 ?v_520))) (let ((?v_554 (and ?v_507 ?v_538)) (?v_539 (and x191 ?v_521))) (let ((?v_555 (and ?v_507 ?v_539)) (?v_540 (and x191 ?v_522))) (let ((?v_556 (and ?v_507 ?v_540)) (?v_541 (and x191 ?v_524))) (let ((?v_557 (and ?v_507 ?v_541)) (?v_542 (and x191 ?v_525))) (let ((?v_558 (and ?v_507 ?v_542)) (?v_543 (and x191 ?v_526))) (let ((?v_559 (and ?v_507 ?v_543)) (?v_544 (and x191 ?v_527))) (let ((?v_560 (and ?v_507 ?v_544)) (?v_536 (= tmp69 800)) (?v_562 (and x190 ?v_528)) (?v_563 (and x190 ?v_529)) (?v_564 (and x190 ?v_530)) (?v_565 (and x190 ?v_531)) (?v_566 (and x190 ?v_532)) (?v_567 (and x190 ?v_533)) (?v_568 (and x190 ?v_534)) (?v_569 (and x190 ?v_535)) (?v_570 (and x190 ?v_537)) (?v_571 (and x190 ?v_538)) (?v_572 (and x190 ?v_539)) (?v_573 (and x190 ?v_540)) (?v_574 (and x190 ?v_541)) (?v_575 (and x190 ?v_542)) (?v_576 (and x190 ?v_543)) (?v_577 (and x190 ?v_544)) (?v_561 (= tmp69 1000)) (?v_578 (not x234)) (?v_579 (not x233)) (?v_580 (not x232)) (?v_581 (not x231)) (?v_582 (not x230)) (?v_583 (and (not x229) true))) (let ((?v_586 (and ?v_582 ?v_583))) (let ((?v_591 (and ?v_581 ?v_586))) (let ((?v_600 (and ?v_580 ?v_591))) (let ((?v_619 (and ?v_579 ?v_600)) (?v_585 (and x229 true))) (let ((?v_587 (and ?v_582 ?v_585))) (let ((?v_592 (and ?v_581 ?v_587))) (let ((?v_601 (and ?v_580 ?v_592))) (let ((?v_621 (and ?v_579 ?v_601)) (?v_584 (= tmp68 500)) (?v_589 (and x230 ?v_583))) (let ((?v_593 (and ?v_581 ?v_589))) (let ((?v_602 (and ?v_580 ?v_593))) (let ((?v_622 (and ?v_579 ?v_602)) (?v_590 (and x230 ?v_585))) (let ((?v_594 (and ?v_581 ?v_590))) (let ((?v_604 (and ?v_580 ?v_594))) (let ((?v_623 (and ?v_579 ?v_604)) (?v_588 (= tmp68 1000)) (?v_596 (and x231 ?v_586))) (let ((?v_605 (and ?v_580 ?v_596))) (let ((?v_624 (and ?v_579 ?v_605)) (?v_597 (and x231 ?v_587))) (let ((?v_606 (and ?v_580 ?v_597))) (let ((?v_625 (and ?v_579 ?v_606)) (?v_598 (and x231 ?v_589))) (let ((?v_608 (and ?v_580 ?v_598))) (let ((?v_626 (and ?v_579 ?v_608)) (?v_599 (and x231 ?v_590))) (let ((?v_609 (and ?v_580 ?v_599))) (let ((?v_627 (and ?v_579 ?v_609)) (?v_595 (= tmp68 1500)) (?v_610 (and x232 ?v_591))) (let ((?v_628 (and ?v_579 ?v_610)) (?v_611 (and x232 ?v_592))) (let ((?v_629 (and ?v_579 ?v_611)) (?v_612 (and x232 ?v_593))) (let ((?v_630 (and ?v_579 ?v_612)) (?v_613 (and x232 ?v_594))) (let ((?v_631 (and ?v_579 ?v_613)) (?v_615 (and x232 ?v_596))) (let ((?v_632 (and ?v_579 ?v_615)) (?v_616 (and x232 ?v_597))) (let ((?v_633 (and ?v_579 ?v_616)) (?v_617 (and x232 ?v_598))) (let ((?v_634 (and ?v_579 ?v_617)) (?v_618 (and x232 ?v_599))) (let ((?v_635 (and ?v_579 ?v_618)) (?v_637 (and x233 ?v_600)) (?v_620 (= tmp68 300)) (?v_638 (and x233 ?v_601)) (?v_603 (= tmp68 800)) (?v_639 (and x233 ?v_602)) (?v_641 (and x233 ?v_604)) (?v_607 (= tmp68 1300)) (?v_642 (and x233 ?v_605)) (?v_643 (and x233 ?v_606)) (?v_645 (and x233 ?v_608)) (?v_646 (and x233 ?v_609)) (?v_614 (= tmp68 1800)) (?v_647 (and x233 ?v_610)) (?v_648 (and x233 ?v_611)) (?v_649 (and x233 ?v_612)) (?v_650 (and x233 ?v_613)) (?v_652 (and x233 ?v_615)) (?v_653 (and x233 ?v_616)) (?v_654 (and x233 ?v_617)) (?v_655 (and x233 ?v_618)) (?v_636 (= tmp68 2300)) (?v_640 (= tmp68 1100)) (?v_644 (= tmp68 1600)) (?v_651 (= tmp68 2100)) (?v_656 (not x183)) (?v_657 (not x184)) (?v_658 (not x185)) (?v_659 (not x186)) (?v_660 (not x187)) (?v_661 (and (not x188) true))) (let ((?v_664 (and ?v_660 ?v_661))) (let ((?v_669 (and ?v_659 ?v_664))) (let ((?v_678 (and ?v_658 ?v_669))) (let ((?v_697 (and ?v_657 ?v_678)) (?v_663 (and x188 true))) (let ((?v_665 (and ?v_660 ?v_663))) (let ((?v_670 (and ?v_659 ?v_665))) (let ((?v_679 (and ?v_658 ?v_670))) (let ((?v_699 (and ?v_657 ?v_679)) (?v_662 (= tmp67 200)) (?v_667 (and x187 ?v_661))) (let ((?v_671 (and ?v_659 ?v_667))) (let ((?v_680 (and ?v_658 ?v_671))) (let ((?v_700 (and ?v_657 ?v_680)) (?v_668 (and x187 ?v_663))) (let ((?v_672 (and ?v_659 ?v_668))) (let ((?v_682 (and ?v_658 ?v_672))) (let ((?v_701 (and ?v_657 ?v_682)) (?v_666 (= tmp67 400)) (?v_674 (and x186 ?v_664))) (let ((?v_683 (and ?v_658 ?v_674))) (let ((?v_702 (and ?v_657 ?v_683)) (?v_675 (and x186 ?v_665))) (let ((?v_684 (and ?v_658 ?v_675))) (let ((?v_703 (and ?v_657 ?v_684)) (?v_676 (and x186 ?v_667))) (let ((?v_686 (and ?v_658 ?v_676))) (let ((?v_704 (and ?v_657 ?v_686)) (?v_677 (and x186 ?v_668))) (let ((?v_687 (and ?v_658 ?v_677))) (let ((?v_705 (and ?v_657 ?v_687)) (?v_673 (= tmp67 600)) (?v_688 (and x185 ?v_669))) (let ((?v_706 (and ?v_657 ?v_688)) (?v_689 (and x185 ?v_670))) (let ((?v_707 (and ?v_657 ?v_689)) (?v_690 (and x185 ?v_671))) (let ((?v_708 (and ?v_657 ?v_690)) (?v_691 (and x185 ?v_672))) (let ((?v_709 (and ?v_657 ?v_691)) (?v_693 (and x185 ?v_674))) (let ((?v_710 (and ?v_657 ?v_693)) (?v_694 (and x185 ?v_675))) (let ((?v_711 (and ?v_657 ?v_694)) (?v_695 (and x185 ?v_676))) (let ((?v_712 (and ?v_657 ?v_695)) (?v_696 (and x185 ?v_677))) (let ((?v_713 (and ?v_657 ?v_696)) (?v_723 (= tmp67 800)) (?v_715 (and x184 ?v_678)) (?v_698 (= tmp67 100)) (?v_716 (and x184 ?v_679)) (?v_681 (= tmp67 300)) (?v_717 (and x184 ?v_680)) (?v_718 (and x184 ?v_682)) (?v_685 (= tmp67 500)) (?v_719 (and x184 ?v_683)) (?v_720 (and x184 ?v_684)) (?v_721 (and x184 ?v_686)) (?v_722 (and x184 ?v_687)) (?v_692 (= tmp67 700)) (?v_724 (and x184 ?v_688)) (?v_725 (and x184 ?v_689)) (?v_726 (and x184 ?v_690)) (?v_727 (and x184 ?v_691)) (?v_728 (and x184 ?v_693)) (?v_729 (and x184 ?v_694)) (?v_730 (and x184 ?v_695)) (?v_731 (and x184 ?v_696)) (?v_714 (= tmp67 900)) (?v_732 (not x240)) (?v_733 (not x239)) (?v_734 (not x238)) (?v_735 (not x237)) (?v_736 (not x236)) (?v_737 (and (not x235) true))) (let ((?v_740 (and ?v_736 ?v_737))) (let ((?v_745 (and ?v_735 ?v_740))) (let ((?v_754 (and ?v_734 ?v_745))) (let ((?v_771 (and ?v_733 ?v_754)) (?v_739 (and x235 true))) (let ((?v_741 (and ?v_736 ?v_739))) (let ((?v_746 (and ?v_735 ?v_741))) (let ((?v_755 (and ?v_734 ?v_746))) (let ((?v_772 (and ?v_733 ?v_755)) (?v_738 (= tmp66 300)) (?v_743 (and x236 ?v_737))) (let ((?v_747 (and ?v_735 ?v_743))) (let ((?v_756 (and ?v_734 ?v_747))) (let ((?v_773 (and ?v_733 ?v_756)) (?v_744 (and x236 ?v_739))) (let ((?v_748 (and ?v_735 ?v_744))) (let ((?v_757 (and ?v_734 ?v_748))) (let ((?v_774 (and ?v_733 ?v_757)) (?v_742 (= tmp66 600)) (?v_750 (and x237 ?v_740))) (let ((?v_758 (and ?v_734 ?v_750))) (let ((?v_775 (and ?v_733 ?v_758)) (?v_751 (and x237 ?v_741))) (let ((?v_759 (and ?v_734 ?v_751))) (let ((?v_776 (and ?v_733 ?v_759)) (?v_752 (and x237 ?v_743))) (let ((?v_760 (and ?v_734 ?v_752))) (let ((?v_777 (and ?v_733 ?v_760)) (?v_753 (and x237 ?v_744))) (let ((?v_761 (and ?v_734 ?v_753))) (let ((?v_778 (and ?v_733 ?v_761)) (?v_749 (= tmp66 900)) (?v_763 (and x238 ?v_745))) (let ((?v_779 (and ?v_733 ?v_763)) (?v_764 (and x238 ?v_746))) (let ((?v_780 (and ?v_733 ?v_764)) (?v_765 (and x238 ?v_747))) (let ((?v_781 (and ?v_733 ?v_765)) (?v_766 (and x238 ?v_748))) (let ((?v_782 (and ?v_733 ?v_766)) (?v_767 (and x238 ?v_750))) (let ((?v_783 (and ?v_733 ?v_767)) (?v_768 (and x238 ?v_751))) (let ((?v_784 (and ?v_733 ?v_768)) (?v_769 (and x238 ?v_752))) (let ((?v_785 (and ?v_733 ?v_769)) (?v_770 (and x238 ?v_753))) (let ((?v_786 (and ?v_733 ?v_770)) (?v_762 (= tmp66 1200)) (?v_788 (and x239 ?v_754)) (?v_789 (and x239 ?v_755)) (?v_790 (and x239 ?v_756)) (?v_791 (and x239 ?v_757)) (?v_792 (and x239 ?v_758)) (?v_793 (and x239 ?v_759)) (?v_794 (and x239 ?v_760)) (?v_795 (and x239 ?v_761)) (?v_796 (and x239 ?v_763)) (?v_797 (and x239 ?v_764)) (?v_798 (and x239 ?v_765)) (?v_799 (and x239 ?v_766)) (?v_800 (and x239 ?v_767)) (?v_801 (and x239 ?v_768)) (?v_802 (and x239 ?v_769)) (?v_803 (and x239 ?v_770)) (?v_787 (= tmp66 1500)) (?v_804 (not x177)) (?v_805 (not x178)) (?v_806 (not x179)) (?v_807 (not x180)) (?v_808 (not x181)) (?v_809 (and (not x182) true))) (let ((?v_812 (and ?v_808 ?v_809))) (let ((?v_817 (and ?v_807 ?v_812))) (let ((?v_826 (and ?v_806 ?v_817))) (let ((?v_843 (and ?v_805 ?v_826)) (?v_811 (and x182 true))) (let ((?v_813 (and ?v_808 ?v_811))) (let ((?v_818 (and ?v_807 ?v_813))) (let ((?v_827 (and ?v_806 ?v_818))) (let ((?v_844 (and ?v_805 ?v_827)) (?v_810 (= tmp65 100)) (?v_815 (and x181 ?v_809))) (let ((?v_819 (and ?v_807 ?v_815))) (let ((?v_828 (and ?v_806 ?v_819))) (let ((?v_845 (and ?v_805 ?v_828)) (?v_816 (and x181 ?v_811))) (let ((?v_820 (and ?v_807 ?v_816))) (let ((?v_829 (and ?v_806 ?v_820))) (let ((?v_846 (and ?v_805 ?v_829)) (?v_814 (= tmp65 200)) (?v_822 (and x180 ?v_812))) (let ((?v_830 (and ?v_806 ?v_822))) (let ((?v_847 (and ?v_805 ?v_830)) (?v_823 (and x180 ?v_813))) (let ((?v_831 (and ?v_806 ?v_823))) (let ((?v_848 (and ?v_805 ?v_831)) (?v_824 (and x180 ?v_815))) (let ((?v_832 (and ?v_806 ?v_824))) (let ((?v_849 (and ?v_805 ?v_832)) (?v_825 (and x180 ?v_816))) (let ((?v_833 (and ?v_806 ?v_825))) (let ((?v_850 (and ?v_805 ?v_833)) (?v_821 (= tmp65 300)) (?v_835 (and x179 ?v_817))) (let ((?v_851 (and ?v_805 ?v_835)) (?v_836 (and x179 ?v_818))) (let ((?v_852 (and ?v_805 ?v_836)) (?v_837 (and x179 ?v_819))) (let ((?v_853 (and ?v_805 ?v_837)) (?v_838 (and x179 ?v_820))) (let ((?v_854 (and ?v_805 ?v_838)) (?v_839 (and x179 ?v_822))) (let ((?v_855 (and ?v_805 ?v_839)) (?v_840 (and x179 ?v_823))) (let ((?v_856 (and ?v_805 ?v_840)) (?v_841 (and x179 ?v_824))) (let ((?v_857 (and ?v_805 ?v_841)) (?v_842 (and x179 ?v_825))) (let ((?v_858 (and ?v_805 ?v_842)) (?v_834 (= tmp65 400)) (?v_860 (and x178 ?v_826)) (?v_861 (and x178 ?v_827)) (?v_862 (and x178 ?v_828)) (?v_863 (and x178 ?v_829)) (?v_864 (and x178 ?v_830)) (?v_865 (and x178 ?v_831)) (?v_866 (and x178 ?v_832)) (?v_867 (and x178 ?v_833)) (?v_868 (and x178 ?v_835)) (?v_869 (and x178 ?v_836)) (?v_870 (and x178 ?v_837)) (?v_871 (and x178 ?v_838)) (?v_872 (and x178 ?v_839)) (?v_873 (and x178 ?v_840)) (?v_874 (and x178 ?v_841)) (?v_875 (and x178 ?v_842)) (?v_859 (= tmp65 500))) (and (<= (+ (+ (* 1 tmp75) 0) (+ (* 1 tmp73) (+ (* 1 tmp71) (+ (* 1 tmp69) (+ (* 1 tmp67) (+ (* 1 tmp65) (+ (* 2 x112) (+ (* 2 x111) (+ (* 2 x110) (+ (* 2 x109) (+ (* 2 x108) (+ (* 2 x107) (+ (* 2 x106) (+ (* 2 x105) (+ (* 2 x104) (+ (* 2 x103) (+ (* 2 x102) (+ (* 2 x101) (+ (* 2 x100) (+ (* 2 x99) (+ (* 2 x98) (+ (* 2 x97) (+ (* 2 x96) (+ (* 2 x95) (+ (* 2 x94) (+ (* 2 x93) (+ (* 2 x92) (+ (* 2 x91) (+ (* 2 x90) (+ (* 2 x89) (+ (* 2 x88) (+ (* 2 x87) (+ (* 2 x86) (+ (* 2 x85) (+ (* 2 x84) (+ (* 2 x83) (+ (* 2 x82) (+ (* 2 x81) (+ (* 2 x80) (+ (* 2 x79) (+ (* 2 x78) (+ (* 2 x77) (+ (* 2 x76) (+ (* 2 x75) (+ (* 2 x74) (+ (* 2 x73) (+ (* 2 x72) (+ (* 2 x71) (+ (* 2 x70) (+ (* 2 x69) (+ (* 2 x68) (+ (* 2 x67) (+ (* 2 x66) (+ (* 2 x65) (+ (* 2 x64) (+ (* 2 x63) (+ (* 2 x62) (+ (* 2 x61) (+ (* 2 x60) (+ (* 2 x59) (+ (* 2 x58) (+ (* 2 x57) (+ ?v_64 (+ ?v_65 (+ ?v_66 (+ ?v_67 (+ ?v_68 (+ ?v_69 (+ ?v_70 (+ ?v_71 (+ ?v_72 (+ ?v_73 (+ ?v_74 (+ ?v_75 (+ ?v_76 (+ ?v_77 (+ ?v_78 (+ ?v_79 (+ ?v_80 (+ ?v_81 (+ ?v_82 (+ ?v_83 (+ ?v_84 (+ ?v_85 (+ ?v_86 (+ ?v_87 (+ ?v_88 (+ ?v_89 (+ ?v_90 (+ ?v_91 (+ ?v_92 (+ ?v_93 (+ ?v_94 (+ ?v_95 (+ ?v_96 (+ ?v_97 (+ ?v_98 (+ ?v_99 (+ ?v_100 (+ ?v_101 (+ ?v_102 (+ ?v_103 (+ ?v_104 (+ ?v_105 (+ ?v_106 (+ ?v_107 (+ ?v_108 (+ ?v_109 (+ ?v_110 (+ ?v_111 (+ ?v_112 (+ ?v_113 (+ ?v_114 (+ ?v_115 (+ ?v_116 (+ ?v_117 (+ ?v_118 (+ ?v_119 (+ (* 1 tmp66) (+ (* 1 tmp68) (+ (* 1 tmp70) (+ (* 1 tmp72) (+ (* 1 tmp74) 0))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) 3000) (<= (+ (+ (* 1 tmp64) 0) (+ ?v_7 0)) 0) (<= (+ (+ (* 1 tmp63) 0) (+ ?v_15 0)) 0) (<= (+ (+ (* 1 tmp62) 0) (+ ?v_23 0)) 0) (<= (+ (+ (* 1 tmp61) 0) (+ ?v_31 0)) 0) (<= (+ (+ (* 1 tmp60) 0) (+ ?v_39 0)) 0) (<= (+ (+ (* 1 tmp59) 0) (+ ?v_47 0)) 0) (<= (+ (+ (* 1 tmp58) 0) (+ ?v_55 0)) 0) (<= (+ (+ (* 1 tmp57) 0) (+ ?v_63 0)) 0) (<= (+ (+ (* 1 tmp56) 0) (+ ?v_6 0)) 0) (<= (+ (+ (* 1 tmp55) 0) (+ ?v_14 0)) 0) (<= (+ (+ (* 1 tmp54) 0) (+ ?v_22 0)) 0) (<= (+ (+ (* 1 tmp53) 0) (+ ?v_30 0)) 0) (<= (+ (+ (* 1 tmp52) 0) (+ ?v_38 0)) 0) (<= (+ (+ (* 1 tmp51) 0) (+ ?v_46 0)) 0) (<= (+ (+ (* 1 tmp50) 0) (+ ?v_54 0)) 0) (<= (+ (+ (* 1 tmp49) 0) (+ ?v_62 0)) 0) (<= (+ (+ (* 1 tmp48) 0) (+ ?v_5 0)) 0) (<= (+ (+ (* 1 tmp47) 0) (+ ?v_13 0)) 0) (<= (+ (+ (* 1 tmp46) 0) (+ ?v_21 0)) 0) (<= (+ (+ (* 1 tmp45) 0) (+ ?v_29 0)) 0) (<= (+ (+ (* 1 tmp44) 0) (+ ?v_37 0)) 0) (<= (+ (+ (* 1 tmp43) 0) (+ ?v_45 0)) 0) (<= (+ (+ (* 1 tmp42) 0) (+ ?v_53 0)) 0) (<= (+ (+ (* 1 tmp41) 0) (+ ?v_61 0)) 0) (<= (+ (+ (* 1 tmp40) 0) (+ ?v_4 0)) 0) (<= (+ (+ (* 1 tmp39) 0) (+ ?v_12 0)) 0) (<= (+ (+ (* 1 tmp38) 0) (+ ?v_20 0)) 0) (<= (+ (+ (* 1 tmp37) 0) (+ ?v_28 0)) 0) (<= (+ (+ (* 1 tmp36) 0) (+ ?v_36 0)) 0) (<= (+ (+ (* 1 tmp35) 0) (+ ?v_44 0)) 0) (<= (+ (+ (* 1 tmp34) 0) (+ ?v_52 0)) 0) (<= (+ (+ (* 1 tmp33) 0) (+ ?v_60 0)) 0) (<= (+ (+ (* 1 tmp32) 0) (+ ?v_3 0)) 0) (<= (+ (+ (* 1 tmp31) 0) (+ ?v_11 0)) 0) (<= (+ (+ (* 1 tmp30) 0) (+ ?v_19 0)) 0) (<= (+ (+ (* 1 tmp29) 0) (+ ?v_27 0)) 0) (<= (+ (+ (* 1 tmp28) 0) (+ ?v_35 0)) 0) (<= (+ (+ (* 1 tmp27) 0) (+ ?v_43 0)) 0) (<= (+ (+ (* 1 tmp26) 0) (+ ?v_51 0)) 0) (<= (+ (+ (* 1 tmp25) 0) (+ ?v_59 0)) 0) (<= (+ (+ (* 1 tmp24) 0) (+ ?v_2 0)) 0) (<= (+ (+ (* 1 tmp23) 0) (+ ?v_10 0)) 0) (<= (+ (+ (* 1 tmp22) 0) (+ ?v_18 0)) 0) (<= (+ (+ (* 1 tmp21) 0) (+ ?v_26 0)) 0) (<= (+ (+ (* 1 tmp20) 0) (+ ?v_34 0)) 0) (<= (+ (+ (* 1 tmp19) 0) (+ ?v_42 0)) 0) (<= (+ (+ (* 1 tmp18) 0) (+ ?v_50 0)) 0) (<= (+ (+ (* 1 tmp17) 0) (+ ?v_58 0)) 0) (<= (+ (+ (* 1 tmp16) 0) (+ ?v_1 0)) 0) (<= (+ (+ (* 1 tmp15) 0) (+ ?v_9 0)) 0) (<= (+ (+ (* 1 tmp14) 0) (+ ?v_17 0)) 0) (<= (+ (+ (* 1 tmp13) 0) (+ ?v_25 0)) 0) (<= (+ (+ (* 1 tmp12) 0) (+ ?v_33 0)) 0) (<= (+ (+ (* 1 tmp11) 0) (+ ?v_41 0)) 0) (<= (+ (+ (* 1 tmp10) 0) (+ ?v_49 0)) 0) (<= (+ (+ (* 1 tmp9) 0) (+ ?v_57 0)) 0) (<= (+ (+ (* 1 tmp8) 0) (+ ?v_0 0)) 0) (<= (+ (+ (* 1 tmp7) 0) (+ ?v_8 0)) 0) (<= (+ (+ (* 1 tmp6) 0) (+ ?v_16 0)) 0) (<= (+ (+ (* 1 tmp5) 0) (+ ?v_24 0)) 0) (<= (+ (+ (* 1 tmp4) 0) (+ ?v_32 0)) 0) (<= (+ (+ (* 1 tmp3) 0) (+ ?v_40 0)) 0) (<= (+ (+ (* 1 tmp2) 0) (+ ?v_48 0)) 0) (<= (+ (+ (* 1 tmp1) 0) (+ ?v_56 0)) 0) (<= (+ (+ (+ (+ (+ (+ (+ (+ 0 ?v_0) ?v_1) ?v_2) ?v_3) ?v_4) ?v_5) ?v_6) ?v_7) 500) (<= (+ (+ (+ (+ (+ (+ (+ (+ 0 ?v_8) ?v_9) ?v_10) ?v_11) ?v_12) ?v_13) ?v_14) ?v_15) 400) (<= (+ (+ (+ (+ (+ (+ (+ (+ 0 ?v_16) ?v_17) ?v_18) ?v_19) ?v_20) ?v_21) ?v_22) ?v_23) 400) (<= (+ (+ (+ (+ (+ (+ (+ (+ 0 ?v_24) ?v_25) ?v_26) ?v_27) ?v_28) ?v_29) ?v_30) ?v_31) 400) (<= (+ (+ (+ (+ (+ (+ (+ (+ 0 ?v_32) ?v_33) ?v_34) ?v_35) ?v_36) ?v_37) ?v_38) ?v_39) 400) (<= (+ (+ (+ (+ (+ (+ (+ (+ 0 ?v_40) ?v_41) ?v_42) ?v_43) ?v_44) ?v_45) ?v_46) ?v_47) 350) (<= (+ (+ (+ (+ (+ (+ (+ (+ 0 ?v_48) ?v_49) ?v_50) ?v_51) ?v_52) ?v_53) ?v_54) ?v_55) 350) (<= (+ (+ (+ (+ (+ (+ (+ (+ 0 ?v_56) ?v_57) ?v_58) ?v_59) ?v_60) ?v_61) ?v_62) ?v_63) 350) (= (+ (+ (+ 0 ?v_64) (* (- 1) x112)) ?v_7) 30) (= (+ (+ (+ (+ (+ 0 ?v_65) (* (- 1) x56)) (* (- 1) x111)) (* 1 x112)) ?v_15) 20) (= (+ (+ (+ (+ (+ 0 ?v_66) (* (- 1) x55)) (* (- 1) x110)) (* 1 x111)) ?v_23) 10) (= (+ (+ (+ (+ (+ 0 ?v_67) (* (- 1) x54)) (* (- 1) x109)) (* 1 x110)) ?v_31) 10) (= (+ (+ (+ (+ (+ 0 ?v_68) (* (- 1) x53)) (* (- 1) x108)) (* 1 x109)) ?v_39) 0) (= (+ (+ (+ (+ (+ 0 ?v_69) (* (- 1) x52)) (* (- 1) x107)) (* 1 x108)) ?v_47) 0) (= (+ (+ (+ (+ (+ 0 ?v_70) (* (- 1) x51)) (* (- 1) x106)) (* 1 x107)) ?v_55) 20) (= (+ (+ (+ 0 (* (- 1) x50)) (* 1 x106)) ?v_63) 10) (= (+ (+ (+ 0 ?v_71) (* (- 1) x105)) ?v_6) 40) (= (+ (+ (+ (+ (+ 0 ?v_72) (* (- 1) x49)) (* (- 1) x104)) (* 1 x105)) ?v_14) 40) (= (+ (+ (+ (+ (+ 0 ?v_73) (* (- 1) x48)) (* (- 1) x103)) (* 1 x104)) ?v_22) 60) (= (+ (+ (+ (+ (+ 0 ?v_74) (* (- 1) x47)) (* (- 1) x102)) (* 1 x103)) ?v_30) 20) (= (+ (+ (+ (+ (+ 0 ?v_75) (* (- 1) x46)) (* (- 1) x101)) (* 1 x102)) ?v_38) 10) (= (+ (+ (+ (+ (+ 0 ?v_76) (* (- 1) x45)) (* (- 1) x100)) (* 1 x101)) ?v_46) 50) (= (+ (+ (+ (+ (+ 0 ?v_77) (* (- 1) x44)) (* (- 1) x99)) (* 1 x100)) ?v_54) 20) (= (+ (+ (+ 0 (* (- 1) x43)) (* 1 x99)) ?v_62) 0) (= (+ (+ (+ 0 ?v_78) (* (- 1) x98)) ?v_5) 50) (= (+ (+ (+ (+ (+ 0 ?v_79) (* (- 1) x42)) (* (- 1) x97)) (* 1 x98)) ?v_13) 40) (= (+ (+ (+ (+ (+ 0 ?v_80) (* (- 1) x41)) (* (- 1) x96)) (* 1 x97)) ?v_21) 20) (= (+ (+ (+ (+ (+ 0 ?v_81) (* (- 1) x40)) (* (- 1) x95)) (* 1 x96)) ?v_29) 100) (= (+ (+ (+ (+ (+ 0 ?v_82) (* (- 1) x39)) (* (- 1) x94)) (* 1 x95)) ?v_37) 40) (= (+ (+ (+ (+ (+ 0 ?v_83) (* (- 1) x38)) (* (- 1) x93)) (* 1 x94)) ?v_45) 40) (= (+ (+ (+ (+ (+ 0 ?v_84) (* (- 1) x37)) (* (- 1) x92)) (* 1 x93)) ?v_53) 40) (= (+ (+ (+ 0 (* (- 1) x36)) (* 1 x92)) ?v_61) 70) (= (+ (+ (+ 0 ?v_85) (* (- 1) x91)) ?v_4) 10) (= (+ (+ (+ (+ (+ 0 ?v_86) (* (- 1) x35)) (* (- 1) x90)) (* 1 x91)) ?v_12) 20) (= (+ (+ (+ (+ (+ 0 ?v_87) (* (- 1) x34)) (* (- 1) x89)) (* 1 x90)) ?v_20) 10) (= (+ (+ (+ (+ (+ 0 ?v_88) (* (- 1) x33)) (* (- 1) x88)) (* 1 x89)) ?v_28) 10) (= (+ (+ (+ (+ (+ 0 ?v_89) (* (- 1) x32)) (* (- 1) x87)) (* 1 x88)) ?v_36) 40) (= (+ (+ (+ (+ (+ 0 ?v_90) (* (- 1) x31)) (* (- 1) x86)) (* 1 x87)) ?v_44) 20) (= (+ (+ (+ (+ (+ 0 ?v_91) (* (- 1) x30)) (* (- 1) x85)) (* 1 x86)) ?v_52) 0) (= (+ (+ (+ 0 (* (- 1) x29)) (* 1 x85)) ?v_60) 50) (= (+ (+ (+ 0 ?v_92) (* (- 1) x84)) ?v_3) 100) (= (+ (+ (+ (+ (+ 0 ?v_93) (* (- 1) x28)) (* (- 1) x83)) (* 1 x84)) ?v_11) 100) (= (+ (+ (+ (+ (+ 0 ?v_94) (* (- 1) x27)) (* (- 1) x82)) (* 1 x83)) ?v_19) 90) (= (+ (+ (+ (+ (+ 0 ?v_95) (* (- 1) x26)) (* (- 1) x81)) (* 1 x82)) ?v_27) 160) (= (+ (+ (+ (+ (+ 0 ?v_96) (* (- 1) x25)) (* (- 1) x80)) (* 1 x81)) ?v_35) 150) (= (+ (+ (+ (+ (+ 0 ?v_97) (* (- 1) x24)) (* (- 1) x79)) (* 1 x80)) ?v_43) 100) (= (+ (+ (+ (+ (+ 0 ?v_98) (* (- 1) x23)) (* (- 1) x78)) (* 1 x79)) ?v_51) 100) (= (+ (+ (+ 0 (* (- 1) x22)) (* 1 x78)) ?v_59) 0) (= (+ (+ (+ 0 ?v_99) (* (- 1) x77)) ?v_2) 160) (= (+ (+ (+ (+ (+ 0 ?v_100) (* (- 1) x21)) (* (- 1) x76)) (* 1 x77)) ?v_10) 90) (= (+ (+ (+ (+ (+ 0 ?v_101) (* (- 1) x20)) (* (- 1) x75)) (* 1 x76)) ?v_18) 80) (= (+ (+ (+ (+ (+ 0 ?v_102) (* (- 1) x19)) (* (- 1) x74)) (* 1 x75)) ?v_26) 40) (= (+ (+ (+ (+ (+ 0 ?v_103) (* (- 1) x18)) (* (- 1) x73)) (* 1 x74)) ?v_34) 100) (= (+ (+ (+ (+ (+ 0 ?v_104) (* (- 1) x17)) (* (- 1) x72)) (* 1 x73)) ?v_42) 0) (= (+ (+ (+ (+ (+ 0 ?v_105) (* (- 1) x16)) (* (- 1) x71)) (* 1 x72)) ?v_50) 50) (= (+ (+ (+ 0 (* (- 1) x15)) (* 1 x71)) ?v_58) 40) (= (+ (+ (+ 0 ?v_106) (* (- 1) x70)) ?v_1) 50) (= (+ (+ (+ (+ (+ 0 ?v_107) (* (- 1) x14)) (* (- 1) x69)) (* 1 x70)) ?v_9) 40) (= (+ (+ (+ (+ (+ 0 ?v_108) (* (- 1) x13)) (* (- 1) x68)) (* 1 x69)) ?v_17) 0) (= (+ (+ (+ (+ (+ 0 ?v_109) (* (- 1) x12)) (* (- 1) x67)) (* 1 x68)) ?v_25) 30) (= (+ (+ (+ (+ (+ 0 ?v_110) (* (- 1) x11)) (* (- 1) x66)) (* 1 x67)) ?v_33) 10) (= (+ (+ (+ (+ (+ 0 ?v_111) (* (- 1) x10)) (* (- 1) x65)) (* 1 x66)) ?v_41) 50) (= (+ (+ (+ (+ (+ 0 ?v_112) (* (- 1) x9)) (* (- 1) x64)) (* 1 x65)) ?v_49) 40) (= (+ (+ (+ 0 (* (- 1) x8)) (* 1 x64)) ?v_57) 20) (= (+ (+ (+ 0 ?v_113) (* (- 1) x63)) ?v_0) 100) (= (+ (+ (+ (+ (+ 0 ?v_114) (* (- 1) x7)) (* (- 1) x62)) (* 1 x63)) ?v_8) 0) (= (+ (+ (+ (+ (+ 0 ?v_115) (* (- 1) x6)) (* (- 1) x61)) (* 1 x62)) ?v_16) 80) (= (+ (+ (+ (+ (+ 0 ?v_116) (* (- 1) x5)) (* (- 1) x60)) (* 1 x61)) ?v_24) 20) (= (+ (+ (+ (+ (+ 0 ?v_117) (* (- 1) x4)) (* (- 1) x59)) (* 1 x60)) ?v_32) 100) (= (+ (+ (+ (+ (+ 0 ?v_118) (* (- 1) x3)) (* (- 1) x58)) (* 1 x59)) ?v_40) 50) (= (+ (+ (+ (+ (+ 0 ?v_119) (* (- 1) x2)) (* (- 1) x57)) (* 1 x58)) ?v_48) 70) (= (+ (+ (+ 0 (* (- 1) x1)) (* 1 x57)) ?v_56) 0) (>= x1 0) (>= x2 0) (>= x3 0) (>= x4 0) (>= x5 0) (>= x6 0) (>= x7 0) (>= x8 0) (>= x9 0) (>= x10 0) (>= x11 0) (>= x12 0) (>= x13 0) (>= x14 0) (>= x15 0) (>= x16 0) (>= x17 0) (>= x18 0) (>= x19 0) (>= x20 0) (>= x21 0) (>= x22 0) (>= x23 0) (>= x24 0) (>= x25 0) (>= x26 0) (>= x27 0) (>= x28 0) (>= x29 0) (>= x30 0) (>= x31 0) (>= x32 0) (>= x33 0) (>= x34 0) (>= x35 0) (>= x36 0) (>= x37 0) (>= x38 0) (>= x39 0) (>= x40 0) (>= x41 0) (>= x42 0) (>= x43 0) (>= x44 0) (>= x45 0) (>= x46 0) (>= x47 0) (>= x48 0) (>= x49 0) (>= x50 0) (>= x51 0) (>= x52 0) (>= x53 0) (>= x54 0) (>= x55 0) (>= x56 0) (>= x57 0) (>= x58 0) (>= x59 0) (>= x60 0) (>= x61 0) (>= x62 0) (>= x63 0) (>= x64 0) (>= x65 0) (>= x66 0) (>= x67 0) (>= x68 0) (>= x69 0) (>= x70 0) (>= x71 0) (>= x72 0) (>= x73 0) (>= x74 0) (>= x75 0) (>= x76 0) (>= x77 0) (>= x78 0) (>= x79 0) (>= x80 0) (>= x81 0) (>= x82 0) (>= x83 0) (>= x84 0) (>= x85 0) (>= x86 0) (>= x87 0) (>= x88 0) (>= x89 0) (>= x90 0) (>= x91 0) (>= x92 0) (>= x93 0) (>= x94 0) (>= x95 0) (>= x96 0) (>= x97 0) (>= x98 0) (>= x99 0) (>= x100 0) (>= x101 0) (>= x102 0) (>= x103 0) (>= x104 0) (>= x105 0) (>= x106 0) (>= x107 0) (>= x108 0) (>= x109 0) (>= x110 0) (>= x111 0) (>= x112 0) (>= x176 0) (>= x175 0) (>= x174 0) (>= x173 0) (>= x172 0) (>= x171 0) (>= x170 0) (>= x169 0) (>= x168 0) (>= x167 0) (>= x166 0) (>= x165 0) (>= x164 0) (>= x163 0) (>= x162 0) (>= x161 0) (>= x160 0) (>= x159 0) (>= x158 0) (>= x157 0) (>= x156 0) (>= x155 0) (>= x154 0) (>= x153 0) (>= x152 0) (>= x151 0) (>= x150 0) (>= x149 0) (>= x148 0) (>= x147 0) (>= x146 0) (>= x145 0) (>= x144 0) (>= x143 0) (>= x142 0) (>= x141 0) (>= x140 0) (>= x139 0) (>= x138 0) (>= x137 0) (>= x136 0) (>= x135 0) (>= x134 0) (>= x133 0) (>= x132 0) (>= x131 0) (>= x130 0) (>= x129 0) (>= x128 0) (>= x127 0) (>= x126 0) (>= x125 0) (>= x124 0) (>= x123 0) (>= x122 0) (>= x121 0) (>= x120 0) (>= x119 0) (>= x118 0) (>= x117 0) (>= x116 0) (>= x115 0) (>= x114 0) (>= x113 0) (=> (and ?v_120 ?v_131) (= tmp75 0)) (=> (and ?v_120 ?v_133) ?v_124) (=> (and ?v_120 ?v_134) ?v_124) (=> (and ?v_120 ?v_135) (= tmp75 800)) (=> (and ?v_120 ?v_137) ?v_132) (=> (and ?v_120 ?v_138) ?v_129) (=> (and ?v_120 ?v_139) ?v_129) (=> (and ?v_120 ?v_141) ?v_136) (=> (and x207 ?v_131) ?v_132) (=> (and x207 ?v_133) ?v_129) (=> (and x207 ?v_134) ?v_129) (=> (and x207 ?v_135) ?v_136) (=> (and x207 ?v_137) (= tmp75 600)) (=> (and x207 ?v_138) ?v_140) (=> (and x207 ?v_139) ?v_140) (=> (and x207 ?v_141) (= tmp75 1400)) (=> (and ?v_142 ?v_181) (= tmp74 0)) (=> (and ?v_142 ?v_182) ?v_148) (=> (and ?v_142 ?v_183) ?v_148) (=> (and ?v_142 ?v_184) ?v_152) (=> (and ?v_142 ?v_185) ?v_148) (=> (and ?v_142 ?v_186) ?v_152) (=> (and ?v_142 ?v_187) ?v_152) (=> (and ?v_142 ?v_188) ?v_159) (=> (and ?v_142 ?v_189) ?v_148) (=> (and ?v_142 ?v_190) ?v_152) (=> (and ?v_142 ?v_191) ?v_152) (=> (and ?v_142 ?v_192) ?v_159) (=> (and ?v_142 ?v_193) ?v_152) (=> (and ?v_142 ?v_194) ?v_159) (=> (and ?v_142 ?v_195) ?v_159) (=> (and ?v_142 ?v_196) ?v_172) (=> (and ?v_142 ?v_198) ?v_148) (=> (and ?v_142 ?v_199) ?v_152) (=> (and ?v_142 ?v_200) ?v_152) (=> (and ?v_142 ?v_201) ?v_159) (=> (and ?v_142 ?v_202) ?v_152) (=> (and ?v_142 ?v_203) ?v_159) (=> (and ?v_142 ?v_204) ?v_159) (=> (and ?v_142 ?v_205) ?v_172) (=> (and ?v_142 ?v_206) ?v_152) (=> (and ?v_142 ?v_207) ?v_159) (=> (and ?v_142 ?v_208) ?v_159) (=> (and ?v_142 ?v_209) ?v_172) (=> (and ?v_142 ?v_210) ?v_159) (=> (and ?v_142 ?v_211) ?v_172) (=> (and ?v_142 ?v_212) ?v_172) (=> (and ?v_142 ?v_213) ?v_197) (=> (and x216 ?v_181) ?v_148) (=> (and x216 ?v_182) ?v_152) (=> (and x216 ?v_183) ?v_152) (=> (and x216 ?v_184) ?v_159) (=> (and x216 ?v_185) ?v_152) (=> (and x216 ?v_186) ?v_159) (=> (and x216 ?v_187) ?v_159) (=> (and x216 ?v_188) ?v_172) (=> (and x216 ?v_189) ?v_152) (=> (and x216 ?v_190) ?v_159) (=> (and x216 ?v_191) ?v_159) (=> (and x216 ?v_192) ?v_172) (=> (and x216 ?v_193) ?v_159) (=> (and x216 ?v_194) ?v_172) (=> (and x216 ?v_195) ?v_172) (=> (and x216 ?v_196) ?v_197) (=> (and x216 ?v_198) ?v_152) (=> (and x216 ?v_199) ?v_159) (=> (and x216 ?v_200) ?v_159) (=> (and x216 ?v_201) ?v_172) (=> (and x216 ?v_202) ?v_159) (=> (and x216 ?v_203) ?v_172) (=> (and x216 ?v_204) ?v_172) (=> (and x216 ?v_205) ?v_197) (=> (and x216 ?v_206) ?v_159) (=> (and x216 ?v_207) ?v_172) (=> (and x216 ?v_208) ?v_172) (=> (and x216 ?v_209) ?v_197) (=> (and x216 ?v_210) ?v_172) (=> (and x216 ?v_211) ?v_197) (=> (and x216 ?v_212) ?v_197) (=> (and x216 ?v_213) (= tmp74 2400)) (=> (and ?v_214 ?v_253) (= tmp73 0)) (=> (and ?v_214 ?v_254) ?v_220) (=> (and ?v_214 ?v_255) ?v_220) (=> (and ?v_214 ?v_256) ?v_224) (=> (and ?v_214 ?v_257) ?v_220) (=> (and ?v_214 ?v_258) ?v_224) (=> (and ?v_214 ?v_259) ?v_224) (=> (and ?v_214 ?v_260) ?v_231) (=> (and ?v_214 ?v_261) ?v_220) (=> (and ?v_214 ?v_262) ?v_224) (=> (and ?v_214 ?v_263) ?v_224) (=> (and ?v_214 ?v_264) ?v_231) (=> (and ?v_214 ?v_265) ?v_224) (=> (and ?v_214 ?v_266) ?v_231) (=> (and ?v_214 ?v_267) ?v_231) (=> (and ?v_214 ?v_268) ?v_244) (=> (and ?v_214 ?v_270) ?v_220) (=> (and ?v_214 ?v_271) ?v_224) (=> (and ?v_214 ?v_272) ?v_224) (=> (and ?v_214 ?v_273) ?v_231) (=> (and ?v_214 ?v_274) ?v_224) (=> (and ?v_214 ?v_275) ?v_231) (=> (and ?v_214 ?v_276) ?v_231) (=> (and ?v_214 ?v_277) ?v_244) (=> (and ?v_214 ?v_278) ?v_224) (=> (and ?v_214 ?v_279) ?v_231) (=> (and ?v_214 ?v_280) ?v_231) (=> (and ?v_214 ?v_281) ?v_244) (=> (and ?v_214 ?v_282) ?v_231) (=> (and ?v_214 ?v_283) ?v_244) (=> (and ?v_214 ?v_284) ?v_244) (=> (and ?v_214 ?v_285) ?v_269) (=> (and x201 ?v_253) ?v_220) (=> (and x201 ?v_254) ?v_224) (=> (and x201 ?v_255) ?v_224) (=> (and x201 ?v_256) ?v_231) (=> (and x201 ?v_257) ?v_224) (=> (and x201 ?v_258) ?v_231) (=> (and x201 ?v_259) ?v_231) (=> (and x201 ?v_260) ?v_244) (=> (and x201 ?v_261) ?v_224) (=> (and x201 ?v_262) ?v_231) (=> (and x201 ?v_263) ?v_231) (=> (and x201 ?v_264) ?v_244) (=> (and x201 ?v_265) ?v_231) (=> (and x201 ?v_266) ?v_244) (=> (and x201 ?v_267) ?v_244) (=> (and x201 ?v_268) ?v_269) (=> (and x201 ?v_270) ?v_224) (=> (and x201 ?v_271) ?v_231) (=> (and x201 ?v_272) ?v_231) (=> (and x201 ?v_273) ?v_244) (=> (and x201 ?v_274) ?v_231) (=> (and x201 ?v_275) ?v_244) (=> (and x201 ?v_276) ?v_244) (=> (and x201 ?v_277) ?v_269) (=> (and x201 ?v_278) ?v_231) (=> (and x201 ?v_279) ?v_244) (=> (and x201 ?v_280) ?v_244) (=> (and x201 ?v_281) ?v_269) (=> (and x201 ?v_282) ?v_244) (=> (and x201 ?v_283) ?v_269) (=> (and x201 ?v_284) ?v_269) (=> (and x201 ?v_285) (= tmp73 1800)) (=> (and ?v_286 ?v_325) (= tmp72 0)) (=> (and ?v_286 ?v_326) ?v_292) (=> (and ?v_286 ?v_327) ?v_292) (=> (and ?v_286 ?v_328) ?v_296) (=> (and ?v_286 ?v_329) ?v_292) (=> (and ?v_286 ?v_330) ?v_296) (=> (and ?v_286 ?v_331) ?v_296) (=> (and ?v_286 ?v_332) ?v_303) (=> (and ?v_286 ?v_333) ?v_292) (=> (and ?v_286 ?v_334) ?v_296) (=> (and ?v_286 ?v_335) ?v_296) (=> (and ?v_286 ?v_336) ?v_303) (=> (and ?v_286 ?v_337) ?v_296) (=> (and ?v_286 ?v_338) ?v_303) (=> (and ?v_286 ?v_339) ?v_303) (=> (and ?v_286 ?v_340) ?v_316) (=> (and ?v_286 ?v_342) ?v_292) (=> (and ?v_286 ?v_343) ?v_296) (=> (and ?v_286 ?v_344) ?v_296) (=> (and ?v_286 ?v_345) ?v_303) (=> (and ?v_286 ?v_346) ?v_296) (=> (and ?v_286 ?v_347) ?v_303) (=> (and ?v_286 ?v_348) ?v_303) (=> (and ?v_286 ?v_349) ?v_316) (=> (and ?v_286 ?v_350) ?v_296) (=> (and ?v_286 ?v_351) ?v_303) (=> (and ?v_286 ?v_352) ?v_303) (=> (and ?v_286 ?v_353) ?v_316) (=> (and ?v_286 ?v_354) ?v_303) (=> (and ?v_286 ?v_355) ?v_316) (=> (and ?v_286 ?v_356) ?v_316) (=> (and ?v_286 ?v_357) ?v_341) (=> (and x222 ?v_325) ?v_292) (=> (and x222 ?v_326) ?v_296) (=> (and x222 ?v_327) ?v_296) (=> (and x222 ?v_328) ?v_303) (=> (and x222 ?v_329) ?v_296) (=> (and x222 ?v_330) ?v_303) (=> (and x222 ?v_331) ?v_303) (=> (and x222 ?v_332) ?v_316) (=> (and x222 ?v_333) ?v_296) (=> (and x222 ?v_334) ?v_303) (=> (and x222 ?v_335) ?v_303) (=> (and x222 ?v_336) ?v_316) (=> (and x222 ?v_337) ?v_303) (=> (and x222 ?v_338) ?v_316) (=> (and x222 ?v_339) ?v_316) (=> (and x222 ?v_340) ?v_341) (=> (and x222 ?v_342) ?v_296) (=> (and x222 ?v_343) ?v_303) (=> (and x222 ?v_344) ?v_303) (=> (and x222 ?v_345) ?v_316) (=> (and x222 ?v_346) ?v_303) (=> (and x222 ?v_347) ?v_316) (=> (and x222 ?v_348) ?v_316) (=> (and x222 ?v_349) ?v_341) (=> (and x222 ?v_350) ?v_303) (=> (and x222 ?v_351) ?v_316) (=> (and x222 ?v_352) ?v_316) (=> (and x222 ?v_353) ?v_341) (=> (and x222 ?v_354) ?v_316) (=> (and x222 ?v_355) ?v_341) (=> (and x222 ?v_356) ?v_341) (=> (and x222 ?v_357) (= tmp72 1500)) (=> (and ?v_358 ?v_397) (= tmp71 0)) (=> (and ?v_358 ?v_398) ?v_364) (=> (and ?v_358 ?v_399) ?v_364) (=> (and ?v_358 ?v_400) ?v_368) (=> (and ?v_358 ?v_401) ?v_364) (=> (and ?v_358 ?v_402) ?v_368) (=> (and ?v_358 ?v_403) ?v_368) (=> (and ?v_358 ?v_404) ?v_375) (=> (and ?v_358 ?v_405) ?v_364) (=> (and ?v_358 ?v_406) ?v_368) (=> (and ?v_358 ?v_407) ?v_368) (=> (and ?v_358 ?v_408) ?v_375) (=> (and ?v_358 ?v_409) ?v_368) (=> (and ?v_358 ?v_410) ?v_375) (=> (and ?v_358 ?v_411) ?v_375) (=> (and ?v_358 ?v_412) ?v_388) (=> (and ?v_358 ?v_414) ?v_364) (=> (and ?v_358 ?v_415) ?v_368) (=> (and ?v_358 ?v_416) ?v_368) (=> (and ?v_358 ?v_417) ?v_375) (=> (and ?v_358 ?v_418) ?v_368) (=> (and ?v_358 ?v_419) ?v_375) (=> (and ?v_358 ?v_420) ?v_375) (=> (and ?v_358 ?v_421) ?v_388) (=> (and ?v_358 ?v_422) ?v_368) (=> (and ?v_358 ?v_423) ?v_375) (=> (and ?v_358 ?v_424) ?v_375) (=> (and ?v_358 ?v_425) ?v_388) (=> (and ?v_358 ?v_426) ?v_375) (=> (and ?v_358 ?v_427) ?v_388) (=> (and ?v_358 ?v_428) ?v_388) (=> (and ?v_358 ?v_429) ?v_413) (=> (and x195 ?v_397) ?v_364) (=> (and x195 ?v_398) ?v_368) (=> (and x195 ?v_399) ?v_368) (=> (and x195 ?v_400) ?v_375) (=> (and x195 ?v_401) ?v_368) (=> (and x195 ?v_402) ?v_375) (=> (and x195 ?v_403) ?v_375) (=> (and x195 ?v_404) ?v_388) (=> (and x195 ?v_405) ?v_368) (=> (and x195 ?v_406) ?v_375) (=> (and x195 ?v_407) ?v_375) (=> (and x195 ?v_408) ?v_388) (=> (and x195 ?v_409) ?v_375) (=> (and x195 ?v_410) ?v_388) (=> (and x195 ?v_411) ?v_388) (=> (and x195 ?v_412) ?v_413) (=> (and x195 ?v_414) ?v_368) (=> (and x195 ?v_415) ?v_375) (=> (and x195 ?v_416) ?v_375) (=> (and x195 ?v_417) ?v_388) (=> (and x195 ?v_418) ?v_375) (=> (and x195 ?v_419) ?v_388) (=> (and x195 ?v_420) ?v_388) (=> (and x195 ?v_421) ?v_413) (=> (and x195 ?v_422) ?v_375) (=> (and x195 ?v_423) ?v_388) (=> (and x195 ?v_424) ?v_388) (=> (and x195 ?v_425) ?v_413) (=> (and x195 ?v_426) ?v_388) (=> (and x195 ?v_427) ?v_413) (=> (and x195 ?v_428) ?v_413) (=> (and x195 ?v_429) (= tmp71 1200)) (=> (and ?v_430 ?v_472) (= tmp70 0)) (=> (and ?v_430 ?v_473) ?v_436) (=> (and ?v_430 ?v_474) ?v_436) (=> (and ?v_430 ?v_475) ?v_439) (=> (and ?v_430 ?v_476) ?v_439) (=> (and ?v_430 ?v_477) ?v_442) (=> (and ?v_430 ?v_478) ?v_442) (=> (and ?v_430 ?v_479) ?v_448) (=> (and ?v_430 ?v_480) ?v_439) (=> (and ?v_430 ?v_481) ?v_442) (=> (and ?v_430 ?v_482) ?v_442) (=> (and ?v_430 ?v_483) ?v_448) (=> (and ?v_430 ?v_484) ?v_448) (=> (and ?v_430 ?v_485) ?v_452) (=> (and ?v_430 ?v_486) ?v_452) (=> (and ?v_430 ?v_487) ?v_462) (=> (and ?v_430 ?v_489) ?v_439) (=> (and ?v_430 ?v_490) ?v_442) (=> (and ?v_430 ?v_491) ?v_442) (=> (and ?v_430 ?v_492) ?v_448) (=> (and ?v_430 ?v_493) ?v_448) (=> (and ?v_430 ?v_494) ?v_452) (=> (and ?v_430 ?v_495) ?v_452) (=> (and ?v_430 ?v_496) ?v_462) (=> (and ?v_430 ?v_497) ?v_448) (=> (and ?v_430 ?v_498) ?v_452) (=> (and ?v_430 ?v_499) ?v_452) (=> (and ?v_430 ?v_500) ?v_462) (=> (and ?v_430 ?v_501) ?v_462) (=> (and ?v_430 ?v_502) ?v_470) (=> (and ?v_430 ?v_503) ?v_470) (=> (and ?v_430 ?v_505) ?v_488) (=> (and x228 ?v_472) ?v_439) (=> (and x228 ?v_473) ?v_442) (=> (and x228 ?v_474) ?v_442) (=> (and x228 ?v_475) ?v_448) (=> (and x228 ?v_476) ?v_448) (=> (and x228 ?v_477) ?v_452) (=> (and x228 ?v_478) ?v_452) (=> (and x228 ?v_479) ?v_462) (=> (and x228 ?v_480) ?v_448) (=> (and x228 ?v_481) ?v_452) (=> (and x228 ?v_482) ?v_452) (=> (and x228 ?v_483) ?v_462) (=> (and x228 ?v_484) ?v_462) (=> (and x228 ?v_485) ?v_470) (=> (and x228 ?v_486) ?v_470) (=> (and x228 ?v_487) ?v_488) (=> (and x228 ?v_489) ?v_448) (=> (and x228 ?v_490) ?v_452) (=> (and x228 ?v_491) ?v_452) (=> (and x228 ?v_492) ?v_462) (=> (and x228 ?v_493) ?v_462) (=> (and x228 ?v_494) ?v_470) (=> (and x228 ?v_495) ?v_470) (=> (and x228 ?v_496) ?v_488) (=> (and x228 ?v_497) ?v_462) (=> (and x228 ?v_498) ?v_470) (=> (and x228 ?v_499) ?v_470) (=> (and x228 ?v_500) ?v_488) (=> (and x228 ?v_501) ?v_488) (=> (and x228 ?v_502) ?v_504) (=> (and x228 ?v_503) ?v_504) (=> (and x228 ?v_505) (= tmp70 2500)) (=> (and ?v_506 ?v_545) (= tmp69 0)) (=> (and ?v_506 ?v_546) ?v_512) (=> (and ?v_506 ?v_547) ?v_512) (=> (and ?v_506 ?v_548) ?v_516) (=> (and ?v_506 ?v_549) ?v_512) (=> (and ?v_506 ?v_550) ?v_516) (=> (and ?v_506 ?v_551) ?v_516) (=> (and ?v_506 ?v_552) ?v_523) (=> (and ?v_506 ?v_553) ?v_512) (=> (and ?v_506 ?v_554) ?v_516) (=> (and ?v_506 ?v_555) ?v_516) (=> (and ?v_506 ?v_556) ?v_523) (=> (and ?v_506 ?v_557) ?v_516) (=> (and ?v_506 ?v_558) ?v_523) (=> (and ?v_506 ?v_559) ?v_523) (=> (and ?v_506 ?v_560) ?v_536) (=> (and ?v_506 ?v_562) ?v_512) (=> (and ?v_506 ?v_563) ?v_516) (=> (and ?v_506 ?v_564) ?v_516) (=> (and ?v_506 ?v_565) ?v_523) (=> (and ?v_506 ?v_566) ?v_516) (=> (and ?v_506 ?v_567) ?v_523) (=> (and ?v_506 ?v_568) ?v_523) (=> (and ?v_506 ?v_569) ?v_536) (=> (and ?v_506 ?v_570) ?v_516) (=> (and ?v_506 ?v_571) ?v_523) (=> (and ?v_506 ?v_572) ?v_523) (=> (and ?v_506 ?v_573) ?v_536) (=> (and ?v_506 ?v_574) ?v_523) (=> (and ?v_506 ?v_575) ?v_536) (=> (and ?v_506 ?v_576) ?v_536) (=> (and ?v_506 ?v_577) ?v_561) (=> (and x189 ?v_545) ?v_512) (=> (and x189 ?v_546) ?v_516) (=> (and x189 ?v_547) ?v_516) (=> (and x189 ?v_548) ?v_523) (=> (and x189 ?v_549) ?v_516) (=> (and x189 ?v_550) ?v_523) (=> (and x189 ?v_551) ?v_523) (=> (and x189 ?v_552) ?v_536) (=> (and x189 ?v_553) ?v_516) (=> (and x189 ?v_554) ?v_523) (=> (and x189 ?v_555) ?v_523) (=> (and x189 ?v_556) ?v_536) (=> (and x189 ?v_557) ?v_523) (=> (and x189 ?v_558) ?v_536) (=> (and x189 ?v_559) ?v_536) (=> (and x189 ?v_560) ?v_561) (=> (and x189 ?v_562) ?v_516) (=> (and x189 ?v_563) ?v_523) (=> (and x189 ?v_564) ?v_523) (=> (and x189 ?v_565) ?v_536) (=> (and x189 ?v_566) ?v_523) (=> (and x189 ?v_567) ?v_536) (=> (and x189 ?v_568) ?v_536) (=> (and x189 ?v_569) ?v_561) (=> (and x189 ?v_570) ?v_523) (=> (and x189 ?v_571) ?v_536) (=> (and x189 ?v_572) ?v_536) (=> (and x189 ?v_573) ?v_561) (=> (and x189 ?v_574) ?v_536) (=> (and x189 ?v_575) ?v_561) (=> (and x189 ?v_576) ?v_561) (=> (and x189 ?v_577) (= tmp69 1200)) (=> (and ?v_578 ?v_619) (= tmp68 0)) (=> (and ?v_578 ?v_621) ?v_584) (=> (and ?v_578 ?v_622) ?v_584) (=> (and ?v_578 ?v_623) ?v_588) (=> (and ?v_578 ?v_624) ?v_584) (=> (and ?v_578 ?v_625) ?v_588) (=> (and ?v_578 ?v_626) ?v_588) (=> (and ?v_578 ?v_627) ?v_595) (=> (and ?v_578 ?v_628) ?v_584) (=> (and ?v_578 ?v_629) ?v_588) (=> (and ?v_578 ?v_630) ?v_588) (=> (and ?v_578 ?v_631) ?v_595) (=> (and ?v_578 ?v_632) ?v_588) (=> (and ?v_578 ?v_633) ?v_595) (=> (and ?v_578 ?v_634) ?v_595) (=> (and ?v_578 ?v_635) (= tmp68 2000)) (=> (and ?v_578 ?v_637) ?v_620) (=> (and ?v_578 ?v_638) ?v_603) (=> (and ?v_578 ?v_639) ?v_603) (=> (and ?v_578 ?v_641) ?v_607) (=> (and ?v_578 ?v_642) ?v_603) (=> (and ?v_578 ?v_643) ?v_607) (=> (and ?v_578 ?v_645) ?v_607) (=> (and ?v_578 ?v_646) ?v_614) (=> (and ?v_578 ?v_647) ?v_603) (=> (and ?v_578 ?v_648) ?v_607) (=> (and ?v_578 ?v_649) ?v_607) (=> (and ?v_578 ?v_650) ?v_614) (=> (and ?v_578 ?v_652) ?v_607) (=> (and ?v_578 ?v_653) ?v_614) (=> (and ?v_578 ?v_654) ?v_614) (=> (and ?v_578 ?v_655) ?v_636) (=> (and x234 ?v_619) ?v_620) (=> (and x234 ?v_621) ?v_603) (=> (and x234 ?v_622) ?v_603) (=> (and x234 ?v_623) ?v_607) (=> (and x234 ?v_624) ?v_603) (=> (and x234 ?v_625) ?v_607) (=> (and x234 ?v_626) ?v_607) (=> (and x234 ?v_627) ?v_614) (=> (and x234 ?v_628) ?v_603) (=> (and x234 ?v_629) ?v_607) (=> (and x234 ?v_630) ?v_607) (=> (and x234 ?v_631) ?v_614) (=> (and x234 ?v_632) ?v_607) (=> (and x234 ?v_633) ?v_614) (=> (and x234 ?v_634) ?v_614) (=> (and x234 ?v_635) ?v_636) (=> (and x234 ?v_637) (= tmp68 600)) (=> (and x234 ?v_638) ?v_640) (=> (and x234 ?v_639) ?v_640) (=> (and x234 ?v_641) ?v_644) (=> (and x234 ?v_642) ?v_640) (=> (and x234 ?v_643) ?v_644) (=> (and x234 ?v_645) ?v_644) (=> (and x234 ?v_646) ?v_651) (=> (and x234 ?v_647) ?v_640) (=> (and x234 ?v_648) ?v_644) (=> (and x234 ?v_649) ?v_644) (=> (and x234 ?v_650) ?v_651) (=> (and x234 ?v_652) ?v_644) (=> (and x234 ?v_653) ?v_651) (=> (and x234 ?v_654) ?v_651) (=> (and x234 ?v_655) (= tmp68 2600)) (=> (and ?v_656 ?v_697) (= tmp67 0)) (=> (and ?v_656 ?v_699) ?v_662) (=> (and ?v_656 ?v_700) ?v_662) (=> (and ?v_656 ?v_701) ?v_666) (=> (and ?v_656 ?v_702) ?v_662) (=> (and ?v_656 ?v_703) ?v_666) (=> (and ?v_656 ?v_704) ?v_666) (=> (and ?v_656 ?v_705) ?v_673) (=> (and ?v_656 ?v_706) ?v_662) (=> (and ?v_656 ?v_707) ?v_666) (=> (and ?v_656 ?v_708) ?v_666) (=> (and ?v_656 ?v_709) ?v_673) (=> (and ?v_656 ?v_710) ?v_666) (=> (and ?v_656 ?v_711) ?v_673) (=> (and ?v_656 ?v_712) ?v_673) (=> (and ?v_656 ?v_713) ?v_723) (=> (and ?v_656 ?v_715) ?v_698) (=> (and ?v_656 ?v_716) ?v_681) (=> (and ?v_656 ?v_717) ?v_681) (=> (and ?v_656 ?v_718) ?v_685) (=> (and ?v_656 ?v_719) ?v_681) (=> (and ?v_656 ?v_720) ?v_685) (=> (and ?v_656 ?v_721) ?v_685) (=> (and ?v_656 ?v_722) ?v_692) (=> (and ?v_656 ?v_724) ?v_681) (=> (and ?v_656 ?v_725) ?v_685) (=> (and ?v_656 ?v_726) ?v_685) (=> (and ?v_656 ?v_727) ?v_692) (=> (and ?v_656 ?v_728) ?v_685) (=> (and ?v_656 ?v_729) ?v_692) (=> (and ?v_656 ?v_730) ?v_692) (=> (and ?v_656 ?v_731) ?v_714) (=> (and x183 ?v_697) ?v_698) (=> (and x183 ?v_699) ?v_681) (=> (and x183 ?v_700) ?v_681) (=> (and x183 ?v_701) ?v_685) (=> (and x183 ?v_702) ?v_681) (=> (and x183 ?v_703) ?v_685) (=> (and x183 ?v_704) ?v_685) (=> (and x183 ?v_705) ?v_692) (=> (and x183 ?v_706) ?v_681) (=> (and x183 ?v_707) ?v_685) (=> (and x183 ?v_708) ?v_685) (=> (and x183 ?v_709) ?v_692) (=> (and x183 ?v_710) ?v_685) (=> (and x183 ?v_711) ?v_692) (=> (and x183 ?v_712) ?v_692) (=> (and x183 ?v_713) ?v_714) (=> (and x183 ?v_715) ?v_662) (=> (and x183 ?v_716) ?v_666) (=> (and x183 ?v_717) ?v_666) (=> (and x183 ?v_718) ?v_673) (=> (and x183 ?v_719) ?v_666) (=> (and x183 ?v_720) ?v_673) (=> (and x183 ?v_721) ?v_673) (=> (and x183 ?v_722) ?v_723) (=> (and x183 ?v_724) ?v_666) (=> (and x183 ?v_725) ?v_673) (=> (and x183 ?v_726) ?v_673) (=> (and x183 ?v_727) ?v_723) (=> (and x183 ?v_728) ?v_673) (=> (and x183 ?v_729) ?v_723) (=> (and x183 ?v_730) ?v_723) (=> (and x183 ?v_731) (= tmp67 1000)) (=> (and ?v_732 ?v_771) (= tmp66 0)) (=> (and ?v_732 ?v_772) ?v_738) (=> (and ?v_732 ?v_773) ?v_738) (=> (and ?v_732 ?v_774) ?v_742) (=> (and ?v_732 ?v_775) ?v_738) (=> (and ?v_732 ?v_776) ?v_742) (=> (and ?v_732 ?v_777) ?v_742) (=> (and ?v_732 ?v_778) ?v_749) (=> (and ?v_732 ?v_779) ?v_738) (=> (and ?v_732 ?v_780) ?v_742) (=> (and ?v_732 ?v_781) ?v_742) (=> (and ?v_732 ?v_782) ?v_749) (=> (and ?v_732 ?v_783) ?v_742) (=> (and ?v_732 ?v_784) ?v_749) (=> (and ?v_732 ?v_785) ?v_749) (=> (and ?v_732 ?v_786) ?v_762) (=> (and ?v_732 ?v_788) ?v_738) (=> (and ?v_732 ?v_789) ?v_742) (=> (and ?v_732 ?v_790) ?v_742) (=> (and ?v_732 ?v_791) ?v_749) (=> (and ?v_732 ?v_792) ?v_742) (=> (and ?v_732 ?v_793) ?v_749) (=> (and ?v_732 ?v_794) ?v_749) (=> (and ?v_732 ?v_795) ?v_762) (=> (and ?v_732 ?v_796) ?v_742) (=> (and ?v_732 ?v_797) ?v_749) (=> (and ?v_732 ?v_798) ?v_749) (=> (and ?v_732 ?v_799) ?v_762) (=> (and ?v_732 ?v_800) ?v_749) (=> (and ?v_732 ?v_801) ?v_762) (=> (and ?v_732 ?v_802) ?v_762) (=> (and ?v_732 ?v_803) ?v_787) (=> (and x240 ?v_771) ?v_738) (=> (and x240 ?v_772) ?v_742) (=> (and x240 ?v_773) ?v_742) (=> (and x240 ?v_774) ?v_749) (=> (and x240 ?v_775) ?v_742) (=> (and x240 ?v_776) ?v_749) (=> (and x240 ?v_777) ?v_749) (=> (and x240 ?v_778) ?v_762) (=> (and x240 ?v_779) ?v_742) (=> (and x240 ?v_780) ?v_749) (=> (and x240 ?v_781) ?v_749) (=> (and x240 ?v_782) ?v_762) (=> (and x240 ?v_783) ?v_749) (=> (and x240 ?v_784) ?v_762) (=> (and x240 ?v_785) ?v_762) (=> (and x240 ?v_786) ?v_787) (=> (and x240 ?v_788) ?v_742) (=> (and x240 ?v_789) ?v_749) (=> (and x240 ?v_790) ?v_749) (=> (and x240 ?v_791) ?v_762) (=> (and x240 ?v_792) ?v_749) (=> (and x240 ?v_793) ?v_762) (=> (and x240 ?v_794) ?v_762) (=> (and x240 ?v_795) ?v_787) (=> (and x240 ?v_796) ?v_749) (=> (and x240 ?v_797) ?v_762) (=> (and x240 ?v_798) ?v_762) (=> (and x240 ?v_799) ?v_787) (=> (and x240 ?v_800) ?v_762) (=> (and x240 ?v_801) ?v_787) (=> (and x240 ?v_802) ?v_787) (=> (and x240 ?v_803) (= tmp66 1800)) (=> (and ?v_804 ?v_843) (= tmp65 0)) (=> (and ?v_804 ?v_844) ?v_810) (=> (and ?v_804 ?v_845) ?v_810) (=> (and ?v_804 ?v_846) ?v_814) (=> (and ?v_804 ?v_847) ?v_810) (=> (and ?v_804 ?v_848) ?v_814) (=> (and ?v_804 ?v_849) ?v_814) (=> (and ?v_804 ?v_850) ?v_821) (=> (and ?v_804 ?v_851) ?v_810) (=> (and ?v_804 ?v_852) ?v_814) (=> (and ?v_804 ?v_853) ?v_814) (=> (and ?v_804 ?v_854) ?v_821) (=> (and ?v_804 ?v_855) ?v_814) (=> (and ?v_804 ?v_856) ?v_821) (=> (and ?v_804 ?v_857) ?v_821) (=> (and ?v_804 ?v_858) ?v_834) (=> (and ?v_804 ?v_860) ?v_810) (=> (and ?v_804 ?v_861) ?v_814) (=> (and ?v_804 ?v_862) ?v_814) (=> (and ?v_804 ?v_863) ?v_821) (=> (and ?v_804 ?v_864) ?v_814) (=> (and ?v_804 ?v_865) ?v_821) (=> (and ?v_804 ?v_866) ?v_821) (=> (and ?v_804 ?v_867) ?v_834) (=> (and ?v_804 ?v_868) ?v_814) (=> (and ?v_804 ?v_869) ?v_821) (=> (and ?v_804 ?v_870) ?v_821) (=> (and ?v_804 ?v_871) ?v_834) (=> (and ?v_804 ?v_872) ?v_821) (=> (and ?v_804 ?v_873) ?v_834) (=> (and ?v_804 ?v_874) ?v_834) (=> (and ?v_804 ?v_875) ?v_859) (=> (and x177 ?v_843) ?v_810) (=> (and x177 ?v_844) ?v_814) (=> (and x177 ?v_845) ?v_814) (=> (and x177 ?v_846) ?v_821) (=> (and x177 ?v_847) ?v_814) (=> (and x177 ?v_848) ?v_821) (=> (and x177 ?v_849) ?v_821) (=> (and x177 ?v_850) ?v_834) (=> (and x177 ?v_851) ?v_814) (=> (and x177 ?v_852) ?v_821) (=> (and x177 ?v_853) ?v_821) (=> (and x177 ?v_854) ?v_834) (=> (and x177 ?v_855) ?v_821) (=> (and x177 ?v_856) ?v_834) (=> (and x177 ?v_857) ?v_834) (=> (and x177 ?v_858) ?v_859) (=> (and x177 ?v_860) ?v_814) (=> (and x177 ?v_861) ?v_821) (=> (and x177 ?v_862) ?v_821) (=> (and x177 ?v_863) ?v_834) (=> (and x177 ?v_864) ?v_821) (=> (and x177 ?v_865) ?v_834) (=> (and x177 ?v_866) ?v_834) (=> (and x177 ?v_867) ?v_859) (=> (and x177 ?v_868) ?v_821) (=> (and x177 ?v_869) ?v_834) (=> (and x177 ?v_870) ?v_834) (=> (and x177 ?v_871) ?v_859) (=> (and x177 ?v_872) ?v_834) (=> (and x177 ?v_873) ?v_859) (=> (and x177 ?v_874) ?v_859) (=> (and x177 ?v_875) (= tmp65 600)) (=> (and ?v_732 true) (= tmp64 0)) (=> (and x240 true) (= tmp64 (- 100))) (=> (and ?v_733 true) (= tmp63 0)) (=> (and x239 true) (= tmp63 (- 100))) (=> (and ?v_734 true) (= tmp62 0)) (=> (and x238 true) (= tmp62 (- 100))) (=> (and ?v_735 true) (= tmp61 0)) (=> (and x237 true) (= tmp61 (- 100))) (=> (and ?v_736 true) (= tmp60 0)) (=> (and x236 true) (= tmp60 (- 100))) (=> ?v_737 (= tmp59 0)) (=> ?v_739 (= tmp59 (- 100))) (=> (and ?v_578 true) (= tmp58 0)) (=> (and x234 true) (= tmp58 (- 100))) (=> (and ?v_579 true) (= tmp57 0)) (=> (and x233 true) (= tmp57 (- 100))) (=> (and ?v_580 true) (= tmp56 0)) (=> (and x232 true) (= tmp56 (- 240))) (=> (and ?v_581 true) (= tmp55 0)) (=> (and x231 true) (= tmp55 (- 240))) (=> (and ?v_582 true) (= tmp54 0)) (=> (and x230 true) (= tmp54 (- 240))) (=> ?v_583 (= tmp53 0)) (=> ?v_585 (= tmp53 (- 240))) (=> (and ?v_430 true) (= tmp52 0)) (=> (and x228 true) (= tmp52 (- 240))) (=> (and ?v_431 true) (= tmp51 0)) (=> (and x227 true) (= tmp51 (- 240))) (=> (and ?v_432 true) (= tmp50 0)) (=> (and x226 true) (= tmp50 (- 240))) (=> (and ?v_433 true) (= tmp49 0)) (=> (and x225 true) (= tmp49 (- 240))) (=> (and ?v_434 true) (= tmp48 0)) (=> (and x224 true) (= tmp48 (- 400))) (=> ?v_435 (= tmp47 0)) (=> ?v_437 (= tmp47 (- 400))) (=> (and ?v_286 true) (= tmp46 0)) (=> (and x222 true) (= tmp46 (- 400))) (=> (and ?v_287 true) (= tmp45 0)) (=> (and x221 true) (= tmp45 (- 400))) (=> (and ?v_288 true) (= tmp44 0)) (=> (and x220 true) (= tmp44 (- 400))) (=> (and ?v_289 true) (= tmp43 0)) (=> (and x219 true) (= tmp43 (- 350))) (=> (and ?v_290 true) (= tmp42 0)) (=> (and x218 true) (= tmp42 (- 350))) (=> ?v_291 (= tmp41 0)) (=> ?v_293 (= tmp41 (- 350))) (=> (and ?v_142 true) (= tmp40 0)) (=> (and x216 true) (= tmp40 (- 160))) (=> (and ?v_143 true) (= tmp39 0)) (=> (and x215 true) (= tmp39 (- 160))) (=> (and ?v_144 true) (= tmp38 0)) (=> (and x214 true) (= tmp38 (- 160))) (=> (and ?v_145 true) (= tmp37 0)) (=> (and x213 true) (= tmp37 (- 160))) (=> (and ?v_146 true) (= tmp36 0)) (=> (and x212 true) (= tmp36 (- 160))) (=> ?v_147 (= tmp35 0)) (=> ?v_149 (= tmp35 (- 160))) (=> ?v_123 (= tmp34 0)) (=> ?v_125 (= tmp34 (- 160))) (=> (and ?v_122 true) (= tmp33 0)) (=> (and x209 true) (= tmp33 (- 160))) (=> (and ?v_121 true) (= tmp32 0)) (=> (and x208 true) (= tmp32 (- 500))) (=> (and ?v_120 true) (= tmp31 0)) (=> (and x207 true) (= tmp31 (- 400))) (=> ?v_219 (= tmp30 0)) (=> ?v_221 (= tmp30 (- 400))) (=> (and ?v_218 true) (= tmp29 0)) (=> (and x205 true) (= tmp29 (- 400))) (=> (and ?v_217 true) (= tmp28 0)) (=> (and x204 true) (= tmp28 (- 400))) (=> (and ?v_216 true) (= tmp27 0)) (=> (and x203 true) (= tmp27 (- 350))) (=> (and ?v_215 true) (= tmp26 0)) (=> (and x202 true) (= tmp26 (- 350))) (=> (and ?v_214 true) (= tmp25 0)) (=> (and x201 true) (= tmp25 (- 350))) (=> ?v_363 (= tmp24 0)) (=> ?v_365 (= tmp24 (- 500))) (=> (and ?v_362 true) (= tmp23 0)) (=> (and x199 true) (= tmp23 (- 400))) (=> (and ?v_361 true) (= tmp22 0)) (=> (and x198 true) (= tmp22 (- 400))) (=> (and ?v_360 true) (= tmp21 0)) (=> (and x197 true) (= tmp21 (- 400))) (=> (and ?v_359 true) (= tmp20 0)) (=> (and x196 true) (= tmp20 (- 400))) (=> (and ?v_358 true) (= tmp19 0)) (=> (and x195 true) (= tmp19 (- 350))) (=> ?v_511 (= tmp18 0)) (=> ?v_513 (= tmp18 (- 350))) (=> (and ?v_510 true) (= tmp17 0)) (=> (and x193 true) (= tmp17 (- 350))) (=> (and ?v_509 true) (= tmp16 0)) (=> (and x192 true) (= tmp16 (- 240))) (=> (and ?v_508 true) (= tmp15 0)) (=> (and x191 true) (= tmp15 (- 240))) (=> (and ?v_507 true) (= tmp14 0)) (=> (and x190 true) (= tmp14 (- 240))) (=> (and ?v_506 true) (= tmp13 0)) (=> (and x189 true) (= tmp13 (- 240))) (=> ?v_661 (= tmp12 0)) (=> ?v_663 (= tmp12 (- 240))) (=> (and ?v_660 true) (= tmp11 0)) (=> (and x187 true) (= tmp11 (- 240))) (=> (and ?v_659 true) (= tmp10 0)) (=> (and x186 true) (= tmp10 (- 240))) (=> (and ?v_658 true) (= tmp9 0)) (=> (and x185 true) (= tmp9 (- 240))) (=> (and ?v_657 true) (= tmp8 0)) (=> (and x184 true) (= tmp8 (- 420))) (=> (and ?v_656 true) (= tmp7 0)) (=> (and x183 true) (= tmp7 (- 400))) (=> ?v_809 (= tmp6 0)) (=> ?v_811 (= tmp6 (- 400))) (=> (and ?v_808 true) (= tmp5 0)) (=> (and x181 true) (= tmp5 (- 400))) (=> (and ?v_807 true) (= tmp4 0)) (=> (and x180 true) (= tmp4 (- 400))) (=> (and ?v_806 true) (= tmp3 0)) (=> (and x179 true) (= tmp3 (- 350))) (=> (and ?v_805 true) (= tmp2 0)) (=> (and x178 true) (= tmp2 (- 350))) (=> (and ?v_804 true) (= tmp1 0)) (=> (and x177 true) (= tmp1 (- 350))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+(check-sat)
+(exit)
diff --git a/test/regress/regress0/arith/miplib.cvc b/test/regress/regress0/arith/miplib.cvc
new file mode 100644
index 000000000..db2aa2ac5
--- /dev/null
+++ b/test/regress/regress0/arith/miplib.cvc
@@ -0,0 +1,29 @@
+% COMMAND-LINE: --enable-miplib-trick
+% EXPECT: sat
+% EXIT: 10
+
+tmp1, tmp2, tmp3 : INT;
+x, y, z : BOOLEAN;
+
+% x = {0, 1}, (NOT x) = 1 - x
+% i*Nx + j*Ny + k = 0
+% i*x + j*Ny + k = 4
+% i*Nx + j*y + k = 6
+% i*x + j*y + k = 10
+
+ASSERT NOT x AND (NOT y AND TRUE) => tmp1 = 0;
+ASSERT x AND (NOT y AND TRUE) => tmp1 = 4;
+ASSERT NOT x AND ( y AND TRUE) => tmp1 = 6;
+ASSERT x AND ( y AND TRUE) => tmp1 = 10;
+
+ASSERT NOT x AND (NOT z AND TRUE) => tmp2 = 0;
+ASSERT x AND (NOT z AND TRUE) => tmp2 = 2;
+ASSERT NOT x AND ( z AND TRUE) => tmp2 = 9;
+ASSERT x AND ( z AND TRUE) => tmp2 = 11;
+
+ASSERT NOT y AND (NOT z AND TRUE) => tmp3 = 0;
+ASSERT y AND (NOT z AND TRUE) => tmp3 = 5;
+ASSERT NOT y AND ( z AND TRUE) => tmp3 = 16;
+ASSERT y AND ( z AND TRUE) => tmp3 = 21;
+
+CHECKSAT;
diff --git a/test/regress/regress0/arith/miplib2.cvc b/test/regress/regress0/arith/miplib2.cvc
new file mode 100644
index 000000000..84f17e848
--- /dev/null
+++ b/test/regress/regress0/arith/miplib2.cvc
@@ -0,0 +1,33 @@
+% COMMAND-LINE: --enable-miplib-trick
+% EXPECT: sat
+% EXIT: 10
+
+tmp1, tmp2, tmp3 : INT;
+x, y, z : BOOLEAN;
+
+% x = {0, 1}, (NOT x) = 1 - x
+% i*Nx + j*Ny + k = 0
+% i*x + j*Ny + k = 4
+% i*Nx + j*y + k = 6
+% i*x + j*y + k = 10
+
+ASSERT NOT x AND (NOT y AND TRUE) => tmp1 = 0;
+ASSERT x AND (NOT y AND TRUE) => tmp1 = 4;
+ASSERT NOT x AND ( y AND TRUE) => tmp1 = 6;
+ASSERT x AND ( y AND TRUE) => tmp1 = 10;
+
+ASSERT NOT x AND (NOT z AND TRUE) => tmp2 = 0;
+ASSERT x AND (NOT z AND TRUE) => tmp2 = 2;
+ASSERT NOT x AND ( z AND TRUE) => tmp2 = 9;
+ASSERT x AND ( z AND TRUE) => tmp2 = 11;
+
+ASSERT NOT y AND (NOT z AND TRUE) => tmp3 = 0;
+ASSERT y AND (NOT z AND TRUE) => tmp3 = 5;
+ASSERT NOT y AND ( z AND TRUE) => tmp3 = 16;
+ASSERT y AND ( z AND TRUE) => tmp3 = 21;
+
+% miplib trick does not apply to blocks 1 and 2, x occurs outside
+% of the tmp definitions
+ASSERT x;
+
+CHECKSAT;
diff --git a/test/regress/regress0/arith/miplib3.cvc b/test/regress/regress0/arith/miplib3.cvc
new file mode 100644
index 000000000..009effb74
--- /dev/null
+++ b/test/regress/regress0/arith/miplib3.cvc
@@ -0,0 +1,34 @@
+% COMMAND-LINE: --enable-miplib-trick
+% EXPECT: sat
+% EXIT: 10
+
+tmp1, tmp2, tmp3, tmp4 : INT;
+x, y, z : BOOLEAN;
+
+% x = {0, 1}, (NOT x) = 1 - x
+% i*Nx + j*Ny + k = 0
+% i*x + j*Ny + k = 4
+% i*Nx + j*y + k = 6
+% i*x + j*y + k = 10
+
+ASSERT NOT x AND (NOT y AND TRUE) => tmp1 = 0;
+ASSERT x AND (NOT y AND TRUE) => tmp1 = 4;
+ASSERT NOT x AND ( y AND TRUE) => tmp1 = 6;
+ASSERT x AND ( y AND TRUE) => tmp1 = 10;
+
+ASSERT NOT x AND (NOT z AND TRUE) => tmp2 = 0;
+ASSERT x AND (NOT z AND TRUE) => tmp2 = 2;
+ASSERT NOT x AND ( z AND TRUE) => tmp2 = 9;
+ASSERT x AND ( z AND TRUE) => tmp2 = 11;
+
+ASSERT NOT y AND (NOT z AND TRUE) => tmp3 = 0;
+ASSERT y AND (NOT z AND TRUE) => tmp3 = 5;
+ASSERT NOT y AND ( z AND TRUE) => tmp3 = 16;
+ASSERT y AND ( z AND TRUE) => tmp3 = 21;
+
+ASSERT NOT x AND (NOT y AND TRUE) => tmp4 = 0;
+ASSERT x AND (NOT y AND TRUE) => tmp4 = 4;
+ASSERT NOT x AND ( y AND TRUE) => tmp4 = 6;
+ASSERT x AND ( y AND TRUE) => tmp4 = 10;
+
+CHECKSAT;
diff --git a/test/regress/regress0/arith/miplib4.cvc b/test/regress/regress0/arith/miplib4.cvc
new file mode 100644
index 000000000..d56015222
--- /dev/null
+++ b/test/regress/regress0/arith/miplib4.cvc
@@ -0,0 +1,13 @@
+% COMMAND-LINE: --enable-miplib-trick
+% EXPECT: sat
+% EXIT: 10
+
+tmp1 : INT;
+x, y : BOOLEAN;
+
+ASSERT NOT x AND (NOT y AND TRUE) => tmp1 = 0;
+ASSERT x AND (NOT y AND TRUE) => tmp1 = 4;
+ASSERT NOT x AND ( y AND TRUE) => tmp1 = 6;
+ASSERT x AND ( y AND TRUE) => tmp1 = 12;
+
+CHECKSAT;
diff --git a/test/regress/regress0/aufbv/bug493.smt b/test/regress/regress0/aufbv/bug493.smt
new file mode 100644
index 000000000..d7ae495af
--- /dev/null
+++ b/test/regress/regress0/aufbv/bug493.smt
@@ -0,0 +1,54 @@
+(benchmark B_
+ :source {
+Source unknown
+}
+ :status unknown
+ :category { unknown }
+ :logic QF_AUFBV
+ :extrafuns ((m Array[8:8]))
+ :extrafuns ((regionSize Array[8:8]))
+ :extrafuns ((m_0 Array[8:8]))
+ :extrafuns ((regionSize_0 Array[8:8]))
+ :extrafuns ((addr_of_j BitVec[8]))
+ :extrafuns ((m_1 Array[8:8]))
+ :extrafuns ((regionSize_1 Array[8:8]))
+ :extrafuns ((m_2 Array[8:8]))
+ :extrafuns ((regionSize_2 Array[8:8]))
+ :extrafuns ((addr_of_a BitVec[8]))
+ :extrafuns ((m_3 Array[8:8]))
+ :extrafuns ((regionSize_3 Array[8:8]))
+ :extrafuns ((m_4 Array[8:8]))
+ :extrafuns ((regionSize_4 Array[8:8]))
+ :extrafuns ((m_5 Array[8:8]))
+ :extrafuns ((regionSize_5 Array[8:8]))
+ :extrafuns ((m_6 Array[8:8]))
+ :extrafuns ((regionSize_6 Array[8:8]))
+ :extrafuns ((addr_of_i BitVec[8]))
+ :extrafuns ((m_7 Array[8:8]))
+ :extrafuns ((regionSize_7 Array[8:8]))
+ :extrafuns ((m_8 Array[8:8]))
+ :extrafuns ((regionSize_8 Array[8:8]))
+ :formula (let (?v_3 (bvadd addr_of_a (select (store regionSize addr_of_a (bvmul bv8[8] bv1[8])) addr_of_a))) (let (?v_0 (store m addr_of_j bv0[8])) (let (?v_1 (store ?v_0 addr_of_j (bvadd (select ?v_0 addr_of_j) bv2[8]))) (let (?v_2 (bvadd addr_of_a (bvmul (select (store ?v_1 addr_of_i (bvadd (select ?v_1 addr_of_j) bv2[8])) addr_of_i) bv1[8]))) (not (implies (if_then_else true (and (bvule addr_of_a ?v_3) (and (bvult addr_of_j addr_of_a) (bvult addr_of_i addr_of_j))) false) (and (bvule addr_of_a ?v_2) (bvult ?v_2 ?v_3))))))))
+ :extrafuns ((m_9 Array[8:8]))
+ :extrafuns ((regionSize_9 Array[8:8]))
+ :extrafuns ((m_10 Array[8:8]))
+ :extrafuns ((regionSize_10 Array[8:8]))
+ :extrafuns ((m_11 Array[8:8]))
+ :extrafuns ((regionSize_11 Array[8:8]))
+ :extrafuns ((addr_of_TEST_VAR_0 BitVec[8]))
+ :extrafuns ((m_12 Array[8:8]))
+ :extrafuns ((regionSize_12 Array[8:8]))
+ :extrafuns ((m_13 Array[8:8]))
+ :extrafuns ((regionSize_13 Array[8:8]))
+ :extrafuns ((m_14 Array[8:8]))
+ :extrafuns ((regionSize_14 Array[8:8]))
+ :extrafuns ((m_15 Array[8:8]))
+ :extrafuns ((regionSize_15 Array[8:8]))
+ :extrafuns ((m_16 Array[8:8]))
+ :extrafuns ((regionSize_16 Array[8:8]))
+ :extrafuns ((m_17 Array[8:8]))
+ :extrafuns ((regionSize_17 Array[8:8]))
+ :extrafuns ((m_18 Array[8:8]))
+ :extrafuns ((regionSize_18 Array[8:8]))
+ :formula (let (?v_9 (bvadd addr_of_a (select (store regionSize addr_of_a (bvmul bv8[8] bv1[8])) addr_of_a))) (flet ($v_4 (bvule addr_of_a ?v_9)) (flet ($v_5 (bvult addr_of_i addr_of_j)) (let (?v_0 (store m addr_of_j bv0[8])) (let (?v_1 (store ?v_0 addr_of_j (bvadd (select ?v_0 addr_of_j) bv2[8]))) (let (?v_2 (store ?v_1 addr_of_i (bvadd (select ?v_1 addr_of_j) bv2[8]))) (let (?v_3 (store ?v_2 (bvadd addr_of_a (bvmul (select ?v_2 addr_of_i) bv1[8])) bv0[8])) (let (?v_6 (store ?v_3 addr_of_TEST_VAR_0 (ite (bvult (select ?v_3 addr_of_j) bv8[8]) bv1[8] bv0[8]))) (let (?v_7 (store ?v_6 addr_of_j (bvadd (select ?v_6 addr_of_j) bv2[8]))) (let (?v_8 (bvadd addr_of_a (bvmul (select (store ?v_7 addr_of_i (bvadd (select ?v_7 addr_of_j) bv2[8])) addr_of_i) bv1[8]))) (not (implies (if_then_else (if_then_else (if_then_else true (and $v_4 (and (bvult addr_of_j addr_of_a) $v_5)) false) (not (= (select ?v_6 addr_of_TEST_VAR_0) bv0[8])) false) (and $v_4 (and (bvult addr_of_TEST_VAR_0 addr_of_a) (and (bvult addr_of_j addr_of_TEST_VAR_0) $v_5))) false) (and (bvule addr_of_a ?v_8) (bvult ?v_8 ?v_9))))))))))))))
+)
diff --git a/test/regress/regress0/bug484.smt2 b/test/regress/regress0/bug484.smt2
new file mode 100644
index 000000000..afbd72420
--- /dev/null
+++ b/test/regress/regress0/bug484.smt2
@@ -0,0 +1,111 @@
+; Preamble --------------
+(set-logic ALL_SUPPORTED)
+(set-info :status sat)
+(declare-datatypes () ((UNIT (Unit))))
+(declare-datatypes () ((BOOL (Truth) (Falsity))))
+
+; Decls --------------
+(declare-sort A 0)
+(declare-sort B 0)
+(declare-sort C 0)
+(declare-sort D 0)
+(declare-datatypes () ((E (one) (two) (three))))
+(declare-datatypes () ((F (four) (five) (six))))
+(declare-datatypes () ((G (c_G (seven BOOL)))))
+
+(declare-datatypes ()
+ ((H
+ (c_H
+ (foo1 BOOL)
+ (foo2 A)
+ (foo3 B)
+ (foo4 B)
+ (foo5 Int)
+ )
+ ))
+)
+
+(declare-datatypes ()
+ ((I
+ (c_I
+ (bar1 E)
+ (bar2 Int)
+ (bar3 Int)
+ (bar4 A)
+ )
+ ))
+)
+
+(declare-datatypes ()
+ ((J
+ (c_J
+ (f1 BOOL)
+ (f2 Int)
+ (f3 Int)
+ (f4 Int)
+ (f5 I)
+ (f6 B)
+ (f7 C)
+ )
+ ))
+)
+
+(declare-datatypes ()
+ ((K
+ (c_K
+ (g1 BOOL)
+ (g2 F)
+ (g3 A)
+ (g4 BOOL)
+ )
+ ))
+)
+
+; Var Decls --------------
+(declare-fun s1 () (Array A J))
+(declare-fun s2 () (Array A J))
+(declare-fun e1 () (Array A K))
+(declare-fun e2 () (Array A K))
+(declare-fun x () A)
+(declare-fun y () A)
+(declare-fun foo (A) A)
+(declare-fun bar (A) C)
+
+
+; Asserts --------------
+(assert
+ (not
+ (=
+ (ite
+ (=>
+ (= y (g3 (select e1 x)))
+ (=>
+ (= s2
+ (store
+ s1
+ y
+ (let ((z (select s1 y)))
+ (c_J
+ (f1 z)
+ (f2 z)
+ (- (f3 (select s1 y)) 1)
+ (f4 z)
+ (f5 z)
+ (f6 z)
+ (f7 z)
+ )
+ )
+ )
+ )
+ (forall ((s A)) (= (g3 (select e2 s)) s))
+ )
+ )
+ Truth
+ Falsity
+ )
+ Truth
+ )
+ )
+)
+
+(check-sat)
diff --git a/test/regress/regress0/datatypes/Makefile.am b/test/regress/regress0/datatypes/Makefile.am
index e733bae52..08462d51b 100644
--- a/test/regress/regress0/datatypes/Makefile.am
+++ b/test/regress/regress0/datatypes/Makefile.am
@@ -18,6 +18,7 @@ MAKEFLAGS = -k
# put it below in "TESTS +="
TESTS = \
tuple.cvc \
+ tuple-model.cvc \
rec1.cvc \
rec2.cvc \
rec4.cvc \
diff --git a/test/regress/regress0/datatypes/tuple-model.cvc b/test/regress/regress0/datatypes/tuple-model.cvc
new file mode 100644
index 000000000..2ba96712d
--- /dev/null
+++ b/test/regress/regress0/datatypes/tuple-model.cvc
@@ -0,0 +1,6 @@
+% This was breaking with --check-models due to tuple model breakage.
+% EXPECT: sat
+% EXIT: 10
+x : [ INT, INT ];
+ASSERT x.0 = 5;
+CHECKSAT;
diff --git a/test/regress/regress0/quantifiers/Makefile.am b/test/regress/regress0/quantifiers/Makefile.am
index 112da2a6e..3e04c8437 100644
--- a/test/regress/regress0/quantifiers/Makefile.am
+++ b/test/regress/regress0/quantifiers/Makefile.am
@@ -36,8 +36,10 @@ TESTS = \
smtlib46f14a.smt2 \
smtlibf957ea.smt2 \
gauss_init_0030.fof.smt2 \
- piVC_5581bd.smt2 \
- set3.smt2
+ piVC_5581bd.smt2
+
+# regression can be solved with --finite-model-find --fmf-inst-engine
+# set3.smt2
# removed because it now reports unknown
# symmetric_unsat_7.smt2 \
diff --git a/test/regress/regress1/arith/Makefile b/test/regress/regress1/arith/Makefile
new file mode 100644
index 000000000..481d240e4
--- /dev/null
+++ b/test/regress/regress1/arith/Makefile
@@ -0,0 +1,8 @@
+topdir = ../../../..
+srcdir = test/regress/regress1/arith
+
+include $(topdir)/Makefile.subdir
+
+# synonyms for "check"
+.PHONY: test
+test: check
diff --git a/test/unit/expr/node_manager_white.h b/test/unit/expr/node_manager_white.h
index 3be95ad87..57fb8f445 100644
--- a/test/unit/expr/node_manager_white.h
+++ b/test/unit/expr/node_manager_white.h
@@ -54,4 +54,23 @@ public:
Node m = d_nm->mkConst(i);
TS_ASSERT_EQUALS(n.getId(), m.getId());
}
+
+ void testOversizedNodeBuilder() {
+ NodeBuilder<> nb;
+
+ TS_ASSERT_THROWS_NOTHING(nb.realloc(15));
+ TS_ASSERT_THROWS_NOTHING(nb.realloc(25));
+ TS_ASSERT_THROWS_NOTHING(nb.realloc(256));
+#ifdef CVC4_ASSERTIONS
+ TS_ASSERT_THROWS(nb.realloc(100), AssertionException);
+#endif /* CVC4_ASSERTIONS */
+ TS_ASSERT_THROWS_NOTHING(nb.realloc(257));
+ TS_ASSERT_THROWS_NOTHING(nb.realloc(4000));
+ TS_ASSERT_THROWS_NOTHING(nb.realloc(20000));
+ TS_ASSERT_THROWS_NOTHING(nb.realloc(60000));
+ TS_ASSERT_THROWS_NOTHING(nb.realloc(65535));
+#ifdef CVC4_ASSERTIONS
+ TS_ASSERT_THROWS(nb.realloc(65536), AssertionException);
+#endif /* CVC4_ASSERTIONS */
+ }
};
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback