Skip to content

Improve documentation in gen_nondet_array_init #3868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions jbmc/src/java_bytecode/java_object_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@ void java_object_factoryt::gen_nondet_array_init(

if(element_type.id() == ID_pointer || element_type.id() == ID_c_bool)
{
// For arrays of non-primitive types, nondeterministically initialize each
// For arrays of non-primitive type, nondeterministically initialize each
// element of the array
array_loop_init_code(
assignments,
Expand All @@ -1440,10 +1440,10 @@ void java_object_factoryt::gen_nondet_array_init(
}
else
{
// Arrays of primitive types can be initialized with a single instruction
// We don't do this for arrays of Booleans, because Bools are represented
// as bytes, so each cell must be initialized in a particular way (see
// gen_nondet_init).
// Arrays of primitive type can be initialized with a single instruction.
// We don't do this for arrays of primitive booleans, because booleans are
// represented as unsigned bytes, so each cell must be initialized as
// 0 or 1 (see gen_nondet_init).
array_primitive_init_code(
assignments,
init_array_expr,
Expand Down