summaryrefslogtreecommitdiff
path: root/src/theory/arith/options
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2012-07-31 20:40:14 +0000
committerMorgan Deters <mdeters@gmail.com>2012-07-31 20:40:14 +0000
commit24072d4b0f33abbbe1e468e5b62eb25928f7da25 (patch)
tree1ba758d66c407a2d965dd2a43d902996d27e49ec /src/theory/arith/options
parent485c03a323911142e460bd0a7c428759496dc631 (diff)
Options merge. This commit:
1. changes the way options are declared (see http://church.cims.nyu.edu/wiki/Options) 2. moves module-specific options enumerations (SimplificationMode, DecisionMode, ArithUnateLemmaMode, etc.) to their own header files, also they are no longer inside the Options:: class namespace. 3. includes many SMT-LIBv2 compliance fixes, especially to (set-option..) and (get-option..) The biggest syntactical changes (outside of adding new options) you'll notice are in accessing and setting options: * to access an option, write (e.g.) options::unconstrainedSimp() instead of Options::current()->unconstrainedSimp. * to determine if an option value was set by the user, check (e.g.) options::unconstrainedSimp.wasSetByUser(). * ensure that you have the option available (you have to #include the right module's options.h file, e.g. #include "theory/uf/options.h" for UF options) *** this point is important. If you access an option and it tells you the option doesn't exist, you aren't #including the appropriate options.h header file *** Note that if you want an option to be directly set (i.e., other than via command-line parsing or SmtEngine::setOption()), you need to mark the option :read-write in its options file (otherwise it's read-only), and you then write (e.g.) options::unconstrainedSimp.set(true). Adding new options is incredibly simple for primitive types (int, unsigned, bool, string, double). For option settings that you need to turn into a member of an enumerated type, you write a custom "handler" for the option---this is no additional work than it was before, and there are many examples to copy from (a good one is stringToSimplificationMode() in src/smt/options_handlers.h). Benefits of the new options system include: 1. changes to options declarations don't require a full-source rebuild (you only have to rebuild those sources that depend on the set of options that changed). 2. lots of sanity checks (that the same option isn't declared twice, that option values are in range for their type, that all options are documented properly, etc.) 3. consistency: Boolean-valued option --foo gets a --no-foo automatically, documentation is generated consistently, the option-parsing matches the documented option name, etc. 4. setting options programmatically via SmtEngine::setOption() is enabled, and behaves the same as command-line equivalents (including checking the value is in range, etc.) 5. the notion of options being "set by the user" is now primitive; you can use (e.g.) options::unconstrainedSimp.wasSetByUser() instead of having to use (and maintain) a separate Boolean option for the purpose I've taken lots of care not to break anything. Hopefully, I've succeeded in that.
Diffstat (limited to 'src/theory/arith/options')
-rw-r--r--src/theory/arith/options55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/theory/arith/options b/src/theory/arith/options
new file mode 100644
index 000000000..8b45a6da2
--- /dev/null
+++ b/src/theory/arith/options
@@ -0,0 +1,55 @@
+#
+# Option specification file for CVC4
+# See src/options/base_options for a description of this file format
+#
+
+module ARITH "theory/arith/options.h" Arithmetic theory
+
+option arithUnateLemmaMode --unate-lemmas=MODE ArithUnateLemmaMode :handler CVC4::theory::arith::stringToArithUnateLemmaMode :default ALL_PRESOLVE_LEMMAS :handler-include "theory/arith/options_handlers.h" :include "theory/arith/arith_unate_lemma_mode.h"
+ determines which lemmas to add before solving (default is 'all', see --unate-lemmas=help)
+
+option arithPropagationMode --arith-prop=MODE ArithPropagationMode :handler CVC4::theory::arith::stringToArithPropagationMode :default BOTH_PROP :handler-include "theory/arith/options_handlers.h" :include "theory/arith/arith_propagation_mode.h"
+ turns on arithmetic propagation (default is 'old', see --arith-prop=help)
+
+# The maximum number of difference pivots to do per invocation of simplex.
+# If this is negative, the number of pivots done is the number of variables.
+# If this is not set by the user, different logics are free to chose different
+# defaults.
+option arithHeuristicPivots --heuristic-pivots=N int16_t :default 0 :read-write
+ the number of times to apply the heuristic pivot rule; if N < 0, this defaults to the number of variables; if this is unset, this is tuned by the logic selection
+
+# The maximum number of variable order pivots to do per invocation of simplex.
+# If this is negative, the number of pivots done is unlimited.
+# If this is not set by the user, different logics are free to chose different
+# defaults.
+expert-option arithStandardCheckVarOrderPivots --standard-effort-variable-order-pivots=N int16_t :default -1 :read-write
+ limits the number of pivots in a single invocation of check() at a non-full effort level using Bland's pivot rule
+
+option arithHeuristicPivotRule --heuristic-pivot-rule=RULE ArithHeuristicPivotRule :handler CVC4::theory::arith::stringToArithHeuristicPivotRule :default MINIMUM :handler-include "theory/arith/options_handlers.h" :include "theory/arith/arith_heuristic_pivot_rule.h"
+ change the pivot rule for the basic variable (default is 'min', see --pivot-rule help)
+
+# The number of pivots before simplex rechecks every basic variable for a conflict
+option arithSimplexCheckPeriod --simplex-check-period=N uint16_t :default 200
+ the number of pivots to do in simplex before rechecking for a conflict on all variables
+
+# This is the pivots per basic variable that can be done using heuristic choices
+# before variable order must be used.
+# If this is not set by the user, different logics are free to chose different
+# defaults.
+option arithPivotThreshold --pivot-threshold=N uint16_t :default 2 :read-write
+ sets the number of pivots using --pivot-rule per basic variable per simplex instance before using variable order
+
+option arithPropagateMaxLength --prop-row-length=N uint16_t :default 16
+ sets the maximum row length to be used in propagation
+
+option arithDioSolver /--disable-dio-solver bool :default true
+ use Linear Diophantine Equation solver (Griggio, JSAT 2012)
+/turns off Linear Diophantine Equation solver (Griggio, JSAT 2012)
+
+# Whether to split (= x y) into (and (<= x y) (>= x y)) in
+# arithmetic preprocessing.
+option arithRewriteEq --enable-arith-rewrite-equalities/--disable-arith-rewrite-equalities bool :default false :read-write
+ turns on the preprocessing rewrite turning equalities into a conjunction of inequalities
+/turns off the preprocessing rewrite turning equalities into a conjunction of inequalities
+
+endmodule
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback