diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2013-07-23 16:59:45 -0400 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2013-07-23 20:33:54 -0400 |
commit | f370dbd93ba38f4619a0d63abb8a01e2a8482861 (patch) | |
tree | fbbe5bd9a1d022b6b59ccad7c40d259b66af1500 /src/options/mkoptions | |
parent | 59e1eadaa3c26bdd3f52c6347dd3cfe5ce9051b5 (diff) |
Some fixes for (get-info :all-options)
Diffstat (limited to 'src/options/mkoptions')
-rwxr-xr-x | src/options/mkoptions | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/options/mkoptions b/src/options/mkoptions index bfb35ff26..d856c7293 100755 --- a/src/options/mkoptions +++ b/src/options/mkoptions @@ -675,14 +675,14 @@ template <> options::${internal}__option_t::type runHandlerAndPredicates(options 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); }" + }{ std::vector<SExpr> v; v.push_back(\"$smtname\"); v.push_back(SExpr::Keyword(d_holder->$internal ? \"true\" : \"false\")); 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) + int|unsigned|int*_t|uint*_t|unsigned\ long|long|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); }" @@ -783,6 +783,36 @@ template <> options::${internal}__option_t::type runHandlerAndPredicates(options return; }" fi + elif [ -n "$long_option" -o "$long_option_alternate" ] && [ "$internal" != - ]; then + case "$type" in + bool) + getoption_name="$long_option" + inv= + # case where we have a --disable but no corresponding --enable + if [ -z "$getoption_name" ]; then + getoption_name="$long_option_alternate" + inv='!' + fi + all_modules_get_options="${all_modules_get_options:+$all_modules_get_options +#line $lineno \"$kf\" + }{ std::vector<SExpr> v; v.push_back(\"$getoption_name\"); v.push_back(SExpr::Keyword((${inv}d_holder->$internal) ? \"true\" : \"false\")); opts.push_back(v); }";; + int|unsigned|int*_t|uint*_t|unsigned\ long|long|CVC4::Integer) + all_modules_get_options="${all_modules_get_options:+$all_modules_get_options +#line $lineno \"$kf\" + }{ std::vector<SExpr> v; v.push_back(\"$long_option\"); v.push_back(d_holder->$internal); opts.push_back(v); }";; + float|double) + all_modules_get_options="${all_modules_get_options:+$all_modules_get_options +#line $lineno \"$kf\" + }{ std::vector<SExpr> v; v.push_back(\"$long_option\"); v.push_back(Rational::fromDouble(d_holder->$internal)); opts.push_back(v); }";; + CVC4::Rational) + all_modules_get_options="${all_modules_get_options:+$all_modules_get_options +#line $lineno \"$kf\" + }{ std::vector<SExpr> v; v.push_back(\"$long_option\"); v.push_back(d_holder->$internal); opts.push_back(v); }";; + *) + 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(\"$long_option\"); v.push_back(ss.str()); opts.push_back(v); }";; + esac fi if [ "$type" = bool ]; then |