Skip to content

Commit ee3ac60

Browse files
Reformat one line functions
Put one line functions in a format compatible with clang-format to give a more consistent formatting to the code in prop_conv header.
1 parent 77f20b8 commit ee3ac60

File tree

1 file changed

+50
-18
lines changed

1 file changed

+50
-18
lines changed

src/solvers/prop/prop_conv.h

+50-18
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ Author: Daniel Kroening, [email protected]
2727
class prop_convt:public decision_proceduret
2828
{
2929
public:
30-
explicit prop_convt(
31-
const namespacet &_ns):
32-
decision_proceduret(_ns) { }
33-
virtual ~prop_convt() { }
30+
explicit prop_convt(const namespacet &_ns) : decision_proceduret(_ns)
31+
{
32+
}
33+
34+
virtual ~prop_convt()
35+
{
36+
}
3437

3538
// conversion to handle
3639
virtual literalt convert(const exprt &expr)=0;
@@ -49,15 +52,27 @@ class prop_convt:public decision_proceduret
4952
virtual void set_frozen(literalt a);
5053
virtual void set_frozen(const bvt &);
5154
virtual void set_assumptions(const bvt &_assumptions);
52-
virtual bool has_set_assumptions() const { return false; }
53-
virtual void set_all_frozen() {}
55+
56+
virtual bool has_set_assumptions() const
57+
{
58+
return false;
59+
}
60+
61+
virtual void set_all_frozen()
62+
{
63+
}
5464

5565
// returns true if an assumption is in the final conflict
5666
virtual bool is_in_conflict(literalt l) const;
57-
virtual bool has_is_in_conflict() const { return false; }
67+
virtual bool has_is_in_conflict() const
68+
{
69+
return false;
70+
}
5871

5972
// Resource limits:
60-
virtual void set_time_limit_seconds(uint32_t) {}
73+
virtual void set_time_limit_seconds(uint32_t)
74+
{
75+
}
6176
};
6277

6378
//
@@ -70,9 +85,10 @@ class prop_convt:public decision_proceduret
7085
class prop_conv_solvert:public prop_convt
7186
{
7287
public:
73-
prop_conv_solvert(const namespacet &_ns, propt &_prop):
74-
prop_convt(_ns),
75-
prop(_prop) { }
88+
prop_conv_solvert(const namespacet &_ns, propt &_prop)
89+
: prop_convt(_ns), prop(_prop)
90+
{
91+
}
7692

7793
virtual ~prop_conv_solvert() = default;
7894

@@ -81,34 +97,50 @@ class prop_conv_solvert:public prop_convt
8197
decision_proceduret::resultt dec_solve() override;
8298
void print_assignment(std::ostream &out) const override;
8399
std::string decision_procedure_text() const override
84-
{ return "propositional reduction"; }
100+
{
101+
return "propositional reduction";
102+
}
85103
exprt get(const exprt &expr) const override;
86104

87105
// overloading from prop_convt
88106
using prop_convt::set_frozen;
89-
virtual tvt l_get(literalt a) const override { return prop.l_get(a); }
107+
virtual tvt l_get(literalt a) const override
108+
{
109+
return prop.l_get(a);
110+
}
90111
void set_frozen(literalt a) override
91112
{
92113
prop.set_frozen(a);
93114
}
94115
void set_assumptions(const bvt &_assumptions) override
95-
{ prop.set_assumptions(_assumptions); }
116+
{
117+
prop.set_assumptions(_assumptions);
118+
}
96119
bool has_set_assumptions() const override
97-
{ return prop.has_set_assumptions(); }
120+
{
121+
return prop.has_set_assumptions();
122+
}
98123
void set_all_frozen() override
99124
{
100125
freeze_all = true;
101126
}
102127
literalt convert(const exprt &expr) override;
103128
bool is_in_conflict(literalt l) const override
104-
{ return prop.is_in_conflict(l); }
129+
{
130+
return prop.is_in_conflict(l);
131+
}
105132
bool has_is_in_conflict() const override
106-
{ return prop.has_is_in_conflict(); }
133+
{
134+
return prop.has_is_in_conflict();
135+
}
107136

108137
// get literal for expression, if available
109138
virtual optionalt<literalt> literal(const exprt &expr) const;
110139

111-
virtual void clear_cache() { cache.clear();}
140+
virtual void clear_cache()
141+
{
142+
cache.clear();
143+
}
112144

113145
bool use_cache = true;
114146
bool equality_propagation = true;

0 commit comments

Comments
 (0)