Conversation
tautschnig
left a comment
There was a problem hiding this comment.
I think this is great cleanup work, though it may be better to do some of this in several small PRs for work not to be held up in case some of it turns out to be controversial.
|
|
||
| #include "type.h" | ||
| #include "std_types.h" | ||
| #include "namespace.h" |
There was a problem hiding this comment.
I think (and this would make me rather happy) std_types.h could go as well? That finally resolves a dependency that should not have existed in the first place...
| #include <set> | ||
| #include <unordered_set> | ||
| #include <util/symbol_table.h> | ||
| #include <util/namespace.h> |
There was a problem hiding this comment.
Nit pick: please sort lexicographically.
| #include "string2int.h" | ||
| #include "arith_tools.h" | ||
| #include "std_expr.h" | ||
| #include "namespace.h" |
There was a problem hiding this comment.
As above: please sort lexicographically, likely making a slightly bigger change than necessary (sort all of them).
| #include "std_types.h" | ||
| #include "expr_cast.h" | ||
|
|
||
| #include "mathematical_types.h" |
There was a problem hiding this comment.
Nit pick: maintain/establish lexicographic sorting
src/util/c_types.h
Outdated
| #define CPROVER_UTIL_C_TYPES_H | ||
|
|
||
| #include "std_types.h" | ||
| #include "mathematical_types.h" |
There was a problem hiding this comment.
I guess that's really just for complex_typet? Maybe keep that in std_types.h?
There was a problem hiding this comment.
It's a mathematical type so if we're moving some of them into a separate file, it only makes sense if we really move all of them. Is there any particular reason why this stands out for you?
There was a problem hiding this comment.
I thought it was the one that's actually used by C/C++ front-ends, but maybe it's not even the only one.
There was a problem hiding this comment.
You are right, there is std::complex type, moving back to std_types.
f1a227f to
6fee370
Compare
|
@tautschnig We only had one day booked for doc changes and I'm already out of time :) I'll make sure those issues are put on the next doc day to-do list. |
6fee370 to
5b701e2
Compare
|
I've split out two of the changes into separate PRs: |
3a53602 to
3a29698
Compare
I know, I'm greedy :-) Thanks a lot for all the work! |
3a29698 to
08d7b44
Compare
|
Test-gen pointer bump: https://github.com/diffblue/test-gen/pull/2192 |
|
I find the can_cast_type<symbol_typet>(type1) idiom to be hard to read, and it doesn't add value beyond the one-off. We should not do that. |
|
Yes, the comment in guidelines was exactly my motivation to add missing cast checks. |
|
There is a failing test on the test-gen pointer bump, I will investigate it later. Until then I added |
|
@tautschnig Yes; I understand the motivation for can_cast. However, I'd still like to stick to the if(x.id() ==ID_Z) idiom. In particular, we can then eventually do switch(x.id()). |
08d7b44 to
3ced6c7
Compare
|
@kroening Introducing |
allredj
left a comment
There was a problem hiding this comment.
This PR failed Diffblue compatibility checks (cbmc commit: 3ced6c7).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/84437357
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
allredj
left a comment
There was a problem hiding this comment.
Passed Diffblue compatibility checks (cbmc commit: 3ced6c7).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/84452470
3ced6c7 to
1a28613
Compare
allredj
left a comment
There was a problem hiding this comment.
Passed Diffblue compatibility checks (cbmc commit: 1a28613).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/84984878
This is a follow-up PR to #2771 (it is based on top of it so please ignore the
Add documentationcommits until it's merged and rebased).