||Automatic debugging of UML class diagrams is helpful for users to visually specify software systems because they cannot detect errors of logical inconsistency easily. This paper focuses on tractable consistency checking of UML class diagrams. We accurately identify inconsistencies in the diagrams by translating them into first-order predicate logic generalized by counting quantifiers and classify their expressivities by eliminating some components. For class diagrams of different expressive powers, we introduce optimized algorithms that compute their respective consistencies in P, NP, PSPACE, or EXPTIME with respect to the size of the class diagram. In particular, restricting the attribute value types decreases the complexities from EXPTIME to P and PSPACE for the two cases in which class diagrams contain (i) disjointness constraints and overwriting/multiple
inheritances and (ii) these components together with completeness constraints. Additionally, we guarantee that there exists a meaningful restriction of class diagrams such that no logical inconsistency is caused.