<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">A framework to model norm dynamics in Answer Set Programming</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Sofia</forename><surname>Panagiotidi</surname></persName>
							<email>panagiotidi@lsi.upc.edu</email>
							<affiliation key="aff0">
								<orgName type="department">Knowledge Engineering and Machine Learning Group</orgName>
								<orgName type="institution">Universitat Politecnica de Catalunya</orgName>
								<address>
									<country key="ES">Spain</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Juan</forename><forename type="middle">Carlos</forename><surname>Nieves</surname></persName>
							<email>jcnieves@lsi.upc.edu</email>
							<affiliation key="aff0">
								<orgName type="department">Knowledge Engineering and Machine Learning Group</orgName>
								<orgName type="institution">Universitat Politecnica de Catalunya</orgName>
								<address>
									<country key="ES">Spain</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Javier</forename><surname>Vázquez-Salceda</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Knowledge Engineering and Machine Learning Group</orgName>
								<orgName type="institution">Universitat Politecnica de Catalunya</orgName>
								<address>
									<country key="ES">Spain</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">A framework to model norm dynamics in Answer Set Programming</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">F2D6F26B7D842B115C0B9D8FC2C562A6</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-25T05:50+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>This paper presents ongoing work in the formal definition and implementation of a normative framework in Answer Set Programming. The framework uses as basis an existing action language and enriches it with a formal definition of norms (implementing standard deontic operators such as obligations and permissions). Properties of a norm's lifecycle such as active, inactive, violated are specified. We argue that such properties can serve as a reasoning basis for the agent's cycle. A partial implementation of the framework is then presented. An example is used in order to illustrate the application of the principles presented.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>The field of normative systems is an active area where researchers try to find formalisations and mechanisms to model and reason about normative statements. There is a lot of formal work on the formalisation of norms, typically based in variants of monadic or dyadic Deontic Logic. In this way, normative systems predefine the desired behaviour in terms of deontic concepts (obligations, prohibitions, permissions), which typically are extended with other concepts such as deadlines, violations and sanctions. But there is few work on how to bring these theories into practice.</p><p>One of the main barriers for the use of deontic-like formalisations is the lack of operational semantics <ref type="bibr" target="#b0">[1]</ref>. Without clear operational semantics an agent cannot clearly reason about the influence of these norms in its practical reasoning mechanism. Some attempts have been made to reduce deontic formalisations of norms into operational formalisations based on, e.g. dynamic Logic <ref type="bibr" target="#b1">[2]</ref> or Linear Temporal Logic <ref type="bibr" target="#b2">[3]</ref>, but often such formalisations cannot really be used at execution time.</p><p>Other attempts focus on extending existing operational formalisms with some normative concepts. These attempts mainly concern the design of action languages based on the effects of axioms and drawing inferences from the axioms and concentrate on ways of reasoning about actions. <ref type="bibr" target="#b3">[4]</ref> presents an action description language capable of expressing causal laws which describe effects of actions as well as statements about values of fluents in possible states of the world. Work of the same authors covers some aspects of reasoning over dynamic domains <ref type="bibr" target="#b4">[5]</ref> and representation and reasoning over properties of actions <ref type="bibr" target="#b5">[6]</ref>. In <ref type="bibr" target="#b6">[7]</ref> the authors intent to provide a logic based language in order to represent authorizations and obligation policies within dynamic environments as well as methods for checking compliance of performed actions with the defined policies. Still, the work lacks support for time. Insight into intelligent decision and possible prediction of desired or nondesired behaviours in advance seems to be absent too.</p><p>We are aware of the work in <ref type="bibr" target="#b7">[8]</ref> in which the authors present a language for implementing multi-agent systems consisting of individual agents that interact with a computational organization specified in terms of roles, norms and sanctions. Still, this piece of work adopts an organisation-centered view more on the flexible role enactment within a BDI cycle while ours assumes a static role enactment and focuses on a decision making mechanism inferring possible future action taking and violated states.</p><p>In the last two decades, one of the most successful logic programming approach has been Answer Set Programming (ASP) <ref type="bibr" target="#b8">[9]</ref>. ASP is the realization of much theoretical work on Non-monotonic Reasoning and Artificial Intelligence applications. It represents a new paradigm for logic programming that allows, using the concept of negation as failure, to handle problems with default knowledge and produce non-monotonic reasoning. Since its inception, ASP has been regarded as the computational embodiment of Nonmonotonic Reasoning and a primary candidate for an effective knowledge representation tool. This view has been boosted by the emergence of highly efficient solvers for ASP <ref type="bibr" target="#b9">[10]</ref>, <ref type="bibr" target="#b10">[11]</ref>, <ref type="bibr">[12]</ref>. The efficiency of the answer set solvers has allowed to increase the list of ASP's practical applications, e.g., planning <ref type="bibr" target="#b11">[13]</ref>, Bioinformatics <ref type="bibr" target="#b12">[14]</ref>, <ref type="bibr" target="#b13">[15]</ref>, argumentation theory <ref type="bibr" target="#b14">[16]</ref>, etc. Answer Set Programming does not represent a conventional logic programming approach as PROLOG. Usually an answer set program P can be regarded as a specification of a given problem where each answer set (a model) of P represents a possible solutions of the given problem.</p><p>In this paper (Figure <ref type="figure" target="#fig_0">1</ref>) we propose, based on a previous normative formalisation <ref type="bibr" target="#b15">[17]</ref>, a methodology to represent such normative frameworks in Answer Set Programming. This representation can be used as a basis for decision making procedures as well as planning methodologies. We use as example the obligations between two actors (a Insurance Company and a Repair Company) defined in a electronic contract. This contract is composed by deontic clauses which will become norms of the expected behaviour of the contractual parties. Therefore each instantiated contract becomes a normative context at execution time. The work is at a preliminary state. Still, integrated within an agent's operating cycle, such a framework can operate as the brain of the agent <ref type="bibr" target="#b16">[18]</ref>, providing the necessary information over the current state of the world such as pending norms and currently violated obligations. Additional layers of planning rules and preferred choices might lead to the desired intelligence and flexibility an agent needs to perform in a normative environment. We define several layers of abstraction (Figure <ref type="figure" target="#fig_0">1</ref>). An agent (possibly interacting with an ontology) can interpret the environment it operates in through an action language. The deontic restrictions (which in this paper come from a contract, but in other scenario could come from a Institutional specification) provide guidelines over the agent's behaviour and are formalised through a deontic framework.</p><p>Generic rules over the interpretation of norms, the interpretation of the action language and planning rules defined with respect to the action language might be added on top of the previous in order to be able to extract information over the agent's state, know the possible actions to take, predict possible violations and foresee future paths. Our interest and focus can be summarised in the following four:</p><p>• An action language representation • Contract (viewed as a set of norms) representation • Generic rules over the norm lifecycle • Generic planning and choice rules Currently, the three first of the above are implemented while the fourth and equally interesting issue is under research. In this paper we are aiming to provide the functionality of the aforementioned as well as some preliminary planning rules. We argue that the implemented layers leave further space for future research over the agent's planning capabilities and behavioural choices.</p><p>The rest of the paper is structured as follows. Section II defines the stable model semantics which is the basis for Answer Set Programming. In section III we present a simple motivating example which supports our work while in section IV we detail the action and normative language used and define formal properties of the framework with respect to the aforementioned. A partial implementation of the action and normative language in Answer Set Programming is provided in sections V and VI and parts of the motivating example presented in the beginning are cited in section VIII. We conclude in section IX and summarise future work.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. BACKGROUND</head><p>In this section, we present some basic definitions w.r.t. normal programs and the stable model semantics.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Syntax</head><p>A signature L is a finite set of elements that we call atoms. A literal is either an atom a, called positive literal; or the negation of an atom not a, called negative literal. Given a set of atoms {a 1 , ..., a n }, we write not {a 1 , ... If the body of a normal clause is empty, then the clause is known as a fact and can be denoted just by a ← . or simply a. We write L P , to denote the set of atoms that appear in the clauses of P . We denote by HEAD(P ) the set {a|a ← B + , not B − ∈ P }.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Stable model semantics.</head><p>The stable model semantics was defined in terms of the so called Gelfond-Lifschitz reduction <ref type="bibr" target="#b17">[19]</ref> and it is usually studied in the context of syntax dependent transformations on programs. The following definition of a stable model for normal programs was presented in <ref type="bibr" target="#b17">[19]</ref>:</p><p>Let P be any normal program. For any set S ⊆ L P , let P S be the definite program obtained from P by deleting (i) each rule that has a formula not l in its body with l ∈ S, and then (ii) all formulae of the form not l in the bodies of the remaining rules. Clearly P S does not contain not. Hence S is a stable model of P if and only if S is a minimal model of P S .</p><p>In order to illustrate this definition let us consider the following example:</p><p>Let S = {b} and P be the following logic program:</p><formula xml:id="formula_0">b ← not a. b ← . c ← not b.</formula><p>c ← a. We can see that P S is: b ← . c ← a. Notice that P S has three models: {b}, {b, c} and {a, b, c}. Since the minimal model amongst these models is {b}, we can say that S is a stable model of P .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. EXAMPLE</head><p>The focus of interest of this example is to show how a contract and a set of instantiated norms over the repair of a car operate within the domain and normative environment implemented in ASP. Such a case is useful to demonstrate how reasoning and planning over the norms defined in a contract can be done throughout its execution.</p><p>Our scenario is as follows: Two actors, a Repair Company and a Client create a contract (RepairContract) over the repair of a broken car. Initially, the Client takes the car to the Repair Company. Once the car is there, the Repair Company has to repair it. Whenever it is repaired, the Client has to pay a previously agreed price. Once the car is repaired, the client has the right to make a complaint.</p><p>Figure <ref type="figure" target="#fig_2">2</ref> depicts a pseudo-diagram including the interesting states that the process will go into. The focus of interest of this example is to show how the norms of an electronic contract (explicitly expressed as clauses in the contract) can be mapped into ASP rules and, in a combination with an appropriate action language, to reason over, plan future actions and detect violations within the agent's scope.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>IV. LANGUAGE USED</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Actions</head><p>The action description in our approach is done as in most action description languages. In this work we use the formalisation of <ref type="bibr" target="#b5">[6]</ref> but adapt several rules to fit our requirements.</p><p>Thus the alphabet of the action language A consists of two nonempty disjoint sets of symbols F and A. They are called the set of fluents and the set of actions. Fluents express the property of an object in a state of the world. A fluent or fluent literal (e.g. car_at_shop) is a positive literal or a strongly negated literal (a fluent preceded by ¬). A state σ is a collection of fluents. We say a fluent f holds in a state σ if f ∈ σ. We say a fluent literal ¬f holds in σ if f ∈ σ.</p><p>An action domain description D within the action language A consists of effect propositions of the following form:</p><formula xml:id="formula_1">a causes f if p 1 , ..., p n , ¬q 1 , ..., ¬q r (4.1)</formula><p>where a is an action in A, f is a fluent literal in F (also called postcondition of the action a) and p 1 , ..., p n , q 1 , ..., q r are fluents (also called preconditions of the action a) in F . We assume a set of initial observations O that consists of value propositions of the following form:</p><formula xml:id="formula_2">f after a 1 , ..., a m (4.2)</formula><p>where f is a fluent literal and a 1 , ..., a m are actions.</p><p>Intuitively that means that f will hold after the execution of a 1 , ..., a m . When a 1 , ..., a m is an empty sequence then we write:</p><formula xml:id="formula_3">initially f (4.3)</formula><p>We also condense a set of value propositions of the form {initially f 1 , ..., initially f n } by</p><formula xml:id="formula_4">initially f 1 , ..., f n (4.4)</formula><p>The role of effect propositions is to define a transition function from states and actions to states. Given a domain description D, such a transition function Φ should satisfy the following properties. For all actions α, fluents g, and states σ:  </p><formula xml:id="formula_5">• if D includes</formula></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Deontic statements</head><p>Norms (clauses) express agreements between parties in the form of deontic statements. In order to express the clauses we have adopted a variation <ref type="bibr" target="#b18">[20]</ref> [17] of the norm representation defined in <ref type="bibr" target="#b2">[3]</ref>.</p><p>Since norms may have normative force only in certain situations, they are associated with an activation condition. Norms are thus typically abstract, and are instantiated when the norm's activation condition holds. Once a norm has been instantiated, it remains active, irrespective of its activation condition, until a specific expiration condition holds. When the expiration condition occurs, the norm is assumed no longer to have normative force. Independent of these two conditions is the norm's normative goal, which is used to identify when the norm is violated (in the case of an obligation), or what the agent is actually allowed to do (in the case of a permission). Obligations and permissions are the two norm types on which our framework focuses. For every norm there is a maintenance condition which, if does not hold while the norm is active then a violation is considered to be taking place. Finally, for every norm there exists another one (violation norm) indicating what happens if it gets violated. Such properties of norms with respect to a normative environment are implemented in section VI.</p><p>We assume a set of norms DS. A norm N in DS is represented as a tuple of the form <ref type="bibr" target="#b15">[17]</ref>: &lt;N ormT ype, DeonticStatement, ActivatingCondition, M aintenanceCondition, DisactCondition, Actor&gt; (4.5) such that:</p><p>• N ormT ype ∈ {obligation, permission} The definition and semantics of permissions are not trivial. For example, it is dubious whether their existence can be assumed within the context of an environment without obligations. In <ref type="bibr" target="#b19">[21]</ref> the authors discuss the different types of permissions and their role in deontic logic. We assume that permissions are an explicit indication on what an actor can perform. As in standard deontic logic we assume further that whenever there is an obligation it is always implied that the same is a permission too (O a → P a , axiom D of deontic logic).</p><p>Example 2: Figure <ref type="figure">3</ref> depicts the formal representation of the deontic statements within the contract of the example presented in the third section. 2</p><p>Below we give some definitions with respect to the action language and the deontic statements. Let a norm N be in the form of (4.5) and σ be a state.</p><p>• N is activated in σ iff k 1 , ..., k n , ¬l 1 , ..., ¬l n hold in σ. We denote this as D |= DS, O,σ activated(N ). In the contrary case, N is not activated. We denote this as D |= DS, O,σ ¬activated(N ). • N is disactivated in σ iff u 1 , ..., u n , ¬v 1 , ..., ¬v n hold in σ. We denote this as D |= DS, O,σ disactivated(N ). In the contrary case, N is not disactivated. We denote this as D |= DS, O,σ ¬disactivated(N ). • N is violated in σ iff at least one of w 1 , ..., w n , ¬z 1 , ..., ¬z n does not hold in σ. We denote this as D |= DS, O,σ violated(N ). In the contrary case, N is not violated. We denote this as D |= DS, O,σ ¬violated(N ). .., g h } which we will refer to as goal. We are required to find a sequence of actions a a , ..., a n such that for all 1 ≤ i ≤ h, D |= O g i after a 1 , ..., a n and for all states σ passed throughout the execution of the actions, ∃σ such that D |= DS,O,σ violated(N ).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>V. REPRESENTATION OF ACTIONS</head><p>Given an action domain description D, a set of observations O and a set of deontic statements DS we construct a program that partially implements the above. The basic elements and definitions of types are (π basic ). The program putting into effect (D, O) consists of three parts namely π ef , π obs , π in which represent the effect propositions, observations and inertia rules. In addition, π norm and (π lc ) partly implement the norms specification and norm lifeycle. We denote the union of π basic ∪ π ef ∪ π obs ∪ π in ∪ π norm ∪ π lc as π.</p><p>In addition to the approach of <ref type="bibr" target="#b5">[6]</ref>, we assume that actions are durative. That is, they have a starting and ending time and a duration which is the interval between the two. For this, we use predicates like started and teminated to indicate the time that an action starts being executed and the time it terminates.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Basic elements</head><p>We introduce here some predicates (π basic ) which avoid the program to have weakly restricted rules.</p><p>(1) The predicate f luent. For every fluent f ∈ F we add the following rule to the program.</p><formula xml:id="formula_6">f luent(f ) ← .</formula><p>(2) The predicate action. For every action a ∈ A we add a rule: action(a) ← .</p><p>(3) The predicate time. The predicate is used to represent number of distinct times which in their turn represent the time flow. Initially time(T ) where T is a constant.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Action rules</head><p>(1) Translating effect propositions (π ef ). The effect propositions in D are translated as follows. For every effect proposition of the form (4.1) if f is a fluent in F then the following rules are created:</p><formula xml:id="formula_7">holds(f, T + 1) ← terminated(a, T ), time(T ).</formula><p>ab(f, a, T ) ← terminated(a, T ), time(T ).</p><p>else if f is the negative fluent literal ¬g then the following rules are created: ¬ holds(g, T + 1) ← terminated(a, T ), time(T ). ab(g, a, T ) ← terminated(a, T ), time(T ).</p><p>Intuitively, predicate holds indicates whether a fluent's value is true or false throughout time. The ab predicate represents changes of a fluent's value at some specific timestep.</p><p>(2) Translating observations (π obs ). We intentionally omit observations of the type (4.2) and assume that all observations are of the type (4.3). The value propositions in O then are translated as follows. For every value proposition of the form (4.3) if f is a positive fluent literal then the following rule is made: holds(f, 1) ← . else if f is the negative fluent literal ¬g then the following rule is created: ¬ holds(g, 1) ← .</p><p>(3) Inertia rules (π in ). Besides the above, we have the following inertia rules. The first one makes sure that if no action is executed during a timestep then a fluent will keep holding a true value at the next timestep if it already holds true at the current timestep. The second one makes sure that if a fluent holds a true value and the action that is performed at some timestep does not make it false, then in the next timestep it will also hold true. The third one says that if no action is executed during a timestep then a fluent will keep holding a flse value at the next timestep if it already holds false at the current timestep. The fourth one makes sure that if a fluent holds a false value and the action that is performed at some timestep does not make it true, then in the next timestep it will also hold false.</p><p>holds(F, T + 1) ← holds(F, T ), not terminated(A, T ). holds(F, T + 1) ← holds(F, T ), terminated(A, T ), not ab(F, A, T ).</p><p>¬ holds(F, T + 1) ← not holds(F, T ), not terminated(A, T ).</p><p>¬ holds(F, T + 1) ← not holds(F, T ), terminated(A, T ), not ab(F, A, T ).</p><p>The following proposition demonstrates how the holds predicate of π will hold a true value at some time step if f holds true at some state σ reached by the function Φ D . (4) Executability rules. It is assumed that every action might be executed whenever the conditions are fulfiled. We use the predicate executable to model the state where the preconditions of action are fulfiled and the action might be executed.</p><p>Thus, for every effect proposition of the form (4.1) the following is created:</p><p>executable(a, T ) ← holds(p 1 , T ), ..., holds(p n , T ), not holds(q 1 , T ), ..., not holds(q n , T ), time(T ).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>VI. REPRESENTATION OF DEONTIC STATEMENTS</head><p>We assume that for every norm N of the form (4.5) a unique id id is assigned to it. In order to represent a norm, a rule of the respective type below is made (π norm ). activating_condition(id, a, T ) ← holds(k 1 , T ), ..., holds(k n , T ), not holds(l 1 , T ), ..., not holds(l n , T ), time(T ).</p><p>disact_condition(id, a, T ) ← holds(u 1 , T ), ..., holds(u n , T ), not holds(v 1 , T ), ..., not holds(v n , T ), time(T ).</p><p>maintain_cond(id, a, T ) ← holds(w 1 , T ), ..., holds(w n , T ), not holds(z 1 , T ), ..., not holds(z n , T ), action(Action), time(T ).</p><p>Keeping in mind the normative semantics described in IV-B we define the rules that implement a norm's lifecycle (π lc ). The two rules below define when an obligation is active.</p><p>active(Id, Action, T ) ← obligation_activated(Id, Action, T ), action(Action), time(T ), obligation_id(Id).</p><p>active(Id, Action, T ) ← active(Id, Action, T − 1), not obligation_disactivated(Action, T ), action(Action), time(T ), obligation_id(Id).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>VII. REPRESENTATION OF PLANNING</head><p>We assume that for every action we have an estimated duration on its execution time: estimated_time(a, t) ← .</p><p>where t is a constant.</p><p>The generic rule started(Action, T ) ← obligation_activated(Id, Action, T ), executable(Action, T ), time(T ), action(Action), obligation_id(Id).</p><p>ensures that an action starts whenever it is executable and an obligation to execute it becomes active.</p><p>terminated(Action, T 2) ← started(Action, T 1), estimated_time(Action, EstimatedT ime), T 2 = T 1 + EstimatedT ime, time(T 2), time(T 1).</p><p>The generic rule violation(Id, Action, T ) ← active(Id, Action, T ), not maintain_cond(Id, Action, T ), action(Action), time(T ), obligation_id(Id).</p><p>detects a violation whenever a clause is active and the maintenance condition is not true.</p><p>The following propositions ensure the correctness of the program π implementing the norm's lifecycle properties. and DS and M one of its stable models. As seen in the example 3, in the state σ = [repair(rc)]σ 0 activated(N RC2 ) will hold. Thus, there for some T ∈ N activating_condition(id RC2 , repair(rc), T ) ∈ M where id RC2 is the unique identifier of the norm RC2.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>VIII. EXAMPLE</head><p>In our example, the initial observation can be: holds(at_shop, 0). For further information and the ASP code, the reader is referred to the web page where the code is hosted: http://www.lsi.upc.edu/ panagiotidi/aspcode IX. CONCLUSIONS, DISCUSSION AND FUTURE WORK Assuming the environment that an agent operates can be modelled by an action languange, norms impose restrictions on the behaviour of the agent. This paper presents ongoing work on the formal specification and development of a framework that enables to model an action language with respect to a normative environment. Semantics of the action language are based on <ref type="bibr" target="#b5">[6]</ref> and the language is partially implemented and further enriched with temporal projection. The deontic statements such as obligations and permissions as well as properties related to the norm's lifecycle (activation, disactivation, violation) are formalised and implemented according to <ref type="bibr" target="#b18">[20]</ref>. An attempt to define and apply planning techniques within the formal model and the implementation is made. This piece of work can be extended in various directions. Formal aspects of planning need to be carefully considered and taken into consideration while advancing with the use of the framework in order to reach conclusions on the future states. A formal notion of goal needs to be introduced in order to reach a desired state. Another interesting aspect to be examined is the use of weighted rules when reasoning with respect to norms against the possible effects of one or more violations. This will ensure that each agent can make decisions on execution time based not only on a set of norms indicating a desired behaviour but also on criteria such as desires, preferences and time constraints.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Fig. 1 .</head><label>1</label><figDesc>Fig. 1. Architecture of the normative framework implementation</figDesc><graphic coords="2,54.02,79.09,240.95,150.59" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head></head><label></label><figDesc>, a n } to denote the set of atoms {not a 1 , ..., not a n }. A normal clause, C, is a clause of the form a ← b 1 , . . . , b n , not b n+1 , . . . , not b n+m where a and each of the b i are atoms for 1 ≤ i ≤ n + m. In a slight abuse of notation we will denote such a clause by the formula a ← B + ∪ not B − where the set {b 1 , . . . , b n } will be denoted by B + , and the set {b n+1 , . . . , b n+m } will be denoted by B − . We define a normal program P , as a finite set of normal clauses.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Fig. 2 .</head><label>2</label><figDesc>Fig. 2. Pseudo states diagram</figDesc><graphic coords="3,54.02,262.97,240.94,118.25" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head></head><label></label><figDesc>an effect proposition of the form (4.1) where f is the fluent g and p 1 , ..., p n , ¬q 1 , ..., ¬q r hold in σ then g ∈ Φ(α, σ); • if D includes an effect proposition of the form (4.1) where f is a negative fluent literal ¬g and p 1 , ..., p n , ¬q 1 , ..., ¬q r hold in σ then g ∈ Φ(α, σ); • if D does not include such effect propositions then g ∈ Φ(α, σ) iff g ∈ σ;If such a transition function exists, then we say that D is consistent, and refer to its transition function by Φ D . Given a consistent domain description D the set of observations O is used to determine the states corresponding to the initial situation, referred to as the initial states and denoted by σ 0 . While D determines a unique transition function, an O may not always lead to a unique initial state.We say σ 0 is an initial state corresponding to a consistent domain description D and a set of observations O, if for all observations of the form (4.2) in O, the fluent literal f holds in the state Φ(α m , Φ(α m−1 , ...Φ(α 1 , σ 0 )...)) (We will denote this state by [α m , ..., α 1 ]σ 0 ). We then say that (σ 0 , Φ D ) satisfies O. Given a consistent domain description D and a set of observations O, we refer to the pair (Φ D , σ 0 ) where Φ D is the transition function of D and σ 0 is an initial state corresponding to (D, O) as a model of (D, O). We say (D, O) is consistent if it has a model and say it is complete if it has a unique model. We say a consistent domain description D in the presence of a set of observations O entails a query Q of the form (4.2) if for all initial states σ corresponding to (D, O), the fluent literal f holds in the state [α m , ..., α 1 ]σ 0 ]. We denote this as D |= O Q.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_4"><head>2 A</head><label>2</label><figDesc>assume that the set of actions A = {repair(Actor), pay(Actor), complain(Actor)}, the set of fluents F = {car_at_shop, repaired(Actor), paid(Actor), complained(Actor)} and that the domain description consists of the following: repair(Actor) causes repaired(Actor) if car_at_shop pay(Actor) causes paid(Actor) complain(Actor) causes complained(Actor) Also suppose we have a set of observations O = {initially car_at_shop, ¬repaired(rc), ¬ paid(cl), ¬ complained(cl)}. set of observations O is said to be initial state complete, if O only consists of propositions of the form (4.3) and for all fluents, either initially f is in O, or initially ¬ f is in O, but not both.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_5"><head>Fig. 3 . 2 Proposition 1 :</head><label>321</label><figDesc>Fig. 3. Formal representation of norms in the Repair Contract</figDesc><graphic coords="5,54.02,81.87,240.95,380.95" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_6"><head>Proposition 2 :</head><label>2</label><figDesc>Let D be a consistent domain description and O be an initial complete set of observations such that (D, O) is consistent. Let (σ 0 , Φ D ) be the unique model of (D, O) and M a stable model of π. If f is a fluent in F then f ∈ Φ D (α n , ..., Φ D (α 1 , σ 0 )) iff holds(f, T ) ∈ M for some T ∈ N.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_7"><head></head><label></label><figDesc>obligation_activated(Id, Action, T ) ← activating_condition(Id, Action, T ), not active(Id, Action, T − 1), action(Action), time(T ), obligation_id(Id). obligation_disactivated(Id, Action, T ) ← disact_condition(Id, Action, T ), active(Id, Action, T − 1), action(Action), time(T ), obligation_id(Id).</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_8"><head></head><label></label><figDesc>time(0..30). The model will include the following: obligation_activated(rc1, repair(rc), 0) obligation_disactivated(rc1, repair(rc), 10) obligation_activated(rc2, pay(cl), 10) obligation_disactivated(rc2, pay(cl), 11) action_started(repair(rc), 0) action_f inished(repair(rc), 10) action_started(pay(cl), 10) action_f inished(pay(cl), 11)</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head>•</head><label></label><figDesc>DeonticStatement is an action a in the set of actions A norm subset of A , ..., k n , ¬l 1 , ..., ¬l n , where k 1 , ..., k n , l 1 , ..., l n are fluents in F , ..., u n , ¬v 1 , ..., ¬v n , where u 1 , ..., u n , v 1 , ..., v n are fluents in F • a M aintenanceCondition is of the type: w 1 , ..., w n , ¬z 1 , ..., ¬z n , where w 1 , ..., w n , z 1 , ..., z n are fluents in F • a Actor is the actor responsible for the deontic statement</figDesc><table><row><cell>• an</cell><cell>ActivatingCondition</cell><cell>is</cell><cell>of</cell><cell>the</cell><cell>type:</cell></row><row><cell>k 1 • a</cell><cell>DisactCondition</cell><cell>is</cell><cell>of</cell><cell>the</cell><cell>type:</cell></row><row><cell>u 1</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_1"><head></head><label></label><figDesc>Proposition 4: Let D be a consistent domain description, O be an initial state complete set of observations such that (D, O) is consistent, DS a set of norms and M a stable model of π. If there is a state σ reached by Φ D such that D |= DS,O,σ disactivated(N ) then there is a T ∈ N such that disact_condition(id, a, T ) ∈ M where id is the unique identifier of the norm N and a is the DeonticStatement of the norm N . the unique identifier of the norm N and a is the DeonticStatement of the norm N . Example 4: Let D, O, DS be the domain description, observations and deontic statements of the examples 1 and 2, π the program modeling D, O</figDesc><table /><note>Proposition 3: Let D be a consistent domain description, O be an initial state complete set of observations such that (D, O) is consistent, DS a set of norms and M a stable model of π. If there is a state σ reached by Φ D such that D |= DS,O,σ activated(N ) then there is a T ∈ N such that activating_condition(id, a, T ) ∈ M where id is the unique identifier of the norm N and a is the DeonticStatement of the norm N .Proposition 5: Let D be a consistent domain description, O be an initial state complete set of observations such that (D, O) is consistent, DS a set of norms and M a stable model of π. If there is a state σ reached by Φ D such that D |= DS,O,σ violated(N ) then there is a T ∈ N such that maintain_cond(id, a, T ) and active(id, a, T ) ∈ M where id is</note></figure>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>X. ACKNOWLEDGEMENTS</head><p>This research has been funded by the FP7-215890 ALIVE project, funded by the European Commission. Javier Vázquez-Salceda's work has been also partially funded by the "Ramón y Cajal" program of the Spanish Ministry of Education and Science.</p></div>
			</div>

			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Multi-Agent Systems and Applications III: 3rd</title>
		<author>
			<persName><forename type="first">J</forename><surname>Vázquez-Salceda</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Dignum</surname></persName>
		</author>
		<ptr target="http://people.cs.uu.nl/dignum/papers/harmonia-CEEMAS03.pdf" />
	</analytic>
	<monogr>
		<title level="m">International/Central and Eastern European Conference on Multi-Agent Systems -CEEMAS&apos;03</title>
		<title level="s">Lecture Notes in Artificial Intelligence</title>
		<imprint>
			<date type="published" when="2003">2003</date>
			<biblScope unit="volume">2691</biblScope>
			<biblScope unit="page" from="584" to="593" />
		</imprint>
	</monogr>
	<note>Modelling electronic organizations</note>
</biblStruct>

<biblStruct xml:id="b1">
	<monogr>
		<title level="m" type="main">Deontic logic: a concise overview</title>
		<author>
			<persName><forename type="first">J.-J</forename><forename type="middle">C</forename><surname>Meyer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">J</forename><surname>Wieringa</surname></persName>
		</author>
		<imprint>
			<date type="published" when="1993">1993</date>
			<biblScope unit="page" from="3" to="16" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<monogr>
		<author>
			<persName><forename type="first">H</forename><surname>Aldewereld</surname></persName>
		</author>
		<title level="m">Autonomy vs. Conformity: an Institutional Perspective on Norms and Protocols</title>
				<imprint>
			<date type="published" when="2007">2007</date>
		</imprint>
		<respStmt>
			<orgName>Utrecht University</orgName>
		</respStmt>
	</monogr>
	<note type="report_type">PhD thesis</note>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Representing actions: Laws, observations and hypotheses</title>
		<author>
			<persName><forename type="first">C</forename><surname>Baral</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Gelfond</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Provetti</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">The Journal of Logic Programming</title>
		<imprint>
			<biblScope unit="volume">31</biblScope>
			<biblScope unit="issue">1-3</biblScope>
			<biblScope unit="page" from="201" to="243" />
			<date type="published" when="1997">1997</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<monogr>
		<title level="m" type="main">Reasoning agents in dynamic domains</title>
		<author>
			<persName><forename type="first">C</forename><surname>Baral</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Gelfond</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2000">2000</date>
			<biblScope unit="page" from="257" to="279" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Representing action and change by logic programs</title>
		<author>
			<persName><forename type="first">M</forename><surname>Gelfond</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><surname>Lifschitz</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Journal of logic programming</title>
		<imprint>
			<date type="published" when="1993">1993</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Authorization and obligation policies in dynamic systems</title>
		<author>
			<persName><forename type="first">M</forename><surname>Gelfond</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Lobo</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 24th International Conference on Logic Programming</title>
				<meeting>the 24th International Conference on Logic Programming</meeting>
		<imprint>
			<date type="published" when="2008">2008</date>
			<biblScope unit="page" from="22" to="36" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">Roles and norms for programming agent organizations</title>
		<author>
			<persName><forename type="first">N</forename><surname>Tinnemeier</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Dastani</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J.-J</forename><surname>Meyer</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">AAMAS &apos;09: Proceedings of The 8th International Conference on Autonomous Agents and Multiagent Systems</title>
				<meeting><address><addrLine>Richland, SC</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2009">2009</date>
			<biblScope unit="page" from="121" to="128" />
		</imprint>
	</monogr>
	<note>: International Foundation for Autonomous Agents and Multiagent Systems</note>
</biblStruct>

<biblStruct xml:id="b8">
	<monogr>
		<title level="m" type="main">Knowledge Representation, Reasoning and Declarative Problem Solving</title>
		<author>
			<persName><forename type="first">C</forename></persName>
		</author>
		<imprint>
			<date type="published" when="2003">2003</date>
			<publisher>Cambridge University Press</publisher>
			<pubPlace>Cambridge</pubPlace>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<monogr>
		<author>
			<persName><forename type="first">S</forename><surname>Dlv</surname></persName>
		</author>
		<ptr target="http://www.dbai.tuwien.ac.at/proj/dlv/" />
		<title level="m">Vienna University of Technology</title>
				<imprint>
			<date type="published" when="1996">1996</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<monogr>
		<title/>
		<author>
			<persName><forename type="first">S</forename><surname>Smodels</surname></persName>
		</author>
		<ptr target="http://www.tcs.hut.fi/Software/smodels/" />
		<imprint>
			<date type="published" when="1995">1995</date>
		</imprint>
		<respStmt>
			<orgName>Helsinki University of Technology</orgName>
		</respStmt>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">A logic programming approach to knowledge-state planning, ii: The DLV k system</title>
		<author>
			<persName><forename type="first">T</forename><surname>Eiter</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Faber</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Leone</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Pfeifer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Polleres</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Artif. Intell</title>
		<imprint>
			<biblScope unit="volume">144</biblScope>
			<biblScope unit="issue">1-2</biblScope>
			<biblScope unit="page" from="157" to="211" />
			<date type="published" when="2003">2003</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<title level="a" type="main">Modeling Biological Networks by Action Languages via Answer Set Programming</title>
		<author>
			<persName><forename type="first">S</forename><surname>Dworschak</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Grell</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><surname>Nikiforova</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Schaub</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Selbig</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Constraints</title>
		<imprint>
			<biblScope unit="volume">13</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="21" to="65" />
			<date type="published" when="2008">2008</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<analytic>
		<title level="a" type="main">A knowledge based approach for representing and reasoning about signaling networks</title>
		<author>
			<persName><forename type="first">C</forename><surname>Baral</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Chancellor</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Tran</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Tran</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">M</forename><surname>Joy</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">E</forename><surname>Berens</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">ISMB/ECCB (Supplement of Bioinformatics)</title>
				<imprint>
			<date type="published" when="2004">2004</date>
			<biblScope unit="page" from="15" to="22" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<analytic>
		<title level="a" type="main">Preferred Extensions as Stable Models</title>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">C</forename><surname>Nieves</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Osorio</surname></persName>
		</author>
		<author>
			<persName><forename type="first">U</forename><surname>Cortés</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Theory and Practice of Logic Programming</title>
		<imprint>
			<biblScope unit="volume">8</biblScope>
			<biblScope unit="issue">4</biblScope>
			<biblScope unit="page" from="527" to="543" />
			<date type="published" when="2008-07">July 2008</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b15">
	<analytic>
		<title level="a" type="main">Towards a formalisation of electronic contracting environments</title>
		<author>
			<persName><forename type="first">N</forename><surname>Oren</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Panagiotidi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Vázquez-Salceda</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Modgil</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Luck</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Miles</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Coordination, Organization, Institutions and Norms in Agent Systems, the International Workshop at AAAI 2008</title>
				<meeting><address><addrLine>Chicago, Illinois, USA</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2008">2008</date>
			<biblScope unit="page" from="61" to="68" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b16">
	<analytic>
		<title level="a" type="main">A middleware architecture for building contract-aware agent-based services</title>
		<author>
			<persName><forename type="first">R</forename><surname>Confalonieri</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Alvarez-Napagao</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Panagiotidi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Vázquez-Salceda</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Willmott</surname></persName>
		</author>
		<ptr target="http://www.springerlink.com/index/m84n55h118j86178.pdf" />
	</analytic>
	<monogr>
		<title level="j">LECTURE NOTES IN COMPUTER SCIENCE</title>
		<imprint>
			<date type="published" when="2008-01">Jan 2008</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b17">
	<analytic>
		<title level="a" type="main">The stable model semantics for logic programming</title>
		<author>
			<persName><forename type="first">M</forename><surname>Gelfond</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><surname>Lifschitz</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">5th Conference on Logic Programming</title>
				<editor>
			<persName><forename type="first">R</forename><surname>Kowalski</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">K</forename><surname>Bowen</surname></persName>
		</editor>
		<imprint>
			<publisher>MIT Press</publisher>
			<date type="published" when="1988">1988</date>
			<biblScope unit="page" from="1070" to="1080" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b18">
	<analytic>
		<title level="a" type="main">Intelligent contracting agents language</title>
		<author>
			<persName><forename type="first">S</forename><surname>Panagiotidi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Vázquez-Salceda</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Ąlvarez Napagao</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Ortega-Martorell</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Willmott</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Confalonieri</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Storms</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the Symposium on Behaviour Regulation in Multi-Agent Systems -BRMAS&apos;08</title>
				<meeting>the Symposium on Behaviour Regulation in Multi-Agent Systems -BRMAS&apos;08<address><addrLine>Aberdeen, UK</addrLine></address></meeting>
		<imprint>
			<date type="published" when="1988">April 2008, 1988</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b19">
	<analytic>
		<title level="a" type="main">Permissions and obligations in hierarchical normative systems</title>
		<author>
			<persName><forename type="first">G</forename><surname>Boella</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Van Der Torre</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 9th international conference on Artificial and law</title>
				<meeting>the 9th international conference on Artificial and law</meeting>
		<imprint>
			<date type="published" when="2003">2003</date>
			<biblScope unit="page" from="109" to="118" />
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
