Automatic debugging of UML class diagrams helps in the visual specification of software systems because users cannot detect errors in logical consistency easily. This paper focuses on tractable consistency checking of UML class diagrams. We accurately identify inconsistencies in these 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, for two cases in which class diagrams contain (i) disjointness constraints and overwriting/multiple inheritances and (ii) these components along with completeness constraints, the restriction of attribute value types decreases the complexities from EXPTIME to P and PSPACE. Additionally, we confirm the existence of a meanin...