Emiliano Lorini

The Cognitive Anatomy and Functions of Expectations Revisited

Some years ago (in 2003) I wrote my first paper in collaboration with Cristiano Castelfranchi who at that time was the supervisor of my Master project in Cognitive Science. The work was aimed at providing a logical formalization of the notion of expectation and of expectation-based emotions such as hope, fear, disappointment and relief. In this paper I will revisit and extend the analysis we did in 2003. I will propose a refinement of the notion of expectation by formalizing its two primitive components: the value of the goal and the strength of the belief. Thanks to this refinement, I will provide a formal analysis of the intensity of hope and fear.

Introduction

Cristiano Castelfranchi has been a great teacher and a constant source of inspiration. During the years of my PhD in Rome he taught me to love scientific research and how to find beautiful connections among different aspects of human mind and of social interaction. We had very intense discussions on several different topics: on the relationships between beliefs and motivations (e.g. goals, intentions etc.); on the concepts of intentional action and attempt; on the theory of altruism and pro-social attitudes; on the theory of social trust, power, delegation; on the cognitive theory of surprise, and on many many others. In 2003 I wrote my first scientific paper together with him who at that time was the supervisor of my Master project in Cognitive Science. The work -published in [START_REF] Castelfranchi | Cognitive anatomy and functions of expectations[END_REF] 1 -was aimed at providing a logical formalization of the notion of expectation and of expectation-based emotions such as hope, fear, disappointment and relief.

In this paper I will revisit and extend the analysis we did in 2003 into two directions. First of all, I will introduce a new logical framework which allows to formalize in a simple way some basic concepts for a formal theory of expectation-based emotions: the notion of graded belief and the notion of graded goal. Secondly, I will propose a refinement of the notion of expectation by formalizing its two primitive components: the value of the goal and the strength of the belief. Thanks to this refinement, I will provide a formal analysis of the cognitive structures of hope and fear and of their intensities. With cognitive structure of an emotion, I mean the emotion's triggering conditions, that is, the agent's mental states (beliefs, goals, intentions, etc.) that trigger the agent's emotional reaction (e.g., action tendencies and physiological reactions) and 'cause' the agent to feel the emotion.

The rest of the paper is organized as follows. Section 1.2 is devoted to present a logical representation language for the formalization of expectation-based emotions. I will explain the syntax and the semantics of this logic which allows to represent different kinds of an agent's mental states such as knowledge, graded belief and graded goal. In Section 1.3, the logical framework of Section 1.2 will be applied to the formalization of the cognitive structures of hope and fear and of their intensities. I will consider the concepts of hope and fear. In Section 1.4 I will discuss some related works in the area of logical modeling of emotions. Then, I will conclude.

A simple logic of graded beliefs and graded goals

The logic LGA (Logic of Graded mental Attitudes) presented in this section is a BDI-like logic in the sense of [START_REF] Cohen | Intention is choice with commitment[END_REF][START_REF] Rao | Decision procedures for BDI logics[END_REF] which allows to represent formally different kinds of mental attitudes of an agent including knowledge, graded beliefs (i.e., believing with a certain strength that a given proposition is true) and graded goals (i.e., wanting with a given force or strength a given proposition to be true). I will present the syntax and the semantics of the logic LGA. I will only consider the single-agent case, postponing to future work an extension of the logic to the multi-agent case.

Syntax

Assume a finite set of propositional variables Prop = {p, q, . . .} and a finite set of positive integers Num = {0, . . . , max} with max ≥ 1. The language L of the logic LGA is the set of formulae defined by the following grammar in Backus-Naur Form (BNF):

Atm : χ p | exc h | des h Fml : ϕ χ | ¬ϕ | ϕ ∧ ϕ | Kϕ
where p ranges over Prop and h ranges over Num. The other Boolean constructions , ⊥, ∨, → and ↔ are defined from p, ¬ and ∧ in the standard way.

Atm is the set of atomic formulae. The latter includes propositional variables and special constructions which are used to represent the agent's mental state (the agent's beliefs and goals).

The special atoms exc h are used to identify the degree of plausibility of a given world according to the agent. Indeed, possible worlds are ordered according to their plausibility degree for the agent in such a way that the agent is capable of assessing whether a given world is more plausible than another world. Starting from [START_REF] Grove | Two modellings for theory change[END_REF], ranking among possible worlds have been extensively used in belief revision theory in order to define a selection mechanism (i.e., a revision function) which can tell how to decide rationally which sentences to give up and which to keep when revising a knowledge base. I here use the notion of plausibility first introduced by Spohn [START_REF] Spohn | Ordinal conditional functions: a dynamic theory of epistemic states[END_REF]. Following Spohn's theory, the worlds that are assigned the smallest numbers are the most plausible, according to the beliefs of the individual. That is, the ordinal h assigned to a given world rather captures the degree of exceptionality of this world, where the exceptionality degree of a world is nothing but the opposite of its plausibility degree (i.e., the exceptionality degree of a world decreases when its plausibility degree increases). Therefore, formula exc h can be read alternatively as "according to the agent, the current world has a degree of exceptionality h" or "the current world has a degree of plausibility maxh".

The special atoms des h are used to identify the degree of desirability (or the degree of goodness) of a given world for the agent. 2Contrary to plausibility, the worlds that are assigned the biggest numbers are the most desirable for the agent. The degree of undesirability (or degree of a badness) of a given world is the opposite of its desirability degree (or degree of goodness). Therefore, formula des h can be read alternatively as "the current world has a degree of desirability h" or "the current world has a degree of undesirability maxh".

The formula Kϕ has to be read "the agent knows that ϕ is true". This concept of knowledge is the standard S5-notion, partition-based and fully introspective, that is commonly used both in computer science [START_REF] Fagin | Reasoning about Knowledge[END_REF] and economics [START_REF] Aumann | Interactive epistemology I: Knowledge[END_REF]. If a proposition is part of the agent's knowledge then it means that the agent considers it a well-established truth [START_REF] Van Benthem | Dynamic logic for belief revision[END_REF]. The dual of the operator K is denoted by K, that is, we define:

Kϕ def = ¬K¬ϕ
Kϕ has to be read "the agent thinks that ϕ is possible" or "the agent envisages a situation in which ϕ is true".

Semantics

The model-theoretic semantics of the logic LGA is a possible world semantics.

Definition 1 (Model).

LGA-models are tuples M = W, ∼, κ exc , κ des , V where:

• W is a nonempty set of possible worlds or states;

• ∼ is an equivalence relation between worlds in W ;

• κ exc : W -→ Num and κ des : W -→ Num are functions from the set of possible worlds into the set of integers Num;

• V : W -→ 2 Prop is a valuation function.
As usual, p ∈ V(w) means that proposition p is true at world w.

The accessibility relation ∼, which is used to interpret the epistemic operator K, can be viewed as a function from W to 2 W . Therefore, we can write ∼(w) = {v ∈ W : w ∼ v}. The set ∼(w) is the agent's information state at world w: the set of worlds that the agent considers possible at world w or, the set of worlds that the agent cannot distinguish from world w. As ∼ is an equivalence relation, if w ∼ v then the agent has the same information state at w and v (i.e., the agent has the same knowledge at w and v).

The function κ exc represents a plausibility grading of the possible worlds and is used to interpret the atomic formulae exc h . κ exc (w) = h means that, according to the agent the world w has a degree of exceptionality h or, alternatively, according to the agent the world w has a degree of plausibility maxh. (Remember that the degree of exceptionality of a world is nothing but the opposite of its plausibility degree.) The function κ exc allows to model the notion of belief: among the worlds the agent cannot distinguish from a given world w (i.e., the agent's information state at w), there are worlds that the agent considers more plausible than others. For example, suppose that ∼(w) = {w, v, u}, κ exc (w) = 2, κ exc (u) = 1 and κ exc (v) = 0. This means that at world w the agent cannot distinguish the three worlds w, v and u (i.e., {w, v, u} is the set of worlds that the agent considers possible at world w). Moreover, according to the agent, the world v is strictly more plausible than the world u and the world u is strictly more plausible than the world w (as max -0 > max -1 > max -2).

The function κ des is used to interpret the atomic formulae des h . κ des (w) = h means that, according to the agent the world w has a degree of desirability (or goodness) h or, alternatively, according to the agent the world w has a degree of undesirability (or badness) maxh. (Remember that the degree of undesirability of a world is the opposite of its desirability degree.)

LGA-models are supposed to satisfy the following additional normality constraints for the plausibility grading and for the desirability grading:

(NORM κexc ) according to the agent, there exists a world with maximal degree of plausibility (or with minimal degree of exceptionality): for every w ∈ W , there is v such that w ∼ v and κ exc (v) = 0; (NORM κ des ) according to the agent, there exists a world with minimal degree of desirability 0 (or with maximal degree of undesirability): for every w ∈ W , there is v such that w ∼ v and κ des (v) = 0.

As I will show in Section 1.2.4, these should be interpreted as a sort of rationality requirements that ensure that an agent cannot have inconsistent beliefs or conflicting goals.

Definition 2 (Truth conditions). Given a

LGA-model M , a world w and a formula ϕ, M, w |= ϕ means that ϕ is true at world w in M . The rules defining the truth conditions of atomic formulae, negation, conjunction and the epistemic operators are:

• M, w |= p iff p ∈ V(w) • M, w |= exc h iff κ exc (w) = h • M, w |= des h iff κ des (w) = h • M, w |= ¬ϕ iff not M, w |= ϕ • M, w |= ϕ ∧ ψ iff M, w |= ϕ and M, w |= ψ • M, w |= Kϕ iff M, v |= ϕ for all v with w ∼ v
In the sequel I write |= LGA ϕ to mean that ϕ is valid in LGA (ϕ is true in all

LGA-models).

Definitions of graded belief, certain belief, goal and graded goal

Following [START_REF] Spohn | Ordinal conditional functions: a dynamic theory of epistemic states[END_REF], I extend the plausibility degree of a possible world to a plausibility degree of a formula viewed as a set of worlds (the worlds where the formula is satisfiable).

Definition 3 (Exceptionality degree of a formula).

Let ||ϕ|| w = {v ∈ W : M, v |= ϕ and w ∼ v} be the set of worlds envisaged by the agent at world w in which ϕ is true. The exceptionality degree of a formula ϕ at world w, denoted by κ w exc (ϕ), is defined as follows:

κ w exc (ϕ) =    min v∈||ϕ||w κ exc (v) if ||ϕ|| w ∅ max if ||ϕ|| w = ∅
As expected, the plausibility degree of a formula ϕ is defined as max -κ w exc (ϕ). I do a similar manipulation for the desirability degree.

Definition 4 (Desirability degree of a formula).

The desirability degree of a formula ϕ at world w, denoted by κ w des (ϕ), is defined as follows:

κ w des (ϕ) =    min v∈||ϕ||w κ des (v) if ||ϕ|| w ∅ 0 if ||ϕ|| w = ∅
The undesirability degree of a formula ϕ is defined as max -κ w des (ϕ). Again following [START_REF] Spohn | Ordinal conditional functions: a dynamic theory of epistemic states[END_REF], I define semantically the concept of belief as a formula which is true in all worlds that are maximally plausible (or minimally exceptional) according to the agent. Definition 5 (Belief, Bel). At world w the agent believes that ϕ is true, i.e., M, w |= Belϕ, if and only if, for every

v such that w ∼ v, if κ exc (v) = 0 then M, v |= ϕ.
The following concept of graded belief is taken from [START_REF] Laverny | From knowledge-based programs to graded belief-based programs, part ii: off-line reasoning[END_REF][START_REF] Laverny | From knowledge-based programs to graded belief-based programs, part i: on-line reasoning[END_REF]: the strength of the belief that ϕ is equal to the exceptionality degree of ¬ϕ.3 Definition 6 (Graded belief, Bel h ). At world w the agent believes that ϕ with strength equal to h, i.e., M, w |= Bel h ϕ, if and only if, κ w exc (¬ϕ) = h. I moreover define the following concept of certain belief in the sense of believing that ϕ is true with maximal strength max.

Definition 7 (Certain belief, Certain). At world w the agent is certain that ϕ is true, i.e., M, w |= Certainϕ, if and only if κ w exc (¬ϕ) = max. The following concept of graded goal is the motivational counterpart of the notion of graded belief. I say that at world w the agent wants (or wishes) ϕ to be true with strength equal to h if and only if, the desirability of ϕ is equal to h. Definition 8 (Graded goal, Goal h ). At world w the agent wants/wishes ϕ to be true with strength equal to h (or the agent has the goal that ϕ with strength equal to h), i.e., Goal h ϕ, if and only if, κ w des (ϕ) = h. Note that previous definition captures a 'pessimistic' notion of graded goal: when assessing how much ϕ is desirable, the agent focuses on his epistemic alternatives with a minimal degree of desirability in which ϕ is true. In this sense, the preceding notion of graded goal that ϕ consists in a kind of worst case analysis of the epistemic alternatives in which ϕ is true. It is also worth noting that the previous operator of graded goal is an operator of strong possibility (or actual possibility) in the sense of possibility theory [START_REF] Dubois | Possibility theory: qualitative and quantitative aspects[END_REF]. In the context of possibility theory it is also called operator ∆. 4 The reason why the definition of graded goal is not symmetric to the definition of graded belief is that these two concepts satisfy different logical properties. As I will show below in Section 1.2.4, Definition 6 and Definition 8 allow to capture interesting differences between graded belief and graded goal, in particular on the way they distribute over conjunction and over disjunction.

The notion of goal is a just a special case of the notion of graded goal. I say that the agent wants (or wishes) ϕ to be true with strength equal to h if and only if, the agent wants (or wishes) ϕ to be true with strength higher than 0. Definition 9 (Goal, Goal). At world w the agent wants/wishes ϕ to be true (or the agent has the goal that ϕ), i.e., Goalϕ, if and only if κ w des (ϕ) > 0. As the following proposition highlights the concepts of belief, graded belief, certain belief, goal and graded goal semantically defined in Definitions 5-9 are all syntactically expressible in the logic LGA.

Proposition 1. For every model M , world w and h ∈ Num:

• M, w |= Belϕ iff M, w |= K(exc 0 → ϕ) • M, w |= Bel h ϕ iff M, w |= K(exc h ∧ ¬ϕ) ∧ K(exc <h → ϕ) if h < max M, w |= K(exc <h → ϕ) if h = max • M, w |= Certainϕ iff M, w |= K(exc <max-1 → ϕ) • M, w |= Goal h ϕ iff M, w |= K(des h ∧ ϕ) ∧ K(des <h → ¬ϕ) if h < max M, w |= K(des <h → ¬ϕ) if h = max • M, w |= Goalϕ iff M, w |= K(des 0 → ¬ϕ)

Some properties of mental attitudes

The following are some examples of LGA-validity which capture the basic relationships between knowledge, belief, graded belief, graded goal and certain belief. For every h ∈ Num we have:

|= LGA Bel h ϕ → Belϕ if h > 0 (1.1) |= LGA Certainϕ ↔ Bel max ϕ (1.2) |= LGA Goalϕ ↔ h∈Num:h>0 Goal h ϕ (1.3) |= LGA ¬(Belϕ ∧ Bel¬ϕ) (1.4) |= LGA ¬(Goalϕ ∧ Goal¬ϕ) (1.5)
According to the validity 1.1, believing ϕ is the same as believing ϕ with degree 1. According to the validity 1.2, being certain that ϕ is true is the same as believing ϕ with maximal degree max. Finally, according to the validity 1.3, having the goal that ϕ is true is the same as having a goal that ϕ is true with some strength higher than 0. Validities 1.4 and 1.5 are consequences of the constraints (NORM κexc ) and (NORM κ des ) given in Section 1.2.2. Their meaning is that agent are assumed to be rational, in the sense that they cannot have at the same time logically inconsistent beliefs or logically inconsistent goals.

The following four valid formulae capture the basic decomposability properties of the operators of graded belief and graded goal:

|= LGA (Bel h ϕ ∧ Bel k ψ) → Bel ≥max{h,k} (ϕ ∨ ψ) (1.6) |= LGA (Goal h ϕ ∧ Goal k ψ) → Goal min{h,k} (ϕ ∨ ψ) (1.7) |= LGA (Bel h ϕ ∧ Bel k ψ) → Bel min{h,k} (ϕ ∧ ψ) (1.8) |= LGA (Goal h ϕ ∧ Goal k ψ) → Goal ≥max{h,k} (ϕ ∧ ψ) (1.9)
where:

X ≥h ϕ def = k∈Num:k≥h X k ϕ with X ∈ {Bel, Goal}
According to the validity 1.6, the degree of belief of ϕ ∨ ψ is at least equal to the maximum of the degree of belief of ϕ and ψ. According to the validity 1.7, the strength of the goal that ϕ ∨ ψ is equal to the minimum of the strength of the goal of ϕ and ψ. According to the validity 1.8, the degree of belief of ϕ ∧ ψ is equal to the minimum of the degree of belief of ϕ and ψ. According to the validity 1.9, the strength of the goal that ϕ ∧ ψ is at least equal to the maximum of the strength of the goal of ϕ and ψ.

The interesting aspect of the preceding valid formulae is that graded goals distribute over conjunction and over disjunction in the opposite way as graded beliefs. Consider for instance the validity (1.8) and compare it to the validity (1.9). The joint occurrence of two events ϕ and ψ cannot be more plausible than the occurrence of a single event. This is the reason why in the right side of the validity (1.8) we have the min. On the contrary, the joint occurrence of two desirable events ϕ and ψ is more desirable than the occurrence of a single event. This is the reason why in the right side of the validity (1.9) we have the ≥ max. For example, suppose Peter wishes to go to the cinema in the evening with strength h (i.e., Goal h goToCinema) and, at the same time, he wishes to spend the evening with his girlfriend with strength k (i.e., Goal k stayWithGirlfriend). Then, according to the validity (1.9), Peter wishes to to go the cinema with his girlfriend with strength at least max{h, k} (i.e., Goal ≥max{h,k} (goToCinema ∧ stayWithGirlfriend)).

Note that the following formula is valid in the logic LGA:

|= LGA K¬ϕ → Goal max ϕ (1.10)
This means that if in all situations that an agent envisages ϕ is false, then the agent wants ϕ to be true with maximal strength max. This property follows from the fact that the graded goal operator Goal h represents a 'pessimistic' notion of goal, that is to say, it is assumed that when assessing how much ϕ is desirable, the agent focuses on his epistemic alternatives with a minimal degree of desirability in which ϕ is true. Therefore, if the agent does not envisage a situation in which ϕ is true, he will consider ϕ maximally desirable. Nonetheless one might find the preceding property counterintuitive. For this reason, I define the following concept of realistic goal, which does not satisfy the same property:

RGoal h ϕ def = Goal h ϕ ∧ Kϕ
This means an agent has a realistic goal that ϕ of strength h, denoted by RGoal h ϕ, if and only if the agent wants ϕ to be true with strength h and envisages at least one situation in which ϕ is true. Obviously if the agent does not envisage a situation in which ϕ is true then he does not have ϕ as a realistic goal. That is, for any h ∈ Num:

|= LGA K¬ϕ → ¬RGoal h ϕ (1.11)

The concept of goal: some remarks

In this work I assume that an agent's goal has two dimensions: (1) its content, and (2) its strength or value. Following Castelfranchi's theory of goals [START_REF] Castelfranchi | Mind as an anticipatory device: For a theory of expectations[END_REF][START_REF] Conte | Cognitive and social action[END_REF], with the term 'value of a goal' I mean the subjective importance of the goal for the agent strictly dependent on context conditions and mental attitudes. In the graded goal formula Goal h ϕ, ϕ is the goal content while h is the goal strength (or goal value).

Most appraisal models of emotions (see, e.g., [START_REF] Lazarus | Emotion and adaptation[END_REF][START_REF] Scherer | Appraisal considered as a process of multilevel sequential checking[END_REF]) assume that explicit evaluations based on evaluative beliefs (i.e., the belief that a certain event is desirable or undesirable, good or bad, pleasant or unpleasant) are a necessary constituent of emotional experience. Other appraisal models (see, e.g., [START_REF] Searle | Intentionality: An Essay in the Philosophy of Mind[END_REF][START_REF] Gordon | The structure of emotions[END_REF][START_REF] Green | The emotions[END_REF][START_REF] Castelfranchi | The cognitive-motivational compound of emotional experience[END_REF]) assume that emotions are triggering by specific combinations of beliefs and goals (or desires), and that the link between cognition and emotion is not necessarily mediated by evaluative beliefs. Reisenzein [START_REF] Reisenzein | Emotional experience in the computational belief-desire theory of emotion[END_REF] calls cognitiveevaluative the former and cognitive-motivational the latter kind of models. For example, according to cognitive-motivational models of emotions, a person's happiness about a certain fact ϕ can be reduced to the person's belief that ϕ obtains and the person's desire (or goal) that ϕ obtains. On the contrary, according to cognitive-evaluative models, a person feels happy about a certain fact ϕ if she believes that ϕ obtains and she evaluates ϕ to be desirable (or good) for her. A similar distinction has been discussed in philosophy on whether motivational mental states such as goals and desires are derived from and reduced to evaluative beliefs or, viceversa, whether evaluative beliefs are derived from goals or desires (i.e., are desires and goals more primitive than evaluative beliefs, or viceversa?) (see, e.g., [START_REF] Lewis | Desire as belief[END_REF][START_REF] Lewis | Desire as belief II[END_REF][START_REF] Bradley | Desire as belief revisited[END_REF]).

In the present work, I stay closer to cognitive-evaluative models. In fact, I reduce the notion of goal -involved in the appraisal configuration of a given emotion -to the agent's evaluation of the desirability (or goodness) of a given state of affairs. 5 That is, I assume that an agent has ϕ as a goal if and only if the situations envisaged by the agent in which ϕ is true are desirable for him. Consequently, I assume that an agent's positive/negative emotion requires the agent's evaluation of the desirability of a certain event, situation or object. One might argue that evaluative beliefs are not primitive mental states, but they are just derived from goals. That is, an agent evaluates a given situation or event to be desirable (or good) for him, because he believes that in this situation he will achieve his goals or because he believes that the event has positive implications on his goals. I here take a different point of view by assuming that evaluations and goals somehow coincide.

Formalization of expectation-based emotions and their intensity

The modal operators of graded belief and graded goal defined in Section 1.2.2 are used here to provide a logical analysis of expectation-based emotions such as hope and fear and of their intensities. An expectation-based emotion is an emotion that an agent experiences when having either a positive or a negative expectation about a certain fact ϕ, that is, when believing that ϕ is true with a certain strength but envisaging the possibility that ϕ could be false and either (1) having the goal that ϕ is true (positive expectation) or ( 2) having the goal that ϕ is false (negative expectation).

According to some psychological models [START_REF] Reisenzein | Emotional experience in the computational belief-desire theory of emotion[END_REF][START_REF] Reisenzein | Emotions as metarepresentational states of mind: naturalizing the belief-desire theory of emotion[END_REF][START_REF] Lazarus | Emotion and adaptation[END_REF][START_REF] Ortony | The cognitive structure of emotions[END_REF] and computational models [START_REF] Gratch | A domain independent framework for modeling emotion[END_REF][START_REF] El-Nasr | FLAME: Fuzzy logic adaptive model of emotions[END_REF] of emotions, the intensity of hope with respect to a given event is a monotonically increasing function of: the degree to which the event is desirable and the likelihood of the event. That is, the higher is the desirability of the event ϕ, and the higher is the intensity of the agent's hope that this event will occur; the higher is the likelihood of the event ϕ, and the higher is the intensity of the agent's hope that this event will occur. 6 Analogously, the intensity of fear with respect to a given event is a monotonically increasing function of: the degree to which the event is undesirable and the likelihood of the event. That is, the higher is the undesirability of the event ϕ, and the higher is the intensity of the agent's fear that this event will occur; the higher is the likelihood of the event ϕ, and the higher is the intensity of the agent's fear that this event will occur. There are several possible merging functions which satisfy these properties. For example, I could define the merging function merge for calculating emotion intensity as an average function, according to which the intensity of hope about a certain event ϕ is the average of the strength of the belief that ϕ will occur and the strength of the goal that ϕ will occur. That is, for every h, k ∈ Num representing respectively the strength of the belief and the strength of the goal, I could define merge(h,k) as 7 (1.12)

h+k 2 if h > 0 and h > 0 0 if h = 0 or h = 0
Another possibility is to define merge as a product function (also used in [START_REF] Gratch | A domain independent framework for modeling emotion[END_REF]), according to which the intensity of hope about a certain event ϕ is the product of the strength of the belief that ϕ will occur and the strength of the goal that ϕ will occur. That is, for every h, k ∈ Num I could define merge(h,k) as (1.13) h × k 6 According to Ortony et al. [START_REF] Ortony | The cognitive structure of emotions[END_REF] the intensity of hope and fear is determined by a third parameter: the (temporal and spatial) proximity to the expected event (the higher is the proximity to the expected event, and the higher is the intensity of hope/fear). This third dimension is not considered in the present analysis. 7 The second condition is necessary to ensure that intensity of emotion is equal to zero when one of the two parameters (belief strength or goal strength) is set to zero.

Here I do not choose a specific merging function, as such choice would require an experimental validation and would much depend on the domain of application in which the formal model has to be used.

Let me now define the notion of hope and fear with their corresponding intensities. As pointed out in the introduction of the paper, I only characterize the emotion's triggering conditions, that is, the agent's mental states (beliefs and goals) that are responsible for triggering the agent's emotional reaction and that 'cause' the agent to feel the emotion. I define

ISCALE = {x : there are h, k ∈ Num such that merge(h,k) = x}
to be the emotion intensity scale (i.e., the set of values over which the intensity of hope or fear can range).

An agent is experiencing a hope with with intensity x about ϕ if and only if there are h, k ∈ Num such that h < max, h is the strength to which the agent believes that ϕ is true, k is the strength to which the agent realistically wants ϕ to be true and x = merge(h,k). That is:

Hope x ϕ def = h,k∈Num:h<max and merge(h,k)=x (Bel h ϕ ∧ RGoal k ϕ)
The notion of fear can be defined in a similar way, after assuming that an event ϕ is undesirable for the agent if and only if the agent wants ϕ to be false. 8 An agent is experiencing a fear with with intensity x about ϕ if and only if there are h, k ∈ Num such that h < max, h is the strength to which the agent believes that ϕ is true, k is the strength to which the agent realistically wants ϕ to be false and x = merge(h,k). That is:

Fear x ϕ def = h,k∈Num:h<max and merge(h,k)=x (Bel h ϕ ∧ RGoal k ¬ϕ)
The reason why in the definitions of hope and fear I use the notion of realistic goal RGoal k instead of a simple goal Goal k is that I want to avoid that if an agent does not envisage a situation in which ϕ is true (i.e., K¬ϕ) then he necessarily feels fearful about ¬ϕ. 9Moreover, in the preceding definitions, the strength of the belief is supposed to be less than max in order distinguish emotions such as hope and fear implying some form of uncertainty from emotions such as happiness and sadness (or unhappiness) which are based on certainty. In order to experience hope (or fear) about ϕ, the agent should have a minimal degree of uncertainty that ϕ might be false (i.e., the agent should not know that ϕ is true). Indeed, from the previous definitions, it follows that:

|= LGA Hope x ϕ → ¬Certainϕ (1.14)

|=

LGA Fear x ϕ → ¬Certainϕ (1.15) This means that if an agent hopes (resp. fears) ϕ to be true, then he is not certain that ϕ (i.e., he does not have the strong belief that ϕ). For example, if I hope that my paper will be accepted for publication in a prestigious journal, then it means that I am not certain that my paper will be accepted. The preceding two validities are consistent with Spinoza's quote "Fear cannot be without hope nor hope without fear". Indeed, if an agent hopes that ϕ will be true then, according to the validity 1.14, he envisages the possibility that ϕ will be false. Therefore, he experiences some fear that ϕ will be false. Conversely, if an agent fears that ϕ will be true then, according to the validity 1.15, he envisages the possibility that ϕ will be false. Therefore, he experiences some hope that ϕ will be false.

Remark 1. It has to be noted that hope and fear, and more generally expectations, are not necessarily about a future state of affairs, but they can also be about a present state of affairs or a past state of affairs. For example, I might say 'I hope that you feel better now!' or 'I fear that you did not enjoy the party yesterday night!'.

On the contrary, to feel happy (resp. sad) about ϕ, the agent should be certain that ϕ is true. For example, if I am happy that my paper has been accepted for publication in a prestigious journal, then it means that I am certain that my paper has been accepted. More precisely, an agent is experiencing happiness with intensity h about ϕ if and only if, the agent strong believes (is certain) that ϕ is true and h is the strength to which the agent wants ϕ to be true. That is:

Happiness h ϕ def = Certainϕ ∧ RGoal h ϕ
Moreover, an agent is experiencing sadness with intensity h about ϕ if and only if, the agent strongly believes (is certain) that ϕ is true and h is the strength to which the agent wants ϕ to be false. That is:

Sadness h ϕ def = Certainϕ ∧ RGoal h ¬ϕ

Related works

Emotion is a very active field not only in psychology but also in AI. Several computational architectures of affective agents have been proposed in the last few years (see, e.g., [START_REF] Reilly | Building emotional agents[END_REF][START_REF] Elliot | The Affective reasoner: A process model for emotions in a multi-agent system[END_REF][START_REF] De Rosis | From Greta's mind to her face: modelling the dynamics of affective states in a conversational embodied agent[END_REF][START_REF] El-Nasr | FLAME: Fuzzy logic adaptive model of emotions[END_REF]). The cognitive architecture EMA (Emotion and Adaption) [START_REF] Gratch | A domain independent framework for modeling emotion[END_REF] is one of the best example of research in this area. EMA defines a domain independent taxonomy of appraisal variables stressing the many different relations between emotions and cognition, by enabling a wide range of internal appraisal and coping processes used for reinterpretation, shift of motivations, goal reconsideration etc. There are also several researchers who have developed formal languages for reasoning about emotions and for modelling affective agents. I discuss here some of the most important formal approaches to emotions and compare them with the approach presented in this paper.

One of the most prominent logical analysis of emotions is the one proposed by Meyer and coll. [START_REF] Ch | Reasoning about emotional agents[END_REF][START_REF] Steunebrink | A logic of emotions for intelligent agents[END_REF][START_REF] Turrini | Coping with shame and sense of guilt: a dynamic logic account[END_REF]. In order to formalize emotions, they exploit the logical framework KARO [START_REF] Ch | A logical approach to the dynamics of commitments[END_REF]: a framework based on a blend of dynamic logic with epistemic logic, enriched with modal operators for motivational attitudes such as desires and goals. In Meyer et al.'s approach each instance of emotion is represented with a special predicate, or fluent, in the jargon of reasoning about action and change, to indicate that these predicates change over time. For every fluent a set of effects of the corresponding emotions on the agent's planning strategies are specified, as well as the preconditions for triggering the emotion. The latter correspond to generation rules for emotions. For instance, in [START_REF] Ch | Reasoning about emotional agents[END_REF] generation rules for four basic emotions are given: joy, sadness, anger and fear, depending on the agent's plans. More recently [START_REF] Turrini | Coping with shame and sense of guilt: a dynamic logic account[END_REF], generation rules for social emotions such as guilt and shame have been proposed.

Contrarily to Meyer et al.'s approach, in the logic LGA there are no specific formal constructs, like special predicates or fluents, which are used to denote that a certain emotion arises at a certain time. I just define the appraisal pattern of a given emotion in terms of some cognitive constituents such as goal and knowledge. For instance, according to the definition of hope proposed in Section 1.3, an agent experiences hope about ϕ if and only if, he believes ϕ and he wants ϕ to be true with a certain strength. In other words, following the so-called appraisal theories in psychology, in this work I only consider the appraisal variables of emotion which can be defined through the basic concepts of a BDI logic (e.g., knowledge, belief, desire, goal).

In a more recent work [START_REF] Steunebrink | A formal model of emotions: integrating qualitative and quantitative aspects[END_REF] Meyer et al. have integrated quantitative aspects in their logical model of emotions. However, differently from the present approach, they do not study the variables determining intensities but instead focus on the integration of intensities into a qualitative model of emotions. For example, they propose a function describing how the intensity of an emotion decreases over time.

Lorini & Schwarzentruber [START_REF] Lorini | A logic for reasoning about counterfactual emotions[END_REF] have recently proposed a logical model of counterfactual emotions such regret and guilt, i.e., those emotions based on counterfactual thinking about agents' choices and actions. Adam et al. [START_REF] Adam | A logical formalization of the OCC theory of emotions[END_REF] have exploited a BDI logic in order to provide a logical formalization of the emotion types defined in Ortony, Clore and Collins's model (OCC model) [START_REF] Ortony | The cognitive structure of emotions[END_REF]. Similar to the approach presented in this paper, in Lorini & Schwarzentruber's approach and in Adam et al.'s approach emotion types are defined in terms of some primitive concepts (and corresponding modal operators) such as the concepts of belief, desire, action and responsibility which allow to capture the different appraisal variables of emotions. However, Lorini & Schwarzentruber's approach and Adam et al.'s approach are purely qualitative and do not consider emotion intensity.

Conclusion

The logical analysis of expectation-based emotions presented in this paper is obviously very simplistic. It misses a lot of important psychological aspects. For example, the fact that mental states on which emotions such as hope and fear are based are usually joined with bodily activation and components, and these components shape the whole subjective state of the agent and determine his action tendencies [START_REF] Frijda | The emotions[END_REF]. 10 I have only focused on the cognitive structure of emotions, without considering the felt aspect of emotions. This is of course a limitation of the model presented in this paper, as the intensity of emotion also depends on the presence of these somatic components (e.g., the intensity of fear is amplified by the fact that, when experiencing this emotion I feel my stomach contracted, my throat dry, etc.)

However, an analysis of the cognitive structure of emotions (i.e., identifying the mental states which determine a given type of emotion), as the one presented in this paper, is a necessary step for having an adequate understanding of affective phenomena. I postpone to future work a logical analysis of the basic relationships between emotion and action (i.e., how an emotion with a given intensity determines the agent's future reactions), 11 and of the relationships between cognitive structure and somatic aspects of emotions (i.e., how somatic components affect emotion intensity). 10 According to Frijda, actions tendencies are [18, pp. 75] "...states of readiness to achieve or maintain a given kind of relationship with the environment. They can be conceived of as plans or programs to achieve such ends, which are put in a state of readiness." For example, the action tendency associated to fear is escape. According to Lazarus [START_REF] Lazarus | Emotion and adaptation[END_REF], there is an important difference between action tendencies and coping strategies. While the former are innately programmed unconscious reflexes and routines, the latter are the product of a conscious deliberation process. 11 A first step in this direction has been taken in [START_REF] Dastani | A logic of emotions: from appraisal to coping[END_REF].

  where exc <k def = y∈Num:0≤y<k exc y and des <k def = y∈Num:0≤y<k des y for all k ∈ Num such that k ≥ 1, exc <0 def = ⊥ and des <0 def = ⊥.

The term 'goodness' is perhaps more convenient because one may ascribe to the terms 'desire' and 'desirability' a hedonistic connotation that I do not want to use here.

Similar operators for graded belief are studied in[3,

[START_REF] Van Ditmarsch | Prolegomena to dynamic logic for belief revision[END_REF]].[START_REF] Aumann | Interactive epistemology I: Knowledge[END_REF] See also[START_REF] Godo | A graded BDI agent model to represent and reason about preferences[END_REF] for a recent application of the operator ∆ to modeling desires.

Note that, in most cases, the assessment of the desirability of ϕ has a somatic component, that is, the agent considers ϕ desirable because while thinking and imagining a situation in which ϕ holds, the agent has a positive feeling or sensation.

I am aware that this is a simplifying assumption, as the undesirability of an event ϕ does not always coincide with the desirability of its negation. For example, an agent might desire 'to gain 100 e', even though 'not gaining 100 e' is not undesirable for him (the agent is simply indifferent about this result).

In fact, K¬ϕ implies both Goal max ϕ (see the equation 1.10 in Section 1.2.4.) and Bel¬ϕ. Therefore, if I had used Goal k in the preceding definition of fear, K¬ϕ would have implied Fear x ¬ϕ for some number x ∈ ISCALE which is counterintuitive.


Mehdi Dastani

Emiliano Lorini
email: lorini@irit.fr

A logic of emotions: from appraisal to coping

Keywords:

Emotion is a cognitive mechanism that directs an agent's thoughts and attention to what is relevant, important, and significant. Such a mechanism is crucial for the design of resource-bounded agents that must operate in highly-dynamic, semi-predictable environments and which need mechanisms for allocating their computational resources efficiently. The aim of this work is to propose a logical analysis of emotions and their influences on an agent's behavior. We focus on four emotion types (viz., hope, fear, joy, and distress) and provide their logical characterizations in a modal logic framework. As the intensity of emotion is essential for its influence on an agent's behavior, the logic is devised to represent and reason about graded beliefs, graded goals and intentions. The belief strength and the goal strength determine the intensity of emotions. Emotions trigger different types of coping strategy which are aimed at dealing with emotions either by forming or revising an intention to act in the world, or by changing the agent's interpretation of the situation (by changing beliefs or goals).

INTRODUCTION

Autonomous software agents are assumed to have different (possibly conflicting) objectives, able to sense their environments, update their states accordingly, and decide which actions to perform at any moment in time. The behavior of such software agents can be effective and practical only if they are able to continuously and adequately assess their (sensed) situation and update their states with relevant information and crucial objectives. For example, a robot with a plan to transport a container to its target position may perceive it has low battery charge. The robot may assess the state of its battery charge as being relevant for the objective of having the container at its target position, and update its state by suspending the current battery-demanding transport plan. Such assessment and update may cause the agent to decide to charge its battery right away or to focus on a less battery-demanding task.

Emotion is a (cognitive) mechanism that directs one's thoughts and attention to what is relevant, important, and significant in order to ensure effective behavior. The aim of this work is to propose a logical analysis of the relationships between emotion and cognition. An understanding of these relationships is particularly important in the perspective of the design of resource-bounded agents that must survive in highly-dynamic, semi-predictable environments and which need mechanisms for allocating their computational resources efficiently. Indeed, as it has been stressed by several authors in psychology and economics, emotions provide heuristics for preventing excessive evaluation and deliberation by pruning of search spaces [START_REF] Damasio | Descartes' Error: Emotion, Reason, and the Human Brain[END_REF] and for interrupting normal cognition when unattended goals require servicing [START_REF] Simon | Motivational and emotional controls of cognition[END_REF], and signals for belief revision [START_REF] Meyer | Towards a process analysis of emotions: The case of surprise[END_REF].

Our approach is inspired by the appraisal and coping models of human emotions [START_REF] Ortony | The cognitive structure of emotions[END_REF][START_REF] Lazarus | Emotion and adaptation[END_REF][START_REF] Frijda | The Emotions[END_REF]. According to these models, an agent continuously appraises its situation (e.g., low battery charge endangers the objective of having a container at its target position) after which emotions can be triggered (e.g., fear of failing to place the container at its target position). The triggered emotions can affect the agent's behavior depending on their intensities. There are often a set of strategies that can be used to cope with a specific emotion, for example, by updating the agent's mental state (e.g., being fearful that the transportation plan will not place the container at its target position leads the agent to reconsider its plan).

We first propose, in Section 2, a dynamic logic with special operators which allow to represent the intentions of a cognitive agent as well as its beliefs and goals with their corresponding strengths. Then, in Section 3, we provide a logical analysis of the intensity of different emotions such as hope, fear, joy and distress. In Section 4, we extend the logic with special operators to formally characterize different kinds of coping strategies which are aimed at dealing with emotions either by forming or revising an intention to act in the world, or by changing the agent's interpretation of the situation (by changing belief strength or goal strength). A complete axiomatization and a decidability result for the logic are given in Section 5. Related works are discussed in Section 6.

LOGICAL FRAMEWORK

This section presents the syntax and the semantics of the logic DL-GA (Dynamic Logic of Graded Attitudes). This logic is designed to represent beliefs, goals, and intentions, where beliefs and goals have degree of plausibility and desirability, respectively.

Syntax

Assume a finite set of atomic propositions describing facts Atm = {p, q, . . .}, a finite set of physical actions (i.e., actions modifying the physical world) PAct = {a, b, . . .}, a finite set of natural numbers Num = {x ∈ N : 0 ≤ x ≤ max}, with max ∈ N \ {0}. We note Num -= {-x : x ∈ Num \ {0}} the corresponding set of negative integers. We note Lit the set of literals and l, l , . . . the elements of Lit. Finally, we define the set of propositional formulas Prop to be the set of all Boolean combinations of atomic propositions.

The language L of DL-GA is defined by the following grammar in Backus-Naur Form (BNF):

Act : α a | * ϕ Fml : ϕ p | exc h | Des k l | Int a | ¬ϕ | ϕ ∧ ϕ | Kϕ | [α]ϕ
where p ranges over Atm, h ranges over Num, l ranges over Lit, k ranges over Num ∪ Num -, and a ranges over PAct. The other Boolean constructions , ⊥, ∨, → and ↔ are defined in the standard way.

The set of actions Act includes both physical actions and sensing actions of the form * ϕ. A sensing action is an action which consists in modifying the agent's beliefs in the light of a new incoming evidence. In particular, * ϕ is the mental action (or process) of learning that ϕ is true. As we will show in Section 2.3, technically this amounts to an operation of belief conditioning in Spohn's sense [START_REF] Spohn | Ordinal conditional functions: a dynamic theory of epistemic states[END_REF].

The set of formulas Fml contains special constructions exc h , Des k l and Int a which are used to represent the agent's mental state. Formulas exc h are used to identify the degree of plausibility of a given world for the agent. We here use the notion of plausibility first introduced by Spohn [START_REF] Spohn | Ordinal conditional functions: a dynamic theory of epistemic states[END_REF]. Following Spohn's theory, the worlds that are assigned the smallest numbers are the most plausible, according to the beliefs of the individual. That is, the number h assigned to a given world rather captures the degree of exceptionality of this world, where the exceptionality degree of a world is nothing but the opposite of its plausibility degree (i.e., the exceptionality degree of a world decreases when its plausibility degree increases). Therefore, formula exc h can be read alternatively as "the current world has a degree of exceptionality h" or "the current world has a degree of plausibility maxh".

Formula Des k l has to be read "the state of affairs l has a degree of desirability k for the agent". Degree of desirability can be positive, negative or equal to zero. 1 Suppose k > 0. Then Des k l means that "the agent wishes to achieve l with strength k", whereas Des -k l means that "the agent wishes to avoid l with strength k". Des 0 l means that "the agent is indifferent about l" (i.e., the agent does not care whether l is true or false). For notational convenience, in what follows we will use the following abbreviations:

AchG k l def = Des k l for k > 0 AvdG k l def = Des -k l for k > 0
where AchG andAvdG respectively stand for achievement goal and avoidance goal.

Formulas Int a capture the agent's intentions. We assume that the agent's intentions are only about physical actions and not about sensing actions. The formula Int a has to be read "the agent has the intention to perform the physical action a" or "the agent is committed to perform the physical action a".

The logic DL-GA has also epistemic operators and modal operators that are used to describe the effects of a given action α.

The formula [α]ϕ has to be read "after the occurrence of the action α, ϕ will be true". Kϕ has to be read "the agent knows that ϕ is true". This concept of knowledge is the standard S5-notion, partition-based and fully introspective, that is commonly used in computer science and economics [START_REF] Fagin | Reasoning about Knowledge[END_REF]. The operator K is the dual of K, that is, Kϕ def = ¬K¬ϕ. As we will show in the Section 2.5, the 1 However, we assume that exceptionality/plausibility and positive desirability are measured on the same scale Num.

operator K captures a form of 'absolutely unrevisable belief', that is, a form of belief which is stable under belief revision with any new evidence.

Physical action description

Similarly to Situation Calculus [START_REF] Reiter | Knowledge in action: logical foundations for specifying and implementing dynamical systems[END_REF], in our framework physical actions are described in terms of their executability preconditions and of their positive and negative effect preconditions. In particular, we define a function Pre : PAct -→ Prop to map physical actions to their executability preconditions. Using the notion of executability precondition, we define special dynamic operators for physical actions of the form a , where a ϕ has to be read " the physical action a is executable and, ϕ will be true afterwards":

a ϕ def = Pre(a) ∧ [a]ϕ
Moreover, we introduce two functions γ + : PAct × Atm -→ Prop γ -: PAct × Atm -→ Prop mapping physical actions and atomic propositions to propositional formulas. The formula γ + (a, p) describes the positive effect preconditions of action a with respect to p, whereas γ -(a, p) describes the negative effect preconditions of action a with respect to p. The former represent the necessary and sufficient conditions for ensuring that p will be true after the occurrence of the physical action a, while the latter represent the necessary and sufficient conditions for ensuring that p will be false after the occurrence of the physical action a. We make the following coherence assumption:

(COH γ ) for every a ∈ PAct and p ∈ Atm, γ + (a, p) and γ -(a, p) must be logically inconsistent.

COH γ ensures that actions do not have contradictory effects.

Models and truth conditions

The semantics of the logic DL-GA is a possible world semantics with special functions for exceptionality, desirability and intentions.

Definition 1 (Model). DL-GA models are tuples M = W, ∼ , κ exc , D, I, V where:

• W is a nonempty set of possible worlds or states;

• ∼ is an equivalence relation between worlds in W;

• κ exc : W -→ Num is a total function from the set of possible worlds to the set of natural numbers Num;

• D : W × Lit -→ Num ∪ Num -is a total function from the set of possible worlds to the set of integers Num ∪ Num -;

• I : W -→ 2 PAct is a total function called commitment function, mapping worlds to sets of physical actions;

• V : W -→ 2 Atm is a valuation function.
As usual, p ∈ V(w) means that proposition p is true at world w. The equivalence relation ∼, which is used to interpret the epistemic operator K, can be viewed as a function from W to 2 W . Therefore, we can write ∼ (w) = {v ∈ W : w ∼ v}. The set ∼ (w) is the agent's information state at world w: the set of worlds that the agent imagines at world w. As ∼ is an equivalence relation, if w ∼ v then the agent has the same information state at w and v (i.e., the agent imagines the same worlds at w and v).

The function κ exc represents a plausibility grading of the possible worlds and is used to interpret the atomic formulas exc h . κ exc (w) = h means that, according to the agent the world w has a degree of exceptionality h or, alternatively, according to the agent the world w has a degree of plausibility maxh. (Remember that the degree of plausibility of a world is the opposite of its exceptionality degree). The function κ exc allows to model the notion of belief: among the worlds the agent cannot distinguish from a given world w (i.e., the agent's information state at w), there are worlds that the agent considers more plausible than others. For example, suppose that ∼(w) = {w, v, u}, κ exc (w) = 2, κ exc (u) = 1 and κ exc (v) = 0. This means that {w, v, u} is the set of worlds that the agent imagines at world w. Moreover, according to the agent, the world v is strictly more plausible than the world u and the world u is strictly more plausible than the world w (as max -0 > max -1 > max -2).

DL-GA models are supposed to satisfy the following normality constraint for the plausibility grading to ensure that the agent's beliefs are consistent:

(Norm κexc ) for every w ∈ W, there is v such that w ∼ v and κ exc (v) = 0.
The function D is used to interpret the atomic formulas Des k l. Suppose k > 0. Then, D(w, l) = k means that, at world w, l has a degree of desirability k; whereas D(w, l) = -k means that, at world w, l has a degree of desirability -k -or equivalently, l has a degree of undesirability k -. D(w, l) = 0 means that the agent is indifferent about l.

The function I is used to interpret the atomic formulas Int a . For every world w ∈ W, I(w) identifies the set of physical actions that the agent intends to perform. I(w) = ∅ means that the agent has no intention.

Note that in our dynamic setting an agent may be committed to perform an action even though it believes that this is a suboptimal choice, i.e., we do not require agents to have intentions because of their desirable consequences. An agent may have an intention without desiring its consequence because, for example, its beliefs and desires may change due to a sensing action. In our running example, the robot may have the intention to transport a container to a given target position, while it believes that this is a suboptimal choice as it has just learnt that it does not have sufficient battery power to accomplish the task. Definition 2 (Truth conditions). Given a DL-GA model M, a world w and a formula ϕ, M, w | = ϕ means that ϕ is true at world w in M. The rules defining the truth conditions of formulas are:

• M, w | = p iff p ∈ V(w) • M, w | = exc h iff κ exc (w) = h • M, w | = Des k l iff D(w, l) = k • M, w | = Int a iff a ∈ I(w) • M, w | = ¬ϕ iff not M, w | = ϕ • M, w | = ϕ ∧ ψ iff M, w | = ϕ and M, w | = ψ • M, w | = Kϕ iff M, v | = ϕ for all v such that w ∼ v • M, w | = [α]ψ iff M α , w | = ψ
where model M α is defined according to Definitions 3 and 5 below.

Definition 3 (Update via physical action). Given a DL-GA model M = W, ∼, κ exc , D, I, V , The update of M by a is defined as M a = W, ∼, κ exc , D, I a , V a where for all w ∈ W:

I a (w) = I(w) \ {a} V a (w) = (V(w) ∪ {p : M, w | = γ + (a, p)})\ {p : M, w | = γ -(a, p)}
The performance of a physical action a makes the commitment function I to remove a from the set of intentions. That is, if an agent intends to perform the physical action a, then after the performance of a the agent does not intend to perform a anymore. Of course, the agent may adopt intention a again by, for example, performing an intention update operation (see Section 4.1). Physical actions modify the physical facts via the positive effect preconditions and the negative effect preconditions, defined in Section 2.2.

In particular, if the positive effect preconditions of action a with respect to p holds, then p will be true after the occurrence of a; if the negative effect preconditions of action a with respect to p holds, then p will be false after the occurrence of a. 2A sensing action updates the agent's information state by modifying the exceptionality degree of the worlds that the agent can imagine. Before defining such a model update, we follow [START_REF] Spohn | Ordinal conditional functions: a dynamic theory of epistemic states[END_REF] and lift the exceptionality of a possible world to the exceptionality of a formula viewed as a set of worlds. Definition 4 (Exceptionality degree of a formula). Let ||ϕ|| w = {v ∈ W : M, v | = ϕ and w ∼ v}. The exceptionality degree of a formula ϕ at world w, noted κ w exc (ϕ), is defined as follows:

κ w exc (ϕ) =          min v∈||ϕ||w κ exc (v) if ||ϕ|| w ∅ max if ||ϕ|| w = ∅
As expected, the plausibility degree of a formula ϕ, noted κ w plaus (ϕ), is defined as max -κ w exc (ϕ).

Definition 5 (Update via sensing action). Given a DL-GA model M = W, ∼, κ exc , D, I, V . The update of M by the sensing action * ϕ is defined as M * ϕ = W, ∼, κ * ϕ exc , D, I, V such that for all w:

κ * ϕ exc (w) =            κ exc (w) -κ w exc (ϕ) if M, w | = ϕ Cut B (κ exc (w) + δ) if M, w | = ¬ϕ ∧ Kϕ κ exc (w) if M, w | = K¬ϕ where δ ∈ Num \ {0} and Cut B (x) =            x if 0 ≤ x ≤ max max if x > max 0 if x < 0
The action of sensing that ϕ is true modifies the agent's beliefs as follows.

1. For every world w in which ϕ is true, the degree of exceptionality of w decreases from κ exc (w) to κ exc (w) -κ w exc (ϕ), which is the same thing as saying that, degree of plausibility of w increases from max -κ exc (w) to max -(κ exc (w) -κ w exc (ϕ)). 2. For every world w in which ϕ is false:

(a) if at w the agent can imagine a world in which ϕ is true, i.e. Kϕ, then the degree of exceptionality of w increases from κ exc (w) to Cut max (κ exc (w) + δ), which is the same thing as saying that, the degree of plausibility of w decreases from max-κ exc (w) to max-Cut max (κ exc (w)+δ);

(b) if at w the agent cannot imagine a world in which ϕ is true, i.e. K¬ϕ, then the degree of exceptionality of w does not change.

The condition 2(b) ensures that the agent's plausibility ordering over worlds does not change, if the agent learns something that he cannot imagine. 3 Cut B is a minor technical device, taken from [START_REF] Aucher | A combined system for update logic and belief revision[END_REF], which ensures that the new plausibility assignment fits into the finite set of natural numbers Num. The parameter δ is a conservativeness index which captures the agent's disposition (or personality trait) to radically change its beliefs in the light of a new evidence. More precisely, the higher is the index δ, and the higher is the agent's disposition to decrease the plausibility degree of those worlds in which the learnt fact ϕ is false. (When δ = max, the agent is minimally conservative). We assume that δ is different from 0 in order to ensure that, after learning that p is true, the agent will believe p for every proposition p ∈ Atm (see validity (5) in Section 2.5 below).

In the sequel we write | = DL-GA ϕ to mean that ϕ is valid in DL-GA (ϕ is true in all DL-GA models).

Definition of graded belief

Following [START_REF] Spohn | Ordinal conditional functions: a dynamic theory of epistemic states[END_REF], we define the concept of belief as a formula which is true in all worlds that are maximally plausible (or minimally exceptional). Definition 6 (Belief, Bϕ). In model M at world w the agent believes that ϕ is true, i.e., M, w | = Bϕ, if and only if, for every v such that w

∼ v, if κ exc (v) = 0 then M, v | = ϕ.
The following concept of graded belief is taken from [START_REF] Laverny | From knowledge-based programs to graded belief-based programs, part II: off-line reasoning[END_REF]: the strength of the belief that ϕ is equal to the exceptionality degree of ¬ϕ.

Definition 7 (Graded belief, B ≥h ϕ). For all h ≥ 1, in model M at world w the agent believes that ϕ with strength at least h, i.e. M, w | = B ≥h ϕ, if and only if, κ w exc (¬ϕ) ≥ h.

An agent has the strong belief that ϕ if and only if, it believes that ϕ is true with maximal strength max.

Definition 8 (Strong belief, SBϕ). In model M at world w the agent strongly believes that ϕ (or at w the agent is certain that ϕ is true), i.e., M, w | = SBϕ, if and only if κ w exc (¬ϕ) = max.

As the following proposition highlights, the concepts of belief, graded belief and strong belief semantically defined in Definitions 6-8 are all syntactically expressible in the logic DL-GA. Proposition 1. For every DL-GA model M, world w and h ∈ Num such that h ≥ 1:

1. M, w | = Bϕ iff M, w | = K(exc 0 → ϕ) 2. M, w | = B ≥h ϕ iff M, w | = K(exc ≤h-1 → ϕ) 3. M, w | = SBϕ iff M, w | = K(exc ≤max-1 → ϕ)
where exc ≤k def = 0≤l≤k exc l for all k ∈ Num.

We define the dual operators in the usual way:

Bϕ def = ¬B¬ϕ,
B ≥h ϕ def = ¬B ≥h ¬ϕ and SBϕ def = ¬SB¬ϕ. We assume that "the agent believes that ϕ exactly with strength h", i.e. B h ϕ, if and only if the agent believes that ϕ with strength at least h and it is not the case that the agent believes that ϕ with strength at least h+1. That is, we define:

B h ϕ def = B ≥h ϕ ∧ ¬B ≥h+1 ϕ if 1 ≤ h < max, and
B max ϕ def = B ≥max ϕ 2.

Some properties of epistemic attitudes

The following validities highlight some interesting properties of beliefs. For every h, k ∈ Num such that h ≥ 1 and k ≥ 1 we have:

| = DL-GA Kϕ → B ≥h ϕ (1)
| = DL-GA Bϕ ↔ B ≥1 ϕ (2) | = DL-GA SBϕ ↔ B ≥max ϕ (3) | = DL-GA ¬(Bϕ ∧ B¬ϕ) (4)
| = DL-GA Kϕ → [ * ϕ]Bϕ if ϕ ∈ Prop (5)
| = DL-GA (B ≥h ϕ ∧ B ≥k ψ) → B ≥min{h,k} (ϕ ∧ ψ) (6)
| = DL-GA (B ≥h ϕ ∧ B ≥k ψ) → B ≥max{h,k} (ϕ ∨ ψ) (7)
According to the validity (1), knowing that ϕ implies believing that ϕ with strength at least h. According to the validity (2), belief is graded belief with strength at least 1. According to the validity (3), the agent has the strong belief that ϕ if and only if, it believes that ϕ with maximal strength max. According to the validity (4) (which follows from the normality constraint NORM κexc in Section 2.3), an agent cannot have inconsistent beliefs. The validity (5) highlights a basic property of belief revision in the sense of AGM theory [START_REF] Alchourrón | On the logic of theory change: partial meet contraction and revision functions[END_REF]: if ϕ is an objective fact and the agent can imagine a world in which ϕ is true then, after learning that ϕ is true, the agent believes that ϕ. 4 According to the validities ( 6) and ( 7), if the agent believes that ϕ with strength at least h and believes that ψ with strength at least k, then the strength of the belief that ϕ ∧ ψ is at least min{h, k}; if the agent believes that ϕ with strength at least h and believes that ψ with strength at least k, then it believes ϕ ∨ ψ with strength at least max{h, k}. Similar properties for graded belief are given in possibility theory [START_REF] Dubois | Possibility theory: an approach to computerized processing of uncertainty[END_REF].

EMOTIONS AND THEIR INTENSITY

We use the modal operators of graded belief and graded goal of the logic DL-GA to provide a logical analysis of emotions such as hope, fear, joy and distress with their intensities.

According to some psychological models [START_REF] Reisenzein | Emotions as metarepresentational states of mind: naturalizing the belief-desire theory of emotion[END_REF][START_REF] Lazarus | Emotion and adaptation[END_REF][START_REF] Ortony | The cognitive structure of emotions[END_REF] and computational models [START_REF] Gratch | A domain independent framework for modeling emotion[END_REF][START_REF] Bosse | There's always hope: Enhancing agent believability through expectation-based emotions[END_REF] of emotions, the intensity of hope with respect to a given event is a monotonically increasing function of the degree to which the event is desirable and the likelihood of the event. That is, the higher is the desirability of the event, and the higher is the intensity of the agent's hope that this event will occur; the higher is the likelihood of the event, and the higher is the intensity of the agent's hope that this event will occur. Analogously, the intensity of fear with respect to a given event is a monotonically increasing function of the degree to which the event is undesirable and the likelihood of the event. There are several possible merging functions which satisfy these properties. For example, we could define the merging function merge as an average function, according to which the intensity of hope about a certain event is the average of the strength of the belief that the event will occur and the strength of the goal that it will occur. That is, for every h, k ∈ Num representing respectively the strength of the belief and the strength of the goal, we could define merge(h,k) as h+k 2 . Another possibility is to define merge as a product function (also used in [START_REF] Gratch | A domain independent framework for modeling emotion[END_REF][START_REF] Reisenzein | Emotions as metarepresentational states of mind: naturalizing the belief-desire theory of emotion[END_REF]), according to which the intensity of hope about a certain event is the product of the strength of the belief that the event will occur and the strength of the goal that it will occur. Here we do not choose a specific merging function, as this would much depend on the domain of application in which the formal model has to be used.

The emotion intensity scale is defined by the following set:

EmoInt = {y : there are x 1 , x 2 ∈ Num such that merge(x 1 ,x 2 ) = y}
As Num is finite, EmoInt is finite too. Let us define the notions of hope and fear with their corresponding intensities. We say that the agent hopes with intensity i that its current intention to perform the action a will lead to the desirable consequence l if and only if, there are h, k ∈ Num \ {0} such that merge(h,k) = i and h < max and: (1) the agent believes with strength h that the physical action a is executable and l will be true afterwards, (2) the agent wishes to achieve l with strength k, (3) the agent intends to perform the physical action a. Formally:

Hope i (a, l) def =
h,k∈Num\{0}:h<max and merge(h,k)=i (B h a l∧ AchG k l ∧ Int a ) We say that the agent fears with intensity i that its current intention to perform the action a will lead to the undesirable consequence l if and only if, there are h, k ∈ Num \ {0} such that merge(h,k) = i and h < max and: (1) the agent believes with strength h that the action a is executable and l will be true afterwards, (2) the agent wishes to avoid l with strength k, (3) the agent intends to perform the action a. Formally:

Fear i (a, l) def = h,k∈Num\{0}:h<max and merge(h,k)=i (B h a l∧ AvdG k l ∧ Int a )
In the preceding definitions of hope and fear, the strength of the belief is supposed to be less than max in order to distinguish hope and fear, which imply some form of uncertainty, from happiness and distress which are based on certainty. Indeed, we have that:

| = DL-GA Hope i (a, l) → ¬SB a l (8)
| = DL-GA Fear i (a, l) → ¬SB a l (9)
This means that if an agent hopes/fears that its intention to perform the action a will lead to the desirable/undesirable result l, then it is not certain about that. For example, if our robot hopes to place a container at a given target position by its transport plan, then the robot is not certain that the container will be at the target position after performing the transport plan. On the contrary, to be joyful/distressed that its current intention to perform the action a will lead to the desirable/undesirable consequence l, the agent should be certain that its intention to perform the action a will lead to the desirable/undesirable consequence l. This is consistent with OCC psychological model of emotions [START_REF] Ortony | The cognitive structure of emotions[END_REF] according to which, while joy and distress are triggered by actual consequences, hope and fear are triggered by prospective consequences (or prospects).

Like [START_REF] Gratch | A domain independent framework for modeling emotion[END_REF], we here interpret the term 'prospect' as synonymous of 'uncertain consequence' (in contrast with 'actual consequence' as synonymous of 'certain consequence'). The following are our definitions of joy and distress about actions:

Joy i (a, l) def = k∈Num\{0}:merge(max,k)=i (SB a l∧ AchG k l ∧ Int a ) Distress i (a, l) def = k∈Num\{0}:merge(max,k)=i (SB a l∧ AvdG k l ∧ Int a )
where Joy i (a, l) and Distress i (a, l) respectively mean that "the agent is joyful that its current intention to perform the action a will lead to the desirable consequence l" and "the agent is distressed that its current intention to perform the action a will lead to the undesirable consequence l". Note that, when computing the intensity of joy and distress, the belief parameter in the merging function merge is set to max because strong belief is equivalent to graded belief with maximal strength (validity (3) in Section 2.5).

We here distinguish distress from sadness by adding a condition to the definition of distress: the appraisal variable called controllability or control potential [START_REF] Roseman | Appraisal determinants of emotions: constructing a more accurate and comprehensive theory[END_REF]. That is, to be sad that its current intention to perform the action a will lead to the undesirable result l, the agent should be certain that it has no control over the undesirable result l, in the sense that the agent cannot prevent l to be true -which is the same thing as saying that l will be true after every executable action of the agent -.

Sadness i (a, l) def = Distress i (a, l) ∧ SB¬Control l with Control ϕ def = b∈PAct b ¬ϕ
where Control ϕ means "the agent has control over ϕ" (or "the agent can prevent ϕ to be true"). Our definition is consistent with some psychological theories [START_REF] Roseman | Appraisal determinants of emotions: constructing a more accurate and comprehensive theory[END_REF][START_REF] Lazarus | Emotion and adaptation[END_REF] according to which, undesirable states of affairs that not be controlled makes one to be sad.

Example 1. Consider again our robot which can decide to transport either container number 1 or container number 2 to a given target position. The former task is more demanding than the latter task, as container number 1 is much heavier than container number 2. In particular, the former task requires at least a full battery charge, whereas the latter requires at least a half battery charge. This means that the action of transporting container number 1 (transport 1 ) and the action of transporting container number 2 (transport 2 ) have the following positive effect preconditions with respect to the objective of placing a container at the target position (pos): γ + (transport 1 , pos) = f ullCharge, γ + (transport 2 , pos) = f ullCharge ∨ hal f Charge. Let us assume that the two actions are always executable: Pre(tranport 1 ) = Pre(tranport 2 ) = .

Suppose that at the state w the robot intends to transport container number 1 to the target position and considers undesirable with degree k not to have any container at the target position, i.e., M, w | = AvdG k ¬pos ∧ Int transport 1 Moreover, suppose that the robot is certain that in the current situation there is no container at the target position, i.e., M, w | = SB¬pos Finally, suppose that the robot is minimally conservative in revising its beliefs, that is, δ = max.

The robot observes its battery load and realizes that it does not have a full battery charge but only a half battery charge. After the observation the robot will strongly believe that, if it follows its intention, it will not place any container at the target position, i.e., M * hal f Charge∧¬ f ullCharge , w | = SB transport 1 ¬pos It should be noted that the new model M * hal f Charge∧¬ f ullCharge is exactly the same as M except for the plausibility value κ exc . This implies that we have, M * hal f Charge∧¬ f ullCharge , w | = AvdG k ¬pos∧ Int transport 1 ∧ SB transport 1 ¬pos and therefore for merge(max,k) = i we have M * hal f Charge∧¬ f ullCharge , w | = Distress i (transport 1 , ¬pos) This means that, after having observed that it only has a half battery charge, the robot is distressed with intensity i that, if it follows its current intention, then it will not succeed in placing a container at the target position.

FROM APPRAISAL TO COPING

In the previous section, we have characterized emotions in terms of beliefs, (achievement and avoidance) goals, and intentions, and formalized their intensities in terms of belief strength and goal strength. Emotions with high intensity influence the agent's behavior in order to cope with relevant and significant events. In general, coping can be seen as a cognitive mechanism whose aim is to discharge a certain emotion by modifying one or more of the mental attitudes (e.g., beliefs, goals, intentions) that triggered the emotion [START_REF] Lazarus | Emotion and adaptation[END_REF]. For example, our robot can cope with its distress that if it follows its current intention then it will not succeed in placing a container at the target position, by reconsidering its current intention. The coping mechanism determines various types of responses, also called coping strategies. We here consider three types of coping strategies: coping strategies affecting intentions, coping strategies affecting beliefs and coping strategies affecting goals. More precisely, we consider coping strategies which deal with emotion either by forming or revising an intention to act in the world, or by changing the agent's interpretation of the situation (by changing belief strength or goal strength).

Coping strategies: syntax and semantics

We extend the logic DL-GA with three different kinds of coping strategies: (1) coping strategies affecting beliefs of the form ϕ ↑ B and ϕ↓ B , (2) coping strategies affecting goals of the form l↑ D and l ↓ D , and (3) coping strategies affecting intentions of the form -a and +a. We call DL-GA + the resulting logic. ϕ↑ B consists in increasing the strength of the belief that ϕ is true, while ϕ↓ B consists in reducing the strength of the belief that ϕ is true. l↑ D consists in increasing the desirability of l, while l↓ D consists in reducing the desirability of l. Finally, -a consists in removing the intention Int a , while +a consists in generating the intention Int a .

The set of coping strategies is defined by the following grammar:

CStr : β ϕ↑ B | ϕ↓ B | l↑ D | l↓ D | -a | +a
where ϕ ranges over Fml, l ranges over Lit, and a ranges over PAct.

For every coping strategy β we introduce a corresponding dynamic operator [β], where [β]ψ has to be read "after the occurrence of β, ψ will be true". As expected, the truth conditions of the new operators are given in terms of model transformation. For every β ∈ CStr we define:

M, w | = [β]ψ iff M β , w | = ψ
The model M β is defined according to the Definitions 9-11 below.

Coping strategies affecting the strength of the belief that ϕ either increase or decrease the exceptionality of the worlds in which ϕ is false with ω unit, only if the agent believes that ϕ, i.e. Bϕ. If the agent does not believe that ϕ, i.e. ¬Bϕ, they do not have any effect on the agent's mental state. In fact, we assume that coping strategies can only operate on existing beliefs of the agent by either increasing or decreasing their strengths. ω is a parameter which captures the agent's disposition (or personality trait) to radically change its mental state when coping with emotions (the higher is ω, and the higher is the agent's disposition to change its mental state when coping with emotions).

Definition 9 (Update via coping strategy on beliefs). Given a DL-GA model M and β ∈ {ϕ↑ B , ϕ↓ B }, the updated model M β is defined as M β = W, ∼, κ β exc , D, I, V where for all w:

κ β exc (w) =                        κ exc (w) if M, w | = ϕ Cut B (κ exc (w) + ω) if M, w | = ¬ϕ ∧ Bϕ and β = ϕ↑ B κ exc (w) if M, w | = ¬ϕ ∧ ¬Bϕ and β = ϕ↑ B Cut B (κ exc (w) -ω) if M, w | = ¬ϕ ∧ Bϕ and β = ϕ↓ B κ exc (w) if M, w | = ¬ϕ ∧ ¬Bϕ and β = ϕ↓ B
ω ∈ Num \ {0} and Cut B has been defined in Definition 5.

Coping strategies affecting desirability of l either increase or decrease the desirability of l with ω unit.

Definition 10 (Update via coping strategy on goals). Given a DL-GA model M and β ∈ {l↑ D , l↓ D }, the updated model M β is defined as M β = W, ∼, κ exc , D β , I, V where for all w:

D β (w, l ) =            Cut D (D(w, l ) + ω) if β = l↑ D and l = l Cut D (D(w, l ) -ω) if β = l↓ D and l = l D(w, l ) if l l ω ∈ Num \ {0} and: Cut D (y) =            y if -max ≤ y ≤ max max if y > max -max if y < -max
Cut D ensures that the new desirability degree of a literal fits into the finite set of integers Num ∪ Num -.

Finally, coping strategies affecting intentions change the commitment function by either adding or removing an intention.

Definition 11 (Update via coping strategy on intentions). Given a DL-GA model M and β ∈ {-a, +a}, the updated model M β is defined as M β = W, ∼, κ exc , D, I β , C, V where for all w:

I β (w) =        I(w) \ {a} if β = -a I(w) ∪ {a} if β = +a
The following validities capture some expected properties of coping strategies affecting beliefs and goals. If h ≥ 1 then:

| = DL-GA + B ≥h ϕ → [ϕ↑ B ]B ≥Cut B (h+ω) ϕ (10)
| = DL-GA + B ≥h ϕ → [ϕ↓ B ]B ≥Cut B (h-ω) ϕ if Cut B (h -ω) > 0 (11)
| = DL-GA + B ≥h ϕ → [ϕ↓ B ]¬Bϕ if Cut B (h -ω) = 0 (12)
| = DL-GA + Des h l → [ϕ↑ D ]Des Cut D (h+ω) l (13)
| = DL-GA + Des h l → [ϕ↓ D ]Des Cut D (h-ω) l (14)

Triggering conditions of coping strategies

In our model coping strategies have triggering conditions which are captured by the function Trg : CStr -→ Fml mapping coping strategies to DL-GA-formulas. For every coping strategy β, Trg(β) captures the conditions under which the coping strategy β is possibly triggered. Following current psychological and computational models of emotions [START_REF] Lazarus | Emotion and adaptation[END_REF][START_REF] Ortony | The cognitive structure of emotions[END_REF][START_REF] Gratch | A domain independent framework for modeling emotion[END_REF], we here assume that coping strategies are triggered by the agent's positively valenced emotions (e.g., hope and joy) and negatively valenced emotions (e.g., fear and sadness). In what follows we only discuss coping strategies triggered by negatively valenced emotions.

We assume that an agent that is fearful or distressed because its intention a will realize the undesirable effect l will possibly reconsider its intention. Such an intention reconsideration strategy can be formulated as follows: Trg(-a) = l∈Lit,i∈EmoInt:i≥θ ((Fear i (a, l) ∨ Distress i (a, l))∧ B Control l) This means that the coping strategy of reconsidering the intention to perform the action a is triggered if and only if (1) the agent is either fearful or distressed with intensity at least θ that its intention to perform the action a will lead to an undesirable result, (2) the agent believes that he has control over l, in the sense that he can prevent the undesirable result l to be true by performing a different action. θ is a threshold which captures the agent's sensitivity to negative emotions (the lower is θ, and the higher is the agent's disposition to discharge a negative emotion by coping with it). Control l captures the appraisal variable called controllability we have discussed in Section 3.

Furthermore, we assume that an agent that is fearful or distressed because it believes that its intended action a will realize the undesirable consequence l on which it has no control (1) will decrease the strength of the belief that action a will lead to the undesirable consequence l or, (2) will increase the desirability of l. The former kind of coping strategy captures wishful thinking while the latter captures mental disengagement. Trg( a l↓ B ) = l∈Lit,i∈EmoInt:i≥θ ((Fear i (a, l) ∨ Distress i (a, l))∧ ¬B Control l) Trg(l↑ D ) = l∈Lit,i∈EmoInt:i≥θ ((Fear i (a, l) ∨ Distress i (a, l))∧ ¬B Control l) Note that differently from intention-related coping, wishful thinking and mental disengagement are triggered if the agent appraises that it has no controllability of the undesirable consequence l, in the sense that it cannot prevent l to be true (on this see also [START_REF] Marsella | EMA: A process model of appraisal dynamics[END_REF]).

Example 2. Let us continue the example of Section 3. We have, M * hal f Charge∧¬ f ullCharge , w | = Distress i (transport 1 , ¬pos) Suppose i ≥ θ. Given the assumption that Pre(tranport 2 ) = and the positive effect preconditions of transport 2 with respect to pos, the robot believes that the action transport 2 will place the second container at the target position, i.e., M * hal f Charge∧¬ f ullCharge , w | = B transport 2 pos and therefore, M * hal f Charge∧¬ f ullCharge , w | = B Control ¬pos Following the specification of the triggering condition for intentionrelated coping, the robot can now reconsider its intention Int transport 1 , M * hal f Charge∧¬ f ullCharge , w | = Trg(-transport 1 )

AXIOMATIZATION AND DECIDABILITY

The logic DL-GA of Section 2 is axiomatized as an extension of the normal modal logic S5 for the epistemic operator K with (1) a theory describing the constraints imposed on the agent's mental state, (2) the reduction axioms of the dynamic operators [α], and (3) an inference rule of replacement of equivalents.

Theory of the agent's mental state.

h∈Num exc h k∈Num∪Num -Des k l exc h → ¬exc l if h l Des k l → ¬Des m l if k m K exc 0 Reduction axioms for the dynamic operators [α]. [α]p ↔        (γ + (a, p) ∧ ¬γ -(a, p)) ∨ (p ∧ ¬γ -(a, p)) if α = a p if α = * ϕ [α]Int a ↔        ⊥ if α = a Int a if α a [α]exc h ↔                        exc h if α = a ((ϕ ∧ l,m∈Num\{0}:l-m=h (B m ¬ϕ ∧ exc l ))∨ (ϕ ∧ ( Bϕ ∧ exc h ))∨ (¬ϕ ∧ Kϕ ∧ l∈Num:Cut B (l+δ)=h exc l )∨ (K¬ϕ ∧ exc h )) if α = * ϕ [α]Des k l ↔ Des k l [α]¬ψ ↔ ¬[α]ψ [α](ψ 1 ∧ ψ 2 ) ↔ ([α]ψ 1 ∧ [α]ψ 2 ) [α]Kψ ↔ K[α]ψ Rule of replacement of equivalents. From ψ 1 ↔ ψ 2 infer ϕ ↔ ϕ[ψ 1 /ψ 2 ]
Given a formula ϕ, let red(ϕ) be the formula obtained by iterating the application of the reduction axioms from the left to the right, starting from one of the innermost dynamic operators [α]. red pushes the dynamic operators inside the formula, and finally eliminates them when facing an atomic proposition. Obviously, red(ϕ) does not contain dynamic operators [α]. The following proposition is proved using the reduction axioms above and the rule of replacement of equivalents. Proposition 2. Let ϕ be a formula in the language of DL-GA. Then, red(ϕ) ↔ ϕ is DL-GA valid.

Theorem 1. Satisfiability in DL-GA is decidable. Sketch of Proof. Let L-GA be the fragment of the logic DL-GA without dynamic operators. The problem of satisfiability in L-GA is reducible to the problem of global logical consequence in S5, where the set of global axioms Γ is the theory of the agent's mental state given above. That is, we have | = L-GA ϕ if and only if Γ | = S5 ϕ. Observe that Γ is finite. It is well-known that the problem of global logical consequence in S5 with a finite number of global axioms is reducible to the problem of satisfiability in S5. The problem of satisfiability checking in S5 is decidable [START_REF] Fagin | Reasoning about Knowledge[END_REF]. It follows that the problem of satisfiability checking in the logic L-GA is decidable too. Proposition 2 and the fact that L-GA is a conservative extension of DL-GA ensure that red provides an effective procedure for reducing a DL-GA formula ϕ into an equivalent L-GA formula red(ϕ). As L-GA is decidable, DL-GA is decidable too.

The logic DL-GA + of Section 4 is axiomatized by the axioms and the rules of inference of the logic DL-GA plus the following reduction axioms for the dynamic operators [β].

Reduction axioms for the dynamic operators

[β]. [β]p ↔ p [β]Int a ↔            if β = +a ⊥ if β = -a Int a if β +a and β -a [β]exc h ↔                        ((ϕ ∨ (¬ϕ ∧ ¬Bϕ)) ∧ exc h )∨ (¬ϕ ∧ Bϕ ∧ l∈Num:Cut B (l+ω)=h exc l ) if β = ϕ↑ B ((ϕ ∨ (¬ϕ ∧ ¬Bϕ)) ∧ exc h )∨ (¬ϕ ∧ Bϕ ∧ l∈Num:Cut B (l-ω)=h exc l ) if β = ϕ↓ B exc h if β = l↑ D or β = l↓ D [β]Des k l ↔            m∈Num∪Num -:Cut D (m+ω)=k Des m l if β = l↑ D m∈Num∪Num -:Cut D (m-ω)=k Des m l if β = l↓ D Des k l if β l↑ D and β l↓ D [β]¬ψ ↔ ¬[β]ψ [β](ψ 1 ∧ ψ 2 ) ↔ ([β]ψ 1 ∧ [β]ψ 2 ) [β]Kψ ↔ K[β]ψ
The following Theorem 2 is proved in the same way as Theorem 1.

Theorem 2. Satisfiability in DL-GA + is decidable.

RELATED WORK

Although psychological models of emotion emphasize the role of emotion intensity and its role in the coping mechanism, most existing works on logical modeling of emotions have ignored either the intensity of emotions or the coping strategies.

Adam et al. [START_REF] Adam | A logical formalization of the OCC theory of emotions[END_REF] have proposed a logical formalization of the OCC model, while Lorini & Schwarzentruber [START_REF] Lorini | A logic for reasoning about counterfactual emotions[END_REF] have formalized counterfactual emotions such as regret and disappointment. Both approaches ignore the quantitative aspect of emotions. In a previous work [START_REF] Lorini | A dynamic logic of knowledge, graded beliefs and graded goals and its application to emotion modelling[END_REF] we formalized emotion intensity by using a similar logic, but we did not consider the coping strategies.

The logical approach to emotion proposed by Steunebrink et al. [START_REF] Steunebrink | A formal model of emotion-based action tendency for intelligent agents[END_REF] has both characteristics of our approach: it provides a formal model of emotions extended with their intensities and coping strategies. In this model, an intensity function is assigned to each appraised emotion to determine its intensity at each state of the model. The coping mechanism introduced in this model is inspired by Frijda's theory of action tendencies [START_REF] Frijda | The Emotions[END_REF]. According to this theory, specific emotions give agents the tendency to perform particular actions. In the proposed model, coping strategies are developed for negative emotions and their aim is to reduce the intensity of negative emotions. However, unlike the present approach, Steunebrink et al.'s approach takes emotion intensity as a primitive without explaining how it depends on more primitive cognitive ingredients such as belief strength and goal strength. The other important difference between the present work and Steunebrink et al.'s work is that we here provide a decidable logic of emotion with a complete axiomatization, whereas Steunebrink et al. do not provide any decidability result or complete axiomatization for their logic of emotion.

In the computational model proposed by Gratch and Marsella [START_REF] Gratch | A domain independent framework for modeling emotion[END_REF][START_REF] Marsella | EMA: A process model of appraisal dynamics[END_REF], the eliciting conditions of emotions are defined in terms of quantitative measures such as desirability and likelihood of events. The model is based on several thresholds that determine when emotions are elicited and how emotions are coped with. The implementation of the proposed model is called EMA and is applied to generate predictions about human emotions and their coping strategies. Since the model is quantitative and the authors do no provide any details about its underlying logic, it is hard to compare this model with other logical approaches. One can only conclude that the model proposed by Gratch and Marsella considers both emotion intensities and coping strategies, although it does not provide a logical characterization of the emotions, their intensities, or the corresponding coping strategies.

DISCUSSION

In this work we have provided a logical characterization of emotions enriched with intensities and coping strategies. Emotions are defined in terms of graded beliefs, graded (achievement and avoidance) goals, and intentions. The intensity of emotions, which is defined as a function of belief strength and goal strength, is used to trigger specific coping strategies. We have considered only a few coping strategies triggered by negative emotions. In future work, we intend to extend our analysis to coping strategies triggered by positive emotions. For example, hope or joy with respect to a current intention may trigger coping strategies that suspend the other intentions in order to create a focus on the intended action for which the agent is hopeful or joyful. Moreover, the emotions discussed in this paper are defined with respect to an agent's action. We would like to extend our model in order to characterize emotions in terms of events that are independent from the agent's actions and intentions. Finally, in the present work we have only modeled the socalled prospective emotions, rather than actual emotions. We believe that our model can be easily extended to characterize actual emotions such as being joyful to have already placed a container at the target position or being hopeful that the current state of the battery charge is not empty.

Note that the order of the set theoretic operations in the definition seems to privilege negative effect preconditions; however, due to the coherence assumption COH γ made in Section 2.2 the effects of a physical action will never be inconsistent.

Note that the tree conditions 1, 2(a) and 2(b) cover all cases. Indeed, the third condition K¬ϕ is equivalent to ¬ϕ ∧ K¬ϕ, because K¬ϕ → ¬ϕ is valid.

The only difference with AGM theory is the condition Kϕ. AGM assumes that new information ϕ must incorporated in the belief base (the so-called success postulate), whereas we here assume that ϕ must incorporated in the belief base only if the agent can imagine a world in which ϕ is true.