Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
N/A
Description of changes:
These changes add JML (Java Modeling Language) formal specifications to several files that have been verified using OpenJML (https://github.com/OpenJML/OpenJML). Included also is a README-JML file that gives a summary of the semantics of JML (with a short summary at the top). From the perspective of the Java compiler, JML annotations are all comments, so annotations should not force changes to ordinary code.
The files annotated in this request were meant to be those needed to ensure a specification for KeyBlob could verify. The following is a listing:
All the annotations verify (i.e., the implementation is guaranteed to match the behavior described in the JML specification) using the development version of OpenJML.
Note that this version of KeyBlob.java includes code that addresses the issues identified in #71, so this code will have to be synced to the changes in that PR once it is approved.(Done)Most of the annotations in this PR were supplied by @RustanLeino and @davidcok. We are in the process of annotating and verifying more files that we can submit as PRs later; we would be very interested to know what you think would be the best ways to supply these annotations and the best ways to have them correspond to the intent of the code (and the message format specifications).
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.