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

Proton tool info module proton.py #952

Merged
merged 9 commits into from
Nov 3, 2023
Merged

Conversation

rmetta
Copy link
Contributor

@rmetta rmetta commented Nov 2, 2023

Rewrote the Proton tool info module, based on the feedback from Philipp Wendler.

Proton tool info module.
@rmetta
Copy link
Contributor Author

rmetta commented Nov 2, 2023

We have updated the proton.py by fixing the error in "Check code format".

benchexec/tools/proton.py Outdated Show resolved Hide resolved
benchexec/tools/proton.py Outdated Show resolved Hide resolved
benchexec/tools/proton.py Outdated Show resolved Hide resolved
benchexec/tools/proton.py Outdated Show resolved Hide resolved
else:
status = result.RESULT_ERROR

return status
Copy link
Member

Choose a reason for hiding this comment

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

Why not have a return everywhere instead of the status variable? Seems easier to follow that way.

Copy link
Member

Choose a reason for hiding this comment

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

Seems this was overlooked?

benchexec/tools/proton.py Outdated Show resolved Hide resolved
Proton tool info module,  incorporating most of Philipp Wendler comments. We only dodn't do replacing assignments to status with returns (as we find this to be a better)
benchexec/tools/proton.py Outdated Show resolved Hide resolved
benchexec/tools/proton.py Outdated Show resolved Hide resolved
The URL provided : https://github.com/kumarmadhukar/term : is currently private. We have plenty of errors to weed out in this initial version of Proton code. Once this is done, we will make the tool available at the above website.
@rmetta rmetta requested a review from PhilippWendler November 2, 2023 13:23
Made the error codes in sync with Proton's error codes and strings, to address Philipp Wendler's review comments, with many thanks.
@rmetta
Copy link
Contributor Author

rmetta commented Nov 2, 2023 via email

Fixed inconsistent usage of result_str and output (pointed out by Philipp Wendler in his review).
@rmetta
Copy link
Contributor Author

rmetta commented Nov 2, 2023 via email

@PhilippWendler
Copy link
Member

Ok, but your comment seems to indicate that INCONCLUSIVE is really used as a kind of "result not known" and the code should return RESULT_UNKNOWN, right?

Although, do you think that you will fulfill conditions like run.exit_code.value == 64 and "Usage error!" in output in future versions of Proton? If not, please remove them.

Given all this back and forth and the fact that it now does not look at all anymore like CBMC's output: Is checking for the exit code still relevant?

@rmetta
Copy link
Contributor Author

rmetta commented Nov 2, 2023 via email

@PhilippWendler
Copy link
Member

Thanks for the explanation! Then indeed having INCONCLUSIVE as a result of category "error" makes sense.

The new code is also much easier to understand.

@PhilippWendler PhilippWendler merged commit 61233a6 into sosy-lab:main Nov 3, 2023
3 checks passed
@rmetta
Copy link
Contributor Author

rmetta commented Nov 3, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants