This paper presents a computational model of emotions that is based in an appraisal theoretical framework. The model explores the dynamics of the appraisal–emotion relationship using parallel constraint satisfaction. It proposes belief coherence, desire coherence and belief–desire coherence as basic principles and specifies how these principles can be realised in a parallel constraint satisfaction system. The model shows that the very same mechanisms that account for the formation of coherence or consistency are also pivotal for the emergence and alteration of emotional states and for the dynamics of the cognition–emotion relationship. Concrete simulation examples show how discrete emotions such as anger, pride, sadness, shame, surprise, relief and disappointment emerge out of these principles.