Skip to content

Commit d30e826

Browse files
committed
move bitvector types to bitvector_types.h
The rationale is that types of a particular group (say bitvectors or pointers) are often used together with the expressions that are specific for them. The goal is that std_types.h will only contain the basic types, such as bool_typet.
1 parent 94c64da commit d30e826

File tree

86 files changed

+570
-490
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+570
-490
lines changed

scripts/expected_doxygen_warnings.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
warning: Include graph for 'goto_instrument_parse_options.cpp' not generated, too many nodes (97), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
8383
warning: Included by graph for 'goto_functions.h' not generated, too many nodes (66), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
8484
warning: Included by graph for 'goto_model.h' not generated, too many nodes (110), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
85-
warning: Included by graph for 'arith_tools.h' not generated, too many nodes (181), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
85+
warning: Included by graph for 'arith_tools.h' not generated, too many nodes (182), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
8686
warning: Included by graph for 'c_types.h' not generated, too many nodes (110), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
8787
warning: Included by graph for 'config.h' not generated, too many nodes (87), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
8888
warning: Included by graph for 'exception_utils.h' not generated, too many nodes (61), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
@@ -96,6 +96,6 @@ warning: Included by graph for 'pointer_expr.h' not generated, too many nodes (1
9696
warning: Included by graph for 'prefix.h' not generated, too many nodes (86), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
9797
warning: Included by graph for 'simplify_expr.h' not generated, too many nodes (77), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
9898
warning: Included by graph for 'std_code.h' not generated, too many nodes (78), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
99-
warning: Included by graph for 'std_expr.h' not generated, too many nodes (243), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
100-
warning: Included by graph for 'std_types.h' not generated, too many nodes (117), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
99+
warning: Included by graph for 'std_expr.h' not generated, too many nodes (241), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
100+
warning: Included by graph for 'std_types.h' not generated, too many nodes (102), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
101101
warning: Included by graph for 'symbol_table.h' not generated, too many nodes (95), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.

src/analyses/variable-sensitivity/abstract_value_object.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
#include <analyses/variable-sensitivity/context_abstract_object.h>
1313
#include <analyses/variable-sensitivity/interval_abstract_value.h>
1414
#include <analyses/variable-sensitivity/value_set_abstract_object.h>
15+
1516
#include <goto-programs/adjust_float_expressions.h>
17+
1618
#include <util/arith_tools.h>
19+
#include <util/bitvector_types.h>
1720
#include <util/ieee_float.h>
1821
#include <util/make_unique.h>
1922
#include <util/simplify_expr.h>

src/analyses/variable-sensitivity/interval_abstract_value.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#include <limits.h>
1010
#include <ostream>
1111

12+
#include <util/bitvector_types.h>
1213
#include <util/invariant.h>
1314
#include <util/make_unique.h>
14-
#include <util/std_expr.h>
1515

1616
#include "abstract_environment.h"
1717

src/ansi-c/gcc_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Author: Daniel Kroening, [email protected]
99
#ifndef CPROVER_ANSI_C_GCC_TYPES_H
1010
#define CPROVER_ANSI_C_GCC_TYPES_H
1111

12-
#include <util/std_types.h>
12+
#include <util/bitvector_types.h>
1313

1414
// These are gcc-specific; most are not implemented by clang
1515
// https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html

src/ansi-c/padding.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ Author: Daniel Kroening, [email protected]
1313

1414
#include <algorithm>
1515

16+
#include <util/arith_tools.h>
17+
#include <util/bitvector_types.h>
1618
#include <util/config.h>
1719
#include <util/pointer_offset_size.h>
1820
#include <util/simplify_expr.h>
19-
#include <util/arith_tools.h>
2021

2122
mp_integer alignment(const typet &type, const namespacet &ns)
2223
{

src/goto-instrument/accelerate/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Author: Matt Lewis
1212
#ifndef CPROVER_GOTO_INSTRUMENT_ACCELERATE_UTIL_H
1313
#define CPROVER_GOTO_INSTRUMENT_ACCELERATE_UTIL_H
1414

15-
#include <util/std_types.h>
15+
#include <util/bitvector_types.h>
1616

1717
signedbv_typet signed_poly_type();
1818
unsignedbv_typet unsigned_poly_type();

src/goto-instrument/dump_c.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Author: Daniel Kroening, [email protected]
1111

1212
#include "dump_c.h"
1313

14+
#include <util/bitvector_types.h>
1415
#include <util/byte_operators.h>
1516
#include <util/config.h>
1617
#include <util/expr_initializer.h>

src/goto-instrument/stack_depth.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Date: November 2011
1414
#include "stack_depth.h"
1515

1616
#include <util/arith_tools.h>
17+
#include <util/bitvector_types.h>
1718

1819
#include <goto-programs/goto_model.h>
1920

src/goto-programs/goto_trace.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Author: Daniel Kroening
1616
#include <ostream>
1717

1818
#include <util/arith_tools.h>
19+
#include <util/bitvector_types.h>
1920
#include <util/byte_operators.h>
2021
#include <util/format_expr.h>
2122
#include <util/merge_irep.h>

src/goto-programs/process_goto_program.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Author: Martin Brain, [email protected]
2626
#include <goto-programs/string_abstraction.h>
2727
#include <goto-programs/string_instrumentation.h>
2828

29+
#include <util/bitvector_types.h>
2930
#include <util/message.h>
3031
#include <util/options.h>
3132

src/goto-programs/string_abstraction.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ Author: Daniel Kroening, [email protected]
1212
#ifndef CPROVER_GOTO_PROGRAMS_STRING_ABSTRACTION_H
1313
#define CPROVER_GOTO_PROGRAMS_STRING_ABSTRACTION_H
1414

15-
#include <util/symbol_table.h>
15+
#include <util/bitvector_types.h>
1616
#include <util/config.h>
1717
#include <util/std_expr.h>
18+
#include <util/symbol_table.h>
1819

1920
#include "goto_model.h"
2021

src/goto-symex/partial_order_concurrency.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Author: Michael Tautschnig, [email protected]
1414
#include <limits>
1515

1616
#include <util/arith_tools.h>
17+
#include <util/bitvector_types.h>
1718
#include <util/simplify_expr.h>
1819

1920
partial_order_concurrencyt::partial_order_concurrencyt(

src/jsil/jsil_typecheck.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ Author: Michael Tautschnig, [email protected]
1111

1212
#include "jsil_typecheck.h"
1313

14-
#include <util/symbol_table.h>
14+
#include <util/bitvector_types.h>
1515
#include <util/prefix.h>
1616
#include <util/std_expr.h>
17+
#include <util/symbol_table.h>
1718

1819
#include "expr2jsil.h"
1920
#include "jsil_types.h"

src/jsil/jsil_types.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Author: Daiva Naudziuniene, [email protected]
1111

1212
#include "jsil_types.h"
1313

14+
#include <util/bitvector_types.h>
15+
1416
#include <algorithm>
1517

1618
typet jsil_any_type()

src/solvers/flattening/boolbv.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Author: Daniel Kroening, [email protected]
1414

1515
#include <util/arith_tools.h>
1616
#include <util/bitvector_expr.h>
17+
#include <util/bitvector_types.h>
1718
#include <util/floatbv_expr.h>
1819
#include <util/magic.h>
1920
#include <util/mp_arith.h>

src/solvers/flattening/boolbv_abs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ Author: Daniel Kroening, [email protected]
88

99
#include "boolbv.h"
1010

11-
#include <util/std_types.h>
12-
1311
#include "boolbv_type.h"
1412

13+
#include <util/bitvector_types.h>
14+
1515
#include <solvers/floatbv/float_utils.h>
1616

1717
bvt boolbvt::convert_abs(const abs_exprt &expr)

src/solvers/flattening/boolbv_add_sub.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Author: Daniel Kroening, [email protected]
88

99
#include "boolbv.h"
1010

11+
#include <util/bitvector_types.h>
1112
#include <util/invariant.h>
12-
#include <util/std_types.h>
1313

1414
#include <solvers/floatbv/float_utils.h>
1515

src/solvers/flattening/boolbv_bv_rel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Author: Daniel Kroening, [email protected]
88

99
#include "boolbv.h"
1010

11-
#include <util/std_types.h>
11+
#include <util/bitvector_types.h>
1212

1313
#include "boolbv_type.h"
1414

src/solvers/flattening/boolbv_div.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Author: Daniel Kroening, [email protected]
88

99
#include "boolbv.h"
1010

11-
#include <util/std_types.h>
11+
#include <util/bitvector_types.h>
1212

1313
bvt boolbvt::convert_div(const div_exprt &expr)
1414
{

src/solvers/flattening/boolbv_extractbit.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Author: Daniel Kroening, [email protected]
1212

1313
#include <util/arith_tools.h>
1414
#include <util/bitvector_expr.h>
15+
#include <util/bitvector_types.h>
1516
#include <util/exception_utils.h>
1617
#include <util/std_expr.h>
1718
#include <util/std_types.h>

src/solvers/flattening/boolbv_floatbv_op.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Author: Daniel Kroening, [email protected]
1111
#include <algorithm>
1212
#include <iostream>
1313

14+
#include <util/bitvector_types.h>
1415
#include <util/floatbv_expr.h>
15-
#include <util/std_types.h>
1616

1717
#include <solvers/floatbv/float_utils.h>
1818

src/solvers/flattening/boolbv_ieee_float_rel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ Author: Daniel Kroening, [email protected]
88

99
#include "boolbv.h"
1010

11-
#include <util/std_types.h>
12-
1311
#include "boolbv_type.h"
1412

13+
#include <util/bitvector_types.h>
14+
1515
#include <solvers/floatbv/float_utils.h>
1616

1717
literalt boolbvt::convert_ieee_float_rel(const binary_relation_exprt &expr)

src/solvers/flattening/boolbv_mult.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Author: Daniel Kroening, [email protected]
88

99
#include "boolbv.h"
1010

11-
#include <util/std_types.h>
11+
#include <util/bitvector_types.h>
1212

1313
bvt boolbvt::convert_mult(const mult_exprt &expr)
1414
{

src/solvers/flattening/boolbv_not.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9-
109
#include "boolbv.h"
1110

11+
#include <util/bitvector_types.h>
12+
1213
bvt boolbvt::convert_not(const not_exprt &expr)
1314
{
1415
const bvt &op_bv=convert_bv(expr.op());

src/solvers/flattening/boolbv_reduction.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9-
109
#include "boolbv.h"
1110

11+
#include <util/bitvector_types.h>
12+
1213
literalt boolbvt::convert_reduction(const unary_exprt &expr)
1314
{
1415
const bvt &op_bv=convert_bv(expr.op());

src/solvers/flattening/boolbv_typecast.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Author: Daniel Kroening, [email protected]
88

99
#include "boolbv.h"
1010

11-
#include <util/std_types.h>
12-
13-
#include <solvers/floatbv/float_utils.h>
14-
1511
#include "boolbv_type.h"
1612
#include "c_bit_field_replacement_type.h"
1713

14+
#include <util/bitvector_types.h>
15+
16+
#include <solvers/floatbv/float_utils.h>
17+
1818
bvt boolbvt::convert_bv_typecast(const typecast_exprt &expr)
1919
{
2020
const exprt &op=expr.op();

src/solvers/flattening/boolbv_unary_minus.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Author: Daniel Kroening, [email protected]
88

99
#include "boolbv.h"
1010

11-
#include <util/std_types.h>
11+
#include <util/bitvector_types.h>
1212

1313
#include <solvers/floatbv/float_utils.h>
1414

src/solvers/flattening/c_bit_field_replacement_type.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Author: Daniel Kroening, [email protected]
88

99
#include "c_bit_field_replacement_type.h"
1010

11+
#include <util/bitvector_types.h>
1112
#include <util/invariant.h>
1213

1314
typet c_bit_field_replacement_type(

src/solvers/floatbv/float_bv.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Author: Daniel Kroening, [email protected]
1212

1313
#include <util/arith_tools.h>
1414
#include <util/bitvector_expr.h>
15+
#include <util/bitvector_types.h>
1516
#include <util/floatbv_expr.h>
1617
#include <util/std_expr.h>
1718

src/solvers/lowering/popcount.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Author: Michael Tautschnig
1010

1111
#include <util/arith_tools.h>
1212
#include <util/bitvector_expr.h>
13+
#include <util/bitvector_types.h>
1314
#include <util/invariant.h>
1415
#include <util/pointer_offset_size.h>
15-
#include <util/std_expr.h>
1616

1717
exprt lower_popcount(const popcount_exprt &expr, const namespacet &ns)
1818
{

src/solvers/refinement/refine_arithmetic.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Author: Daniel Kroening, [email protected]
99
#include "bv_refinement.h"
1010

1111
#include <util/arith_tools.h>
12+
#include <util/bitvector_types.h>
1213
#include <util/bv_arithmetic.h>
1314
#include <util/expr_util.h>
1415
#include <util/floatbv_expr.h>

src/solvers/smt2/smt2_format.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ Author: Daniel Kroening, [email protected]
99
#include "smt2_format.h"
1010

1111
#include <util/arith_tools.h>
12-
#include <util/std_expr.h>
13-
#include <util/std_types.h>
12+
#include <util/bitvector_types.h>
1413

1514
std::ostream &smt2_format_rec(std::ostream &out, const typet &type)
1615
{

src/solvers/smt2/smt2_parser.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Author: Daniel Kroening, [email protected]
1212

1313
#include <util/arith_tools.h>
1414
#include <util/bitvector_expr.h>
15+
#include <util/bitvector_types.h>
1516
#include <util/floatbv_expr.h>
1617
#include <util/ieee_float.h>
1718
#include <util/invariant.h>

src/statement-list/converters/convert_dint_literal.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ Author: Matthias Weiss, [email protected]
1212
#include "convert_dint_literal.h"
1313
#include "statement_list_types.h"
1414

15+
#include <util/arith_tools.h>
16+
#include <util/bitvector_types.h>
17+
1518
#include <algorithm>
1619
#include <stdexcept>
17-
#include <util/arith_tools.h>
18-
#include <util/std_types.h>
1920

2021
/// Minimum value of double integer literals.
2122
#define STL_DINT_MAX_VALUE 2147483647LL

src/statement-list/converters/convert_int_literal.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ Author: Matthias Weiss, [email protected]
1313
#include "convert_dint_literal.h"
1414
#include "statement_list_types.h"
1515

16+
#include <util/arith_tools.h>
17+
#include <util/bitvector_types.h>
18+
1619
#include <algorithm>
1720
#include <stdexcept>
18-
#include <util/arith_tools.h>
19-
#include <util/std_types.h>
2021

2122
/// Maximum value of integer literals.
2223
#define STL_INT_MAX_VALUE 32767LL

src/statement-list/converters/convert_real_literal.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Author: Matthias Weiss, [email protected]
1212
#include "convert_real_literal.h"
1313
#include "statement_list_types.h"
1414

15+
#include <util/bitvector_types.h>
1516
#include <util/ieee_float.h>
1617
#include <util/std_expr.h>
1718

src/statement-list/converters/statement_list_types.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ Author: Matthias Weiss, [email protected]
1010
/// Statement List Type Helper
1111

1212
#include "statement_list_types.h"
13+
14+
#include <util/bitvector_types.h>
1315
#include <util/ieee_float.h>
14-
#include <util/std_types.h>
1516

1617
signedbv_typet get_int_type()
1718
{

src/statement-list/parser.y

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
#include "statement_list_parser.h"
1818
#include "converters/convert_string_value.h"
1919
#include "converters/statement_list_types.h"
20-
#include <util/std_expr.h>
20+
21+
#include <util/bitvector_types.h>
22+
2123
#include <iterator>
2224

2325
int yystatement_listlex();

0 commit comments

Comments
 (0)