Skip to content

Commit 72be726

Browse files
author
svorenova
committed
Add a constant for the default max-nondet-string-length
1 parent 1e821fd commit 72be726

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/solvers/strings/string_refinement.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Author: Alberto Griggio, [email protected]
4646
" the switch can be used multiple times to give\n" /* NOLINT(*) */ \
4747
" several strings\n" /* NOLINT(*) */ \
4848
" --max-nondet-string-length n bound the length of nondet (e.g. input) strings;\n" /* NOLINT(*) */ \
49-
" set to 10000 by default\n" /* NOLINT(*) */
49+
" set to " + std::to_string(MAX_NONDET_STRING_LENGTH_DEFAULT) + " by default\n" /* NOLINT(*) */
5050

5151
// The integration of the string solver into CBMC is incomplete. Therefore,
5252
// it is not turned on by default and not all options are available.

src/util/magic.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ const std::size_t MAX_CONCRETE_STRING_SIZE = 1 << 26;
1616
// The top end of the range of integers for which dstrings are precomputed
1717
constexpr std::size_t DSTRING_NUMBERS_MAX = 64;
1818

19+
const int MAX_NONDET_STRING_LENGTH_DEFAULT = 10000;
20+
1921
#endif

src/util/object_factory_parameters.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ void parse_object_factory_options(const cmdlinet &cmdline, optionst &options)
7676
}
7777
else if(!cmdline.isset("no-refine-strings"))
7878
{
79-
options.set_option("max-nondet-string-length", 10000);
79+
options.set_option(
80+
"max-nondet-string-length", MAX_NONDET_STRING_LENGTH_DEFAULT);
8081
}
8182
if(cmdline.isset("string-printable"))
8283
{

0 commit comments

Comments
 (0)