Skip to content

Commit 03739c1

Browse files
Split out is_in_conflict solver capability
This is only provided by the prop_conv_solvert-based hierarchy at the moment and is quite specific to MiniSAT-based solvers. The functionality itself is used out-of-tree only (2LS).
1 parent 6f5a19d commit 03739c1

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

src/solvers/prop/decision_procedure_assumptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ class decision_procedure_assumptionst : public decision_procedure_incrementalt
2020
/// Set assumptions for the next call to operator() to solve the problem
2121
virtual void set_assumptions(const bvt &) = 0;
2222

23-
/// Returns true if an assumption is in the final conflict
24-
virtual bool is_in_conflict(literalt l) const = 0;
25-
2623
virtual ~decision_procedure_assumptionst() = default;
2724
};
2825

src/solvers/prop/prop_conv_solver.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ Author: Daniel Kroening, [email protected]
2020
#include "literal.h"
2121
#include "literal_expr.h"
2222
#include "prop.h"
23+
#include "solver_conflicts.h"
2324
#include "solver_resource_limits.h"
2425

2526
class prop_conv_solvert : public decision_procedure_assumptionst,
27+
public solver_conflictst,
2628
public solver_resource_limitst
2729
{
2830
public:

src/solvers/prop/solver_conflicts.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*******************************************************************\
2+
3+
Module: Capability to return assumptions that are in a conflict
4+
when solving under assumptions
5+
6+
Author: Peter Schrammel
7+
8+
\*******************************************************************/
9+
10+
/// \file
11+
/// Capability to return assumptions that are in a conflict
12+
// when solving under assumptions
13+
14+
#ifndef CPROVER_SOLVERS_PROP_SOLVER_CONFLICTS_H
15+
#define CPROVER_SOLVERS_PROP_SOLVER_CONFLICTS_H
16+
17+
class literalt;
18+
19+
class solver_conflictst
20+
{
21+
public:
22+
/// Returns true if an assumption is in the final conflict
23+
virtual bool is_in_conflict(literalt) const = 0;
24+
25+
virtual ~solver_conflictst() = default;
26+
};
27+
28+
#endif // CPROVER_SOLVERS_PROP_SOLVER_CONFLICTS_H

0 commit comments

Comments
 (0)