Unit Testing in ASPIDE

Answer Set Programming (ASP) is a declarative logic programming formalism, which is employed nowadays in both academic and industrial real-world applications. Although some tools for supporting the development of ASP programs have been proposed in the las

  • PDF / 751,989 Bytes
  • 20 Pages / 439.37 x 666.142 pts Page_size
  • 101 Downloads / 189 Views

DOWNLOAD

REPORT


2

DLVSystem s.r.l. - P.zza Vermicelli, Polo Tecnologico, 87036 Rende, Italy [email protected] Dipartimento di Matematica, Universit` a della Calabria, 87036 Rende, Italy {leone, reale, ricca}@mat.unical.it

Abstract. Answer Set Programming (ASP) is a declarative logic programming formalism, which is employed nowadays in both academic and industrial real-world applications. Although some tools for supporting the development of ASP programs have been proposed in the last few years, the crucial task of testing ASP programs received less attention and it is an Achilles’ heel of the available programming environments. In this paper we present a language for specifying and running unit tests on ASP programs. The testing language was implemented in ASPIDE, a comprehensive IDE for ASP, which supports the entire life cycle of ASP development with a collection of user-friendly graphical tools for program composition, testing, debugging, profiling, solver execution configuration, and output handling.

1

Introduction

Answer Set Programming (ASP) [1] is a declarative logic programming formalism proposed in the area of non-monotonic reasoning. The idea of ASP is to represent a given computational problem by a logic program whose answer sets correspond to solutions, and then use a solver to find those solutions [2]. The language of ASP [1] supports a number of modeling constructs including disjunction in rule heads, nonmonotonic negation [1], (weak and strong) constraints [3], aggregate functions [4], and more. These features make ASP very expressive [5], and suitable for developing advanced real-world applications. ASP is employed in several fields, from Artificial Intelligence [6–11] to Information Integration [12], and Knowledge Management [13,14], Bioinformatics [15], Software Packaging [16], etc. Interestingly, these applications of ASP recently have stimulated some interest also in industry [14,17,18]. On the one hand, the effective application of ASP in real-world scenarios was made possible by the availability of efficient ASP systems [6,19,20]. On the

H. Tompits et al. (Eds.): INAP/WLP 2011, LNAI 7773, pp. 345–364, 2013. c Springer-Verlag Berlin Heidelberg 2013 DOI: 10.1007/978-3-642-41524-1 21, 

346

O. Febbraro et al.

other hand, the adoption of ASP can be further boosted by offering effective programming tools capable of supporting the programmers in managing large and complex projects [21]. In the last few years, a number of tools for developing ASP programs have been proposed, including editors and debuggers [22–32]. Among them, ASPIDE [32], which stands for Answer Set Programming Integrated Development Environment, is one of the most complete development tools.1 ASPIDE features a cutting-edge editing tool (offering dynamic syntax highlighting, on-line syntax correction, autocompletion, code-templates, quick-fixes, refactoring, etc.) and a collection of user-friendly graphical tools for program composition, debugging, profiling, DBMS access, solver execution configuration and output handling. Although so many tools f