Skip to content

Commit d7cfcfd

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 7f5589c commit d7cfcfd

File tree

4 files changed

+25
-13
lines changed

4 files changed

+25
-13
lines changed

jbmc/src/java_bytecode/java_bytecode_language.cpp

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,26 @@ 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"))
53+
if(cmd.isset("java-max-input-array-length")) // will go away
5454
object_factory_parameters.max_nondet_array_length=
5555
std::stoi(cmd.get_value("java-max-input-array-length"));
56-
if(cmd.isset("java-max-input-tree-depth"))
56+
if(cmd.isset("max-nondet-array-length"))
57+
object_factory_parameters.max_nondet_array_length=
58+
std::stoi(cmd.get_value("max-nondet-array-length"));
59+
60+
if(cmd.isset("java-max-input-tree-depth")) // will go away
5761
object_factory_parameters.max_nondet_tree_depth=
5862
std::stoi(cmd.get_value("java-max-input-tree-depth"));
59-
if(cmd.isset("string-max-input-length"))
63+
if(cmd.isset("max-nondet-tree-depth"))
64+
object_factory_parameters.max_nondet_tree_depth=
65+
std::stoi(cmd.get_value("max-nondet-tree-depth"));
66+
67+
if(cmd.isset("string-max-input-length")) // will go away
6068
object_factory_parameters.max_nondet_string_length=
6169
std::stoi(cmd.get_value("string-max-input-length"));
62-
else if(cmd.isset("string-max-length"))
63-
object_factory_parameters.max_nondet_string_length =
64-
std::stoi(cmd.get_value("string-max-length"));
70+
if(cmd.isset("max-nondet-string-length"))
71+
object_factory_parameters.max_nondet_string_length=
72+
std::stoi(cmd.get_value("max-nondet-string-length"));
6573

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

jbmc/src/java_bytecode/java_bytecode_language.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@ Author: Daniel Kroening, kroening@kroening.com
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, kroening@kroening.com
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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)