Skip to content

Commit 3b724a8

Browse files
authored
Merge pull request #3092 from smowton/smowton/doc/convert-java-nondet
Improve documentation of convert_java_nondet
2 parents 78fe3e7 + 025016a commit 3b724a8

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

jbmc/src/java_bytecode/convert_java_nondet.h

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Author: Reuben Thomas, [email protected]
77
\*******************************************************************/
88

99
/// \file
10-
/// Convert side_effect_expr_nondett expressions
10+
/// Convert side_effect_expr_nondett expressions using java_object_factory
1111

1212
#ifndef CPROVER_JAVA_BYTECODE_CONVERT_NONDET_H
1313
#define CPROVER_JAVA_BYTECODE_CONVERT_NONDET_H
@@ -22,30 +22,45 @@ class goto_model_functiont;
2222
class message_handlert;
2323
struct object_factory_parameterst;
2424

25-
/// Replace calls to nondet library functions with an internal nondet
26-
/// representation.
25+
/// Converts side_effect_exprt_nondett expressions using java_object_factory.
26+
/// For example, NONDET(SomeClass *) may become a nondet choice between a null
27+
/// pointer and a fresh instance of SomeClass, whose fields are in turn nondet
28+
/// initialized in the same way. See \ref java_object_factory.h for details.
29+
///
30+
/// Note the code introduced has been freshly `goto_convert`'d without any
31+
/// passes such as \ref remove_java_new being run. Therefore the caller may need
32+
/// to (re-)run this and other expected GOTO transformations after this pass
33+
/// completes.
2734
/// \param goto_functions: The set of goto programs to modify.
2835
/// \param symbol_table: The symbol table to query/update.
2936
/// \param message_handler: For error logging.
3037
/// \param object_factory_parameters: Parameters for the generation of nondet
3138
/// objects.
3239
void convert_nondet(
33-
goto_functionst &,
34-
symbol_table_baset &,
35-
message_handlert &,
40+
goto_functionst &goto_functions,
41+
symbol_table_baset &symbol_table,
42+
message_handlert &message_handler,
3643
const object_factory_parameterst &object_factory_parameters);
3744

3845
void convert_nondet(
3946
goto_modelt &,
4047
message_handlert &,
4148
const object_factory_parameterst &object_factory_parameters);
4249

43-
/// Replace calls to nondet library functions with an internal nondet
44-
/// representation.
50+
/// Converts side_effect_exprt_nondett expressions using java_object_factory.
51+
/// For example, NONDET(SomeClass *) may become a nondet choice between a null
52+
/// pointer and a fresh instance of SomeClass, whose fields are in turn nondet
53+
/// initialized in the same way. See \ref java_object_factory.h for details.
54+
///
55+
/// Note the code introduced has been freshly `goto_convert`'d without any
56+
/// passes such as \ref remove_java_new being run. Therefore the caller may need
57+
/// to (re-)run this and other expected GOTO transformations after this pass
58+
/// completes.
4559
/// \param function: goto program to modify
4660
/// \param message_handler: For error logging.
4761
/// \param object_factory_parameters: Parameters for the generation of nondet
4862
/// objects.
63+
/// \param mode: Mode for newly created symbols
4964
void convert_nondet(
5065
goto_model_functiont &function,
5166
message_handlert &message_handler,

0 commit comments

Comments
 (0)