Skip to content

String solver cbmc pass option #278

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

Conversation

romainbrenguier
Copy link
Contributor

Adding a PASS option for calling the string solver and changing the Makefile for this string solver

Daniel Kroening and others added 30 commits June 21, 2016 19:23
Cleanup: Name should precede literals in output
Use -DANSI_C_DEBUG to enable.
Moved context-free logic from scanner into the grammar and fixed bugs to
permit 1) attributes on labels and 2) multiple attributes after
pointer-type declarations.
Handle placement of symbols into specified sections by prefixing symbol names
with <section-name>$$.
Full path are useful to track the exact location of the file when
working with the output afterwards.

Usage of file and directory concatenation is simplified.
@@ -1175,6 +1187,7 @@ void cbmc_parse_optionst::help()
" --yices use Yices\n"
" --z3 use Z3\n"
" --refine use refinement procedure (experimental)\n"
" --pass use pass procedure (experimental)\n"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So ... what is the pass procedure? Would be nice to be user-friendly in the --help output.

if(options.get_bool_option("dimacs"))
solver = get_dimacs();
else if(options.get_bool_option("refine"))
solver = get_bv_refinement();
else if(options.get_bool_option("pass")) {
std::cout << "PASS solver" << std::endl;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a proper message_streamt API

@@ -79,11 +79,14 @@ class cbmc_solverst:public messaget
virtual std::unique_ptr<solvert> get_solver()
{
solvert *solver;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove whitespace?


string_refinementt *string_refinement = new string_refinementt(ns, *prop);
string_refinement->set_ui(ui);
return new cbmc_solver_with_propt(string_refinement, prop);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's two objects allocated on the heap and never freed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prop is deleted by ~cbmc_solver_with_propt and string_refinement by cbmc_solverst's destructor which cbmc_solver_with_propt inherits.

@@ -341,6 +342,11 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
options.set_option("refine-arithmetic", true);
}

if(cmdline.isset("pass"))
{
options.set_option("pass", true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about options.set_option("pass", cmdline.isset("pass")); ?

@@ -911,6 +917,12 @@ bool cbmc_parse_optionst::process_goto_program(
status() << "Partial Inlining" << eom;
goto_partial_inline(goto_functions, ns, ui_message_handler);


if(cmdline.isset("pass")) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the looks of it: is options.set_option("pass", ...) even required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used in cbmc_parse_options.h

@romainbrenguier romainbrenguier mentioned this pull request Dec 8, 2016
@romainbrenguier
Copy link
Contributor Author

this is made obsolete by the more recent pull request #341

smowton added a commit to smowton/cbmc that referenced this pull request May 9, 2018
chrisr-diffblue added a commit to chrisr-diffblue/cbmc that referenced this pull request Aug 24, 2018
…ert-revert-2490

Revert "REVERT PR diffblue#2490 switch-range commit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants