-
Notifications
You must be signed in to change notification settings - Fork 0
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
[FEATURE] Coverage measurements from CN #93
Comments
@septract does this sound sensible? |
We may also want to know which functions have been checked by name. It is possible to use the spec of a function in a header file but not check the function body in another file against that spec, and we'd like to know that this hasn't happened. |
Yes, this seems like a useful set of measures. We might also measure the coverage of the specifications themselves. Eg. we can give any function a specification with a false precondition, because this indicates the code cannot be called. But there are more subtle 'bad' specifications which exclude important cases. This doesn't matter too much for sub-functions, because the specification will be checked at the callsite. So for example, a false precondition will mean a specification cannot be used. But it becomes very important for top-level specifications where the specification itself is not checked. In this case, a specification may be both true, and allow the function to behave improperly. This is the same as saying the specification does not model the environment properly. There's a related question whether the post-condition for a top-level specification establishes all the properties that the environment relies on. Eg. the post-condition might only establish True, but perhaps the environment relies on it returning a particular value. |
A couple of related notions:
|
A technique for performing path coverage for a specification would be to use the property-based testing mechanism (once it exists). Then you would use a standard test coverage measure. |
@thatplguy this is relevant to the discussion with Jim - what is a good next step towards such measurements? Is this something that CN should do, or some other tool that uses CN should provide? |
Related: #61 |
Summary
When using CN on a large(r) project (such as OpenSUT), measuring code coverage is important. The following metrics should be useful:
ifdef
or some other directive, excluding the code from being examined)Acceptance Criteria
The text was updated successfully, but these errors were encountered: