4.3 Article

How to Build Your Own ASP-based System?!

Journal

THEORY AND PRACTICE OF LOGIC PROGRAMMING
Volume -, Issue -, Pages 1-63

Publisher

CAMBRIDGE UNIV PRESS
DOI: 10.1017/S1471068421000508

Keywords

Answer Set Programming; Answer Set Systems; Meta Programming; Answer Set Solving modulo Theories

Funding

  1. DFG [SCHA 550/11, 15]

Ask authors/readers for more resources

ASP, a popular and sophisticated approach to declarative problem solving, is easy to use but difficult to modify due to its underlying technology. This tutorial aims at helping users build their own ASP-based systems by extending ASP using metaprogramming and traditional programming techniques. By showcasing examples and case studies, it illustrates how clingo can be customized and extended for specific purposes.
Answer Set Programming, or ASP for short, has become a popular and sophisticated approach to declarative problem solving. Its popularity is due to its attractive modeling-grounding-solving workflow that provides an easy approach to problem solving, even for laypersons outside computer science. However, in contrast to ASP's ease of use, the high degree of sophistication of the underlying technology makes it even hard for ASP experts to put ideas into practice whenever this involves modifying ASP's machinery. For addressing this issue, this tutorial aims at enabling users to build their own ASP-based systems. More precisely, we show how the ASP system clingo can be used for extending ASP and for implementing customized special-purpose systems. To this end, we propose two alternatives. We begin with a traditional AI technique and show how metaprogramming can be used for extending ASP. This is a rather light approach that relies on clingo's reification feature to use ASP itself for expressing new functionalities. The second part of this tutorial uses traditional programming (in Python) for manipulating clingo via its application programming interface. This approach allows for changing and controlling the entire model-ground-solve workflow of ASP. Central to this is clingo's new Application class that allows us to draw on clingo's infrastructure by customizing processes similar to the one in clingo. For instance, we may apply manipulations to programs' abstract syntax trees, control various forms of multi-shot solving, and set up theory propagators for foreign inferences. A cross-sectional structure, spanning meta as well as application programming, is clingo's intermediate format, aspif, that specifies the interface among the underlying grounder and solver. We illustrate the aforementioned concepts and techniques throughout this tutorial by means of examples and several nontrivial case studies. In particular, we show how clingo can be extended by difference constraints and how guess-and-check programming can be implemented with both meta and application programming.

Authors

I am an author on this paper
Click your name to claim this paper and add it to your profile.

Reviews

Primary Rating

4.3
Not enough ratings

Secondary Ratings

Novelty
-
Significance
-
Scientific rigor
-
Rate this paper

Recommended

No Data Available
No Data Available