The Logic of Priorities