Diagram Predicate Framework