The Answer Set Programming Paradigm

The Answer Set Programming Paradigm

Articles The Answer Set Programming Paradigm Tomi Janhunen, Ilkka Niemelä n In this article, we give an overview of nswer set programming (ASP, for short) is a declarative the answer set programming paradigm, programming paradigm for solving search problems explain its strengths, and illustrate its Aand their optimization variants. In ASP a search prob - main features in terms of examples and lem is modeled as a set of statements (a program) in a logic an application problem. programming type of a language in such a way that the answer sets (models) of the program correspond to the solu - tions of the problem. The paradigm was first formulated in these terms by Marek and Truszczy ski (1999) and Niemelä (1999). The ASP paradigm has its roots in knowledge repre - sentation and nonmonotonic logics research as described by Marek, Niemelä, and Truszczy ski (2011) in a historic account on the development of the paradigm. A recent and more technical overview of ASP has been contributed by Brewka, Eiter, and Truszczy ski (2011). The ASP paradigm is most widely used with the formalism of logic programming under the semantics given by answer sets (Gelfond and Lifschitz 1988, 1990). The term answer sets was proposed by Gelfond and Lifschitz (1991) for sets of lit - erals, by which programs in an extended syntax are to be interpreted where the classical negation operator and dis - junctions of literals are allowed in the heads of program rules. Lifschitz’s article (2016) in this special issue gives an intro - duction to the notion of an answer set and the language of ASP, as well as a comparison to Prolog systems. An alternative approach to ASP has been to use directly first-order logic as the basis and extend it with inductive definitions. The details Copyright © 2016, Association for the Advancement of Artificial Intelligence. All rights reserved. ISSN 0738-4602 FALL 2016 13 Articles can be found in the articles by Denecker and Ven - not available at all (like recursive constraints) when nekens (2014), Denecker and Ternovska (2008), East comparing to CP or LP/IP paradigms. Because of and Truszczy ski (2006), and the one by Bruynooghe these properties ASP allows for incremental develop - et al. (2016) in this issue of AI Magazine. ment of an application and supports well rapid pro - A main reason for the increasing interest in ASP is totyping. the availability of fast software tools that make it pos - The goal of this article is to provide an up-to-date sible to tackle problems of practical importance. Most overview of the ASP paradigm and illustrate its usage of the current software tools employ two steps com - with examples as well as a more comprehensive monly referred to as grounding and solving, reflect - application problem. We proceed as follows. In the ing the definition of answer sets for programs with next section, we explain the fundamental ideas of the variables (Lifschitz 2016). The idea is to separate con - ASP paradigm. The use of the paradigm and its main cerns so that the grounding phase takes care of the features are then illustrated by developing ASP evaluation of more complicated data structures and encodings for an application problem step by step. variable instantiations using logic programming and The application considered in this article is about deductive database techniques, and then the solving designing a locking scheme for a building so that cer - phase focuses on search for answer sets for a much tain safety requirements are met. Having introduced simpler type of programs by employing advanced the basic paradigm, we briefly address main ways to search methods. The articles by Kaufmann et al. implement ASP — either using native answer set (2016) and by Gebser and Schaub (2016) in this issue solvers or translators that enable the use of solver provide more information on the solving and technology from neighboring disciplines. We end the grounding techniques. article with a summary and discussion of future There is a growing number of successful applica - prospects. In addition, we illustrate the potential tions of ASP including molecular biology (Gebser et computational hardness of our application problem al. 2010a, 2010b), decision support system for space by explaining its connection to the NP-complete shuttle controllers (Balduccini, Gelfond, and decision problem Exact-3-SAT. Nogueira 2006), phylogenetic inference (Erdem 2011, Koponen et al. 2015), product configuration (Soininen and Niemelä 1998, Finkel and O’Sullivan Basic ASP Paradigm 2011) and repair of web-service work flows (Friedrich The conceptual model of the ASP paradigm is depict - et al. 2010). Erdem, Gelfond, and Leone (2016) give ed in figure 1. We start by explaining how to under - an account of the applications of ASP in this issue. stand search problems at an abstract level and then On the one hand, ASP is closely related to logic illustrate how ASP is typically employed to solve such programming and Prolog and, on the other hand, to problems using the approach illustrated in the figure. constraint programming (CP), propositional satisfia - Finally, we address a number of features and attrac - bility (SAT), and linear or integer programming tive properties of the paradigm. (LP/IP). Unlike Prologlike logic programming ASP is fully declarative and neither the order of rules in a Problem Solving program nor the order of literals in the rules matter. The ASP paradigm provides a general-purpose Moreover, Prolog systems are tailored to find proofs methodology for solving search and optimization or answer substitutions to individual queries where - problems encountered in many real-world applica - as ASP systems are finding answer sets corresponding tions. To get started, the key step is to identify and to complete solutions to a problem instance. The formalize the problem to be solved, that is, to work basic idea in ASP is very close to the paradigm of CP, out a problem statement. Typically this consists of SAT, or LP/IP where problems are represented by con - clarifying what the potential solutions of the prob - straints and where systems are tailored to find satis - lem are like and then setting the conditions that fying variable assignments corresponding to com - solutions should satisfy. Solving the problem means plete solutions. that given the data on an instance of the problem we However, there are significant differences. The ASP should find one or more solutions that satisfy the giv - paradigm allows for a very systematic approach to en conditions (see the topmost arrow in figure 1). For problem representation through uniform encodings illustration, we use the task of finding a seating where the problem statement can be developed inde - arrangement for a dinner as the first simple example. pendently of data on a particular instance. This leads The respective problem statement could read as for - to a large degree of elaboration tolerance. The ASP mulated next. approach enables structured representation of prob - lems where more complicated constraints are com - Example 1 (Seating Arrangement Problem) posed of simpler ones using rules. On the other hand, A certain group of people, say persons p , … , p , are rules enable one to encode conditions that are chal - 1 n invited for dinner. There are tables t1, …, tk with the lenging (like representing disjunctive constraints or respective capacities c1, … , ck available for seating other basic relational operations on constraints) or such that c1+… + ck >= n. The host has some prior 14 AI MAGAZINE Articles Solve Problem statement Solution(s) Formalize Instance data Filter Extract Facts Evaluate Ground Search Answer Program Instantiate program set(s) Figure 1. Conceptual Model of the ASP Paradigm. knowledge about the relationships of the guests: there can really do this, we should have a basic under - are both friends and enemies among the invitees. This standing of syntax, also introduced in the article by information should be taken into account when Lifschitz (2016) in this issue. In ASP, programs consist designing the arrangement. A solution to this problem of rules, that is, statements of the form is a mapping s(p ) = t of persons p to tables t so that i j i j head :– body , body , ..., body . the mutual relationships are respected. 1 2 n The problem statement in example 1 uses mathe - The intuitive reading of this rule is that the head can be inferred if (and only if) the body conditions body , matical symbols to abstract the details of the prob - 1 body , ..., body have been inferred by any other rules lem such as the number and the identity of persons 2 n involved and the collection of tables available for in the program. The conditions in the rule are either seating. This reflects an important methodological atomic statements (also called atoms ) like seat(a,1) for Alice being seated at table 1, or count-bounded sets of feature, namely the separation of instance data from atoms the actual problem statement. The point is that the l { atom ; ...; atom } u problem can be stated without listing all details for a 1 k particular instance of the problem. In case of the seat - where at least l but at most u atoms among atom 1, ..., ing arrangement problem, the instance data would atom k should be inferable. The cardinality constraint consist of the names of invitees together with lists of above can also be expressed in terms of a counting tables and their capacities, and the pairs of persons aggregate who are known to be either friends or enemies. More #count{atom 1; ...; atom k} concretely put, suppose that we have a group of 20 where appropriate bounds can be incorporated using people: Alice, Bob, John, and others. There are four relation symbols <, <=, >, >=, and =.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us