Skip to content

Commit 0475e56

Browse files
authored
Merge pull request #3326 from tautschnig/vs-bounded
Do not use arbitrarily bounded integer types [blocks: #2310]
2 parents bafbb51 + c32a775 commit 0475e56

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

scripts/expected_doxygen_warnings.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@
2424
parameter 'witnesses'
2525
/cbmc/src/solvers/refinement/string_refinement.cpp:1052: warning: The following parameters of substitute_array_access(const with_exprt &expr, const exprt &index, const bool left_propagate) are not documented:
2626
parameter 'left_propagate'
27-
/cbmc/src/util/nondet.cpp:35: warning: The following parameters of generate_nondet_int(const int64_t min_value, const int64_t max_value, const std::string &name_prefix, const typet &int_type, const irep_idt &mode, const source_locationt &source_location, symbol_table_baset &symbol_table, code_blockt &instructions) are not documented:
28-
parameter 'mode'
29-
/cbmc/src/util/nondet.cpp:85: warning: The following parameters of generate_nondet_switch(const irep_idt &name_prefix, const alternate_casest &switch_cases, const typet &int_type, const irep_idt &mode, const source_locationt &source_location, symbol_table_baset &symbol_table) are not documented:
30-
parameter 'mode'
31-
/cbmc/src/util/nondet.h:16: warning: The following parameters of generate_nondet_int(const int64_t min_value, const int64_t max_value, const std::string &name_prefix, const typet &int_type, const irep_idt &mode, const source_locationt &source_location, symbol_table_baset &symbol_table, code_blockt &instructions) are not documented:
32-
parameter 'mode'
33-
/cbmc/src/util/nondet.h:28: warning: The following parameters of generate_nondet_switch(const irep_idt &name_prefix, const alternate_casest &switch_cases, const typet &int_type, const irep_idt &mode, const source_locationt &source_location, symbol_table_baset &symbol_table) are not documented:
34-
parameter 'mode'
3527
/cbmc/doc/architectural/howto.md:260: warning: found </div> at different nesting level (6) than expected (3)
3628
/cbmc/doc/architectural/howto.md:261: warning: end of comment block while expecting command </div>
3729
/cbmc/src/solvers/README.md:4: warning: @copydetails or @copydoc target 'generate_instantiations(messaget::mstreamt &stream, const string_constraint_generatort &generator, const index_set_pairt &index_set, const string_axiomst &axioms, const std::map<string_not_contains_constraintt, symbol_exprt> &not_contain_witnesses).' not found

src/util/nondet.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,16 @@ Module: Non-deterministic object init and choice for CBMC
2626
/// function id)
2727
/// \param int_type: The type of the int used to non-deterministically choose
2828
/// one of the switch cases.
29+
/// \param mode: Mode (language) of the symbol to be generated.
2930
/// \param source_location: The location to mark the generated int with.
3031
/// \param symbol_table: The global symbol table.
3132
/// \param instructions [out]: Output instructions are written to
3233
/// 'instructions'. These declare, nondet-initialise and range-constrain (with
3334
/// assume statements) a fresh integer.
3435
/// \return Returns a symbol expression for the resulting integer.
3536
symbol_exprt generate_nondet_int(
36-
const int64_t min_value,
37-
const int64_t max_value,
37+
const mp_integer &min_value,
38+
const mp_integer &max_value,
3839
const std::string &name_prefix,
3940
const typet &int_type,
4041
const irep_idt &mode,
@@ -78,6 +79,7 @@ symbol_exprt generate_nondet_int(
7879
/// \param switch_cases: List of codet objects to execute in each switch case.
7980
/// \param int_type: The type of the int used to non-deterministically choose
8081
/// one of the switch cases.
82+
/// \param mode: Mode (language) of the symbol to be generated.
8183
/// \param source_location: The location to mark the generated int with.
8284
/// \param symbol_table: The global symbol table.
8385
/// \return Returns a nondet-switch choosing between switch_cases. The resulting

src/util/nondet.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#include <util/symbol_table.h>
1515

1616
symbol_exprt generate_nondet_int(
17-
int64_t min_value,
18-
int64_t max_value,
17+
const mp_integer &min_value,
18+
const mp_integer &max_value,
1919
const std::string &name_prefix,
2020
const typet &int_type,
2121
const irep_idt &mode,

0 commit comments

Comments
 (0)