3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-11 03:33:35 +00:00
z3/lib/goal_shared_occs.cpp
Leonardo de Moura e9eab22e5c Z3 sources
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-02 11:35:25 -07:00

30 lines
510 B
C++

/*++
Copyright (c) 2011 Microsoft Corporation
Module Name:
goal_shared_occs.cpp
Abstract:
Functor for computing the set of shared occurrences in a goal.
Author:
Leonardo de Moura (leonardo) 2011-12-28
Revision History:
--*/
#include"goal_shared_occs.h"
void goal_shared_occs::operator()(goal const & g) {
m_occs.reset();
shared_occs_mark visited;
unsigned sz = g.size();
for (unsigned i = 0; i < sz; i++) {
expr * t = g.form(i);
m_occs(t, visited);
}
}