diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2013-07-23 11:55:39 -0400 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2013-07-23 11:55:39 -0400 |
commit | e12e7b9f980ec3f2b3db6de73e5fbe6f0daa1c00 (patch) | |
tree | b7561d0d924ad7a3d4caea3a585f4a5bfb28d2e2 /src/options/mkoptions | |
parent | 36b4c5c156e32d7bb8634794e8bf95b8617a3944 (diff) |
(get-info :all-options) to get option values; also command-line option suggestions
Diffstat (limited to 'src/options/mkoptions')
-rwxr-xr-x | src/options/mkoptions | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/src/options/mkoptions b/src/options/mkoptions index 2e152ee07..bfb35ff26 100755 --- a/src/options/mkoptions +++ b/src/options/mkoptions @@ -73,7 +73,9 @@ options_cpp_template="$1"; shift all_modules_defaults= all_modules_short_options= all_modules_long_options= +all_modules_smt_options= all_modules_option_handlers= +all_modules_get_options= smt_getoption_handlers= smt_setoption_handlers= include_all_option_headers= @@ -665,34 +667,57 @@ template <> options::${internal}__option_t::type runHandlerAndPredicates(options fi if [ -n "$smtname" ]; then + all_modules_smt_options="${all_modules_smt_options:+$all_modules_smt_options,} +#line $lineno \"$kf\" + \"$smtname\"" if [ "$internal" != - ]; then case "$type" in - bool) smt_getoption_handlers="${smt_getoption_handlers} + bool) + all_modules_get_options="${all_modules_get_options:+$all_modules_get_options +#line $lineno \"$kf\" + }{ std::vector<SExpr> v; v.push_back(\"$smtname\"); v.push_back(d_holder->$internal); opts.push_back(v); }" + smt_getoption_handlers="${smt_getoption_handlers} #line $lineno \"$kf\" if(key == \"$smtname\") { #line $lineno \"$kf\" return SExprKeyword(options::$internal() ? \"true\" : \"false\"); }";; - int|unsigned|int*_t|uint*_t|CVC4::Integer) smt_getoption_handlers="${smt_getoption_handlers} + int|unsigned|int*_t|uint*_t|CVC4::Integer) + all_modules_get_options="${all_modules_get_options:+$all_modules_get_options +#line $lineno \"$kf\" + }{ std::vector<SExpr> v; v.push_back(\"$smtname\"); v.push_back(d_holder->$internal); opts.push_back(v); }" + smt_getoption_handlers="${smt_getoption_handlers} #line $lineno \"$kf\" if(key == \"$smtname\") { #line $lineno \"$kf\" return SExpr(Integer(options::$internal())); }";; - float|double) smt_getoption_handlers="${smt_getoption_handlers} + float|double) + all_modules_get_options="${all_modules_get_options:+$all_modules_get_options +#line $lineno \"$kf\" + }{ std::vector<SExpr> v; v.push_back(\"$smtname\"); v.push_back(Rational::fromDouble(d_holder->$internal)); opts.push_back(v); }" + smt_getoption_handlers="${smt_getoption_handlers} #line $lineno \"$kf\" if(key == \"$smtname\") { #line $lineno \"$kf\" stringstream ss; ss << std::fixed << options::$internal(); return SExpr(Rational::fromDecimal(ss.str())); }";; - CVC4::Rational) smt_getoption_handlers="${smt_getoption_handlers} + CVC4::Rational) + all_modules_get_options="${all_modules_get_options:+$all_modules_get_options +#line $lineno \"$kf\" + }{ std::vector<SExpr> v; v.push_back(\"$smtname\"); v.push_back(d_holder->$internal); opts.push_back(v); }" + smt_getoption_handlers="${smt_getoption_handlers} #line $lineno \"$kf\" if(key == \"$smtname\") { #line $lineno \"$kf\" return SExpr(options::$internal()); }";; - *) smt_getoption_handlers="${smt_getoption_handlers} + *) + all_modules_get_options="${all_modules_get_options:+$all_modules_get_options +#line $lineno \"$kf\" + }{ std::stringstream ss; ss << d_holder->$internal; std::vector<SExpr> v; v.push_back(\"$smtname\"); v.push_back(ss.str()); opts.push_back(v); }" + smt_getoption_handlers="${smt_getoption_handlers} #line $lineno \"$kf\" if(key == \"$smtname\") { #line $lineno \"$kf\" @@ -1473,7 +1498,9 @@ for var in \ all_modules_defaults \ all_modules_short_options \ all_modules_long_options \ + all_modules_smt_options \ all_modules_option_handlers \ + all_modules_get_options \ include_all_option_headers \ all_modules_contributions \ all_custom_handlers \ |