Files

Download

Download Full Text (735 KB)

Description

Answer set programming paradigm (ASP) is a form of declarative programming oriented towards difficult combinatorial search problems. It belongs to the group of so called constraint programming languages. The idea of ASP is to represent a given computational problem by a program whose answer sets correspond to solutions, and then use an answer set solver to generate answer sets for this program. In this note we discuss the methodology of answer set programming as well as the use of software systems for computing answer sets. First, a graph coloring problem is utilized to illustrate the use of answer set programming in practice. Then, solutions to Hamiltonian cycle and to n-queens problems are presented. Across the handout you are given problems to solve. This handout is self-contained: you are given all the definitions and links that are required in constructing solutions. In the text italics is primarily used to identify concepts that are being defined. Some definitions are identified by the word Definition. In this course we will use the answer set system clingo1 that incorporates answer set solver clasp1 with its front-end grounder gringo1 (user guide is available online at https://sourceforge.net/projects/potassco/ files/guide/2.0/guide-2.0.pdf/download). You may access system clingo via web interface available at https://potassco.org/clingo/run/ or download an executable for clingo version 5 from the url listed at footnote 1. Answer set programming practitioners develop applications that rely on ASP languages, which allow variables. Yet, common ASP solvers, including clasp (a subsystem of clingo) process propositional logic programs only. We now re-introduce such programs and restate the definition of an answer set in the form convenient for this part of the course.

Publication Date

7-2020

Publisher

University of Nebraska at Omaha

City

Omaha, Nebraska

Comments

The author is the copyright holder and any reuse must be obtained from them directly.

Parts of this handout follow What is answer set programming to propositional satisfiability, Yuliya Lierler, Constraints, July 2017, Volume 22, Is- sue 3, pp 307337 available at https://link.springer.com/article/10.1007/s10601-016-9257-7.

Handout on Answer Set Programming Paradigm

Share

COinS