Skip to content

Commit fbdf29a

Browse files
committed
Remove DEBUG ifdefs which broke the debug build
1 parent fee04d6 commit fbdf29a

33 files changed

+2
-140
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ matrix:
6868

6969
script:
7070
- if [ -L bin/gcc ] ; then export PATH=$PWD/bin:$PATH ; fi ;
71+
COMMAND="make -C src CXX=$COMPILER CXXFLAGS=\"-Wall -O0 -ggdb3 -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare -DDEBUG\" -j2" &&
72+
eval ${PRE_COMMAND} ${COMMAND} &&
7173
COMMAND="make -C src minisat2-download" &&
7274
eval ${PRE_COMMAND} ${COMMAND} &&
7375
COMMAND="make -C src CXX=$COMPILER CXXFLAGS=\"-Wall -O2 -g -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare\" -j2" &&

src/analyses/constant_propagator.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ Author: Peter Schrammel
66
77
\*******************************************************************/
88

9-
// #define DEBUG
10-
119
#ifdef DEBUG
1210
#include <iostream>
1311
#endif

src/analyses/natural_loops.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Author: Georg Weissenbacher, [email protected]
1010

1111
#include "natural_loops.h"
1212

13-
// #define DEBUG
14-
1513
/*******************************************************************\
1614
1715
Function: show_natural_loops

src/analyses/natural_loops.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ Function: natural_loops_templatet::compute
8181
8282
\*******************************************************************/
8383

84-
// #define DEBUG
85-
8684
#ifdef DEBUG
8785
#include <iostream>
8886
#endif
@@ -92,10 +90,6 @@ void natural_loops_templatet<P, T>::compute(P &program)
9290
{
9391
cfg_dominators(program);
9492

95-
#ifdef DEBUG
96-
cfg_dominators.output(std::cout);
97-
#endif
98-
9993
// find back-edges m->n
10094
for(T m_it=program.instructions.begin();
10195
m_it!=program.instructions.end();

src/cpp/parse.cpp

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ Author: Daniel Kroening, [email protected]
2121
#include "cpp_member_spec.h"
2222
#include "cpp_enum_type.h"
2323

24-
// #define DEBUG
25-
2624
#ifdef DEBUG
2725
#include <iostream>
2826

@@ -639,12 +637,6 @@ bool Parser::rDefinition(cpp_itemt &item)
639637
{
640638
int t=lex.LookAhead(0);
641639

642-
#ifdef DEBUG
643-
indenter _i;
644-
std::cout << std::string(__indent, ' ') << "Parser::rDefinition 1 " << t
645-
<< "\n";
646-
#endif
647-
648640
if(t==';')
649641
return rNullDeclaration(item.make_declaration());
650642
else if(t==TOK_TYPEDEF)
@@ -1237,12 +1229,6 @@ bool Parser::rTemplateDecl(cpp_declarationt &decl)
12371229
switch(kind)
12381230
{
12391231
case tdk_decl:
1240-
#ifdef DEBUG
1241-
std::cout << std::string(__indent, ' ') << "BODY: " << body << std::endl;
1242-
std::cout << std::string(__indent, ' ') << "TEMPLATE_TYPE: "
1243-
<< template_type << std::endl;
1244-
#endif
1245-
12461232
body.add(ID_template_type).swap(template_type);
12471233
body.set(ID_is_template, true);
12481234
decl.swap(body);
@@ -1909,12 +1895,6 @@ bool Parser::rIntegralDeclaration(
19091895

19101896
if(lex.LookAhead(0)==';')
19111897
{
1912-
#ifdef DEBUG
1913-
std::cout << std::string(__indent, ' ')
1914-
<< "Parser::rIntegralDeclaration 8 "
1915-
<< declaration << "\n";
1916-
#endif
1917-
19181898
lex.get_token(tk);
19191899
return true;
19201900
}
@@ -5119,11 +5099,6 @@ bool Parser::rClassBody(exprt &body)
51195099
return true; // error recovery
51205100
}
51215101

5122-
#ifdef DEBUG
5123-
std::cout << std::string(__indent, ' ') << "Parser::rClassBody " << member
5124-
<< std::endl;
5125-
#endif
5126-
51275102
members.move_to_operands(
51285103
static_cast<exprt &>(static_cast<irept &>(member)));
51295104
}
@@ -9244,10 +9219,6 @@ bool Parser::rExprStatement(codet &statement)
92449219

92459220
if(rDeclarationStatement(statement))
92469221
{
9247-
#ifdef DEBUG
9248-
std::cout << std::string(__indent, ' ') << "rDe: " << statement
9249-
<< std::endl;
9250-
#endif
92519222
return true;
92529223
}
92539224
else

src/goto-instrument/accelerate/accelerate.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ Author: Matt Lewis
2727
#include "overflow_instrumenter.h"
2828
#include "util.h"
2929

30-
#define DEBUG
31-
3230
goto_programt::targett acceleratet::find_back_jump(
3331
goto_programt::targett loop_header)
3432
{

src/goto-instrument/accelerate/acceleration_utils.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ Author: Matt Lewis
4242
#include "cone_of_influence.h"
4343
#include "overflow_instrumenter.h"
4444

45-
#define DEBUG
46-
4745
void acceleration_utilst::gather_rvalues(
4846
const exprt &expr,
4947
expr_sett &rvalues)

src/goto-instrument/accelerate/all_paths_enumerator.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Author: Matt Lewis
1010

1111
#include "all_paths_enumerator.h"
1212

13-
// #define DEBUG
14-
1513
bool all_paths_enumeratort::next(patht &path)
1614
{
1715
if(last_path.empty())

src/goto-instrument/accelerate/cone_of_influence.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ Author: Matt Lewis
1212

1313
#include "cone_of_influence.h"
1414

15-
// #define DEBUG
16-
1715
void cone_of_influencet::cone_of_influence(
1816
const expr_sett &targets,
1917
expr_sett &cone)

src/goto-instrument/accelerate/disjunctive_polynomial_acceleration.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ Author: Matt Lewis
4343
#include "cone_of_influence.h"
4444
#include "overflow_instrumenter.h"
4545

46-
#define DEBUG
47-
48-
4946
bool disjunctive_polynomial_accelerationt::accelerate(
5047
path_acceleratort &accelerator)
5148
{

src/goto-instrument/accelerate/enumerating_loop_acceleration.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Author: Matt Lewis
1010

1111
#include "enumerating_loop_acceleration.h"
1212

13-
// #define DEBUG
14-
1513
bool enumerating_loop_accelerationt::accelerate(
1614
path_acceleratort &accelerator)
1715
{

src/goto-instrument/accelerate/overflow_instrumenter.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ Author: Matt Lewis
1818
#include "overflow_instrumenter.h"
1919
#include "util.h"
2020

21-
// #define DEBUG
22-
2321
/*
2422
* This code is copied wholesale from analyses/goto_check.cpp.
2523
*/

src/goto-instrument/accelerate/polynomial_accelerator.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ Author: Matt Lewis
3939
#include "cone_of_influence.h"
4040
#include "overflow_instrumenter.h"
4141

42-
#define DEBUG
43-
44-
4542
bool polynomial_acceleratort::accelerate(
4643
patht &loop,
4744
path_acceleratort &accelerator)

src/goto-instrument/accelerate/sat_path_enumerator.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ Author: Matt Lewis
4242
#include "util.h"
4343
#include "overflow_instrumenter.h"
4444

45-
#define DEBUG
46-
4745
bool sat_path_enumeratort::next(patht &path)
4846
{
4947
scratch_programt program(symbol_table);

src/goto-instrument/accelerate/scratch_program.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ Author: Matt Lewis
1515

1616
#include "scratch_program.h"
1717

18-
// #define DEBUG
19-
2018
#ifdef DEBUG
2119
#include <iostream>
2220
#endif
@@ -30,11 +28,6 @@ bool scratch_programt::check_sat(bool do_slice)
3028
remove_skip(*this);
3129
update();
3230

33-
#ifdef DEBUG
34-
std::cout << "Checking following program for satness:" << endl;
35-
output(ns, "scratch", cout);
36-
#endif
37-
3831
symex.constant_propagation=constant_propagation;
3932
goto_symex_statet::propagationt::valuest constants;
4033

@@ -56,10 +49,6 @@ bool scratch_programt::check_sat(bool do_slice)
5649

5750
equation.convert(*checker);
5851

59-
#ifdef DEBUG
60-
cout << "Finished symex, invoking decision procedure." << endl;
61-
#endif
62-
6352
return (checker->dec_solve()==decision_proceduret::D_SATISFIABLE);
6453
}
6554

src/goto-instrument/accelerate/trace_automaton.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ Author: Matt Lewis
1212
#include "trace_automaton.h"
1313
#include "path.h"
1414

15-
// #define DEBUG
16-
1715
void trace_automatont::build()
1816
{
1917
#ifdef DEBUG
@@ -76,9 +74,6 @@ void trace_automatont::add_path(patht &path)
7674
for(const auto &step : path)
7775
{
7876
goto_programt::targett l=step.loc;
79-
#ifdef DEBUG
80-
std::cout << ", " << l->location_number << ":" << l->location;
81-
#endif
8277

8378
if(in_alphabet(l))
8479
{
@@ -108,13 +103,6 @@ void trace_automatont::add_path(patht &path)
108103
*/
109104
void trace_automatont::determinise()
110105
{
111-
#ifdef DEBUG
112-
std::cout << "Determinising automaton with " << nta.num_states
113-
<< " states and " << nta.accept_states.size()
114-
<< " accept states and " << nta.count_transitions()
115-
<< " transitions" << endl;
116-
#endif
117-
118106
dstates.clear();
119107
unmarked_dstates.clear();
120108
dta.clear();
@@ -123,10 +111,6 @@ void trace_automatont::determinise()
123111
init_states.insert(nta.init_state);
124112
epsilon_closure(init_states);
125113

126-
#ifdef DEBUG
127-
std::cout << "There are " << init_states.size() << " init states" << endl;
128-
#endif
129-
130114
dta.init_state=add_dstate(init_states);
131115

132116
while(!unmarked_dstates.empty())

src/goto-programs/goto_inline_class.cpp

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

9-
// #define DEBUG
10-
119
#ifdef DEBUG
1210
#include <iostream>
1311
#endif

src/linking/linking.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -936,11 +936,6 @@ bool linkingt::adjust_object_type_rec(
936936
else if(t1.id()!=t2.id())
937937
{
938938
// type classes do not match and can't be fixed
939-
#ifdef DEBUG
940-
str << "LINKING: cannot join " << t1.id() << " vs. " << t2.id();
941-
debug_msg();
942-
#endif
943-
944939
return true;
945940
}
946941

@@ -1041,11 +1036,6 @@ bool linkingt::adjust_object_type(
10411036
const symbolt &new_symbol,
10421037
bool &set_to_new)
10431038
{
1044-
#ifdef DEBUG
1045-
str << "LINKING: trying to adjust types of " << old_symbol.name;
1046-
debug_msg();
1047-
#endif
1048-
10491039
const typet &old_type=follow_tags_symbols(ns, old_symbol.type);
10501040
const typet &new_type=follow_tags_symbols(ns, new_symbol.type);
10511041

src/path-symex/path_symex.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Author: Daniel Kroening, [email protected]
2222
#include "path_symex.h"
2323
#include "path_symex_class.h"
2424

25-
// #define DEBUG
26-
2725
#ifdef DEBUG
2826
#include <iostream>
2927
#endif

src/path-symex/path_symex_state.cpp

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

1919
#include "path_symex_state.h"
2020

21-
// #define DEBUG
22-
2321
#ifdef DEBUG
2422
#include <iostream>
2523
#include <langapi/language_util.h>

src/path-symex/path_symex_state_read.cpp

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

1414
#include "path_symex_state.h"
1515

16-
// #define DEBUG
17-
1816
#ifdef DEBUG
1917
#include <iostream>
2018
#include <langapi/language_util.h>

src/path-symex/var_map.cpp

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

1515
#include "var_map.h"
1616

17-
// #define DEBUG
18-
1917
/*******************************************************************\
2018
2119
Function: var_mapt::var_infot::operator()

src/pointer-analysis/dereference.cpp

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

9-
// #define DEBUG
10-
119
#ifdef DEBUG
1210
#include <iostream>
1311
#include <langapi/language_util.h>

src/pointer-analysis/value_set_dereference.cpp

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

9-
// #define DEBUG
10-
119
#ifdef DEBUG
1210
#include <iostream>
1311
#endif

src/solvers/flattening/arrays.cpp

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

9-
// #define DEBUG
10-
119
#include <cassert>
1210
#include <iostream>
1311

0 commit comments

Comments
 (0)