The logic of inconsistency