Skip to content
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

[CONTRACTS] Support for Kani Loop Contracts #8260

Closed

Conversation

qinheping
Copy link
Collaborator

This PR add support for Kani loop contracts introduced in model-checking/kani#3151. It adds

  1. a new flag to goto-instrument to enable kani loop contracts.
  2. new instrumentation rules for loop contracts annotated by Kani.
  3. and helper functions to extract loop contracts from goto model generated by Kani.

As this feature is specified to GOTO generated by Kani, it is not clear to me how to test it along without Kani.

  • 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.

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Attention: Patch coverage is 20.58824% with 81 lines in your changes are missing coverage. Please review.

Project coverage is 78.25%. Comparing base (03f604e) to head (af195ba).
Report is 11 commits behind head on develop.

Files Patch % Lines
src/goto-instrument/contracts/utils_kani.cpp 0.00% 57 Missing ⚠️
src/goto-instrument/contracts/contracts.cpp 34.28% 23 Missing ⚠️
.../goto-instrument/goto_instrument_parse_options.cpp 90.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8260      +/-   ##
===========================================
- Coverage    79.66%   78.25%   -1.42%     
===========================================
  Files         1683     1721      +38     
  Lines       195713   188315    -7398     
  Branches         0    18484   +18484     
===========================================
- Hits        155913   147361    -8552     
- Misses       39800    40954    +1154     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@qinheping qinheping marked this pull request as draft April 24, 2024 04:41
@tautschnig
Copy link
Collaborator

As discussed out-of-band: we need to find a way to fully do this in Kani.

@qinheping qinheping closed this May 9, 2024
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.

2 participants