Skip to content

Commit 08b07ad

Browse files
Decision procedure interface for solving with contexts/assumptions
Provides combined push/pop + assumptions interface
1 parent e1fe746 commit 08b07ad

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*******************************************************************\
2+
3+
Module: Decision procedure with incremental solving with contexts
4+
and assumptions
5+
6+
Author: Peter Schrammel
7+
8+
\*******************************************************************/
9+
10+
/// \file
11+
/// Decision procedure with incremental solving with contexts
12+
/// and assumptions
13+
14+
#ifndef CPROVER_SOLVERS_STACK_DECISION_PROCEDURE_H
15+
#define CPROVER_SOLVERS_STACK_DECISION_PROCEDURE_H
16+
17+
#include <vector>
18+
19+
#include "decision_procedure.h"
20+
21+
class stack_decision_proceduret : public decision_proceduret
22+
{
23+
public:
24+
/// Pushes a new context on the stack that consists of the given
25+
/// (possibly empty vector of) \p assumptions.
26+
/// This context becomes a child context nested in the current context.
27+
/// An assumption is usually obtained by calling
28+
/// `decision_proceduret::handle`. Thus it can be a Boolean expression or
29+
/// something more solver-specific such as `literal_exprt`.
30+
/// An empty vector of assumptions counts as an element on the stack.
31+
virtual void push(const std::vector<exprt> &assumptions) = 0;
32+
33+
/// Push a new context on the stack
34+
/// This context becomes a child context nested in the current context.
35+
virtual void push() = 0;
36+
37+
/// Pop whatever has been pushed in the last call to `push`
38+
virtual void pop() = 0;
39+
40+
virtual ~stack_decision_proceduret() = default;
41+
};
42+
43+
#endif // CPROVER_SOLVERS_STACK_DECISION_PROCEDURE_H

0 commit comments

Comments
 (0)