-
Notifications
You must be signed in to change notification settings - Fork 273
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
Remove utilities that never got used #2019
Conversation
src/goto-programs/property_checker.h
Outdated
#include "goto_trace.h" | ||
#include "goto_model.h" | ||
|
||
class property_checkert:public messaget |
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 is used by Deltacheck and 2LS.
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.
What is it good for? Would it be possible to contribute documentation? Why does CBMC/JBMC not use it?
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.
Moved to #2212 for separate discussion.
|
||
#include <analyses/interval_domain.h> | ||
|
||
class static_analyzert:public messaget |
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 class should really be removed. I think, however, that it is being used by @smowton?
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.
No, we're using analysis/static_analysis.h
, which is apparently unrelated.
src/util/memory_limit.h
Outdated
\*******************************************************************/ | ||
|
||
#ifndef CPROVER_UTIL_MEMORY_LIMIT_H | ||
#define CPROVER_UTIL_MEMORY_LIMIT_H |
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 is used by TG. We can move it there if you want to remove it from this repo.
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.
The code isn't portable so it might make sense to move it? I don't have very strong feelings about it, but given that the code can't be tested in this repository I'd prefer to move it to a place where it is being tested.
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.
Moved to #2214.
@@ -17,11 +17,9 @@ Author: Daniel Kroening, [email protected] | |||
#include <util/message.h> | |||
#include <util/threeval.h> | |||
|
|||
#include "prop_assignment.h" |
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.
literal.h needs to be included here
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.
Will fix.
@@ -1,35 +0,0 @@ | |||
/*******************************************************************\ |
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 is OK to go
unit/testing-utils/require_expr.cpp
Outdated
|
||
#include "require_expr.h" | ||
|
||
#include <testing-utils/catch.hpp> |
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.
These are used extensively in unit tests for the TG module. I'm happy to migrate these into TG, however for writing unit tests validating exprt
s, they are very useful for keeping tests succinct. If we want to expand unit tests in CBMC I suggest keeping them about.
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.
Actually I had been looking at a not-up-to-date version of the tree: since 2348d10 require_expr.h
is being used here as well, so we're good.
Will create a TG pointer bump to verify the other reverts don't have an effect once you've lmk what you want to do re: |
@tautschnig I can't see any of my commits reverted here, do you know which ones you were thinking of? |
8f05ee7
to
bfd7920
Compare
@tautschnig do you want to to test this with EBMC? I also didn't see one of my commits being reverted. |
@smowton: It looks like |
bfd7920
to
4296099
Compare
@tautschnig aha, we do use |
Does that actually improve the code in some way (readability or some other sort of clarity)? Since I don't know your code, I need your guidance on this. |
Sure, a little -- it's a shorthand for "string b occurs at offset i in string a", like |
4296099
to
41d1de1
Compare
src/util/substitute.h
Outdated
@@ -1,20 +0,0 @@ | |||
/*******************************************************************\ |
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.
substitute is used in TG
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.
Is there a reason not to use std::replace
?
Edit: is TG actually using it for substring replacement?
Edit 2: if this is seriously being used, then at least a more efficient implementation should be built. Repeatedly searching from the beginning isn't optimal.
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.
Yup 6 instances in TG that look like can be easily replaced to std::replace
- will post here once that fix has been applied
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.
Moved to #2214.
src/util/find_macros.h
Outdated
@@ -1,27 +0,0 @@ | |||
/*******************************************************************\ |
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.
find_macros.h
is used in EBMC
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.
Moved to #2213 to receive your separate approval/further discussion.
src/util/get_module.h
Outdated
@@ -1,26 +0,0 @@ | |||
/*******************************************************************\ |
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.
get_module
is used in EBMC
src/util/preprocessor.h
Outdated
@@ -1,43 +0,0 @@ | |||
/*******************************************************************\ |
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.
preprocessor
is used in EBMC
@tautschnig I searched in EBMC for occurrences of files deleted in your PR and found the above. I haven't yet put in the time / work to get EBMC to compile with current CBMC/develop though |
@mgudemann Many thanks for checking. Are there reasons why moving them to EBMC would not be the right thing to do? |
@tautschnig not from my side, could be moved to EBMC
@kroening what is your opinion on this?
…On 11 April 2018 at 17:58, Michael Tautschnig ***@***.***> wrote:
@mgudemann <https://github.com/mgudemann> Many thanks for checking. Are
there reasons why moving them to EBMC would not be the right thing to do?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2019 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACeHTK8cHhiZmh3CPYsVhkqlaY_Xbekgks5tnigjgaJpZM4TLgrx>
.
|
41d1de1
to
bb2794b
Compare
I've found some more unused code, but that requires merging #2128 first (hence this won't build for the moment). |
bb2794b
to
70da03f
Compare
|
@tautschnig I'd say go with removing, we can move the required modules to EBMC |
56823a4
to
48ad4a7
Compare
This reverts commit 3185028. Removing a class that was never used; unit/analyses/ai/ai_simplify_lhs.cpp shows how to do the parsing without any helper.
This reverts commit f29ca0c.
This reverts commit 38642cd.
Partly reverts 055f515.
This interface only has a single implementation.
It has been deprecated (and was no longer being built) in e936c50.
This interface was just used once.
48ad4a7
to
471b20f
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.
Passed Diffblue compatibility checks (cbmc commit: 471b20f).
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.
No objections
e6d196d Merge pull request diffblue#2355 from owen-jones-diffblue/owen-jones-diffblue/add-name-to-array-type 6f7580d Merge pull request diffblue#2351 from romainbrenguier/bugfix/null-array b2089b7 Add unit test for array_poolt 2df6d81 Set name of java array types 50e02b0 Simplify make_char_array_for_char_pointer 645eda9 Improve invariant message 3c7a671 Look up for null pointer in array pool 32a4186 Merge pull request diffblue#2302 from romainbrenguier/refactor/ci-lazy-methods c4aadab Extract handle_virtual_methods_with_no_callees cac016d Extract a convert_and_analyze_method method ca0adc9 Correct indentation 24b6936 Extract entry_point_methods method 360fabe Merge pull request diffblue#2356 from peterschrammel/fix-goto-simplification 4394016 Temporary fix to enable if-then-else simplifications d433438 Test for if-then-else optimisation in goto convert e5d1c12 Merge pull request diffblue#2354 from Degiorgio/disable-soundness-check-for-shared-pointers 7d4d4bd Skip check for unsoundness in shared pointer handling (java only) 8e6244c Merge pull request diffblue#2043 from peterschrammel/fail-on-uncaught-exception ec3010f Merge pull request diffblue#1994 from tautschnig/concurrency-soundness 1a9850a Merge pull request diffblue#2326 from tautschnig/c++-enum b71efaf Merge pull request diffblue#2019 from tautschnig/remove-unused 26b13ae Abort concurrency encoding in possibly unsound cases cd2ef4b Enable throwing of AssertionError 653d887 Remove wrong assumption from goto check 07acde4 Refactor user-defined assertion translation for Java 04c0205 Assert that there is uncaught exception 1daf466 Use resolver to translate cpp_name to scoped base_name 471b20f Remove prop_assignmentt interface 2639cf1 Remove unused solvers/prop/prop_conv_store.{h,cpp} 502687e Remove unused solver/prop/prop_wrapper.h ae56978 Remove unused goto-analyzer/static_analyzer.{h,cpp} 2260f82 Remove path_accelerationt interface d350e5c Remove unused nondet_ifthenelse.{h,cpp} a4936f8 Remove unused cpp/recursion_counter.h 71cfbbd Remove unused sorted_vector.h 4d4c9c6 Revert "added pipe_stream class" 2696420 Revert "new exception class" 3fb06ba Revert "Added utility class to convert strings into expressions" 55bdbc7 Recompile regression test class files 118f41f Merge pull request diffblue#2352 from tautschnig/c++-auto-tc 5a4dc8d Merge pull request diffblue#2315 from diffblue/fix-goto 199d4cc prevent half-constructed GOTO instructions 72156d5 C++ front-end: fix auto+references after already-typechecked cleanup 8fac5ed Merge pull request diffblue#2069 from romainbrenguier/refactor/convert_instruction 309d207 remove conversion for non-deterministic-goto 67081d5 Extract convert_pop function cd98a1f Extract convert_switch function f2acb00 Extract convert_dup2_x2 function 66cf709 Extract convert_dup2_x1 function e0735af Extract convert_dup2 function 51f53ca Extract convert_const function d627638 Extract convert_invoke function fcfca08 Extract replace_calls_to_cprover_assume function 0a521a4 Extract convert_checkcast function 4c28f99 Extract convert_athrow function 21e37a8 Extract convert_monitorexit function a7bbf53 Extract do_exception_handling function 0aa1c8e Extract convert_monitorenter function 48dd97f Extract convert_multianewarray function edc4a28 Extract convert_newarray function f8d00f6 Extract convert_new function b846798 Extract convert_putstatic function 27af4a2 Extract convert_putfield function f1edff9 Extract convert_getstatic function 68bddf1 Remove redundant assert 6f0f3fb Extract convert_cmp2 function 3049281 Extract convert_cmp function 5a5788c Extract convert_ushr function 305ede8 Extract convert_iinc function 61d03da Extract convert_ifnull function b4f6d04 Extract convert_if_nonull function 0e911d4 Extract convert_if function 651246e Extract convert_if_cmp function fc95df1 Extract convert_ret function ce58dca Extract convert_aload/store/astore functions 14e3c35 Extract convert_invokedynamic function 939bb53 Rename iterators and use auto ddb31a0 Extract draw_edges_from_ret_to_jsr function 390063f Extract try_catch_handler function 87a4f31 Make label static 36ed947 Replace assert by invariant 036f1b1 Use auto for iterator types git-subtree-dir: cbmc git-subtree-split: e6d196d
Where possible, commits introducing them were reverted. Other utilities came into existence even before moving to SVN/git.
Some of this code may be used outside the code base - pinging @kroening and @mgudemann for EBMC, @thk123, @smowton, @peterschrammel as your commits got reverted.