-
Notifications
You must be signed in to change notification settings - Fork 277
Remove cmdlinet from init/lazy_goto_model #3518
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
peterschrammel
merged 2 commits into
diffblue:develop
from
peterschrammel:no-cmdline-in-goto-model
Dec 3, 2018
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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 |
---|---|---|
|
@@ -14,10 +14,10 @@ Author: Daniel Kroening, [email protected] | |
#include <fstream> | ||
#include <iostream> | ||
|
||
#include <util/cmdline.h> | ||
#include <util/config.h> | ||
#include <util/message.h> | ||
#include <util/object_factory_parameters.h> | ||
#include <util/options.h> | ||
#include <util/unicode.h> | ||
|
||
#include <langapi/mode.h> | ||
|
@@ -30,12 +30,11 @@ Author: Daniel Kroening, [email protected] | |
#include "read_goto_binary.h" | ||
|
||
goto_modelt initialize_goto_model( | ||
const cmdlinet &cmdline, | ||
const std::vector<std::string> &files, | ||
message_handlert &message_handler, | ||
const optionst &options) | ||
{ | ||
messaget msg(message_handler); | ||
const std::vector<std::string> &files=cmdline.args; | ||
if(files.empty()) | ||
{ | ||
throw invalid_command_line_argument_exceptiont( | ||
|
@@ -124,7 +123,7 @@ goto_modelt initialize_goto_model( | |
|
||
bool entry_point_generation_failed=false; | ||
|
||
if(binaries_provided_start && cmdline.isset("function")) | ||
if(binaries_provided_start && options.is_set("function")) | ||
{ | ||
// Rebuild the entry-point, using the language annotation of the | ||
// existing __CPROVER_start function: | ||
|
@@ -139,7 +138,7 @@ goto_modelt initialize_goto_model( | |
if(binaries.empty()) | ||
{ | ||
// Enable/disable stub generation for opaque methods | ||
bool stubs_enabled=cmdline.isset("generate-opaque-stubs"); | ||
bool stubs_enabled = options.is_set("generate-opaque-stubs"); | ||
language_files.set_should_generate_opaque_method_stubs(stubs_enabled); | ||
} | ||
|
||
|
@@ -166,7 +165,7 @@ goto_modelt initialize_goto_model( | |
goto_model.goto_functions, | ||
message_handler); | ||
|
||
if(cmdline.isset("validate-goto-model")) | ||
if(options.is_set("validate-goto-model")) | ||
{ | ||
goto_model.validate(validation_modet::EXCEPTION); | ||
} | ||
|
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 |
---|---|---|
|
@@ -14,12 +14,11 @@ Author: Daniel Kroening, [email protected] | |
|
||
#include "goto_model.h" | ||
|
||
class cmdlinet; | ||
class message_handlert; | ||
class optionst; | ||
|
||
goto_modelt initialize_goto_model( | ||
const cmdlinet &cmdline, | ||
const std::vector<std::string> &files, | ||
message_handlert &message_handler, | ||
const optionst &options); | ||
|
||
|
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 |
---|---|---|
|
@@ -12,9 +12,10 @@ Author: Daniel Kroening, [email protected] | |
#include <memory> | ||
#include <iostream> | ||
|
||
#include <util/namespace.h> | ||
#include <util/cmdline.h> | ||
#include <util/config.h> | ||
#include <util/namespace.h> | ||
#include <util/options.h> | ||
#include <util/unicode.h> | ||
|
||
#include "language.h" | ||
|
@@ -112,8 +113,12 @@ bool language_uit::final() | |
{ | ||
language_files.set_message_handler(*message_handler); | ||
|
||
// TODO: This should be moved elsewhere because it is not used in | ||
// this repository. | ||
// Enable/disable stub generation for opaque methods | ||
bool stubs_enabled=_cmdline.isset("generate-opaque-stubs"); | ||
bool stubs_enabled = false; | ||
if(options != nullptr) | ||
stubs_enabled = options->is_set("generate-opaque-stubs"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this any easier to read if written as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will be removed in #3520 anyway. |
||
language_files.set_should_generate_opaque_method_stubs(stubs_enabled); | ||
|
||
if(language_files.final(symbol_table)) | ||
|
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.
Maybe create an issue for this?
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.
#3519