Skip to content

Commit 016c8d1

Browse files
author
Daniel Kroening
committed
move l_get and convert back into prop_convt
prop_convt is an instance of decision_proceduret that uses propositional logic.
1 parent b004fb8 commit 016c8d1

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

src/solvers/prop/decision_procedure.h

-12
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ Author: Daniel Kroening, [email protected]
1515
#include <iosfwd>
1616
#include <string>
1717

18-
#include "literal.h"
19-
2018
class exprt;
21-
class tvt;
2219

2320
class decision_proceduret
2421
{
@@ -33,10 +30,6 @@ class decision_proceduret
3330
/// For a Boolean expression \p expr, add the constraint 'not expr'
3431
void set_to_false(const exprt &expr);
3532

36-
/// Convert a Boolean expression and return the corresponding literal
37-
/// This will go away, use handle(expr) instead
38-
virtual literalt convert(const exprt &expr) = 0;
39-
4033
/// Generate a handle for an expression; this offers an efficient way
4134
/// to refer to the expression in subsequent calls to \ref get or
4235
/// \ref set_to
@@ -58,11 +51,6 @@ class decision_proceduret
5851
/// Return `nil` if not available
5952
virtual exprt get(const exprt &expr) const = 0;
6053

61-
/// Return value of literal \p l from satisfying assignment.
62-
/// Return tvt::UNKNOWN if not available
63-
/// This will go away, use get instead.
64-
virtual tvt l_get(literalt l) const = 0;
65-
6654
/// Print satisfying assignment to \p out
6755
virtual void print_assignment(std::ostream &out) const = 0;
6856

src/solvers/prop/prop_conv.h

+10-5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Author: Daniel Kroening, [email protected]
1111
#define CPROVER_SOLVERS_PROP_PROP_CONV_H
1212

1313
#include "decision_procedure.h"
14+
#include "literal.h"
15+
16+
class tvt;
1417

1518
// API that provides a "handle" in the form of a literalt
1619
// for expressions.
@@ -29,6 +32,13 @@ class prop_convt:public decision_proceduret
2932
/// but solver-specific representation.
3033
exprt handle(const exprt &expr) override;
3134

35+
/// Convert a Boolean expression and return the corresponding literal
36+
virtual literalt convert(const exprt &expr) = 0;
37+
38+
/// Return value of literal \p l from satisfying assignment.
39+
/// Return tvt::UNKNOWN if not available
40+
virtual tvt l_get(literalt l) const = 0;
41+
3242
// incremental solving
3343
virtual void set_frozen(literalt a);
3444
virtual void set_frozen(const bvt &);
@@ -41,9 +51,4 @@ class prop_convt:public decision_proceduret
4151
virtual bool has_is_in_conflict() const { return false; }
4252
};
4353

44-
//
45-
// an instance of the above that converts the
46-
// propositional skeleton by passing it to a propt
47-
//
48-
4954
#endif // CPROVER_SOLVERS_PROP_PROP_CONV_H

0 commit comments

Comments
 (0)