<?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">An ASP-based system for preference handling and planning</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Stefania</forename><surname>Costantini</surname></persName>
							<email>stefania.costantini@univaq.it</email>
							<affiliation key="aff0">
								<orgName type="department" key="dep1">Dept. of Information Engineering</orgName>
								<orgName type="department" key="dep2">Computer Science and Mathematics</orgName>
								<orgName type="institution">University of L&apos;Aquila</orgName>
								<address>
									<addrLine>Via Vetoio</addrLine>
									<settlement>Coppito</settlement>
									<country>L&apos;Aquila</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Giovanni</forename><surname>De Gasperis</surname></persName>
							<email>giovanni.degasperis@univaq.it</email>
							<affiliation key="aff0">
								<orgName type="department" key="dep1">Dept. of Information Engineering</orgName>
								<orgName type="department" key="dep2">Computer Science and Mathematics</orgName>
								<orgName type="institution">University of L&apos;Aquila</orgName>
								<address>
									<addrLine>Via Vetoio</addrLine>
									<settlement>Coppito</settlement>
									<country>L&apos;Aquila</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Niva</forename><surname>Florio</surname></persName>
							<email>niva.florio@univaq.it</email>
							<affiliation key="aff0">
								<orgName type="department" key="dep1">Dept. of Information Engineering</orgName>
								<orgName type="department" key="dep2">Computer Science and Mathematics</orgName>
								<orgName type="institution">University of L&apos;Aquila</orgName>
								<address>
									<addrLine>Via Vetoio</addrLine>
									<settlement>Coppito</settlement>
									<country>L&apos;Aquila</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Claudia</forename><surname>Zuppella</surname></persName>
							<email>claudia.zuppella@hotmail.it</email>
							<affiliation key="aff0">
								<orgName type="department" key="dep1">Dept. of Information Engineering</orgName>
								<orgName type="department" key="dep2">Computer Science and Mathematics</orgName>
								<orgName type="institution">University of L&apos;Aquila</orgName>
								<address>
									<addrLine>Via Vetoio</addrLine>
									<settlement>Coppito</settlement>
									<country>L&apos;Aquila</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">An ASP-based system for preference handling and planning</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">B7D42549B5C5C98C04D5385BD04E09F0</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T23:58+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>
			<textClass>
				<keywords>
					<term>answer set programming</term>
					<term>logic programming</term>
					<term>preference handling</term>
					<term>resource management</term>
					<term>planning and scheduling</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Internet and mobile applications are becoming more and more helpful and widespread, while our daily lives are becoming increasingly busy and complicated. Preferences affect our actions, as well as those of intelligent agents. Answer Set Programming is a suitable framework for a decision making process which aims at supporting users by suitably planning their activities. Resourced Answer Set Programming (RASP) provides mechanisms for the optimization of answer sets according to preferences and resources. In this paper, an ASP-based system integrated with a mobile application able to plan the activities of a user is proposed, taking into account the context in which the user is located, the available resources, the geographical position and user's preferences.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>Everyone's daily life is becoming increasingly complicated and busy, and preferences affect our daily actions and the way in which we try to achieve our goals. On the other side, the technology, and in particular intelligent agents, is potentially able to help us, since mobile applications and the web in particular are becoming more and more helpful and are available on affordable mobile devices. In this scenario, evaluation and adequate handling of user preferences (expressed either in an explicit or in an implicit way) is becoming increasingly useful. In fact, an adequate preference handling system can help the user in the organization of everyday life. In fact, preferences affect the way intelligent agents (including human) act, and their decision-making process.</p><p>Approaches concerning preferences in (constraint) logic programming and non-monotonic reasoning are widely studied (cf., e.g., <ref type="bibr" target="#b8">[9]</ref>, <ref type="bibr" target="#b10">[11]</ref>, <ref type="bibr" target="#b11">[12]</ref> and <ref type="bibr" target="#b7">[8]</ref>). More specifically, reasoning on preferences in relation to Answer Set Programming (ASP, cf., e.g., <ref type="bibr" target="#b1">[2]</ref>, <ref type="bibr" target="#b0">[1]</ref>, <ref type="bibr" target="#b9">[10]</ref> and [13]) has been investigated (see among many <ref type="bibr" target="#b1">[2]</ref>, <ref type="bibr" target="#b3">[4]</ref>, <ref type="bibr" target="#b5">[6]</ref> and <ref type="bibr" target="#b2">[3]</ref>) These approaches introduce preferences either globally (e.g., <ref type="bibr" target="#b3">[4]</ref>) or among rules (e.g., <ref type="bibr" target="#b13">[14]</ref>). Particularly suitable to our purposes seems to be the Resourced Answer Set Programming (RASP), an extension of ASP that supports declarative reasoning on consumption and production of resources and allows to model and plan preferences on these aspects in a very simple way (see <ref type="bibr" target="#b5">[6]</ref>, <ref type="bibr" target="#b4">[5]</ref> and <ref type="bibr">[7]</ref> for a comprehensive treatment about RASP).</p><p>In this paper, we illustrate the design of an integrated system able to plan activities of users, taking into account the context in which the user is located, the available resources, the geographical position and her/his preferences. This system, which is being implemented, is ASP-and RASP-based and can interact with the user through a mobile application. In Section 2 we briefly overview RASP, while in Section 3 the design of the system is described and in Section 4 we conclude.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">RASP</head><p>Even resource production and consumption processes are connected with preferences: in fact, an agent may prefer to use some resources and not others in a given situation, or it may prefer to use available resources for obtaining a certain resource rather than others. o Resourced Answer Set Programming (RASP) extends the ASP framework by introducing resources and preferences. With RASP we can easily specify available resources and the amount of resources needed to produce others: it supports reasoning about resource consumption and production, according to preferences. Resources are modelled by amount-atoms of the form q#a (q is the kind of resource and a its available quantity<ref type="foot" target="#foot_0">1</ref> ). Amount-atoms are used in r-facts (RASP-facts) to represent the available quantities of resources. Thanks to r-rules (RASP-rules), a specific quantity of certain resources can be transformed into a specific quantity of another resource: amount-atoms in the body of a rule model the consumed resources, while in the head they model the resources produced by that rule. An r-rule can be fired several times thanks to the prefix [N − M ] (respectively the minimum and the maximum number of times a rule can be fired). In the following example (1), the rule can be fired from one to four times, producing from one to four portions of pasta according to available resources; to produce one portion of pasta with pesto the needed resources are 80 gr. of pasta and a little bottle of home made pesto, while to make that bottle of pesto we need some grams of many ingredients: (1)</p><p>If we want to clearly express which resource we prefer to use, we have to introduce p-lists (i.e. preference-lists), where the leftmost element of the list has high priority. For example, we can state that when we cook pasta with pesto we prefer to use home made pesto rather than pesto from supermarket:</p><p>[1 − 4]pasta with pesto#1 ← pasta#80, (home made pesto#1 &gt; supermarket pesto#1).</p><p>(</p><formula xml:id="formula_0">)<label>2</label></formula><p>RASP provides also two kinds of conditional preference lists (cp-list): pref when and only when lists. Suppose that one prefers normal pasta instead of gluten free pasta, but not in case of allergy: the only when condition is false and the cp-list is ignored. And suppose that when one has guests, one prefers to use home made pesto instead of supermarket pesto: if the condition has guest does not hold, the cp-list becomes simply a disjunction.</p><p>[1 − 4]pasta with pesto#1 ← (pasta#80 &gt; gluten f ree pasta#80 only when notallergy), (home made pesto#1 &gt; supermarket pesto#1 pref when has guest).</p><p>(3)</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Framework Design</head><p>The design of an ASP-based integrated system for preference and resource management and planning is proposed here as a concrete application in real-world contexts. The main purpose of this system is to simplify our daily life, and for this reason the ASP-based system is integrated with web services to reach users everywhere, in every moment and situation via inexpensive mobile devices, typically smartphones. It is important to notice that the system is able to handle even conditional preferences and priorities among preferences. Furthermore, starting from the user's geographic location, the system optimizes the preferred answer sets according to her/his objectives, whether they are declared in an explicit or implicit way. Resources managed by the system are al least time and money, but the enduser can define others, through a web application interface, so to ensure a simple customization and personalization of the system. The framework is composed of different parts (Fig. <ref type="figure" target="#fig_0">1</ref>): a database, a web application, an answer set viewer and the core of the system. In the database, the data needed by the system to make inferences are stored. It is a NoSQL database (http://nosql-database.org/), useful when we have to deal with a huge quantity of data that do not require a relational model. NoSQL is the de facto standard for mobile applications, and has bee chosen in view of efficiency and scalability, since the reasoning part is performed by the ASP module and thus no complex queries are needed. Data extracted from the database are processed by the data-transformer module, that transforms query results into an ASP-compatible format. At first, a pre-processing is needed: the system extracts the activities to plan and the preferences from the database, and then constructs suitable RASP rules and ASP facts and rules (needed to describe available resources and constraints). At this point, the files built in the previous step are processed by the ASP/RASP reasoning module, that consists of two parts: the ASP interpreter processes the data and grounds the program; the RASP interpreter processes the ground program and produces the preferred answer sets. Finally, these answer sets are transformed into a format understandable by a non academic user: the interaction between end-users and the system is made through the web application, via a smartphone. The end interface also performs user monitoring and profiling, feeding the system with new data, so as to elicit user needs, habits and preferences.</p><p>In the implementation which is being developed, the database and ASP/RASP parts are on a server, while the interface is on the mobile. In perspective (i.e., when a suitable deployment will be available) for the sake of scalability the ASP/RASP part can be moved on the mobile. Let us provide an example of use. Assume that John wants to keep fit and hates gyms, but loves being outdoors and is very busy because of his new job: the system can produce a training program tailored for him in real time, that changes from time to time according to his preferences, resources, objectives and the place he actually is (the current user geographic and contextual location). The database has a catalogue of gym exercises, John's preferences (he hates gym, loves being outdoors, etc.), his available resources (the amount of his free time today, exercise equipment he has at home, parks nearby, and so on), resources he wants to be produced (e.g. loss of weight). If it is a sunny day, but John is very busy and has a lot of work to do: the system plans for him a run in the park near the office during his lunch break and exercises suitable for outdoor. However, if it is a rainy day and John had a rough day, the system plans for him training less hard exercises he can do while watching TV.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Concluding Remarks</head><p>The main purpose of the proposed framework is not to advance the state of the art of ASP and RASP approaches, but to realize an innovative application of logic programming, by means of an effective integration with modern technologies affordable and understandable by everyone. The architecture includes in fact a suitable user interface, which is being designed so as to be understandable also by elder or impaired users, for which such a system can be particularly useful.</p><p>The novelty is the design of the framework itself; it aims at moving ASP and RASP outside the academic world, into the real world, and make them usable in concrete situations by ordinary people. In fact, we gave two small examples that can represent situations of our daily lives: in the first (see Section 1) the system can be a cooking teacher who offers us recipes suitable to our needs, while in the second (see Section 2) a personal trainer that offers custom workouts.</p><p>As mentioned, an implementation is under way, where the system will be able to automatically learn user preferences and objectives through machine learning mechanisms typical of proactive and adaptive agents.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>[ 1 −</head><label>1</label><figDesc>4]pasta with pesto#1 ← pasta#80, home made pesto#1. home made pesto#1 ← basil#15, garlic#1, pine nuts#25, oil#10, grated parmesan#25. basil#300. pine nut#250. garlic#3. oil#120. grated parmesan#120.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Fig. 1 .</head><label>1</label><figDesc>Fig. 1. The framework</figDesc><graphic coords="3,131.93,556.06,345.85,85.19" type="bitmap" /></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0">For lack of space we do not consider management of quantities here, and in the example we just use integers.</note>
		</body>
		<back>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<monogr>
		<author>
			<persName><forename type="first">C</forename><surname>Anger</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Schaub</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Truszczynski</surname></persName>
		</author>
		<title level="m">Aspargus-the Dagstuhl initiative</title>
				<imprint>
			<date type="published" when="2004">2004</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<monogr>
		<title level="m" type="main">Knowledge representation, reasoning and declarative problem solving</title>
		<author>
			<persName><forename type="first">C</forename><surname>Baral</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2003">2003</date>
			<publisher>Cambridge University Press</publisher>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">From preference logics to preference languages, and back</title>
		<author>
			<persName><forename type="first">M</forename><surname>Bienvenu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Lang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Wilson</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Proc. KR</title>
		<imprint>
			<date type="published" when="2010">2010. 2010</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Complex preferences for answer set optimization</title>
		<author>
			<persName><forename type="first">G</forename><surname>Brewka</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Principles of Knowledge Representation and Reasoning: Proc. of the Ninth International Conference (KR2004)</title>
				<imprint>
			<date type="published" when="2004">2004</date>
			<biblScope unit="page" from="213" to="223" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Extending and implementing RASP</title>
		<author>
			<persName><forename type="first">S</forename><surname>Costantini</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Formisano</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Petturiti</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Fundamenta Informaticae</title>
		<imprint>
			<biblScope unit="volume">105</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="1" to="33" />
			<date type="published" when="2010">2010</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Modeling preferences and conditional preferences on resource consumption and production in ASP</title>
		<author>
			<persName><forename type="first">S</forename><surname>Costantini</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Formisano</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Journal of Algorithms</title>
		<imprint>
			<biblScope unit="volume">64</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="3" to="15" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Answer set programming with resources</title>
		<author>
			<persName><forename type="first">S</forename><surname>Costantini</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Formisano</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Journal of Logic and Computation</title>
		<imprint>
			<biblScope unit="volume">20</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="53" to="571" />
			<date type="published" when="2010">2010</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">Preference logic grammars: fixed point semantics and application to data standardization</title>
		<author>
			<persName><forename type="first">B</forename><surname>Cui</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Swift</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Artif. Int</title>
		<imprint>
			<biblScope unit="volume">138</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="117" to="147" />
			<date type="published" when="2002">2002</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">Preferences in AI: An overview</title>
		<author>
			<persName><forename type="first">C</forename><surname>Domshlak</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Hllermeier</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Kaci</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><surname>Prade</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Artif. Intell</title>
		<imprint>
			<biblScope unit="volume">175</biblScope>
			<biblScope unit="issue">7-8</biblScope>
			<biblScope unit="page" from="1037" to="1052" />
			<date type="published" when="2011">2011</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">Answer sets</title>
		<author>
			<persName><forename type="first">M</forename><surname>Gelfond</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Foundations of Artificial Intelligence</title>
		<imprint>
			<biblScope unit="volume">3</biblScope>
			<biblScope unit="page" from="285" to="316" />
			<date type="published" when="2008">2008</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<analytic>
		<title level="a" type="main">Preference queries in deductive databases</title>
		<author>
			<persName><forename type="first">K</forename><surname>Govindarajan</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Jayaraman</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Mantha</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">New Generation Computing</title>
		<imprint>
			<biblScope unit="volume">19</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="57" to="86" />
			<date type="published" when="2001">2001</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">Mode-directed preferences for logic programs</title>
		<author>
			<persName><forename type="first">H</forename><forename type="middle">F</forename><surname>Guo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Jayaraman</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of the 2005 ACM symposium on Applied computing</title>
				<meeting>of the 2005 ACM symposium on Applied computing</meeting>
		<imprint>
			<publisher>ACM Press</publisher>
			<biblScope unit="page" from="1414" to="1418" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<title level="a" type="main">Logic programming and nonmonotonic reasoning: From theory to systems and applications</title>
		<author>
			<persName><forename type="first">N</forename><surname>Leone</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Logic Programming and Nonmonotonic Reasoning</title>
				<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="2007">2007</date>
			<biblScope unit="volume">1</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<analytic>
		<title level="a" type="main">Preferred answer sets for ordered logic programs</title>
		<author>
			<persName><forename type="first">D</forename><surname>Van Nieuwenborgh</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Vermeir</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Theory and Practice of Logic Programming</title>
		<imprint>
			<biblScope unit="volume">6</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="107" to="167" />
			<date type="published" when="2006">2006</date>
		</imprint>
	</monogr>
</biblStruct>

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