'Prune unsatisfiable states from a stash.
This function will move all unsatisfiable states in the given stash into a different stash.
:param filter_func: Only prune states that match this filter.
:param from_stash:  Prune states from this stash. (default: \'active\')
:param to_stash:    Put pruned states in this stash. (default: \'pruned\')
:returns:           The resulting SimulationManager.
:rtype:             SimulationManager'

def prune(self, filter_func=None, from_stash=None, to_stash=None):

    to_stash = ('pruned' if (to_stash is None) else to_stash)
    from_stash = ('active' if (from_stash is None) else from_stash)
    (to_prune, new_active) = self._filter_states(filter_func, self.stashes[from_stash])
    new_stashes = self._copy_stashes()
    for s in to_prune:
        if (not s.satisfiable()):
            if (to_stash not in new_stashes):
                new_stashes[to_stash] = []
            new_stashes[to_stash].append(s)
            if self._hierarchy:
                self._hierarchy.unreachable_state(s)
                self._hierarchy.simplify()
        else:
            new_active.append(s)
    new_stashes[from_stash] = new_active
    return self._successor(new_stashes)
