Skip to content

Commit 1d6d39b

Browse files
committed
Deduplicate output streams in smt2_convt::write_footer()
This fixes bugs arising from some of the member functions of `smt2::convt` writing to an `os` argument and some of the them writing to `smt2_convt::out`. This was causing some of the generated text to be written out when using `--outfile` argument with cbmc, but not without it. It might be easier to understand `smt2_convt` if the output stream was passed as an argument to the member functions, instead of kept as a member variable. This commit replaces the arguments with references to the member variable because it is a less wide sweeping change and it still solves the bugs. The address_space_size_limit3 test is disabled with smt2, because the output of this test was already different between the sat and smt2 backends and therefore it was already not producing the correct output. Presumably this test was returning the expected `VERIFICATION FAILED` result for the wrong reasons. The `VERIFICATION FAILED` result is only returned in the case where the object size limits are missing. Further work will be needed to properly debug the support for `--pointer-check` with smt2.
1 parent 5b8e8fa commit 1d6d39b

File tree

14 files changed

+41
-35
lines changed

14 files changed

+41
-35
lines changed

regression/cbmc/Malloc6/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE broken-smt-backend
1+
CORE
22
main.c
33
--pointer-check
44
^EXIT=0$

regression/cbmc/Pointer1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE broken-smt-backend
1+
CORE
22
main.c
33
--pointer-check
44
^EXIT=0$

regression/cbmc/Pointer28/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE broken-smt-backend
1+
CORE
22
main.c
33
--pointer-check --little-endian
44
^EXIT=0$

regression/cbmc/Pointer4/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE broken-smt-backend
1+
CORE
22
main.c
33
--pointer-check
44
^EXIT=0$

regression/cbmc/String8/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE broken-smt-backend
1+
CORE
22
main.c
33
--pointer-check --bounds-check
44
^EXIT=0$

regression/cbmc/String_Abstraction7/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE broken-smt-backend
1+
CORE
22
main.c
33
--string-abstraction --pointer-check --bounds-check
44
^EXIT=0$

regression/cbmc/address_space_size_limit3/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE broken-smt-backend
22
main.i
33
--32 --little-endian --object-bits 25 --pointer-check
44
^EXIT=10$

regression/cbmc/null7/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE broken-smt-backend
1+
CORE
22
main.c
33
--pointer-check
44
^EXIT=0$

regression/cbmc/struct7/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE broken-smt-backend
1+
CORE
22
main.c
33
--pointer-check --bounds-check
44
^EXIT=0$

regression/cbmc/void_pointer2/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE broken-smt-backend
1+
CORE
22
main.c
33
--pointer-check --no-simplify --unwind 3
44
^EXIT=0$

0 commit comments

Comments
 (0)