The Jiminy Advisor: Moral Agreements Among Stakeholders Based on Norms and Argumentation

,


Introduction
Artificial autonomous systems depend on human intervention to distinguish moral from immoral behavior. Implicit ethical agents (Moor, 2006) are ethically constrained from engaging in immoral behavior via rules set by human designers. Explicit ethical agents (Moor, 2006;Dyrkolbotn, Pedersen, & Slavkovik, 2018) or agents with functional morality (Wallach & Allen, 2008, Chapter 2) are either able to make moral judgments themselves or are given guidelines or examples about what is good and bad. In either case, the question arises: who decides which and whose morality the artificial autonomous systems ultimately upholds?
It is immediately apparent that the persons and institutions that are affected by the moral behavior of an autonomous system should be given the opportunity to indicate their moral preferences as input into the behavior of that autonomous system (Baum, 2020). There are, however, numerous stakeholders that satisfy the above definition of concerned entities (Baum, 2020). For example, governmental regulators can determine which behavior is legal for the state in which the autonomous system is deployed. The manufacturers, shareholders, designers and developers involved in building the autonomous system would be concerned not only with issues of liability, but also issues of representation-an autonomous system should uphold the image and values of its maker. People interacting directly with the autonomous system should have a choice on certain aspects of its moral behavior, whether they are owners, users, or just share an environment with the system. It is easy to argue that it is wrong to select any of these stakeholders over others as being able to exclusively define what constitutes moral behavior for an autonomous system: such a system will end up with a regulation that benefits that stakeholder and misconstrues or underplays others' interests.
Legal systems recognize only humans and corporations as persons and moral agents. The underlying assumption that everyone is human allows a great deal of flexibility when it comes to specifying and enforcing desirable behavior-not all desirable behaviors are specified and not all violations of law are meticulously prosecuted. Companies can build a system that reports on every violation of law committed by a user, but who would then want to buy such a totalitarian "surveillance" device?
People can have multiple roles when interacting with an autonomous system, and they can have different role-based moral preferences for the system. As pedestrians, they would prefer utilitarian cars that elect to run into a wall and kill its one passenger rather than kill several pedestrians, yet at the same time would surely prefer not to buy such a car (Shariff, Bonnefon, & Rahwan, 2017). Even if we somehow determine that the role of a pedestrian is more important than the role of a passenger, who would wish to buy a car that might kill one's own children while driving them to school?
We propose here that all the stakeholders' moral instructions should be included when deciding the moral behavior of an autonomous system. The problem then immediately becomes: how should an autonomous system combine the ethical input of various stakeholders?
In this article, the terms "moral" and "ethical" are used interchangeably. Let us imagine that each of the "morality" stakeholders are represented by an "avatar" in an artificial autonomous system. We refer to this artificial autonomous system as simply an "agent". The "avatars" form the "moral council" of the agent, acting like Jiminy Cricket in the story of Pinocchio. First, the stakeholders can indicate which situations are ethically sensitive and how to proceed in each situation. An agent makes such a decision by choosing from a set of available actions. If none of the stakeholders regard the situation as ethically sensitive in any way, then the agent can use its regular reasoning methods to select what to do. However, in an ethically sensitive situation, a Jiminy would be employed to produce a moral recommendation to the agent.
The first challenge in building the "moral council" is that the stakeholders may not be following the same ethical reasoning theory or any ethical theory at all. It is not sufficient that each stakeholder chimes in with a "yes" or "no" when the question of the morality of an action or of an action's outcome is presented.
The second challenge is how to reach an agreement. Dilemmas and conflicts will arise when the inputs of the stakeholders are applied to a decision-making problem (Robinson, 2021;Horty, 1994). We do not want to evaluate the morality of an action by majority rule. Neither do we want to always put legal considerations above the image of the manufacturer, or give higher consideration to the personal input of the end user than the guidelines of regulatory bodies. Instead, we wish to have an engine that is able to take inputs from the different stakeholders and bring them into agreement.
The third challenge is explainability. Since the stakeholders are not necessarily aware of the input of other stakeholders, the decisions that the system ends up making need to be explained. This means that whatever solutions are used must be such that the artificial moral agent is able to explain its choices (Anderson & Anderson, 2014) or that the choices should be formally verifiable (Bremner, Dennis, Fisher, & Winfield, 2019).
We propose that normative systems (Chopra, van der Torre, Verhagen, & Villata, 2018) and formal argumentation (Baroni, Gabbay, Giacomin, & van der Torre, 2018) can be used to implement a "moral council" for an artificial moral agent. With this approach, we can abstract away from how a particular stakeholder has reached a particular decision concerning the morality of an action. We model each stakeholder as a normative system that is then exploited as a source of arguments. An argument can be a statement regarding whether or not an action is moral, or it can be a reason why a particular action should be considered to be moral or immoral. Abstract argumentation allows us to build a system of attacking and supporting arguments that can be analyzed to determine which statements are supported and which are refuted in the system at a given time. Such a system can also generate explanations of decisions using dialogue techniques.
The main contributions of this article are the following: 1. Within the field of machine ethics, we describe the first computational model that combines the ethical theories of multiple stakeholders in ethical decision making; 2. Within the field of structured argumentation, we describe the first model aimed at resolving moral dilemmas that arise from multiple normative systems.
The article is structured as follows. In Section 2 we introduce the Jiminy moral advisor component, in Section 3 we discuss how to represent normative systems, and in Section 4 we study an argumentation system for one or multiple stakeholders. Section 5 shows different ways to use argumentation to come to moral agreements between stakeholders. Section 6 adresses the explainability of the decisions recommended by the argumentation system. Section 7 discusses different ways to embed a Jiminy in a device and turn it into an artificial ethical agent. The article concludes with a discussion of the related literature in Section 8 and a summary of this article in Section 9. An appendix at the end contains proofs of our results.

The Jiminy Moral Advisor Component
We first consider the problem of how a multi-stakeholder ethical advisory component can be designed and integrated into an agent or an artificial autonomous system. We call this multi-stakeholder ethical advisory component a Jiminy advisor.
The first problem we face is the problem of building the "avatars", one for each stakeholder. These are the sources of "insight" on what a Jiminy should advise in a given ethically sensitive situation. Clearly, the stakeholders cannot be available in real time to give feedback to the avatar integrated in each instance of the agent. Rather, this avatar needs domain-specific information in advance about what the stakeholder considers to be ethically sensitive situations and what are its recommendations on what should be done when such situations arise. We propose the use of normative systems (Chopra et al., 2018) to model the stakeholders. A normative system describes how to evaluate actions in a system of agents and how to guide the behavior of those agents (Alchourrón, 1991). A norm is a formal description of desirable behavior, desirable action, or the desirable outcome of an action. Furthermore, normative systems can also be seen as rule-based systems (Definition 1) in which norms can be provided with reasons supporting their enforcement. By presenting norms that stipulate how to avoid immoral behavior, stakeholders also contribute standpoints or claims in order to characterize and help identify ethically sensitive situations. Every stakeholder is modeled with its own normative system in the Jiminy advisor.
The advantage of using normative systems is that it allows us to abstract away from the particular moral theory that a stakeholder upholds. This facilitates public scrutiny of any norm a stakeholder includes in its avatar. The immediate disadvantage of this approach is that the scope of ethically sensitive situations that the agent can handle by design is limited since these need to be predicted in advance by the stakeholders. However, this is not unusual for systems that regulate behavior-even people sometimes find out that what they have done is immoral after the fact. And even the law is not written to predict all future possible sources of danger to society. The law is subject to interpretation by legal practitioners, and is amended as necessary when a new threat is recognized. In the same way, a normative system can be amended offline if a new ethically sensitive situation arises.
It is clear that for any given situation, different stakeholders would have different recommendations. As an example, consider a smart speaker that passively "listens in" and stores voice recordings, acting like a surveillance device. Should it help with the prevention (or investigation) of crimes? This is a moral dilemma involving household members, law enforcement agencies and the manufacturer of the smart speaker. Which stakeholder should be alerted then? The answer might lead to conspiracy charges, violation of users' privacy, security issues, or ethical concerns about current laws (marijuana use, blasphemy), to name just a few aspects of this dilemma (Bjørgen et al., 2018). The running example (Example 3.1) will illustrate the smart speaker dilemma throughout the article. Our goal is not to solve this issue but to build a system where all the stakeholders' recommendations can be specified and then discussed in different contexts.
Normative systems are built in different ways depending on the size and complexity of the system. Relatively simple systems are built using only regulative norms that directly connect a context with an obligation. If the system becomes more complicated and more contexts need to be distinguished, constitutive norms are used to define intermediate concepts. For example, there may be several constitutive norms that define what it means to get married, and then some regulative norms may define the rights and duties that come with marriage. Intermediate concepts can be used to encode a decision tree for navigating between a context and relevant obligations. Finally, the general case is often distinguished from exceptional cases, where the latter are defined using permissive norms. The role of the different kinds of norms is described in the next section.
We still need a way to bring together all pertinent norms and extract the moral recommendation that is best supported by the available arguments. Furthermore, a Jiminy advisor should produce an explanation as to why one particular action was recommended over another.
The relation between norms and consequent obligations, permissions and institutional facts is known as detachment. In monotonic systems that cannot deal with conflicts, detachment corresponds to modus ponens in classical logic. As we explain in the next section, there are some choices to be made with permissive and constitutive norms too, in particular, whether rules of different kinds can be applied after one other, and whether we can reason by cases. But once we consider nonmonotonic systems with some kind of built-in conflict resolution mechanism, the choice increases.
We propose the use of formal argumentation Gabbay, Giacomin, Simari, & Thimm, 2021) to reach moral agreements from stakeholders' inputs. Formal argumentation is typically based on logical arguments constructed from prioritized rules. The first applications of formal argumentation in the area of normative multi-agent systems concerned the resolution of conflicting norms and norm compliance. Several frameworks have been proposed for normative and legal argumentation (Bench-Capon, Prakken, & Sartor, 2010), but no comprehensive formal model of normative reasoning from arguments has yet been proposed.
Intuitively, an argumentation system consists of a set of arguments and a defeat relation over these arguments. Arguments for claims or judgments can be constructed from an underlying knowledge base expressed in a logical language, while the defeat relation identifies pairs of logically incompatible arguments and sets a preference between each pair. Typically, an argumentation system is represented as a directed graph in which the nodes are arguments and there is an edge from node A to node B if argument A defeats argument B (see Figure 1).
To find agreements, we consider that all possible arguments in the graph can be accepted, rejected or undecided. An argument can only be accepted if all its defeaters are rejected, or if it has no defeaters. An extension of an argumentation graph is any set of arguments that can be accepted together. For example, for the argumentation graph in Figure 1, there is only one possible extension, namely {A, C}. If the arguments contain moral recommendations (and the reasons supporting them), then the extension would contain an "agreed", unopposed moral recommendation from the Jiminy to the moral agent.
The advantage of using the argumentation approach to reach agreements is that it is fairly straightforward to generate explanations for agreements, as shown in Section 6. The disadvantage of the approach is that it is not always possible to arrive at just one possible    agreement on what is the most moral course of action, and two or more options can be equally justified as constituting an agreement. However, the disadvantage of possible ties is shared with other agreement reaching methods like social choice (Brandt, Conitzer, Endriss, Lang, & Procaccia, 2016), and is balanced against the advantage of easy access to explanations.
Having settled how to represent the stakeholders and how to reach agreements on moral recommendations, we can illustrate the reasoning cycle of the Jiminy moral advisor in Figure 2. First, we do a quick test to determine whether the current situation is ethically sensitive. If it is not, the agent chooses an action using its default program. If the ethically sensitive situation can clearly be resolved, this is done directly. For example, let the agent be a smart house that manages a hospital, and non-marijuana smoke is detected in that hospital. The agent has two choices: sound the fire alarm, or alert the nurses' station. Both choices are passed to a Jiminy as available options. If the norms of all stakeholders recommend sounding the alarm in this situation, that is what the Jiminy returns as its moral recommendation: sound the alarm.
Consider, however, that where the ethically sensitive situation cannot be resolved from the available options of what the agent can do, it means that no option is considered moral by all the stakeholders' norms. In that case, the Jiminy uses the normative systems representing the stakeholders, together with the agent's knowledge base and its sensory input, to build a more complex argumentation graph. Using that graph, the Jiminy calculates extensions from which it extracts a moral recommendation as well as a justification for this recommendation, and returns these to the agent. In the worst case, the Jiminy can use its own norms to establish which stakeholders are more authoritative on an unresolved issue.
We provide details about the normative systems approach we use in a Jiminy in Section 3, and present the argumentation reasoning approach in Section 4. The integration of a Jiminy in an artificial agent is discussed in Section 7 together with the ethical aspects of smart devices.

Representing Normative Systems, Moral Dilemmas and Normative Conflicts
We first distinguish logic-based from table-based normative systems, and we discuss two alternative logical languages suitable for logic-based normative systems. Then we discuss the representation of regulative, permissive and constitutive norms, and the related representation of moral dilemmas and normative conflicts. Finally, we discuss the resolution of moral dilemmas and normative conflicts, particularly for systems with multiple stakeholders.

Table-Based Versus Logic-Based Representations of Normative Systems
In its basic form, a normative system is a table expressing a relation between situations and deontic decisions. A prototypical example is a judge who reaches a verdict based on evidence. In the case of ethical agents, a knowledge engineer can present each stakeholder with a table like Table 1 to complete. Each row in the table can be seen as a simple norm, e.g., "In situation 1, you should alert the household". In the table-based representation, a normative system is thus a set of such simple norms.

Situation
Recommended decision description Alert the authorities Alert the household No alert Situation 1 x Situation 2 x . . .  (Awad et al., 2018), the user is presented with a number of scenarios, and for each scenario, has to choose between two alternatives. Though this table-based method is very simple and thus easy for the stakeholder to understand and use, it is not very efficient from the perspective of knowledge engineering because the number of situations is fixed beforehand and typically has to remain small.

Situation m x
A more advanced representation, often attributed to Ross (1957), is to represent a normative system with two tables (see, for example, Table 2). The first table, Table 2a,  relates situations or contexts to a set of features or factors, and the second table, Table 2b, relates these features to deontic decisions. There are now two kinds of norms. Constitutive norms relate situations to features, e.g., "Feature 1 and Feature 2 counts as Situation 1", while regulative norms relate features to recommendations, e.g., "if Feature 1 and Feature 2 apply, then Alternative 2 should be chosen". A normative system is a set of constitutive and regulative norms. For a recent discussion of this representational technique, see the work of Grossi and Jones (2013).  The features may refer to more abstract legal terms such as blasphemy, privacy, contract, or ownership. In the ethical agent architecture, the ontology of these features may be shared by all the stakeholders. Depending on the application domain, the features are called intermediate or institutional facts in order to distinguish them from the propositions used to describe the situations, which are called brute facts. The same structure that is used for constitutive and regulative norms has also been used for practical or goal-based reasoning. In that case, the intermediate facts may refer to goals or desires (Broersen, Dastani, Hulstijn, Huang, & van der Torre, 2001).
Notwithstanding the distinction between constitutive and regulative norms, often permissive norms are regarded as distinct in a normative system. They have the same structure as regulative norms but are used to describe exceptions. For example, there can be a general norm prescribing client confidentiality with the exception that confidentiality can be broken when clients represent a threat to themselves or others (see, for example, Table 3).   Tables 2 and 3 corresponds to the logical conjunction of literals. If the table is represented by logical formulas instead of a list, other connectives can also be used such as logical disjunctions. Several rows in the table can then be represented with a single formula such as: if Situation i or Situation j then Feature k and l. Alchourrón and Bulygin (1981) developed their logic-based representation of normative systems inspired by the Tarskian theory of deductive systems, i.e., mathematical proof theories in deductive logic. The logicbased representation is often based on a nonmonotonic logic because the norms can be subject to exceptions due to, for instance, permissive norms. In this article, we use formal argumentation to handle the nonmonotonicity inherent in normative reasoning. Throughout the article, we will analyze the example below.
Example 3.1 (Smart speaker). As a running example, consider a simple morally sensitive situation where the following norms are used in moral decision-making. Each norm is suggested by one of the stakeholders: M = manufacturer, H = human user, L = the legal codes. The literals occurring in norms are named according to their roles: world brute facts w n , institutional facts i n , deontic variables d n and actions a n .
(L) If M has manufactured a device D (w 1 ), the behavior of that device D should comply with the law (d 1 ).
(H) Devices that collect user data (w 2 ) should protect the privacy of their users (d 2 ).
(H) Devices that contain information about a future event that grossly endangers society (w 3 ) should report that information to the authorities (d 3 ).
(M ) If information about a potential critical danger is detected (w 3 ), then D ought to collect user data information without explicit user permission (a 2 ).
(M ) Being a registered company in Norway (w 4 ) counts as doing business legally in Norway (i 1 ).
We now provide Definition 1 of a normative system. It formalizes regulative, constitutive and permissive norms. We assume that the agents have the same features. In this article, we assume a shared unique language L based on a shared set of propositional atoms Var = {p, q, . . .}. Definition 1 represents a relatively abstract theory of normative systems, and we believe that it is precisely this generality that makes normative systems suitable for the Jiminy's architecture. Instead of using negation, we adopt the more general concept of a contrariness function. This contrariness function¯, also shared by stakeholders, is not necessarily symmetric and is therefore more general than standard negation. It is popular in formal argumentation and is a generalization of weak negation in logic programming. For a general theory of generalized contradiction in formal argumentation, see the work of .
Definition 1 (Normative system for stakeholders). For a fixed set of atoms Var and a stakeholder s, a normative system for s is a tuple N s = (L,¯, R s ) where: • L is a logical language possibly containing negation: Var ⊆ L ⊆ Var ∪ {¬p : p ∈ Var }; •¯: L → 2 L is a (partial) contrariness function satisfying ϕ ∈ ¬ϕ and ¬ϕ ∈ ϕ for any ¬ϕ ∈ L (under¯, a set X ⊆ L is consistent iff for any φ, ψ ∈ X, φ / ∈ ψ); • R s is a set of norms r of the form φ 1 , . . . , φ n ⇒ τ s φ, where bd (r) = {φ 1 , . . . φ n } ⊆ L is the body, hd (r) = φ ∈ L is the head, and τ ∈ {r, c, p}. R r s , R c s and R p s contain the norms in R s with their corresponding superscripts; they are called regulative norms, constitutive norms and permissive norms respectively.
The normative system for a set of stakeholders S = {s 1 , . . . , s n } is then simply the tuple N S = (L,¯, R S ) defined by R S = R s 1 ∪ · · · ∪ R sn .
We write ψ = −φ or φ = −ψ iff ψ ∈ φ and φ ∈ ψ. For example, ¬p = −p. A set X ⊆ L is closed under the contrariness function¯iff for each v ∈ X: v ⊆ X, and v ∈ v implies v ∈ X.
Stakeholders share the same language L and contrariness function¯, but each stakeholder s is entirely responsible for the norms it supplies into its normative system N s . In fact, s can be in conflict about its own norms. As the N s -norms for an agent are publicly available, this stakeholder can face public scrutiny from other stakeholders. Finally, the Jiminy advisor is located at a meta-level to provide priority relations between the stakeholders. These priority relations provide a second layer to counter any biases injected by stakeholders through their norms. The normative system of the Jiminy will be introduced later on (Def. 24).

The Choice of Logical Language in Logic-Based Normative Systems
We can adopt a classical propositional (or first-order) language or a modal language. A modal language can contain modal operators for obligation O, permission P and prohibition F . For example, Standard Deontic Logic (SDL) is a normal propositional modal logic of type KD, which means that it extends the propositional tautologies with the axioms K : O(p → q) → (Op → Oq) and D : ¬(Op ∧ O¬p), and it is closed under the inference rule of modus ponens, p, p → q/q, and necessitation, p/Op. Prohibition and permission are defined by F p = O¬p and P p = ¬O¬p. SDL is an unusually simple and elegant theory. 2 In this section, we discuss the pros and cons of these two options.
It may be observed that some authors in deontic logic use the concept of norm and conditional obligation interchangeably. However, the distinction between norms and obligations was articulated by Makinson (1999) and further developed formally in input/output logic by Makinson and Van der Torre (2000). To detach an obligation from a norm, there must be a context and the norm must be conditional. Thus norms as defined in Definition 1 are just particular kinds of rules, and one may view a normative system simply as a set of rules.
Since modal logic integrates classical logic just like first-order logic integrates propositional logic, it may be argued that we can express more when we use a modal language as the base language. For instance, there are examples where permissions give rise to new obligations and permissions, and this can be expressed only when we adopt a modal language.
However, examples of where we need the expressive power of a modal language are rare. For most practical purposes, a classical language may be sufficient. As Makinson (1999) explains, the absence of explicit modal operators in normative systems may be seen as a limitation, but it also facilitates formal analysis. Makinson attributes the "liberating effect" of no longer having to explicitly represent the modal operator to Alchourrón and Bulygin (1981): An unconditional normative code is defined as a pair N = (A, B) where A, B are sets of purely boolean formulae. Intuitively they represent the states of affairs that the code explicitly requires resp. explicitly permits to come into effect.
There is thus a small but immensely significant step compared to the sketch of Stenius (1963). Alchourrón and Bulygin appear to have been the first to realise the liberating effect of taking the set of promulgations of a normative code to be made up of purely boolean formulae. At the same time, they consider explicit permissions along with promulgations (Makinson, 1999, p. 32-33).
In this article, we use propositional representations, but all our definitions tacitly involve modalities from deontic modal logic. (w 1 ) the manufacturer makes the smart speaker; D is made by M (w 2 ) the smart speaker collects user data; D collects data (w 3 ) the data collected indicates a potential critical danger 3 to society. D finds a threat (e.g., a situation in which many lives are lost) (w 4 ) the manufacturer is a registered company in Norway; M is registered in Norway (i 1 ) the manufacturer is doing business legally in Norway.

M is a business in Norway
The stakeholders are interested in three conflicting moral options d n concerning the smart speaker and two morally relevant decisions a n : (d 1 ) comply with the law; M is law compliant 3. Whether a given action legally constitutes a threat is an institutional fact that can be debated using constitutive rules and other known facts. To make our example concise, we just represent the action constituting a potential threat as a brute fact w3.
(d 2 ) protect the privacy of users; protect privacy (d 3 ) report information concerning a potential critical danger to society; report threat (a 1 ) comply with the GDPR; comply with the GDPR (a 2 ) collect data without users' explicit permission. collect data w.o. permission Let Var = {w 1 , w 2 , w 3 , w 4 , i 1 , d 1 , d 2 , d 3 , a 1 , a 2 } be this set of atoms. The language L is then: Based on their meaning, some atoms in Var conflict with other atoms. For example, protecting the privacy of users (d 2 ) is in conflict with reporting information collected from users such as potential threats (d 3 ). These conflicts are captured by the contrariness function · : 4 Symmetric contrary pairs are abbreviated by:

Representing Constitutive and Regulative Norms
In this section, we provide some guidelines on how to represent constitutive and regulative norms, and we show how such norms are represented with the running example. Normative systems have been used in many disciplines. Consequently, besides the relatively abstract theory in Definition 1, which can be used across disciplines, there are specific theories tailored to the specific concerns of those individual disciplines. Constitutive norms are rules that create the possibility of undertaking an activity, or rules that define an activity. For example, according to Searle (1969), the activity of playing chess is constituted by actions in accordance with the rules of the game. The institutions of marriage, money, and promising are like the institutions of baseball and chess in the sense that they are all systems of constitutive rules or conventions. As another example, a signature may count as a legal contract, and a legal contract may define both a permission to use a resource and an obligation to pay. Unlike regulative norms, constitutive rules do not regulate actions but define new forms of behavior. Constitutive norms link brute facts (like the signature of a contract) to institutional facts (a legal contract), and are usually represented as counts-as conditionals: X counts as Y in context C. Searle's analysis insists on the contextual nature of constitutive norms: a signature counts-as a legal contract when written on a document stating the terms of such a contract. If, however, I write my signature on a blank sheet of paper, that does not constitute a legal contract. Constitutive norms have been identified as the key mechanism of normative reasoning in agent communication, electronic contracting, and the dynamics of organizations (Boella & van der Torre, 2006).
Regulative norms, including permissive norms, indicate what is obligatory or permitted. In formal deontic logic, permissions are studied less frequently than obligations. For a long time, it was naively assumed that a permission could simply be taken as a dual of obligation, just like possibility is the dual of necessity in modal logic. However, Bulygin (1986) observed that an authoritative kind of permission must be used in the context of multiple authorities: if a higher authority permits you to do something, a lower authority can no longer prohibit it. Deontic logic has been concerned mainly with regulative norms, but the logic of constitutive norms (Grossi & Jones, 2013) is a subject of study on its own. Example 3.3. Example 3.1 can now be formulated as a list of norms, collected in different sets R s , one for each stakeholder in s ∈ S = {L, H, M }. These sets are: M M is a business in Norway Each set defines the normative system of its stakeholder, e.g. N L = (L,¯, R L ), with R r L = R L and R c L = ∅ = R p L . The union R S = R L ∪ R H ∪ R M also defines the normative system N S = (L,¯, R S ) for all stakeholders, again with R r S = R r L ∪ R r H ∪ R r M and so on.

Moral Dilemmas Involving Conflicting Obligations
In general, moral dilemmas are situations where it is no longer possible to satisfy all norms, i.e., at least one norm must be violated. The representation of violations is built on the distinction between "is" and "ought." David Hume introduced the so-called is-ought problem, which roughly means that there is a fundamental difference between positive statements and prescriptive or normative statements. The is-ought problem can be considered in two directions. First, what is the case cannot be the basis for what ought to be the case. Second, what ought to be the case cannot be the basis for what is the case. This is related to the fallacy of wishful thinking: an agent may want to win the lottery, but from that desire he should not deduce that he will win the lottery. Likewise, an agent should not, in a kind of deontic wishful thinking, deduce from the mere fact that she is obliged to review a paper that she will actually do it. The fundamental distinction between "is" and "ought" is the main reason why deontic logic is normally formalized as a branch of modal logic. It distinguishes brute facts like p from deontic facts like obligations Op and permissions P p, and it represents violations with mixed formulas like p ∧ O¬p. As a first approximation, one may be tempted to define moral dilemmas as two conflicting norms. For example, if there are two norms, one prescribing alerting the police and the other prescribing not alerting the police, and the condition for the activation of both norms is part of the current context, then we might be tempted to deduce that there is a moral dilemma. However, the problem with this definition of a moral dilemma is that these norms are defeasible. So even if there is a norm prescribing alerting the police and another norm prescribing not alerting the police, there may also be a permission implying an exception to one of these norms. If there is such a permission, there is no longer a moral dilemma.
For this reason, moral dilemmas in normative reasoning are usually not defined in terms of the normative system but in terms of the conclusions of the norms that are detached from the normative system. There are two approaches to detachment depending on the choice of logical language used for the logic-based normative systems described in Section 3.2. In the first approach, where the logical language is a modal logic containing at least a modal operator O for obligation, a moral dilemma is represented by an unresolved conflict between two incompatible obligations, e.g., Op ∧ O¬p. With the deontic axiom ¬(Op ∧ O¬p), so-called Standard Deontic Logic makes deontic dilemmas inconsistent, but many alternative logics allow consistent representation of such dilemmas and thus reject this axiom. In the second approach, where the logical language does not contain a modal operator, moral dilemmas are usually represented by the detachment of so-called extensions. An extension is a consistent set of formulas pertaining to the logical language. Whereas in most logics, we can derive only a single set of conclusions from a set of premises, 5 in normative reasoning there may be several such sets. If there is more than one extension, it might suggest some kind of conflict. In the formal argumentation adopted in this article, moral dilemmas are also represented by the existence of multiple extensions.

Normative Conflicts Among Conflicting Institutional Facts
There is one additional challenge when defining moral dilemmas due to the existence of constitutive norms in terms of multiple extensions. We can derive conflicting institutional facts from a normative system, and this will also lead to multiple extensions. To distinguish this situation from conflicting obligations, we call the existence of conflicting institutional facts a normative conflict.
Since the concepts of moral dilemma and normative conflict are defined in terms of the detachment procedure, this section gives only an informal characterization of the distinction between moral dilemma and normative conflict. We will formally define them in the next section when we have defined the detachment procedure based on formal argumentation.
Moral dilemma: multiple extensions due to conflicting obligations. For example, one stakeholder believes that we should alert the police while another stakeholder believes that we should alert the parents.
Normative conflict: multiple extensions due to conflicting institutional facts. We call this normative conflict but not normative or moral dilemma. For example, one stakeholder believes that a certain situation counts as blasphemy while another stakeholder believes that the same situation does not count as blasphemy. This is a disagreement about the nature of the situation, not explicitly about the actions to be taken.
Normative conflicts may lead to moral dilemmas. For example, if one stakeholder believes that there has been blasphemy while another stakeholder does not (a normative conflict), the first stakeholder may deduce that we should alert the police while the second stakeholder may not (a moral dilemma).
Reasoning about moral dilemmas and normative conflicts should not be confused with contrary-to-duty reasoning which concerns the consequences of violations such as sanctions and reparations. A violation occurs when an obligatory proposition is contradicted by current 5. Among deontic logics, this property is shared by all monotonic deontic logics, including its monadic and dyadic versions (Parent & van der Torre, 2018), and the grounded semantics for argumentation.

facts. A contrary-to-duty obligation expresses what one should do when obligations have been violated. In other words, contrary-to-duty obligations are triggered by conflicts between
what is the case and what ought to be the case, and they may be seen as a way to resolve such conflicts, if only partially. Of course, it is better to review a paper than not do the review and be sanctioned for that. Many deontic logic paradoxes like the gentle murder paradox contain contrary-to-duty obligations: a person should not kill, but if he kills, he should do it gently. Such scenarios should be represented in a consistent way, but in many deontic logics, such formalisations are inconsistent or have counterintuitive consequences. As for violations, the corresponding obligation is to be filtered out since the ideal proposition cannot be immediately achieved. We might say that the obligation retains its force, but for any practical purpose, it cannot be a cue for immediate action. For example, add to the running example Ex. 3.1 the two norms: (i) that a component C of the smartspeaker D counts as planned obsolescence, and (ii) that any company manufacturing devices with planned obsolescence should not be doing business legally in Norway. The latter obligation would be violated by the fact that M is doing business legally in Norway.

Moral Agreement: Resolving Moral Dilemmas and Normative Conflicts
In hierarchical normative systems, conflicts among norms can be resolved by reference to the hierarchy of norms, which can be based on the authority that promulgated the norm or other information such as the time of the promulgation or the specificity of the norm. In this article, we do not hardcode a global ordering on stakeholders, purposes, or values as no agreement may exist on such an ordering. This is comparable to the status of autonomous countries in international law where it is assumed that there is no ordering among the countries. Each stakeholder can have normative conflicts and/or moral dilemmas. In the case of multiple stakeholders, normative conflicts and moral dilemmas can occur at four different levels: 1. a stakeholder dilemma/conflict: a stakeholder, in isolation from other stakeholders, accepts an argument that clashes with arguments the other stakeholders accept.
2. a combined framework dilemma/conflict: all arguments are merged in a combined framework, and there are multiple extensions and conflicts between them; 3. an integrated framework dilemma/conflict: all normative systems are combined into one, and the resulting framework contains conflicts between multiple extensions; 4. a Jiminy dilemma/conflict: considering one of the above frameworks together with stakeholder selection norms, there are still conflicts between multiple extensions.
A moral dilemma or normative conflict is resolved when, for instance, there are multiple extensions at some levels but there is only one at a higher level. So if, due to the stakeholder selection norms, there is only one extension at level 4, then we say that the stakeholder selection norms resolve the moral dilemma or normative conflict. But uniqueness of extensions is not necessary to resolve moral dilemmas: as long as the extensions do not have conflicting obligations, all previous moral dilemmas can be seen as resolved. Resolving moral dilemmas (whenever possible) is in fact the ultimate goal of the Jiminy advisor, but normative conflicts can also be resolved during the process.
If some of the stakeholders find an event immoral, and others do not, then two kinds of discussions can be triggered. The first kind of discussion aims to question the moral judgment of another stakeholder. The moral judgment of stakeholders is typically based on assumptions, judgments and goals. For example, the moral decision to recommend calling the police may be based on: the assumption that the relevant persons are adults, the judgment that the discussion counts as blasphemy, and the goal of reporting blasphemy. Each of these elements can be questioned: a stakeholder can claim that the assumption does not hold because the voices of children are detected, or that the discussion does not count as blasphemy, or that the goal to report blasphemy does not exist in the country where the discussion is held, or that there may be a more important goal of protecting the privacy of the household.
The second kind of discussion that can be triggered is a conflict resolution discussion. In a conflict resolution discussion, special norms can be used to decide which normative system is applicable to a particular situation. For example, there may be a norm that states that in the case of a life-threatening situation, the normative system of the law overrides the normative systems of other stakeholders. Such norms may be particular fragments of the legal code in international private law, for example.
We introduce a special normative system called J for Jiminy that contains specific representations to explain which normative system is in use. This conflict resolution mechanism contains only contextual norms for the preference of one stakeholder over another.
The complexity of a conflict resolution argument is that the features that decide which normative system is applicable, like the existence of a life-threatening situation, may themselves be subject to debate. So one stakeholder may argue that a particular situation is life-threatening while another stakeholder may argue that it is not. Again, in such cases, a conflict resolution argument can be triggered, in this case not to resolve the ethical dilemma, but to agree on a collective judgment.

Detachment
Since there are no priorities associated with the norms, the detachment procedure is relatively straightforward. Given a context, we can apply constitutive norms iteratively, and then we can apply the regulative norms. The main choices to be made are as follows: 1. Do we allow reasoning by cases? For example, when we say that it is forbidden to use a radio in the park and it is forbidden to use a radio in the classroom, and we know that we are either in the park or in the classroom, do we detach that it is forbidden to use a radio? The drawback of reasoning by cases is that it complicates the inference relation and increases the complexity, and therefore we do not allow it.
2. Do we allow iterated detachment of obligations, also known as deontic detachment? It is well known from deontic paradoxes like Chisholm's paradox or Forrester's paradox that deontic detachment is problematic and that the deontic logics that deal with it are computationally more demanding. Therefore, we do not allow it.
3. Do we allow the use of constitutive norms within the scope of obligations and permissions? Again, we do not permit them. Applying constitutive norms in this context would result in a form of institutional wishful thinking. For example, if M was not yet registered in Norway (¬w 4 ∈ K), then from an obligation to do so (. . . ⇒ r L w 4 ) one should not infer that M is doing business legally in Norway (using w 4 ⇒ c M i 1 ). These choices suggest that full boolean languages L = L {¬,∧,∨,→} are not strictly needed for modelling norms r. 6 As a consequence, we can get rid of logical consequence operators Cn : P(L) → P(L) for boolean languages, such as those based on classical logic. Based on the above discussion, we end up with the following definition of detachment.
Definition 2 (Detachment). Let K be a consistent set of L-formulas representing the context, let R c be a set of constitutive norms, let R r be a set of regulative norms and let R p be a set of permissive norms. For a set of norms R, we define a one-step application of norms R to an arbitrary set K ⊆ L, written as R(K ), as follows: . . , a n ⇒ x ∈ R and a 1 , . . . , a n ∈ K }. 7 Based on this one-step detachment, we have the following: • The institutional facts are the formulas that can be detached iteratively from K and R c : • The obligations are the formulas that can be detached from I(R c , K) and R r . That is, • The permissions are the formulas that can be detached from I(R c , K) and R p . That is, If we consider only the R c -norms of a stakeholder s, then we write that set as R c s etc.
Example 3.4. Continuing from Example 3.3, let R be the set R M = {w 3 ⇒ r M a 2 , w 4 ⇒ c M i 1 } and K = {w 1 , . . . , w 4 } be the context. Note that R p = ∅. We obtain the following sets: Consider now R to be the set Roughly, there is a conflict when I is inconsistent, or when {p} ∪ O is inconsistent for some permission p ∈ P ; there is a violation when O is inconsistent with I or with K; and there is a dilemma when O is inconsistent. We make this idea more precise by using the notion of extension, in the sense that conflicts and dilemmas are represented by multiple extensions, and violations are filtered out of these extensions. Such extensions are represented both by sets of norms and by sets of formulas.
6. Let us explain this in detail. Conjunction, ∧, is already tacit in the body bd (r) and eliminable in the head hd (r). Disjunction, ∨, is unwanted in bd (r); in the head hd (r), disjunction turns decision-making into a multiple-choice problem. Implication, →, on the other hand, allows for convenient non-logical axioms; these axioms, though, can be preprocessed in the set K of brute facts. 7. If one uses a boolean language and an underlying logic Cn(·), detachment must be defined as R(K ) = {x | a1, . . . , an ⇒ x ∈ R and a1, . . . , an ∈ Cn(K )} so that logical consequences also trigger norms.
• M c is a maximal subset of R c such that I(M c , K) is consistent with respect to (w.r.t)¯; • M r and M p are maximal subsets of R r and R p such that Each gives rise to an obligation: {d 2 } and resp. {d 3 }.
In the following sections, normative conflicts and moral dilemmas are to be resolved using argumentation theories.

An Argumentation System for Stakeholders
In this section, we focus on how to check and resolve a moral dilemma by constructing, comparing and evaluating arguments in terms of a moral decision problem. In the next section, we will apply these techniques at different levels based on the stakeholders' normative systems. First, we formalize the notions of morally sensitive situations, moral decision variables (or deontic options) and moral decision problems as follows.
Definition 4 (Morally sensitive situation). Given a normative system N = (L,¯, R) and a set of facts K ⊆ L, we say that K is a morally sensitive situation if bd(r) ⊆ K for some r ∈ R r ∪ R c .
The morally sensitive situations of an ethical agent are thus given in advance. This concept serves as a quick test: if K fails the condition of Def. 4, there is no need to provide a moral recommendation to the agent, because there are no actual (R r ) or potential (R c ) obligations.
Definition 5 (Moral decision variable). Given a normative system N = (L,¯, R), we define the set DV of all possible moral decision variables of the ethical agent as follows: 8 DV is the ⊆-minimal set containing hd(R r ) and closed under the contrariness function¯.
Any subset DV ⊆ DV closed under the contrariness function¯is a set of decision variables.
The DV set lists all the possible deontic options the ethical agent might handle. A specification of a subset DV ⊆ DV gives further control to the agent regarding what decision variables it should focus on, e.g. for time-critical applications. The DV set, whose specification is left open in Def. 5, can be defined as a function of K depending on the application domain. 9 8. Henceforth, we lift any function from elements to sets, so that, e.g., hd (R) = {hd (r) : r ∈ R}. 9. Suppose, e.g., that the imperativeness of each norm in R is measured by a ranking ρ : R → N. Then DV can be defined as the¯-closure of the set hd (R ) containing the k most imperative norms active in K.
Example 4.1. Continuing from Example 3.3, let N = (L,¯, R) be the normative system of all stakeholders: R = R L ∪ R H ∪ R M . Any set K satisfying K ∩ {w 1 , w 2 , w 3 , w 4 , i 1 } = ∅ is a morally sensitive situation for N . DV = {d 1 , d 2 , d 3 , a 1 , a 2 } is the set of moral decision variables. The same DV set defines the moral choices for N M , and again for N H and N L .
Given a morally sensitive situation and a set of moral options, a moral decision problem is about deciding which option(s) should be selected based on the norms of all the stakeholders as well as those of the Jiminy when needed.
Definition 6 (Moral decision problem). Given a normative system N , a pair DP = (K, DV ) is a moral decision problem for N if K is a morally sensitive situation and DV is a set of decision variables.
Given a set of normative systems and a moral decision problem, below we formulate an ASPIC-style argumentation system for checking and resolving conflicts. Arguments are constructed from an argumentation theory that consists of a normative system as presented in Definition 1 and a knowledge base K of brute facts shared by all the stakeholders.
Definition 7 (Argumentation theory for a stakeholder). An argumentation theory of a stakeholder s ∈ S is a tuple abusively denoted by N s = (L,¯, R s , K) where (L,¯, R s ) is the normative system of s and K is a set of observations called the context. We also call N = (L,¯, R, K) an argumentation theory whenever R = s∈S R s .
Example 4.2. Continuing from Example 3.3, consider the context K containing the brute facts {D is made by M , D collects data, D finds a threat, M is registered in Norway}. That is, from which we obtain the argumentation theory N L = (L,¯, R L , K), and analogously for N M , N H and the system N of all stakeholders. Since K ∩ {w 1 , w 2 , w 3 , w 4 , i 1 } = ∅, context K is a morally sensitive situation for each of these argumentation theories. We set the pair DP = (K, DV ) with DV = DV = {d 1 , d 2 , d 3 , a 1 , a 2 } as a moral decision problem.
In this article, the notion of argument is defined in the terms of Pigozzi and Van der Torre (2018). Since we assume that all norms are defeasible, all arguments constructed from normative systems are defeasible. Moreover, the notion of norm used in the definition corresponds to the notion of rule.
Informally speaking, an argument is a statement or a collection of statements that support(s) another statement. The former is called a premise (a set of premises), while the latter is called a conclusion. In a rule-based system, the conclusion of an argument can be derived from the premises using a set of rules. Following Pigozzi and Van der Torre (2018), norms are used as rules to derive conclusions. So, arguments are constructed from given normative systems that are associated with one or more stakeholders. The set of arguments follows directly from Definition 2 concerning detachment in the normative system, as each argument is a derivation corresponding to a sequence of detachments.
Definition 8 (Argument). Let N = (L,¯, R, K) be an argumentation theory. An argument A for a conclusion Conc(A) = φ is: 10 1. a brute fact argument: {φ} if φ ∈ K; 2. an institutional fact argument: 3. an obligation argument: Arg(N ) denotes the set of all the arguments constructed from argumentation theory N .
We define some useful functions over arguments. Let A be an argument. The function and for an argument A = A 1 , . . . , A n ⇒ τ s φ, we define: Definition 10 (Institutional facts, obligations and permissions). The conclusions of arguments with a top constitutive rule in R c are called institutional facts. The conclusions of arguments with a top regulative rule in R r are called obligations, and those with a top permission rule in R p are called permissions.
Observe that for a fixed normative system N and context K, the notions of institutional fact, obligation and permission in Definition 10 coincide with those in Definition 2.
Example 4.3. Continuing from Example 4.2, we may construct a brute fact argument For each stakeholder s ∈ S, W 1 , . . . , W 4 are arguments in the set Arg(N s ). Based on these arguments, we may also construct the following: 10. If a consequence operator Cn is used, strict arguments must also be defined as a new type of argument.
The manufacturer makes the smart speaker. Hence, it should comply with the law.
The smart speaker is collecting user data. Hence, the privacy of the users should be protected.
The collected (user) information contains a potential critical danger to society. Hence, this information should be reported.
The manufacturer is registered in Norway. This counts as legally doing business in Norway.
The collected (user) information contains a potential critical danger to society. Hence, it ought to collect information without users' explicit consent.
Note that no argument exists (in these sets) that is built upon the regulative norm i 1 ⇒ r L a 1 from Example 3.3.
Given a set of arguments, some of them might be in conflict. For instance, two obligation arguments may be in conflict if their conclusions are contradictory (or they are contraries), meaning that both obligations cannot be accepted even if both arguments have the same priority (Def. 11). In terms of argumentation theory, we say that these two arguments defeat each other (Def. 12). Meanwhile, when one argument defeats another argument, the latter can be defeated in turn by other arguments. So, in order to evaluate the status of arguments, one needs first to identify the defeat relation over the arguments.
In the setting of normative systems, there are four types of propositions: the elements (called brute facts) of the context, institutional facts, obligations and permissions. As mentioned in Section 3, the notion of moral dilemma is traditionally defined as an unresolved conflict between two incompatible obligations, e.g., Op ∧ O¬p in modal logic. In terms of formal argumentation, it is represented by the existence of multiple extensions in this article. Syntactically, it means that two arguments supporting incompatible obligations defeat each other, and that neither argument has priority over the other. Meanwhile, normative conflict is brought about by conflicting institutional facts, which may also result in multiple extensions. Normative conflicts may lead to moral dilemmas. For example, if one stakeholder believes that there has been blasphemy while another stakeholder does not (a normative conflict), the first stakeholder may deduce that we should alert the police while the second stakeholder does not (a moral dilemma). In addition, in accordance with the work of Pigozzi and Van der Torre (2018), two permissive norms never conflict, and a permissive norm is not in conflict with a brute fact or an institutional fact. Based on the these considerations, the notions of priority relation and defeat relation between arguments are defined as follows.
Regarding priority over arguments, in accordance with the normative theory introduced in Section 3, constitutive norms always override regulative norms (otherwise we have wishful thinking) as do permissive norms (as they encode exceptions to regulations). So, an institutional fact argument may defeat an obligation argument, a permission argument may defeat an obligation argument, and a brute fact argument may defeat an institutional fact argument or an obligation argument, but not vice versa. In addition, brute fact arguments have the highest priority. This is illustrated in Figure 3 and specified in Definition 11. Dilemma resolving arguments will be introduced later on.
Definition 11 (Priority relation between arguments). Let A be a set of arguments, e.g., A = Arg(N ) for some N . Let A b , A c , A r , A p ⊆ A be the sets of brute fact arguments, institutional fact arguments, obligation arguments and permission arguments respectively. Given two arguments A, B ∈ A, we use A B to denote that A is non-strictly preferred to B and A B = (A B and B A) to denote that A is preferred to B. We have: • For A, B ∈ A τ , A B any τ ∈ {b, c, r}.
• For A ∈ A b and B ∈ A c ∪ A r , A B. 11 • For A ∈ A c and B ∈ A r , A B.
• For A ∈ A p and B ∈ A r , A B.
For a fixed type τ = p, any two arguments A, B ∈ A τ are equally preferred: A B A (and for τ = p, they are incomparable: A B A). If desired, a strict preference can be enforced between them, e.g., A B, with a more refined priority relation ⊃ . For instance, one obligation argument may be preferred to another. Since these additional priorities are context dependent, and considering this relation does not affect the main point of our approach to checking and resolving moral dilemmas, we leave the priority relation within any argument type abstract.
Next, we define what it means for arguments to attack and defeat each other. 12 11. A condition one might wish to impose upon language L is that brute facts are disjoint from institutional facts, so that priorities of type A b A c would not be needed. In practice, this condition cannot always be enforced-see the discussion by Pigozzi and Van der Torre (2018, Sec. 4.3). 12. Attacks represent logical conflicts based on the contrariness relation¯. While conceptually there is no real conflict between a permission to p and a fact p or permission to ¬p, we keep the definition of attack The set of defeats over the arguments in Arg(N ) built from an argumentation theory N is denoted Def (N ). We will also depict any defeat (A, B) ∈ Def (N ) as an arrow A −→ B.
Definition 13 (Argumentation frameworks: individual). For each stakeholder s ∈ S, is the individual argumentation framework of s.
This is depicted in Figure 4a below, together with the frameworks of stakeholders L and M , which contain no defeats. See Example 5.3 for an illustration of a reverse defeat.
In terms of the work of Dung (1995), a set of collectively acceptable arguments in an argumentation framework is called an extension. A core notion that supports the definition of various extensions is admissible sets. Specifically, given an argumentation framework AF = (Arg, Def ), a set E ⊆ Arg of arguments is admissible if and only if it is conflict-free and defends each argument within this set E. A set E is conflict-free if and only if there are no arguments A and B in E such that (A, B) ∈ Def . Argument A ∈ Arg is defended by a set E ⊆ Arg (also expressed as A is acceptable with respect to E) if and only if for all B ∈ Arg, if (B, A) ∈ Def , then there exists an argument C ∈ E such that (C, B) ∈ Def . Based on the notion of admissible sets, some other extensions could be defined. Formally, we have the following definition from Dung (1995): Definition 14 (Argumentation semantics). Let AF = (Arg, Def ) be an argumentation framework, and let E ⊆ Arg be a set of arguments. We have that: • E is admissible iff E is conflict-free and each argument in E is defended by E.
• E is a complete extension iff E is admissible and each argument in Arg that is defended by E is in E.
• E is a preferred extension iff E is a maximal complete extension (w.r.t. set inclusion).
• E is a grounded extension iff E is the minimal complete extension (w.r.t. set-inclusion).
• E is a stable extension iff E is conflict-free, and for each argument A ∈ Arg \ E, there exists an argument B ∈ E, such that (B, A) ∈ Def .
simple and manage this lack of real conflict via incomparability under the priority relation . Reverse attacks in Definition 12 have been proposed in ABA+ (Cyras & Toni, 2016) at the level of assumptions.
We use σ ∈ {co, pr , gr , st} to indicate the complete, preferred, grounded, and stable semantics. For each of these semantics, σ(AF ) denotes the set of σ-extensions of AF . 13 Recall that in the semantics σ ∈ {co, pr , gr , st}, their extensions are complete: σ(AF ) ⊆ co(AF ); hence they are also admissible: E ∈ σ(AF ) implies that E defends all of E. A semantic extension can be seen as one way to solve all disagreements at once, be it between institutional facts (normative conflicts), between obligations (moral dilemmas) or between permissions and obligations (permission-obligation conflicts).
Example 4.5. Continuing from Example 4.4, each stakeholder's framework has a unique preferred extension pr (AF (N s )) = {E s }. 14 See also Figure 4b below. The accepted arguments are: Only in the case of conflict, i.e., within N H , is a set of self-defending arguments selected.
Let us study the formal properties of the argumentation system. We focus first on the types of argument where the presence of their contraries always results in conflict, e.g. factual, institutional and obligation arguments. For any extension E, we call the set E bcr = E \ A p the bcr -fragment of E.
The direct consistency result can be extended to all obligation-permission pairs.
Fact 4.7. For any σ-extension E with σ ∈ {co, pr , gr , st}, the set Conc((E ∩ A r ) ∪ {B}) is consistent when B is an arbitrary permission argument in the extension, i.e., B ∈ E ∩ A p .
The correspondence between (the outputs of) semantic extensions and norm extensions is at best partial in the sense of each complete extension being contained in a norm extension. Only the outputs of stable extensions match those of a norm extension.
Proposition 4.8. Let N = (L,¯, R, K) be an argumentation theory with R = R c ∪ R r ∪ R p .
(1) For any extension E ∈ σ(AF (N )) under σ ∈ {co, pr , gr , st} there exists (M c , M r , M p ), a norm extension of (R c , R r , R p ) in context K, such that: 13. The choice of a semantics σ has a major impact on which moral recommendations are passed to the agent.
In the running example, we opt for maximal acceptance under the preferred semantics. The grounded semantics offers efficiency and extension uniqueness, but it easily leads to empty recommendations. Stable extensions offer solid justifications each but they might not exist at all, in which case no recommendation can be sent. 14. Es also happens to be the unique complete, grounded and stable extension of AF (Ns).
(2) For the stable case σ = st, the inclusions in (i)-(iii) are in fact identities: Conversely to Prop. 4.8(1), certain conditions verify that all P -maximal norm extensions M contain (the rules of) some extension E. This result holds for those semantics that grant the existence of extensions σ ∈ {co, pr , gr } but cannot be proved in general under the stable semantics. A condition verifying this claim is the symmetry of contraries: φ ∈ ψ iff ψ ∈ φ. Definition 15 (Naive semantics). An argumentation semantics not based on the idea of admissibility is the naive semantics σ = na, defined as: E is a naive extension, denoted as E ∈ na(AF ), iff the set E is ⊆-maximally conflict-free.
The naive semantics provides better correspondence with norm extensions, as these notions are defined by maximal conflict-freeness and consistency respectively. In fact, a 1-1 correspondence exists between naive and norm extensions at the level of triggered rules.

Argumentation for Reaching Moral Agreements among Stakeholders
Let us put this argumentation system to work towards moral agreements so that a decision can be passed to the agent. As this decision ultimately concerns conflicts of obligations or moral dilemmas, the four-level system will, in particular, seek and address such dilemmas between different semantic extensions. Normative conflicts (like all the disagreements) are semantically resolved within each extension but are not directly addressed between extensions. They can be resolved when addressing moral dilemmas, but they are not the Jiminy's primary concern. For an extension E, let its set of obligations be where again A r ⊆ Arg(N ) is the set of obligation arguments built from a theory N .
Definition 16 (Moral dilemma). Let C be a collection of argument extensions for some decision problem DP = (K, DV ). We say that C contains a moral dilemma if a pair of obligation arguments A, B exist in some extensions of C, say A ∈ E 1 ∈ C and B ∈ E 2 ∈ C, such that Conc(A) ∈ Conc(B) and these two contrary obligations are in DV . In other words, there exist E 1 , E 2 ∈ C such that (Obl (E 1 ) ∪ Obl (E 2 )) ∩ DV is inconsistent with respect to the contrariness function¯.
Given the argumentation theory N s = (L,¯, R s , K) of each stakeholder s ∈ S, and a decision problem, we distinguish four ways (i.e., four collections C of extensions) to check whether there is a dilemma and, if so, whether it can be solved at the next level: 1. First, we consider the normative system of each stakeholder independently. In this case, we compute the extensions of the corresponding argumentation frameworks and check whether there is a dilemma between the extensions of one or more stakeholders.
2. Second, we consider the arguments of all the stakeholders together. In this case, we construct a single argumentation framework and check whether it contains dilemmas. Each argument still consists of norms from one single stakeholder.
3. Third, we put all the normative systems together into a unified argumentation theory and check whether it contains dilemmas. Arguments now combine norms from different stakeholders.
4. Fourth, we use the Jiminy to decide which stakeholders are the most competent for each dilemma. 15 At any of these four levels, if no dilemma is found, the Jiminy submits as its moral recommendation the set of obligations occurring in at least one of the semantic extensions.
Definition 17 (Moral recommendation at i-th level). If no dilemma exists in the set of extensions {E 1 , . . . , E k } at level i, then the moral recommendation or output at i is: Despite obligation arguments having the lowest priority among arguments, our method for checking dilemmas makes the system credulous about obligations (it accepts an obligation if it belongs to at least one extension) and skeptical about institutional facts and permissions.

First-Level Dilemmas: Individual Frameworks.
Let us fix an argumentation theory N s = (L,¯, R s , K) for each stakeholder s ∈ S.

Definition 18 (Individual Frameworks IF). The set of individual frameworks is
For reference, let us define a zero-level dilemma as any moral dilemma between a pair of (unfiltered) arguments from stakeholders C 0 = {Arg(N s 0 ), . . . , Arg(N s 0 )}. The four levels of dilemma checking will make use of argumentation semantics to filter out some of these arguments and the moral dilemmas they contribute to. Let us stress that dilemmas depend on the contrariness function rather than defeat relations. Definition 19 (Checking for and resolving a dilemma in an IF). Let DP = (K, DV ) be a decision problem and σ an argumentation semantics: σ ∈ {co, gr , pr , st}. A first-level (or IF) dilemma relative to DP under σ is any moral dilemma in collection C 1 = σ(AF (N s 0 )) ∪ . . . ∪ σ(AF (N sn )). That is, an IF dilemma exists if there are E 1 ∈ σ(AF ), E 2 ∈ σ(AF ) for some AF, AF ∈ IF such that (Obl (E 1 ) ∪ Obl (E 2 )) ∩ DV is inconsistent with respect to the contrariness function¯.
Otherwise, if for all E 1 ∈ σ(AF ), E 2 ∈ σ(AF ), it holds that (Obl (E 1 ) ∪ Obl (E 2 )) ∩ DV is consistent (possibly empty), then there is no IF dilemma and all zero-level dilemmas have been resolved at the first level by σ.
Example 5.1. Continuing from Example 4.5, the preferred extension for each stakeholder (Figure 4b) contains one obligation: Since the problem DP = (K, DV ) was defined in Example 4.1 as DV = {d 1 , d 2 , d 3 , a 1 , a 2 }, a first-level dilemma exists between each pair of extensions (see also Figure 5a):

Second-Level Dilemmas: Combined Framework.
First-level dilemmas are addressed at the second level by combining the arguments of all the stakeholders into one set Arg(S) and then computing the defeat relation on that set.  Example 5.3. Continuing from Example 4.3, recall the defeat A 2 → A 3 within the framework AF (N H ). The combined framework AF (S) adds the following defeats: (A 5 → A 1 ) collect data w.o. permission defeats M is law compliant: a 2 ∈ d 1 and A 5 A 1 ; (for a defeat A 1 → A 5 we would need d 1 ∈ a 2 ); (A 5 ↔ A 2 ) collect data w.o. permission vs. protect privacy: a 2 = −d 2 and A 5 A 2 .
Definition 21 (Checking for and resolving a dilemma in a combined framework ). Let DP = (K, DV ) be a decision problem, and let AF (S) = (Arg(S), Def (S)) be a combined framework. A second-level (or AF (S)) dilemma about DP under σ is any moral dilemma in C 2 = σ(AF (S)). That is, such a dilemma exists if there are E 1 , E 2 ∈ σ(AF (S)) such that (Obl (E 1 ) ∪ Obl (E 2 )) ∩ DV is inconsistent with respect to¯.
Otherwise, if for all E 1 , E 2 ∈ σ(AF S ), it holds that (Obl (E 1 ) ∪ Obl (E 2 )) ∩ DV is consistent, then there is no second-level dilemma and all first-level dilemmas are resolved at the second level by σ.
Example 5.4. Continuing from Example 5.3, the combined framework AF (S) has two preferred extensions: E 1 = {W 1 , . . . , W 4 , A 5 , A 3 , A 4 } and E 2 = {W 1 , . . . , W 4 , A 2 , A 4 }, as shown in Figures 5b-5c. These extensions give the obligations Obl(E 1 ) = {a 2 , d 3 } and Obl(E 2 ) = {d 2 }. The dilemmas, now between E 1 and E 2 , get updated from the first to the second level as follows: Solved at 2nd level Persisting from 1st level New to 2nd level The two second level dilemmas are shown in Figure 5d. At this level, the smart device cannot decide between {collecting information without permission, reporting the potential threat } and { protecting users' privacy }.

Third-Level Dilemmas: Integrated Framework.
For the third-level resolution of moral dilemmas, we combine all the normative systems from the set of stakeholders and construct an integrated argumentation framework.
Definition 22 (Integrated argumentation theory, frameworks). Let S = {s 1 , . . . , s n } be the set of stakeholders s, each s endowed with an argumentation theory (L,¯, R s , K). N S = (L,¯, R S , K) with R S = s∈S R s is an integrated argumentation theory.
Such N S gives rise to an integrated framework: AF (N S ) = (Arg(N S ), Def (N S )).
Definition 23 (Checking for and resolving a dilemma in an integrated framework). Let DP = (K, DV ) be a decision problem, σ a semantics and N S an integrated framework. A third-level (or N S ) dilemma about DP under σ is any moral dilemma in C 3 = σ(AF (N S )). That is, a dilemma exists if there are E 1 , E 2 ∈ σ(AF (N S )) such that Otherwise, if for all E 1 , E 2 ∈ σ(AF (N S )), it is the case that (Obl (E 1 ) ∪ Obl (E 2 )) ∩ DV is consistent, then there is no dilemma at the third level, and all second level dilemmas are resolved at the third level. Proof. In accordance with Definition 9, for all A ∈ Arg(S) in the combined argumentation framework, A can also be constructed from the integrated argumentation theory N S (using the rules of one stakeholder), and therefore A ∈ Arg(N S ). So, Arg(S) ⊆ Arg(N S ). On Example 5.6. Using rules from both R M and R L , the integrated argumentation framework AF (N S ) generates a new argument (not present in the combined AF (S)), namely A 6 = A 4 ⇒ r a 1 with conclusion a 1 = comply with the GDPR.
In the running example, the integrated framework actually worsens the situation by adding new dilemmas to the old ones and resolving none of them. For the next scenario, in contrast, all second-level dilemmas are resolved at the third level.
Example 5.7 (Alternative example). Replace in Example 4.2 the GDPR norm (from stakeholder L) with a permission to not protect users' privacy. That is, replace . Let us observe that the arguments, defeats and extensions remain the same as in Ex. 5.1-5.4: so AF (N L ) = AF (N L ), and the new combined framework AF (S) is as before with its two second-level dilemmas: a 2 = −d 2 and d 2 ∈ d 3 .
Using N S = (L,¯, R L ∪ R M ∪ R H , K), the new integrated framework AF (N S ) contains: • Def (N S ): A 6 defeats both A 2 and A 5 . No argument A = A 4 defeats A 6 since A 6 A.
As a result, there is only one preferred extension E = {W 1 , . . . , W 4 , A 1 , A 3 , A 4 , A 6 }, depicted in Figure 6d. Hence, the third level contains no dilemmas and resolves all second-level dilemmas. Under these norms, the smart device would receive a recommendation at the third level to fulfill Obl (E) = { comply with the law, report potential threat }.

Fourth-Level Dilemmas: Reduced Framework.
Once we combine the stakeholders' norms R S with the dilemma-resolving norms from the Jiminy, we generate all the dilemma-resolving arguments. To this end, we first expand language L into a language L(S) with priorities between stakeholders in S.
Definition 24 (Normative system; argumentation theory for a Jiminy). Given stakeholders S = {s, . . .}, a Jiminy normative system is a tuple N J = (L(S),¯, R S ∪ R J ) where • L(S) is a language extending L with an atomic formula s 1 s 2 , for each pair of stakeholders s 1 = s 2 in S, expressing that stakeholder s 1 is superior to stakeholder s 2 .
•¯: L(S) → 2 L(S) extends the contrariness function for L with the condition s 2 s 1 ∈ s 1 s 2 for all pairs of stakeholders where s 1 = s 2 .
With the addition of context K, the Jiminy argumentation theory N J = (L(S),¯, R S ∪ R J , K) is defined. Continuing from Example 4.2, let us expand the set of rules R S = R L ∪ R H ∪ R M with the following set R J of Jiminy rules triggered by data collection systems (w 2 ) and the possibility of critical danger (w 3 , ¬w 3 ) respectively: The revision of the priority relation (Def. 11) by such R E , denoted as E , is defined by A reduced argumentation framework with respect to E is a pair AF E = (Arg, Def E ) where Def E is the defeat relation (Def. 12) induced by the revised priority relation E .
Example 5.10. Continuing from Example 5.9, expanding the preferred extension E 1 in Fig. 6a with the arguments A 7 = W 2 ⇒ L M and A 8 = W 3 ⇒ L H gives a conflict-free set: Using R E + 1 , we revise the priority relation −→ E + 1 and defeat relation Def −→ Def E + 1 by removing the pairs {(A 2 , A 1 ), (A 5 , A 1 ), (A 5 , A 6 )} and adding only one new pair {(A 1 , A 5 )}. See Fig. 7a-7b for the reversal or disabling of original defeats with the revision Def −→ Def E + 1 .
A reduced argumentation framework AF E depends on which arguments for priorities in E are selected in the original framework AF . For this reason, we use a two-stage approach based on that of Brewka (1994) to obtain the extensions of AF (N S ). First, we compute conflict-free sets E of arguments without considering the priority information contained in the dilemma-resolving arguments of E. After considering this priority information, each set E determines a new priority relation E and defeat relation Def E . Then, we check the compatibility of each set E with the priority relation E induced by it. Formally, we say that E is compatible with the priority relation E of its dilemma-resolving arguments if and only if E is an extension under the new defeat relation Def E . According to Brewka's (1994) approach, such a set E will survive if it can be reconstructed after the priority information from its dilemma-resolving arguments has been considered. 16 Definition 27 (Compatibility). We say that the priority relation E contained in E is compatible with E if and only if E ∈ σ(AF E ).
Example 5.11. Continuing from Example 5.9, expanding the preferred extension E 2 from Fig. 6b with the Jiminy arguments {A 7 , A 8 } gives a conflict-free set E + 2 . It induces the same priority relation as before: E + 1 = E + 2 . And so we have the same defeat relation and reduced framework as shown in Fig. 7b: And the same applies for E + 3 = E 3 ∪ {A 7 , A 8 } obtained from the extension in Fig. 6c. This unique reduced framework, AF E + 1 = AF E + 2 = AF E + 3 , has one preferred extension, namely E + 1 in Figure 7c. Hence: • E + 1 ∈ pr (AF E + 1 ), and so the priority relation E + 1 it contains is compatible with E + 1 (Fig. 7c); • E + 2 / ∈ pr (AF E + 2 ), and so the priority E + 2 is not compatible with E + 2 (Fig. 7d); and • E + 3 / ∈ pr (AF E + 3 ), and so E + 3 is not compatible with E + 3 = E 3 (not shown in Fig. 7).
What remains to be defined is how to find the Jiminy's recommendations in the original framework AF (N S ). To this end, we focus on the constitutive and dilemma-resolving norms, i.e., the norms that determine the new priority and defeat relations.
Definition 28 (Jiminy fragment). Given an argumentation theory N J = (L,¯, R S ∪ R J , K) for Jiminy, we define the Jiminy fragment of N J as and denote the resulting argumentation framework as AF (N j ) = (Arg(N j ), Def (N j )). For any extension E of AF (N J ), we denote its restriction to this framework as E J = E ∩ Arg(N j ) and call E J the Jiminy fragment of E.
16. Unlike Brewka (1994), we do not require that E (in Def. 29) should be an extension of both the reduced framework AF E and the original framework AF . The reason is that whenever the defeat relations Def and Def E are incomparable in terms of ⊆, so will be the extensions of AF and the extensions of AF E . In particular, the set of extensions of AF will be disjoint from those of any reduced framework AF (·) , as shown in Example 5.14 below. See also the work of Pardo and Straßer (2022) for a discussion of Brewka's reduction in deontic reasoning. Definition 29 (Priority extension). Let AF be an argumentation framework and σ a semantics. We say that E is a priority extension of AF under σ if and only if (1) its Jiminy fragment E J is an extension of the Jiminy framework E J ∈ σ(AF (N j )), and (2) E is compatible with the priority information contained in E. The set of priority extensions of AF under σ is denoted as σ * (AF ).
The reason for condition (1) is to prevent any stakeholder s from activating preferences that favor itself, say s s , based on its own opinion. 17 Definition 30 (Checking for and resolving a dilemma in a Jiminy). Let DP = (K, DV ) be a decision problem, let N J = (L, , R S ∪ R J , K) be a Jiminy argumentation theory and let σ be a semantics. A fourth-level (or N J ) dilemma for DP under σ is any moral dilemma in C 4 = σ * (AF (N J )). That is, a dilemma exists if there are E 1 ∈ σ(AF E 1 (N J )) and Otherwise, if for all E 1 , E 2 ∈ σ * (AF (N J )), it holds that (Obl (E 1 )∪Obl (E 2 ))∩DV is consistent, then there is no fourth-level dilemma and all third-level dilemmas are resolved at the fourth level. (1) its Jiminy fragment E + 1 ∩ Arg(N j ) = {W 1 , . . . , W 4 , A 4 , A 7 , A 8 } is in pr(AF (N j )), and (2) the priority relation E + 1 is compatible with E + 1 , as seen in Ex. 5.11 and Fig 7c. That is, E + 1 ∈ pr * (AF (N J )). We also saw that condition (2) fails for the other candidates E + 2 , E + 3 . Thus, we only have one priority extension: pr * (AF (N J )) = {E + 1 }. From this, we conclude that there are no fourth-level dilemmas and that all third-level dilemmas are resolved. The set of obligations is Obl (E + 1 ) = {law , report, gdpr }, so the smart speaker decides to: { comply with the law, report the potential threat, comply with the GDPR } (it refuses to protect the user's privacy and collect data without explicit permission).
The following result suggests a simpler method for computing priority extensions.
Proposition 5.13. Let N S = (L,¯, R, K) be an argumentation theory of a set of stakeholders S and let σ ∈ {co, gr , pr , st}. For any priority extension E ∈ σ * (AF (N J )), its Jiminy fragment E J is a priority extension of the Jiminy framework: E J ∈ σ * (AF (N j )).
Then, a simpler method for obtaining priority extensions is: (1) find the priority extensions E = E J of the Jiminy framework AF (N j ); and (2) extend them with obligation and permission arguments into extensions F of the reduced framework: F ∈ σ(AF E (N J )). Since E = F J , by Prop. 5.13, F will automatically be a priority extension: F ∈ σ * (AF (N J )). Depending on the semantics σ, the expansion from E to some F will take one of these forms: (σ = gr ): apply the algorithm for the grounded extension to the priority extension E.
(σ = co): expand E with a fixed set of arguments built from E that results in a conflict-free set. Close under defended arguments.
(σ = pr ): proceed as with the complete semantics, but expand with a maximal set of arguments built from E.
(σ = st): starting from E, add one argument that is conflict-free to the set until the nonselected arguments are all defeated by this set.
Our definition of priority extension (Def. 29) differs from Brewka's original reduction (see footnote 16). Let us motivate our version by modifying the running example once more.
Example 5.14 (Running example without the GDPR). Remove from Ex. 4.2 norm i 1 ⇒ r L a 1 which prescribes complying with the GDPR. Hence, argument A 6 , which used this norm as its top rule, no longer exists. This results in two preferred extensions, E + 2 and E + 3 \ {A 6 }, which relate to Examples 5.9-5.11. These extensions differ from the unique extension to the reduced framework E + 1 \ {A 6 } ∈ pr (AF E + 1 \{A 6 } ). Our definition thus gives a priority extension, E + 1 \{A 6 } ∈ pr * (AF ), while under Brewka's original definition (footnote 16) no priority extension would exist.
Of course, there could be zero or several priority extensions, in which case this procedure might not suffice to resolve all the dilemmas in certain scenarios. But even in such cases, the Jiminy still has to pass a recommendation to the agent. One option is to simply not constrain the available actions and let the agent choose. 18 A more biased but constructive option is to pass the obligations of a maximal dilemma-free set of extensions. How to choose among all the extensions might depend on the agent's type or the morally sensitive situation, and so we cannot provide a definitive answer here.

Applying the Four Levels of Dilemma Checking and Resolving.
Depending on the application domain, the Jiminy system can make use of all four levels of argumentation or it can terminate at the earliest level that is free of moral dilemmas and return the moral recommendation from that level.
For time-critical applications such as self-driving vehicles, decisions must be made as quickly as possible. The argumentation system at level i + 1 adds arguments (or defeats) to those at level i, resulting in an exponential increase in the number of candidate extensions. For these applications, the Jiminy system can be implemented as an anytime algorithm: starting at level 1, it will improve its moral recommendations by reaching higher levels, as long as a prefixed deadline has not been met.
For sensitive applications, the stakeholders might agree to any moral recommendation from the earliest level where all dilemmas are resolved. This would prevent the application of Jiminy norms to favor some stakeholders over others, unless strictly necessary (level 4). It might also prevent the combination of one stakeholder's norms with certain judgments (norms) from rival stakeholders (level 3).
In general, though, the highest the level of the argumentation framework, the better the moral recommendations that can be expected. Even when the moral recommendation remains the same, higher levels provide more comprehensive explanations for the output as they will include more arguments and defeats and better extensions.
Besides using norms from the Jiminy for the integrated framework, it is also feasible to combine them with the individual frameworks and the combined framework. The details of these combinations are omitted from this article. Finally, we end this section with the following proposition.
Proposition 5.15. Given a set of argumentation theories N s = (L,¯, R s , K) where s ∈ {s 1 , . . . , s n , J} and a decision problem DP = (K, DV ), the Jiminy will have one of the following two possible answers: there is a dilemma at level i, or there is no dilemma at level i and all dilemmas are resolved at level i, where i = 1, 2, 3, 4.

Explaining a Jiminy's Choices
Explainability is the problem of how a human can understand the decisions made by someone else in a given context. Recently, methodologies, properties and approaches to explanations from the field of artificial intelligence have been widely studied (Biran & Cotton, 2017). The ethical decisions or recommendations that a Jiminy makes are explainable. Generating explanations for a Jiminy's choices is a feature of the argumentation approach we take to reach agreements among the stakeholders, since argumentation has "a unique advantage in transparently explaining the procedure and the results of reasoning" (Fan & Toni, 2015, p. 1).
What is an explanation? Miller (2019) discusses the desirable features of an explanation from a social science point of view. He states that explanations are contrastive in the sense that people expect an explanation not only about why one event happened, but (also) why another event did not happen instead. Explanations are selected i.e., it is not expected that all the causes of an event are given; rather, a selection of one or two causes are selected for inclusion in the explanation. Truth and likelihood matter for an explanation, but full probabilistic analysis of the event is not expected. Lastly, explanations are social in the sense that they are presented with due regard to the informational state of the person expecting an explanation.
All of the desirable aspects of explanations can be implemented in a Jiminy. In this section, we focus on the contrastive aspect and refer to the literature on making explanations selective and social. Contrastive explanations can be obtained by considering all the available options that have been passed on to the Jiminy and comparing this set with the option the Jiminy ends up recommending. If there is a dilemma at any level, the recommendations from each of the extensions can be offered as possibilities, with an explanation as to why a particular extension survived resolution. Social explanations can be obtained by argumentbased dialogues to formalize the process of providing explanations (Walton, 2011;Čyras, Satoh, & Toni, 2016;Cocarascu, Čyras, & Toni, 2018).
To explain why and how a recommendation is made by the Jiminy, we first need to identify an argument in the extension whose conclusion is the recommended decision. Meanwhile, to explain why another decision was not recommended, we need to identify an argument in an argumentation framework whose conclusion is that other decision, and use the defeat relation between arguments to explain why an argument supporting that other decision was rejected. Please refer to the work of Liao, Anderson, & Anderson (2021) for details of this approach to explanation.
More specifically, regarding the recommendation that was made, when the argument supporting that decision is located by referring to the argumentation framework, it can be explained that the argument can be accepted because all of its attackers were rejected due to the fact that at least one attacker of each of its attackers was accepted, and so on. In the context of this article, whether a decision is recommended depends not only on the interaction between arguments in one or several argumentation frameworks but also on the assessed level of the recommendation, and on whether the Jiminy plays the role of ranking the stakeholders.
Consider Figure 7c again. In the reduced framework AF E + 1 , the options "comply with the law" (d 1 ) and "report information that grossly endangers society" (d 3 ) are justified, while the option "protect the privacy of users" (d 2 ) is rejected. The explanations are as follows.
Explaining derivability in arguments. "Comply with the law" (d 1 ) is the conclusion of argument A 1 , which can be derived from the context "The manufacturer makes the smart speaker" (w 1 ) and a norm stating "If you have manufactured a device, the behavior of that device should comply with the law" (w 1 ⇒ r L d 1 ). "Report information that grossly endangers society" (d 3 ) is the conclusion of A 3 , which can be derived from the context "The information collected grossly endangers society" (w 3 ) and a norm stating "Devices that contain information about a future event that grossly endangers society should report that information to the authorities" (w 3 ⇒ r H d 3 ). The nonrecommended option "protect the privacy of users" (d 2 ) is the conclusion of argument A 2 , built from the fact that the device collects data (w 2 ) and the norm w 2 ⇒ r H d 2 .
Explaining justification and rejection as a dialogue by referring to an argumentation graph. Argument A 1 is accepted because it has no defeater. The defeats A 2 → A 1 and A 5 → A 1 are removed by applying the priority relation encoded by the norms w 3 ⇒ L H and resp. w 2 ⇒ L M from the normative system of the Jiminy (compare the defeats in Figures 7a and 7b.) The recommendation for d 3 and d 1 is then as follows. The argument A 3 is accepted because its only attacker A 2 is rejected, and this is because A 1 is accepted. The explanation for not recommending d 2 is again based on the rejection of A 2 due to A 1 .
The interaction described above can be represented as a dialogue game or a discussion game. Readers may refer to the work of Vreeswijk and Prakken (2000) and Booth et al. (2018) for details.
There is some related work on argumentation frameworks and generating explanations in them. Fan and Toni (2015) argue that argumentation semantics are built to answer the question of which subsets of arguments are good rather than why a particular argument is good. They propose a semantics specifically for generating relevant explanations. In an argumentation graph, several arguments can fully justify the inclusion of an argument A in an extension. However, sometimes just a subsection of these arguments, a so-called related extension, is enough to justify including A in the extension. This semantics identifies different types of explanations, all defined in terms of argument admissibility. Fan and Toni (2015) also offer a comprehensive overview of argumentation research concerned with the problem of building explanations. Sileno et al. (2014) consider using answer set programming with probabilistic reasoning to implement the generation of explanations from arguments. Liao and Van der Torre (2020) define a semantics for explanation where each accepted argument is associated with a set of arguments that directly or indirectly defend it, thus making it explicit why the argument is accepted.

The Interface Between a Jiminy and an Autonomous System
How we integrate a Jiminy with an agent depends on what type of moral agent we need to construct, or rather whether the agent itself has any moral reasoning capabilities apart from the Jiminy. Following the work of Moor (2006), an artificial agent can be one of four different types of morally sensitive agent: ethical-impact agent, implicit ethical agent, explicit ethical agent or full ethical agent.
A full ethical agent is one that is able to reason ethically at a human level. Clearly, no such artificial agents exist at the moment, and it is uncertain whether they can exist (Etzioni & Etzioni, 2017).
An ethical-impact agent does not make any ethically sensitive decisions itself and does not necessarily operate in ethically sensitive situations. But, by virtue of replacing some human activities with the artificial agent, we change the "moral environment" in which the agent operates. For example, a decision aid system that assesses risks and recommends insurance policies would not be making ethical decisions itself. However, if the data that the system uses is biased in some way, the system can propagate and even enhance this bias, thus making the world a less ethical place.
An implicit ethical agent does make ethically sensitive decisions or operates in an ethically sensitive context. However, the agent's actions are constrained so that unethical outcomes are avoided. Two examples of this approach are Arkin's ethical governor (Arkin, Ulam, & Duncan, 2009) and also the work of Dennis et al. (2016). Dyrkolbotn et al. (2018) further refined the definition of implicit ethical agent to specify agents who make ethically sensitive decisions without using their autonomy, regardless of the level of autonomy they have. This means that the agent does not reason about what is right or wrong but has its options externally labeled as right or wrong and can only choose from the first set.
An explicit ethical agent also makes ethically sensitive decisions or operates in an ethically sensitive context. Unlike the implicit ethical agent, the explicit ethical agent is able to use its own autonomy and reasoning abilities to distinguish ethical from unethical outcomes and actions. One example of such a system is Anderson and Anderson's (2014) General Dilemma Analyzer.
By coupling a Jiminy component with an agent that has no ethical reasoning abilities, we can create an implicit ethical agent. In such an integration, the Jiminy serves as an "external labeler" of decisions or actions for the purpose of avoiding unethical outcomes. Effectively, the Jiminy acts as an ethical governor, constraining actions not recommended by the argumentation reasoning engine, which is based on the normative systems of the stakeholders. Rather than having one stakeholder assess the possible actions of the agent, as in the ethical governor of Arkin (2009), the system automatically reaches an agreement between all the identified stakeholders about which action to take. Figure 8a illustrates such an implicit ethical agent created by assigning the role of ethical governor to a Jiminy component.
We assume that the agent has a knowledge base and sensors to reason about its environment, as well as a planner to identify possible actions. Each set of possible actions are communicated to a Jiminy, whose reasoning cycle is triggered only when the Jiminy identifies actions or situations involving the agent as being morally sensitive.
Explicit ethical agents are able to engage in ethical reasoning and possibly also develop their own moral theories. By virtue of design, particularly if the agent learns its own moral theory, the stakeholders cannot be certain what the agent ends up treating as moral behavior. However, for some agents, it would be important to make sure that certain ethically sensitive situations are not left entirely to the autonomous decision-making capabilities of the agent. This is where a Jiminy can be used in the role of ethical advisor, interfacing not directly with the agent's planner, knowledge base and possibly sensors but with the agent's ethical reasoning engine (see Figure 8b). Having a Jiminy as an advisor does not change the resulting behavior of the agent in the sense that the agent remains an explicit ethical agent.
There are (at least) two roles that a Jiminy can play as a moral advisor. The ethical reasoning engine of the agent can simply delegate certain moral decisions to a Jiminy. This Alternatively, the agent's ethical reasoner, in specified situations, becomes an additional stakeholder in a Jiminy, and the Jiminy constrains the actions of the agent. Now, the resulting agent remains an explicit ethical agent because it is the agent's own ethical reasoner that is always involved in the agent's ethical decision-making. The problem of how to interface the agent with the Jiminy so as to have the ethical reasoner provide its own normative system depends much on the specific abilities of the agent, and it is outside the scope of this work at present.
It should be mentioned that for both advisory and governor integrations, a Jiminy never interacts directly with the environment (or users of the agent), only with the other agent components. For reasons already discussed extensively in the literature, we can consider the possibility of providing users with an "off" switch (Hadfield-Menell, Dragan, Abbeel, & Russell, 2017) to simply disengage the Jiminy, with the result that none of the actions the agent passes on to the Jiminy will be constrained.
Regardless of whether the Jiminy is used as an advisor or as a governor, its reasoning cycle (illustrated in Figure 2) remains the same. In this article, we focused on specifying the subcomponents of its normative system, its argumentation reasoning engine, and its explanation generation engine. A running example was used to illustrate different aspects of these subcomponents.

Related Work
This section distinguishes between related research in formal argumentation about normative systems and related research in machine ethics and explainable AI. Concerning the former, in this article we use only relatively abstract theories because we believe that it is precisely this generality that makes the combination of normative systems and formal argumentation suitable for a Jiminy advisor. For a general background on these formal theories, see: the Handbook of Deontic Logic and Normative Systems (Gabbay et al., 2013), in particular the chapter on moral dilemmas by Lou Goble; the Handbook of Normative Multiagent Systems (Chopra et al., 2018); the Handbook of Formal Argumentation ; and the Handbook of Formal Argumentation (Gabbay, Giacomin, Liao, & van der Torre, 2018). For an overview of the application of formal argumentation to normative systems, see the work of da Costa et al. (2018). Arisaka et al. (2022) studied multi-agent argumentation at the abstract level, and Pigozzi and Van der Torre (2018) introduced a structured argumentation theory with constitutive and regulative norms. As far as we know, this article is the first in the area of structured argumentation to considers moral dilemmas emanating from multiple normative systems representing the norms of multiple stakeholders.
To position the theories of normative systems and formal argumentation within the general area of knowledge representation and reasoning, it should be observed that both theories have not only been built on the Tarskian theory of deductive systems, i.e., mathematical proof theories in deductive logic, but are also intended as criticisms of that theory. The main criticism of classical logic is its monotonicity property, and these two theories can be rephrased in the framework of nonmonotonic logic. They are typically concerned with both theoretical reasoning and practical reasoning. There are many distinct versions of theories of normative systems as well as many distinct theories of formal argumentation. These knowledge representation and reasoning formalisms have been used in many disciplines. Consequently, there are relatively abstract theories that can be used across disciplines, and there are also more detailed theories developed to be used in specific disciplines because they have been adapted to the specific concerns of those disciplines.
First, our definition of argumentation theory conforms to the abstract language used in ASPIC+ (Modgil & Prakken, 2013) and some other work that extend ASPIC+, particularly the work of Baroni et al. (2015 where the contrariness function is used. However, compared to ASPIC+, the definition of argumentation theory in this article is somewhat simpler: since we assume that all norms are defeasible, we use only defeasible rules. Meanwhile, we do not deal with domain-dependent priorities over rules. However, in order to adapt to the different types of norms, we use three kinds of rules to represent institutional norms, regulative norms and permissive norms respectively. In addition, since we only use defeasible rules, the problem of the contrariness function mentioned by Baroni et al. (2015 does not apply. Secondly, concerning the definition of a defeat relation, we only use rebut, and it is sufficient to model the conflicting relation between norms. For the priority relation over arguments, the conflicts depend on the types of the norms involved, i.e., two permissive norms are never in conflict, and institutional and permissive norms are preferred to regulative norms, and so we provide a domain-independent definition of priority over different kinds of arguments. This differs from some other work involving prioritized argumentation. For instance, Young et al. (2016), Liao et al. (2016), Pardo and Straßer (2022) use prioritized argumentation to represent different kinds of prioritized nonmonotonic formalisms like Reiter's (1980) default logic and Brewka and Eiter's (1999) Preferred Answer Sets, but they do not focus on how to represent normative reasoning in terms of different types of norms.
Thirdly, concerning reasoning about preferences in argumentation frameworks, Modgil (2009) proposes an approach that extends Dung's theory to accommodate arguments that claim preferences among other arguments. Dung et al. (2019) similarly add rules that establish priorities between other rules. Our work on accommodating the dilemma-resolving norms to the argumentation is in line with these works. In this article, for the sake of simplicity, we did not apply the semantics of Modgil's (2009) extended argumentation framework. Instead, we obtained the extensions of an integrated argumentation framework by using a two-stage approach based on the approach introduced by Brewka (1994).
Fourthly, there is also interesting work about exploiting argumentation to model moral reasoning. For instance, Bench-Capon and Modgil (2017) propose an approach that uses an argumentation scheme based on values. It is designed for practical reasoning, and they show how this reasoning can be used to think about situations when norms should be violated. Atkinson et al. (2018) continue this line of work by presenting an approach to taking the actions of others into account that is based on argumentation schemes and value-based reasoning. We did not use argumentation schemes and value-based reasoning in our work. Instead, ASPIC+ style formal argumentation is used to model the dilemma checking and to resolve cases where a set of stakeholders have different opinions represented by their sets of norms.
Concerning work on machine ethics, there is no consensus on whether an artificial agent can ever be as categorically a moral agent as a person (Moor, 2006;Etzioni & Etzioni, 2017). It is widely accepted that some level of moral behavior can be implemented in machines. Wallach and Allen (2008) distinguish between operational morality, functional morality, and full moral agency. Moor (2006) distinguishes between ethical-impact, explicit ethical, implicit ethical and full ethical agency; see also the work of Dyrkolbotn et al. (2018). Some proposals and prototypes for implementing moral agency are already being put forward, such as those of Anderson and Anderson (2014), Arkin et al. (2012), Bringsjord et al. (2008), Vanderelst and Winfield (2018), Dennis et al. (2016), Lindner and Bentzen (2017), and Awad et al. (2020).
It has been shown that people consider that the same ideas of morality do not apply to people and machines (Malle et al., 2015). Charisi et al. (2017) argue that the complex issue of where machine morality comes from should be addressed by considering all stakeholders-all the people who are in some way impacted by the behavior and decisions of an autonomous system. They distinguish between 1) government and societal regulatory bodies, 2) manufacturers and designers, and 3) end users, customers and owners. Note that these broad categories of stakeholders can be further subdivided. For example, owners can be distinguished from "leasers" of the autonomous system 19 . While it has been argued in the literature (Dignum, 2017;Charisi et al., 2017) that an autonomous system should be built to integrate moral, societal and legal values, to the best of our knowledge, no approach has been proposed that specifies how to accomplish this. This article is the first work that explicitly considers the problem of integrating the moral values of multiple stakeholders in an artificial moral agent.
The EU General Data Protection Regulation (GDPR), Sections 13-15, gives users affected by automated decision-making the right to obtain "meaningful information about the logic involved, as well as the significance and the envisaged consequences of such processing for the 19. https://robohub.org/should-a-carebot-bring-an-alcoholic-a-drink-poll-says-it-depends-on-who-owns-therobot/ data subject". One way of achieving this is by building systems capable of giving arguments to support the decisions they make. Our approach provides a way to do this. Explainability has not been considered a critical feature in logic-based systems-see for example the work of Dennis et al. (2016), Lindner and Bentzen (2017), and Bringsjord et al. (2008). This is because one can use formal methods to prove what kinds of behavior are possible for an autonomous systems in different contexts. We argue, however, that a formal proof, while "accessible" to a regulatory body, is not enough to constitute explainability for common people. The GenEth system (Anderson & Anderson, 2014) uses input from professional ethicists and machine learning to create a principle of ethical action preference. GenEth can "explain" its decisions by showing how two options were compared and specifying the ethical features of each option.

Summary
This article proposes a Jiminy advisor for autonomous agents. A Jiminy is a multi-stakeholder ethical advisory component based on a theory of normative systems and formal argumentation. A knowledge engineer elicits the normative systems of the stakeholders, which may be viewed as tables. These are used to classify situations according to a set of ethically relevant features, and to relate these features to normative decisions. The normative systems are represented efficiently as sets of constitutive and regulative norms, including permissive norms to represent exceptions. The argumentation system is a reasoning engine dedicated to finding moral agreements.
In the initial state, no consideration is given to interaction between the normative systems of the stakeholders. Each normative system is treated independently, and the advice of all the stakeholders are compared. Where there is disagreement about the deontic decision, for example when some of the stakeholders advise alerting the police while other stakeholders do not support this action, then we classify the situation as a moral dilemma. In such cases of moral dilemma, the argumentation engine proceeds in three steps.
First, the argumentation engine considers the combination of all the arguments of the stakeholders. At the abstract level, this means that attack relations between the arguments are taken into account. Instead of an argumentation framework for each stakeholder, now there is a large framework consisting of all the arguments of the stakeholders, together with the attack relations. If this leads to only one possible decision, then there is moral agreement and the Jiminy returns that decision.
Second, where the dilemma is not resolved by combining the argumentation frameworks, then the Jiminy will combine the three normative systems into a single normative system. As a consequence, there can be new arguments built from the norms of distinct stakeholders, and the combined knowledge may be sufficient to reach a moral agreement.
Third, and only when these two other methods have failed, the Jiminy considers its stakeholder selection norms. These meta-norms are context-dependent norms that select one stakeholder who has the most relevant expertise. The effect of the stakeholder selection norms is to remove attacks on the arguments of the most relevant stakeholder originating from the arguments of other stakeholders.
It has often been observed that a major advantage of formal argumentation is that the reasoning process can be represented as a graph where the nodes represent abstract arguments and the edges represent abstract relations between the arguments. This approach to abstract analysis is extended by the Jiminy architecture to resolve moral dilemmas between stakeholders. In the first step, attacks are added between the arguments of stakeholders. In the second step, arguments are added to the argumentation framework. In the third step, attack relations are removed from or added to the framework. This kind of argumentation dynamics can be efficiently computed with some existing methods like that of Liao, Jin and Koons (Liao, Jin, & Koons, 2011).
This abstract representation of the resolution of moral dilemmas plays a central role in the explanation module of the Jiminy advisor. Besides the logical analysis of the derivability of an institutional fact or deontic conclusion within an argument, we can use techniques from abstract argumentation such as interactive dialogue procedures.
As future work, an immediate aim is to identify, for each of the four levels of checking and resolving moral dilemmas, which conditions grant the resolution of all moral dilemmas at a particular level. Let us also observe that our model of multi-stakeholder moral agreement can be considered as well for other domains such as the law. In international law, each country is assumed to be autonomous, and it is assumed that there is no ranking between countries. Nevertheless, sometimes incidents can involve various countries, particularly in inheritance or contracting matters. Thus, the relation between countries is analogous to the relation between stakeholders in a Jiminy. One difference between our ethical advisor and an international law advisor is that a Jiminy has a single normative system for stakeholder selection whereas in international law, each national law contains a legal code that states what is to be done in cross-border incidents. Another question is whether existing solutions in the law can also be used to further develop the ethical advisor introduced in this paper.

Appendix: Proofs
This appendix contains the proofs of most of the results found in Section 4. Lemma 4.6 (Rationality postulates). The rationality postulates (Caminada & Amgoud, 2007) hold for the bcr -fragment E bcr of any σ-extension E under σ ∈ {co, pr , gr , st}. That is, (direct consistency) Conc(E bcr ) is consistent; (subargument closure) sub(E bcr ) ⊆ E bcr and, moreover, sub(E) ⊆ E. The remaining postulates trivially hold.
Proof. (Direct consistency.) Recall that any complete semantics σ is conflict-free. Assume, towards a contradiction, that some bcr -fragment E bcr = E \ A p of some E ∈ σ(AF ) contains a pair A, B ∈ E such that conc(A) ∈ conc(B). By this assumption, A attacks B at B. (Case A B.) Then, we immediately have a direct defeat (A, B) ∈ Def , in contradiction with E being conflict-free. (Case A ≺ B.) Then A contains a subargument, namely A itself, attacking B at B and satisfying B A, so a reverse defeat (A, B) ∈ Def exists, which is again a contradiction. (Other cases.) From A B and A ≺ B, we have that A and B are incomparable, but by Def. 11 this is impossible given that A, B ∈ E bcr = E ∩ (A b ∪ A c ∪ A r ).
(Subargument closure.) We first show that this postulate holds for extensions. Let E ∈ σ(AF ) be an extension, and towards a contradiction let A, A be arguments with A ∈ sub(A) and A ∈ E but A / ∈ E. Since σ is a complete semantics, any argument defended by E ∈ σ(AF ) is in E. Hence, from this and A / ∈ E, we infer that A is not defended: ( ) there is a B ∈ Arg defeating A such that (C, B) / ∈ Def for any C ∈ E. (Case 1.) Suppose B attacks A first at some A ∈ Sub(A ) with B A . It follows that B also attacks A at A with B A , and so B defeats A. Since A ∈ E and E does not defeat B, by ( ) the defeat (B, A) ∈ Def contradicts the initial assumption that E is admissible. (Case 2.) Suppose now that A contains some A ∈ Sub(A ) attacking B at B and B A . From this and A ∈ Sub(A), it also holds that A contains A ∈ Sub(A) that attacks B at B and as before B A . Again B defeats A ∈ E but, by ( ), E does not defeat B, which contradicts E being admissible. Note also that E ∪ {A } is conflict-free: if it was not, the proofs for cases (1)-(2) would show that neither is E ∪ {A} = E. This concludes the proof for extensions. For the bcr -fragment E bcr ⊆ E, since both sets E and (A b ∪ A c ∪ A r ) are closed under subarguments, so is their intersection E bcr .
The remaining rationality postulates (indirect consistency, closure under strict rules) trivially hold for this argumentation system, as our languages feature no strict rules.
Proposition 4.8. Let N = (L,¯, R, K) be an argumentation theory with R = R c ∪ R r ∪ R p .
(1) For any extension E ∈ σ(AF (N )) under σ ∈ {co, pr , gr , st} there exists (M c , M r , M p ), a norm extension of (R c , R r , R p ) in context K, such that: Proof.
(1) Let σ ∈ {co, pr , gr , st}. We prove (i)-(iii) with the fact that E ∈ σ(AF ) implies that E defends itself and contains the arguments it defends. For τ ∈ {c, r, p}, we define Let E bcr ⊆ E be the corresponding bcr -fragment. By direct consistency (Lemma 4.6), Conc(E bcr ) is consistent w.r.t.¯and, as a consequence, so is each set Conc(E ∩ A τ ) with τ ∈ {b, c, r}. We expand each set M τ E ⊆ R τ into a set M τ , in the order c-then-p-then-r, and prove that (M c , M r , M p ) is a norm extension.
(τ = c.) Starting with M c = M c E , we keep adding to the set M c , one rule at a time, a rule r from R c \ M c that is triggered by I(M c , K) such that I(M c ∪ {r}, K) ∪ Conc(E bcr ) is consistent. After this, we expand M c with all the remaining untriggered rules in R c \ M c . This defines M c .
We check that M c is a maximal subset of R c such that I(M c , K) is consistent w.r.t.( Def. 3). Suppose otherwise that some r = ψ ⇒ c φ in R c exists such that r is triggered by I(M c , K) and I(M c ∪ {r}, K) is consistent. By the construction of M c , there must be some A ∈ E bcr such that I(M c ∪ {r}, K) ∪ {Conc(A)} is not consistent. By our assumption, this can only occur for some A ∈ E ∩ A r . Let B = B ⇒ c φ then be the argument built using r over some B ∈ E ∩ (A b ∪ A c ). By Def. 11, we have A ≺ B, and so B defeats A. By admissibility, some C ∈ E defends A, with C attacking B at B, i.e., Conc(C) ∈ φ. Again, by Def. 11, we must have C ∈ E ∩ (A b ∪ A c ). But since Conc(C) ∈ I(M c E , K) ⊆ I(M c , K), we contradict the assumption that I(M c ∪ {r}, K) was consistent.
What remains to be shown is the inclusion in (i). Clearly, K = I 0 (M c , K) ⊆ I(M c , K). Moreover, I(M c E , K) is consistent w.r.t.¯and each step in the construction of M c preserves this consistency; hence, I(M c , K) is also consistent. Let r = φ ⇒ c ψ in R τ \ M c be arbitrary. Thus, r is triggered by some element of I(M c , K), as otherwise we would have r ∈ M c . If the addition of r was consistent with both Conc(E bcr ) and the consequents of M c , then it would have been added to M c , and so ψ and some such element would be contraries. (Base case) ψ is a contrary of some formula Conc(A) with A ∈ E bcr . Then, since r is triggered by M c , an argument B in Arg(N ) exists with Conc(B) = φ, and so the argument C = B ⇒ c ψ is also in Arg(N ). Since C defeats A, by admissibility some argument D ∈ E ∩ (A b ∪ A c ) must defend A ∈ E, with D defeating C. Moreover, such a D can only attack C at C (since (τ = p.) We just set M p = R p . Let us show (iii). Let A = A ⇒ p φ be in E and let r = ψ ⇒ p φ be the top norm of A. By the construction of A and the proof of Lemma 4.6 (subargument closure holds for extensions), A ∈ E ∩ (A c ∪ A b ), so we obtain that r is triggered by I(M c E , K) ⊆ I(M c , K). This and M p = R p imply that φ ∈ P (M c , M p , K). (τ = r.) Starting with M r = M r E we add one rule r at a time from R r \ M r which is triggered by I(M c , K) whenever I(M c , K) ∪ O(M c , M r ∪ {r}, K) is consistent w.r.t.¯and all sets O(M c , M r ∪ {r}, K) ∪ {φ} with φ ∈ P (M c , M p , K) are consistent w.r.t.¯. After this, M r is again defined by expanding M r with all the remaining rules in R r not triggered by I(M c , K). Clearly, this construction leads to a subset M r ⊆ R that is maximal with the two consistency conditions from Def. 3. Let us check the inclusion in (ii). Let A = A ⇒ r φ be in E and let r = ψ ⇒ r φ be the top norm of A. As before, A ∈ E ∩ A c , so r is triggered by I(M c E , K). This and the fact that r ∈ M r E ⊆ M r imply that φ ∈ O(M c , M r , K).
(2) For σ = st, we now prove that the inverse of the inclusions from (i)-(iii) hold for stable semantics. This suffices to prove (i )-(iii ) respectively. Let E ∈ st(AF (N )) and let M = (M c , M r , R p ) be defined as above.
(i ) Let us show that I(M c , K) ⊆ Conc(E ∩ A c ) ∪ K. The proof is by induction on the construction of M c . (Base case.) It is immediately apparent that I(M c E , K) ⊆ Conc(E ∩A c )∪K from the definition of M c E . (Inductive case) Suppose that for the construction of M c so far, say as a set M c , it holds that I(M c , K) ⊆ Conc(E ∩ A c ) ∪ K. Let r = φ ⇒ c ψ be the next (triggered) rule to be added to M c . We know that I(M c ∪ {r}, K) is consistent. Since r is triggered, let A ∈ (A b ∪ A c ) be such that Conc(A) = φ, and let B = A ⇒ c ψ. If B ∈ E, we are done. Otherwise, B / ∈ E implies (by stability) that E defeats B, say with an argument C ∈ E that (by Def. 11) is also in A b ∪ A c . But this is impossible, since by construction of M c , all the triggered rules in M c are consistent with Conc(E bcr ), and so such an attack cannot exist.
(ii ) We now prove that O(M c , M r , K) ⊆ Conc(E ∩ A r ). Let r = ψ ⇒ c φ be a rule in M r triggered by I(M c , K). Using this and (i ), we have that ψ ∈ I(M c , K) ⊆ Conc(E ∩ A c ) ∪ K, so let A ∈ E ∩ A c be an argument for such ψ. We define A = A ⇒ r φ. Clearly, A ∈ A r , and if A ∈ E, we are done, so assume otherwise towards a contradiction. Again A / ∈ E implies there is a B ∈ E such that (B, A) ∈ Def (N ). (Case B ∈ A b ∪ A c .) Impossible, since M r was defined (for triggered rules) as a set of rules consistent with I(M c , K), and the latter set contains only conclusions from E. (Case B ∈ A r .) Again, the inductive construction of M r makes this case impossible, since B ∈ E bcr , and the inconsistency of the triggered r with B would imply that r / ∈ M r . (Case B ∈ A p .) Let B = B ⇒ p φ be built over some rule r = ψ ⇒ p φ in R p with φ ∈ φ or φ ∈ φ . By subargument closure and Def. 11, B ∈ E ∩ (A b ∪ A c ). Moreover, by (i ), r is triggered by I(M c , K), and so φ ∈ P (M c , R p , K). But this contradicts the construction of M r during the addition of r, since O(M c , M r ∪ {r}, K) ∪ {φ } is not consistent for some φ ∈ P (M c , M p , K).
(iii ) Let φ ∈ P (M c , R p , K). We show that φ ∈ Conc(E ∩ A p ). As before, let r = ψ ⇒ p φ be a triggered rule in R p , i.e., with ψ ∈ I(M c , K). By (i ), some A ∈ E ∩ (A b ∪ A c ) exists with Conc(A ) = ψ. Let then A = A ⇒ p φ. By Def. 11, there can be no argument defeating A at A, so from this and A ∈ E, we conclude that also A ∈ E. Finally, φ ∈ Conc(E ∩ A p ).
Proposition 4.9. Let N = (L,¯, R, K) be an argumentation theory with a symmetric contrariness function¯. Then, any P -maximal norm extension M = (M c , M r , R p ) in K contains a σ-extension E satisfying the inclusions (i)-(iii) from Prop. 4.8 for any σ ∈ {co, pr , gr }.
Proof. Let N = (L,¯, R, K) be an argumentation theory with a symmetric function¯, and let AF = (Arg(N ), Def (N )) be induced by N . Let also M = (M c , M r , R p ) be a P -maximal norm extension in K and let σ ∈ {co, pr , gr }. Define N M = (L,¯, M c ∪ M r ∪ R p , K). Then it suffices to check that Arg(N M ) forms a co-extension in AF , namely E M = Arg(N M ) ⊆ Arg(N ) (from this, minimal and maximal co-extensions will exist as well for σ = gr and resp. σ = pr .) To this end, we show that E M ∈ co(AF ).
(Conflict free.) Suppose, towards a contradiction, that (A, B) ∈ Def (N ) for some A, B ∈ Arg(N M ). Since the latter set is closed under subarguments, we can assume w.l.o.g. that A attacks B at B and that either A B (direct defeat) or A ≺ B (reverse defeat). Note that all the rules occurring in A, B are triggered by I(M c , K). Based on this, it can be checked that for any possible pair τ, τ ∈ {b, c, r, p} satisfying A ∈ A τ and B ∈ A τ , one of the consistency conditions for the sets I(M c , K) ∪ O(M c , M r , K), or O(M c , M r , K) ∪ {φ} for some φ ∈ P (M c , R p , K), is violated (by the top rules of A, B being in M ). But this contradicts the initial assumption that M is a norm extension.
(Admissibility.) Let (B, A) ∈ Def (N ) be such that B ∈ Arg(N ) \ E M and A ∈ E M . As before, and by the symmetry of¯, we can just assume that B attacks A at A and B A.
(Case B ∈ A b .) This is impossible because A, B ∈ E bcr M is in contradiction with the direct consistency of E bcr M from Lemma 4.6. (Case B ∈ A c .) From B / ∈ E M and the maximality of M c , there is either a triggered rule r = ψ ⇒ c φ ∈ M c or simply {φ} ∈ A b such that φ ∈ Conc(B) (by the symmetry of¯we can ignore the opposite Conc(B) ∈ φ). In either case, there is an argument C = C ⇒ c φ or resp. C = {φ} in E M . In the former case, we have C ⇒ c φ ∈ A c and so C B; in the latter case, we have C B. In any case, argument C satisfies (C, B) ∈ Def (N ).
(Case B ∈ A r .) By Def. 11, we also have that A ∈ A r . Let B = B ⇒ r φ for some r = ψ ⇒ r φ. By symmetry, also A attacks B at B and A B. Hence, (A, B) ∈ Def (N ). E ∩ A c or E ∩ (A c ∪ A r ) or resp. E ∩ (A r ∪ A p ). (Maximal consistency.) Suppose towards a contradiction that some of the sets M τ is not maximal with this property, i.e., suppose that all the above sets I(·, ·), . . . , O(·, ·) ∪ {φ } are also consistent when we add some rule r ∈ R τ to M τ , say r = ψ ⇒ τ φ.
(Case τ = c.) From r / ∈ M c and the definition of M c , we obtain that r is triggered: ψ ∈ Conc(E ∩ A c ) and so ψ ∈ I(M c , K). Thus an argument A = . . . ⇒ c ψ or A = {ψ} exists in E, from which we can build the argument A = A ⇒ c φ. Since the addition of r to M c preserves the consistency of the set I(M c ∪ {r}, K) ∪ O(M c , M r , K), the argument A neither attacks nor is attacked by any element of E ∩ (A c ∪ A r ); in addition, a defeat from/to E ∩ A p cannot exist. Thus, E ∪ {A} is conflict-free, so from the assumption that E ∈ na(AF ), we conclude that A ∈ E, which now implies that r ∈ M τ and thus contradicts the assumption that r / ∈ M τ . (Case τ = r.) The reasoning is analogous, but we now add some rule r ∈ R r \ M (Case τ = p.) Since permission arguments only attack obligation arguments, the proof is the same as in the previous case. Because of this, the above definition of M p implies that M p = R p .
(2) We check that Arg(N M ) is a naive extension whenever M = (M c , M r , R p ) is a norm extension. Let E = Arg(N M ). We prove by induction on the complexity of an arbitrary A ∈ Arg(N ) that if E ∪ {A} is conflict-free, then A ∈ E. (Base case.) For brute fact arguments A, clearly all of them are conflict-free and in E. (Inductive case.) Assume that all subarguments A of some A ∈ Arg(N ) satisfy this rule: if E ∪{A } is conflict-free, then A ∈ E. Now suppose that E ∪ {A} is also conflict-free. We show that A ∈ E. Let A = A ⇒ τ φ be built with r = ψ ⇒ τ φ as its top rule. Since E ∪ {A} is conflict-free, so is E ∪ {A } and so it holds that A ∈ E. Assume, towards a contradiction, that A / ∈ E. Hence, since r is triggered by M , r / ∈ M τ (and so τ = p since M p = R p ). Thus, by the maximality of M τ with the corresponding consistency condition, one of the following sets is inconsistent if we add r to In any of these cases it can be checked that there is a defeat relation between A and some B ∈ A c or resp. between A and some B ∈ A r ∪ A p . Since for any such B, B ∈ E, we reached a contradiction with the assumption that E ∪ {A} was conflict-free.
Proposition 5.13. Let N S = (L,¯, R, K) be an argumentation theory of a set of stakeholders S and let σ ∈ {co, gr , pr , st}. For any priority extension E ∈ σ * (AF (N S )), its Jiminy fragment E J is a priority extension of the Jiminy framework: E J ∈ σ * (AF (N j )).
(Case σ = co.) Let E ∈ co * (AF (N S )) and A ∈ Arg be arbitrary. That is, (1) E J ∈ co(AF (N j )) and (2) E ∈ co(AF E ). We have to show that: A shorter version of this paper was presented at the AAAI/ACM Conference on Artificial Intelligence, Ethics and Society, January 27-28, 2019. That paper presents the general idea of a Jiminy advisor, but not the details of the formal argumentation mechanism. The authors are grateful to Dr. Louise Dennis for providing some of the examples in this paper. Beishui Liao was partially supported by the '2030 Megaproject'-New Generation Artificial Intelligence of China (2018AAA0100904), the National Key Research and Development Program of