Computational cognitive modeling explores cognition by building computational models for cognitive processes, mechanisms and representations. Currently, implementations of cognitive models lack a formal foundation. This inhibits analysis. In this thesis, the cognitive architecture Adaptive Control of Thought - Rational (ACT-R) is formalized and embedded into the rule-based programming language Constraint Handling Rules (CHR). The powerful analytical methods of CHR, particularly confluence analysis, are extended by reasoning modulo equivalence relations. The results are applied to the domain of cognitive modeling.