Skip to content

Commit 40da12b

Browse files
Improve naming of command line options
Drops the 'java' prefix from the most important java command line options. The prefix is not required anymore since JBMC and CBMC do not share the same command line interface anymore.
1 parent aeeaaf7 commit 40da12b

File tree

4 files changed

+39
-15
lines changed

4 files changed

+39
-15
lines changed

jbmc/src/java_bytecode/java_bytecode_language.cpp

+28-8
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,38 @@ void java_bytecode_languaget::get_language_options(const cmdlinet &cmd)
5050
throw_assertion_error = cmd.isset("throw-assertion-error");
5151
threading_support = cmd.isset("java-threading");
5252

53-
if(cmd.isset("java-max-input-array-length"))
54-
object_factory_parameters.max_nondet_array_length=
53+
if(cmd.isset("java-max-input-array-length")) // will go away
54+
{
55+
object_factory_parameters.max_nondet_array_length =
5556
std::stoi(cmd.get_value("java-max-input-array-length"));
56-
if(cmd.isset("java-max-input-tree-depth"))
57-
object_factory_parameters.max_nondet_tree_depth=
57+
}
58+
if(cmd.isset("max-nondet-array-length"))
59+
{
60+
object_factory_parameters.max_nondet_array_length =
61+
std::stoi(cmd.get_value("max-nondet-array-length"));
62+
}
63+
64+
if(cmd.isset("java-max-input-tree-depth")) // will go away
65+
{
66+
object_factory_parameters.max_nondet_tree_depth =
5867
std::stoi(cmd.get_value("java-max-input-tree-depth"));
59-
if(cmd.isset("string-max-input-length"))
60-
object_factory_parameters.max_nondet_string_length=
68+
}
69+
if(cmd.isset("max-nondet-tree-depth"))
70+
{
71+
object_factory_parameters.max_nondet_tree_depth =
72+
std::stoi(cmd.get_value("max-nondet-tree-depth"));
73+
}
74+
75+
if(cmd.isset("string-max-input-length")) // will go away
76+
{
77+
object_factory_parameters.max_nondet_string_length =
6178
std::stoi(cmd.get_value("string-max-input-length"));
62-
else if(cmd.isset("string-max-length"))
79+
}
80+
if(cmd.isset("max-nondet-string-length"))
81+
{
6382
object_factory_parameters.max_nondet_string_length =
64-
std::stoi(cmd.get_value("string-max-length"));
83+
std::stoi(cmd.get_value("max-nondet-string-length"));
84+
}
6585

6686
object_factory_parameters.string_printable = cmd.isset("string-printable");
6787
if(cmd.isset("java-max-vla-length"))

jbmc/src/java_bytecode/java_bytecode_language.h

+8-5
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@ Author: Daniel Kroening, [email protected]
3232
"(throw-assertion-error)" \
3333
"(java-assume-inputs-non-null)" \
3434
"(java-throw-runtime-exceptions)" \
35-
"(java-max-input-array-length):" \
36-
"(java-max-input-tree-depth):" \
35+
"(java-max-input-array-length):" /* will go a away */ \
36+
"(max-nondet-array-length):" \
37+
"(java-max-input-tree-depth):" /* will go a away */ \
38+
"(max-nondet-tree-depth):" \
3739
"(java-max-vla-length):" \
3840
"(java-cp-include-files):" \
41+
"(lazy-methods)" /* will go a away */ \
3942
"(no-lazy-methods)" \
4043
"(lazy-methods-extra-entry-point):" \
4144
"(java-load-class):" \
@@ -50,9 +53,9 @@ Author: Daniel Kroening, [email protected]
5053
" --java-assume-inputs-non-null never initialize reference-typed parameter to the\n" /* NOLINT(*) */ \
5154
" entry point with null\n" /* NOLINT(*) */ \
5255
" --java-throw-runtime-exceptions make implicit runtime exceptions explicit\n" /* NOLINT(*) */ \
53-
" --java-max-input-array-length N limit input array size to <= N\n" /* NOLINT(*) */ \
54-
" --java-max-input-tree-depth N object references are (deterministically) set to null in\n" /* NOLINT(*) */ \
55-
" the object\n" /* NOLINT(*) */ \
56+
" --max-nondet-array-length N limit nondet (e.g. input) array size to <= N\n" /* NOLINT(*) */ \
57+
" --max-nondet-tree-depth N limit size of nondet (e.g. input) object tree;\n" /* NOLINT(*) */ \
58+
" at level N references are set to null\n" /* NOLINT(*) */ \
5659
" --java-max-vla-length limit the length of user-code-created arrays\n" /* NOLINT(*) */ \
5760
" --java-cp-include-files regexp or JSON list of files to load (with '@' prefix)\n" /* NOLINT(*) */ \
5861
" --lazy-methods only translate methods that appear to be reachable from\n" /* NOLINT(*) */ \

jbmc/src/jbmc/jbmc_parse_options.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ void jbmc_parse_optionst::help()
11401140
" --no-refine-strings turn off string refinement\n"
11411141
" --string-printable add constraint that strings are printable (experimental)\n" // NOLINT(*)
11421142
" --string-max-length add constraint on the length of strings\n" // NOLINT(*)
1143-
" --string-max-input-length add constraint on the length of input strings\n" // NOLINT(*)
1143+
" --max-nondet-string-length bound the length of nondet (e.g. input) strings\n" // NOLINT(*)
11441144
" --outfile filename output formula to given file\n"
11451145
" --arrays-uf-never never turn arrays into uninterpreted functions\n" // NOLINT(*)
11461146
" --arrays-uf-always always turn arrays into uninterpreted functions\n" // NOLINT(*)

jbmc/src/jbmc/jbmc_parse_options.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ class optionst;
5959
"(no-refine-strings)" \
6060
"(string-printable)" \
6161
"(string-max-length):" \
62-
"(string-max-input-length):" \
62+
"(string-max-input-length):" /* will go away */ \
63+
"(max-nondet-string-length):" \
6364
"(16)(32)(64)(LP64)(ILP64)(LLP64)(ILP32)(LP32)" \
6465
OPT_SHOW_GOTO_FUNCTIONS \
6566
OPT_SHOW_CLASS_HIERARCHY \

0 commit comments

Comments
 (0)