diff --git a/CODING_STANDARD.md b/CODING_STANDARD.md index 7710858d3de..4d57b09da31 100644 --- a/CODING_STANDARD.md +++ b/CODING_STANDARD.md @@ -103,6 +103,10 @@ Here a few minimalistic coding rules for the CPROVER source tree. - Prefer forward declaration to includes, but forward declare at the top of the header file rather than in line - Guard headers with `#ifndef CPROVER_DIRECTORIES_FILE_H`, etc +- The corresponding header for a given source file should always be the *first* + include in the source file. For example, given `foo.h` and `foo.cpp`, the + line `#include "foo.h"` should precede all other include statements in + `foo.cpp`. # Makefiles - Each source file should appear on a separate line diff --git a/src/analyses/ai.cpp b/src/analyses/ai.cpp index 1eca272c19d..f7b95062134 100644 --- a/src/analyses/ai.cpp +++ b/src/analyses/ai.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Abstract Interpretation +#include "ai.h" + #include #include #include @@ -19,8 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "is_threaded.h" -#include "ai.h" - jsont ai_domain_baset::output_json( const ai_baset &ai, const namespacet &ns) const diff --git a/src/analyses/call_graph.cpp b/src/analyses/call_graph.cpp index 2d91e502a3f..a711c254c2e 100644 --- a/src/analyses/call_graph.cpp +++ b/src/analyses/call_graph.cpp @@ -9,11 +9,11 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Function Call Graphs +#include "call_graph.h" + #include #include -#include "call_graph.h" - call_grapht::call_grapht() { } diff --git a/src/analyses/constant_propagator.cpp b/src/analyses/constant_propagator.cpp index 15cda33e864..02913f9360a 100644 --- a/src/analyses/constant_propagator.cpp +++ b/src/analyses/constant_propagator.cpp @@ -9,6 +9,8 @@ Author: Peter Schrammel /// \file /// Constant Propagation +#include "constant_propagator.h" + #ifdef DEBUG #include #endif @@ -17,8 +19,6 @@ Author: Peter Schrammel #include #include -#include "constant_propagator.h" - exprt concatenate_array_id( const exprt &array, const exprt &index, const typet &type) diff --git a/src/analyses/custom_bitvector_analysis.cpp b/src/analyses/custom_bitvector_analysis.cpp index fd64d085850..da5bd52fb61 100644 --- a/src/analyses/custom_bitvector_analysis.cpp +++ b/src/analyses/custom_bitvector_analysis.cpp @@ -9,11 +9,11 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Field-insensitive, location-sensitive bitvector analysis +#include "custom_bitvector_analysis.h" + #include #include -#include "custom_bitvector_analysis.h" - #include void custom_bitvector_domaint::set_bit( diff --git a/src/analyses/dependence_graph.cpp b/src/analyses/dependence_graph.cpp index 4d9d37eae6d..9707f9a3eb9 100644 --- a/src/analyses/dependence_graph.cpp +++ b/src/analyses/dependence_graph.cpp @@ -12,6 +12,8 @@ Date: August 2013 /// \file /// Field-Sensitive Program Dependence Analysis, Litvak et al., FSE 2010 +#include "dependence_graph.h" + #include #include @@ -19,8 +21,6 @@ Date: August 2013 #include "goto_rw.h" -#include "dependence_graph.h" - bool dep_graph_domaint::merge( const dep_graph_domaint &src, goto_programt::const_targett from, diff --git a/src/analyses/dirty.cpp b/src/analyses/dirty.cpp index 9a42e7f0a0f..0231b50c77c 100644 --- a/src/analyses/dirty.cpp +++ b/src/analyses/dirty.cpp @@ -11,10 +11,10 @@ Date: March 2013 /// \file /// Local variables whose address is taken -#include - #include "dirty.h" +#include + void dirtyt::build(const goto_functiont &goto_function) { forall_goto_program_instructions(it, goto_function.body) diff --git a/src/analyses/does_remove_const.cpp b/src/analyses/does_remove_const.cpp index 90d82f99e19..9bf7c8b4285 100644 --- a/src/analyses/does_remove_const.cpp +++ b/src/analyses/does_remove_const.cpp @@ -9,6 +9,8 @@ /// \file /// Analyses +#include "does_remove_const.h" + #include #include #include @@ -16,8 +18,6 @@ #include #include -#include "does_remove_const.h" - /// A naive analysis to look for casts that remove const-ness from pointers. /// \param goto_program: the goto program to check /// \param ns: the namespace of the goto program (used for checking type diff --git a/src/analyses/does_remove_const.h b/src/analyses/does_remove_const.h index f0cf2a25799..3fe4bf8acd3 100644 --- a/src/analyses/does_remove_const.h +++ b/src/analyses/does_remove_const.h @@ -14,6 +14,8 @@ #include class goto_programt; +class namespacet; +class exprt; class does_remove_constt { diff --git a/src/analyses/escape_analysis.cpp b/src/analyses/escape_analysis.cpp index c7244605277..a9b7c71db08 100644 --- a/src/analyses/escape_analysis.cpp +++ b/src/analyses/escape_analysis.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Field-insensitive, location-sensitive escape analysis -#include - #include "escape_analysis.h" +#include + bool escape_domaint::is_tracked(const symbol_exprt &symbol) { const irep_idt &identifier=symbol.get_identifier(); diff --git a/src/analyses/flow_insensitive_analysis.cpp b/src/analyses/flow_insensitive_analysis.cpp index f6766038eba..b8ad09a4b5b 100644 --- a/src/analyses/flow_insensitive_analysis.cpp +++ b/src/analyses/flow_insensitive_analysis.cpp @@ -10,13 +10,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Flow Insensitive Static Analysis +#include "flow_insensitive_analysis.h" + #include #include #include -#include "flow_insensitive_analysis.h" - exprt flow_insensitive_abstract_domain_baset::get_guard( locationt from, locationt to) const diff --git a/src/analyses/goto_check.cpp b/src/analyses/goto_check.cpp index cddc054cc20..8fe596d9262 100644 --- a/src/analyses/goto_check.cpp +++ b/src/analyses/goto_check.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// GOTO Programs +#include "goto_check.h" + #include #include @@ -27,7 +29,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "local_bitvector_analysis.h" -#include "goto_check.h" class goto_checkt { diff --git a/src/analyses/goto_rw.cpp b/src/analyses/goto_rw.cpp index 73b7a8c3520..be3ef3e0a8d 100644 --- a/src/analyses/goto_rw.cpp +++ b/src/analyses/goto_rw.cpp @@ -8,6 +8,7 @@ Date: April 2010 \*******************************************************************/ +#include "goto_rw.h" #include #include @@ -24,8 +25,6 @@ Date: April 2010 #include -#include "goto_rw.h" - range_domain_baset::~range_domain_baset() { } diff --git a/src/analyses/interval_analysis.cpp b/src/analyses/interval_analysis.cpp index d81d857b1f8..c6d739c8bfd 100644 --- a/src/analyses/interval_analysis.cpp +++ b/src/analyses/interval_analysis.cpp @@ -9,10 +9,11 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Interval Analysis +#include "interval_analysis.h" + #include #include "interval_domain.h" -#include "interval_analysis.h" void instrument_intervals( const ait &interval_analysis, diff --git a/src/analyses/interval_domain.cpp b/src/analyses/interval_domain.cpp index 6dc4fd37fab..5f1b9a314b5 100644 --- a/src/analyses/interval_domain.cpp +++ b/src/analyses/interval_domain.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Interval Domain +#include "interval_domain.h" + #ifdef DEBUG #include #endif @@ -17,8 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "interval_domain.h" - void interval_domaint::output( std::ostream &out, const ai_baset &ai, diff --git a/src/analyses/invariant_propagation.cpp b/src/analyses/invariant_propagation.cpp index 8e93ce4ee17..97211760f52 100644 --- a/src/analyses/invariant_propagation.cpp +++ b/src/analyses/invariant_propagation.cpp @@ -9,13 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Invariant Propagation +#include "invariant_propagation.h" + #include #include #include #include -#include "invariant_propagation.h" - void invariant_propagationt::make_all_true() { for(auto &state : state_map) diff --git a/src/analyses/invariant_set.cpp b/src/analyses/invariant_set.cpp index 101a330d311..6127abdd57f 100644 --- a/src/analyses/invariant_set.cpp +++ b/src/analyses/invariant_set.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Invariant Set +#include "invariant_set.h" + #include #include @@ -22,8 +24,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "invariant_set.h" - void inv_object_storet::output(std::ostream &out) const { for(unsigned i=0; i - #include "invariant_set_domain.h" +#include + void invariant_set_domaint::transform( locationt from_l, locationt to_l, diff --git a/src/analyses/is_threaded.cpp b/src/analyses/is_threaded.cpp index 64b1e48f959..1ac32d2341c 100644 --- a/src/analyses/is_threaded.cpp +++ b/src/analyses/is_threaded.cpp @@ -11,9 +11,10 @@ Date: October 2012 /// \file /// Over-approximate Concurrency for Threaded Goto Programs -#include "ai.h" #include "is_threaded.h" +#include "ai.h" + class is_threaded_domaint:public ai_domain_baset { public: diff --git a/src/analyses/local_bitvector_analysis.cpp b/src/analyses/local_bitvector_analysis.cpp index 219d446eea2..f48b34a760d 100644 --- a/src/analyses/local_bitvector_analysis.cpp +++ b/src/analyses/local_bitvector_analysis.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Field-insensitive, location-sensitive may-alias analysis +#include "local_bitvector_analysis.h" + #include #include @@ -19,8 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "local_bitvector_analysis.h" - void local_bitvector_analysist::flagst::print(std::ostream &out) const { if(is_unknown()) diff --git a/src/analyses/local_cfg.cpp b/src/analyses/local_cfg.cpp index fffc5af7714..fca97f53e9b 100644 --- a/src/analyses/local_cfg.cpp +++ b/src/analyses/local_cfg.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// CFG for One Function +#include "local_cfg.h" + #if 0 #include #include @@ -22,8 +24,6 @@ Author: Daniel Kroening, kroening@kroening.com #endif -#include "local_cfg.h" - void local_cfgt::build(const goto_programt &goto_program) { nodes.resize(goto_program.instructions.size()); diff --git a/src/analyses/local_may_alias.cpp b/src/analyses/local_may_alias.cpp index 02a5c698186..e1af3b4e883 100644 --- a/src/analyses/local_may_alias.cpp +++ b/src/analyses/local_may_alias.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Field-insensitive, location-sensitive may-alias analysis +#include "local_may_alias.h" + #include #include @@ -19,8 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "local_may_alias.h" - /// \return return 'true' iff changed bool local_may_aliast::loc_infot::merge(const loc_infot &src) { diff --git a/src/analyses/locals.cpp b/src/analyses/locals.cpp index 09d7ebfe7c3..8d146f9713f 100644 --- a/src/analyses/locals.cpp +++ b/src/analyses/locals.cpp @@ -11,10 +11,10 @@ Date: March 2013 /// \file /// Local variables -#include - #include "locals.h" +#include + void localst::build(const goto_functiont &goto_function) { forall_goto_program_instructions(it, goto_function.body) diff --git a/src/analyses/natural_loops.cpp b/src/analyses/natural_loops.cpp index 57e835d7efe..7101613e417 100644 --- a/src/analyses/natural_loops.cpp +++ b/src/analyses/natural_loops.cpp @@ -9,10 +9,10 @@ Author: Georg Weissenbacher, georg@weissenbacher.name /// \file /// Dominators -#include - #include "natural_loops.h" +#include + void show_natural_loops(const goto_functionst &goto_functions) { forall_goto_functions(it, goto_functions) diff --git a/src/analyses/reaching_definitions.cpp b/src/analyses/reaching_definitions.cpp index 217bbb5f5d5..0e0462c3c8a 100644 --- a/src/analyses/reaching_definitions.cpp +++ b/src/analyses/reaching_definitions.cpp @@ -13,6 +13,8 @@ Date: February 2013 /// Range-based reaching definitions analysis (following Field- Sensitive /// Program Dependence Analysis, Litvak et al., FSE 2010) +#include "reaching_definitions.h" + #include #include @@ -21,8 +23,6 @@ Date: February 2013 #include "is_threaded.h" #include "dirty.h" -#include "reaching_definitions.h" - void rd_range_domaint::populate_cache(const irep_idt &identifier) const { assert(bv_container); diff --git a/src/analyses/replace_symbol_ext.cpp b/src/analyses/replace_symbol_ext.cpp index 75c697030b7..18e0474629b 100644 --- a/src/analyses/replace_symbol_ext.cpp +++ b/src/analyses/replace_symbol_ext.cpp @@ -9,11 +9,11 @@ Author: Peter Schrammel /// \file /// Modified expression replacement for constant propagator +#include "replace_symbol_ext.h" + #include #include -#include "replace_symbol_ext.h" - /// does not replace object in address_of expressions bool replace_symbol_extt::replace(exprt &dest) const { diff --git a/src/analyses/static_analysis.cpp b/src/analyses/static_analysis.cpp index dd6b8ac0f54..27acbbc365c 100644 --- a/src/analyses/static_analysis.cpp +++ b/src/analyses/static_analysis.cpp @@ -9,6 +9,9 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Value Set Propagation +#define USE_DEPRECATED_STATIC_ANALYSIS_H +#include "static_analysis.h" + #include #include @@ -17,9 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "is_threaded.h" -#define USE_DEPRECATED_STATIC_ANALYSIS_H -#include "static_analysis.h" - exprt static_analysis_baset::get_guard( locationt from, locationt to) diff --git a/src/analyses/uninitialized_domain.cpp b/src/analyses/uninitialized_domain.cpp index d042fa58767..48830ed204e 100644 --- a/src/analyses/uninitialized_domain.cpp +++ b/src/analyses/uninitialized_domain.cpp @@ -11,11 +11,11 @@ Date: January 2010 /// \file /// Detection for Uninitialized Local Variables +#include "uninitialized_domain.h" + #include #include -#include "uninitialized_domain.h" - void uninitialized_domaint::transform( locationt from, locationt to, diff --git a/src/ansi-c/anonymous_member.cpp b/src/ansi-c/anonymous_member.cpp index 197739f5941..524d725dd9c 100644 --- a/src/ansi-c/anonymous_member.cpp +++ b/src/ansi-c/anonymous_member.cpp @@ -9,11 +9,11 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// ANSI-C Language Type Checking +#include "anonymous_member.h" + #include #include -#include "anonymous_member.h" - static exprt make_member_expr( const exprt &struct_union, const struct_union_typet::componentt &component, diff --git a/src/ansi-c/ansi_c_convert_type.cpp b/src/ansi-c/ansi_c_convert_type.cpp index 7f42f94c8a2..23be0fdb935 100644 --- a/src/ansi-c/ansi_c_convert_type.cpp +++ b/src/ansi-c/ansi_c_convert_type.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// SpecC Language Conversion +#include "ansi_c_convert_type.h" + #include #include @@ -18,8 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "ansi_c_convert_type.h" - void ansi_c_convert_typet::read(const typet &type) { clear(); diff --git a/src/ansi-c/ansi_c_declaration.cpp b/src/ansi-c/ansi_c_declaration.cpp index 74915af0f42..a764ab1a639 100644 --- a/src/ansi-c/ansi_c_declaration.cpp +++ b/src/ansi-c/ansi_c_declaration.cpp @@ -9,14 +9,14 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// ANSI-C Language Type Checking +#include "ansi_c_declaration.h" + #include #include #include #include -#include "ansi_c_declaration.h" - void ansi_c_declaratort::build(irept &src) { typet *p=static_cast(&src); diff --git a/src/ansi-c/ansi_c_entry_point.cpp b/src/ansi-c/ansi_c_entry_point.cpp index 90f1fda46d4..c0cd29a3877 100644 --- a/src/ansi-c/ansi_c_entry_point.cpp +++ b/src/ansi-c/ansi_c_entry_point.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "ansi_c_entry_point.h" #include #include @@ -24,7 +25,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "ansi_c_entry_point.h" #include "c_nondet_symbol_factory.h" exprt::operandst build_function_environment( diff --git a/src/ansi-c/ansi_c_internal_additions.cpp b/src/ansi-c/ansi_c_internal_additions.cpp index 1468b5441b6..aa1d82e0102 100644 --- a/src/ansi-c/ansi_c_internal_additions.cpp +++ b/src/ansi-c/ansi_c_internal_additions.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "ansi_c_internal_additions.h" #include -#include "ansi_c_internal_additions.h" - const char gcc_builtin_headers_generic[]= "# 1 \"gcc_builtin_headers_generic.h\"\n" #include "gcc_builtin_headers_generic.inc" diff --git a/src/ansi-c/ansi_c_language.cpp b/src/ansi-c/ansi_c_language.cpp index 30f8b7b9b26..2147019fda9 100644 --- a/src/ansi-c/ansi_c_language.cpp +++ b/src/ansi-c/ansi_c_language.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "ansi_c_language.h" #include #include @@ -18,7 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "ansi_c_entry_point.h" -#include "ansi_c_language.h" #include "ansi_c_typecheck.h" #include "ansi_c_parser.h" #include "expr2c.h" diff --git a/src/ansi-c/ansi_c_parse_tree.cpp b/src/ansi-c/ansi_c_parse_tree.cpp index 4ae1f955ea0..f652c3b1e3a 100644 --- a/src/ansi-c/ansi_c_parse_tree.cpp +++ b/src/ansi-c/ansi_c_parse_tree.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "ansi_c_parse_tree.h" #include -#include "ansi_c_parse_tree.h" - void ansi_c_parse_treet::swap(ansi_c_parse_treet &ansi_c_parse_tree) { ansi_c_parse_tree.items.swap(items); diff --git a/src/ansi-c/ansi_c_parser.cpp b/src/ansi-c/ansi_c_parser.cpp index 6ce4f63b141..46d9f51d1b4 100644 --- a/src/ansi-c/ansi_c_parser.cpp +++ b/src/ansi-c/ansi_c_parser.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "ansi_c_parser.h" #include -#include "ansi_c_parser.h" #include "c_storage_spec.h" ansi_c_parsert ansi_c_parser; diff --git a/src/ansi-c/ansi_c_scope.cpp b/src/ansi-c/ansi_c_scope.cpp index 6a4a626b3f8..646a1d24ddd 100644 --- a/src/ansi-c/ansi_c_scope.cpp +++ b/src/ansi-c/ansi_c_scope.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "ansi_c_scope.h" #include -#include "ansi_c_scope.h" - void ansi_c_scopet::print(std::ostream &out) const { out << "Prefix: " << prefix << "\n"; diff --git a/src/ansi-c/c_misc.cpp b/src/ansi-c/c_misc.cpp index 6af272c86a0..5b1913bdf05 100644 --- a/src/ansi-c/c_misc.cpp +++ b/src/ansi-c/c_misc.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// ANSI-C Misc Utilities +#include "c_misc.h" + #include #ifdef _WIN32 @@ -17,8 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #endif #endif -#include "c_misc.h" - static void MetaChar(std::string &out, char c, bool inString) { switch(c) diff --git a/src/ansi-c/c_nondet_symbol_factory.cpp b/src/ansi-c/c_nondet_symbol_factory.cpp index 2b51ce8fb05..53f21aa5ab5 100644 --- a/src/ansi-c/c_nondet_symbol_factory.cpp +++ b/src/ansi-c/c_nondet_symbol_factory.cpp @@ -9,6 +9,8 @@ Author: DiffBlue Limited. All rights reserved. /// \file /// C Nondet Symbol Factory +#include "c_nondet_symbol_factory.h" + #include #include @@ -28,8 +30,6 @@ Author: DiffBlue Limited. All rights reserved. #include -#include "c_nondet_symbol_factory.h" - /// Create a new temporary static symbol /// \param symbol_table: The symbol table to create the symbol in /// \param loc: The location to assign to the symbol diff --git a/src/ansi-c/c_preprocess.cpp b/src/ansi-c/c_preprocess.cpp index 6ff6ec9cb21..6ba8e6f359b 100644 --- a/src/ansi-c/c_preprocess.cpp +++ b/src/ansi-c/c_preprocess.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "c_preprocess.h" #include #include @@ -31,8 +32,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "c_preprocess.h" - #define GCC_DEFINES_16 \ " -D__INT_MAX__=32767"\ " -D__CHAR_BIT__=8"\ diff --git a/src/ansi-c/c_qualifiers.cpp b/src/ansi-c/c_qualifiers.cpp index b4ac5650bf2..0802d144391 100644 --- a/src/ansi-c/c_qualifiers.cpp +++ b/src/ansi-c/c_qualifiers.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "c_qualifiers.h" #include -#include "c_qualifiers.h" - std::string c_qualifierst::as_string() const { std::string qualifiers; diff --git a/src/ansi-c/c_sizeof.cpp b/src/ansi-c/c_sizeof.cpp index 63518a5db36..fad6d00ce9f 100644 --- a/src/ansi-c/c_sizeof.cpp +++ b/src/ansi-c/c_sizeof.cpp @@ -9,13 +9,14 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Conversion of sizeof Expressions -#include +#include "c_sizeof.h" + #include #include #include #include +#include -#include "c_sizeof.h" #include "c_typecast.h" exprt c_sizeoft::sizeof_rec(const typet &type) diff --git a/src/ansi-c/c_storage_spec.cpp b/src/ansi-c/c_storage_spec.cpp index 993a93f724e..5ed8314bd42 100644 --- a/src/ansi-c/c_storage_spec.cpp +++ b/src/ansi-c/c_storage_spec.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "c_storage_spec.h" #include -#include "c_storage_spec.h" - void c_storage_spect::read(const typet &type) { if(type.id()==ID_merged_type || diff --git a/src/ansi-c/c_typecast.cpp b/src/ansi-c/c_typecast.cpp index 6af56f507bd..ce451e79f75 100644 --- a/src/ansi-c/c_typecast.cpp +++ b/src/ansi-c/c_typecast.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "c_typecast.h" #include @@ -20,7 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "c_typecast.h" #include "c_qualifiers.h" bool c_implicit_typecast( diff --git a/src/ansi-c/c_typecheck_argc_argv.cpp b/src/ansi-c/c_typecheck_argc_argv.cpp index 5b6b11c8c1f..879887db5b2 100644 --- a/src/ansi-c/c_typecheck_argc_argv.cpp +++ b/src/ansi-c/c_typecheck_argc_argv.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// ANSI-C Conversion / Type Checking -#include - #include "c_typecheck_base.h" +#include + void c_typecheck_baset::add_argc_argv(const symbolt &main_symbol) { const code_typet::parameterst ¶meters= diff --git a/src/ansi-c/c_typecheck_base.cpp b/src/ansi-c/c_typecheck_base.cpp index d77d0576880..391039691c4 100644 --- a/src/ansi-c/c_typecheck_base.cpp +++ b/src/ansi-c/c_typecheck_base.cpp @@ -9,11 +9,12 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// ANSI-C Conversion / Type Checking +#include "c_typecheck_base.h" + #include #include #include -#include "c_typecheck_base.h" #include "expr2c.h" #include "type2name.h" #include "c_storage_spec.h" diff --git a/src/ansi-c/c_typecheck_code.cpp b/src/ansi-c/c_typecheck_code.cpp index b02e6c29718..9715fc2e4d3 100644 --- a/src/ansi-c/c_typecheck_code.cpp +++ b/src/ansi-c/c_typecheck_code.cpp @@ -9,11 +9,12 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// C Language Type Checking +#include "c_typecheck_base.h" + #include #include #include "ansi_c_declaration.h" -#include "c_typecheck_base.h" void c_typecheck_baset::start_typecheck_code() { diff --git a/src/ansi-c/c_typecheck_expr.cpp b/src/ansi-c/c_typecheck_expr.cpp index f010ff0dccc..677a0c78152 100644 --- a/src/ansi-c/c_typecheck_expr.cpp +++ b/src/ansi-c/c_typecheck_expr.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// ANSI-C Language Type Checking +#include "c_typecheck_base.h" + #include #include @@ -24,7 +26,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "c_typecast.h" -#include "c_typecheck_base.h" #include "c_sizeof.h" #include "c_qualifiers.h" #include "string_constant.h" diff --git a/src/ansi-c/c_typecheck_initializer.cpp b/src/ansi-c/c_typecheck_initializer.cpp index 2edf574243d..fd098259796 100644 --- a/src/ansi-c/c_typecheck_initializer.cpp +++ b/src/ansi-c/c_typecheck_initializer.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// ANSI-C Conversion / Type Checking +#include "c_typecheck_base.h" + #include #include #include @@ -19,7 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "c_typecheck_base.h" #include "string_constant.h" #include "anonymous_member.h" diff --git a/src/ansi-c/c_typecheck_type.cpp b/src/ansi-c/c_typecheck_type.cpp index aa5217b79c5..6abcf8f81a2 100644 --- a/src/ansi-c/c_typecheck_type.cpp +++ b/src/ansi-c/c_typecheck_type.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// C++ Language Type Checking +#include "c_typecheck_base.h" + #include #include @@ -18,7 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "c_typecheck_base.h" #include "c_sizeof.h" #include "c_qualifiers.h" #include "ansi_c_declaration.h" diff --git a/src/ansi-c/c_typecheck_typecast.cpp b/src/ansi-c/c_typecheck_typecast.cpp index 62069d90feb..2ce03d83f18 100644 --- a/src/ansi-c/c_typecheck_typecast.cpp +++ b/src/ansi-c/c_typecheck_typecast.cpp @@ -6,9 +6,9 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "c_typecheck_base.h" #include "c_typecast.h" -#include "c_typecheck_base.h" void c_typecheck_baset::implicit_typecast( exprt &expr, diff --git a/src/ansi-c/cprover_library.cpp b/src/ansi-c/cprover_library.cpp index 6b7f05af994..8f99f987bf3 100644 --- a/src/ansi-c/cprover_library.cpp +++ b/src/ansi-c/cprover_library.cpp @@ -6,12 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "cprover_library.h" #include #include -#include "cprover_library.h" #include "ansi_c_language.h" struct cprover_library_entryt diff --git a/src/ansi-c/designator.cpp b/src/ansi-c/designator.cpp index 1d54f11d5f1..d3902115a68 100644 --- a/src/ansi-c/designator.cpp +++ b/src/ansi-c/designator.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// ANSI-C Language Type Checking -#include - #include "designator.h" +#include + void designatort::print(std::ostream &out) const { for(index_listt::const_iterator it=index_list.begin(); diff --git a/src/ansi-c/expr2c.cpp b/src/ansi-c/expr2c.cpp index 311b780cd7c..9c980cc842a 100644 --- a/src/ansi-c/expr2c.cpp +++ b/src/ansi-c/expr2c.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "expr2c.h" #include #include @@ -38,7 +39,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "c_misc.h" #include "c_qualifiers.h" -#include "expr2c.h" #include "expr2c_class.h" /* diff --git a/src/ansi-c/literals/convert_character_literal.cpp b/src/ansi-c/literals/convert_character_literal.cpp index 3d0dd9c9a82..7ce010bdb43 100644 --- a/src/ansi-c/literals/convert_character_literal.cpp +++ b/src/ansi-c/literals/convert_character_literal.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// C Language Conversion +#include "convert_character_literal.h" + #include #include @@ -16,7 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "unescape_string.h" -#include "convert_character_literal.h" exprt convert_character_literal( const std::string &src, diff --git a/src/ansi-c/literals/convert_float_literal.cpp b/src/ansi-c/literals/convert_float_literal.cpp index 00e98d7f7bb..8838a2e3492 100644 --- a/src/ansi-c/literals/convert_float_literal.cpp +++ b/src/ansi-c/literals/convert_float_literal.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// C++ Language Conversion +#include "convert_float_literal.h" + #include #include @@ -20,7 +22,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "parse_float.h" -#include "convert_float_literal.h" exprt convert_float_literal(const std::string &src) { diff --git a/src/ansi-c/literals/convert_integer_literal.cpp b/src/ansi-c/literals/convert_integer_literal.cpp index d14c5c92b24..7123f2dddd8 100644 --- a/src/ansi-c/literals/convert_integer_literal.cpp +++ b/src/ansi-c/literals/convert_integer_literal.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// C++ Language Conversion +#include "convert_integer_literal.h" + #include #include @@ -18,8 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "convert_integer_literal.h" - exprt convert_integer_literal(const std::string &src) { bool is_unsigned=false, is_imaginary=false; diff --git a/src/ansi-c/literals/convert_string_literal.cpp b/src/ansi-c/literals/convert_string_literal.cpp index a32a4fb0c93..7167bdd8175 100644 --- a/src/ansi-c/literals/convert_string_literal.cpp +++ b/src/ansi-c/literals/convert_string_literal.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// C/C++ Language Conversion +#include "convert_string_literal.h" + #include #include @@ -18,7 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "../string_constant.h" #include "unescape_string.h" -#include "convert_string_literal.h" std::basic_string convert_one_string_literal( const std::string &src) diff --git a/src/ansi-c/literals/parse_float.cpp b/src/ansi-c/literals/parse_float.cpp index e5c67ea4d70..d6b85acecbb 100644 --- a/src/ansi-c/literals/parse_float.cpp +++ b/src/ansi-c/literals/parse_float.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Conversion of Expressions -#include - #include "parse_float.h" +#include + void parse_float( const std::string &src, mp_integer &significand, diff --git a/src/ansi-c/literals/unescape_string.cpp b/src/ansi-c/literals/unescape_string.cpp index 1ca8edc7cad..ab633795dec 100644 --- a/src/ansi-c/literals/unescape_string.cpp +++ b/src/ansi-c/literals/unescape_string.cpp @@ -9,13 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// ANSI-C Language Conversion +#include "unescape_string.h" + #include #include #include -#include "unescape_string.h" - static void append_universal_char( unsigned int value, std::string &dest) diff --git a/src/ansi-c/padding.cpp b/src/ansi-c/padding.cpp index 4973354e503..e7219fd615a 100644 --- a/src/ansi-c/padding.cpp +++ b/src/ansi-c/padding.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// C++ Language Type Checking +#include "padding.h" + #include #include @@ -16,8 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "padding.h" - mp_integer alignment(const typet &type, const namespacet &ns) { // we need to consider a number of different cases: diff --git a/src/ansi-c/preprocessor_line.cpp b/src/ansi-c/preprocessor_line.cpp index b3b2ea1e2c5..b43b1fc4bb4 100644 --- a/src/ansi-c/preprocessor_line.cpp +++ b/src/ansi-c/preprocessor_line.cpp @@ -9,13 +9,14 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// ANSI-C Language Conversion +#include "preprocessor_line.h" + #include #include #include #include "literals/unescape_string.h" -#include "preprocessor_line.h" void preprocessor_line( const char *text, diff --git a/src/ansi-c/printf_formatter.cpp b/src/ansi-c/printf_formatter.cpp index 52f9c7e6384..1cbbf879546 100644 --- a/src/ansi-c/printf_formatter.cpp +++ b/src/ansi-c/printf_formatter.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// printf Formatting +#include "printf_formatter.h" + #include #include @@ -16,8 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "printf_formatter.h" - const exprt printf_formattert::make_type( const exprt &src, const typet &dest) { diff --git a/src/ansi-c/string_constant.cpp b/src/ansi-c/string_constant.cpp index 05f99c85e5a..3c083e4c32e 100644 --- a/src/ansi-c/string_constant.cpp +++ b/src/ansi-c/string_constant.cpp @@ -6,13 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "string_constant.h" #include #include #include -#include "string_constant.h" - string_constantt::string_constantt(): exprt(ID_string_constant) { diff --git a/src/ansi-c/type2name.cpp b/src/ansi-c/type2name.cpp index e9a564d35b2..edc5c51f87b 100644 --- a/src/ansi-c/type2name.cpp +++ b/src/ansi-c/type2name.cpp @@ -9,14 +9,14 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// Type Naming for C +#include "type2name.h" + #include #include #include #include #include -#include "type2name.h" - typedef std::unordered_map, irep_id_hash> symbol_numbert; diff --git a/src/ansi-c/type2name.h b/src/ansi-c/type2name.h index b8d2d5c0e05..e86b4f8b400 100644 --- a/src/ansi-c/type2name.h +++ b/src/ansi-c/type2name.h @@ -16,6 +16,8 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include +class namespacet; + std::string type2name(const typet &type); std::string type2name(const typet &type, const namespacet &ns); diff --git a/src/assembler/assembler_parser.cpp b/src/assembler/assembler_parser.cpp index c4be4aa2bfe..1ad30f95680 100644 --- a/src/assembler/assembler_parser.cpp +++ b/src/assembler/assembler_parser.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "assembler_parser.h" #include -#include "assembler_parser.h" - assembler_parsert assembler_parser; extern char *yyassemblertext; diff --git a/src/cbmc/all_properties.cpp b/src/cbmc/all_properties.cpp index bd9c5242dd4..f91fd5c52c3 100644 --- a/src/cbmc/all_properties.cpp +++ b/src/cbmc/all_properties.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution of ANSI-C +#include "all_properties_class.h" + #include #include @@ -24,8 +26,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "bv_cbmc.h" -#include "all_properties_class.h" - void bmc_all_propertiest::goal_covered(const cover_goalst::goalt &) { for(auto &g : goal_map) diff --git a/src/cbmc/bmc.cpp b/src/cbmc/bmc.cpp index f92483d2441..6d44147ec2a 100644 --- a/src/cbmc/bmc.cpp +++ b/src/cbmc/bmc.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution of ANSI-C +#include "bmc.h" + #include #include #include @@ -40,7 +42,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "counterexample_beautification.h" #include "fault_localization.h" -#include "bmc.h" void bmct::do_unwind_module() { diff --git a/src/cbmc/bmc_cover.cpp b/src/cbmc/bmc_cover.cpp index 28deebef173..8485988b4a2 100644 --- a/src/cbmc/bmc_cover.cpp +++ b/src/cbmc/bmc_cover.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Test-Suite Generation with BMC +#include "bmc.h" + #include #include @@ -24,7 +26,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "bmc.h" #include "bv_cbmc.h" class bmc_covert: diff --git a/src/cbmc/bv_cbmc.cpp b/src/cbmc/bv_cbmc.cpp index 1d0ddb384f9..e1652695796 100644 --- a/src/cbmc/bv_cbmc.cpp +++ b/src/cbmc/bv_cbmc.cpp @@ -6,12 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "bv_cbmc.h" #include #include -#include "bv_cbmc.h" - bvt bv_cbmct::convert_waitfor(const exprt &expr) { if(expr.operands().size()!=4) diff --git a/src/cbmc/cbmc_dimacs.cpp b/src/cbmc/cbmc_dimacs.cpp index 8584c8fac4b..fc28153edc0 100644 --- a/src/cbmc/cbmc_dimacs.cpp +++ b/src/cbmc/cbmc_dimacs.cpp @@ -9,13 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Writing DIMACS Files +#include "cbmc_dimacs.h" + #include #include #include -#include "cbmc_dimacs.h" - bool cbmc_dimacst::write_dimacs(const std::string &filename) { if(filename.empty() || filename=="-") diff --git a/src/cbmc/cbmc_languages.cpp b/src/cbmc/cbmc_languages.cpp index 2f44ea7c979..06b919b9cc4 100644 --- a/src/cbmc/cbmc_languages.cpp +++ b/src/cbmc/cbmc_languages.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Language Registration +#include "cbmc_parse_options.h" + #include #include @@ -19,8 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #endif -#include "cbmc_parse_options.h" - void cbmc_parse_optionst::register_languages() { register_language(new_ansi_c_language); diff --git a/src/cbmc/cbmc_main.cpp b/src/cbmc/cbmc_main.cpp index e5e679a8d0e..3a35c6bb197 100644 --- a/src/cbmc/cbmc_main.cpp +++ b/src/cbmc/cbmc_main.cpp @@ -17,14 +17,14 @@ Author: Daniel Kroening, kroening@kroening.com */ +#include "cbmc_parse_options.h" + #include #ifdef IREP_HASH_STATS #include #endif -#include "cbmc_parse_options.h" - #ifdef IREP_HASH_STATS extern unsigned long long irep_hash_cnt; extern unsigned long long irep_cmp_cnt; diff --git a/src/cbmc/cbmc_parse_options.cpp b/src/cbmc/cbmc_parse_options.cpp index d2f1c178d8e..65a4386077b 100644 --- a/src/cbmc/cbmc_parse_options.cpp +++ b/src/cbmc/cbmc_parse_options.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// CBMC Command Line Option Processing +#include "cbmc_parse_options.h" + #include #include // exit() #include @@ -58,7 +60,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "cbmc_solvers.h" -#include "cbmc_parse_options.h" #include "bmc.h" #include "version.h" #include "xml_interface.h" diff --git a/src/cbmc/cbmc_solvers.cpp b/src/cbmc/cbmc_solvers.cpp index 2fb47bf2396..d3198249558 100644 --- a/src/cbmc/cbmc_solvers.cpp +++ b/src/cbmc/cbmc_solvers.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Solvers for VCs Generated by Symbolic Execution of ANSI-C +#include "cbmc_solvers.h" + #include #include #include @@ -23,7 +25,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "cbmc_solvers.h" #include "bv_cbmc.h" #include "cbmc_dimacs.h" #include "counterexample_beautification.h" diff --git a/src/cbmc/counterexample_beautification.cpp b/src/cbmc/counterexample_beautification.cpp index 334366ca8f2..3cee2da664b 100644 --- a/src/cbmc/counterexample_beautification.cpp +++ b/src/cbmc/counterexample_beautification.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Counterexample Beautification using Incremental SAT +#include "counterexample_beautification.h" + #include #include #include @@ -17,8 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "counterexample_beautification.h" - void counterexample_beautificationt::get_minimization_list( prop_convt &prop_conv, const symex_target_equationt &equation, diff --git a/src/cbmc/fault_localization.cpp b/src/cbmc/fault_localization.cpp index 2beae26ff79..414c30e5e9a 100644 --- a/src/cbmc/fault_localization.cpp +++ b/src/cbmc/fault_localization.cpp @@ -9,6 +9,8 @@ Author: Peter Schrammel /// \file /// Fault Localization +#include "fault_localization.h" + #include #include #include @@ -21,7 +23,6 @@ Author: Peter Schrammel #include -#include "fault_localization.h" #include "counterexample_beautification.h" void fault_localizationt::freeze_guards() diff --git a/src/cbmc/show_vcc.cpp b/src/cbmc/show_vcc.cpp index f7a777173ce..f42f2dcdd13 100644 --- a/src/cbmc/show_vcc.cpp +++ b/src/cbmc/show_vcc.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution of ANSI-C +#include "bmc.h" + #include #include @@ -21,8 +23,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "bmc.h" - void bmct::show_vcc_plain(std::ostream &out) { out << "\n" << "VERIFICATION CONDITIONS:" << "\n" << "\n"; diff --git a/src/cbmc/symex_bmc.cpp b/src/cbmc/symex_bmc.cpp index ce6afc9dfa2..e0906fec06d 100644 --- a/src/cbmc/symex_bmc.cpp +++ b/src/cbmc/symex_bmc.cpp @@ -9,13 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Bounded Model Checking for ANSI-C +#include "symex_bmc.h" + #include #include #include -#include "symex_bmc.h" - symex_bmct::symex_bmct( const namespacet &_ns, symbol_tablet &_new_symbol_table, diff --git a/src/cbmc/symex_coverage.cpp b/src/cbmc/symex_coverage.cpp index 8f41ece7667..f9ac9cc207d 100644 --- a/src/cbmc/symex_coverage.cpp +++ b/src/cbmc/symex_coverage.cpp @@ -11,6 +11,8 @@ Date: March 2016 /// \file /// Record and print code coverage of symbolic execution +#include "symex_coverage.h" + #include #include #include @@ -24,8 +26,6 @@ Date: March 2016 #include #include -#include "symex_coverage.h" - class coverage_recordt { public: diff --git a/src/cbmc/xml_interface.cpp b/src/cbmc/xml_interface.cpp index da58cfe12c5..09856b69bff 100644 --- a/src/cbmc/xml_interface.cpp +++ b/src/cbmc/xml_interface.cpp @@ -9,14 +9,14 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// XML Interface +#include "xml_interface.h" + #include #include #include -#include "xml_interface.h" - /// XML User Interface void xml_interfacet::get_xml_options(cmdlinet &cmdline) { diff --git a/src/clobber/clobber_main.cpp b/src/clobber/clobber_main.cpp index 16e2a286900..e63a9d63e49 100644 --- a/src/clobber/clobber_main.cpp +++ b/src/clobber/clobber_main.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symex Main Module -#include - #include "clobber_parse_options.h" +#include + #ifdef _MSC_VER int wmain(int argc, const wchar_t **argv_wide) { diff --git a/src/clobber/clobber_parse_options.cpp b/src/clobber/clobber_parse_options.cpp index 6537445e88b..36cc3e49abc 100644 --- a/src/clobber/clobber_parse_options.cpp +++ b/src/clobber/clobber_parse_options.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symex Command Line Options Processing +#include "clobber_parse_options.h" + #include #include #include @@ -37,7 +39,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "clobber_parse_options.h" // #include "clobber_instrumenter.h" clobber_parse_optionst::clobber_parse_optionst(int argc, const char **argv): diff --git a/src/cpp/cpp_constructor.cpp b/src/cpp/cpp_constructor.cpp index 44f458162fa..e584d25fc45 100644 --- a/src/cpp/cpp_constructor.cpp +++ b/src/cpp/cpp_constructor.cpp @@ -9,12 +9,13 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include #include #include -#include "cpp_typecheck.h" #include "cpp_util.h" /// \param object: non-typechecked object diff --git a/src/cpp/cpp_convert_type.cpp b/src/cpp/cpp_convert_type.cpp index e1ea09606a4..cd552871b96 100644 --- a/src/cpp/cpp_convert_type.cpp +++ b/src/cpp/cpp_convert_type.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Conversion +#include "cpp_convert_type.h" + #include #include @@ -17,7 +19,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include -#include "cpp_convert_type.h" #include "cpp_declaration.h" #include "cpp_name.h" diff --git a/src/cpp/cpp_declaration.cpp b/src/cpp/cpp_declaration.cpp index 432390c79bc..a01afe82aa3 100644 --- a/src/cpp/cpp_declaration.cpp +++ b/src/cpp/cpp_declaration.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking -#include - #include "cpp_declaration.h" +#include + void cpp_declarationt::output(std::ostream &out) const { out << "is_template: " << is_template() << "\n"; diff --git a/src/cpp/cpp_declarator.cpp b/src/cpp/cpp_declarator.cpp index cbf97d6a06e..1b9df60f2d3 100644 --- a/src/cpp/cpp_declarator.cpp +++ b/src/cpp/cpp_declarator.cpp @@ -9,11 +9,11 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_declarator.h" + #include #include -#include "cpp_declarator.h" - void cpp_declaratort::output(std::ostream &out) const { out << " name: " << name().pretty() << "\n"; diff --git a/src/cpp/cpp_declarator_converter.cpp b/src/cpp/cpp_declarator_converter.cpp index 986da53bb11..a843328bbd4 100644 --- a/src/cpp/cpp_declarator_converter.cpp +++ b/src/cpp/cpp_declarator_converter.cpp @@ -9,13 +9,14 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_declarator_converter.h" + #include #include #include #include "cpp_type2name.h" -#include "cpp_declarator_converter.h" #include "cpp_typecheck.h" cpp_declarator_convertert::cpp_declarator_convertert( diff --git a/src/cpp/cpp_destructor.cpp b/src/cpp/cpp_destructor.cpp index 00137a3138a..6f4157c15f0 100644 --- a/src/cpp/cpp_destructor.cpp +++ b/src/cpp/cpp_destructor.cpp @@ -9,12 +9,12 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include #include -#include "cpp_typecheck.h" - /// \return typechecked code codet cpp_typecheckt::cpp_destructor( const source_locationt &source_location, diff --git a/src/cpp/cpp_enum_type.cpp b/src/cpp/cpp_enum_type.cpp index 7d2c1de8e64..d9a8d2e1efe 100644 --- a/src/cpp/cpp_enum_type.cpp +++ b/src/cpp/cpp_enum_type.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking -#include - #include "cpp_enum_type.h" +#include + cpp_enum_typet::cpp_enum_typet():typet(ID_c_enum) { } diff --git a/src/cpp/cpp_id.cpp b/src/cpp/cpp_id.cpp index 7a18c134ba0..e6c13ca4cfb 100644 --- a/src/cpp/cpp_id.cpp +++ b/src/cpp/cpp_id.cpp @@ -9,9 +9,10 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_id.h" + #include -#include "cpp_id.h" #include "cpp_scope.h" cpp_idt::cpp_idt(): diff --git a/src/cpp/cpp_instantiate_template.cpp b/src/cpp/cpp_instantiate_template.cpp index 5ed613f9258..c28fe5ca546 100644 --- a/src/cpp/cpp_instantiate_template.cpp +++ b/src/cpp/cpp_instantiate_template.cpp @@ -9,13 +9,14 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include #include #include #include "cpp_type2name.h" -#include "cpp_typecheck.h" std::string cpp_typecheckt::template_suffix( const cpp_template_args_tct &template_args) diff --git a/src/cpp/cpp_internal_additions.cpp b/src/cpp/cpp_internal_additions.cpp index cd80ac8f298..78384905a83 100644 --- a/src/cpp/cpp_internal_additions.cpp +++ b/src/cpp/cpp_internal_additions.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "cpp_internal_additions.h" #include @@ -13,8 +14,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "cpp_internal_additions.h" - std::string c2cpp(const std::string &s) { std::string result; diff --git a/src/cpp/cpp_language.cpp b/src/cpp/cpp_language.cpp index 3843038950a..59e538265cb 100644 --- a/src/cpp/cpp_language.cpp +++ b/src/cpp/cpp_language.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Module +#include "cpp_language.h" + #include #include #include @@ -23,7 +25,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include #include "cpp_internal_additions.h" -#include "cpp_language.h" #include "expr2cpp.h" #include "cpp_parser.h" #include "cpp_typecheck.h" diff --git a/src/cpp/cpp_name.cpp b/src/cpp/cpp_name.cpp index cdc3806c489..1206ade0a71 100644 --- a/src/cpp/cpp_name.cpp +++ b/src/cpp/cpp_name.cpp @@ -9,11 +9,11 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_name.h" + #include #include -#include "cpp_name.h" - irep_idt cpp_namet::get_base_name() const { const subt &sub=get_sub(); diff --git a/src/cpp/cpp_namespace_spec.cpp b/src/cpp/cpp_namespace_spec.cpp index c4b60e3eb24..2254f2b7d34 100644 --- a/src/cpp/cpp_namespace_spec.cpp +++ b/src/cpp/cpp_namespace_spec.cpp @@ -9,9 +9,10 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_namespace_spec.h" + #include -#include "cpp_namespace_spec.h" #include "cpp_item.h" void cpp_namespace_spect::output(std::ostream &out) const diff --git a/src/cpp/cpp_parser.cpp b/src/cpp/cpp_parser.cpp index fd0135bb259..eae4728bbc4 100644 --- a/src/cpp/cpp_parser.cpp +++ b/src/cpp/cpp_parser.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Parser -#include - #include "cpp_parser.h" +#include + cpp_parsert cpp_parser; bool cpp_parse(); diff --git a/src/cpp/cpp_scope.cpp b/src/cpp/cpp_scope.cpp index 0594660ffe6..c3849384d67 100644 --- a/src/cpp/cpp_scope.cpp +++ b/src/cpp/cpp_scope.cpp @@ -9,9 +9,10 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking -#include "cpp_typecheck.h" #include "cpp_scope.h" +#include "cpp_typecheck.h" + std::ostream &operator << (std::ostream &out, cpp_scopet::lookup_kindt kind) { switch(kind) diff --git a/src/cpp/cpp_scopes.cpp b/src/cpp/cpp_scopes.cpp index 2a9496fe7cd..71a6b1edfbf 100644 --- a/src/cpp/cpp_scopes.cpp +++ b/src/cpp/cpp_scopes.cpp @@ -9,11 +9,10 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking -#include - - #include "cpp_scopes.h" +#include + cpp_scopet &cpp_scopest::new_block_scope() { unsigned prefix=++current_scope().compound_counter; diff --git a/src/cpp/cpp_token_buffer.cpp b/src/cpp/cpp_token_buffer.cpp index dcd17a6266c..472a4333cfd 100644 --- a/src/cpp/cpp_token_buffer.cpp +++ b/src/cpp/cpp_token_buffer.cpp @@ -9,13 +9,13 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Parser: Token Buffer +#include "cpp_token_buffer.h" + #include #include #include -#include "cpp_token_buffer.h" - int cpp_token_buffert::LookAhead(unsigned offset) { assert(current_pos<=token_vector.size()); diff --git a/src/cpp/cpp_type2name.cpp b/src/cpp/cpp_type2name.cpp index c92c32eb2a2..f40af724134 100644 --- a/src/cpp/cpp_type2name.cpp +++ b/src/cpp/cpp_type2name.cpp @@ -9,13 +9,13 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Module +#include "cpp_type2name.h" + #include #include #include -#include "cpp_type2name.h" - static std::string do_prefix(const std::string &s) { if(s.find(',')!=std::string::npos || diff --git a/src/cpp/cpp_type2name.h b/src/cpp/cpp_type2name.h index 96aa6b58d8c..1f5015c076a 100644 --- a/src/cpp/cpp_type2name.h +++ b/src/cpp/cpp_type2name.h @@ -16,6 +16,8 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include +class exprt; + std::string cpp_type2name(const typet &type); std::string cpp_expr2name(const exprt &expr); diff --git a/src/cpp/cpp_typecheck.cpp b/src/cpp/cpp_typecheck.cpp index 827f3421315..e87efb885fb 100644 --- a/src/cpp/cpp_typecheck.cpp +++ b/src/cpp/cpp_typecheck.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include #include @@ -18,7 +20,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include #include -#include "cpp_typecheck.h" #include "expr2cpp.h" #include "cpp_convert_type.h" #include "cpp_declarator.h" diff --git a/src/cpp/cpp_typecheck_bases.cpp b/src/cpp/cpp_typecheck_bases.cpp index 9d8060301d5..c076d1e131b 100644 --- a/src/cpp/cpp_typecheck_bases.cpp +++ b/src/cpp/cpp_typecheck_bases.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking -#include - #include "cpp_typecheck.h" +#include + void cpp_typecheckt::typecheck_compound_bases(struct_typet &type) { std::set bases; diff --git a/src/cpp/cpp_typecheck_code.cpp b/src/cpp/cpp_typecheck_code.cpp index 88cc259d0ab..4613918ce8f 100644 --- a/src/cpp/cpp_typecheck_code.cpp +++ b/src/cpp/cpp_typecheck_code.cpp @@ -9,9 +9,10 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include -#include "cpp_typecheck.h" #include "cpp_convert_type.h" #include "cpp_declarator_converter.h" #include "cpp_template_type.h" diff --git a/src/cpp/cpp_typecheck_compound_type.cpp b/src/cpp/cpp_typecheck_compound_type.cpp index 8bb655da6e4..12fbfa67849 100644 --- a/src/cpp/cpp_typecheck_compound_type.cpp +++ b/src/cpp/cpp_typecheck_compound_type.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include #include @@ -19,7 +21,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include "cpp_type2name.h" #include "cpp_declarator_converter.h" -#include "cpp_typecheck.h" #include "cpp_convert_type.h" #include "cpp_name.h" diff --git a/src/cpp/cpp_typecheck_constructor.cpp b/src/cpp/cpp_typecheck_constructor.cpp index 32981b866c3..cfc645c5cb2 100644 --- a/src/cpp/cpp_typecheck_constructor.cpp +++ b/src/cpp/cpp_typecheck_constructor.cpp @@ -9,13 +9,14 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include #include #include #include -#include "cpp_typecheck.h" #include "cpp_util.h" /// \param parent_base_name: base name of typechecked parent diff --git a/src/cpp/cpp_typecheck_conversions.cpp b/src/cpp/cpp_typecheck_conversions.cpp index dc28db9d1c5..4b76a2ebd40 100644 --- a/src/cpp/cpp_typecheck_conversions.cpp +++ b/src/cpp/cpp_typecheck_conversions.cpp @@ -9,6 +9,8 @@ Module: C++ Language Type Checking /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include #include @@ -20,8 +22,6 @@ Module: C++ Language Type Checking #include #include -#include "cpp_typecheck.h" - /// Lvalue-to-rvalue conversion /// /// An lvalue (3.10) of a non-function, non-array type T can be diff --git a/src/cpp/cpp_typecheck_declaration.cpp b/src/cpp/cpp_typecheck_declaration.cpp index 8568b525a91..c91c8d979cf 100644 --- a/src/cpp/cpp_typecheck_declaration.cpp +++ b/src/cpp/cpp_typecheck_declaration.cpp @@ -10,6 +10,7 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// C++ Language Type Checking #include "cpp_typecheck.h" + #include "cpp_declarator_converter.h" void cpp_typecheckt::convert(cpp_declarationt &declaration) diff --git a/src/cpp/cpp_typecheck_enum_type.cpp b/src/cpp/cpp_typecheck_enum_type.cpp index a470b2c66f7..74a18107622 100644 --- a/src/cpp/cpp_typecheck_enum_type.cpp +++ b/src/cpp/cpp_typecheck_enum_type.cpp @@ -9,12 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include #include #include -#include "cpp_typecheck.h" #include "cpp_enum_type.h" void cpp_typecheckt::typecheck_enum_body(symbolt &enum_symbol) diff --git a/src/cpp/cpp_typecheck_expr.cpp b/src/cpp/cpp_typecheck_expr.cpp index 10c0b1c9b53..e54f69589ff 100644 --- a/src/cpp/cpp_typecheck_expr.cpp +++ b/src/cpp/cpp_typecheck_expr.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include #include @@ -25,7 +27,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include #include "cpp_type2name.h" -#include "cpp_typecheck.h" #include "cpp_convert_type.h" #include "cpp_exception_id.h" #include "expr2cpp.h" diff --git a/src/cpp/cpp_typecheck_fargs.cpp b/src/cpp/cpp_typecheck_fargs.cpp index d3f6a4767e0..6f6f905c327 100644 --- a/src/cpp/cpp_typecheck_fargs.cpp +++ b/src/cpp/cpp_typecheck_fargs.cpp @@ -9,13 +9,14 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck_fargs.h" + #include #include #include -#include "cpp_typecheck_fargs.h" #include "cpp_typecheck.h" bool cpp_typecheck_fargst::has_class_type() const diff --git a/src/cpp/cpp_typecheck_fargs.h b/src/cpp/cpp_typecheck_fargs.h index 5b6a62e0b4a..fac18356d7f 100644 --- a/src/cpp/cpp_typecheck_fargs.h +++ b/src/cpp/cpp_typecheck_fargs.h @@ -15,6 +15,7 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include class cpp_typecheckt; +class code_typet; class cpp_typecheck_fargst // for function overloading { diff --git a/src/cpp/cpp_typecheck_function.cpp b/src/cpp/cpp_typecheck_function.cpp index 5dd98b47336..06739870df6 100644 --- a/src/cpp/cpp_typecheck_function.cpp +++ b/src/cpp/cpp_typecheck_function.cpp @@ -9,10 +9,11 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include #include "cpp_template_type.h" -#include "cpp_typecheck.h" #include "cpp_type2name.h" #include "cpp_util.h" diff --git a/src/cpp/cpp_typecheck_initializer.cpp b/src/cpp/cpp_typecheck_initializer.cpp index c6352f25fcf..e492a170cbf 100644 --- a/src/cpp/cpp_typecheck_initializer.cpp +++ b/src/cpp/cpp_typecheck_initializer.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include #include @@ -16,7 +18,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include #include -#include "cpp_typecheck.h" #include "cpp_util.h" /// Initialize an object with a value diff --git a/src/cpp/cpp_typecheck_method_bodies.cpp b/src/cpp/cpp_typecheck_method_bodies.cpp index d37b686a215..5e134f79558 100644 --- a/src/cpp/cpp_typecheck_method_bodies.cpp +++ b/src/cpp/cpp_typecheck_method_bodies.cpp @@ -6,7 +6,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu \*******************************************************************/ - /// \file /// C++ Language Type Checking diff --git a/src/cpp/cpp_typecheck_namespace.cpp b/src/cpp/cpp_typecheck_namespace.cpp index 437a874aebd..c3ae770ad90 100644 --- a/src/cpp/cpp_typecheck_namespace.cpp +++ b/src/cpp/cpp_typecheck_namespace.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking -#include - #include "cpp_typecheck.h" +#include + void cpp_typecheckt::convert(cpp_namespace_spect &namespace_spec) { // save the scope diff --git a/src/cpp/cpp_typecheck_resolve.cpp b/src/cpp/cpp_typecheck_resolve.cpp index 5de6c9f5514..28d42e6af62 100644 --- a/src/cpp/cpp_typecheck_resolve.cpp +++ b/src/cpp/cpp_typecheck_resolve.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck_resolve.h" + #include #include @@ -22,7 +24,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include #include "cpp_typecheck.h" -#include "cpp_typecheck_resolve.h" #include "cpp_template_type.h" #include "cpp_type2name.h" #include "cpp_util.h" diff --git a/src/cpp/cpp_typecheck_resolve.h b/src/cpp/cpp_typecheck_resolve.h index 1b6e1af615a..a10e0c32ee5 100644 --- a/src/cpp/cpp_typecheck_resolve.h +++ b/src/cpp/cpp_typecheck_resolve.h @@ -15,6 +15,7 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include "cpp_typecheck_fargs.h" #include "cpp_name.h" #include "cpp_template_args.h" +#include "cpp_scopes.h" class cpp_typecheck_resolvet { diff --git a/src/cpp/cpp_typecheck_static_assert.cpp b/src/cpp/cpp_typecheck_static_assert.cpp index e72dc318095..d5d862772df 100644 --- a/src/cpp/cpp_typecheck_static_assert.cpp +++ b/src/cpp/cpp_typecheck_static_assert.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking -#include - #include "cpp_typecheck.h" +#include + void cpp_typecheckt::convert(cpp_static_assertt &cpp_static_assert) { typecheck_expr(cpp_static_assert.op0()); diff --git a/src/cpp/cpp_typecheck_template.cpp b/src/cpp/cpp_typecheck_template.cpp index 4ce4c55919a..47ebd7f006e 100644 --- a/src/cpp/cpp_typecheck_template.cpp +++ b/src/cpp/cpp_typecheck_template.cpp @@ -9,10 +9,11 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include #include "cpp_type2name.h" -#include "cpp_typecheck.h" #include "cpp_declarator_converter.h" #include "cpp_template_type.h" #include "cpp_convert_type.h" diff --git a/src/cpp/cpp_typecheck_type.cpp b/src/cpp/cpp_typecheck_type.cpp index 376efd6f9e1..cf392b2957c 100644 --- a/src/cpp/cpp_typecheck_type.cpp +++ b/src/cpp/cpp_typecheck_type.cpp @@ -9,12 +9,13 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include #include #include -#include "cpp_typecheck.h" #include "cpp_convert_type.h" #include "expr2cpp.h" diff --git a/src/cpp/cpp_typecheck_using.cpp b/src/cpp/cpp_typecheck_using.cpp index 8a67e6a4092..07796c4f1b8 100644 --- a/src/cpp/cpp_typecheck_using.cpp +++ b/src/cpp/cpp_typecheck_using.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking -#include - #include "cpp_typecheck.h" +#include + void cpp_typecheckt::convert(cpp_usingt &cpp_using) { // there are two forms of using clauses: diff --git a/src/cpp/cpp_typecheck_virtual_table.cpp b/src/cpp/cpp_typecheck_virtual_table.cpp index 4e766297206..b36e42d1320 100644 --- a/src/cpp/cpp_typecheck_virtual_table.cpp +++ b/src/cpp/cpp_typecheck_virtual_table.cpp @@ -9,11 +9,11 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking +#include "cpp_typecheck.h" + #include #include -#include "cpp_typecheck.h" - void cpp_typecheckt::do_virtual_table(const symbolt &symbol) { assert(symbol.type.id()==ID_struct); diff --git a/src/cpp/cpp_util.cpp b/src/cpp/cpp_util.cpp index e41ba6871fc..0e040b378a0 100644 --- a/src/cpp/cpp_util.cpp +++ b/src/cpp/cpp_util.cpp @@ -6,12 +6,11 @@ \*******************************************************************/ +#include "cpp_util.h" #include #include -#include "cpp_util.h" - exprt cpp_symbol_expr(const symbolt &symbol) { exprt tmp(ID_symbol, symbol.type); diff --git a/src/cpp/expr2cpp.cpp b/src/cpp/expr2cpp.cpp index 1ed9ff738c4..7327811ac5c 100644 --- a/src/cpp/expr2cpp.cpp +++ b/src/cpp/expr2cpp.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@cs.cmu.edu \*******************************************************************/ +#include "expr2cpp.h" #include @@ -20,8 +21,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include #include -#include "expr2cpp.h" - class expr2cppt:public expr2ct { public: diff --git a/src/cpp/parse.cpp b/src/cpp/parse.cpp index baa831d2cd4..a2cd41a8dd2 100644 --- a/src/cpp/parse.cpp +++ b/src/cpp/parse.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Parsing +#include "cpp_parser.h" + #include #include @@ -20,7 +22,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include #include "cpp_token_buffer.h" -#include "cpp_parser.h" #include "cpp_member_spec.h" #include "cpp_enum_type.h" diff --git a/src/cpp/template_map.cpp b/src/cpp/template_map.cpp index a76fac96a42..4df80e3a089 100644 --- a/src/cpp/template_map.cpp +++ b/src/cpp/template_map.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@cs.cmu.edu /// \file /// C++ Language Type Checking -#include - #include "template_map.h" +#include + void template_mapt::apply(typet &type) const { if(type.id()==ID_array) diff --git a/src/goto-analyzer/goto_analyzer_main.cpp b/src/goto-analyzer/goto_analyzer_main.cpp index 64e14c74936..8e367dd7ebc 100644 --- a/src/goto-analyzer/goto_analyzer_main.cpp +++ b/src/goto-analyzer/goto_analyzer_main.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Goto-Analyser Main Module -#include - #include "goto_analyzer_parse_options.h" +#include + #ifdef _MSC_VER int wmain(int argc, const wchar_t **argv_wide) { diff --git a/src/goto-analyzer/goto_analyzer_parse_options.cpp b/src/goto-analyzer/goto_analyzer_parse_options.cpp index 904ab58768e..91e7694aba4 100644 --- a/src/goto-analyzer/goto_analyzer_parse_options.cpp +++ b/src/goto-analyzer/goto_analyzer_parse_options.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Goto-Analyser Command Line Option Processing +#include "goto_analyzer_parse_options.h" + #include // exit() #include #include @@ -48,7 +50,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_analyzer_parse_options.h" #include "taint_analysis.h" #include "unreachable_instructions.h" #include "static_analyzer.h" diff --git a/src/goto-analyzer/static_analyzer.cpp b/src/goto-analyzer/static_analyzer.cpp index 4125e5d44cb..e92a8da8d68 100644 --- a/src/goto-analyzer/static_analyzer.cpp +++ b/src/goto-analyzer/static_analyzer.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "static_analyzer.h" #include @@ -15,8 +16,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "static_analyzer.h" - class static_analyzert:public messaget { public: diff --git a/src/goto-analyzer/taint_analysis.cpp b/src/goto-analyzer/taint_analysis.cpp index 7e59ac5c399..51374223840 100644 --- a/src/goto-analyzer/taint_analysis.cpp +++ b/src/goto-analyzer/taint_analysis.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Taint Analysis +#include "taint_analysis.h" + #include #include @@ -22,7 +24,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "taint_analysis.h" #include "taint_parser.h" class taint_analysist:public messaget diff --git a/src/goto-analyzer/taint_parser.cpp b/src/goto-analyzer/taint_parser.cpp index 234a8e53c3b..58ef09f18a4 100644 --- a/src/goto-analyzer/taint_parser.cpp +++ b/src/goto-analyzer/taint_parser.cpp @@ -9,14 +9,14 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Taint Parser +#include "taint_parser.h" + #include #include #include -#include "taint_parser.h" - bool taint_parser( const std::string &file_name, taint_parse_treet &dest, diff --git a/src/goto-analyzer/unreachable_instructions.cpp b/src/goto-analyzer/unreachable_instructions.cpp index 77f97d31d58..44a4e8cd9bf 100644 --- a/src/goto-analyzer/unreachable_instructions.cpp +++ b/src/goto-analyzer/unreachable_instructions.cpp @@ -11,6 +11,8 @@ Date: April 2016 /// \file /// List all unreachable instructions +#include "unreachable_instructions.h" + #include #include @@ -22,8 +24,6 @@ Date: April 2016 #include #include -#include "unreachable_instructions.h" - typedef std::map dead_mapt; static void unreachable_instructions( diff --git a/src/goto-cc/armcc_cmdline.cpp b/src/goto-cc/armcc_cmdline.cpp index 2512e1f0abb..9cb3fccfd03 100644 --- a/src/goto-cc/armcc_cmdline.cpp +++ b/src/goto-cc/armcc_cmdline.cpp @@ -9,11 +9,11 @@ Author: Daniel Kroening /// \file /// A special command line object to mimic ARM's armcc +#include "armcc_cmdline.h" + #include #include -#include "armcc_cmdline.h" - /// parses the command line options into a cmdlinet /// \par parameters: argument count, argument strings /// \return none diff --git a/src/goto-cc/armcc_mode.cpp b/src/goto-cc/armcc_mode.cpp index 65eebddb0c3..b297ade1246 100644 --- a/src/goto-cc/armcc_mode.cpp +++ b/src/goto-cc/armcc_mode.cpp @@ -9,6 +9,8 @@ Author: CM Wintersteiger, 2006 /// \file /// Command line option container +#include "armcc_mode.h" + #ifdef _WIN32 #define EX_OK 0 #define EX_USAGE 64 @@ -24,7 +26,6 @@ Author: CM Wintersteiger, 2006 #include #include -#include "armcc_mode.h" #include "compile.h" /// does it. diff --git a/src/goto-cc/as86_cmdline.cpp b/src/goto-cc/as86_cmdline.cpp index b319c177410..e60f0152bc0 100644 --- a/src/goto-cc/as86_cmdline.cpp +++ b/src/goto-cc/as86_cmdline.cpp @@ -9,13 +9,13 @@ Author: Michael Tautschnig /// \file /// A special command line object for as86 (of Bruce's C Compiler) +#include "as86_cmdline.h" + #include #include #include -#include "as86_cmdline.h" - // non-as86 options const char *goto_as86_options_with_argument[]= { diff --git a/src/goto-cc/as_cmdline.cpp b/src/goto-cc/as_cmdline.cpp index 52f7f06a251..172b281458f 100644 --- a/src/goto-cc/as_cmdline.cpp +++ b/src/goto-cc/as_cmdline.cpp @@ -9,13 +9,13 @@ Author: Michael Tautschnig /// \file /// A special command line object for GNU Assembler +#include "as_cmdline.h" + #include #include #include -#include "as_cmdline.h" - // non-as options const char *goto_as_options_with_argument[]= { diff --git a/src/goto-cc/as_mode.cpp b/src/goto-cc/as_mode.cpp index 0c1f17c627f..da39c28a90b 100644 --- a/src/goto-cc/as_mode.cpp +++ b/src/goto-cc/as_mode.cpp @@ -9,6 +9,8 @@ Author: Michael Tautschnig /// \file /// Assembler Mode +#include "as_mode.h" + #ifdef _WIN32 #define EX_OK 0 #define EX_USAGE 64 @@ -31,8 +33,6 @@ Author: Michael Tautschnig #include "compile.h" -#include "as_mode.h" - static std::string assembler_name( const cmdlinet &cmdline, const std::string &base_name) diff --git a/src/goto-cc/bcc_cmdline.cpp b/src/goto-cc/bcc_cmdline.cpp index ba1db68dcdc..c4cbbc80b3f 100644 --- a/src/goto-cc/bcc_cmdline.cpp +++ b/src/goto-cc/bcc_cmdline.cpp @@ -9,13 +9,13 @@ Author: Michael Tautschnig /// \file /// A special command line object for Bruce's C Compiler +#include "bcc_cmdline.h" + #include #include #include -#include "bcc_cmdline.h" - // non-bcc options const char *goto_bcc_options_with_argument[]= { diff --git a/src/goto-cc/compile.cpp b/src/goto-cc/compile.cpp index 16363fa2e32..96b76260e96 100644 --- a/src/goto-cc/compile.cpp +++ b/src/goto-cc/compile.cpp @@ -11,6 +11,8 @@ Date: June 2006 /// \file /// Compile and link source and object files. +#include "compile.h" + #include #include #include @@ -40,8 +42,6 @@ Date: June 2006 #include -#include "compile.h" - #define DOTGRAPHSETTINGS "color=black;" \ "orientation=portrait;" \ "fontsize=20;"\ diff --git a/src/goto-cc/cw_mode.cpp b/src/goto-cc/cw_mode.cpp index 46746ae529e..ee84c58959b 100644 --- a/src/goto-cc/cw_mode.cpp +++ b/src/goto-cc/cw_mode.cpp @@ -9,6 +9,8 @@ Author: CM Wintersteiger, 2006 /// \file /// Command line option container +#include "cw_mode.h" + #ifdef _WIN32 #define EX_OK 0 #define EX_USAGE 64 @@ -24,7 +26,6 @@ Author: CM Wintersteiger, 2006 #include #include -#include "cw_mode.h" #include "compile.h" /// does it. diff --git a/src/goto-cc/gcc_cmdline.cpp b/src/goto-cc/gcc_cmdline.cpp index 61d07b265d2..c5b4057ed14 100644 --- a/src/goto-cc/gcc_cmdline.cpp +++ b/src/goto-cc/gcc_cmdline.cpp @@ -9,6 +9,8 @@ Author: CM Wintersteiger, 2006 /// \file /// A special command line object for the gcc-like options +#include "gcc_cmdline.h" + #include #include #include @@ -16,8 +18,6 @@ Author: CM Wintersteiger, 2006 #include -#include "gcc_cmdline.h" - /// parses the command line options into a cmdlinet /// \par parameters: argument count, argument strings /// \return none diff --git a/src/goto-cc/gcc_mode.cpp b/src/goto-cc/gcc_mode.cpp index 18c6763fb47..a001d4c2ddf 100644 --- a/src/goto-cc/gcc_mode.cpp +++ b/src/goto-cc/gcc_mode.cpp @@ -9,6 +9,8 @@ Author: CM Wintersteiger, 2006 /// \file /// GCC Mode +#include "gcc_mode.h" + #ifdef _WIN32 #define EX_OK 0 #define EX_USAGE 64 @@ -33,7 +35,6 @@ Author: CM Wintersteiger, 2006 #include #include "compile.h" -#include "gcc_mode.h" static std::string compiler_name( const cmdlinet &cmdline, diff --git a/src/goto-cc/goto_cc_cmdline.cpp b/src/goto-cc/goto_cc_cmdline.cpp index a9090012ad1..71bb06f8160 100644 --- a/src/goto-cc/goto_cc_cmdline.cpp +++ b/src/goto-cc/goto_cc_cmdline.cpp @@ -11,6 +11,8 @@ Date: April 2010 /// \file /// Command line interpretation for goto-cc +#include "goto_cc_cmdline.h" + #include #include #include @@ -19,8 +21,6 @@ Date: April 2010 #include #include -#include "goto_cc_cmdline.h" - goto_cc_cmdlinet::~goto_cc_cmdlinet() { if(!stdin_file.empty()) diff --git a/src/goto-cc/goto_cc_languages.cpp b/src/goto-cc/goto_cc_languages.cpp index 0c076187ee7..12ea70c04e7 100644 --- a/src/goto-cc/goto_cc_languages.cpp +++ b/src/goto-cc/goto_cc_languages.cpp @@ -9,6 +9,8 @@ Author: CM Wintersteiger /// \file /// Language Registration +#include "goto_cc_mode.h" + #include #include @@ -20,8 +22,6 @@ Author: CM Wintersteiger #include #endif -#include "goto_cc_mode.h" - void goto_cc_modet::register_languages() { register_language(new_ansi_c_language); diff --git a/src/goto-cc/goto_cc_mode.cpp b/src/goto-cc/goto_cc_mode.cpp index 8822122d022..f398864b6c2 100644 --- a/src/goto-cc/goto_cc_mode.cpp +++ b/src/goto-cc/goto_cc_mode.cpp @@ -9,6 +9,8 @@ Author: CM Wintersteiger, 2006 /// \file /// Command line option container +#include "goto_cc_mode.h" + #include #include @@ -22,8 +24,6 @@ Author: CM Wintersteiger, 2006 #include -#include "goto_cc_mode.h" - /// constructor goto_cc_modet::goto_cc_modet( goto_cc_cmdlinet &_cmdline, diff --git a/src/goto-cc/ld_cmdline.cpp b/src/goto-cc/ld_cmdline.cpp index 45a7fab5b99..1f17dabd105 100644 --- a/src/goto-cc/ld_cmdline.cpp +++ b/src/goto-cc/ld_cmdline.cpp @@ -9,13 +9,13 @@ Author: Daniel Kroening, 2013 /// \file /// A special command line object for the ld-like options +#include "ld_cmdline.h" + #include #include #include -#include "ld_cmdline.h" - /// parses the command line options into a cmdlinet /// \par parameters: argument count, argument strings /// \return none diff --git a/src/goto-cc/ms_cl_cmdline.cpp b/src/goto-cc/ms_cl_cmdline.cpp index fdc59879298..ea605ef6d82 100644 --- a/src/goto-cc/ms_cl_cmdline.cpp +++ b/src/goto-cc/ms_cl_cmdline.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening /// \file /// A special command line object for the CL options +#include "ms_cl_cmdline.h" + #include #include #include @@ -17,8 +19,6 @@ Author: Daniel Kroening #include -#include "ms_cl_cmdline.h" - /// parses the command line options into a cmdlinet /// \par parameters: argument count, argument strings /// \return none diff --git a/src/goto-cc/ms_cl_mode.cpp b/src/goto-cc/ms_cl_mode.cpp index 615bf6e03b0..946a6454710 100644 --- a/src/goto-cc/ms_cl_mode.cpp +++ b/src/goto-cc/ms_cl_mode.cpp @@ -9,6 +9,8 @@ Author: CM Wintersteiger, 2006 /// \file /// Visual Studio CL Mode +#include "ms_cl_mode.h" + #ifdef _WIN32 #define EX_OK 0 #define EX_USAGE 64 @@ -27,7 +29,6 @@ Author: CM Wintersteiger, 2006 #include -#include "ms_cl_mode.h" #include "compile.h" /// does it. diff --git a/src/goto-cc/xml_binaries/read_goto_object.cpp b/src/goto-cc/xml_binaries/read_goto_object.cpp index 5a2f24bf58d..24dde49bec9 100644 --- a/src/goto-cc/xml_binaries/read_goto_object.cpp +++ b/src/goto-cc/xml_binaries/read_goto_object.cpp @@ -11,6 +11,8 @@ Date: June 2006 /// \file /// Read goto object files. +#include "read_goto_object.h" + #include #include #include @@ -20,7 +22,6 @@ Date: June 2006 #include -#include "read_goto_object.h" #include "xml_goto_function_hashing.h" #include "xml_irep_hashing.h" #include "xml_symbol_hashing.h" diff --git a/src/goto-cc/xml_binaries/xml_goto_function.cpp b/src/goto-cc/xml_binaries/xml_goto_function.cpp index 589838154fe..7475a990a4b 100644 --- a/src/goto-cc/xml_binaries/xml_goto_function.cpp +++ b/src/goto-cc/xml_binaries/xml_goto_function.cpp @@ -11,9 +11,10 @@ Date: June 2006 /// \file /// Convert goto functions to xml structures and back. +#include "xml_goto_function.h" + #include -#include "xml_goto_function.h" #include "xml_goto_program.h" /// takes a goto_function and creates an according xml structure diff --git a/src/goto-cc/xml_binaries/xml_goto_function_hashing.cpp b/src/goto-cc/xml_binaries/xml_goto_function_hashing.cpp index 23769f5b441..a0a2f428dab 100644 --- a/src/goto-cc/xml_binaries/xml_goto_function_hashing.cpp +++ b/src/goto-cc/xml_binaries/xml_goto_function_hashing.cpp @@ -13,6 +13,7 @@ Date: July 2006 /// Convert goto functions to xml structures and back (with irep hashing) #include "xml_goto_function_hashing.h" + #include "xml_goto_program_hashing.h" /// takes a goto_function and creates an according xml structure diff --git a/src/goto-cc/xml_binaries/xml_goto_program.cpp b/src/goto-cc/xml_binaries/xml_goto_program.cpp index 9ab9c77db93..1f12fcff98f 100644 --- a/src/goto-cc/xml_binaries/xml_goto_program.cpp +++ b/src/goto-cc/xml_binaries/xml_goto_program.cpp @@ -11,13 +11,13 @@ Date: June 2006 /// \file /// Convert goto programs to xml structures and back. +#include "xml_goto_program.h" + #include #include #include -#include "xml_goto_program.h" - /// constructs the xml structure according to the goto program and the namespace /// into the given xml object. /// \par parameters: goto program, namespace and an xml structure to fill diff --git a/src/goto-cc/xml_binaries/xml_goto_program_hashing.cpp b/src/goto-cc/xml_binaries/xml_goto_program_hashing.cpp index 5097fd6e3e0..129f90dd9d6 100644 --- a/src/goto-cc/xml_binaries/xml_goto_program_hashing.cpp +++ b/src/goto-cc/xml_binaries/xml_goto_program_hashing.cpp @@ -12,11 +12,12 @@ Date: July 2006 /// \file /// Convert goto programs to xml structures and back (with irep hashing) +#include "xml_goto_program_hashing.h" + #include #include #include "xml_irep_hashing.h" -#include "xml_goto_program_hashing.h" /// constructs the xml structure according to the goto program and the namespace /// into the given xml object. diff --git a/src/goto-cc/xml_binaries/xml_irep_hashing.cpp b/src/goto-cc/xml_binaries/xml_irep_hashing.cpp index 1469965839e..312a076befe 100644 --- a/src/goto-cc/xml_binaries/xml_irep_hashing.cpp +++ b/src/goto-cc/xml_binaries/xml_irep_hashing.cpp @@ -11,10 +11,11 @@ Date: July 2006 /// \file /// XML-irep conversions with hashing +#include "xml_irep_hashing.h" + #include #include -#include "xml_irep_hashing.h" #include "string_hash.h" void xml_irep_convertt::convert( diff --git a/src/goto-cc/xml_binaries/xml_symbol.cpp b/src/goto-cc/xml_binaries/xml_symbol.cpp index a323d4ef2ab..0fa7acd8069 100644 --- a/src/goto-cc/xml_binaries/xml_symbol.cpp +++ b/src/goto-cc/xml_binaries/xml_symbol.cpp @@ -11,9 +11,10 @@ Date: June 2006 /// \file /// Compile and link source and object files. -#include "xml_irep.h" #include "xml_symbol.h" +#include "xml_irep.h" + /// converts a symbol to an xml symbol node /// \par parameters: a symbol and an xml node /// \return none diff --git a/src/goto-cc/xml_binaries/xml_symbol_hashing.cpp b/src/goto-cc/xml_binaries/xml_symbol_hashing.cpp index 862522451e1..e666487df76 100644 --- a/src/goto-cc/xml_binaries/xml_symbol_hashing.cpp +++ b/src/goto-cc/xml_binaries/xml_symbol_hashing.cpp @@ -11,9 +11,10 @@ Date: July 2006 /// \file /// XML-symbol conversions with irep hashing -#include "xml_symbol_hashing.h" #include "xml_irep_hashing.h" +#include "xml_symbol_hashing.h" + /// converts a symbol to an xml symbol node /// \par parameters: a symbol and an xml node /// \return none diff --git a/src/goto-diff/change_impact.cpp b/src/goto-diff/change_impact.cpp index c7ea9a77712..44946ab2f4c 100644 --- a/src/goto-diff/change_impact.cpp +++ b/src/goto-diff/change_impact.cpp @@ -11,6 +11,8 @@ Date: April 2016 /// \file /// Data and control-dependencies of syntactic diff +#include "change_impact.h" + #include #include @@ -19,7 +21,6 @@ Date: April 2016 #include "unified_diff.h" -#include "change_impact.h" #if 0 struct cfg_nodet { diff --git a/src/goto-diff/goto_diff_base.cpp b/src/goto-diff/goto_diff_base.cpp index f2af3eb4c49..1ad26dbee7f 100644 --- a/src/goto-diff/goto_diff_base.cpp +++ b/src/goto-diff/goto_diff_base.cpp @@ -9,10 +9,10 @@ Author: Peter Schrammel /// \file /// GOTO-DIFF Base Class -#include - #include "goto_diff.h" +#include + std::ostream &goto_difft::output_functions(std::ostream &out) const { switch(ui) diff --git a/src/goto-diff/goto_diff_languages.cpp b/src/goto-diff/goto_diff_languages.cpp index d1ad10c5a0b..c55f82e637e 100644 --- a/src/goto-diff/goto_diff_languages.cpp +++ b/src/goto-diff/goto_diff_languages.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Language Registration +#include "goto_diff_languages.h" + #include #include @@ -22,8 +24,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #endif -#include "goto_diff_languages.h" - void goto_diff_languagest::register_languages() { register_language(new_ansi_c_language); diff --git a/src/goto-diff/goto_diff_main.cpp b/src/goto-diff/goto_diff_main.cpp index 604777582d0..8affa718746 100644 --- a/src/goto-diff/goto_diff_main.cpp +++ b/src/goto-diff/goto_diff_main.cpp @@ -9,14 +9,14 @@ Author: Peter Schrammel /// \file /// GOTO-DIFF Main Module +#include "goto_diff_parse_options.h" + #include #ifdef IREP_HASH_STATS #include #endif -#include "goto_diff_parse_options.h" - #ifdef IREP_HASH_STATS extern unsigned long long irep_hash_cnt; extern unsigned long long irep_cmp_cnt; diff --git a/src/goto-diff/goto_diff_parse_options.cpp b/src/goto-diff/goto_diff_parse_options.cpp index ee2a74a0b24..146fe27eb1c 100644 --- a/src/goto-diff/goto_diff_parse_options.cpp +++ b/src/goto-diff/goto_diff_parse_options.cpp @@ -9,6 +9,8 @@ Author: Peter Schrammel /// \file /// GOTO-DIFF Command Line Option Processing +#include "goto_diff_parse_options.h" + #include #include // exit() #include @@ -41,7 +43,6 @@ Author: Peter Schrammel #include -#include "goto_diff_parse_options.h" #include "goto_diff.h" #include "syntactic_diff.h" #include "unified_diff.h" diff --git a/src/goto-diff/unified_diff.cpp b/src/goto-diff/unified_diff.cpp index 05a5960f6ca..911d7aef06e 100644 --- a/src/goto-diff/unified_diff.cpp +++ b/src/goto-diff/unified_diff.cpp @@ -11,12 +11,12 @@ Date: April 2016 /// \file /// Unified diff (using LCSS) of goto functions +#include "unified_diff.h" + #include #include -#include "unified_diff.h" - unified_difft::unified_difft(const goto_modelt &model_old, const goto_modelt &model_new): old_goto_functions(model_old.goto_functions), diff --git a/src/goto-diff/unified_diff.h b/src/goto-diff/unified_diff.h index 76694d7a7dd..65549c5759e 100644 --- a/src/goto-diff/unified_diff.h +++ b/src/goto-diff/unified_diff.h @@ -21,6 +21,8 @@ Date: April 2016 #include +#include "goto-programs/goto_program.h" + class goto_functionst; class goto_modelt; class goto_programt; diff --git a/src/goto-instrument/accelerate/accelerate.cpp b/src/goto-instrument/accelerate/accelerate.cpp index 9fda8311c66..19203e1cd8d 100644 --- a/src/goto-instrument/accelerate/accelerate.cpp +++ b/src/goto-instrument/accelerate/accelerate.cpp @@ -9,6 +9,8 @@ Author: Matt Lewis /// \file /// Loop Acceleration +#include "accelerate.h" + #include #include @@ -22,7 +24,6 @@ Author: Matt Lewis #include #include -#include "accelerate.h" #include "path.h" #include "polynomial_accelerator.h" #include "enumerating_loop_acceleration.h" diff --git a/src/goto-instrument/accelerate/acceleration_utils.cpp b/src/goto-instrument/accelerate/acceleration_utils.cpp index 7da7a6dce8d..b275be15bab 100644 --- a/src/goto-instrument/accelerate/acceleration_utils.cpp +++ b/src/goto-instrument/accelerate/acceleration_utils.cpp @@ -9,6 +9,8 @@ Author: Matt Lewis /// \file /// Loop Acceleration +#include "acceleration_utils.h" + #include #include #include @@ -39,7 +41,6 @@ Author: Matt Lewis #include #include -#include "acceleration_utils.h" #include "accelerator.h" #include "util.h" #include "cone_of_influence.h" diff --git a/src/goto-instrument/accelerate/all_paths_enumerator.cpp b/src/goto-instrument/accelerate/all_paths_enumerator.cpp index f681549a8f0..34de1d9af96 100644 --- a/src/goto-instrument/accelerate/all_paths_enumerator.cpp +++ b/src/goto-instrument/accelerate/all_paths_enumerator.cpp @@ -9,10 +9,10 @@ Author: Matt Lewis /// \file /// Loop Acceleration -#include - #include "all_paths_enumerator.h" +#include + bool all_paths_enumeratort::next(patht &path) { if(last_path.empty()) diff --git a/src/goto-instrument/accelerate/cone_of_influence.cpp b/src/goto-instrument/accelerate/cone_of_influence.cpp index 9d2ed86ca03..c99f7bdc6fa 100644 --- a/src/goto-instrument/accelerate/cone_of_influence.cpp +++ b/src/goto-instrument/accelerate/cone_of_influence.cpp @@ -9,12 +9,12 @@ Author: Matt Lewis /// \file /// Loop Acceleration +#include "cone_of_influence.h" + #include #include -#include "cone_of_influence.h" - void cone_of_influencet::cone_of_influence( const expr_sett &targets, expr_sett &cone) diff --git a/src/goto-instrument/accelerate/disjunctive_polynomial_acceleration.cpp b/src/goto-instrument/accelerate/disjunctive_polynomial_acceleration.cpp index 6029c6ecd33..acf0bf264cf 100644 --- a/src/goto-instrument/accelerate/disjunctive_polynomial_acceleration.cpp +++ b/src/goto-instrument/accelerate/disjunctive_polynomial_acceleration.cpp @@ -9,6 +9,8 @@ Author: Matt Lewis /// \file /// Loop Acceleration +#include "disjunctive_polynomial_acceleration.h" + #include #include #include @@ -39,7 +41,6 @@ Author: Matt Lewis #include #include -#include "disjunctive_polynomial_acceleration.h" #include "polynomial_accelerator.h" #include "accelerator.h" #include "util.h" diff --git a/src/goto-instrument/accelerate/enumerating_loop_acceleration.cpp b/src/goto-instrument/accelerate/enumerating_loop_acceleration.cpp index 6a313a5b6d7..01cf26f477f 100644 --- a/src/goto-instrument/accelerate/enumerating_loop_acceleration.cpp +++ b/src/goto-instrument/accelerate/enumerating_loop_acceleration.cpp @@ -9,10 +9,10 @@ Author: Matt Lewis /// \file /// Loop Acceleration -#include - #include "enumerating_loop_acceleration.h" +#include + bool enumerating_loop_accelerationt::accelerate( path_acceleratort &accelerator) { diff --git a/src/goto-instrument/accelerate/overflow_instrumenter.cpp b/src/goto-instrument/accelerate/overflow_instrumenter.cpp index efe9c978429..4c5e9bebd4f 100644 --- a/src/goto-instrument/accelerate/overflow_instrumenter.cpp +++ b/src/goto-instrument/accelerate/overflow_instrumenter.cpp @@ -9,6 +9,8 @@ Author: Matt Lewis /// \file /// Loop Acceleration +#include "overflow_instrumenter.h" + #include #include @@ -18,7 +20,6 @@ Author: Matt Lewis #include -#include "overflow_instrumenter.h" #include "util.h" /* diff --git a/src/goto-instrument/accelerate/path.cpp b/src/goto-instrument/accelerate/path.cpp index effa48f7684..229c72cdb6b 100644 --- a/src/goto-instrument/accelerate/path.cpp +++ b/src/goto-instrument/accelerate/path.cpp @@ -9,12 +9,12 @@ Author: Matt Lewis /// \file /// Loop Acceleration +#include "path.h" + #include #include -#include "path.h" - void output_path( const patht &path, const goto_programt &program, diff --git a/src/goto-instrument/accelerate/polynomial.cpp b/src/goto-instrument/accelerate/polynomial.cpp index b37cfaafe82..df72550d5c0 100644 --- a/src/goto-instrument/accelerate/polynomial.cpp +++ b/src/goto-instrument/accelerate/polynomial.cpp @@ -9,6 +9,8 @@ Author: Matt Lewis /// \file /// Loop Acceleration +#include "polynomial.h" + #include #include @@ -16,7 +18,6 @@ Author: Matt Lewis #include #include -#include "polynomial.h" #include "util.h" exprt polynomialt::to_expr() diff --git a/src/goto-instrument/accelerate/polynomial_accelerator.cpp b/src/goto-instrument/accelerate/polynomial_accelerator.cpp index 3e8caf67429..c1a84b45a66 100644 --- a/src/goto-instrument/accelerate/polynomial_accelerator.cpp +++ b/src/goto-instrument/accelerate/polynomial_accelerator.cpp @@ -9,6 +9,8 @@ Author: Matt Lewis /// \file /// Loop Acceleration +#include "polynomial_accelerator.h" + #include #include #include @@ -37,7 +39,6 @@ Author: Matt Lewis #include #include -#include "polynomial_accelerator.h" #include "accelerator.h" #include "util.h" #include "cone_of_influence.h" diff --git a/src/goto-instrument/accelerate/sat_path_enumerator.cpp b/src/goto-instrument/accelerate/sat_path_enumerator.cpp index 0929d8daf28..b2e2177ed87 100644 --- a/src/goto-instrument/accelerate/sat_path_enumerator.cpp +++ b/src/goto-instrument/accelerate/sat_path_enumerator.cpp @@ -9,6 +9,8 @@ Author: Matt Lewis /// \file /// Loop Acceleration +#include "sat_path_enumerator.h" + #include #include #include @@ -39,7 +41,6 @@ Author: Matt Lewis #include #include -#include "sat_path_enumerator.h" #include "polynomial_accelerator.h" #include "accelerator.h" #include "util.h" diff --git a/src/goto-instrument/accelerate/scratch_program.cpp b/src/goto-instrument/accelerate/scratch_program.cpp index 93c16f88489..fcea2eb4837 100644 --- a/src/goto-instrument/accelerate/scratch_program.cpp +++ b/src/goto-instrument/accelerate/scratch_program.cpp @@ -9,6 +9,8 @@ Author: Matt Lewis /// \file /// Loop Acceleration +#include "scratch_program.h" + #include #include @@ -16,8 +18,6 @@ Author: Matt Lewis #include -#include "scratch_program.h" - #ifdef DEBUG #include #endif diff --git a/src/goto-instrument/accelerate/trace_automaton.cpp b/src/goto-instrument/accelerate/trace_automaton.cpp index ac885fcf0f4..8043b1b5862 100644 --- a/src/goto-instrument/accelerate/trace_automaton.cpp +++ b/src/goto-instrument/accelerate/trace_automaton.cpp @@ -9,10 +9,11 @@ Author: Matt Lewis /// \file /// Loop Acceleration +#include "trace_automaton.h" + #include #include -#include "trace_automaton.h" #include "path.h" void trace_automatont::build() diff --git a/src/goto-instrument/accelerate/util.cpp b/src/goto-instrument/accelerate/util.cpp index 0af56c088e2..15563559adb 100644 --- a/src/goto-instrument/accelerate/util.cpp +++ b/src/goto-instrument/accelerate/util.cpp @@ -9,14 +9,14 @@ Author: Matt Lewis /// \file /// Loop Acceleration +#include "util.h" + #include #include #include #include -#include "util.h" - signedbv_typet signed_poly_type() { return signedbv_typet(config.ansi_c.int_width); diff --git a/src/goto-instrument/alignment_checks.cpp b/src/goto-instrument/alignment_checks.cpp index 98740c254a3..3a177bdcd28 100644 --- a/src/goto-instrument/alignment_checks.cpp +++ b/src/goto-instrument/alignment_checks.cpp @@ -9,12 +9,12 @@ Module: Alignment Checks /// \file /// Alignment Checks +#include "alignment_checks.h" + #include #include #include -#include "alignment_checks.h" - void print_struct_alignment_problems( const symbol_tablet &symbol_table, std::ostream &out) diff --git a/src/goto-instrument/branch.cpp b/src/goto-instrument/branch.cpp index 689a9f48432..e224a59265e 100644 --- a/src/goto-instrument/branch.cpp +++ b/src/goto-instrument/branch.cpp @@ -9,11 +9,12 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Branch Instrumentation +#include "branch.h" + #include #include #include "function.h" -#include "branch.h" void branch( symbol_tablet &symbol_table, diff --git a/src/goto-instrument/call_sequences.cpp b/src/goto-instrument/call_sequences.cpp index 6e535c25248..7c8ed65a918 100644 --- a/src/goto-instrument/call_sequences.cpp +++ b/src/goto-instrument/call_sequences.cpp @@ -11,6 +11,8 @@ Date: April 2013 /// \file /// Printing function call sequences for Ofer +#include "call_sequences.h" + #include #include #include @@ -18,8 +20,6 @@ Date: April 2013 #include #include -#include "call_sequences.h" - void show_call_sequences( const irep_idt &function, const goto_programt &goto_program, diff --git a/src/goto-instrument/code_contracts.cpp b/src/goto-instrument/code_contracts.cpp index e828b3c790b..5b118d36455 100644 --- a/src/goto-instrument/code_contracts.cpp +++ b/src/goto-instrument/code_contracts.cpp @@ -11,6 +11,8 @@ Date: February 2016 /// \file /// Verify and use annotated invariants and pre/post-conditions +#include "code_contracts.h" + #include #include #include @@ -20,7 +22,6 @@ Date: February 2016 #include #include "loop_utils.h" -#include "code_contracts.h" class code_contractst { diff --git a/src/goto-instrument/concurrency.cpp b/src/goto-instrument/concurrency.cpp index e04ff9c8695..579edc36ed8 100644 --- a/src/goto-instrument/concurrency.cpp +++ b/src/goto-instrument/concurrency.cpp @@ -11,14 +11,14 @@ Date: October 2012 /// \file /// Encoding for Threaded Goto Programs +#include "concurrency.h" + #include #include #include #include -#include "concurrency.h" - class concurrency_instrumentationt { public: diff --git a/src/goto-instrument/count_eloc.cpp b/src/goto-instrument/count_eloc.cpp index d986d335e9f..fa8cb858da6 100644 --- a/src/goto-instrument/count_eloc.cpp +++ b/src/goto-instrument/count_eloc.cpp @@ -11,6 +11,8 @@ Date: December 2012 /// \file /// Count effective lines of code +#include "count_eloc.h" + #include #include @@ -19,8 +21,6 @@ Date: December 2012 #include -#include "count_eloc.h" - typedef std::unordered_set linest; typedef std::unordered_map filest; typedef std::unordered_map working_dirst; diff --git a/src/goto-instrument/cover.cpp b/src/goto-instrument/cover.cpp index 9beffb29c83..5baadcb9a8f 100644 --- a/src/goto-instrument/cover.cpp +++ b/src/goto-instrument/cover.cpp @@ -11,14 +11,14 @@ Date: May 2016 /// \file /// Coverage Instrumentation +#include "cover.h" + #include #include #include #include -#include "cover.h" - class basic_blockst { public: diff --git a/src/goto-instrument/cover.h b/src/goto-instrument/cover.h index 5a8872bc324..c2dd453b289 100644 --- a/src/goto-instrument/cover.h +++ b/src/goto-instrument/cover.h @@ -17,6 +17,8 @@ Date: May 2016 #include #include +class message_handlert; + enum class coverage_criteriont { LOCATION, BRANCH, DECISION, CONDITION, diff --git a/src/goto-instrument/document_properties.cpp b/src/goto-instrument/document_properties.cpp index e1dad4ffe47..aeb5b43f540 100644 --- a/src/goto-instrument/document_properties.cpp +++ b/src/goto-instrument/document_properties.cpp @@ -9,14 +9,14 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Subgoal Documentation +#include "document_properties.h" + #include #include #include -#include "document_properties.h" - #define MAXWIDTH 62 class document_propertiest diff --git a/src/goto-instrument/dot.cpp b/src/goto-instrument/dot.cpp index 7c9f2252892..bf58fe12cd3 100644 --- a/src/goto-instrument/dot.cpp +++ b/src/goto-instrument/dot.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Dump Goto-Program as DOT Graph +#include "dot.h" + #include #include #include @@ -20,8 +22,6 @@ Author: Daniel Kroening, kroening@kroening.com "size=\"30,40\";"\ "ratio=compress;" -#include "dot.h" - class dott { public: diff --git a/src/goto-instrument/dump_c.cpp b/src/goto-instrument/dump_c.cpp index fa9ebf63359..efa0ac4afc2 100644 --- a/src/goto-instrument/dump_c.cpp +++ b/src/goto-instrument/dump_c.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Dump Goto-Program as C/C++ Source +#include "dump_c.h" + #include #include @@ -26,8 +28,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "goto_program2code.h" #include "dump_c_class.h" -#include "dump_c.h" - inline std::ostream &operator << (std::ostream &out, dump_ct &src) { src(out); diff --git a/src/goto-instrument/full_slicer.cpp b/src/goto-instrument/full_slicer.cpp index ca8de0f2cf7..4b37e2da833 100644 --- a/src/goto-instrument/full_slicer.cpp +++ b/src/goto-instrument/full_slicer.cpp @@ -9,6 +9,9 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Slicing +#include "full_slicer.h" +#include "full_slicer_class.h" + #include #include #ifdef DEBUG_FULL_SLICERT @@ -16,8 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "full_slicer_class.h" - void full_slicert::add_dependencies( const cfgt::nodet &node, queuet &queue, diff --git a/src/goto-instrument/function.cpp b/src/goto-instrument/function.cpp index f6c3ffdce55..9af29573ad0 100644 --- a/src/goto-instrument/function.cpp +++ b/src/goto-instrument/function.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Function Entering and Exiting +#include "function.h" + #include #include #include @@ -17,8 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "function.h" - code_function_callt function_to_call( symbol_tablet &symbol_table, const irep_idt &id, diff --git a/src/goto-instrument/function_modifies.cpp b/src/goto-instrument/function_modifies.cpp index f4d18c4a1e7..62721a3542b 100644 --- a/src/goto-instrument/function_modifies.cpp +++ b/src/goto-instrument/function_modifies.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Modifies -#include - #include "function_modifies.h" +#include + void function_modifiest::get_modifies_lhs( const local_may_aliast &local_may_alias, const goto_programt::const_targett t, diff --git a/src/goto-instrument/goto_instrument_languages.cpp b/src/goto-instrument/goto_instrument_languages.cpp index 2193318b136..cf0731573ac 100644 --- a/src/goto-instrument/goto_instrument_languages.cpp +++ b/src/goto-instrument/goto_instrument_languages.cpp @@ -9,14 +9,14 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Language Registration +#include "goto_instrument_parse_options.h" + #include #include #include #include -#include "goto_instrument_parse_options.h" - void goto_instrument_parse_optionst::register_languages() { register_language(new_ansi_c_language); diff --git a/src/goto-instrument/goto_instrument_main.cpp b/src/goto-instrument/goto_instrument_main.cpp index fb394efbb3d..0782ab6352b 100644 --- a/src/goto-instrument/goto_instrument_main.cpp +++ b/src/goto-instrument/goto_instrument_main.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Main Module -#include - #include "goto_instrument_parse_options.h" +#include + #ifdef _MSC_VER int wmain(int argc, const wchar_t **argv_wide) { diff --git a/src/goto-instrument/goto_instrument_parse_options.cpp b/src/goto-instrument/goto_instrument_parse_options.cpp index 2a3d4ed5908..888853c6dc4 100644 --- a/src/goto-instrument/goto_instrument_parse_options.cpp +++ b/src/goto-instrument/goto_instrument_parse_options.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Main Module +#include "goto_instrument_parse_options.h" + #include #include #include @@ -60,7 +62,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_instrument_parse_options.h" #include "document_properties.h" #include "uninitialized.h" #include "full_slicer.h" diff --git a/src/goto-instrument/goto_program2code.cpp b/src/goto-instrument/goto_program2code.cpp index dac40c7b4ee..968b49026c7 100644 --- a/src/goto-instrument/goto_program2code.cpp +++ b/src/goto-instrument/goto_program2code.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Dump Goto-Program as C/C++ Source +#include "goto_program2code.h" + #include #include @@ -19,8 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "goto_program2code.h" - static const exprt &skip_typecast(const exprt &expr) { if(expr.id()!=ID_typecast) diff --git a/src/goto-instrument/goto_program2code.h b/src/goto-instrument/goto_program2code.h index 3bf1ea7404f..2093774b709 100644 --- a/src/goto-instrument/goto_program2code.h +++ b/src/goto-instrument/goto_program2code.h @@ -13,6 +13,7 @@ Author: Daniel Kroening, kroening@kroening.com #define CPROVER_GOTO_INSTRUMENT_GOTO_PROGRAM2CODE_H #include +#include #include diff --git a/src/goto-instrument/havoc_loops.cpp b/src/goto-instrument/havoc_loops.cpp index 08478565ec8..d612a31fc03 100644 --- a/src/goto-instrument/havoc_loops.cpp +++ b/src/goto-instrument/havoc_loops.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Havoc Loops +#include "havoc_loops.h" + #include #include @@ -17,7 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "function_modifies.h" -#include "havoc_loops.h" class havoc_loopst { diff --git a/src/goto-instrument/horn_encoding.cpp b/src/goto-instrument/horn_encoding.cpp index a1842b28a92..31fcb187848 100644 --- a/src/goto-instrument/horn_encoding.cpp +++ b/src/goto-instrument/horn_encoding.cpp @@ -11,10 +11,10 @@ Date: June 2015 /// \file /// Horn-clause Encoding -#include - #include "horn_encoding.h" +#include + void horn_encoding( const goto_functionst &, const namespacet &, diff --git a/src/goto-instrument/interrupt.cpp b/src/goto-instrument/interrupt.cpp index 93b11352792..38a5a258ff6 100644 --- a/src/goto-instrument/interrupt.cpp +++ b/src/goto-instrument/interrupt.cpp @@ -11,6 +11,8 @@ Date: September 2011 /// \file /// Interrupt Instrumentation +#include "interrupt.h" + #include #include #include @@ -19,7 +21,6 @@ Date: September 2011 #include -#include "interrupt.h" #include "rw_set.h" #ifdef LOCAL_MAY diff --git a/src/goto-instrument/k_induction.cpp b/src/goto-instrument/k_induction.cpp index 1a39e8f2ea4..9a018e1c331 100644 --- a/src/goto-instrument/k_induction.cpp +++ b/src/goto-instrument/k_induction.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// k-induction +#include "k_induction.h" + #include #include @@ -18,7 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "unwind.h" #include "loop_utils.h" -#include "k_induction.h" class k_inductiont { diff --git a/src/goto-instrument/loop_utils.cpp b/src/goto-instrument/loop_utils.cpp index 27e27979585..ee02a3b1695 100644 --- a/src/goto-instrument/loop_utils.cpp +++ b/src/goto-instrument/loop_utils.cpp @@ -9,13 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Helper functions for k-induction and loop invariants +#include "loop_utils.h" + #include #include #include -#include "loop_utils.h" - goto_programt::targett get_loop_exit(const loopt &loop) { assert(!loop.empty()); diff --git a/src/goto-instrument/mmio.cpp b/src/goto-instrument/mmio.cpp index 99112118d35..a7a21a2f1a9 100644 --- a/src/goto-instrument/mmio.cpp +++ b/src/goto-instrument/mmio.cpp @@ -11,6 +11,8 @@ Date: September 2011 /// \file /// Memory-mapped I/O Instrumentation for Goto Programs +#include "mmio.h" + #include #include @@ -31,8 +33,6 @@ Date: September 2011 #include #endif -#include "mmio.h" - void mmio( value_setst &value_sets, const symbol_tablet &symbol_table, diff --git a/src/goto-instrument/model_argc_argv.cpp b/src/goto-instrument/model_argc_argv.cpp index cc82ab8642a..bae8010d907 100644 --- a/src/goto-instrument/model_argc_argv.cpp +++ b/src/goto-instrument/model_argc_argv.cpp @@ -11,6 +11,8 @@ Date: April 2016 /// \file /// Initialize command line arguments +#include "model_argc_argv.h" + #include #include @@ -27,8 +29,6 @@ Date: April 2016 #include #include -#include "model_argc_argv.h" - bool model_argc_argv( symbol_tablet &symbol_table, goto_functionst &goto_functions, diff --git a/src/goto-instrument/nondet_static.cpp b/src/goto-instrument/nondet_static.cpp index db5aab9ef39..e5e3b7649cf 100644 --- a/src/goto-instrument/nondet_static.cpp +++ b/src/goto-instrument/nondet_static.cpp @@ -12,6 +12,8 @@ Date: November 2011 /// \file /// Nondeterministic initialization of certain global scope variables +#include "nondet_static.h" + #include #include #include @@ -19,8 +21,6 @@ Date: November 2011 #include -#include "nondet_static.h" - void nondet_static( const namespacet &ns, goto_functionst &goto_functions, diff --git a/src/goto-instrument/nondet_volatile.cpp b/src/goto-instrument/nondet_volatile.cpp index d85868275d2..4da1ebf6731 100644 --- a/src/goto-instrument/nondet_volatile.cpp +++ b/src/goto-instrument/nondet_volatile.cpp @@ -11,11 +11,11 @@ Date: September 2011 /// \file /// Volatile Variables +#include "nondet_volatile.h" + #include #include -#include "nondet_volatile.h" - bool is_volatile( const symbol_tablet &symbol_table, const typet &src) diff --git a/src/goto-instrument/race_check.cpp b/src/goto-instrument/race_check.cpp index 952657ff0e9..aec5eedda53 100644 --- a/src/goto-instrument/race_check.cpp +++ b/src/goto-instrument/race_check.cpp @@ -11,6 +11,8 @@ Date: February 2006 /// \file /// Race Detection for Threaded Goto Programs +#include "race_check.h" + #include #include #include @@ -23,7 +25,6 @@ Date: February 2006 #include #include -#include "race_check.h" #include "rw_set.h" #ifdef LOCAL_MAY diff --git a/src/goto-instrument/reachability_slicer.cpp b/src/goto-instrument/reachability_slicer.cpp index 72b63fa76c4..c92333e31a3 100644 --- a/src/goto-instrument/reachability_slicer.cpp +++ b/src/goto-instrument/reachability_slicer.cpp @@ -9,15 +9,15 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Slicer -#include +#include "reachability_slicer.h" +#include #include #include #include #include "full_slicer_class.h" -#include "reachability_slicer.h" #include "reachability_slicer_class.h" void reachability_slicert::fixedpoint_assertions( diff --git a/src/goto-instrument/rw_set.cpp b/src/goto-instrument/rw_set.cpp index 1d6a4dfff3b..39681fe5660 100644 --- a/src/goto-instrument/rw_set.cpp +++ b/src/goto-instrument/rw_set.cpp @@ -11,6 +11,8 @@ Date: February 2006 /// \file /// Race Detection for Threaded Goto Programs +#include "rw_set.h" + #include #include #include @@ -19,8 +21,6 @@ Date: February 2006 #include -#include "rw_set.h" - void rw_set_baset::output(std::ostream &out) const { out << "READ:\n"; diff --git a/src/goto-instrument/show_locations.cpp b/src/goto-instrument/show_locations.cpp index 31993269e69..b02dcb1b099 100644 --- a/src/goto-instrument/show_locations.cpp +++ b/src/goto-instrument/show_locations.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Show program locations +#include "show_locations.h" + #include #include @@ -16,8 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "show_locations.h" - void show_locations( ui_message_handlert::uit ui, const irep_idt function_id, diff --git a/src/goto-instrument/skip_loops.cpp b/src/goto-instrument/skip_loops.cpp index 55a7e4cd3cc..d8be5f1e7ef 100644 --- a/src/goto-instrument/skip_loops.cpp +++ b/src/goto-instrument/skip_loops.cpp @@ -11,13 +11,13 @@ Date: January 2016 /// \file /// Skip over selected loops by adding gotos +#include "skip_loops.h" + #include #include #include -#include "skip_loops.h" - typedef std::set loop_idst; typedef std::map loop_mapt; diff --git a/src/goto-instrument/stack_depth.cpp b/src/goto-instrument/stack_depth.cpp index e422b54184d..2897a4e6697 100644 --- a/src/goto-instrument/stack_depth.cpp +++ b/src/goto-instrument/stack_depth.cpp @@ -11,6 +11,8 @@ Date: November 2011 /// \file /// Stack depth checks +#include "stack_depth.h" + #include #include #include @@ -19,8 +21,6 @@ Date: November 2011 #include -#include "stack_depth.h" - symbol_exprt add_stack_depth_symbol(symbol_tablet &symbol_table) { const irep_idt identifier="$stack_depth"; diff --git a/src/goto-instrument/thread_instrumentation.cpp b/src/goto-instrument/thread_instrumentation.cpp index 1720beb9e15..3cfb0b57759 100644 --- a/src/goto-instrument/thread_instrumentation.cpp +++ b/src/goto-instrument/thread_instrumentation.cpp @@ -6,12 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "thread_instrumentation.h" #include #include -#include "thread_instrumentation.h" - static bool has_start_thread(const goto_programt &goto_program) { for(const auto &instruction : goto_program.instructions) diff --git a/src/goto-instrument/undefined_functions.cpp b/src/goto-instrument/undefined_functions.cpp index cb4c854d8fc..f76815d3009 100644 --- a/src/goto-instrument/undefined_functions.cpp +++ b/src/goto-instrument/undefined_functions.cpp @@ -11,12 +11,12 @@ Date: July 2016 /// \file /// Handling of functions without body +#include "undefined_functions.h" + #include #include -#include "undefined_functions.h" - void list_undefined_functions( const goto_functionst &goto_functions, const namespacet &ns, diff --git a/src/goto-instrument/undefined_functions.h b/src/goto-instrument/undefined_functions.h index 85c6ba77552..e9bb9df6f95 100644 --- a/src/goto-instrument/undefined_functions.h +++ b/src/goto-instrument/undefined_functions.h @@ -16,6 +16,8 @@ Date: July 2016 #include +class namespacet; + class goto_functionst; void list_undefined_functions( diff --git a/src/goto-instrument/uninitialized.cpp b/src/goto-instrument/uninitialized.cpp index c4f0d588298..ca33c6bfbbb 100644 --- a/src/goto-instrument/uninitialized.cpp +++ b/src/goto-instrument/uninitialized.cpp @@ -11,14 +11,14 @@ Date: January 2010 /// \file /// Detection for Uninitialized Local Variables +#include "uninitialized.h" + #include #include #include #include -#include "uninitialized.h" - class uninitializedt { public: diff --git a/src/goto-instrument/unwind.cpp b/src/goto-instrument/unwind.cpp index f7e8c8d0888..78015b22e6f 100644 --- a/src/goto-instrument/unwind.cpp +++ b/src/goto-instrument/unwind.cpp @@ -10,6 +10,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Loop unwinding +#include "unwind.h" + #ifdef DEBUG #include #endif @@ -18,7 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "unwind.h" #include "loop_utils.h" void parse_unwindset(const std::string &us, unwind_sett &unwind_set) diff --git a/src/goto-instrument/unwind.h b/src/goto-instrument/unwind.h index 16ee2cf9455..6e86a5d98e2 100644 --- a/src/goto-instrument/unwind.h +++ b/src/goto-instrument/unwind.h @@ -17,6 +17,8 @@ Author: Daniel Kroening, kroening@kroening.com #include #include +class goto_functionst; + // -1: do not unwind loop typedef std::map> unwind_sett; diff --git a/src/goto-instrument/wmm/cycle_collection.cpp b/src/goto-instrument/wmm/cycle_collection.cpp index 465b013aa6f..caef3e7ee77 100644 --- a/src/goto-instrument/wmm/cycle_collection.cpp +++ b/src/goto-instrument/wmm/cycle_collection.cpp @@ -11,10 +11,10 @@ Date: 2012 /// \file /// collection of cycles in graph of abstract events -#include - #include "event_graph.h" +#include + /// after the collection, eliminates the executions forbidden by an indirect /// thin-air void event_grapht::graph_explorert::filter_thin_air( diff --git a/src/goto-instrument/wmm/data_dp.cpp b/src/goto-instrument/wmm/data_dp.cpp index d220174c422..d24b17d9651 100644 --- a/src/goto-instrument/wmm/data_dp.cpp +++ b/src/goto-instrument/wmm/data_dp.cpp @@ -11,9 +11,10 @@ Date: 2012 /// \file /// data dependencies +#include "data_dp.h" + #include -#include "data_dp.h" #include "abstract_event.h" /// insertion diff --git a/src/goto-instrument/wmm/fence.cpp b/src/goto-instrument/wmm/fence.cpp index 7c820f238f9..82e9308278d 100644 --- a/src/goto-instrument/wmm/fence.cpp +++ b/src/goto-instrument/wmm/fence.cpp @@ -11,10 +11,10 @@ Date: February 2012 /// \file /// Fences for instrumentation -#include - #include "fence.h" +#include + bool is_fence( const goto_programt::instructiont &instruction, const namespacet &ns) diff --git a/src/goto-instrument/wmm/goto2graph.cpp b/src/goto-instrument/wmm/goto2graph.cpp index 77338b3ead1..7828ac8008a 100644 --- a/src/goto-instrument/wmm/goto2graph.cpp +++ b/src/goto-instrument/wmm/goto2graph.cpp @@ -11,6 +11,8 @@ Date: 2012 /// \file /// Turns a goto-program into an abstract event graph +#include "goto2graph.h" + #include #include #include @@ -28,7 +30,6 @@ Date: 2012 #include "../rw_set.h" #include "fence.h" -#include "goto2graph.h" // #define PRINT_UNSAFES diff --git a/src/goto-instrument/wmm/instrumenter_strategies.cpp b/src/goto-instrument/wmm/instrumenter_strategies.cpp index 258eec8df0b..df22da52540 100644 --- a/src/goto-instrument/wmm/instrumenter_strategies.cpp +++ b/src/goto-instrument/wmm/instrumenter_strategies.cpp @@ -11,12 +11,11 @@ Date: 2012 /// \file /// Strategies for picking the abstract events to instrument +#include "goto2graph.h" + #include #include - -#include "goto2graph.h" - #ifdef HAVE_GLPK #include #include diff --git a/src/goto-instrument/wmm/pair_collection.cpp b/src/goto-instrument/wmm/pair_collection.cpp index a2bd0880eb3..bceae75663c 100644 --- a/src/goto-instrument/wmm/pair_collection.cpp +++ b/src/goto-instrument/wmm/pair_collection.cpp @@ -13,12 +13,12 @@ Date: 2013 /// collection of pairs (for Pensieve's static delay-set analysis) in graph of /// abstract events +#include "event_graph.h" + #include #include -#include "event_graph.h" - #define OUTPUT(s, fence, file, line, id, type) \ s< #include @@ -29,7 +31,6 @@ Date: September 2011 #include "../rw_set.h" -#include "weak_memory.h" #include "shared_buffers.h" #include "goto2graph.h" diff --git a/src/goto-instrument/wmm/weak_memory.h b/src/goto-instrument/wmm/weak_memory.h index 7dbf31b8c99..34b98e6a767 100644 --- a/src/goto-instrument/wmm/weak_memory.h +++ b/src/goto-instrument/wmm/weak_memory.h @@ -16,10 +16,14 @@ Date: September 2011 #include "wmm.h" +#include "util/irep.h" + class value_setst; class goto_functionst; class symbol_tablet; class message_handlert; +class goto_programt; +class messaget; void weak_memory( memory_modelt model, diff --git a/src/goto-programs/builtin_functions.cpp b/src/goto-programs/builtin_functions.cpp index a5bf81a722d..e7b128ff282 100644 --- a/src/goto-programs/builtin_functions.cpp +++ b/src/goto-programs/builtin_functions.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Program Transformation +#include "goto_convert_class.h" + #include #include @@ -30,7 +32,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "goto_convert_class.h" #include "format_strings.h" void goto_convertt::do_prob_uniform( diff --git a/src/goto-programs/class_hierarchy.cpp b/src/goto-programs/class_hierarchy.cpp index 77323aa83e4..0f2fb6c5de0 100644 --- a/src/goto-programs/class_hierarchy.cpp +++ b/src/goto-programs/class_hierarchy.cpp @@ -11,13 +11,13 @@ Date: April 2016 /// \file /// Class Hierarchy +#include "class_hierarchy.h" + #include #include #include -#include "class_hierarchy.h" - /// Looks for all the struct types in the symbol table and construct a map from /// class names to a data structure that contains lists of parent and child /// classes for each struct type (ie class). diff --git a/src/goto-programs/compute_called_functions.cpp b/src/goto-programs/compute_called_functions.cpp index 251a89c5054..36e2b7a1a8b 100644 --- a/src/goto-programs/compute_called_functions.cpp +++ b/src/goto-programs/compute_called_functions.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Query Called Functions -#include - #include "compute_called_functions.h" +#include + /// get all functions whose address is taken void compute_address_taken_functions( const exprt &src, diff --git a/src/goto-programs/destructor.cpp b/src/goto-programs/destructor.cpp index 956734ddee2..3efdd50c5bf 100644 --- a/src/goto-programs/destructor.cpp +++ b/src/goto-programs/destructor.cpp @@ -9,11 +9,11 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Destructor Calls +#include "destructor.h" + #include #include -#include "destructor.h" - code_function_callt get_destructor( const namespacet &ns, const typet &type) diff --git a/src/goto-programs/destructor.h b/src/goto-programs/destructor.h index 3fd62efb0c4..737ada1d93a 100644 --- a/src/goto-programs/destructor.h +++ b/src/goto-programs/destructor.h @@ -15,7 +15,7 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -code_function_callt get_destructor( +class code_function_callt get_destructor( const namespacet &ns, const typet &type); diff --git a/src/goto-programs/elf_reader.cpp b/src/goto-programs/elf_reader.cpp index 1668a88c8b5..39bc20de7c6 100644 --- a/src/goto-programs/elf_reader.cpp +++ b/src/goto-programs/elf_reader.cpp @@ -9,10 +9,10 @@ Module: Read ELF /// \file /// Read ELF -#include - #include "elf_reader.h" +#include + elf_readert::elf_readert(std::istream &_in):in(_in) { // read 32-bit header diff --git a/src/goto-programs/format_strings.cpp b/src/goto-programs/format_strings.cpp index 0d8dd959ec7..91c229e8d71 100644 --- a/src/goto-programs/format_strings.cpp +++ b/src/goto-programs/format_strings.cpp @@ -9,6 +9,8 @@ Author: CM Wintersteiger /// \file /// Format String Parser +#include "format_strings.h" + #include #include @@ -16,8 +18,6 @@ Author: CM Wintersteiger #include -#include "format_strings.h" - void parse_flags( std::string::const_iterator &it, format_tokent &curtok) diff --git a/src/goto-programs/goto_clean_expr.cpp b/src/goto-programs/goto_clean_expr.cpp index 6df78c5af9b..ad5fea6ac5f 100644 --- a/src/goto-programs/goto_clean_expr.cpp +++ b/src/goto-programs/goto_clean_expr.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Program Transformation +#include "goto_convert_class.h" + #include #include #include @@ -17,8 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_convert_class.h" - symbol_exprt goto_convertt::make_compound_literal( const exprt &expr, goto_programt &dest) diff --git a/src/goto-programs/goto_convert.cpp b/src/goto-programs/goto_convert.cpp index 5b48fb06706..3218d3f7f81 100644 --- a/src/goto-programs/goto_convert.cpp +++ b/src/goto-programs/goto_convert.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Program Transformation +#include "goto_convert.h" + #include #include @@ -22,7 +24,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_convert.h" #include "goto_convert_class.h" #include "destructor.h" diff --git a/src/goto-programs/goto_convert_exceptions.cpp b/src/goto-programs/goto_convert_exceptions.cpp index 0f17c7c011c..581ae2bcecd 100644 --- a/src/goto-programs/goto_convert_exceptions.cpp +++ b/src/goto-programs/goto_convert_exceptions.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Program Transformation -#include - #include "goto_convert_class.h" +#include + void goto_convertt::convert_msc_try_finally( const codet &code, goto_programt &dest) diff --git a/src/goto-programs/goto_convert_function_call.cpp b/src/goto-programs/goto_convert_function_call.cpp index c8688cc6c7e..85d5d75358d 100644 --- a/src/goto-programs/goto_convert_function_call.cpp +++ b/src/goto-programs/goto_convert_function_call.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Program Transformation +#include "goto_convert_class.h" + #include #include @@ -19,8 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_convert_class.h" - void goto_convertt::convert_function_call( const code_function_callt &function_call, goto_programt &dest) diff --git a/src/goto-programs/goto_convert_functions.cpp b/src/goto-programs/goto_convert_functions.cpp index 69f35bbdbea..2b334994e71 100644 --- a/src/goto-programs/goto_convert_functions.cpp +++ b/src/goto-programs/goto_convert_functions.cpp @@ -8,6 +8,8 @@ Date: June 2003 \*******************************************************************/ +#include "goto_convert_functions.h" + #include #include @@ -15,7 +17,6 @@ Date: June 2003 #include #include -#include "goto_convert_functions.h" #include "goto_inline.h" goto_convert_functionst::goto_convert_functionst( diff --git a/src/goto-programs/goto_convert_new_switch_case.cpp b/src/goto-programs/goto_convert_new_switch_case.cpp index 315d9ae810f..290c3a241e2 100644 --- a/src/goto-programs/goto_convert_new_switch_case.cpp +++ b/src/goto-programs/goto_convert_new_switch_case.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Program Transformation +#include "goto_convert_class.h" + #include #include @@ -21,7 +23,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "goto_convert.h" -#include "goto_convert_class.h" #include "destructor.h" static bool is_empty(const goto_programt &goto_program) diff --git a/src/goto-programs/goto_convert_side_effect.cpp b/src/goto-programs/goto_convert_side_effect.cpp index 1ed77b31660..1d12ba8e9d7 100644 --- a/src/goto-programs/goto_convert_side_effect.cpp +++ b/src/goto-programs/goto_convert_side_effect.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Program Transformation +#include "goto_convert_class.h" + #include #include #include @@ -18,8 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_convert_class.h" - bool goto_convertt::has_function_call(const exprt &expr) { forall_operands(it, expr) diff --git a/src/goto-programs/goto_inline.cpp b/src/goto-programs/goto_inline.cpp index 58db12c1838..49aca830b3b 100644 --- a/src/goto-programs/goto_inline.cpp +++ b/src/goto-programs/goto_inline.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Function Inlining +#include "goto_inline.h" + #include #include @@ -18,7 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "remove_skip.h" -#include "goto_inline.h" #include "goto_inline_class.h" void goto_inline( diff --git a/src/goto-programs/goto_inline_class.cpp b/src/goto-programs/goto_inline_class.cpp index 592630f1443..355c25d6d21 100644 --- a/src/goto-programs/goto_inline_class.cpp +++ b/src/goto-programs/goto_inline_class.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Function Inlining +#include "goto_inline_class.h" + #ifdef DEBUG #include #endif @@ -24,7 +26,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "remove_skip.h" #include "goto_inline.h" -#include "goto_inline_class.h" void goto_inlinet::parameter_assignments( const goto_programt::targett target, diff --git a/src/goto-programs/goto_program.cpp b/src/goto-programs/goto_program.cpp index be564d3715d..347e156e589 100644 --- a/src/goto-programs/goto_program.cpp +++ b/src/goto-programs/goto_program.cpp @@ -9,14 +9,14 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Program Transformation +#include "goto_program.h" + #include #include #include -#include "goto_program.h" - /// See below. /// \param ns: the namespace to resolve the expressions in /// \param identifier: the identifier used to find a symbol to identify the diff --git a/src/goto-programs/goto_program_irep.cpp b/src/goto-programs/goto_program_irep.cpp index 8e473a3341d..91ffd45065b 100644 --- a/src/goto-programs/goto_program_irep.cpp +++ b/src/goto-programs/goto_program_irep.cpp @@ -11,12 +11,12 @@ Date: May 2007 /// \file /// goto_programt -> irep conversion +#include "goto_program_irep.h" + #include #include -#include "goto_program_irep.h" - void convert(const goto_programt::instructiont &instruction, irept &irep) { irep.set(ID_code, instruction.code); diff --git a/src/goto-programs/goto_program_template.cpp b/src/goto-programs/goto_program_template.cpp index bc4522a6841..89b310c8d01 100644 --- a/src/goto-programs/goto_program_template.cpp +++ b/src/goto-programs/goto_program_template.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Goto Program Template -#include - #include "goto_program_template.h" +#include + std::ostream &operator<<(std::ostream &out, goto_program_instruction_typet t) { switch(t) diff --git a/src/goto-programs/goto_trace.cpp b/src/goto-programs/goto_trace.cpp index 4485aed5151..ddea10e38d2 100644 --- a/src/goto-programs/goto_trace.cpp +++ b/src/goto-programs/goto_trace.cpp @@ -11,6 +11,8 @@ Author: Daniel Kroening /// \file /// Traces of GOTO Programs +#include "goto_trace.h" + #include #include @@ -20,8 +22,6 @@ Author: Daniel Kroening #include #include -#include "goto_trace.h" - void goto_tracet::output( const class namespacet &ns, std::ostream &out) const diff --git a/src/goto-programs/graphml_witness.cpp b/src/goto-programs/graphml_witness.cpp index 2362d8f1461..4f4f6f56741 100644 --- a/src/goto-programs/graphml_witness.cpp +++ b/src/goto-programs/graphml_witness.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening /// \file /// Witnesses for Traces and Proofs +#include "graphml_witness.h" + #include #include #include @@ -16,8 +18,6 @@ Author: Daniel Kroening #include #include -#include "graphml_witness.h" - void graphml_witnesst::remove_l0_l1(exprt &expr) { if(expr.id()==ID_symbol) diff --git a/src/goto-programs/initialize_goto_model.cpp b/src/goto-programs/initialize_goto_model.cpp index df678c522c4..d284bc403c9 100644 --- a/src/goto-programs/initialize_goto_model.cpp +++ b/src/goto-programs/initialize_goto_model.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Get a Goto Program +#include "initialize_goto_model.h" + #include #include @@ -21,7 +23,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "goto_convert_functions.h" #include "read_goto_binary.h" -#include "initialize_goto_model.h" bool initialize_goto_model( goto_modelt &goto_model, diff --git a/src/goto-programs/interpreter.cpp b/src/goto-programs/interpreter.cpp index 8a5c23f1a62..a79910b7654 100644 --- a/src/goto-programs/interpreter.cpp +++ b/src/goto-programs/interpreter.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Interpreter for GOTO Programs +#include "interpreter.h" + #include #include #include @@ -17,7 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "interpreter.h" #include "interpreter_class.h" void interpretert::operator()() diff --git a/src/goto-programs/interpreter_evaluate.cpp b/src/goto-programs/interpreter_evaluate.cpp index 43a072cfaf4..ac848315618 100644 --- a/src/goto-programs/interpreter_evaluate.cpp +++ b/src/goto-programs/interpreter_evaluate.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Interpreter for GOTO Programs +#include "interpreter_class.h" + #include #include @@ -16,8 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "interpreter_class.h" - void interpretert::read( mp_integer address, std::vector &dest) const diff --git a/src/goto-programs/json_goto_trace.cpp b/src/goto-programs/json_goto_trace.cpp index ddc9f44ad3b..744e26500db 100644 --- a/src/goto-programs/json_goto_trace.cpp +++ b/src/goto-programs/json_goto_trace.cpp @@ -11,14 +11,14 @@ Author: Daniel Kroening /// \file /// Traces of GOTO Programs +#include "json_goto_trace.h" + #include #include #include -#include "json_goto_trace.h" - void convert( const namespacet &ns, const goto_tracet &goto_trace, diff --git a/src/goto-programs/link_to_library.cpp b/src/goto-programs/link_to_library.cpp index f78abb5dc39..2464aca83fe 100644 --- a/src/goto-programs/link_to_library.cpp +++ b/src/goto-programs/link_to_library.cpp @@ -9,11 +9,12 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Library Linking +#include "link_to_library.h" + #include #include -#include "link_to_library.h" #include "compute_called_functions.h" #include "goto_convert_functions.h" diff --git a/src/goto-programs/loop_ids.cpp b/src/goto-programs/loop_ids.cpp index 46ca3ad3e8e..5f4c560a0bd 100644 --- a/src/goto-programs/loop_ids.cpp +++ b/src/goto-programs/loop_ids.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Loop IDs +#include "loop_ids.h" + #include #include @@ -16,8 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "loop_ids.h" - void show_loop_ids( ui_message_handlert::uit ui, const goto_modelt &goto_model) diff --git a/src/goto-programs/mm_io.cpp b/src/goto-programs/mm_io.cpp index 7d639eed9c4..16ffc1063d0 100644 --- a/src/goto-programs/mm_io.cpp +++ b/src/goto-programs/mm_io.cpp @@ -11,12 +11,13 @@ Date: April 2017 /// \file /// Perform Memory-mapped I/O instrumentation +#include "mm_io.h" + #include #include #include #include "remove_returns.h" -#include "mm_io.h" void collect_deref_expr( const exprt &src, diff --git a/src/goto-programs/osx_fat_reader.cpp b/src/goto-programs/osx_fat_reader.cpp index 93bc0f93dbc..c8a853922f7 100644 --- a/src/goto-programs/osx_fat_reader.cpp +++ b/src/goto-programs/osx_fat_reader.cpp @@ -9,11 +9,11 @@ Module: Read Mach-O /// \file /// Read Mach-O +#include "osx_fat_reader.h" + #include #include -#include "osx_fat_reader.h" - #ifdef __APPLE__ #include #endif diff --git a/src/goto-programs/parameter_assignments.cpp b/src/goto-programs/parameter_assignments.cpp index 98d9f80a1c3..747ed374b23 100644 --- a/src/goto-programs/parameter_assignments.cpp +++ b/src/goto-programs/parameter_assignments.cpp @@ -11,11 +11,11 @@ Date: September 2015 /// \file /// Add parameter assignments +#include "parameter_assignments.h" + #include #include -#include "parameter_assignments.h" - class parameter_assignmentst { public: diff --git a/src/goto-programs/pointer_arithmetic.cpp b/src/goto-programs/pointer_arithmetic.cpp index 9911e3432c9..a89e1c04218 100644 --- a/src/goto-programs/pointer_arithmetic.cpp +++ b/src/goto-programs/pointer_arithmetic.cpp @@ -6,12 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "pointer_arithmetic.h" #include #include -#include "pointer_arithmetic.h" - pointer_arithmetict::pointer_arithmetict(const exprt &src) { pointer.make_nil(); diff --git a/src/goto-programs/read_bin_goto_object.cpp b/src/goto-programs/read_bin_goto_object.cpp index faad12665ae..1286d28e0b6 100644 --- a/src/goto-programs/read_bin_goto_object.cpp +++ b/src/goto-programs/read_bin_goto_object.cpp @@ -11,13 +11,14 @@ Date: June 2006 /// \file /// Read goto object files. +#include "read_bin_goto_object.h" + #include #include #include #include #include "goto_functions.h" -#include "read_bin_goto_object.h" /// read goto binary format v3 /// \par parameters: input stream, symbol_table, functions diff --git a/src/goto-programs/read_goto_binary.cpp b/src/goto-programs/read_goto_binary.cpp index 6eaede5fd97..1a4887cf0e9 100644 --- a/src/goto-programs/read_goto_binary.cpp +++ b/src/goto-programs/read_goto_binary.cpp @@ -9,6 +9,8 @@ Module: Read Goto Programs /// \file /// Read Goto Programs +#include "read_goto_binary.h" + #if defined(__linux__) || \ defined(__FreeBSD_kernel__) || \ defined(__GNU__) || \ @@ -32,7 +34,6 @@ Module: Read Goto Programs #include #include "goto_model.h" -#include "read_goto_binary.h" #include "read_bin_goto_object.h" #include "elf_reader.h" #include "osx_fat_reader.h" diff --git a/src/goto-programs/remove_asm.cpp b/src/goto-programs/remove_asm.cpp index c40fbb8334c..bd3517ce0a3 100644 --- a/src/goto-programs/remove_asm.cpp +++ b/src/goto-programs/remove_asm.cpp @@ -12,6 +12,8 @@ Date: December 2014 /// \file /// Remove 'asm' statements by compiling into suitable standard code +#include "remove_asm.h" + #include #include @@ -19,8 +21,6 @@ Date: December 2014 #include #include -#include "remove_asm.h" - class remove_asmt { public: diff --git a/src/goto-programs/remove_complex.cpp b/src/goto-programs/remove_complex.cpp index bb031082bd0..13ff90f908b 100644 --- a/src/goto-programs/remove_complex.cpp +++ b/src/goto-programs/remove_complex.cpp @@ -11,10 +11,10 @@ Date: September 2014 /// \file /// Remove 'complex' data type -#include - #include "remove_complex.h" +#include + static exprt complex_member(const exprt &expr, irep_idt id) { if(expr.id()==ID_struct && expr.operands().size()==2) diff --git a/src/goto-programs/remove_exceptions.cpp b/src/goto-programs/remove_exceptions.cpp index 320c0c7385d..4b24980f5be 100644 --- a/src/goto-programs/remove_exceptions.cpp +++ b/src/goto-programs/remove_exceptions.cpp @@ -11,6 +11,8 @@ Date: December 2016 /// \file /// Remove exception handling +#include "remove_exceptions.h" + #ifdef DEBUG #include #endif @@ -21,8 +23,6 @@ Date: December 2016 #include #include -#include "remove_exceptions.h" - class remove_exceptionst { typedef std::vector #include @@ -25,7 +27,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "remove_skip.h" -#include "remove_function_pointers.h" #include "compute_called_functions.h" #include "remove_const_function_pointers.h" diff --git a/src/goto-programs/remove_instanceof.cpp b/src/goto-programs/remove_instanceof.cpp index ec895ff800d..bc76c7e5991 100644 --- a/src/goto-programs/remove_instanceof.cpp +++ b/src/goto-programs/remove_instanceof.cpp @@ -9,9 +9,11 @@ Author: Chris Smowton, chris.smowton@diffblue.com /// \file /// Remove Instance-of Operators +#include "remove_instanceof.h" + #include "class_hierarchy.h" #include "class_identifier.h" -#include "remove_instanceof.h" + #include #include diff --git a/src/goto-programs/remove_returns.cpp b/src/goto-programs/remove_returns.cpp index fd8f49df4bc..d74e135693b 100644 --- a/src/goto-programs/remove_returns.cpp +++ b/src/goto-programs/remove_returns.cpp @@ -11,11 +11,11 @@ Date: September 2009 /// \file /// Remove function return values +#include "remove_returns.h" + #include #include -#include "remove_returns.h" - class remove_returnst { public: diff --git a/src/goto-programs/remove_static_init_loops.cpp b/src/goto-programs/remove_static_init_loops.cpp index 1c5065c63d4..b30cc2a9cb7 100644 --- a/src/goto-programs/remove_static_init_loops.cpp +++ b/src/goto-programs/remove_static_init_loops.cpp @@ -9,14 +9,14 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Unwind loops in static initializers +#include "remove_static_init_loops.h" + #include #include #include #include -#include "remove_static_init_loops.h" - class remove_static_init_loopst { public: diff --git a/src/goto-programs/remove_unreachable.cpp b/src/goto-programs/remove_unreachable.cpp index 1e34355ab99..562546f377b 100644 --- a/src/goto-programs/remove_unreachable.cpp +++ b/src/goto-programs/remove_unreachable.cpp @@ -9,11 +9,11 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Program Transformation +#include "remove_unreachable.h" + #include #include -#include "remove_unreachable.h" - /// remove unreachable code void remove_unreachable(goto_programt &goto_program) { diff --git a/src/goto-programs/remove_unused_functions.cpp b/src/goto-programs/remove_unused_functions.cpp index 5f41e1d6084..fd2d8cca614 100644 --- a/src/goto-programs/remove_unused_functions.cpp +++ b/src/goto-programs/remove_unused_functions.cpp @@ -9,10 +9,10 @@ Author: CM Wintersteiger /// \file /// Unused function removal -#include - #include "remove_unused_functions.h" +#include + void remove_unused_functions( goto_functionst &functions, message_handlert &message_handler) diff --git a/src/goto-programs/remove_vector.cpp b/src/goto-programs/remove_vector.cpp index 827bbb322dd..c0e90033968 100644 --- a/src/goto-programs/remove_vector.cpp +++ b/src/goto-programs/remove_vector.cpp @@ -11,10 +11,10 @@ Date: September 2014 /// \file /// Remove 'vector' data type -#include - #include "remove_vector.h" +#include + static bool have_to_remove_vector(const typet &type); static bool have_to_remove_vector(const exprt &expr) diff --git a/src/goto-programs/remove_virtual_functions.cpp b/src/goto-programs/remove_virtual_functions.cpp index e766b089274..c512e2b3212 100644 --- a/src/goto-programs/remove_virtual_functions.cpp +++ b/src/goto-programs/remove_virtual_functions.cpp @@ -9,12 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Remove Virtual Function (Method) Calls +#include "remove_virtual_functions.h" + #include #include #include "class_hierarchy.h" #include "class_identifier.h" -#include "remove_virtual_functions.h" class remove_virtual_functionst { diff --git a/src/goto-programs/set_properties.cpp b/src/goto-programs/set_properties.cpp index 303d8a9367d..5861d8d2fda 100644 --- a/src/goto-programs/set_properties.cpp +++ b/src/goto-programs/set_properties.cpp @@ -9,12 +9,11 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Set Properties +#include "set_properties.h" + #include #include - -#include "set_properties.h" - void set_properties( goto_programt &goto_program, std::unordered_set &property_set) diff --git a/src/goto-programs/show_goto_functions.cpp b/src/goto-programs/show_goto_functions.cpp index 516d2e6a3d2..05ff49f7ca4 100644 --- a/src/goto-programs/show_goto_functions.cpp +++ b/src/goto-programs/show_goto_functions.cpp @@ -9,6 +9,8 @@ Author: Peter Schrammel /// \file /// Show goto functions +#include "show_goto_functions.h" + #include #include @@ -22,7 +24,6 @@ Author: Peter Schrammel #include #include -#include "show_goto_functions.h" #include "goto_functions.h" #include "goto_model.h" diff --git a/src/goto-programs/show_goto_functions_json.cpp b/src/goto-programs/show_goto_functions_json.cpp index 6afbf023c6b..3cb1dfd4dd8 100644 --- a/src/goto-programs/show_goto_functions_json.cpp +++ b/src/goto-programs/show_goto_functions_json.cpp @@ -9,6 +9,8 @@ Author: Thomas Kiley /// \file /// Goto Program +#include "show_goto_functions_json.h" + #include #include @@ -21,7 +23,6 @@ Author: Thomas Kiley #include "goto_functions.h" #include "goto_model.h" -#include "show_goto_functions_json.h" /// For outputting the GOTO program in a readable JSON format. /// \param ns: the namespace to use to resolve names with diff --git a/src/goto-programs/show_goto_functions_xml.cpp b/src/goto-programs/show_goto_functions_xml.cpp index 10e624902e4..33424074949 100644 --- a/src/goto-programs/show_goto_functions_xml.cpp +++ b/src/goto-programs/show_goto_functions_xml.cpp @@ -9,10 +9,11 @@ Author: Thomas Kiley /// \file /// Goto Program +#include "show_goto_functions_xml.h" + #include #include - #include #include #include @@ -22,8 +23,6 @@ Author: Thomas Kiley #include "goto_functions.h" #include "goto_model.h" -#include "show_goto_functions_xml.h" - /// For outputting the GOTO program in a readable xml format. /// \param ns: the namespace to use to resolve names with show_goto_functions_xmlt::show_goto_functions_xmlt(const namespacet &ns): diff --git a/src/goto-programs/show_properties.cpp b/src/goto-programs/show_properties.cpp index a052a8aaecb..df88b4cb8b8 100644 --- a/src/goto-programs/show_properties.cpp +++ b/src/goto-programs/show_properties.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Show Claims +#include "show_properties.h" + #include #include @@ -18,7 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "show_properties.h" #include "goto_functions.h" #include "goto_model.h" diff --git a/src/goto-programs/show_symbol_table.cpp b/src/goto-programs/show_symbol_table.cpp index 60460147e52..1d5ce87f5a6 100644 --- a/src/goto-programs/show_symbol_table.cpp +++ b/src/goto-programs/show_symbol_table.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Show the symbol table +#include "show_symbol_table.h" + #include #include @@ -16,7 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "goto_model.h" -#include "show_symbol_table.h" void show_symbol_table_xml_ui() { diff --git a/src/goto-programs/slice_global_inits.cpp b/src/goto-programs/slice_global_inits.cpp index 5496a8266a3..2518a754af5 100644 --- a/src/goto-programs/slice_global_inits.cpp +++ b/src/goto-programs/slice_global_inits.cpp @@ -11,6 +11,8 @@ Date: December 2016 /// \file /// Remove initializations of unused global variables +#include "slice_global_inits.h" + #include #include @@ -23,8 +25,6 @@ Date: December 2016 #include #include -#include "slice_global_inits.h" - void slice_global_inits( const namespacet &ns, goto_functionst &goto_functions) diff --git a/src/goto-programs/string_abstraction.cpp b/src/goto-programs/string_abstraction.cpp index 1e4f110a1f6..da6119d2429 100644 --- a/src/goto-programs/string_abstraction.cpp +++ b/src/goto-programs/string_abstraction.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// String Abstraction +#include "string_abstraction.h" + #include #include @@ -21,7 +23,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "pointer_arithmetic.h" -#include "string_abstraction.h" bool string_abstractiont::build_wrap( const exprt &object, diff --git a/src/goto-programs/string_instrumentation.cpp b/src/goto-programs/string_instrumentation.cpp index a1147303308..41bf92a529b 100644 --- a/src/goto-programs/string_instrumentation.cpp +++ b/src/goto-programs/string_instrumentation.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// String Abstraction +#include "string_instrumentation.h" + #include #include @@ -21,8 +23,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "string_instrumentation.h" - exprt is_zero_string( const exprt &what, bool write) diff --git a/src/goto-programs/string_instrumentation.h b/src/goto-programs/string_instrumentation.h index 261b8dcdb1f..9d8bda00370 100644 --- a/src/goto-programs/string_instrumentation.h +++ b/src/goto-programs/string_instrumentation.h @@ -14,6 +14,8 @@ Author: Daniel Kroening, kroening@kroening.com #include "goto_functions.h" +class message_handlert; + void string_instrumentation( symbol_tablet &symbol_table, message_handlert &message_handler, diff --git a/src/goto-programs/vcd_goto_trace.cpp b/src/goto-programs/vcd_goto_trace.cpp index d6c39603cc4..4becb3af583 100644 --- a/src/goto-programs/vcd_goto_trace.cpp +++ b/src/goto-programs/vcd_goto_trace.cpp @@ -11,6 +11,8 @@ Date: June 2011 /// \file /// Traces of GOTO Programs in VCD (Value Change Dump) Format +#include "vcd_goto_trace.h" + #include #include #include @@ -19,8 +21,6 @@ Date: June 2011 #include #include -#include "vcd_goto_trace.h" - std::string as_vcd_binary( const exprt &expr, const namespacet &ns) diff --git a/src/goto-programs/wp.cpp b/src/goto-programs/wp.cpp index ea6ddd6a286..cb9981793d7 100644 --- a/src/goto-programs/wp.cpp +++ b/src/goto-programs/wp.cpp @@ -9,14 +9,14 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Weakest Preconditions +#include "wp.h" + // #include #include #include #include -#include "wp.h" - bool has_nondet(const exprt &dest) { forall_operands(it, dest) diff --git a/src/goto-programs/write_goto_binary.cpp b/src/goto-programs/write_goto_binary.cpp index 045aa9984fa..75542144d91 100644 --- a/src/goto-programs/write_goto_binary.cpp +++ b/src/goto-programs/write_goto_binary.cpp @@ -9,14 +9,14 @@ Author: CM Wintersteiger /// \file /// Write GOTO binaries +#include "write_goto_binary.h" + #include #include #include #include -#include "write_goto_binary.h" - /// Writes a goto program to disc, using goto binary format ver 2 bool write_goto_binary_v3( std::ostream &out, diff --git a/src/goto-programs/xml_goto_trace.cpp b/src/goto-programs/xml_goto_trace.cpp index 25e61157e9d..dca2c704a2b 100644 --- a/src/goto-programs/xml_goto_trace.cpp +++ b/src/goto-programs/xml_goto_trace.cpp @@ -11,6 +11,8 @@ Author: Daniel Kroening /// \file /// Traces of GOTO Programs +#include "xml_goto_trace.h" + #include #include @@ -19,8 +21,6 @@ Author: Daniel Kroening #include #include -#include "xml_goto_trace.h" - void convert( const namespacet &ns, const goto_tracet &goto_trace, diff --git a/src/goto-symex/adjust_float_expressions.cpp b/src/goto-symex/adjust_float_expressions.cpp index 67eb4a06b56..f2b09db09ec 100644 --- a/src/goto-symex/adjust_float_expressions.cpp +++ b/src/goto-symex/adjust_float_expressions.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution +#include "adjust_float_expressions.h" + #include #include #include @@ -18,8 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "adjust_float_expressions.h" - static bool have_to_adjust_float_expressions( const exprt &expr, const namespacet &ns) diff --git a/src/goto-symex/auto_objects.cpp b/src/goto-symex/auto_objects.cpp index dab9cdfa9b3..f2a90b1550b 100644 --- a/src/goto-symex/auto_objects.cpp +++ b/src/goto-symex/auto_objects.cpp @@ -9,13 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution of ANSI-C +#include "goto_symex.h" + #include #include #include #include -#include "goto_symex.h" - exprt goto_symext::make_auto_object(const typet &type) { dynamic_counter++; diff --git a/src/goto-symex/build_goto_trace.cpp b/src/goto-symex/build_goto_trace.cpp index 1657266b65b..8bb5bb8c6e8 100644 --- a/src/goto-symex/build_goto_trace.cpp +++ b/src/goto-symex/build_goto_trace.cpp @@ -11,6 +11,8 @@ Author: Daniel Kroening /// \file /// Traces of GOTO Programs +#include "build_goto_trace.h" + #include #include @@ -22,8 +24,6 @@ Author: Daniel Kroening #include "partial_order_concurrency.h" -#include "build_goto_trace.h" - exprt build_full_lhs_rec( const prop_convt &prop_conv, const namespacet &ns, diff --git a/src/goto-symex/goto_symex.cpp b/src/goto-symex/goto_symex.cpp index 0ed472967c1..7e50d9d9125 100644 --- a/src/goto-symex/goto_symex.cpp +++ b/src/goto-symex/goto_symex.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution -#include - #include "goto_symex.h" +#include + unsigned goto_symext::nondet_count=0; unsigned goto_symext::dynamic_counter=0; diff --git a/src/goto-symex/goto_symex_state.cpp b/src/goto-symex/goto_symex_state.cpp index 361669c5bec..6fdf4b54aa8 100644 --- a/src/goto-symex/goto_symex_state.cpp +++ b/src/goto-symex/goto_symex_state.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution +#include "goto_symex_state.h" + #include #include #include @@ -18,8 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_symex_state.h" - goto_symex_statet::goto_symex_statet(): depth(0), symex_target(NULL), diff --git a/src/goto-symex/memory_model.cpp b/src/goto-symex/memory_model.cpp index ebe44e15c79..4a647f78111 100644 --- a/src/goto-symex/memory_model.cpp +++ b/src/goto-symex/memory_model.cpp @@ -9,10 +9,10 @@ Author: Michael Tautschnig, michael.tautschnig@cs.ox.ac.uk /// \file /// Memory model for partial order concurrency -#include - #include "memory_model.h" +#include + memory_model_baset::memory_model_baset(const namespacet &_ns): partial_order_concurrencyt(_ns), var_cnt(0) diff --git a/src/goto-symex/memory_model_sc.cpp b/src/goto-symex/memory_model_sc.cpp index c6be709dfd9..cfe30c80766 100644 --- a/src/goto-symex/memory_model_sc.cpp +++ b/src/goto-symex/memory_model_sc.cpp @@ -9,10 +9,10 @@ Author: Michael Tautschnig, michael.tautschnig@cs.ox.ac.uk /// \file /// Memory model for partial order concurrency -#include - #include "memory_model_sc.h" +#include + void memory_model_sct::operator()(symex_target_equationt &equation) { statistics() << "Adding SC constraints" << eom; diff --git a/src/goto-symex/memory_model_tso.cpp b/src/goto-symex/memory_model_tso.cpp index f45d3db9d91..5b390267086 100644 --- a/src/goto-symex/memory_model_tso.cpp +++ b/src/goto-symex/memory_model_tso.cpp @@ -9,11 +9,11 @@ Author: Michael Tautschnig, michael.tautschnig@cs.ox.ac.uk /// \file /// Memory model for partial order concurrency +#include "memory_model_tso.h" + #include #include -#include "memory_model_tso.h" - void memory_model_tsot::operator()(symex_target_equationt &equation) { statistics() << "Adding TSO constraints" << eom; diff --git a/src/goto-symex/partial_order_concurrency.cpp b/src/goto-symex/partial_order_concurrency.cpp index 8cb323fec37..e0f82ba6af2 100644 --- a/src/goto-symex/partial_order_concurrency.cpp +++ b/src/goto-symex/partial_order_concurrency.cpp @@ -9,13 +9,13 @@ Author: Michael Tautschnig, michael.tautschnig@cs.ox.ac.uk /// \file /// Add constraints to equation encoding partial orders on events +#include "partial_order_concurrency.h" + #include #include #include -#include "partial_order_concurrency.h" - partial_order_concurrencyt::partial_order_concurrencyt( const namespacet &_ns):ns(_ns) { diff --git a/src/goto-symex/postcondition.cpp b/src/goto-symex/postcondition.cpp index 43aa79f6aa5..4383439b72d 100644 --- a/src/goto-symex/postcondition.cpp +++ b/src/goto-symex/postcondition.cpp @@ -9,11 +9,12 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution +#include "postcondition.h" + #include #include #include "goto_symex_state.h" -#include "postcondition.h" class postconditiont { diff --git a/src/goto-symex/precondition.cpp b/src/goto-symex/precondition.cpp index 091408f0afc..11657a78e55 100644 --- a/src/goto-symex/precondition.cpp +++ b/src/goto-symex/precondition.cpp @@ -9,12 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution +#include "precondition.h" + #include #include #include "goto_symex_state.h" -#include "precondition.h" class preconditiont { diff --git a/src/goto-symex/rewrite_union.cpp b/src/goto-symex/rewrite_union.cpp index 2ecf09bed67..0f40f934b84 100644 --- a/src/goto-symex/rewrite_union.cpp +++ b/src/goto-symex/rewrite_union.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution of ANSI-C +#include "rewrite_union.h" + #include #include #include @@ -18,8 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "rewrite_union.h" - static bool have_to_rewrite_union( const exprt &expr, const namespacet &ns) diff --git a/src/goto-symex/slice.cpp b/src/goto-symex/slice.cpp index a398264963e..0a59b7befea 100644 --- a/src/goto-symex/slice.cpp +++ b/src/goto-symex/slice.cpp @@ -9,9 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Slicer for symex traces +#include "slice.h" + #include -#include "slice.h" #include "symex_slice_class.h" void symex_slicet::get_symbols(const exprt &expr) diff --git a/src/goto-symex/slice_by_trace.cpp b/src/goto-symex/slice_by_trace.cpp index f0dfccba4f5..80acfa4add8 100644 --- a/src/goto-symex/slice_by_trace.cpp +++ b/src/goto-symex/slice_by_trace.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Slicer for symex traces +#include "slice_by_trace.h" + #include #include #include @@ -22,8 +24,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "slice_by_trace.h" - void symex_slice_by_tracet::slice_by_trace( std::string trace_files, symex_target_equationt &equation) diff --git a/src/goto-symex/symex_assign.cpp b/src/goto-symex/symex_assign.cpp index de5ba76df76..a403ff3a129 100644 --- a/src/goto-symex/symex_assign.cpp +++ b/src/goto-symex/symex_assign.cpp @@ -9,12 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution +#include "goto_symex.h" + #include #include #include -#include "goto_symex.h" #include "goto_symex_state.h" // #define USE_UPDATE diff --git a/src/goto-symex/symex_builtin_functions.cpp b/src/goto-symex/symex_builtin_functions.cpp index a85d6e5b18d..d3d26b540f2 100644 --- a/src/goto-symex/symex_builtin_functions.cpp +++ b/src/goto-symex/symex_builtin_functions.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution of ANSI-C +#include "goto_symex.h" + #include #include @@ -26,7 +28,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_symex.h" #include "goto_symex_state.h" inline static typet c_sizeof_type_rec(const exprt &expr) diff --git a/src/goto-symex/symex_clean_expr.cpp b/src/goto-symex/symex_clean_expr.cpp index ed455757bf8..a894403c819 100644 --- a/src/goto-symex/symex_clean_expr.cpp +++ b/src/goto-symex/symex_clean_expr.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution of ANSI-C +#include "goto_symex.h" + #include #include #include @@ -16,8 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_symex.h" - void goto_symext::process_array_expr_rec( exprt &expr, const typet &type) const diff --git a/src/goto-symex/symex_dead.cpp b/src/goto-symex/symex_dead.cpp index 11bcadcfbd7..eacf6d247a8 100644 --- a/src/goto-symex/symex_dead.cpp +++ b/src/goto-symex/symex_dead.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution +#include "goto_symex.h" + #include #include @@ -16,8 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_symex.h" - void goto_symext::symex_dead(statet &state) { const goto_programt::instructiont &instruction=*state.source.pc; diff --git a/src/goto-symex/symex_decl.cpp b/src/goto-symex/symex_decl.cpp index 436a2d6e55c..eda7144f99b 100644 --- a/src/goto-symex/symex_decl.cpp +++ b/src/goto-symex/symex_decl.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution +#include "goto_symex.h" + #include #include @@ -18,8 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_symex.h" - void goto_symext::symex_decl(statet &state) { const goto_programt::instructiont &instruction=*state.source.pc; diff --git a/src/goto-symex/symex_dereference.cpp b/src/goto-symex/symex_dereference.cpp index 6b28ec35adf..61dcecbf3a4 100644 --- a/src/goto-symex/symex_dereference.cpp +++ b/src/goto-symex/symex_dereference.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution of ANSI-C +#include "goto_symex.h" + #include #include #include @@ -20,7 +22,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_symex.h" #include "symex_dereference_state.h" void goto_symext::dereference_rec_address_of( diff --git a/src/goto-symex/symex_dereference_state.cpp b/src/goto-symex/symex_dereference_state.cpp index 1e75222786f..f0e36f5d03c 100644 --- a/src/goto-symex/symex_dereference_state.cpp +++ b/src/goto-symex/symex_dereference_state.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution of ANSI-C -#include - #include "symex_dereference_state.h" +#include + void symex_dereference_statet::dereference_failure( const std::string &property, const std::string &msg, diff --git a/src/goto-symex/symex_function_call.cpp b/src/goto-symex/symex_function_call.cpp index d50c66f85f5..a71a142b89b 100644 --- a/src/goto-symex/symex_function_call.cpp +++ b/src/goto-symex/symex_function_call.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution of ANSI-C +#include "goto_symex.h" + #include #include #include @@ -24,8 +26,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_symex.h" - bool goto_symext::get_unwind_recursion( const irep_idt &identifier, const unsigned thread_nr, diff --git a/src/goto-symex/symex_goto.cpp b/src/goto-symex/symex_goto.cpp index 410a7e94ebc..a86efc0815e 100644 --- a/src/goto-symex/symex_goto.cpp +++ b/src/goto-symex/symex_goto.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution +#include "goto_symex.h" + #include #include @@ -16,8 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_symex.h" - void goto_symext::symex_goto(statet &state) { const goto_programt::instructiont &instruction=*state.source.pc; diff --git a/src/goto-symex/symex_main.cpp b/src/goto-symex/symex_main.cpp index e64ee0b93ba..b8a1e294f10 100644 --- a/src/goto-symex/symex_main.cpp +++ b/src/goto-symex/symex_main.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution +#include "goto_symex.h" + #include #include @@ -18,8 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_symex.h" - void goto_symext::symex_transition( statet &state, goto_programt::const_targett to, diff --git a/src/goto-symex/symex_other.cpp b/src/goto-symex/symex_other.cpp index b9b2c7fd597..d5b30fa4b05 100644 --- a/src/goto-symex/symex_other.cpp +++ b/src/goto-symex/symex_other.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution +#include "goto_symex.h" + #include #include @@ -19,8 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "goto_symex.h" - void goto_symext::symex_other( const goto_functionst &goto_functions, statet &state) diff --git a/src/goto-symex/symex_start_thread.cpp b/src/goto-symex/symex_start_thread.cpp index c4e2e83422c..8ebed5216c1 100644 --- a/src/goto-symex/symex_start_thread.cpp +++ b/src/goto-symex/symex_start_thread.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution -#include - #include "goto_symex.h" +#include + void goto_symext::symex_start_thread(statet &state) { if(state.guard.is_false()) diff --git a/src/goto-symex/symex_target_equation.cpp b/src/goto-symex/symex_target_equation.cpp index e0c8e86a42f..ab8b7383c04 100644 --- a/src/goto-symex/symex_target_equation.cpp +++ b/src/goto-symex/symex_target_equation.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution +#include "symex_target_equation.h" + #include #include @@ -19,7 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "goto_symex_state.h" -#include "symex_target_equation.h" symex_target_equationt::symex_target_equationt( const namespacet &_ns):ns(_ns) diff --git a/src/java_bytecode/character_refine_preprocess.cpp b/src/java_bytecode/character_refine_preprocess.cpp index 912ea2ab131..b7c1e1b281e 100644 --- a/src/java_bytecode/character_refine_preprocess.cpp +++ b/src/java_bytecode/character_refine_preprocess.cpp @@ -13,9 +13,10 @@ Date: March 2017 /// Preprocess a goto-programs so that calls to the java Character library are /// replaced by simple expressions. +#include "character_refine_preprocess.h" + #include #include -#include "character_refine_preprocess.h" /// converts based on a function on expressions /// \param expr_function: A reference to a function on expressions diff --git a/src/java_bytecode/character_refine_preprocess.h b/src/java_bytecode/character_refine_preprocess.h index afef65eb8dc..3714aa6b9a9 100644 --- a/src/java_bytecode/character_refine_preprocess.h +++ b/src/java_bytecode/character_refine_preprocess.h @@ -22,6 +22,7 @@ Date: March 2017 #include #include +#include class character_refine_preprocesst:public messaget { diff --git a/src/java_bytecode/ci_lazy_methods.cpp b/src/java_bytecode/ci_lazy_methods.cpp index dc71b1c0cd1..d7d95e85b91 100644 --- a/src/java_bytecode/ci_lazy_methods.cpp +++ b/src/java_bytecode/ci_lazy_methods.cpp @@ -9,10 +9,10 @@ Author: Chris Smowton, chris.smowton@diffblue.com /// \file /// Context-insensitive lazy methods container -#include - #include "ci_lazy_methods.h" +#include + /// Notes `method_symbol_name` is referenced from some reachable function, and /// should therefore be elaborated. /// \par parameters: `method_symbol_name`: method name; must exist in symbol diff --git a/src/java_bytecode/expr2java.cpp b/src/java_bytecode/expr2java.cpp index c6f2d0f90ef..69829c676d8 100644 --- a/src/java_bytecode/expr2java.cpp +++ b/src/java_bytecode/expr2java.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@cs.cmu.edu \*******************************************************************/ +#include "expr2java.h" #include @@ -20,7 +21,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include #include "java_types.h" -#include "expr2java.h" std::string expr2javat::convert_code_function_call( const code_function_callt &src, diff --git a/src/java_bytecode/jar_file.cpp b/src/java_bytecode/jar_file.cpp index f70ef35492c..26bb1a9de50 100644 --- a/src/java_bytecode/jar_file.cpp +++ b/src/java_bytecode/jar_file.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "jar_file.h" #include #include @@ -14,8 +15,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "jar_file.h" - void jar_filet::open( java_class_loader_limitt &class_loader_limit, const std::string &filename) diff --git a/src/java_bytecode/java_bytecode_convert_class.cpp b/src/java_bytecode/java_bytecode_convert_class.cpp index 05b4e44e47b..b6f28694f16 100644 --- a/src/java_bytecode/java_bytecode_convert_class.cpp +++ b/src/java_bytecode/java_bytecode_convert_class.cpp @@ -9,11 +9,12 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// JAVA Bytecode Language Conversion +#include "java_bytecode_convert_class.h" + #ifdef DEBUG #include #endif -#include "java_bytecode_convert_class.h" #include "java_root_class.h" #include "java_types.h" #include "java_bytecode_convert_method.h" diff --git a/src/java_bytecode/java_bytecode_convert_method.cpp b/src/java_bytecode/java_bytecode_convert_method.cpp index b1f3d956ec1..9adf82a0218 100644 --- a/src/java_bytecode/java_bytecode_convert_method.cpp +++ b/src/java_bytecode/java_bytecode_convert_method.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// JAVA Bytecode Language Conversion +#include "java_bytecode_convert_method.h" + #ifdef DEBUG #include #endif @@ -26,7 +28,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "java_bytecode_convert_method.h" #include "java_bytecode_convert_method_class.h" #include "bytecode_info.h" #include "java_types.h" @@ -2402,19 +2403,8 @@ void java_bytecode_convert_method( java_bytecode_convert_method(class_symbol, method); } -/*******************************************************************\ - -Function: java_bytecode_convert_methodt::save_stack_entries - - Inputs: - - Outputs: - - Purpose: create temporary variables if a write instruction can have undesired - side-effects - -\*******************************************************************/ - +/// create temporary variables if a write instruction can have undesired side- +/// effects void java_bytecode_convert_methodt::save_stack_entries( const std::string &tmp_var_prefix, const typet &tmp_var_type, @@ -2455,19 +2445,7 @@ void java_bytecode_convert_methodt::save_stack_entries( } } -/*******************************************************************\ - -Function: java_bytecode_convert_methodt::create_stack_tmp_var - - Inputs: - - Outputs: - - Purpose: actually create a temporary variable to hold the value of a stack - entry - -\*******************************************************************/ - +/// actually create a temporary variable to hold the value of a stack entry void java_bytecode_convert_methodt::create_stack_tmp_var( const std::string &tmp_var_prefix, const typet &tmp_var_type, diff --git a/src/java_bytecode/java_bytecode_internal_additions.cpp b/src/java_bytecode/java_bytecode_internal_additions.cpp index 9177b22ad2b..9a0211239df 100644 --- a/src/java_bytecode/java_bytecode_internal_additions.cpp +++ b/src/java_bytecode/java_bytecode_internal_additions.cpp @@ -6,14 +6,13 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "java_bytecode_internal_additions.h" #include #include #include -#include "java_bytecode_internal_additions.h" - void java_internal_additions(symbol_tablet &dest) { // add __CPROVER_rounding_mode diff --git a/src/java_bytecode/java_bytecode_language.cpp b/src/java_bytecode/java_bytecode_language.cpp index 85205c7525d..7710e84ba52 100644 --- a/src/java_bytecode/java_bytecode_language.cpp +++ b/src/java_bytecode/java_bytecode_language.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "java_bytecode_language.h" #include @@ -18,7 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "java_bytecode_language.h" #include "java_bytecode_convert_class.h" #include "java_bytecode_convert_method.h" #include "java_bytecode_internal_additions.h" diff --git a/src/java_bytecode/java_bytecode_language.h b/src/java_bytecode/java_bytecode_language.h index 1d9f2c5e341..9077e89bd83 100644 --- a/src/java_bytecode/java_bytecode_language.h +++ b/src/java_bytecode/java_bytecode_language.h @@ -18,6 +18,8 @@ Author: Daniel Kroening, kroening@kroening.com #define MAX_NONDET_ARRAY_LENGTH_DEFAULT 5 +class symbolt; + enum lazy_methods_modet { LAZY_METHODS_MODE_EAGER, diff --git a/src/java_bytecode/java_bytecode_parse_tree.cpp b/src/java_bytecode/java_bytecode_parse_tree.cpp index 6da1a7f1872..d7dda702683 100644 --- a/src/java_bytecode/java_bytecode_parse_tree.cpp +++ b/src/java_bytecode/java_bytecode_parse_tree.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "java_bytecode_parse_tree.h" #include @@ -16,8 +17,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "expr2java.h" -#include "java_bytecode_parse_tree.h" - void java_bytecode_parse_treet::classt::swap( classt &other) { diff --git a/src/java_bytecode/java_bytecode_parser.cpp b/src/java_bytecode/java_bytecode_parser.cpp index ca271aaabaf..77874da4944 100644 --- a/src/java_bytecode/java_bytecode_parser.cpp +++ b/src/java_bytecode/java_bytecode_parser.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "java_bytecode_parser.h" #include #include @@ -20,7 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "java_bytecode_parser.h" #include "java_bytecode_parse_tree.h" #include "java_types.h" #include "bytecode_info.h" diff --git a/src/java_bytecode/java_bytecode_typecheck.cpp b/src/java_bytecode/java_bytecode_typecheck.cpp index 2386cdc87f0..5b09fcdaf23 100644 --- a/src/java_bytecode/java_bytecode_typecheck.cpp +++ b/src/java_bytecode/java_bytecode_typecheck.cpp @@ -9,12 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// JAVA Bytecode Conversion / Type Checking +#include "java_bytecode_typecheck.h" + #include #include #include #include "expr2java.h" -#include "java_bytecode_typecheck.h" std::string java_bytecode_typecheckt::to_string(const exprt &expr) { diff --git a/src/java_bytecode/java_bytecode_typecheck_expr.cpp b/src/java_bytecode/java_bytecode_typecheck_expr.cpp index d1d0e988d49..5b7fa0d886f 100644 --- a/src/java_bytecode/java_bytecode_typecheck_expr.cpp +++ b/src/java_bytecode/java_bytecode_typecheck_expr.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// JAVA Bytecode Conversion / Type Checking +#include "java_bytecode_typecheck.h" + #include #include @@ -18,7 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "java_bytecode_typecheck.h" #include "java_pointer_casts.h" #include "java_types.h" diff --git a/src/java_bytecode/java_bytecode_typecheck_type.cpp b/src/java_bytecode/java_bytecode_typecheck_type.cpp index 79b2146f07a..aa92d9333cf 100644 --- a/src/java_bytecode/java_bytecode_typecheck_type.cpp +++ b/src/java_bytecode/java_bytecode_typecheck_type.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// JAVA Bytecode Conversion / Type Checking -#include - #include "java_bytecode_typecheck.h" +#include + void java_bytecode_typecheckt::typecheck_type(typet &type) { if(type.id()==ID_symbol) diff --git a/src/java_bytecode/java_bytecode_vtable.cpp b/src/java_bytecode/java_bytecode_vtable.cpp index d6a7b7fb4c0..a352fbd74cd 100644 --- a/src/java_bytecode/java_bytecode_vtable.cpp +++ b/src/java_bytecode/java_bytecode_vtable.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "java_bytecode_vtable.h" #include #include @@ -17,8 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "java_bytecode_vtable.h" - const char ID_virtual_name[]="virtual_name"; class is_virtual_name_equalt diff --git a/src/java_bytecode/java_class_loader.cpp b/src/java_bytecode/java_class_loader.cpp index dfb849a4986..6b720f05fb6 100644 --- a/src/java_bytecode/java_class_loader.cpp +++ b/src/java_bytecode/java_class_loader.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "java_class_loader.h" #include #include @@ -16,7 +17,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "java_bytecode_parser.h" -#include "java_class_loader.h" #include "jar_file.h" java_bytecode_parse_treet &java_class_loadert::operator()( diff --git a/src/java_bytecode/java_class_loader_limit.cpp b/src/java_bytecode/java_class_loader_limit.cpp index 7ba1d4fe0ee..dbf8d23d27d 100644 --- a/src/java_bytecode/java_class_loader_limit.cpp +++ b/src/java_bytecode/java_class_loader_limit.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// limit class path loading -#include - #include "java_class_loader_limit.h" +#include + /// initializes class with either regex matcher or match set /// \par parameters: parameter from `java-cp-include-files` void java_class_loader_limitt::setup_class_load_limit( diff --git a/src/java_bytecode/java_entry_point.cpp b/src/java_bytecode/java_entry_point.cpp index 3e2496d1444..1cb0a10d701 100644 --- a/src/java_bytecode/java_entry_point.cpp +++ b/src/java_bytecode/java_entry_point.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "java_entry_point.h" #include #include @@ -28,7 +29,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "java_entry_point.h" #include "java_object_factory.h" #include "java_types.h" diff --git a/src/java_bytecode/java_entry_point.h b/src/java_bytecode/java_entry_point.h index 75108dd1d92..e2d2fa3f41b 100644 --- a/src/java_bytecode/java_entry_point.h +++ b/src/java_bytecode/java_entry_point.h @@ -11,6 +11,7 @@ Author: Daniel Kroening, kroening@kroening.com #define CPROVER_JAVA_BYTECODE_JAVA_ENTRY_POINT_H #include +#include bool java_entry_point( class symbol_tablet &symbol_table, diff --git a/src/java_bytecode/java_local_variable_table.cpp b/src/java_bytecode/java_local_variable_table.cpp index b1462e4321d..052b958d058 100644 --- a/src/java_bytecode/java_local_variable_table.cpp +++ b/src/java_bytecode/java_local_variable_table.cpp @@ -10,6 +10,7 @@ Author: Chris Smowton, chris.smowton@diffblue.com /// Java local variable table processing #include "java_bytecode_convert_method_class.h" + #include "java_types.h" #include diff --git a/src/java_bytecode/java_object_factory.cpp b/src/java_bytecode/java_object_factory.cpp index 628b830bd07..15d8eac7bc4 100644 --- a/src/java_bytecode/java_object_factory.cpp +++ b/src/java_bytecode/java_object_factory.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "java_object_factory.h" #include #include @@ -23,7 +24,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "java_object_factory.h" #include "java_types.h" #include "java_utils.h" diff --git a/src/java_bytecode/java_pointer_casts.cpp b/src/java_bytecode/java_pointer_casts.cpp index c2f04e4d1a5..4d0371bca6d 100644 --- a/src/java_bytecode/java_pointer_casts.cpp +++ b/src/java_bytecode/java_pointer_casts.cpp @@ -9,12 +9,12 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// JAVA Pointer Casts +#include "java_pointer_casts.h" + #include #include #include -#include "java_pointer_casts.h" - /// dereference pointer expression /// \return dereferenced pointer static exprt clean_deref(const exprt &ptr) diff --git a/src/java_bytecode/java_pointer_casts.h b/src/java_bytecode/java_pointer_casts.h index eff1f6ccef8..8c635c9ab53 100644 --- a/src/java_bytecode/java_pointer_casts.h +++ b/src/java_bytecode/java_pointer_casts.h @@ -12,6 +12,10 @@ Author: DiffBlue #ifndef CPROVER_JAVA_BYTECODE_JAVA_POINTER_CASTS_H #define CPROVER_JAVA_BYTECODE_JAVA_POINTER_CASTS_H +class exprt; +class typet; +class namespacet; + bool find_superclass_with_type( exprt &ptr, const typet &target_type, diff --git a/src/java_bytecode/java_root_class.cpp b/src/java_bytecode/java_root_class.cpp index 1e93ca62d16..f3353c48d1a 100644 --- a/src/java_bytecode/java_root_class.cpp +++ b/src/java_bytecode/java_root_class.cpp @@ -6,12 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "java_root_class.h" #include #include #include "java_types.h" -#include "java_root_class.h" /******************************************************************* diff --git a/src/java_bytecode/java_types.cpp b/src/java_bytecode/java_types.cpp index 59c33e10051..ae8d64d102f 100644 --- a/src/java_bytecode/java_types.cpp +++ b/src/java_bytecode/java_types.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "java_types.h" #include #include @@ -15,8 +16,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "java_types.h" - typet java_int_type() { return signedbv_typet(32); diff --git a/src/java_bytecode/java_utils.cpp b/src/java_bytecode/java_utils.cpp index 0754eae13a3..6611b359f00 100644 --- a/src/java_bytecode/java_utils.cpp +++ b/src/java_bytecode/java_utils.cpp @@ -6,12 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "java_utils.h" #include #include -#include "java_utils.h" - bool java_is_array_type(const typet &type) { if(type.id()!=ID_struct) diff --git a/src/jsil/expr2jsil.cpp b/src/jsil/expr2jsil.cpp index 811a9a1608b..5f88416b2ca 100644 --- a/src/jsil/expr2jsil.cpp +++ b/src/jsil/expr2jsil.cpp @@ -9,10 +9,10 @@ Author: Michael Tautschnig, tautschn@amazon.com /// \file /// Jsil Language -#include - #include "expr2jsil.h" +#include + class expr2jsilt:public expr2ct { public: diff --git a/src/jsil/jsil_convert.cpp b/src/jsil/jsil_convert.cpp index aa4ff02fffc..328a1c76223 100644 --- a/src/jsil/jsil_convert.cpp +++ b/src/jsil/jsil_convert.cpp @@ -9,11 +9,12 @@ Author: Michael Tautschnig, tautschn@amazon.com /// \file /// Jsil Language Conversion +#include "jsil_convert.h" + #include #include #include "jsil_parse_tree.h" -#include "jsil_convert.h" class jsil_convertt:public messaget { diff --git a/src/jsil/jsil_entry_point.cpp b/src/jsil/jsil_entry_point.cpp index ba1860ce6fc..2f4d88e1bb3 100644 --- a/src/jsil/jsil_entry_point.cpp +++ b/src/jsil/jsil_entry_point.cpp @@ -9,6 +9,8 @@ Author: Michael Tautschnig, tautschn@amazon.com /// \file /// Jsil Language +#include "jsil_entry_point.h" + #include #include #include @@ -18,8 +20,6 @@ Author: Michael Tautschnig, tautschn@amazon.com #include -#include "jsil_entry_point.h" - #define INITIALIZE CPROVER_PREFIX "initialize" static void create_initialize(symbol_tablet &symbol_table) diff --git a/src/jsil/jsil_internal_additions.cpp b/src/jsil/jsil_internal_additions.cpp index 6250258b4be..446910062d7 100644 --- a/src/jsil/jsil_internal_additions.cpp +++ b/src/jsil/jsil_internal_additions.cpp @@ -9,6 +9,8 @@ Author: Michael Tautschnig, tautschn@amazon.com /// \file /// Jsil Language +#include "jsil_internal_additions.h" + #include #include #include @@ -17,8 +19,6 @@ Author: Michael Tautschnig, tautschn@amazon.com #include "jsil_types.h" -#include "jsil_internal_additions.h" - void jsil_internal_additions(symbol_tablet &dest) { // add __CPROVER_rounding_mode diff --git a/src/jsil/jsil_language.cpp b/src/jsil/jsil_language.cpp index baa9cebee0c..48b5c8dcbe2 100644 --- a/src/jsil/jsil_language.cpp +++ b/src/jsil/jsil_language.cpp @@ -9,6 +9,8 @@ Author: Michael Tautschnig, tautschn@amazon.com /// \file /// Jsil Language +#include "jsil_language.h" + #include #include @@ -19,8 +21,6 @@ Author: Michael Tautschnig, tautschn@amazon.com #include "jsil_parser.h" #include "jsil_typecheck.h" -#include "jsil_language.h" - std::set jsil_languaget::extensions() const { return { "jsil" }; diff --git a/src/jsil/jsil_parse_tree.cpp b/src/jsil/jsil_parse_tree.cpp index 75573ad0637..093a62f4fb9 100644 --- a/src/jsil/jsil_parse_tree.cpp +++ b/src/jsil/jsil_parse_tree.cpp @@ -9,12 +9,12 @@ Author: Michael Tautschnig, tautschn@amazon.com /// \file /// Jsil Language +#include "jsil_parse_tree.h" + #include #include "jsil_types.h" -#include "jsil_parse_tree.h" - static bool insert_at_label( const codet &code, const irep_idt &label, diff --git a/src/jsil/jsil_typecheck.cpp b/src/jsil/jsil_typecheck.cpp index 892a8df7f23..81ebf82f87b 100644 --- a/src/jsil/jsil_typecheck.cpp +++ b/src/jsil/jsil_typecheck.cpp @@ -9,6 +9,8 @@ Author: Michael Tautschnig, tautschn@amazon.com /// \file /// Jsil Language +#include "jsil_typecheck.h" + #include #include #include @@ -16,8 +18,6 @@ Author: Michael Tautschnig, tautschn@amazon.com #include "expr2jsil.h" #include "jsil_types.h" -#include "jsil_typecheck.h" - std::string jsil_typecheckt::to_string(const exprt &expr) { return expr2jsil(expr, ns); diff --git a/src/jsil/jsil_typecheck.h b/src/jsil/jsil_typecheck.h index a1be82cfddb..bca8bde2089 100644 --- a/src/jsil/jsil_typecheck.h +++ b/src/jsil/jsil_typecheck.h @@ -18,7 +18,7 @@ Author: Michael Tautschnig, tautschn@amazon.com #include #include - +class symbol_exprt; class codet; bool jsil_typecheck( diff --git a/src/jsil/jsil_types.cpp b/src/jsil/jsil_types.cpp index 68c75b8827a..12a76787149 100644 --- a/src/jsil/jsil_types.cpp +++ b/src/jsil/jsil_types.cpp @@ -9,10 +9,10 @@ Author: Daiva Naudziuniene, daivan@amazon.com /// \file /// Jsil Language -#include - #include "jsil_types.h" +#include + typet jsil_any_type() { return jsil_union_typet({ // NOLINT(whitespace/braces) diff --git a/src/json/json_parser.cpp b/src/json/json_parser.cpp index 30b0ee61586..fb244a10f9b 100644 --- a/src/json/json_parser.cpp +++ b/src/json/json_parser.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "json_parser.h" #include -#include "json_parser.h" - json_parsert json_parser; // 'do it all' function diff --git a/src/langapi/language_ui.cpp b/src/langapi/language_ui.cpp index f718d57a5f7..ddd774f2c4b 100644 --- a/src/langapi/language_ui.cpp +++ b/src/langapi/language_ui.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@cs.cmu.edu \*******************************************************************/ +#include "language_ui.h" #include #include @@ -16,7 +17,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include #include -#include "language_ui.h" #include "mode.h" /// Constructor diff --git a/src/langapi/language_util.cpp b/src/langapi/language_util.cpp index 03f9d98df97..dd31f122ea5 100644 --- a/src/langapi/language_util.cpp +++ b/src/langapi/language_util.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@cs.cmu.edu \*******************************************************************/ +#include "language_util.h" #include @@ -14,7 +15,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include #include -#include "language_util.h" #include "mode.h" static languaget* get_language( diff --git a/src/langapi/mode.cpp b/src/langapi/mode.cpp index a558c9be5e9..55c533f9495 100644 --- a/src/langapi/mode.cpp +++ b/src/langapi/mode.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@cs.cmu.edu \*******************************************************************/ +#include "mode.h" #include #include @@ -17,8 +18,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include -#include "mode.h" - struct language_entryt { language_factoryt factory; diff --git a/src/linking/linking.cpp b/src/linking/linking.cpp index 645cbf32e06..cdd8c2df8d8 100644 --- a/src/linking/linking.cpp +++ b/src/linking/linking.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// ANSI-C Linking +#include "linking.h" + #include #include @@ -22,7 +24,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "linking.h" #include "linking_class.h" std::string linkingt::expr_to_string( diff --git a/src/linking/remove_internal_symbols.cpp b/src/linking/remove_internal_symbols.cpp index 3aca40f8219..4755515200e 100644 --- a/src/linking/remove_internal_symbols.cpp +++ b/src/linking/remove_internal_symbols.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening /// \file /// Remove symbols that are internal only +#include "remove_internal_symbols.h" + #include #include #include @@ -16,8 +18,6 @@ Author: Daniel Kroening #include #include -#include "remove_internal_symbols.h" - void get_symbols_rec( const namespacet &ns, const symbolt &symbol, diff --git a/src/linking/static_lifetime_init.cpp b/src/linking/static_lifetime_init.cpp index 2ea7762ab9f..2cacc49b032 100644 --- a/src/linking/static_lifetime_init.cpp +++ b/src/linking/static_lifetime_init.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "static_lifetime_init.h" #include #include @@ -21,7 +22,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "static_lifetime_init.h" #include "zero_initializer.h" bool static_lifetime_init( diff --git a/src/linking/zero_initializer.cpp b/src/linking/zero_initializer.cpp index 95016b9229e..4e6963b6fc3 100644 --- a/src/linking/zero_initializer.cpp +++ b/src/linking/zero_initializer.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Linking: Zero Initialization +#include "zero_initializer.h" + #include #include @@ -21,8 +23,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "zero_initializer.h" - class zero_initializert:public messaget { public: diff --git a/src/memory-models/mm2cpp.cpp b/src/memory-models/mm2cpp.cpp index a151658d491..65d74b89cf5 100644 --- a/src/memory-models/mm2cpp.cpp +++ b/src/memory-models/mm2cpp.cpp @@ -6,13 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "mm2cpp.h" #include #include -#include "mm2cpp.h" - class mm2cppt { public: diff --git a/src/memory-models/mmcc_main.cpp b/src/memory-models/mmcc_main.cpp index 9e73843b3ce..962c5bbf527 100644 --- a/src/memory-models/mmcc_main.cpp +++ b/src/memory-models/mmcc_main.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// mmcc Main Module -#include - #include "mmcc_parse_options.h" +#include + #ifdef _MSC_VER int wmain(int argc, const wchar_t **argv_wide) { diff --git a/src/memory-models/mmcc_parse_options.cpp b/src/memory-models/mmcc_parse_options.cpp index 5a458332016..8fae9244839 100644 --- a/src/memory-models/mmcc_parse_options.cpp +++ b/src/memory-models/mmcc_parse_options.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// mmcc Command Line Option Processing +#include "mmcc_parse_options.h" + #include #include @@ -18,7 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "mm_parser.h" #include "mm2cpp.h" -#include "mmcc_parse_options.h" mmcc_parse_optionst::mmcc_parse_optionst(int argc, const char **argv): parse_options_baset(MMCC_OPTIONS, argc, argv) diff --git a/src/musketeer/cycles_visitor.cpp b/src/musketeer/cycles_visitor.cpp index 6e220cae17e..08bbe4bea96 100644 --- a/src/musketeer/cycles_visitor.cpp +++ b/src/musketeer/cycles_visitor.cpp @@ -9,10 +9,11 @@ Author: Vincent Nimal /// \file /// cycles visitor for computing edges involved for fencing +#include "cycles_visitor.h" + #include #include -#include "cycles_visitor.h" #include "fence_inserter.h" class instrumentert; diff --git a/src/musketeer/fence_inserter.cpp b/src/musketeer/fence_inserter.cpp index c534452707c..cd1aaa910f5 100644 --- a/src/musketeer/fence_inserter.cpp +++ b/src/musketeer/fence_inserter.cpp @@ -9,6 +9,8 @@ Author: Vincent Nimal /// \file /// ILP construction for all cycles and resolution +#include "fence_inserter.h" + #include #include @@ -19,7 +21,6 @@ Author: Vincent Nimal #include #endif -#include "fence_inserter.h" #include "ilp.h" class abstract_eventt; diff --git a/src/musketeer/fence_shared.cpp b/src/musketeer/fence_shared.cpp index b53f67a5cf4..4dc970c513d 100644 --- a/src/musketeer/fence_shared.cpp +++ b/src/musketeer/fence_shared.cpp @@ -6,6 +6,7 @@ Author: Vincent Nimal \*******************************************************************/ +#include "fence_shared.h" #include #include @@ -24,8 +25,6 @@ Author: Vincent Nimal #include // #include -#include "fence_shared.h" - #ifdef LOCAL_MAY #include #endif diff --git a/src/musketeer/fencer.cpp b/src/musketeer/fencer.cpp index 86de5d8fc8b..f62917df4e6 100644 --- a/src/musketeer/fencer.cpp +++ b/src/musketeer/fencer.cpp @@ -9,6 +9,8 @@ Author: Vincent Nimal /// \file /// Fence inference: Main +#include "fencer.h" + #include #include @@ -19,7 +21,6 @@ Author: Vincent Nimal #include "fence_inserter.h" #include "fence_user_def.h" #include "fence_assert.h" -#include "fencer.h" void fence_weak_memory( memory_modelt model, diff --git a/src/musketeer/graph_visitor.cpp b/src/musketeer/graph_visitor.cpp index 883246b5891..87fe14e0cbf 100644 --- a/src/musketeer/graph_visitor.cpp +++ b/src/musketeer/graph_visitor.cpp @@ -9,9 +9,10 @@ Author: Vincent Nimal /// \file /// graph visitor for computing edges involved for fencing -#include "fence_inserter.h" #include "graph_visitor.h" +#include "fence_inserter.h" + /* implemented: BTWN1, BTWN4 */ #define BTWN1 diff --git a/src/musketeer/languages.cpp b/src/musketeer/languages.cpp index a7e4497a038..8ae85e2e27a 100644 --- a/src/musketeer/languages.cpp +++ b/src/musketeer/languages.cpp @@ -9,12 +9,12 @@ Module: Language Registration /// \file /// Language Registration +#include "musketeer_parse_options.h" + #include #include -#include "musketeer_parse_options.h" - void goto_fence_inserter_parse_optionst::register_languages() { register_language(new_ansi_c_language); diff --git a/src/musketeer/musketeer_parse_options.cpp b/src/musketeer/musketeer_parse_options.cpp index 16860e7b20d..ace73687432 100644 --- a/src/musketeer/musketeer_parse_options.cpp +++ b/src/musketeer/musketeer_parse_options.cpp @@ -9,6 +9,8 @@ Module: Main Module /// \file /// Main Module +#include "musketeer_parse_options.h" + #include #include #include @@ -42,7 +44,6 @@ Module: Main Module #include "propagate_const_function_pointers.h" #include "version.h" -#include "musketeer_parse_options.h" #include "fencer.h" #include "fence_shared.h" #include "pensieve.h" diff --git a/src/musketeer/pensieve.cpp b/src/musketeer/pensieve.cpp index a58c4bf05de..d46397f74a3 100644 --- a/src/musketeer/pensieve.cpp +++ b/src/musketeer/pensieve.cpp @@ -6,6 +6,7 @@ Author: Vincent Nimal \*******************************************************************/ +#include "pensieve.h" #include #include @@ -15,8 +16,6 @@ Author: Vincent Nimal #include #include -#include "pensieve.h" - void fence_pensieve( value_setst &value_sets, symbol_tablet &symbol_table, diff --git a/src/musketeer/propagate_const_function_pointers.cpp b/src/musketeer/propagate_const_function_pointers.cpp index d48ce8da63f..eca3648c285 100644 --- a/src/musketeer/propagate_const_function_pointers.cpp +++ b/src/musketeer/propagate_const_function_pointers.cpp @@ -9,6 +9,8 @@ Author: Vincent Nimal /// \file /// Constant Function Pointer Propagation +#include "propagate_const_function_pointers.h" + #include #include #include @@ -23,8 +25,6 @@ Author: Vincent Nimal #include #include -#include "propagate_const_function_pointers.h" - class const_function_pointer_propagationt { protected: diff --git a/src/path-symex/loc_ref.h b/src/path-symex/loc_ref.h index 8f192c79583..56cbb7b19b5 100644 --- a/src/path-symex/loc_ref.h +++ b/src/path-symex/loc_ref.h @@ -12,7 +12,7 @@ Author: Daniel Kroening, kroening@kroening.com #ifndef CPROVER_PATH_SYMEX_LOC_REF_H #define CPROVER_PATH_SYMEX_LOC_REF_H -#include +#include class loc_reft { diff --git a/src/path-symex/path_symex.cpp b/src/path-symex/path_symex.cpp index 2aef635cbf1..c5004e51d55 100644 --- a/src/path-symex/path_symex.cpp +++ b/src/path-symex/path_symex.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Concrete Symbolic Transformer +#include "path_symex.h" + #include #include #include @@ -22,7 +24,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "path_symex.h" #include "path_symex_class.h" #ifdef DEBUG diff --git a/src/path-symex/path_symex_history.cpp b/src/path-symex/path_symex_history.cpp index 502f3af19eb..618dbbce332 100644 --- a/src/path-symex/path_symex_history.cpp +++ b/src/path-symex/path_symex_history.cpp @@ -9,14 +9,14 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// History of path-based symbolic simulator +#include "path_symex_history.h" + #include #include #include -#include "path_symex_history.h" - void path_symex_stept::output(std::ostream &out) const { out << "PCs:"; diff --git a/src/path-symex/path_symex_state.cpp b/src/path-symex/path_symex_state.cpp index 293de5966c0..495f598202a 100644 --- a/src/path-symex/path_symex_state.cpp +++ b/src/path-symex/path_symex_state.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// State of path-based symbolic simulator +#include "path_symex_state.h" + #include #include #include @@ -19,8 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "path_symex_state.h" - #ifdef DEBUG #include #include diff --git a/src/path-symex/path_symex_state_read.cpp b/src/path-symex/path_symex_state_read.cpp index 885160beb9e..a6993c19b05 100644 --- a/src/path-symex/path_symex_state_read.cpp +++ b/src/path-symex/path_symex_state_read.cpp @@ -9,13 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// State of path-based symbolic simulator +#include "path_symex_state.h" + #include #include #include -#include "path_symex_state.h" - #ifdef DEBUG #include #include diff --git a/src/path-symex/var_map.cpp b/src/path-symex/var_map.cpp index 97563e31240..f5dea20a96d 100644 --- a/src/path-symex/var_map.cpp +++ b/src/path-symex/var_map.cpp @@ -9,14 +9,14 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Variable Numbering +#include "var_map.h" + #include #include #include #include -#include "var_map.h" - var_mapt::var_infot &var_mapt::operator()( const irep_idt &symbol, const irep_idt &suffix, diff --git a/src/path-symex/var_map.h b/src/path-symex/var_map.h index 11ffcdbdc49..7b17169c441 100644 --- a/src/path-symex/var_map.h +++ b/src/path-symex/var_map.h @@ -17,6 +17,7 @@ Author: Daniel Kroening, kroening@kroening.com #include #include +#include class var_mapt { diff --git a/src/pointer-analysis/add_failed_symbols.cpp b/src/pointer-analysis/add_failed_symbols.cpp index 5def51a4499..e8da3c0d773 100644 --- a/src/pointer-analysis/add_failed_symbols.cpp +++ b/src/pointer-analysis/add_failed_symbols.cpp @@ -9,12 +9,12 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Pointer Dereferencing +#include "add_failed_symbols.h" + #include #include #include -#include "add_failed_symbols.h" - irep_idt failed_symbol_id(const irep_idt &id) { return id2string(id)+"$object"; diff --git a/src/pointer-analysis/dereference.cpp b/src/pointer-analysis/dereference.cpp index 56a42effa31..5063278d4c9 100644 --- a/src/pointer-analysis/dereference.cpp +++ b/src/pointer-analysis/dereference.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution of ANSI-C +#include "dereference.h" + #ifdef DEBUG #include #include @@ -23,8 +25,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "dereference.h" - /// \par parameters: expression, to be dereferenced /// \return returns object after dereferencing exprt dereferencet::operator()(const exprt &pointer) diff --git a/src/pointer-analysis/goto_program_dereference.cpp b/src/pointer-analysis/goto_program_dereference.cpp index 44340aa0fc4..857f9e722fc 100644 --- a/src/pointer-analysis/goto_program_dereference.cpp +++ b/src/pointer-analysis/goto_program_dereference.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Dereferencing Operations on GOTO Programs +#include "goto_program_dereference.h" + #include #include #include @@ -16,8 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "goto_program_dereference.h" - bool goto_program_dereferencet::has_failed_symbol( const exprt &expr, const symbolt *&symbol) diff --git a/src/pointer-analysis/rewrite_index.cpp b/src/pointer-analysis/rewrite_index.cpp index 1594267afbd..cc7011f1ed5 100644 --- a/src/pointer-analysis/rewrite_index.cpp +++ b/src/pointer-analysis/rewrite_index.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Pointer Dereferencing -#include - #include "rewrite_index.h" +#include + /// rewrite a[i] to *(a+i) dereference_exprt rewrite_index(const index_exprt &index_expr) { diff --git a/src/pointer-analysis/show_value_sets.cpp b/src/pointer-analysis/show_value_sets.cpp index be1b1893ba4..ce555e2dd02 100644 --- a/src/pointer-analysis/show_value_sets.cpp +++ b/src/pointer-analysis/show_value_sets.cpp @@ -9,12 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Show Value Sets +#include "show_value_sets.h" + #include #include #include "value_set_analysis.h" -#include "show_value_sets.h" void show_value_sets( ui_message_handlert::uit ui, diff --git a/src/pointer-analysis/value_set.cpp b/src/pointer-analysis/value_set.cpp index a41796677a3..28b5bf360a0 100644 --- a/src/pointer-analysis/value_set.cpp +++ b/src/pointer-analysis/value_set.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Value Set +#include "value_set.h" + #include #include @@ -29,7 +31,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #endif -#include "value_set.h" #include "add_failed_symbols.h" const value_sett::object_map_dt value_sett::object_map_dt::blank; diff --git a/src/pointer-analysis/value_set_analysis.cpp b/src/pointer-analysis/value_set_analysis.cpp index 549fd53a348..d4a3388142e 100644 --- a/src/pointer-analysis/value_set_analysis.cpp +++ b/src/pointer-analysis/value_set_analysis.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Value Set Propagation +#include "value_set_analysis.h" + #include #include #include @@ -16,8 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "value_set_analysis.h" - void value_set_analysist::initialize( const goto_programt &goto_program) { diff --git a/src/pointer-analysis/value_set_analysis_fi.cpp b/src/pointer-analysis/value_set_analysis_fi.cpp index 63aaa330ac9..dee9db9ad94 100644 --- a/src/pointer-analysis/value_set_analysis_fi.cpp +++ b/src/pointer-analysis/value_set_analysis_fi.cpp @@ -10,6 +10,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Value Set Propagation (Flow Insensitive) +#include "value_set_analysis_fi.h" + #include #include #include @@ -17,8 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "value_set_analysis_fi.h" - void value_set_analysis_fit::initialize( const goto_programt &goto_program) { diff --git a/src/pointer-analysis/value_set_analysis_fivr.cpp b/src/pointer-analysis/value_set_analysis_fivr.cpp index dab177cc5f4..9b46f458896 100644 --- a/src/pointer-analysis/value_set_analysis_fivr.cpp +++ b/src/pointer-analysis/value_set_analysis_fivr.cpp @@ -10,6 +10,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Value Set Propagation (Flow Insensitive) +#include "value_set_analysis_fivr.h" + #include #include #include @@ -17,8 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "value_set_analysis_fivr.h" - void value_set_analysis_fivrt::initialize( const goto_programt &goto_program) { diff --git a/src/pointer-analysis/value_set_analysis_fivrns.cpp b/src/pointer-analysis/value_set_analysis_fivrns.cpp index 5fbd77522bf..63870eb7432 100644 --- a/src/pointer-analysis/value_set_analysis_fivrns.cpp +++ b/src/pointer-analysis/value_set_analysis_fivrns.cpp @@ -10,6 +10,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Value Set Propagation (Flow Insensitive, Validity Regions) +#include "value_set_analysis_fivrns.h" + #include #include #include @@ -17,8 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "value_set_analysis_fivrns.h" - void value_set_analysis_fivrnst::initialize( const goto_programt &goto_program) { diff --git a/src/pointer-analysis/value_set_dereference.cpp b/src/pointer-analysis/value_set_dereference.cpp index 81edc39bbd9..d2098ece102 100644 --- a/src/pointer-analysis/value_set_dereference.cpp +++ b/src/pointer-analysis/value_set_dereference.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution of ANSI-C +#include "value_set_dereference.h" + #ifdef DEBUG #include #endif @@ -39,7 +41,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "value_set_dereference.h" #include "pointer_offset_sum.h" // global data, horrible diff --git a/src/pointer-analysis/value_set_domain.cpp b/src/pointer-analysis/value_set_domain.cpp index 7ddfd6deb29..4b296b541df 100644 --- a/src/pointer-analysis/value_set_domain.cpp +++ b/src/pointer-analysis/value_set_domain.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Value Set -#include - #include "value_set_domain.h" +#include + void value_set_domaint::transform( const namespacet &ns, locationt from_l, diff --git a/src/pointer-analysis/value_set_domain_fi.cpp b/src/pointer-analysis/value_set_domain_fi.cpp index c56e1bdb321..09bc21174f5 100644 --- a/src/pointer-analysis/value_set_domain_fi.cpp +++ b/src/pointer-analysis/value_set_domain_fi.cpp @@ -10,10 +10,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Value Set Domain (Flow Insensitive) -#include - #include "value_set_domain_fi.h" +#include + bool value_set_domain_fit::transform( const namespacet &ns, locationt from_l, diff --git a/src/pointer-analysis/value_set_domain_fivr.cpp b/src/pointer-analysis/value_set_domain_fivr.cpp index 4defd25047f..27fec810fcc 100644 --- a/src/pointer-analysis/value_set_domain_fivr.cpp +++ b/src/pointer-analysis/value_set_domain_fivr.cpp @@ -10,10 +10,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Value Set Domain (Flow Insensitive, Sharing, Validity Regions) -#include - #include "value_set_domain_fivr.h" +#include + bool value_set_domain_fivrt::transform( const namespacet &ns, locationt from_l, diff --git a/src/pointer-analysis/value_set_domain_fivrns.cpp b/src/pointer-analysis/value_set_domain_fivrns.cpp index f4ecf668429..c2ae1e81771 100644 --- a/src/pointer-analysis/value_set_domain_fivrns.cpp +++ b/src/pointer-analysis/value_set_domain_fivrns.cpp @@ -10,10 +10,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Value Set Domain (Flow Insensitive, Validity Regions) -#include - #include "value_set_domain_fivrns.h" +#include + bool value_set_domain_fivrnst::transform( const namespacet &ns, locationt from_l, diff --git a/src/pointer-analysis/value_set_fi.cpp b/src/pointer-analysis/value_set_fi.cpp index 64336252d1a..77962a3b3b2 100644 --- a/src/pointer-analysis/value_set_fi.cpp +++ b/src/pointer-analysis/value_set_fi.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Value Set (Flow Insensitive, Sharing) +#include "value_set_fi.h" + #include #include @@ -23,8 +25,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "value_set_fi.h" - const value_set_fit::object_map_dt value_set_fit::object_map_dt::blank; object_numberingt value_set_fit::object_numbering; hash_numbering value_set_fit::function_numbering; diff --git a/src/pointer-analysis/value_set_fivr.cpp b/src/pointer-analysis/value_set_fivr.cpp index 763eb9407c2..6bd7e1321e9 100644 --- a/src/pointer-analysis/value_set_fivr.cpp +++ b/src/pointer-analysis/value_set_fivr.cpp @@ -10,6 +10,8 @@ Author: Daniel Kroening, kroening@kroening.com, /// \file /// Value Set (Flow Insensitive, Sharing, Validity Regions) +#include "value_set_fivr.h" + #include #include @@ -24,8 +26,6 @@ Author: Daniel Kroening, kroening@kroening.com, #include #include -#include "value_set_fivr.h" - const value_set_fivrt::object_map_dt value_set_fivrt::object_map_dt::blank; object_numberingt value_set_fivrt::object_numbering; hash_numbering value_set_fivrt::function_numbering; diff --git a/src/pointer-analysis/value_set_fivrns.cpp b/src/pointer-analysis/value_set_fivrns.cpp index bb15453d996..0eaf08b201b 100644 --- a/src/pointer-analysis/value_set_fivrns.cpp +++ b/src/pointer-analysis/value_set_fivrns.cpp @@ -10,6 +10,8 @@ Author: Daniel Kroening, kroening@kroening.com, /// \file /// Value Set (Flow Insensitive, Validity Regions) +#include "value_set_fivrns.h" + #include #include @@ -24,8 +26,6 @@ Author: Daniel Kroening, kroening@kroening.com, #include #include -#include "value_set_fivrns.h" - const value_set_fivrnst::object_map_dt value_set_fivrnst::object_map_dt::blank; object_numberingt value_set_fivrnst::object_numbering; hash_numbering value_set_fivrnst::function_numbering; diff --git a/src/solvers/cvc/cvc_conv.cpp b/src/solvers/cvc/cvc_conv.cpp index 3646a5add65..356a9af1fd4 100644 --- a/src/solvers/cvc/cvc_conv.cpp +++ b/src/solvers/cvc/cvc_conv.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "cvc_conv.h" #include #include @@ -21,8 +22,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "cvc_conv.h" - void cvc_convt::print_assignment(std::ostream &out) const { // Boolean stuff diff --git a/src/solvers/cvc/cvc_dec.cpp b/src/solvers/cvc/cvc_dec.cpp index e61479a2dbf..cdb83e67afa 100644 --- a/src/solvers/cvc/cvc_dec.cpp +++ b/src/solvers/cvc/cvc_dec.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "cvc_dec.h" #include #include @@ -28,8 +29,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "cvc_dec.h" - cvc_temp_filet::cvc_temp_filet() { temp_out_filename="cvc_dec_out_"+std::to_string(getpid())+".tmp"; diff --git a/src/solvers/cvc/cvc_prop.cpp b/src/solvers/cvc/cvc_prop.cpp index 23f51daa332..7a02bd65335 100644 --- a/src/solvers/cvc/cvc_prop.cpp +++ b/src/solvers/cvc/cvc_prop.cpp @@ -6,13 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "cvc_prop.h" #include #include - -#include "cvc_prop.h" - explicit cvc_propt::cvc_propt(std::ostream &_out):out(_out) { _no_variables=0; diff --git a/src/solvers/dplib/dplib_conv.cpp b/src/solvers/dplib/dplib_conv.cpp index 7d0ea0f45c4..a87cd0c25a2 100644 --- a/src/solvers/dplib/dplib_conv.cpp +++ b/src/solvers/dplib/dplib_conv.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "dplib_conv.h" #include #include @@ -20,8 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "dplib_conv.h" - std::string dplib_convt::bin_zero(unsigned bits) { assert(bits!=0); diff --git a/src/solvers/dplib/dplib_dec.cpp b/src/solvers/dplib/dplib_dec.cpp index 1750e7bc6f9..111805276ba 100644 --- a/src/solvers/dplib/dplib_dec.cpp +++ b/src/solvers/dplib/dplib_dec.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "dplib_dec.h" #include #include @@ -27,8 +28,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "dplib_dec.h" - dplib_temp_filet::dplib_temp_filet() { temp_out_filename="dplib_dec_out_"+std::to_string(getpid())+".tmp"; diff --git a/src/solvers/dplib/dplib_prop.cpp b/src/solvers/dplib/dplib_prop.cpp index ccc22614198..a0111b3b8fc 100644 --- a/src/solvers/dplib/dplib_prop.cpp +++ b/src/solvers/dplib/dplib_prop.cpp @@ -6,14 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "dplib_prop.h" #include #include - -#include "dplib_prop.h" - dplib_propt::dplib_propt(std::ostream &_out):out(_out) { // we skip index 0 diff --git a/src/solvers/flattening/arrays.cpp b/src/solvers/flattening/arrays.cpp index a7c92cbc277..c628997ca58 100644 --- a/src/solvers/flattening/arrays.cpp +++ b/src/solvers/flattening/arrays.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "arrays.h" #include #include @@ -20,8 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "arrays.h" - arrayst::arrayst( const namespacet &_ns, propt &_prop):equalityt(_ns, _prop) diff --git a/src/solvers/flattening/boolbv.cpp b/src/solvers/flattening/boolbv.cpp index b3edb8e24cf..58b09b0d1bb 100644 --- a/src/solvers/flattening/boolbv.cpp +++ b/src/solvers/flattening/boolbv.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include #include @@ -23,7 +24,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "boolbv.h" #include "boolbv_type.h" #include "../floatbv/float_utils.h" diff --git a/src/solvers/flattening/boolbv_abs.cpp b/src/solvers/flattening/boolbv_abs.cpp index c32bca58cd9..7f10b724ed1 100644 --- a/src/solvers/flattening/boolbv_abs.cpp +++ b/src/solvers/flattening/boolbv_abs.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include -#include "boolbv.h" #include "boolbv_type.h" #include "../floatbv/float_utils.h" diff --git a/src/solvers/flattening/boolbv_add_sub.cpp b/src/solvers/flattening/boolbv_add_sub.cpp index 373738fe1fc..0486874d6d2 100644 --- a/src/solvers/flattening/boolbv_add_sub.cpp +++ b/src/solvers/flattening/boolbv_add_sub.cpp @@ -6,13 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include #include -#include "boolbv.h" - #include "../floatbv/float_utils.h" bvt boolbvt::convert_add_sub(const exprt &expr) diff --git a/src/solvers/flattening/boolbv_array_of.cpp b/src/solvers/flattening/boolbv_array_of.cpp index 2ddd2b674ad..2c01f095638 100644 --- a/src/solvers/flattening/boolbv_array_of.cpp +++ b/src/solvers/flattening/boolbv_array_of.cpp @@ -6,12 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include #include -#include "boolbv.h" - bvt boolbvt::convert_array_of(const array_of_exprt &expr) { if(expr.type().id()!=ID_array) diff --git a/src/solvers/flattening/boolbv_bv_rel.cpp b/src/solvers/flattening/boolbv_bv_rel.cpp index 7cf08127937..37f3dbadd3c 100644 --- a/src/solvers/flattening/boolbv_bv_rel.cpp +++ b/src/solvers/flattening/boolbv_bv_rel.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include -#include "boolbv.h" #include "boolbv_type.h" #include "../floatbv/float_utils.h" diff --git a/src/solvers/flattening/boolbv_byte_extract.cpp b/src/solvers/flattening/boolbv_byte_extract.cpp index 98a8e4b507d..0cc2c46bd89 100644 --- a/src/solvers/flattening/boolbv_byte_extract.cpp +++ b/src/solvers/flattening/boolbv_byte_extract.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include @@ -14,7 +15,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "boolbv.h" #include "flatten_byte_operators.h" bvt map_bv(const endianness_mapt &map, const bvt &src) diff --git a/src/solvers/flattening/boolbv_byte_update.cpp b/src/solvers/flattening/boolbv_byte_update.cpp index cd8851ccfcf..5446a0498cf 100644 --- a/src/solvers/flattening/boolbv_byte_update.cpp +++ b/src/solvers/flattening/boolbv_byte_update.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include #include @@ -14,8 +15,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "boolbv.h" - bvt boolbvt::convert_byte_update(const byte_update_exprt &expr) { if(expr.operands().size()!=3) diff --git a/src/solvers/flattening/boolbv_case.cpp b/src/solvers/flattening/boolbv_case.cpp index 9bedb525dce..6434f216178 100644 --- a/src/solvers/flattening/boolbv_case.cpp +++ b/src/solvers/flattening/boolbv_case.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include -#include "boolbv.h" - bvt boolbvt::convert_case(const exprt &expr) { const std::vector &operands=expr.operands(); diff --git a/src/solvers/flattening/boolbv_cond.cpp b/src/solvers/flattening/boolbv_cond.cpp index 0b2184a2129..514c1e817f3 100644 --- a/src/solvers/flattening/boolbv_cond.cpp +++ b/src/solvers/flattening/boolbv_cond.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include -#include "boolbv.h" - bvt boolbvt::convert_cond(const exprt &expr) { const exprt::operandst &operands=expr.operands(); diff --git a/src/solvers/flattening/boolbv_div.cpp b/src/solvers/flattening/boolbv_div.cpp index 1eacc7c64ca..d8c0581fce5 100644 --- a/src/solvers/flattening/boolbv_div.cpp +++ b/src/solvers/flattening/boolbv_div.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include -#include "boolbv.h" - bvt boolbvt::convert_div(const div_exprt &expr) { if(expr.type().id()!=ID_unsignedbv && diff --git a/src/solvers/flattening/boolbv_equality.cpp b/src/solvers/flattening/boolbv_equality.cpp index 997f8738c97..95a379a5a95 100644 --- a/src/solvers/flattening/boolbv_equality.cpp +++ b/src/solvers/flattening/boolbv_equality.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include @@ -15,7 +16,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "flatten_byte_operators.h" -#include "boolbv.h" literalt boolbvt::convert_equality(const equal_exprt &expr) { diff --git a/src/solvers/flattening/boolbv_extractbit.cpp b/src/solvers/flattening/boolbv_extractbit.cpp index 607926550a8..f24b8a1394a 100644 --- a/src/solvers/flattening/boolbv_extractbit.cpp +++ b/src/solvers/flattening/boolbv_extractbit.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include #include @@ -14,8 +15,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "boolbv.h" - literalt boolbvt::convert_extractbit(const extractbit_exprt &expr) { const exprt::operandst &operands=expr.operands(); diff --git a/src/solvers/flattening/boolbv_extractbits.cpp b/src/solvers/flattening/boolbv_extractbits.cpp index e0576b0222c..3b363a6367d 100644 --- a/src/solvers/flattening/boolbv_extractbits.cpp +++ b/src/solvers/flattening/boolbv_extractbits.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include -#include "boolbv.h" - bvt boolbvt::convert_extractbits(const extractbits_exprt &expr) { std::size_t width=boolbv_width(expr.type()); diff --git a/src/solvers/flattening/boolbv_floatbv_op.cpp b/src/solvers/flattening/boolbv_floatbv_op.cpp index 6dbf6181c22..d6609691df2 100644 --- a/src/solvers/flattening/boolbv_floatbv_op.cpp +++ b/src/solvers/flattening/boolbv_floatbv_op.cpp @@ -6,14 +6,13 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include #include #include -#include "boolbv.h" - #include "../floatbv/float_utils.h" bvt boolbvt::convert_floatbv_typecast(const floatbv_typecast_exprt &expr) diff --git a/src/solvers/flattening/boolbv_get.cpp b/src/solvers/flattening/boolbv_get.cpp index fc166f758d3..a0f86997e12 100644 --- a/src/solvers/flattening/boolbv_get.cpp +++ b/src/solvers/flattening/boolbv_get.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include @@ -15,7 +16,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "boolbv.h" #include "boolbv_type.h" exprt boolbvt::get(const exprt &expr) const diff --git a/src/solvers/flattening/boolbv_ieee_float_rel.cpp b/src/solvers/flattening/boolbv_ieee_float_rel.cpp index 4f5ad89436b..c7297d26792 100644 --- a/src/solvers/flattening/boolbv_ieee_float_rel.cpp +++ b/src/solvers/flattening/boolbv_ieee_float_rel.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include -#include "boolbv.h" #include "boolbv_type.h" #include "../floatbv/float_utils.h" diff --git a/src/solvers/flattening/boolbv_index.cpp b/src/solvers/flattening/boolbv_index.cpp index 4be4408c792..ff63fedf14e 100644 --- a/src/solvers/flattening/boolbv_index.cpp +++ b/src/solvers/flattening/boolbv_index.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include @@ -13,8 +14,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "boolbv.h" - bvt boolbvt::convert_index(const index_exprt &expr) { if(expr.id()!=ID_index) diff --git a/src/solvers/flattening/boolbv_map.cpp b/src/solvers/flattening/boolbv_map.cpp index 37c66024ca0..7e5c069cd64 100644 --- a/src/solvers/flattening/boolbv_map.cpp +++ b/src/solvers/flattening/boolbv_map.cpp @@ -6,12 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv_map.h" #include #include "../prop/prop.h" -#include "boolbv_map.h" #include "boolbv_width.h" #ifdef DEBUG diff --git a/src/solvers/flattening/boolbv_member.cpp b/src/solvers/flattening/boolbv_member.cpp index 16d5de84ca1..448e80f5653 100644 --- a/src/solvers/flattening/boolbv_member.cpp +++ b/src/solvers/flattening/boolbv_member.cpp @@ -6,13 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include #include #include -#include "boolbv.h" - bvt boolbvt::convert_member(const member_exprt &expr) { const exprt &struct_op=expr.struct_op(); diff --git a/src/solvers/flattening/boolbv_mult.cpp b/src/solvers/flattening/boolbv_mult.cpp index 51d8f342ebe..15803b7ead5 100644 --- a/src/solvers/flattening/boolbv_mult.cpp +++ b/src/solvers/flattening/boolbv_mult.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include -#include "boolbv.h" - bvt boolbvt::convert_mult(const exprt &expr) { std::size_t width=boolbv_width(expr.type()); diff --git a/src/solvers/flattening/boolbv_overflow.cpp b/src/solvers/flattening/boolbv_overflow.cpp index 748975540ab..33dd61bca33 100644 --- a/src/solvers/flattening/boolbv_overflow.cpp +++ b/src/solvers/flattening/boolbv_overflow.cpp @@ -6,14 +6,13 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include #include #include -#include "boolbv.h" - literalt boolbvt::convert_overflow(const exprt &expr) { const exprt::operandst &operands=expr.operands(); diff --git a/src/solvers/flattening/boolbv_quantifier.cpp b/src/solvers/flattening/boolbv_quantifier.cpp index 0a706b41fa5..23f8857f80d 100644 --- a/src/solvers/flattening/boolbv_quantifier.cpp +++ b/src/solvers/flattening/boolbv_quantifier.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include @@ -13,8 +14,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "boolbv.h" - /// A method to detect equivalence between experts that can contain typecast bool expr_eq(const exprt &expr1, const exprt &expr2) { diff --git a/src/solvers/flattening/boolbv_replication.cpp b/src/solvers/flattening/boolbv_replication.cpp index a9ff9087492..c7368cc1830 100644 --- a/src/solvers/flattening/boolbv_replication.cpp +++ b/src/solvers/flattening/boolbv_replication.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include -#include "boolbv.h" - bvt boolbvt::convert_replication(const replication_exprt &expr) { std::size_t width=boolbv_width(expr.type()); diff --git a/src/solvers/flattening/boolbv_shift.cpp b/src/solvers/flattening/boolbv_shift.cpp index 8c09d7d92e4..596d51067e2 100644 --- a/src/solvers/flattening/boolbv_shift.cpp +++ b/src/solvers/flattening/boolbv_shift.cpp @@ -6,13 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include #include -#include "boolbv.h" - bvt boolbvt::convert_shift(const binary_exprt &expr) { const irep_idt &type_id=expr.type().id(); diff --git a/src/solvers/flattening/boolbv_struct.cpp b/src/solvers/flattening/boolbv_struct.cpp index f900430a6f4..e1dbe90601f 100644 --- a/src/solvers/flattening/boolbv_struct.cpp +++ b/src/solvers/flattening/boolbv_struct.cpp @@ -6,12 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include #include -#include "boolbv.h" - bvt boolbvt::convert_struct(const struct_exprt &expr) { const struct_typet &struct_type=to_struct_type(ns.follow(expr.type())); diff --git a/src/solvers/flattening/boolbv_typecast.cpp b/src/solvers/flattening/boolbv_typecast.cpp index 4f41d48330f..ecd2522532c 100644 --- a/src/solvers/flattening/boolbv_typecast.cpp +++ b/src/solvers/flattening/boolbv_typecast.cpp @@ -6,12 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include #include -#include "boolbv.h" #include "boolbv_type.h" #include "c_bit_field_replacement_type.h" diff --git a/src/solvers/flattening/boolbv_unary_minus.cpp b/src/solvers/flattening/boolbv_unary_minus.cpp index 2cef5e38e73..e4b2707c108 100644 --- a/src/solvers/flattening/boolbv_unary_minus.cpp +++ b/src/solvers/flattening/boolbv_unary_minus.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include -#include "boolbv.h" #include "boolbv_type.h" #include "../floatbv/float_utils.h" diff --git a/src/solvers/flattening/boolbv_union.cpp b/src/solvers/flattening/boolbv_union.cpp index f35c6b8344e..9432741019a 100644 --- a/src/solvers/flattening/boolbv_union.cpp +++ b/src/solvers/flattening/boolbv_union.cpp @@ -6,13 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include #include #include -#include "boolbv.h" - bvt boolbvt::convert_union(const union_exprt &expr) { std::size_t width=boolbv_width(expr.type()); diff --git a/src/solvers/flattening/boolbv_update.cpp b/src/solvers/flattening/boolbv_update.cpp index 96fce252259..e48e5990f07 100644 --- a/src/solvers/flattening/boolbv_update.cpp +++ b/src/solvers/flattening/boolbv_update.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include #include @@ -16,8 +17,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "boolbv.h" - bvt boolbvt::convert_update(const exprt &expr) { const exprt::operandst &ops=expr.operands(); diff --git a/src/solvers/flattening/boolbv_width.cpp b/src/solvers/flattening/boolbv_width.cpp index 5d8eef01963..a61be58ad7f 100644 --- a/src/solvers/flattening/boolbv_width.cpp +++ b/src/solvers/flattening/boolbv_width.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv_width.h" #include @@ -13,8 +14,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "boolbv_width.h" - boolbv_widtht::boolbv_widtht(const namespacet &_ns):ns(_ns) { } diff --git a/src/solvers/flattening/boolbv_with.cpp b/src/solvers/flattening/boolbv_with.cpp index c5f92806bf3..b3a8170d8f5 100644 --- a/src/solvers/flattening/boolbv_with.cpp +++ b/src/solvers/flattening/boolbv_with.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "boolbv.h" #include #include @@ -14,8 +15,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "boolbv.h" - bvt boolbvt::convert_with(const exprt &expr) { if(expr.operands().size()<3) diff --git a/src/solvers/flattening/bv_minimize.cpp b/src/solvers/flattening/bv_minimize.cpp index 263c9b4ccc0..5bc26cee316 100644 --- a/src/solvers/flattening/bv_minimize.cpp +++ b/src/solvers/flattening/bv_minimize.cpp @@ -6,13 +6,12 @@ Author: Georg Weissenbacher, georg.weissenbacher@inf.ethz.ch \*******************************************************************/ +#include "bv_minimize.h" #include #include -#include "bv_minimize.h" - void bv_minimizet::add_objective( prop_minimizet &prop_minimize, const exprt &objective) diff --git a/src/solvers/flattening/bv_pointers.cpp b/src/solvers/flattening/bv_pointers.cpp index aeecd21e2bc..9ecb81c9846 100644 --- a/src/solvers/flattening/bv_pointers.cpp +++ b/src/solvers/flattening/bv_pointers.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "bv_pointers.h" #include #include @@ -15,8 +16,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "bv_pointers.h" - literalt bv_pointerst::convert_rest(const exprt &expr) { if(expr.type().id()!=ID_bool) diff --git a/src/solvers/flattening/bv_utils.cpp b/src/solvers/flattening/bv_utils.cpp index e916b9e41e9..cff775d6597 100644 --- a/src/solvers/flattening/bv_utils.cpp +++ b/src/solvers/flattening/bv_utils.cpp @@ -6,13 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "bv_utils.h" #include #include -#include "bv_utils.h" - bvt bv_utilst::build_constant(const mp_integer &n, std::size_t width) { std::string n_str=integer2binary(n, width); diff --git a/src/solvers/flattening/equality.cpp b/src/solvers/flattening/equality.cpp index 547ef743054..79890ab8979 100644 --- a/src/solvers/flattening/equality.cpp +++ b/src/solvers/flattening/equality.cpp @@ -6,12 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "equality.h" #ifdef DEBUG #include #endif -#include "equality.h" #include "bv_utils.h" literalt equalityt::equality(const exprt &e1, const exprt &e2) diff --git a/src/solvers/flattening/flatten_byte_operators.cpp b/src/solvers/flattening/flatten_byte_operators.cpp index 364565fe0f6..b5837f3206e 100644 --- a/src/solvers/flattening/flatten_byte_operators.cpp +++ b/src/solvers/flattening/flatten_byte_operators.cpp @@ -6,7 +6,6 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ - #include #include #include diff --git a/src/solvers/flattening/functions.cpp b/src/solvers/flattening/functions.cpp index 1f2ed42be9c..181d901fd5e 100644 --- a/src/solvers/flattening/functions.cpp +++ b/src/solvers/flattening/functions.cpp @@ -6,14 +6,13 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "functions.h" #include #include #include -#include "functions.h" - void functionst::record( const function_application_exprt &function_application) { diff --git a/src/solvers/flattening/pointer_logic.cpp b/src/solvers/flattening/pointer_logic.cpp index 5086e62bbf4..3f1ffd47798 100644 --- a/src/solvers/flattening/pointer_logic.cpp +++ b/src/solvers/flattening/pointer_logic.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Pointer Logic +#include "pointer_logic.h" + #include #include @@ -16,8 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "pointer_logic.h" - bool pointer_logict::is_dynamic_object(const exprt &expr) const { if(expr.type().get_bool("#dynamic")) diff --git a/src/solvers/flattening/pointer_logic.h b/src/solvers/flattening/pointer_logic.h index a0dc8b7fb50..07193819358 100644 --- a/src/solvers/flattening/pointer_logic.h +++ b/src/solvers/flattening/pointer_logic.h @@ -18,6 +18,8 @@ Author: Daniel Kroening, kroening@kroening.com #define BV_ADDR_BITS 8 +class namespacet; + class pointer_logict { public: diff --git a/src/solvers/floatbv/float_approximation.cpp b/src/solvers/floatbv/float_approximation.cpp index 799efcbb4a1..6a70b5f5091 100644 --- a/src/solvers/floatbv/float_approximation.cpp +++ b/src/solvers/floatbv/float_approximation.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "float_approximation.h" #include -#include "float_approximation.h" - float_approximationt::~float_approximationt() { } diff --git a/src/solvers/floatbv/float_bv.cpp b/src/solvers/floatbv/float_bv.cpp index 65ba54deb41..b1810b85d0e 100644 --- a/src/solvers/floatbv/float_bv.cpp +++ b/src/solvers/floatbv/float_bv.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "float_bv.h" #include #include @@ -13,8 +14,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "float_bv.h" - exprt float_bvt::convert(const exprt &expr) { if(expr.id()==ID_abs) diff --git a/src/solvers/floatbv/float_utils.cpp b/src/solvers/floatbv/float_utils.cpp index c2752a29e1a..6dd36849af8 100644 --- a/src/solvers/floatbv/float_utils.cpp +++ b/src/solvers/floatbv/float_utils.cpp @@ -6,14 +6,13 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "float_utils.h" #include #include #include -#include "float_utils.h" - void float_utilst::set_rounding_mode(const bvt &src) { bvt round_to_even= diff --git a/src/solvers/miniBDD/example.cpp b/src/solvers/miniBDD/example.cpp index 4918b89a601..3307c7722df 100644 --- a/src/solvers/miniBDD/example.cpp +++ b/src/solvers/miniBDD/example.cpp @@ -11,10 +11,10 @@ Author: Daniel Kroening, kroening@kroening.com /// A minimalistic BDD library, following Bryant's original paper and Andersen's /// lecture notes -#include - #include "miniBDD.h" +#include + int main() { miniBDD::mgr mgr; diff --git a/src/solvers/miniBDD/miniBDD.cpp b/src/solvers/miniBDD/miniBDD.cpp index 7d472212950..d32330a0995 100644 --- a/src/solvers/miniBDD/miniBDD.cpp +++ b/src/solvers/miniBDD/miniBDD.cpp @@ -11,12 +11,12 @@ Author: Daniel Kroening, kroening@kroening.com /// A minimalistic BDD library, following Bryant's original paper and Andersen's /// lecture notes +#include "miniBDD.h" + #include #include -#include "miniBDD.h" - #define forall_nodes(it) for(nodest::const_iterator it=nodes.begin(); \ it!=nodes.end(); it++) diff --git a/src/solvers/prop/aig.cpp b/src/solvers/prop/aig.cpp index a6f3886539c..a164b379db0 100644 --- a/src/solvers/prop/aig.cpp +++ b/src/solvers/prop/aig.cpp @@ -6,13 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "aig.h" #include #include #include -#include "aig.h" - std::string aigt::label(nodest::size_type v) const { return "var("+std::to_string(v)+")"; diff --git a/src/solvers/prop/aig_prop.cpp b/src/solvers/prop/aig_prop.cpp index 759041cc8be..9b8e90427e4 100644 --- a/src/solvers/prop/aig_prop.cpp +++ b/src/solvers/prop/aig_prop.cpp @@ -6,12 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "aig_prop.h" #include #include -#include "aig_prop.h" - // Tries to compact AIGs corresponding to xor and equality // Needed to match the performance of the native CNF back-end. #define USE_AIG_COMPACT diff --git a/src/solvers/prop/bdd_expr.cpp b/src/solvers/prop/bdd_expr.cpp index 9a885c031b7..2a5b4ffa786 100644 --- a/src/solvers/prop/bdd_expr.cpp +++ b/src/solvers/prop/bdd_expr.cpp @@ -9,13 +9,13 @@ Author: Michael Tautschnig, michael.tautschnig@qmul.ac.uk /// \file /// Conversion between exprt and miniBDD +#include "bdd_expr.h" + #include #include #include -#include "bdd_expr.h" - mini_bddt bdd_exprt::from_expr_rec(const exprt &expr) { assert(expr.type().id()==ID_bool); diff --git a/src/solvers/prop/cover_goals.cpp b/src/solvers/prop/cover_goals.cpp index 1783983ccf9..aaf494169ed 100644 --- a/src/solvers/prop/cover_goals.cpp +++ b/src/solvers/prop/cover_goals.cpp @@ -9,10 +9,11 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Cover a set of goals incrementally +#include "cover_goals.h" + #include #include "literal_expr.h" -#include "cover_goals.h" cover_goalst::~cover_goalst() { diff --git a/src/solvers/prop/literal.cpp b/src/solvers/prop/literal.cpp index e00f3bb37be..02e1db3404f 100644 --- a/src/solvers/prop/literal.cpp +++ b/src/solvers/prop/literal.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Literals -#include - #include "literal.h" +#include + std::ostream &operator << (std::ostream &out, literalt l) { if(l.is_constant()) diff --git a/src/solvers/prop/minimize.cpp b/src/solvers/prop/minimize.cpp index 8ae18a1787c..c28ab411bf3 100644 --- a/src/solvers/prop/minimize.cpp +++ b/src/solvers/prop/minimize.cpp @@ -9,10 +9,11 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Minimize some target function incrementally +#include "minimize.h" + #include #include "literal_expr.h" -#include "minimize.h" /// Add an objective void prop_minimizet::objective( diff --git a/src/solvers/prop/prop.cpp b/src/solvers/prop/prop.cpp index 6810ca4fef6..bfa3a005915 100644 --- a/src/solvers/prop/prop.cpp +++ b/src/solvers/prop/prop.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "prop.h" #include -#include "prop.h" - /// asserts a==b in the propositional formula void propt::set_equal(literalt a, literalt b) { diff --git a/src/solvers/prop/prop_conv.cpp b/src/solvers/prop/prop_conv.cpp index 72caa7ec6e2..734d11a6806 100644 --- a/src/solvers/prop/prop_conv.cpp +++ b/src/solvers/prop/prop_conv.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "prop_conv.h" #include #include @@ -16,7 +17,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "prop.h" -#include "prop_conv.h" #include "literal_expr.h" /// determine whether a variable is in the final conflict diff --git a/src/solvers/prop/prop_conv_store.cpp b/src/solvers/prop/prop_conv_store.cpp index 109c2f0cee7..5ac16b8ff25 100644 --- a/src/solvers/prop/prop_conv_store.cpp +++ b/src/solvers/prop/prop_conv_store.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "prop_conv_store.h" #include -#include "prop_conv_store.h" - void prop_conv_storet::set_to(const exprt &expr, bool value) { constraintt &constraint=constraints.add_constraint(); diff --git a/src/solvers/qbf/qbf_bdd_core.cpp b/src/solvers/qbf/qbf_bdd_core.cpp index 03779c3b7d1..d0bef9244c7 100644 --- a/src/solvers/qbf/qbf_bdd_core.cpp +++ b/src/solvers/qbf/qbf_bdd_core.cpp @@ -6,6 +6,7 @@ Author: CM Wintersteiger \*******************************************************************/ +#include #include #include @@ -15,8 +16,6 @@ Author: CM Wintersteiger #include -#include - #include // CUDD Library /*! \cond */ diff --git a/src/solvers/qbf/qbf_quantor.cpp b/src/solvers/qbf/qbf_quantor.cpp index fef41a7e892..ab187e20ada 100644 --- a/src/solvers/qbf/qbf_quantor.cpp +++ b/src/solvers/qbf/qbf_quantor.cpp @@ -6,13 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "qbf_quantor.h" #include #include #include -#include "qbf_quantor.h" - qbf_quantort::qbf_quantort() { } diff --git a/src/solvers/qbf/qbf_qube.cpp b/src/solvers/qbf/qbf_qube.cpp index eb3b73ddbfd..9953fbc922b 100644 --- a/src/solvers/qbf/qbf_qube.cpp +++ b/src/solvers/qbf/qbf_qube.cpp @@ -6,13 +6,12 @@ Author: CM Wintersteiger \*******************************************************************/ +#include "qbf_qube.h" #include #include #include -#include "qbf_qube.h" - qbf_qubet::qbf_qubet() { // skizzo crashes on broken lines diff --git a/src/solvers/qbf/qbf_qube_core.cpp b/src/solvers/qbf/qbf_qube_core.cpp index 1315ef4a591..281771c56ec 100644 --- a/src/solvers/qbf/qbf_qube_core.cpp +++ b/src/solvers/qbf/qbf_qube_core.cpp @@ -6,6 +6,7 @@ Author: CM Wintersteiger \*******************************************************************/ +#include "qbf_qube_core.h" #include #include @@ -13,8 +14,6 @@ Author: CM Wintersteiger #include -#include "qbf_qube_core.h" - qbf_qube_coret::qbf_qube_coret() : qdimacs_coret() { break_lines=false; diff --git a/src/solvers/qbf/qbf_skizzo.cpp b/src/solvers/qbf/qbf_skizzo.cpp index c26132f70bf..55813caf564 100644 --- a/src/solvers/qbf/qbf_skizzo.cpp +++ b/src/solvers/qbf/qbf_skizzo.cpp @@ -6,13 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "qbf_skizzo.h" #include #include #include -#include "qbf_skizzo.h" - qbf_skizzot::qbf_skizzot() { // skizzo crashes on broken lines diff --git a/src/solvers/qbf/qbf_squolem.cpp b/src/solvers/qbf/qbf_squolem.cpp index 6724a3f189e..97ab3ebb5ed 100644 --- a/src/solvers/qbf/qbf_squolem.cpp +++ b/src/solvers/qbf/qbf_squolem.cpp @@ -6,7 +6,6 @@ Author: CM Wintersteiger \*******************************************************************/ - /// \file /// Squolem Backend diff --git a/src/solvers/qbf/qbf_squolem_core.cpp b/src/solvers/qbf/qbf_squolem_core.cpp index f927117b22e..04f5c7ae3c6 100644 --- a/src/solvers/qbf/qbf_squolem_core.cpp +++ b/src/solvers/qbf/qbf_squolem_core.cpp @@ -9,6 +9,8 @@ Author: CM Wintersteiger /// \file /// Squolem Backend (with proofs) +#include "qbf_squolem_core.h" + #include #include @@ -16,8 +18,6 @@ Author: CM Wintersteiger #include // uint type for indices -#include "qbf_squolem_core.h" - qbf_squolem_coret::qbf_squolem_coret() : squolem(NULL) { setup(); diff --git a/src/solvers/qbf/qdimacs_cnf.cpp b/src/solvers/qbf/qdimacs_cnf.cpp index e0333c569cb..11638606d65 100644 --- a/src/solvers/qbf/qdimacs_cnf.cpp +++ b/src/solvers/qbf/qdimacs_cnf.cpp @@ -6,12 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "qdimacs_cnf.h" #include #include -#include "qdimacs_cnf.h" - void qdimacs_cnft::write_qdimacs_cnf(std::ostream &out) { write_problem_line(out); diff --git a/src/solvers/qbf/qdimacs_core.cpp b/src/solvers/qbf/qdimacs_core.cpp index 8deb11be70d..e729d8ece58 100644 --- a/src/solvers/qbf/qdimacs_core.cpp +++ b/src/solvers/qbf/qdimacs_core.cpp @@ -6,12 +6,11 @@ Author: CM Wintersteiger \*******************************************************************/ +#include "qdimacs_core.h" #include #include -#include "qdimacs_core.h" - void qdimacs_coret::simplify_extractbits(exprt &expr) const { if(expr.id()==ID_and) diff --git a/src/solvers/refinement/bv_refinement_loop.cpp b/src/solvers/refinement/bv_refinement_loop.cpp index cf21409ee8b..5492f0e603f 100644 --- a/src/solvers/refinement/bv_refinement_loop.cpp +++ b/src/solvers/refinement/bv_refinement_loop.cpp @@ -6,13 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "bv_refinement.h" #include #include -#include "bv_refinement.h" - bv_refinementt::bv_refinementt( const namespacet &_ns, propt &_prop): bv_pointerst(_ns, _prop), diff --git a/src/solvers/refinement/refine_arithmetic.cpp b/src/solvers/refinement/refine_arithmetic.cpp index 70faf0e600d..f0be4a531bf 100644 --- a/src/solvers/refinement/refine_arithmetic.cpp +++ b/src/solvers/refinement/refine_arithmetic.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "bv_refinement.h" #include #include @@ -16,8 +17,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "bv_refinement.h" - // Parameters #define MAX_INTEGER_UNDERAPPROX 3 #define MAX_FLOAT_UNDERAPPROX 10 diff --git a/src/solvers/refinement/refine_arrays.cpp b/src/solvers/refinement/refine_arrays.cpp index 5caee4b01bc..5aebddf2e18 100644 --- a/src/solvers/refinement/refine_arrays.cpp +++ b/src/solvers/refinement/refine_arrays.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "bv_refinement.h" #ifdef DEBUG #include @@ -15,7 +16,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "bv_refinement.h" #include /// generate array constraints diff --git a/src/solvers/refinement/refined_string_type.cpp b/src/solvers/refinement/refined_string_type.cpp index dd91489e8fd..edd1c43e49a 100644 --- a/src/solvers/refinement/refined_string_type.cpp +++ b/src/solvers/refinement/refined_string_type.cpp @@ -16,10 +16,10 @@ Author: Romain Brenguier, romain.brenguier@diffblue.com /// `content` of type `content_type`. This module also defines functions to /// recognise the C and java string types. -#include - #include "refined_string_type.h" +#include + refined_string_typet::refined_string_typet( const typet &index_type, const typet &char_type) { diff --git a/src/solvers/refinement/string_constraint_generator_constants.cpp b/src/solvers/refinement/string_constraint_generator_constants.cpp index 3c05aaf5440..fe85c70dc46 100644 --- a/src/solvers/refinement/string_constraint_generator_constants.cpp +++ b/src/solvers/refinement/string_constraint_generator_constants.cpp @@ -9,8 +9,9 @@ Author: Romain Brenguier, romain.brenguier@diffblue.com /// \file /// Generates string constraints for constant strings -#include #include + +#include #include #include diff --git a/src/solvers/refinement/string_constraint_generator_main.cpp b/src/solvers/refinement/string_constraint_generator_main.cpp index b0b48df18bd..308846338ef 100644 --- a/src/solvers/refinement/string_constraint_generator_main.cpp +++ b/src/solvers/refinement/string_constraint_generator_main.cpp @@ -17,9 +17,10 @@ Author: Romain Brenguier, romain.brenguier@diffblue.com /// Li and Indradeep Ghosh, which gives examples of constraints for several /// functions. +#include + #include #include -#include #include #include #include diff --git a/src/solvers/refinement/string_constraint_generator_valueof.cpp b/src/solvers/refinement/string_constraint_generator_valueof.cpp index 6fe11ca6c18..66364bcdc2f 100644 --- a/src/solvers/refinement/string_constraint_generator_valueof.cpp +++ b/src/solvers/refinement/string_constraint_generator_valueof.cpp @@ -12,6 +12,7 @@ Author: Romain Brenguier, romain.brenguier@diffblue.com /// types, in particular int, long, float, double, char, bool #include + #include /// add axioms corresponding to the String.valueOf(I) java function diff --git a/src/solvers/refinement/string_refinement.cpp b/src/solvers/refinement/string_refinement.cpp index 36f619b8add..34e3217e27a 100644 --- a/src/solvers/refinement/string_refinement.cpp +++ b/src/solvers/refinement/string_refinement.cpp @@ -17,12 +17,13 @@ Author: Alberto Griggio, alberto.griggio@gmail.com /// Parameterized Array and Interval Automaton" by Guodong Li and Indradeep /// Ghosh. +#include + #include #include #include #include #include -#include #include string_refinementt::string_refinementt( diff --git a/src/solvers/sat/cnf.cpp b/src/solvers/sat/cnf.cpp index 7ff2fc1c520..bed97954bac 100644 --- a/src/solvers/sat/cnf.cpp +++ b/src/solvers/sat/cnf.cpp @@ -9,12 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// CNF Generation, via Tseitin +#include "cnf.h" + #include #include #include #include -#include "cnf.h" // #define VERBOSE /// Tseitin encoding of conjunction of two literals diff --git a/src/solvers/sat/cnf_clause_list.cpp b/src/solvers/sat/cnf_clause_list.cpp index cb68ddad24b..20c0e5168c1 100644 --- a/src/solvers/sat/cnf_clause_list.cpp +++ b/src/solvers/sat/cnf_clause_list.cpp @@ -9,11 +9,11 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// CNF Generation +#include "cnf_clause_list.h" + #include #include -#include "cnf_clause_list.h" - void cnf_clause_listt::lcnf(const bvt &bv) { bvt new_bv; diff --git a/src/solvers/sat/pbs_dimacs_cnf.cpp b/src/solvers/sat/pbs_dimacs_cnf.cpp index d8bfa283398..731c6ac7ae6 100644 --- a/src/solvers/sat/pbs_dimacs_cnf.cpp +++ b/src/solvers/sat/pbs_dimacs_cnf.cpp @@ -6,14 +6,13 @@ Author: Alex Groce \*******************************************************************/ +#include "pbs_dimacs_cnf.h" #include #include #include #include -#include "pbs_dimacs_cnf.h" - void pbs_dimacs_cnft::write_dimacs_pb(std::ostream &out) { double d_sum=0; diff --git a/src/solvers/sat/read_dimacs_cnf.cpp b/src/solvers/sat/read_dimacs_cnf.cpp index 5a12e16b5ef..4228851fcdf 100644 --- a/src/solvers/sat/read_dimacs_cnf.cpp +++ b/src/solvers/sat/read_dimacs_cnf.cpp @@ -9,13 +9,13 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Reading DIMACS CNF +#include "read_dimacs_cnf.h" + #include #include // for abs() #include -#include "read_dimacs_cnf.h" - // #define VERBOSE void read_dimacs_cnf(std::istream &in, cnft &dest) diff --git a/src/solvers/sat/resolution_proof.cpp b/src/solvers/sat/resolution_proof.cpp index 061e9d2cf15..c0102da2ae1 100644 --- a/src/solvers/sat/resolution_proof.cpp +++ b/src/solvers/sat/resolution_proof.cpp @@ -6,12 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "resolution_proof.h" #include #include -#include "resolution_proof.h" - template void resolution_prooft::build_core(std::vector &in_core) { diff --git a/src/solvers/sat/satcheck_booleforce.cpp b/src/solvers/sat/satcheck_booleforce.cpp index 51e8684a2f2..c6374c7012f 100644 --- a/src/solvers/sat/satcheck_booleforce.cpp +++ b/src/solvers/sat/satcheck_booleforce.cpp @@ -6,12 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "satcheck_booleforce.h" #include - -#include "satcheck_booleforce.h" - extern "C" { #include "booleforce.h" diff --git a/src/solvers/sat/satcheck_glucose.cpp b/src/solvers/sat/satcheck_glucose.cpp index cb511843956..3d6e2ae3934 100644 --- a/src/solvers/sat/satcheck_glucose.cpp +++ b/src/solvers/sat/satcheck_glucose.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "satcheck_glucose.h" #ifndef _MSC_VER #include @@ -16,8 +17,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "satcheck_glucose.h" - #include #include diff --git a/src/solvers/sat/satcheck_limmat.cpp b/src/solvers/sat/satcheck_limmat.cpp index 1ff47403ec4..10fd310ff35 100644 --- a/src/solvers/sat/satcheck_limmat.cpp +++ b/src/solvers/sat/satcheck_limmat.cpp @@ -6,12 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "satcheck_limmat.h" #include - -#include "satcheck_limmat.h" - extern "C" { #include "limmat.h" diff --git a/src/solvers/sat/satcheck_lingeling.cpp b/src/solvers/sat/satcheck_lingeling.cpp index 8d74a7706a5..ad0a504d412 100644 --- a/src/solvers/sat/satcheck_lingeling.cpp +++ b/src/solvers/sat/satcheck_lingeling.cpp @@ -6,13 +6,12 @@ Author: Michael Tautschnig, michael.tautschnig@cs.ox.ac.uk \*******************************************************************/ +#include "satcheck_lingeling.h" #include #include -#include "satcheck_lingeling.h" - extern "C" { #include diff --git a/src/solvers/sat/satcheck_minisat.cpp b/src/solvers/sat/satcheck_minisat.cpp index 4e61f2d33da..fb892707b83 100644 --- a/src/solvers/sat/satcheck_minisat.cpp +++ b/src/solvers/sat/satcheck_minisat.cpp @@ -6,14 +6,13 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "satcheck_minisat.h" #include #include #include -#include "satcheck_minisat.h" - #include #include diff --git a/src/solvers/sat/satcheck_minisat2.cpp b/src/solvers/sat/satcheck_minisat2.cpp index 5fa9e44b132..ef6605532c1 100644 --- a/src/solvers/sat/satcheck_minisat2.cpp +++ b/src/solvers/sat/satcheck_minisat2.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "satcheck_minisat2.h" #ifndef _MSC_VER #include @@ -14,11 +15,10 @@ Author: Daniel Kroening, kroening@kroening.com #include #include +#include #include #include -#include "satcheck_minisat2.h" - #include #include diff --git a/src/solvers/sat/satcheck_picosat.cpp b/src/solvers/sat/satcheck_picosat.cpp index 6c69d0ab0b5..de54f70f9c0 100644 --- a/src/solvers/sat/satcheck_picosat.cpp +++ b/src/solvers/sat/satcheck_picosat.cpp @@ -6,13 +6,12 @@ Author: Michael Tautschnig, michael.tautschnig@cs.ox.ac.uk \*******************************************************************/ +#include "satcheck_picosat.h" #include #include -#include "satcheck_picosat.h" - extern "C" { #include diff --git a/src/solvers/sat/satcheck_precosat.cpp b/src/solvers/sat/satcheck_precosat.cpp index ec60b64927c..6e9a2248c94 100644 --- a/src/solvers/sat/satcheck_precosat.cpp +++ b/src/solvers/sat/satcheck_precosat.cpp @@ -6,13 +6,12 @@ Author: Michael Tautschnig, michael.tautschnig@cs.ox.ac.uk \*******************************************************************/ +#include "satcheck_precosat.h" #include #include -#include "satcheck_precosat.h" - #include #ifndef HAVE_PRECOSAT diff --git a/src/solvers/sat/satcheck_smvsat.cpp b/src/solvers/sat/satcheck_smvsat.cpp index 21c9f8b5160..1018a4d96b1 100644 --- a/src/solvers/sat/satcheck_smvsat.cpp +++ b/src/solvers/sat/satcheck_smvsat.cpp @@ -6,13 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "satcheck_smvsat.h" #include #include - -#include "satcheck_smvsat.h" - #include #include diff --git a/src/solvers/sat/satcheck_zchaff.cpp b/src/solvers/sat/satcheck_zchaff.cpp index 548bb04ff8b..9a854286a6e 100644 --- a/src/solvers/sat/satcheck_zchaff.cpp +++ b/src/solvers/sat/satcheck_zchaff.cpp @@ -6,12 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "satcheck_zchaff.h" #include - -#include "satcheck_zchaff.h" - #include satcheck_zchaff_baset::satcheck_zchaff_baset(CSolver *_solver):solver(_solver) diff --git a/src/solvers/sat/satcheck_zcore.cpp b/src/solvers/sat/satcheck_zcore.cpp index 6886ab1b6c5..ac0d60977f0 100644 --- a/src/solvers/sat/satcheck_zcore.cpp +++ b/src/solvers/sat/satcheck_zcore.cpp @@ -6,14 +6,13 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "satcheck_zcore.h" #include #include #include -#include "satcheck_zcore.h" - #include satcheck_zcoret::satcheck_zcoret() diff --git a/src/solvers/smt1/smt1_conv.cpp b/src/solvers/smt1/smt1_conv.cpp index ac2326fbc07..65f55640400 100644 --- a/src/solvers/smt1/smt1_conv.cpp +++ b/src/solvers/smt1/smt1_conv.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// SMT Version 1 Backend +#include "smt1_conv.h" + #include #include @@ -29,8 +31,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "smt1_conv.h" - void smt1_convt::print_assignment(std::ostream &out) const { // Boolean stuff diff --git a/src/solvers/smt1/smt1_dec.cpp b/src/solvers/smt1/smt1_dec.cpp index be1001c2ca2..807fa527339 100644 --- a/src/solvers/smt1/smt1_dec.cpp +++ b/src/solvers/smt1/smt1_dec.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "smt1_dec.h" #include @@ -25,8 +26,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "smt1_dec.h" - std::string smt1_dect::decision_procedure_text() const { return "SMT1 "+logic+" using "+ diff --git a/src/solvers/smt1/smt1_prop.cpp b/src/solvers/smt1/smt1_prop.cpp index 3f3c33dbf50..481d0d289c5 100644 --- a/src/solvers/smt1/smt1_prop.cpp +++ b/src/solvers/smt1/smt1_prop.cpp @@ -8,12 +8,10 @@ Revisions: Roberto Bruttomesso, roberto.bruttomesso@unisi.ch \*******************************************************************/ +#include "smt1_prop.h" #include - -#include "smt1_prop.h" - smt1_propt::smt1_propt( const std::string &benchmark, const std::string &source, diff --git a/src/solvers/smt2/smt2_conv.cpp b/src/solvers/smt2/smt2_conv.cpp index a26dd2445c6..d6198ebea5f 100644 --- a/src/solvers/smt2/smt2_conv.cpp +++ b/src/solvers/smt2/smt2_conv.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// SMT Backend +#include "smt2_conv.h" + #include #include @@ -31,8 +33,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "smt2_conv.h" - // Mark different kinds of error condition // General #define PARSERERROR(S) throw S diff --git a/src/solvers/smt2/smt2_dec.cpp b/src/solvers/smt2/smt2_dec.cpp index 1c3ea406e10..41f17d66fc3 100644 --- a/src/solvers/smt2/smt2_dec.cpp +++ b/src/solvers/smt2/smt2_dec.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "smt2_dec.h" #include @@ -24,7 +25,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "smt2_dec.h" #include "smt2irep.h" std::string smt2_dect::decision_procedure_text() const diff --git a/src/solvers/smt2/smt2_parser.cpp b/src/solvers/smt2/smt2_parser.cpp index cd271a37d5a..c29d54dda2e 100644 --- a/src/solvers/smt2/smt2_parser.cpp +++ b/src/solvers/smt2/smt2_parser.cpp @@ -6,12 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "smt2_parser.h" #include #include -#include "smt2_parser.h" - bool smt2_parsert::is_simple_symbol_character(char ch) { // any non-empty sequence of letters, digits and the characters diff --git a/src/solvers/smt2/smt2_prop.cpp b/src/solvers/smt2/smt2_prop.cpp index 9dac1b64e65..d6810e5d0c0 100644 --- a/src/solvers/smt2/smt2_prop.cpp +++ b/src/solvers/smt2/smt2_prop.cpp @@ -6,12 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "smt2_prop.h" #include - -#include "smt2_prop.h" - smt2_propt::smt2_propt( const std::string &benchmark, const std::string &source, diff --git a/src/solvers/smt2/smt2irep.cpp b/src/solvers/smt2/smt2irep.cpp index 4154ea291e2..a549d558670 100644 --- a/src/solvers/smt2/smt2irep.cpp +++ b/src/solvers/smt2/smt2irep.cpp @@ -6,11 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "smt2irep.h" #include #include -#include "smt2irep.h" #include "smt2_parser.h" class smt2irept:public smt2_parsert diff --git a/src/symex/path_search.cpp b/src/symex/path_search.cpp index d90ffcbd49e..6b03b163fa5 100644 --- a/src/symex/path_search.cpp +++ b/src/symex/path_search.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Path-based Symbolic Execution +#include "path_search.h" + #include #include @@ -18,8 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "path_search.h" - path_searcht::resultt path_searcht::operator()( const goto_functionst &goto_functions) { diff --git a/src/symex/symex_cover.cpp b/src/symex/symex_cover.cpp index 50c6a549885..e7f101c0870 100644 --- a/src/symex/symex_cover.cpp +++ b/src/symex/symex_cover.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symex Test Suite Generation +#include "symex_parse_options.h" + #include #include @@ -17,8 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "symex_parse_options.h" - std::string symex_parse_optionst::get_test(const goto_tracet &goto_trace) { bool first=true; diff --git a/src/symex/symex_main.cpp b/src/symex/symex_main.cpp index 2407aad561c..36080f4a69a 100644 --- a/src/symex/symex_main.cpp +++ b/src/symex/symex_main.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symex Main Module -#include - #include "symex_parse_options.h" +#include + #ifdef _MSC_VER int wmain(int argc, const wchar_t **argv_wide) { diff --git a/src/symex/symex_parse_options.cpp b/src/symex/symex_parse_options.cpp index 9b77014a2df..5fc475ee154 100644 --- a/src/symex/symex_parse_options.cpp +++ b/src/symex/symex_parse_options.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symex Command Line Options Processing +#include "symex_parse_options.h" + #include #include #include @@ -52,7 +54,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include "path_search.h" -#include "symex_parse_options.h" symex_parse_optionst::symex_parse_optionst(int argc, const char **argv): parse_options_baset(SYMEX_OPTIONS, argc, argv), diff --git a/src/util/arith_tools.cpp b/src/util/arith_tools.cpp index cd657753604..5b94a141dfa 100644 --- a/src/util/arith_tools.cpp +++ b/src/util/arith_tools.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "arith_tools.h" #include @@ -14,8 +15,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "std_types.h" #include "std_expr.h" -#include "arith_tools.h" - bool to_integer(const exprt &expr, mp_integer &int_value) { if(!expr.is_constant()) diff --git a/src/util/array_name.cpp b/src/util/array_name.cpp index cd0c22dac61..a4bfa42c8df 100644 --- a/src/util/array_name.cpp +++ b/src/util/array_name.cpp @@ -10,6 +10,7 @@ Author: Daniel Kroening, kroening@kroening.com /// Misc Utilities #include "array_name.h" + #include "expr.h" #include "namespace.h" #include "symbol.h" diff --git a/src/util/base_type.cpp b/src/util/base_type.cpp index 148f7b42157..f8c29a95e0e 100644 --- a/src/util/base_type.cpp +++ b/src/util/base_type.cpp @@ -9,11 +9,12 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Base Type Computation +#include "base_type.h" + #include #include #include "std_types.h" -#include "base_type.h" #include "namespace.h" #include "symbol.h" diff --git a/src/util/bv_arithmetic.cpp b/src/util/bv_arithmetic.cpp index 0507523930c..4287e04adf1 100644 --- a/src/util/bv_arithmetic.cpp +++ b/src/util/bv_arithmetic.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "bv_arithmetic.h" #include #include @@ -14,7 +15,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "arith_tools.h" #include "std_types.h" #include "std_expr.h" -#include "bv_arithmetic.h" typet bv_spect::to_type() const { diff --git a/src/util/byte_operators.cpp b/src/util/byte_operators.cpp index f1d58c52892..9ebc340d9cb 100644 --- a/src/util/byte_operators.cpp +++ b/src/util/byte_operators.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "byte_operators.h" #include -#include "byte_operators.h" #include "config.h" irep_idt byte_extract_id() diff --git a/src/util/cmdline.cpp b/src/util/cmdline.cpp index 10ca6ac97c8..5010a48e8d3 100644 --- a/src/util/cmdline.cpp +++ b/src/util/cmdline.cpp @@ -6,13 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "cmdline.h" #include #include #include -#include "cmdline.h" - cmdlinet::cmdlinet() { } diff --git a/src/util/config.cpp b/src/util/config.cpp index 2422092f4c0..ee24ab7b0f7 100644 --- a/src/util/config.cpp +++ b/src/util/config.cpp @@ -6,11 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "config.h" #include #include "namespace.h" -#include "config.h" #include "symbol_table.h" #include "arith_tools.h" #include "cmdline.h" diff --git a/src/util/cout_message.cpp b/src/util/cout_message.cpp index 357453bd20e..5221fda0f21 100644 --- a/src/util/cout_message.cpp +++ b/src/util/cout_message.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "cout_message.h" #include @@ -17,7 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #endif #include "unicode.h" -#include "cout_message.h" cout_message_handlert::cout_message_handlert(): stream_message_handlert(std::cout) diff --git a/src/util/decision_procedure.cpp b/src/util/decision_procedure.cpp index bfee87da74e..85f52acdba2 100644 --- a/src/util/decision_procedure.cpp +++ b/src/util/decision_procedure.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Decision Procedure Interface -#include - #include "decision_procedure.h" +#include + bool decision_proceduret::in_core(const exprt &expr) { assert(false); diff --git a/src/util/endianness_map.cpp b/src/util/endianness_map.cpp index 6b636ca658f..913bc8ad5df 100644 --- a/src/util/endianness_map.cpp +++ b/src/util/endianness_map.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "endianness_map.h" #include #include @@ -13,7 +14,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "std_types.h" #include "pointer_offset_size.h" #include "arith_tools.h" -#include "endianness_map.h" #include "namespace.h" void endianness_mapt::output(std::ostream &out) const diff --git a/src/util/expr.cpp b/src/util/expr.cpp index cc022538949..ee7f310d471 100644 --- a/src/util/expr.cpp +++ b/src/util/expr.cpp @@ -9,6 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Expression Representation +#include "expr.h" + +#include + #include #include "string2int.h" @@ -16,7 +20,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "fixedbv.h" #include "ieee_float.h" #include "invariant.h" -#include "expr.h" #include "rational.h" #include "rational_tools.h" #include "arith_tools.h" diff --git a/src/util/expr_util.cpp b/src/util/expr_util.cpp index 7370b165eab..001e58ee19c 100644 --- a/src/util/expr_util.cpp +++ b/src/util/expr_util.cpp @@ -8,6 +8,7 @@ Author: Daniel Kroening, kroening@kroening.com #include "expr_util.h" + #include "expr.h" #include "fixedbv.h" #include "ieee_float.h" diff --git a/src/util/file_util.cpp b/src/util/file_util.cpp index 701a1ea93c3..3753fa5aab8 100644 --- a/src/util/file_util.cpp +++ b/src/util/file_util.cpp @@ -11,6 +11,8 @@ Date: January 2012 /// \file /// File Utilities +#include "file_util.h" + #include #if defined(__linux__) || \ @@ -38,8 +40,6 @@ Date: January 2012 #include #endif -#include "file_util.h" - /// \return current working directory std::string get_current_working_directory() { diff --git a/src/util/find_macros.cpp b/src/util/find_macros.cpp index f6b2b748adb..10adacba6c9 100644 --- a/src/util/find_macros.cpp +++ b/src/util/find_macros.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "find_macros.h" #include -#include "find_macros.h" #include "expr.h" #include "namespace.h" #include "symbol.h" diff --git a/src/util/find_symbols.cpp b/src/util/find_symbols.cpp index e58d64855fe..9984ae584c2 100644 --- a/src/util/find_symbols.cpp +++ b/src/util/find_symbols.cpp @@ -6,12 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "find_symbols.h" #include "std_types.h" #include "std_expr.h" -#include "find_symbols.h" - enum class kindt { F_TYPE, F_TYPE_NON_PTR, F_EXPR, F_BOTH }; void find_symbols( diff --git a/src/util/fixedbv.cpp b/src/util/fixedbv.cpp index 3f62619e741..4ea2a166129 100644 --- a/src/util/fixedbv.cpp +++ b/src/util/fixedbv.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "fixedbv.h" #include "std_types.h" #include "std_expr.h" -#include "fixedbv.h" #include "arith_tools.h" fixedbv_spect::fixedbv_spect(const fixedbv_typet &type) diff --git a/src/util/format_constant.cpp b/src/util/format_constant.cpp index f5419f4dcd0..85778504e47 100644 --- a/src/util/format_constant.cpp +++ b/src/util/format_constant.cpp @@ -8,6 +8,7 @@ Author: Daniel Kroening, kroening@kroening.com #include "format_constant.h" + #include "arith_tools.h" #include "fixedbv.h" #include "ieee_float.h" diff --git a/src/util/get_module.cpp b/src/util/get_module.cpp index 655c64c6653..3af2c46b49c 100644 --- a/src/util/get_module.cpp +++ b/src/util/get_module.cpp @@ -9,10 +9,11 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Find module symbol using name +#include "get_module.h" + #include #include -#include "get_module.h" #include "message.h" #include "symbol_table.h" diff --git a/src/util/guard.cpp b/src/util/guard.cpp index 6bad260f84f..693b48602c9 100644 --- a/src/util/guard.cpp +++ b/src/util/guard.cpp @@ -9,11 +9,12 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Symbolic Execution +#include "guard.h" + #include #include "std_expr.h" #include "simplify_utils.h" -#include "guard.h" void guardt::guard_expr(exprt &dest) const { diff --git a/src/util/identifier.cpp b/src/util/identifier.cpp index 289eb4ecb22..daa41cad07d 100644 --- a/src/util/identifier.cpp +++ b/src/util/identifier.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "identifier.h" #include -#include "identifier.h" - std::string identifiert::as_string() const { std::string result; diff --git a/src/util/ieee_float.cpp b/src/util/ieee_float.cpp index b2afe32197e..154ba29c558 100644 --- a/src/util/ieee_float.cpp +++ b/src/util/ieee_float.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "ieee_float.h" // is yet to come #include @@ -18,7 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "arith_tools.h" #include "std_types.h" #include "std_expr.h" -#include "ieee_float.h" mp_integer ieee_float_spect::bias() const { diff --git a/src/util/irep.cpp b/src/util/irep.cpp index 1bedec03f1a..96c92b6174d 100644 --- a/src/util/irep.cpp +++ b/src/util/irep.cpp @@ -9,12 +9,12 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Internal Representation +#include "irep.h" + #include #include "invariant.h" - #include "string2int.h" -#include "irep.h" #include "string_hash.h" #include "irep_hash.h" diff --git a/src/util/irep_hash_container.cpp b/src/util/irep_hash_container.cpp index 82f6b812484..c72d2315928 100644 --- a/src/util/irep_hash_container.cpp +++ b/src/util/irep_hash_container.cpp @@ -10,6 +10,7 @@ Author: Daniel Kroening, kroening@kroening.com /// Hashing IREPs #include "irep_hash_container.h" + #include "irep.h" #include "irep_hash.h" diff --git a/src/util/irep_ids.cpp b/src/util/irep_ids.cpp index 15ff849a058..8aff81777ae 100644 --- a/src/util/irep_ids.cpp +++ b/src/util/irep_ids.cpp @@ -9,9 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Internal Representation +#include "irep_ids.h" + #include -#include "irep_ids.h" #include "string_container.h" const char *irep_ids_table[]= diff --git a/src/util/irep_serialization.cpp b/src/util/irep_serialization.cpp index c21d14916bf..5226b2353d9 100644 --- a/src/util/irep_serialization.cpp +++ b/src/util/irep_serialization.cpp @@ -11,10 +11,11 @@ Date: May 2007 /// \file /// binary irep conversions with hashing +#include "irep_serialization.h" + #include #include -#include "irep_serialization.h" #include "string_hash.h" void irep_serializationt::write_irep( diff --git a/src/util/json.cpp b/src/util/json.cpp index dcfa9858601..79352da4f7e 100644 --- a/src/util/json.cpp +++ b/src/util/json.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "json.h" #include -#include "json.h" - const jsont jsont::null_json_object(jsont::kindt::J_NULL); void jsont::escape_string(const std::string &src, std::ostream &out) diff --git a/src/util/json_expr.cpp b/src/util/json_expr.cpp index 511e37ef681..43f12ee82b9 100644 --- a/src/util/json_expr.cpp +++ b/src/util/json_expr.cpp @@ -9,6 +9,8 @@ Author: Peter Schrammel /// \file /// Expressions in JSON +#include "json_expr.h" + #include "namespace.h" #include "expr.h" #include "json.h" @@ -18,8 +20,6 @@ Author: Peter Schrammel #include "std_expr.h" #include "config.h" -#include "json_expr.h" - json_objectt json(const source_locationt &location) { json_objectt result; diff --git a/src/util/json_irep.cpp b/src/util/json_irep.cpp index ca9db862842..c091b227335 100644 --- a/src/util/json_irep.cpp +++ b/src/util/json_irep.cpp @@ -9,9 +9,10 @@ Author: Thomas Kiley, thomas.kiley@diffblue.com /// \file /// Util +#include "json_irep.h" + #include "irep.h" #include "json.h" -#include "json_irep.h" #include diff --git a/src/util/language.cpp b/src/util/language.cpp index 2abe1b91781..2afbbcb17e5 100644 --- a/src/util/language.cpp +++ b/src/util/language.cpp @@ -10,6 +10,7 @@ Author: Daniel Kroening, kroening@kroening.com /// Abstract interface to support a programming language #include "language.h" + #include "expr.h" bool languaget::final(symbol_tablet &symbol_table) diff --git a/src/util/language_file.cpp b/src/util/language_file.cpp index 1fff96d2151..2aa57a85c6a 100644 --- a/src/util/language_file.cpp +++ b/src/util/language_file.cpp @@ -6,11 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "language_file.h" #include #include "language.h" -#include "language_file.h" language_filet::language_filet(const language_filet &rhs): modules(rhs.modules), diff --git a/src/util/lispexpr.cpp b/src/util/lispexpr.cpp index 156d718f5bc..80f62d15c3f 100644 --- a/src/util/lispexpr.cpp +++ b/src/util/lispexpr.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "lispexpr.h" #include -#include "lispexpr.h" - std::string lispexprt::expr2string() const { std::string result; diff --git a/src/util/lispirep.cpp b/src/util/lispirep.cpp index 6ad94df06a7..22e3e0b99a9 100644 --- a/src/util/lispirep.cpp +++ b/src/util/lispirep.cpp @@ -8,6 +8,7 @@ Author: Daniel Kroening, kroening@kroening.com #include "lispirep.h" + #include "irep.h" #include "lispexpr.h" diff --git a/src/util/memory_info.cpp b/src/util/memory_info.cpp index 59cc9874795..3840ba4fc5b 100644 --- a/src/util/memory_info.cpp +++ b/src/util/memory_info.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "memory_info.h" #ifdef __APPLE__ #include @@ -24,8 +25,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "memory_info.h" - void memory_info(std::ostream &out) { #if defined(__linux__) && defined(__GLIBC__) diff --git a/src/util/merge_irep.cpp b/src/util/merge_irep.cpp index fafc834eab0..02e04b461e5 100644 --- a/src/util/merge_irep.cpp +++ b/src/util/merge_irep.cpp @@ -6,9 +6,9 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "merge_irep.h" #include "irep_hash.h" -#include "merge_irep.h" std::size_t to_be_merged_irept::hash() const { diff --git a/src/util/mp_arith.cpp b/src/util/mp_arith.cpp index 980284ffcd8..035541749e1 100644 --- a/src/util/mp_arith.cpp +++ b/src/util/mp_arith.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "mp_arith.h" #include #include @@ -15,7 +16,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "mp_arith.h" #include "arith_tools.h" mp_integer operator>>(const mp_integer &a, const mp_integer &b) diff --git a/src/util/namespace.cpp b/src/util/namespace.cpp index 4aeff9046e1..50de95f2961 100644 --- a/src/util/namespace.cpp +++ b/src/util/namespace.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Namespace +#include "namespace.h" + #include #include @@ -17,7 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "symbol_table.h" #include "prefix.h" #include "std_types.h" -#include "namespace.h" unsigned get_max( const std::string &prefix, diff --git a/src/util/options.cpp b/src/util/options.cpp index 85b59d64fad..bd952760a4c 100644 --- a/src/util/options.cpp +++ b/src/util/options.cpp @@ -9,9 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Options -#include "string2int.h" #include "options.h" +#include "string2int.h" + void optionst::set_option(const std::string &option, const std::string &value) { diff --git a/src/util/parse_options.cpp b/src/util/parse_options.cpp index 2e4d91e75e9..db809a387a3 100644 --- a/src/util/parse_options.cpp +++ b/src/util/parse_options.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "parse_options.h" #include @@ -17,7 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #endif #include "cmdline.h" -#include "parse_options.h" #include "signal_catcher.h" parse_options_baset::parse_options_baset( diff --git a/src/util/pipe_stream.cpp b/src/util/pipe_stream.cpp index 9a9c6297018..4306bce8e00 100644 --- a/src/util/pipe_stream.cpp +++ b/src/util/pipe_stream.cpp @@ -9,12 +9,13 @@ Module: A stdin/stdout pipe as STL stream /// \file /// A stdin/stdout pipe as STL stream +#include "pipe_stream.h" + #include #include #include #include "unicode.h" -#include "pipe_stream.h" #ifdef _WIN32 #include diff --git a/src/util/pipe_stream.h b/src/util/pipe_stream.h index e03169ffd1a..385cb65f790 100644 --- a/src/util/pipe_stream.h +++ b/src/util/pipe_stream.h @@ -12,7 +12,7 @@ Module: A stdin/stdout pipe as STL stream #ifndef CPROVER_UTIL_PIPE_STREAM_H #define CPROVER_UTIL_PIPE_STREAM_H -#include +#include #include #include diff --git a/src/util/pointer_offset_size.cpp b/src/util/pointer_offset_size.cpp index 28915b5af04..dee9aeff82d 100644 --- a/src/util/pointer_offset_size.cpp +++ b/src/util/pointer_offset_size.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Pointer Logic +#include "pointer_offset_size.h" + #include #include "c_types.h" @@ -23,8 +25,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "symbol.h" #include "ssa_expr.h" -#include "pointer_offset_size.h" - member_offset_iterator::member_offset_iterator( const struct_typet &_type, const namespacet &_ns): diff --git a/src/util/pointer_predicates.cpp b/src/util/pointer_predicates.cpp index 9d2791a9231..e0ef139be4a 100644 --- a/src/util/pointer_predicates.cpp +++ b/src/util/pointer_predicates.cpp @@ -9,6 +9,8 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Various predicates over pointers in programs +#include "pointer_predicates.h" + #include "c_types.h" #include "cprover_prefix.h" #include "namespace.h" @@ -19,8 +21,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "config.h" #include "symbol.h" -#include "pointer_predicates.h" - exprt pointer_object(const exprt &p) { return unary_exprt(ID_pointer_object, p, size_type()); diff --git a/src/util/rational.cpp b/src/util/rational.cpp index f43b5915a28..521e7683c1e 100644 --- a/src/util/rational.cpp +++ b/src/util/rational.cpp @@ -9,11 +9,11 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Rational Numbers +#include "rational.h" + #include #include -#include "rational.h" - rationalt &rationalt::operator+=(const rationalt &n) { rationalt tmp(n); diff --git a/src/util/rational_tools.cpp b/src/util/rational_tools.cpp index 140241a9179..cd03b1bd9c3 100644 --- a/src/util/rational_tools.cpp +++ b/src/util/rational_tools.cpp @@ -9,11 +9,11 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Rational Numbers +#include "rational_tools.h" + #include "rational.h" #include "std_types.h" -#include "rational_tools.h" - static mp_integer power10(size_t i) { mp_integer result=1; diff --git a/src/util/rename.cpp b/src/util/rename.cpp index da127c4f3f4..52977ab8c6a 100644 --- a/src/util/rename.cpp +++ b/src/util/rename.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "rename.h" #include -#include "rename.h" #include "symbol.h" #include "expr.h" #include "namespace.h" diff --git a/src/util/rename_symbol.cpp b/src/util/rename_symbol.cpp index 727f83b0ed3..59b257b09a0 100644 --- a/src/util/rename_symbol.cpp +++ b/src/util/rename_symbol.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "rename_symbol.h" #include "std_types.h" #include "std_expr.h" -#include "rename_symbol.h" rename_symbolt::rename_symbolt() { diff --git a/src/util/replace_symbol.cpp b/src/util/replace_symbol.cpp index 51d4a140493..2f5fce05ee5 100644 --- a/src/util/replace_symbol.cpp +++ b/src/util/replace_symbol.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "replace_symbol.h" #include "std_types.h" #include "std_expr.h" -#include "replace_symbol.h" replace_symbolt::replace_symbolt() { diff --git a/src/util/run.cpp b/src/util/run.cpp index d29082ea0b0..164cac834d3 100644 --- a/src/util/run.cpp +++ b/src/util/run.cpp @@ -8,6 +8,7 @@ Date: August 2012 \*******************************************************************/ +#include "run.h" #include @@ -32,8 +33,6 @@ Date: August 2012 #include #include -#include "run.h" - int run_shell(const std::string &command) { std::string shell="/bin/sh"; diff --git a/src/util/signal_catcher.cpp b/src/util/signal_catcher.cpp index 9c67c23f301..168eaa3d5a6 100644 --- a/src/util/signal_catcher.cpp +++ b/src/util/signal_catcher.cpp @@ -8,6 +8,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "signal_catcher.h" #if defined(_WIN32) #include @@ -18,8 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "signal_catcher.h" - // Here we have an instance of an ugly global object. // It keeps track of any child processes that we'll kill // when we are told to terminate. diff --git a/src/util/simplify_expr.cpp b/src/util/simplify_expr.cpp index 28b9ab87c25..6bb5b776f4f 100644 --- a/src/util/simplify_expr.cpp +++ b/src/util/simplify_expr.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "simplify_expr.h" #include #include @@ -13,7 +14,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "c_types.h" #include "rational.h" #include "simplify_expr_class.h" -#include "simplify_expr.h" #include "mp_arith.h" #include "arith_tools.h" #include "replace_expr.h" diff --git a/src/util/simplify_expr_array.cpp b/src/util/simplify_expr_array.cpp index c12d810939b..26a61f65be8 100644 --- a/src/util/simplify_expr_array.cpp +++ b/src/util/simplify_expr_array.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "simplify_expr_class.h" #include -#include "simplify_expr_class.h" #include "expr.h" #include "namespace.h" #include "std_expr.h" diff --git a/src/util/simplify_expr_boolean.cpp b/src/util/simplify_expr_boolean.cpp index f50c9b61b19..238dfd384c9 100644 --- a/src/util/simplify_expr_boolean.cpp +++ b/src/util/simplify_expr_boolean.cpp @@ -6,11 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "simplify_expr_class.h" #include #include -#include "simplify_expr_class.h" #include "expr.h" #include "namespace.h" #include "std_expr.h" diff --git a/src/util/simplify_expr_floatbv.cpp b/src/util/simplify_expr_floatbv.cpp index f8da4276bbe..cff452cfcbd 100644 --- a/src/util/simplify_expr_floatbv.cpp +++ b/src/util/simplify_expr_floatbv.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "simplify_expr_class.h" #include -#include "simplify_expr_class.h" #include "expr.h" #include "namespace.h" #include "ieee_float.h" diff --git a/src/util/simplify_expr_int.cpp b/src/util/simplify_expr_int.cpp index b41de055d69..d103ea79bb7 100644 --- a/src/util/simplify_expr_int.cpp +++ b/src/util/simplify_expr_int.cpp @@ -6,12 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "simplify_expr_class.h" #include #include "base_type.h" #include "rational.h" -#include "simplify_expr_class.h" #include "expr.h" #include "namespace.h" #include "config.h" diff --git a/src/util/simplify_expr_pointer.cpp b/src/util/simplify_expr_pointer.cpp index d4b9736c431..1044d43dac4 100644 --- a/src/util/simplify_expr_pointer.cpp +++ b/src/util/simplify_expr_pointer.cpp @@ -6,11 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "simplify_expr_class.h" #include #include "c_types.h" -#include "simplify_expr_class.h" #include "expr.h" #include "namespace.h" #include "std_expr.h" diff --git a/src/util/simplify_expr_struct.cpp b/src/util/simplify_expr_struct.cpp index 148b45fc677..a6ac35ca008 100644 --- a/src/util/simplify_expr_struct.cpp +++ b/src/util/simplify_expr_struct.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "simplify_expr_class.h" #include -#include "simplify_expr_class.h" #include "expr.h" #include "namespace.h" #include "std_expr.h" diff --git a/src/util/simplify_utils.cpp b/src/util/simplify_utils.cpp index 482d6ba4fee..53b2f38f7e1 100644 --- a/src/util/simplify_utils.cpp +++ b/src/util/simplify_utils.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "simplify_utils.h" #include -#include "simplify_utils.h" - /// sort operands of an expression according to ordering defined by operator< /// \par parameters: operand list /// \return modifies operand list returns true iff nothing was changed diff --git a/src/util/source_location.cpp b/src/util/source_location.cpp index 6ec49d530f3..7fc392620b7 100644 --- a/src/util/source_location.cpp +++ b/src/util/source_location.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "source_location.h" #include -#include "source_location.h" #include "file_util.h" /// \par parameters: print_cwd, print the absolute path to the file diff --git a/src/util/ssa_expr.cpp b/src/util/ssa_expr.cpp index feb37fe84ca..f5f1dec9f12 100644 --- a/src/util/ssa_expr.cpp +++ b/src/util/ssa_expr.cpp @@ -6,14 +6,13 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "ssa_expr.h" #include #include #include -#include "ssa_expr.h" - static void build_ssa_identifier_rec( const exprt &expr, const irep_idt &l0, diff --git a/src/util/std_code.cpp b/src/util/std_code.cpp index 021f244ac40..b57f1d1b44d 100644 --- a/src/util/std_code.cpp +++ b/src/util/std_code.cpp @@ -8,6 +8,7 @@ Author: Daniel Kroening, kroening@kroening.com #include "std_code.h" + #include "std_expr.h" const irep_idt &code_declt::get_identifier() const diff --git a/src/util/std_expr.cpp b/src/util/std_expr.cpp index 14b4072cd23..6fc3de230d2 100644 --- a/src/util/std_expr.cpp +++ b/src/util/std_expr.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "std_expr.h" #include @@ -17,7 +18,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "pointer_offset_size.h" #include "std_types.h" -#include "std_expr.h" bool constant_exprt::value_is_zero_string() const { diff --git a/src/util/std_types.cpp b/src/util/std_types.cpp index b06af1ecf77..b2d0c4f36d5 100644 --- a/src/util/std_types.cpp +++ b/src/util/std_types.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "std_types.h" #include "string2int.h" #include "arith_tools.h" -#include "std_types.h" #include "std_expr.h" std::size_t fixedbv_typet::get_integer_bits() const diff --git a/src/util/string2int.cpp b/src/util/string2int.cpp index 4febe054b5a..bb8bdf484d1 100644 --- a/src/util/string2int.cpp +++ b/src/util/string2int.cpp @@ -6,14 +6,13 @@ Author: Michael Tautschnig, michael.tautschnig@cs.ox.ac.uk \*******************************************************************/ +#include "string2int.h" #include #include #include #include -#include "string2int.h" - template inline T str2number(const char *str, int base, bool safe) { diff --git a/src/util/string_container.cpp b/src/util/string_container.cpp index 189d721b8ed..8793666506a 100644 --- a/src/util/string_container.cpp +++ b/src/util/string_container.cpp @@ -9,10 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Container for C-Strings -#include - #include "string_container.h" +#include + string_containert string_container; string_ptrt::string_ptrt(const char *_s):s(_s), len(strlen(_s)) diff --git a/src/util/string_utils.cpp b/src/util/string_utils.cpp index 1bf5af4f68a..101b6cd520c 100644 --- a/src/util/string_utils.cpp +++ b/src/util/string_utils.cpp @@ -6,13 +6,12 @@ Author: Daniel Poetzl \*******************************************************************/ +#include "string_utils.h" #include #include #include -#include "string_utils.h" - std::string strip_string(const std::string &s) { auto pred=[](char c){ return std::isspace(c); }; diff --git a/src/util/substitute.cpp b/src/util/substitute.cpp index fc0eb2bea16..39010d79676 100644 --- a/src/util/substitute.cpp +++ b/src/util/substitute.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "substitute.h" #include -#include "substitute.h" - void substitute( std::string &dest, const std::string &what, diff --git a/src/util/symbol.cpp b/src/util/symbol.cpp index 1a7bc849949..652fe422c56 100644 --- a/src/util/symbol.cpp +++ b/src/util/symbol.cpp @@ -6,10 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "symbol.h" #include -#include "symbol.h" #include "source_location.h" #include "std_expr.h" diff --git a/src/util/symbol_table.cpp b/src/util/symbol_table.cpp index 2dd167600cf..3ee5211e99b 100644 --- a/src/util/symbol_table.cpp +++ b/src/util/symbol_table.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "symbol_table.h" #include -#include "symbol_table.h" - /// Add a new symbol to the symbol table /// \param symbol: The symbol to be added to the symbol table /// \return Returns a boolean indicating whether the process failed, which diff --git a/src/util/tempdir.cpp b/src/util/tempdir.cpp index 317112b0c00..9133c6232d2 100644 --- a/src/util/tempdir.cpp +++ b/src/util/tempdir.cpp @@ -6,6 +6,7 @@ Author: CM Wintersteiger \*******************************************************************/ +#include "tempdir.h" #ifdef _WIN32 #include @@ -26,7 +27,6 @@ Author: CM Wintersteiger #include #endif -#include "tempdir.h" #include "file_util.h" std::string get_temporary_directory(const std::string &name_template) diff --git a/src/util/tempfile.cpp b/src/util/tempfile.cpp index edf643059f9..bbb6c526db1 100644 --- a/src/util/tempfile.cpp +++ b/src/util/tempfile.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening \*******************************************************************/ +#include "tempfile.h" #ifdef _WIN32 #include @@ -33,8 +34,6 @@ Author: Daniel Kroening #include #endif -#include "tempfile.h" - /// Substitute for mkstemps (OpenBSD standard) for Windows, where it is /// unavailable. #ifdef _WIN32 diff --git a/src/util/threeval.cpp b/src/util/threeval.cpp index b959d5c9ac2..04311325043 100644 --- a/src/util/threeval.cpp +++ b/src/util/threeval.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "threeval.h" #include -#include "threeval.h" - const char *tvt::to_string() const { switch(value) diff --git a/src/util/time_stopping.cpp b/src/util/time_stopping.cpp index f41b3401fd6..b81848c323d 100644 --- a/src/util/time_stopping.cpp +++ b/src/util/time_stopping.cpp @@ -11,6 +11,8 @@ Date: February 2004 /// \file /// Time Stopping +#include "time_stopping.h" + #include #if defined(_WIN32) && !defined(__MINGW32__) @@ -20,8 +22,6 @@ Date: February 2004 #include #endif -#include "time_stopping.h" - #if defined(_WIN32) && !defined(__MINGW32__) // NOLINTNEXTLINE(readability/identifiers) struct timezone diff --git a/src/util/timer.cpp b/src/util/timer.cpp index 63b561174cc..095947a65d3 100644 --- a/src/util/timer.cpp +++ b/src/util/timer.cpp @@ -11,11 +11,11 @@ Module: Time Stopping /// \file /// Time Stopping +#include "timer.h" + #include #include -#include "timer.h" - timert::~timert() { } diff --git a/src/util/type_eq.cpp b/src/util/type_eq.cpp index 0166c347789..0f78c20880f 100644 --- a/src/util/type_eq.cpp +++ b/src/util/type_eq.cpp @@ -9,9 +9,10 @@ Author: Daniel Kroening, kroening@kroening.com /// \file /// Type Checking +#include "type_eq.h" + #include -#include "type_eq.h" #include "type.h" #include "symbol.h" #include "namespace.h" diff --git a/src/util/ui_message.cpp b/src/util/ui_message.cpp index e750c60e3bb..b680184e5ac 100644 --- a/src/util/ui_message.cpp +++ b/src/util/ui_message.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "ui_message.h" #include #include @@ -14,7 +15,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "json.h" #include "xml_expr.h" #include "cout_message.h" -#include "ui_message.h" #include "cmdline.h" ui_message_handlert::ui_message_handlert( diff --git a/src/util/unicode.cpp b/src/util/unicode.cpp index bf8ce51531d..60c6e06ff97 100644 --- a/src/util/unicode.cpp +++ b/src/util/unicode.cpp @@ -6,6 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "unicode.h" #include #include @@ -13,8 +14,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#include "unicode.h" - #ifdef _WIN32 #include #endif diff --git a/src/util/union_find.cpp b/src/util/union_find.cpp index 6e320191866..e7b3230f305 100644 --- a/src/util/union_find.cpp +++ b/src/util/union_find.cpp @@ -6,11 +6,10 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "union_find.h" #include -#include "union_find.h" - void unsigned_union_find::make_union(size_type j, size_type k) { check_index(j); diff --git a/src/util/xml.cpp b/src/util/xml.cpp index 64f731545e6..991617cca73 100644 --- a/src/util/xml.cpp +++ b/src/util/xml.cpp @@ -6,11 +6,11 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "xml.h" #include #include "string2int.h" -#include "xml.h" void xmlt::clear() { diff --git a/src/util/xml_expr.cpp b/src/util/xml_expr.cpp index c027025af82..c3551617b68 100644 --- a/src/util/xml_expr.cpp +++ b/src/util/xml_expr.cpp @@ -11,6 +11,8 @@ Author: Daniel Kroening /// \file /// Expressions in XML +#include "xml_expr.h" + #include "namespace.h" #include "expr.h" #include "xml.h" @@ -20,8 +22,6 @@ Author: Daniel Kroening #include "std_expr.h" #include "config.h" -#include "xml_expr.h" - xmlt xml(const source_locationt &location) { xmlt result; diff --git a/src/util/xml_irep.cpp b/src/util/xml_irep.cpp index 7fa3d955f27..33d09f42c94 100644 --- a/src/util/xml_irep.cpp +++ b/src/util/xml_irep.cpp @@ -8,11 +8,11 @@ Author: Daniel Kroening \*******************************************************************/ +#include "xml_irep.h" #include #include -#include "xml_irep.h" #include "irep.h" #include "xml.h" diff --git a/src/xmllang/graphml.cpp b/src/xmllang/graphml.cpp index 3a0591f8eca..d76f5b1f956 100644 --- a/src/xmllang/graphml.cpp +++ b/src/xmllang/graphml.cpp @@ -9,14 +9,14 @@ Author: Michael Tautschnig, mt@eecs.qmul.ac.uk /// \file /// Read/write graphs as GraphML +#include "graphml.h" + #include #include #include #include -#include "graphml.h" - // include last to make sure #define stack(x) of parser.h does not // collide with std::stack included by graph.h #include "xml_parser.h" diff --git a/src/xmllang/xml_parser.cpp b/src/xmllang/xml_parser.cpp index 8a92480bc22..f03d4d87b24 100644 --- a/src/xmllang/xml_parser.cpp +++ b/src/xmllang/xml_parser.cpp @@ -6,13 +6,12 @@ Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ +#include "xml_parser.h" #include #include #include -#include "xml_parser.h" - xml_parsert xml_parser; // 'do it all' function