Skip to content

Commit df18307

Browse files
committed
Remove unused includes list, functional from expr.h
This header file is widely used, and dragging in useless includes unnecessarily slows down compilation. Required fixes to files that actually do use std::list, which in turn invited further cleanup of includes.
1 parent f70bc55 commit df18307

File tree

10 files changed

+15
-11
lines changed

10 files changed

+15
-11
lines changed

src/ansi-c/ansi_c_convert_type.h

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

15+
#include <list>
16+
1517
#include <util/message.h>
1618

1719
#include "c_qualifiers.h"

src/assembler/assembler_parser.cpp

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

99
#include "assembler_parser.h"
1010

11-
#include <iostream>
12-
1311
assembler_parsert assembler_parser;
1412

1513
extern char *yyassemblertext;

src/assembler/assembler_parser.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Author: Daniel Kroening, [email protected]
1111
#define CPROVER_ASSEMBLER_ASSEMBLER_PARSER_H
1212

1313
#include <util/parser.h>
14-
#include <util/expr.h>
14+
15+
#include <list>
1516

1617
int yyassemblerlex();
1718
int yyassemblererror(const std::string &error);

src/cbmc/all_properties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Author: Daniel Kroening, [email protected]
2020
#include <util/xml.h>
2121
#include <util/json.h>
2222

23+
#include <solvers/prop/prop_conv.h>
2324
#include <solvers/sat/satcheck.h>
24-
#include <solvers/prop/literal_expr.h>
2525

2626
#include <goto-symex/build_goto_trace.h>
2727
#include <goto-programs/xml_goto_trace.h>

src/cbmc/all_properties_class.h

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

1515
#include <solvers/prop/cover_goals.h>
16+
#include <solvers/prop/literal_expr.h>
1617

1718
#include "bmc.h"
1819

src/cbmc/bmc_cover.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Author: Daniel Kroening, [email protected]
2121
#include <util/xml_irep.h>
2222

2323
#include <solvers/prop/cover_goals.h>
24-
#include <solvers/prop/literal_expr.h>
24+
#include <solvers/prop/prop_conv.h>
2525

2626
#include <goto-symex/build_goto_trace.h>
2727

src/solvers/flattening/arrays.h

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

15+
#include <list>
1516
#include <set>
1617

1718
#include <util/union_find.h>

src/solvers/prop/cover_goals.cpp

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

1212
#include "cover_goals.h"
1313

14-
#include <util/threeval.h>
15-
1614
#include "literal_expr.h"
15+
#include "prop_conv.h"
1716

1817
cover_goalst::~cover_goalst()
1918
{

src/solvers/prop/cover_goals.h

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

15+
#include <list>
16+
17+
#include <util/decision_procedure.h>
1518
#include <util/message.h>
1619

17-
#include "prop_conv.h"
20+
#include "literal.h"
21+
22+
class prop_convt;
1823

1924
/// Try to cover some given set of goals incrementally. This can be seen as a
2025
/// heuristic variant of SAT-based set-cover. No minimality guarantee.

src/util/expr.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ Author: Daniel Kroening, [email protected]
1515
#include "validate_types.h"
1616
#include "validation_mode.h"
1717

18-
#include <functional>
19-
#include <list>
20-
2118
#define forall_operands(it, expr) \
2219
if((expr).has_operands()) /* NOLINT(readability/braces) */ \
2320
for(exprt::operandst::const_iterator it=(expr).operands().begin(), \

0 commit comments

Comments
 (0)