Conversation
|
|
||
| virtual void output(std::ostream &out) const = 0; | ||
| virtual void output( | ||
| const irep_idt &class_name, |
There was a problem hiding this comment.
This seems like something the methodt should store rather than something every user has to pass to output()?
There was a problem hiding this comment.
No, this would be an antipattern; its not unusual to require context for output, say think of indentation.
There was a problem hiding this comment.
I think it is reasonable to pass this in, I also think it is reasonable for the method to know what class it belongs to FWIW.
|
|
||
| bool is_constructor() const | ||
| { | ||
| return base_name=="<init>"; |
There was a problem hiding this comment.
Nooo - this re-duplicates the check that <init> is the name of constructors that I've painstakingly removed once! Either leave as is of remove the is_constructor in java_bytecode_convert_method
There was a problem hiding this comment.
I think that is_constructor in java_bytecode_convert_method can be entirely removed. I'd replace the call in java_bytecode_convert_method.cpp:381 to use this new method. The other two uses java_bytecode_convert_method.cpp:575 and 1327 can be replaced by type.get_is_constructor().
thk123
left a comment
There was a problem hiding this comment.
Aside from previous review this looks OK. It would be good to have a test demonstrating this new behaviour.
|
|
||
| virtual void output(std::ostream &out) const = 0; | ||
| virtual void output( | ||
| const irep_idt &class_name, |
There was a problem hiding this comment.
I think it is reasonable to pass this in, I also think it is reasonable for the method to know what class it belongs to FWIW.
|
Closing as this appears to be superseded by #2160. |
…function The performance benchmarking CI run diffblue#2152 failed because src/cprover/chc_db.h used std::__unary_function<exprt, bool> as a base class for the is_state_pred struct. This internal GCC implementation detail was removed in GCC 13+ (libstdc++ C++17 mode), causing a compilation failure on Ubuntu 24.04. The fix removes the public std::__unary_function<exprt, bool> base class from is_state_pred. The struct only defines operator() which is all that is needed for it to work as a callable predicate. Co-authored-by: yvizel <5079581+yvizel@users.noreply.github.com> Agent-Logs-Url: https://github.com/yvizel/cbmc/sessions/3b1e696c-0201-4788-9db7-4a25881a13c7
No description provided.