-
Notifications
You must be signed in to change notification settings - Fork 273
Refactor/virtual register languages #6220
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
Merged
martin-cs
merged 5 commits into
diffblue:develop
from
martin-cs:refactor/virtual_register_languages
Aug 3, 2021
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4042fbb
Correctly guard the use of the JSIL language
ff4797e
Separate out goto_analyzer's register_languages as with other tools
d8c78b0
register_languages is now an interface not just a convention
b16a5fc
Make sure that member functions are correctly marked as override
021116b
Add override to register_languages in the Java tools
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/*******************************************************************\ | ||
|
||
Module: Language Registration | ||
|
||
Author: Martin Brain, [email protected] | ||
|
||
\*******************************************************************/ | ||
|
||
/// \file | ||
/// Language Registration | ||
|
||
#include "goto_analyzer_parse_options.h" | ||
|
||
#include <langapi/mode.h> | ||
|
||
#include <ansi-c/ansi_c_language.h> | ||
#include <cpp/cpp_language.h> | ||
|
||
#ifdef HAVE_JSIL | ||
# include <jsil/jsil_language.h> | ||
#endif | ||
|
||
void goto_analyzer_parse_optionst::register_languages() | ||
{ | ||
register_language(new_ansi_c_language); | ||
register_language(new_cpp_language); | ||
|
||
#ifdef HAVE_JSIL | ||
register_language(new_jsil_language); | ||
#endif | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,16 +16,12 @@ Author: Daniel Kroening, [email protected] | |
#include <iostream> | ||
#include <memory> | ||
|
||
#include <ansi-c/ansi_c_language.h> | ||
#include <ansi-c/cprover_library.h> | ||
|
||
#include <assembler/remove_asm.h> | ||
|
||
#include <cpp/cpp_language.h> | ||
#include <cpp/cprover_library.h> | ||
|
||
#include <jsil/jsil_language.h> | ||
|
||
#include <goto-programs/add_malloc_may_fail_variable_initializations.h> | ||
#include <goto-programs/initialize_goto_model.h> | ||
#include <goto-programs/link_to_library.h> | ||
|
@@ -37,9 +33,6 @@ Author: Daniel Kroening, [email protected] | |
#include <analyses/ai.h> | ||
#include <analyses/local_may_alias.h> | ||
|
||
#include <langapi/mode.h> | ||
#include <langapi/language.h> | ||
|
||
#include <util/config.h> | ||
#include <util/exception_utils.h> | ||
#include <util/exit_codes.h> | ||
|
@@ -65,13 +58,6 @@ goto_analyzer_parse_optionst::goto_analyzer_parse_optionst( | |
{ | ||
} | ||
|
||
void goto_analyzer_parse_optionst::register_languages() | ||
{ | ||
register_language(new_ansi_c_language); | ||
register_language(new_cpp_language); | ||
register_language(new_jsil_language); | ||
} | ||
|
||
void goto_analyzer_parse_optionst::get_command_line_options(optionst &options) | ||
{ | ||
if(config.set(cmdline)) | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,8 +129,8 @@ Author: Daniel Kroening, [email protected] | |
class goto_instrument_parse_optionst : public parse_options_baset | ||
{ | ||
public: | ||
virtual int doit(); | ||
virtual void help(); | ||
int doit() override; | ||
void help() override; | ||
|
||
goto_instrument_parse_optionst(int argc, const char **argv) | ||
: parse_options_baset( | ||
|
@@ -145,7 +145,7 @@ class goto_instrument_parse_optionst : public parse_options_baset | |
} | ||
|
||
protected: | ||
void register_languages(); | ||
void register_languages() override; | ||
|
||
void get_goto_program(); | ||
void instrument_goto_program(); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Worth a reference to a GitHub issue 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.
I didn't know there was one! I'll have a look...
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'm not immediately finding one; if you had one in mind can you post a link?
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.
Apologies for the chasing of the geese that are wild (positively livid...), I sort of half-assumed this was referring to the tickets discussing possible refactorings around
languaget
and modes - but I realise now I mis-read this comment.