mop: Implement a class which automatically defines a predicate.