Skip to content

Commit d547185

Browse files
Clang-format
1 parent 77a015b commit d547185

File tree

4 files changed

+33
-30
lines changed

4 files changed

+33
-30
lines changed

src/goto-checker/property_checker.cpp

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,42 +15,44 @@ std::string property_checkert::as_string(resultt result)
1515
{
1616
switch(result)
1717
{
18-
case property_checkert::resultt::PASS: return "OK";
19-
case property_checkert::resultt::FAIL: return "FAILURE";
20-
case property_checkert::resultt::ERROR: return "ERROR";
21-
case property_checkert::resultt::UNKNOWN: return "UNKNOWN";
18+
case property_checkert::resultt::PASS:
19+
return "OK";
20+
case property_checkert::resultt::FAIL:
21+
return "FAILURE";
22+
case property_checkert::resultt::ERROR:
23+
return "ERROR";
24+
case property_checkert::resultt::UNKNOWN:
25+
return "UNKNOWN";
2226
}
2327

2428
return "";
2529
}
2630

27-
property_checkert::property_checkert(
28-
message_handlert &_message_handler):
29-
messaget(_message_handler)
31+
property_checkert::property_checkert(message_handlert &_message_handler)
32+
: messaget(_message_handler)
3033
{
3134
}
3235

3336
void property_checkert::initialize_property_map(
3437
const goto_functionst &goto_functions)
3538
{
3639
forall_goto_functions(it, goto_functions)
37-
if(!it->second.is_inlined() ||
38-
it->first==goto_functions.entry_point())
40+
if(!it->second.is_inlined() || it->first == goto_functions.entry_point())
3941
{
40-
const goto_programt &goto_program=it->second.body;
42+
const goto_programt &goto_program = it->second.body;
4143

4244
forall_goto_program_instructions(i_it, goto_program)
4345
{
4446
if(!i_it->is_assert())
4547
continue;
4648

47-
const source_locationt &source_location=i_it->source_location;
49+
const source_locationt &source_location = i_it->source_location;
4850

49-
irep_idt property_id=source_location.get_property_id();
51+
irep_idt property_id = source_location.get_property_id();
5052

51-
property_statust &property_status=property_map[property_id];
52-
property_status.result=resultt::UNKNOWN;
53-
property_status.location=i_it;
53+
property_statust &property_status = property_map[property_id];
54+
property_status.result = resultt::UNKNOWN;
55+
property_status.location = i_it;
5456
}
5557
}
5658
}

src/goto-checker/property_checker.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,27 @@ Author: Daniel Kroening, [email protected]
1919
#include <goto-programs/goto_model.h>
2020
#include <goto-programs/goto_trace.h>
2121

22-
class property_checkert:public messaget
22+
class property_checkert : public messaget
2323
{
2424
public:
2525
property_checkert()
2626
{
2727
}
2828

29-
explicit property_checkert(
30-
message_handlert &_message_handler);
29+
explicit property_checkert(message_handlert &_message_handler);
3130

32-
enum class resultt { PASS, FAIL, ERROR, UNKNOWN };
31+
enum class resultt
32+
{
33+
PASS,
34+
FAIL,
35+
ERROR,
36+
UNKNOWN
37+
};
3338

3439
static std::string as_string(resultt);
3540

3641
// Check whether all properties in goto_functions hold.
37-
virtual resultt operator()(const goto_modelt &)=0;
42+
virtual resultt operator()(const goto_modelt &) = 0;
3843

3944
struct property_statust
4045
{

src/goto-checker/safety_checker.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@ Author: Daniel Kroening, [email protected]
1111

1212
#include "safety_checker.h"
1313

14-
safety_checkert::safety_checkert(const namespacet &_ns):
15-
ns(_ns)
14+
safety_checkert::safety_checkert(const namespacet &_ns) : ns(_ns)
1615
{
1716
}
1817

1918
safety_checkert::safety_checkert(
2019
const namespacet &_ns,
21-
message_handlert &_message_handler):
22-
messaget(_message_handler),
23-
ns(_ns)
20+
message_handlert &_message_handler)
21+
: messaget(_message_handler), ns(_ns)
2422
{
2523
}

src/goto-checker/safety_checker.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ Author: Daniel Kroening, [email protected]
2020
#include <goto-programs/goto_model.h>
2121
#include <goto-programs/goto_trace.h>
2222

23-
class safety_checkert:public messaget
23+
class safety_checkert : public messaget
2424
{
2525
public:
26-
explicit safety_checkert(
27-
const namespacet &_ns);
26+
explicit safety_checkert(const namespacet &_ns);
2827

2928
explicit safety_checkert(
3029
const namespacet &_ns,
@@ -51,8 +50,7 @@ class safety_checkert:public messaget
5150
// check whether all assertions in goto_functions are safe
5251
// if UNSAFE, then a trace is returned
5352

54-
virtual resultt operator()(
55-
const goto_functionst &goto_functions)=0;
53+
virtual resultt operator()(const goto_functionst &goto_functions) = 0;
5654

5755
// this is the counterexample
5856
goto_tracet error_trace;

0 commit comments

Comments
 (0)