Skip to content

Add brief documentation of overlay classes #2947

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

Conversation

owen-mc-diffblue
Copy link
Contributor

It could be expanded in future, but it's better than what was there
before

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: 25fb9be).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/84714306

/// its list of annotations.
///
/// An overlay class is a class with the annotation
/// \@OverlayClassImplementation. They serve the following purpose. When the JVM
Copy link
Contributor

Choose a reason for hiding this comment

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

There should also be some documentation for the other two annotations (IgnoredMethodImplementation and OverlayMethodImplementation). Could you add a TODO for these here or wherever would be a good place to document them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added documentation for them

/// `ID_overlay_method` in its list of annotations.
///
/// An overlay method is a method with the annotation
/// \@OverlayMethodImplementation. They should only appear in
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Thanks for explaining this, I wasn't sure if @OverlayClassImplementation automatically turned all methods into overlay methods, of if within an overlay class methods could still be declared to be overlay methods or not.

/// An overlay method is a method with the annotation
/// \@OverlayMethodImplementation. They should only appear in
/// [overlay classes](\ref java_class_loader.cpp::is_overlay_class). They
/// will be loaded by JBMC instead of the corresponding method in the
Copy link
Contributor

Choose a reason for hiding this comment

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

🐝 Could you explain what "the corresponding method" is (i.e. method with the same signature in a class of the same name that was loaded before)?

/// [overlay classes](\ref java_class_loader.cpp::is_overlay_class), in
/// particular for methods which must exist in the overlay class so that
/// it will compile, e.g. default constructors, but which we do not want
/// to overlay the corresponding method in the
Copy link
Contributor

Choose a reason for hiding this comment

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

🐝

@owen-mc-diffblue
Copy link
Contributor Author

I've improved the documentation and also added a test for ignored methods. I've done it in the context of an overlay class, although they do not need to be used in that context, because that is what they were created for.

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

Copy link
Contributor

@NathanJPhillips NathanJPhillips left a comment

Choose a reason for hiding this comment

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

At least one typo

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.

This PR failed Diffblue compatibility checks (cbmc commit: 3a2a898).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/84832959
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.

Common spurious failures:

  • the cbmc commit has disappeared in the mean time (e.g. in a force-push)
  • the author is not in the list of contributors (e.g. first-time contributors).

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

@owen-mc-diffblue owen-mc-diffblue merged commit 56b7266 into diffblue:develop Sep 14, 2018
@owen-mc-diffblue owen-mc-diffblue deleted the doc/overlay-classes branch September 14, 2018 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants