-
Notifications
You must be signed in to change notification settings - Fork 262
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
Add verification API call #7443
Add verification API call #7443
Conversation
thomasspriggs
commented
Dec 15, 2022
- 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.
Codecov ReportBase: 78.41% // Head: 78.42% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #7443 +/- ##
===========================================
+ Coverage 78.41% 78.42% +0.01%
===========================================
Files 1659 1660 +1
Lines 190382 190387 +5
===========================================
+ Hits 149280 149314 +34
+ Misses 41102 41073 -29
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
This looks good to me as it stands. Should this remain as a draft, or should we get this out of draft and in |
The fix for the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me except for a minor non-blocking comment.
@@ -105,3 +115,47 @@ void api_sessiont::load_model_from_files(const std::vector<std::string> &files) | |||
implementation->model = util_make_unique<goto_modelt>(initialize_goto_model( | |||
files, *implementation->message_handler, *implementation->options)); | |||
} | |||
|
|||
void api_sessiont::verify_model() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️
In my opinion this function is a bit too long and complex to be in an API.
Can it be rewritten moving the logics into goto-checker
or somewhere else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reflects the complexity of the existing internal APIs. There isn't a whole lot we can do without refactoring the rest of the code base, for which would need buy-in to whatever we come up with from more code owners. If its any consolation, this is a lot easier to go through than cbmc_parse_options.cpp
, which is the equivalent for the cbmc
command line binary. A lot of what is in this function is also comments, explaining why the calls are needed in the order they are in.
31aecbf
to
2e817d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that this is a shim to get something off the ground. However, going forward, I'd generally prefer that the API was developed incrementally in a way to replace functionality in cbmc_parse_options instead of duplicating the code... with all the advantages that come with it (having an API user from the beginning and thus more thoughtfulness about the choices made; full testing on all regression tests; no risk of divergence in duplicated code, etc)