Skip to content

Commit f888f6a

Browse files
Move literal convert/get to decision_proceduret
There is no instance in the code base of using decision_proceduret without these functions.
1 parent 57e3257 commit f888f6a

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

src/solvers/prop/decision_procedure.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ Author: Daniel Kroening, kroening@kroening.com
1515
#include <iosfwd>
1616
#include <string>
1717

18+
#include "literal.h"
19+
1820
class exprt;
21+
class tvt;
1922

2023
class decision_proceduret
2124
{
@@ -26,6 +29,9 @@ class decision_proceduret
2629
// returns nil if not available
2730
virtual exprt get(const exprt &expr) const=0;
2831

32+
// specialized variant of get
33+
virtual tvt l_get(literalt) const = 0;
34+
2935
// print satisfying assignment
3036
virtual void print_assignment(std::ostream &out) const=0;
3137

@@ -39,6 +45,14 @@ class decision_proceduret
3945
void set_to_false(const exprt &expr)
4046
{ set_to(expr, false); }
4147

48+
// conversion to handle
49+
virtual literalt convert(const exprt &expr) = 0;
50+
51+
literalt operator()(const exprt &expr)
52+
{
53+
return convert(expr);
54+
}
55+
4256
// solve the problem
4357
enum class resultt { D_SATISFIABLE, D_UNSATISFIABLE, D_ERROR };
4458

src/solvers/prop/prop_conv.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,8 @@ class prop_convt:public decision_proceduret
3030
public:
3131
virtual ~prop_convt() { }
3232

33-
// conversion to handle
34-
virtual literalt convert(const exprt &expr)=0;
35-
36-
literalt operator()(const exprt &expr)
37-
{
38-
return convert(expr);
39-
}
40-
4133
using decision_proceduret::operator();
4234

43-
// specialised variant of get
44-
virtual tvt l_get(literalt a) const=0;
45-
4635
// incremental solving
4736
virtual void set_frozen(literalt a);
4837
virtual void set_frozen(const bvt &);

0 commit comments

Comments
 (0)