Skip to content

Commit d3a2d2d

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 fb61109 commit d3a2d2d

File tree

4 files changed

+38
-15
lines changed

4 files changed

+38
-15
lines changed

jbmc/src/java_bytecode/java_bytecode_language.cpp

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

54-
if(cmd.isset("java-max-input-array-length"))
55-
object_factory_parameters.max_nondet_array_length=
54+
if(cmd.isset("java-max-input-array-length")) // will go away
55+
{
56+
object_factory_parameters.max_nondet_array_length =
5657
std::stoi(cmd.get_value("java-max-input-array-length"));
57-
if(cmd.isset("java-max-input-tree-depth"))
58-
object_factory_parameters.max_nondet_tree_depth=
58+
}
59+
if(cmd.isset("max-nondet-array-length"))
60+
{
61+
object_factory_parameters.max_nondet_array_length =
62+
std::stoi(cmd.get_value("max-nondet-array-length"));
63+
}
64+
65+
if(cmd.isset("java-max-input-tree-depth")) // will go away
66+
{
67+
object_factory_parameters.max_nondet_tree_depth =
5968
std::stoi(cmd.get_value("java-max-input-tree-depth"));
60-
if(cmd.isset("string-max-input-length"))
61-
object_factory_parameters.max_nondet_string_length=
69+
}
70+
if(cmd.isset("max-nondet-tree-depth"))
71+
{
72+
object_factory_parameters.max_nondet_tree_depth =
73+
std::stoi(cmd.get_value("max-nondet-tree-depth"));
74+
}
75+
76+
if(cmd.isset("string-max-input-length")) // will go away
77+
{
78+
object_factory_parameters.max_nondet_string_length =
6279
std::stoi(cmd.get_value("string-max-input-length"));
63-
else if(cmd.isset("string-max-length"))
80+
}
81+
if(cmd.isset("max-nondet-string-length"))
82+
{
6483
object_factory_parameters.max_nondet_string_length =
65-
std::stoi(cmd.get_value("string-max-length"));
84+
std::stoi(cmd.get_value("max-nondet-string-length"));
85+
}
6686

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

jbmc/src/java_bytecode/java_bytecode_language.h

+7-5
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ 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 away */ \
36+
"(max-nondet-array-length):" \
37+
"(java-max-input-tree-depth):" /* will go away */ \
38+
"(max-nondet-tree-depth):" \
3739
"(java-max-vla-length):" \
3840
"(java-cp-include-files):" \
3941
"(lazy-methods)" /* will go away */ \
@@ -51,9 +53,9 @@ Author: Daniel Kroening, [email protected]
5153
" --java-assume-inputs-non-null never initialize reference-typed parameter to the\n" /* NOLINT(*) */ \
5254
" entry point with null\n" /* NOLINT(*) */ \
5355
" --java-throw-runtime-exceptions make implicit runtime exceptions explicit\n" /* NOLINT(*) */ \
54-
" --java-max-input-array-length N limit input array size to <= N\n" /* NOLINT(*) */ \
55-
" --java-max-input-tree-depth N object references are (deterministically) set to null in\n" /* NOLINT(*) */ \
56-
" 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(*) */ \
5759
" --java-max-vla-length limit the length of user-code-created arrays\n" /* NOLINT(*) */ \
5860
" --java-cp-include-files regexp or JSON list of files to load (with '@' prefix)\n" /* NOLINT(*) */ \
5961
" --no-lazy-methods load and translate all methods given on the command line\n" /* NOLINT(*) */ \

jbmc/src/jbmc/jbmc_parse_options.cpp

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