3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

update pretty printer for recursive function filtering

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2022-05-12 12:14:07 -07:00
parent 7f62fa2b66
commit 1028c80851
5 changed files with 65 additions and 57 deletions

View file

@ -20,23 +20,24 @@ Revision History:
#pragma once
// add to value the stack semantics
#include <stack>
#include "util/vector.h"
template <typename T> class stacked_value {
T m_value;
std::stack<T> m_stack;
vector<T> m_stack;
public:
void push() {
m_stack.push(m_value);
m_stack.push_back(m_value);
}
void clear() {
m_stack.clear();
void clear(T const& m) {
pop(m_stack.size());
m_value = m;
}
unsigned stack_size() const {
return static_cast<unsigned>(m_stack.size());
return m_stack.size();
}
void pop() {
@ -46,8 +47,8 @@ public:
while (k-- > 0) {
if (m_stack.empty())
return;
m_value = m_stack.top();
m_stack.pop();
m_value = m_stack.back();
m_stack.pop_back();
}
}