def context_modifier(F):
    """
    Decorator for methods where context is somehow modified.
    Recompute implications in context.
    """
    def wrapper(db, *args):
        F(db, *args)
        db._cxt_implications = db._cxt.get_attribute_implications(
                                            confirmed=db._implications,
                                            cond=db._cond)
    return wrapper