Skip to content

Commit 0423be7

Browse files
author
Daniel Kroening
authored
Merge pull request #1351 from tautschnig/develop-cleanup
Collection of minor fixes and cleanup
2 parents 02c4ac6 + 9d5d907 commit 0423be7

File tree

15 files changed

+20
-25
lines changed

15 files changed

+20
-25
lines changed

regression/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
DIRS = ansi-c \
22
cbmc \
3-
cpp \
3+
cbmc-cover \
44
cbmc-java \
55
cbmc-java-inheritance \
6-
cbmc-cover \
6+
cpp \
77
goto-analyzer \
88
goto-diff \
99
goto-gcc \

regression/cbmc/Quantifiers-assertion/test.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ main.c
99
^\[main.assertion.5\] NotForall-Forall: successful: SUCCESS$
1010
^\[main.assertion.6\] NotForall-NotForall: successful: SUCCESS$
1111
^\*\* 2 of 6 failed \(2 iterations\)$
12-
^\VERIFICATION FAILED$
12+
^VERIFICATION FAILED$

regression/cbmc/Quantifiers-assignment/test.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ main.c
77
^\[main.assertion.3\] assertion z1: SUCCESS$
88
^\[main.assertion.4\] assertion z2: SUCCESS$
99
^\*\* 1 of 4 failed \(2 iterations\)$
10-
^\VERIFICATION FAILED$
10+
^VERIFICATION FAILED$

regression/cbmc/Quantifiers-if/test.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ main.c
88
^\[main.assertion.4\] failure 3: FAILURE$
99
^\[main.assertion.5\] success 2: SUCCESS$
1010
^\*\* 3 of 5 failed \(2 iterations\)$
11-
^\VERIFICATION FAILED$
11+
^VERIFICATION FAILED$

regression/cbmc/Quantifiers-not-exists/test.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ main.c
99
^\[main.assertion.5\] assertion tmp_if_expr\$12: SUCCESS$
1010
^\[main.assertion.6\] assertion tmp_if_expr\$15: SUCCESS$
1111
^\*\* 0 of 6 failed \(1 iteration\)$
12-
^\VERIFICATION SUCCESSFUL$
12+
^VERIFICATION SUCCESSFUL$

regression/cbmc/Quantifiers-not/test.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ main.c
88
^\[main.assertion.4\] success 3: SUCCESS$
99
^\[main.assertion.5\] failure 2: FAILURE$
1010
^\*\* 2 of 5 failed \(2 iterations\)$
11-
^\VERIFICATION FAILED$
11+
^VERIFICATION FAILED$

regression/cbmc/Quantifiers-type/test.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ main.c
55
^\[main.assertion.1\] assertion tmp_if_expr\$1: FAILURE$
66
^\[main.assertion.2\] assertion tmp_if_expr\$2: SUCCESS$
77
^\*\* 1 of 2 failed \(2 iterations\)$
8-
^\VERIFICATION FAILED$
8+
^VERIFICATION FAILED$

src/goto-instrument/goto_instrument_parse_options.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1482,13 +1482,16 @@ void goto_instrument_parse_optionst::help()
14821482
" --show-symbol-table show symbol table\n"
14831483
" --list-symbols list symbols with type information\n"
14841484
HELP_SHOW_GOTO_FUNCTIONS
1485+
" --drop-unused-functions drop functions trivially unreachable from main function\n" // NOLINT(*)
14851486
" --print-internal-representation\n" // NOLINTNEXTLINE(*)
14861487
" show verbose internal representation of the program\n"
14871488
" --list-undefined-functions list functions without body\n"
14881489
" --show-struct-alignment show struct members that might be concurrently accessed\n" // NOLINT(*)
14891490
" --show-natural-loops show natural loop heads\n"
14901491
// NOLINTNEXTLINE(whitespace/line_length)
14911492
" --list-calls-args list all function calls with their arguments\n"
1493+
// NOLINTNEXTLINE(whitespace/line_length)
1494+
" --print-path-lengths print statistics about control-flow graph paths\n"
14921495
"\n"
14931496
"Safety checks:\n"
14941497
" --no-assertions ignore user assertions\n"

src/goto-programs/convert_nondet.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ static goto_programt::targett insert_nondet_init_code(
6767
}
6868

6969
// Although, if the type is a ptr-to-void then we also want to bail
70-
if(lhs.type().subtype().id()==ID_empty)
70+
if(lhs.type().subtype().id()==ID_empty ||
71+
lhs.type().subtype().id()==ID_code)
7172
{
7273
return next_instr;
7374
}

src/goto-programs/goto_convert_class.h

+1-6
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,6 @@ class goto_convertt:public messaget
530530
const exprt &rhs,
531531
const exprt::operandst &arguments,
532532
goto_programt &dest);
533-
void do_array_set(
534-
const exprt &lhs,
535-
const exprt &rhs,
536-
const exprt::operandst &arguments,
537-
goto_programt &dest);
538533
void do_array_equal(
539534
const exprt &lhs,
540535
const exprt &rhs,
@@ -543,7 +538,7 @@ class goto_convertt:public messaget
543538
void do_array_op(
544539
const irep_idt &id,
545540
const exprt &lhs,
546-
const exprt &rhs,
541+
const exprt &function,
547542
const exprt::operandst &arguments,
548543
goto_programt &dest);
549544
void do_printf(

src/goto-programs/replace_java_nondet.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,3 @@ void replace_java_nondet(goto_modelt &goto_model)
251251
{
252252
replace_java_nondet(goto_model.goto_functions);
253253
}
254-

src/java_bytecode/java_utils.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Author: Daniel Kroening, [email protected]
1717
#include <util/std_types.h>
1818
#include <util/string_utils.h>
1919

20+
#include <set>
21+
2022
bool java_is_array_type(const typet &type)
2123
{
2224
if(type.id()!=ID_struct)

src/java_bytecode/java_utils.h

+3-6
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9-
#include <util/symbol_table.h>
10-
#include <util/message.h>
11-
#include <util/std_expr.h>
12-
13-
#include "java_bytecode_parse_tree.h"
149
#ifndef CPROVER_JAVA_BYTECODE_JAVA_UTILS_H
1510
#define CPROVER_JAVA_BYTECODE_JAVA_UTILS_H
1611

17-
#include <util/type.h>
12+
#include <util/message.h>
13+
#include <util/std_expr.h>
14+
#include <util/symbol_table.h>
1815

1916
bool java_is_array_type(const typet &type);
2017

src/solvers/flattening/pointer_logic.h

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ Author: Daniel Kroening, [email protected]
1818

1919
class namespacet;
2020

21-
class namespacet;
22-
2321
class pointer_logict
2422
{
2523
public:

src/solvers/prop/bdd_expr.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ exprt bdd_exprt::as_expr(const mini_bddt &r) const
122122
}
123123
else if(r.high().is_false())
124124
{
125-
if(r.high().is_true())
125+
if(r.low().is_true())
126126
return not_exprt(n_expr);
127127
else
128128
return and_exprt(not_exprt(n_expr), as_expr(r.low()));

0 commit comments

Comments
 (0)