Skip to content

Commit 7ba2bd4

Browse files
committed
Remove unnecessary includes
Manual removal of includes based on include-what-you-use's output, filtered for includes that should be removed. The goal is to avoid unnecessary build dependencies, reducing the amount of code that needs to be rebuilt during incremental builds. This is a second iteration of this cleanup; the first round took place in 450845d.
1 parent a2e3dd4 commit 7ba2bd4

File tree

388 files changed

+696
-808
lines changed

Some content is hidden

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

388 files changed

+696
-808
lines changed

jbmc/src/java_bytecode/character_refine_preprocess.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Date: March 2017
1919
#include <util/bitvector_expr.h>
2020
#include <util/std_expr.h>
2121

22+
#include <goto-programs/goto_instruction_code.h>
23+
2224
/// converts based on a function on expressions
2325
/// \param expr_function: A reference to a function on expressions
2426
/// \param target: A position in a goto program

jbmc/src/java_bytecode/character_refine_preprocess.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Date: March 2017
2020
#ifndef CPROVER_JAVA_BYTECODE_CHARACTER_REFINE_PREPROCESS_H
2121
#define CPROVER_JAVA_BYTECODE_CHARACTER_REFINE_PREPROCESS_H
2222

23-
#include <goto-programs/goto_instruction_code.h>
24-
2523
#include <util/mp_arith.h>
26-
#include <util/std_code.h>
24+
#include <util/std_code_base.h>
2725

2826
#include <unordered_map>
2927

28+
class code_function_callt;
29+
3030
class character_refine_preprocesst
3131
{
3232
public:

jbmc/src/java_bytecode/ci_lazy_methods.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@ Author: Diffblue Ltd.
77
\*******************************************************************/
88

99
#include "ci_lazy_methods.h"
10-
#include "java_bytecode_language.h"
11-
#include "java_class_loader.h"
12-
#include "java_entry_point.h"
13-
#include "remove_exceptions.h"
1410

1511
#include <util/expr_iterator.h>
1612
#include <util/namespace.h>
1713
#include <util/suffix.h>
14+
#include <util/symbol_table.h>
1815

1916
#include <goto-programs/resolve_inherited_component.h>
2017

18+
#include "java_bytecode_language.h"
19+
#include "java_class_loader.h"
20+
#include "java_entry_point.h"
21+
#include "remove_exceptions.h"
22+
2123
/// Constructor for lazy-method loading
2224
/// \param symbol_table: the symbol table to use
2325
/// \param main_class: identifier of the entry point / main class

jbmc/src/java_bytecode/ci_lazy_methods_needed.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Author: Chris Smowton, [email protected]
1313

1414
#include <util/namespace.h>
1515
#include <util/std_types.h>
16-
#include <util/symbol_table.h>
16+
#include <util/symbol_table_base.h>
1717

1818
#include <goto-programs/resolve_inherited_component.h>
1919

jbmc/src/java_bytecode/code_with_references.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Author: Romain Brenguier, [email protected]
99
#include "code_with_references.h"
1010
#include "java_types.h"
1111

12-
#include <goto-programs/goto_instruction_code.h>
13-
1412
#include <util/arith_tools.h>
1513

1614
codet allocate_array(

jbmc/src/java_bytecode/create_array_with_type_intrinsic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Author: Diffblue Ltd.
1212
#ifndef CPROVER_JAVA_BYTECODE_CREATE_ARRAY_WITH_TYPE_INTRINSIC_H
1313
#define CPROVER_JAVA_BYTECODE_CREATE_ARRAY_WITH_TYPE_INTRINSIC_H
1414

15-
#include <util/std_code.h>
15+
#include <util/std_code_base.h>
1616

1717
class message_handlert;
1818
class symbol_table_baset;

jbmc/src/java_bytecode/java_bytecode_convert_class.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,20 @@ Author: Daniel Kroening, [email protected]
1515
#include <iostream>
1616
#endif
1717

18-
#include "ci_lazy_methods.h"
19-
#include "java_bytecode_convert_method.h"
2018
#include "java_root_class.h"
21-
#include "java_types.h"
22-
#include "java_utils.h"
2319

2420
#include <util/arith_tools.h>
2521
#include <util/expr_initializer.h>
2622
#include <util/namespace.h>
2723
#include <util/prefix.h>
2824
#include <util/std_expr.h>
25+
#include <util/symbol_table_base.h>
26+
27+
#include "ci_lazy_methods.h"
28+
#include "java_bytecode_convert_method.h"
29+
#include "java_string_library_preprocess.h"
30+
#include "java_types.h"
31+
#include "java_utils.h"
2932

3033
class java_bytecode_convert_classt
3134
{

jbmc/src/java_bytecode/java_bytecode_convert_method.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Author: Daniel Kroening, [email protected]
2626
#include <util/prefix.h>
2727
#include <util/prefix_filter.h> // IWYU pragma: keep
2828
#include <util/std_expr.h>
29+
#include <util/symbol_table_base.h>
2930
#include <util/threeval.h>
3031

3132
#include <goto-programs/resolve_inherited_component.h>

jbmc/src/java_bytecode/java_bytecode_convert_method.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,8 @@ Author: Daniel Kroening, [email protected]
1212
#ifndef CPROVER_JAVA_BYTECODE_JAVA_BYTECODE_CONVERT_METHOD_H
1313
#define CPROVER_JAVA_BYTECODE_JAVA_BYTECODE_CONVERT_METHOD_H
1414

15-
#include "ci_lazy_methods_needed.h"
1615
#include "java_bytecode_convert_method_class.h"
1716
#include "java_bytecode_parse_tree.h"
18-
#include "java_string_library_preprocess.h"
19-
20-
#include <util/message.h>
21-
#include <util/symbol_table.h>
2217

2318
class class_hierarchyt;
2419
class prefix_filtert;

jbmc/src/java_bytecode/java_bytecode_convert_method_class.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,24 @@ Author: Daniel Kroening, [email protected]
1212
#ifndef CPROVER_JAVA_BYTECODE_JAVA_BYTECODE_CONVERT_METHOD_CLASS_H
1313
#define CPROVER_JAVA_BYTECODE_JAVA_BYTECODE_CONVERT_METHOD_CLASS_H
1414

15-
#include "ci_lazy_methods_needed.h"
16-
#include "java_bytecode_parse_tree.h"
1715
#include "java_bytecode_convert_class.h"
1816

1917
#include <util/expanding_vector.h>
2018
#include <util/message.h>
19+
#include <util/namespace.h>
2120
#include <util/std_code.h>
2221
#include <util/std_expr.h>
2322

2423
#include <analyses/cfg_dominators.h>
2524

26-
#include <vector>
25+
#include "ci_lazy_methods_needed.h"
26+
#include "java_bytecode_parse_tree.h"
27+
2728
#include <list>
29+
#include <vector>
2830

2931
class class_hierarchyt;
3032
class prefix_filtert;
31-
class symbol_tablet;
3233
class symbolt;
3334

3435
class java_bytecode_convert_methodt

jbmc/src/java_bytecode/java_bytecode_instrument.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ Date: June 2017
1010

1111
#include "java_bytecode_instrument.h"
1212

13-
#include <goto-programs/goto_instruction_code.h>
14-
1513
#include <util/arith_tools.h>
1614
#include <util/c_types.h>
1715
#include <util/std_code.h>
18-
#include <util/symbol_table.h>
16+
#include <util/symbol_table_base.h>
17+
18+
#include <goto-programs/goto_instruction_code.h>
1919

2020
#include "java_expr.h"
2121
#include "java_types.h"

jbmc/src/java_bytecode/java_bytecode_instrument.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Date: June 2017
1717
class code_blockt;
1818
class message_handlert;
1919
class symbol_table_baset;
20-
class symbol_table_baset;
2120
class symbolt;
2221
class source_locationt;
2322

jbmc/src/java_bytecode/java_bytecode_internal_additions.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Author: Daniel Kroening, [email protected]
1313
#include "remove_exceptions.h"
1414

1515
#include <util/c_types.h>
16-
#include <util/cprover_prefix.h>
1716
#include <util/pointer_expr.h>
1817
#include <util/std_types.h>
1918
#include <util/symbol_table_base.h>

jbmc/src/java_bytecode/java_bytecode_language.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Author: Daniel Kroening, [email protected]
2121
#include <util/options.h>
2222
#include <util/prefix.h>
2323
#include <util/suffix.h>
24-
#include <util/symbol_table.h>
2524
#include <util/symbol_table_builder.h>
2625

2726
#include <json/json_parser.h>

jbmc/src/java_bytecode/java_bytecode_language.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,6 @@ Author: Daniel Kroening, [email protected]
181181
" (checked in this order).\n"
182182
// clang-format on
183183

184-
class symbolt;
185-
186184
enum lazy_methods_modet
187185
{
188186
LAZY_METHODS_MODE_EAGER,

jbmc/src/java_bytecode/java_bytecode_parser.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Author: Daniel Kroening, [email protected]
1818
#include <util/parser.h>
1919
#include <util/std_expr.h>
2020
#include <util/string_constant.h>
21-
#include <util/optional.h>
2221

2322
#include "bytecode_info.h"
2423
#include "java_bytecode_parse_tree.h"

jbmc/src/java_bytecode/java_bytecode_typecheck_expr.cpp

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

1212
#include "java_bytecode_typecheck.h"
1313

14-
#include <util/cprover_prefix.h>
1514
#include <util/pointer_expr.h>
16-
#include <util/prefix.h>
1715
#include <util/std_code.h>
1816

1917
#include "java_pointer_casts.h"

jbmc/src/java_bytecode/java_local_variable_table.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Author: Chris Smowton, [email protected]
1111

1212
#include "java_bytecode_convert_method_class.h"
1313

14-
#include "java_types.h"
15-
1614
#include <util/arith_tools.h>
1715
#include <util/invariant.h>
1816
#include <util/string2int.h>
19-
#include <util/symbol_table.h>
17+
#include <util/symbol_table_base.h>
18+
19+
#include "java_types.h"
2020

2121
#include <iostream>
2222

jbmc/src/java_bytecode/java_multi_path_symex_checker.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Author: Jeannie Moulton
99
#include "java_multi_path_symex_checker.h"
1010
#include "java_trace_validation.h"
1111

12-
#include <solvers/prop/prop.h>
13-
1412
goto_tracet java_multi_path_symex_checkert::build_full_trace() const
1513
{
1614
goto_tracet goto_trace = multi_path_symex_checkert::build_full_trace();

jbmc/src/java_bytecode/java_object_factory.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ Author: Daniel Kroening, [email protected]
1212
#include <util/array_element_from_pointer.h>
1313
#include <util/expr_initializer.h>
1414
#include <util/fresh_symbol.h>
15+
#include <util/interval_constraint.h>
1516
#include <util/message.h>
1617
#include <util/nondet_bool.h>
1718
#include <util/prefix.h>
19+
#include <util/symbol_table_base.h>
1820

1921
#include <goto-programs/class_identifier.h>
2022
#include <goto-programs/goto_functions.h>
21-
#include <util/interval_constraint.h>
2223

2324
#include "generic_parameter_specialization_map_keys.h"
2425
#include "java_object_factory_parameters.h"

jbmc/src/java_bytecode/java_root_class.h

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

1515
class struct_exprt;
1616
class struct_typet;
17-
class symbolt;
1817

1918
// adds expected members for a root class,
2019
// which is usually java.lang.Object

jbmc/src/java_bytecode/java_single_path_symex_checker.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Author: Jeannie Moulton
99
#include "java_single_path_symex_checker.h"
1010
#include "java_trace_validation.h"
1111

12-
#include <solvers/prop/prop.h>
13-
1412
goto_tracet java_single_path_symex_checkert::build_full_trace() const
1513
{
1614
goto_tracet goto_trace = single_path_symex_checkert::build_full_trace();

jbmc/src/java_bytecode/java_static_initializers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Author: Chris Smowton, [email protected]
1313
#include <util/json.h>
1414
#include <util/std_code.h>
1515
#include <util/suffix.h>
16-
#include <util/symbol_table.h>
16+
#include <util/symbol_table_base.h>
1717

1818
#include <goto-programs/class_hierarchy.h>
1919
#include <goto-programs/goto_instruction_code.h>

jbmc/src/java_bytecode/java_static_initializers.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,15 @@ Author: Chris Smowton, [email protected]
1414
#include <unordered_set>
1515

1616
#include <util/std_code.h>
17-
#include <util/symbol.h>
18-
19-
#include "code_with_references.h"
2017

2118
class ci_lazy_methods_neededt;
2219
class json_objectt;
2320
class message_handlert;
2421
class select_pointer_typet;
2522
class symbol_table_baset;
26-
class symbol_tablet;
23+
class symbolt;
2724
struct java_object_factory_parameterst;
25+
struct object_creation_referencet;
2826

2927
irep_idt clinit_wrapper_name(const irep_idt &class_name);
3028
irep_idt user_specified_clinit_name(const irep_idt &class_name);

jbmc/src/java_bytecode/java_string_library_preprocess.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,25 @@ Date: April 2017
1616
/// java standard library. In particular methods from java.lang.String,
1717
/// java.lang.StringBuilder, java.lang.StringBuffer.
1818

19-
#include <goto-programs/allocate_objects.h>
20-
#include <goto-programs/class_identifier.h>
19+
#include "java_string_library_preprocess.h"
2120

2221
#include <util/arith_tools.h>
2322
#include <util/bitvector_expr.h>
2423
#include <util/c_types.h>
2524
#include <util/expr_initializer.h>
2625
#include <util/floatbv_expr.h>
26+
#include <util/ieee_float.h>
2727
#include <util/refined_string_type.h>
2828
#include <util/std_code.h>
2929
#include <util/string_expr.h>
30+
#include <util/symbol_table_base.h>
31+
32+
#include <goto-programs/allocate_objects.h>
33+
#include <goto-programs/class_identifier.h>
3034

3135
#include "java_types.h"
3236
#include "java_utils.h"
3337

34-
#include "java_string_library_preprocess.h"
35-
3638
/// \return tag of a struct prefixed by "java::" or symbolic tag
3739
/// empty string if not symbol or struct
3840
static irep_idt get_tag(const typet &type)

jbmc/src/java_bytecode/java_string_library_preprocess.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,22 @@ Date: March 2017
1414
#ifndef CPROVER_JAVA_BYTECODE_JAVA_STRING_LIBRARY_PREPROCESS_H
1515
#define CPROVER_JAVA_BYTECODE_JAVA_STRING_LIBRARY_PREPROCESS_H
1616

17-
#include <util/std_code.h>
18-
#include <util/symbol_table.h>
1917
#include <util/refined_string_type.h>
18+
#include <util/std_code.h>
2019
#include <util/string_expr.h>
2120

22-
#include <util/ieee_float.h> // should get rid of this
23-
#include <util/optional.h>
21+
#include <goto-programs/goto_instruction_code.h>
2422

25-
#include <array>
26-
#include <unordered_set>
27-
#include <functional>
2823
#include "character_refine_preprocess.h"
2924
#include "java_types.h"
3025

26+
#include <array>
27+
#include <functional>
28+
#include <unordered_set>
29+
3130
class message_handlert;
31+
class symbol_table_baset;
32+
class symbolt;
3233

3334
// Arbitrary limit of 10 arguments for the number of arguments to String.format
3435
#define MAX_FORMAT_ARGS 10

jbmc/src/java_bytecode/java_string_literals.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ Author: Chris Smowton, [email protected]
2020
#include <util/symbol_table_base.h>
2121
#include <util/unicode.h>
2222

23-
#include <sstream>
24-
2523
/// Convert UCS-2 or UTF-16 to an array expression.
2624
/// \param in: wide string to convert
2725
/// \return Returns a Java char array containing the same wchars.

jbmc/src/java_bytecode/java_utils.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9-
#include "java_utils.h"
10-
119
#include "java_root_class.h"
12-
#include "java_string_library_preprocess.h"
1310

1411
#include <util/fresh_symbol.h>
1512
#include <util/invariant.h>
@@ -19,6 +16,10 @@ Author: Daniel Kroening, [email protected]
1916
#include <util/prefix.h>
2017
#include <util/std_types.h>
2118
#include <util/string_utils.h>
19+
#include <util/symbol_table_base.h>
20+
21+
#include "java_string_library_preprocess.h"
22+
#include "java_utils.h"
2223

2324
#include <set>
2425
#include <unordered_set>

0 commit comments

Comments
 (0)