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

Conversation

allredj
Copy link
Contributor

@allredj allredj commented Jan 21, 2019

Remove ambiguity between primitive boolean and Boolean objects.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@allredj
Copy link
Contributor Author

allredj commented Jan 21, 2019

As suggested here: #3827

Copy link
Contributor Author

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️
Passed Diffblue compatibility checks (cbmc commit: 06c0d34).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/98028295

// 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 boolean, because the latter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because they are... (the latter only makes sense when we have just referred to a pair of things ("we deal with apples and oranges, the latter being a citrus fruit..."))

// gen_nondet_init).
// Arrays of primitive type can be initialized with a single instruction.
// We don't do this for arrays of primitive boolean, because the latter
// are represented as bytes, so each cell must be initialized in a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"as an unsigned byte", to make clear it's one byte per cell?

// Arrays of primitive type can be initialized with a single instruction.
// We don't do this for arrays of primitive boolean, because the latter
// are represented as bytes, so each cell must be initialized in a
// particular way (see gen_nondet_init).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well be clear they have to be 0 or 1, not a general nondet

@allredj allredj force-pushed the typo-nondet-bool-array branch from 06c0d34 to d6e233b Compare January 21, 2019 15:28
@allredj
Copy link
Contributor Author

allredj commented Jan 21, 2019

@smowton Thanks. updated.

Remove ambiguity between primitive boolean and Boolean objects.
@allredj allredj force-pushed the typo-nondet-bool-array branch from d6e233b to aeef996 Compare January 21, 2019 15:30
Copy link
Contributor Author

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️
Passed Diffblue compatibility checks (cbmc commit: aeef996).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/98062044

@allredj allredj merged commit dda09d1 into diffblue:develop Jan 21, 2019
@allredj allredj deleted the typo-nondet-bool-array branch January 21, 2019 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants