Skip to content

Conversation

antlechner
Copy link
Contributor

This check appears twice in the object factory, and it will also appear in some new code soon, so it makes sense to move it to a util file.

  • 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.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • n/a 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).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • n/a My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Copy link
Contributor

@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: 625b803).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/107787207

@@ -29,6 +30,15 @@ bool java_is_array_type(const typet &type)
return is_java_array_tag(to_struct_type(type).get_tag());
}

bool is_java_string_type(const struct_typet &struct_type)
{
return struct_type.id() == ID_struct &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Necessarily true of a struct_typet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting, I assumed it wasn't because of the
PRECONDITION(struct_type.id()==ID_struct);
in gen_nondet_struct_init in the object factory. I removed the equality check that you commented on, and in a new commit I also removed the precondition from the object factory.

Copy link
Contributor

Choose a reason for hiding this comment

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

That is indeed also redundant (I'm guessing it used to take a typet)

@antlechner antlechner force-pushed the antonia/refactor-is-string-type branch from 625b803 to 824b113 Compare April 10, 2019 12:58
Copy link
Contributor

@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: 824b113).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/107803256

@antlechner antlechner force-pushed the antonia/refactor-is-string-type branch from 824b113 to 448ce68 Compare April 10, 2019 18:04
Copy link
Contributor

@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: 448ce68).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/107852500

@antlechner antlechner force-pushed the antonia/refactor-is-string-type branch from 448ce68 to 8f1b743 Compare April 10, 2019 19:06
Copy link
Contributor

@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: 8f1b743).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/107860266

This check appears twice in the object factory, and it will also appear
in some new code soon, so it makes sense to move it to a util file.
The id() of struct_typets is always ID_struct.
@antlechner antlechner force-pushed the antonia/refactor-is-string-type branch from 8f1b743 to a6a0bec Compare April 11, 2019 10:02
Copy link
Contributor

@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: a6a0bec).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/107944535

@antlechner antlechner merged commit 1622bf8 into diffblue:develop Apr 11, 2019
@antlechner antlechner deleted the antonia/refactor-is-string-type branch April 11, 2019 12:18
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.

4 participants