-
Notifications
You must be signed in to change notification settings - Fork 274
Fix bugs stemming from duplicate output streams in smt2_convt::write_footer() #6207
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CORE broken-smt-backend | ||
CORE | ||
main.c | ||
--pointer-check | ||
^EXIT=0$ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CORE broken-smt-backend | ||
CORE | ||
main.c | ||
--pointer-check | ||
^EXIT=0$ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CORE broken-smt-backend | ||
CORE | ||
main.c | ||
--pointer-check --little-endian | ||
^EXIT=0$ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CORE broken-smt-backend | ||
CORE | ||
main.c | ||
--pointer-check | ||
^EXIT=0$ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CORE broken-smt-backend | ||
CORE | ||
main.c | ||
--pointer-check --bounds-check | ||
^EXIT=0$ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CORE broken-smt-backend | ||
CORE | ||
main.c | ||
--string-abstraction --pointer-check --bounds-check | ||
^EXIT=0$ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CORE | ||
CORE broken-smt-backend | ||
main.i | ||
--32 --little-endian --object-bits 25 --pointer-check | ||
^EXIT=10$ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CORE broken-smt-backend | ||
CORE | ||
main.c | ||
--pointer-check | ||
^EXIT=0$ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CORE broken-smt-backend | ||
CORE | ||
main.c | ||
--pointer-check --bounds-check | ||
^EXIT=0$ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CORE broken-smt-backend | ||
CORE | ||
main.c | ||
--pointer-check --no-simplify --unwind 3 | ||
^EXIT=0$ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,13 +39,15 @@ decision_proceduret::resultt smt2_dect::dec_solve() | |
temp_file_stdout("smt2_dec_stdout_", ""), | ||
temp_file_stderr("smt2_dec_stderr_", ""); | ||
|
||
{ | ||
// we write the problem into a file | ||
std::ofstream problem_out( | ||
temp_file_problem(), std::ios_base::out | std::ios_base::trunc); | ||
problem_out << stringstream.str(); | ||
write_footer(problem_out); | ||
} | ||
const auto write_problem_to_file = [&](std::ofstream problem_out) { | ||
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. This seems longer, more complex and harder to debug than the code it replaces. What am I missing? 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. The old code would do the following:
The problem was that the The desirable behaviour is to do the following:
The modified code stores the common SMT to the I hope this has helped clarify. |
||
cached_output << stringstream.str(); | ||
stringstream.str(std::string{}); | ||
write_footer(); | ||
problem_out << cached_output.str() << stringstream.str(); | ||
stringstream.str(std::string{}); | ||
}; | ||
write_problem_to_file(std::ofstream( | ||
temp_file_problem(), std::ios_base::out | std::ios_base::trunc)); | ||
|
||
std::vector<std::string> argv; | ||
std::string stdin_filename; | ||
|
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.
Why has this now broken?