-
Notifications
You must be signed in to change notification settings - Fork 265
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: class to instrument a single loop #7672
CONTRACTS: class to instrument a single loop #7672
Conversation
73d5de2
to
a9edbb0
Compare
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## develop #7672 +/- ##
===========================================
+ Coverage 78.44% 78.50% +0.06%
===========================================
Files 1674 1674
Lines 191946 191954 +8
===========================================
+ Hits 150567 150698 +131
+ Misses 41379 41256 -123
☔ View full report in Codecov by Sentry. |
08dfebc
to
6143154
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.
Some preliminary comments, more reviewing to be done.
const auto old_decreases_var = | ||
new_tmp_symbol(clause.type(), head_location, language_mode, symbol_table) | ||
.symbol_expr(); | ||
old_decreases_vars.push_back(old_decreases_var); | ||
// new | ||
const auto new_decreases_var = |
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 don't think the names of those temporaries add a lot of value, could you please just do old_decreases_vars.push_back(new_tmp_symbol...
and new_decreases_vars.push_back(new_tmp_symbol...
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.
proper naming helps a lot for debugging
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
6143154
to
102584b
Compare
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.h
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.h
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
d08a0e7
to
9a0c7d8
Compare
9a0c7d8
to
a1f4292
Compare
a1f4292
to
78354e5
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.
Just some minor suggestions.
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument_loop.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Qinheping Hu <qinhh@amazon.com>"
78354e5
to
c9f2932
Compare
The first commit is from #7671, do not review.
The second commit adds a class that applies loop contract transformation to a single loop in a goto program.
The PR is extracted from the larger PR #7541 and will be tested once all features have been merged.