GIOVANNI AMENDOLA, GIUSEPPE MAZZOTTA, FRANCESCO RICCA, TOBIAS BEREI
{"title":"重温 ASP 中的单元测试:语言和测试驱动的开发环境","authors":"GIOVANNI AMENDOLA, GIUSEPPE MAZZOTTA, FRANCESCO RICCA, TOBIAS BEREI","doi":"10.1017/s1471068424000103","DOIUrl":null,"url":null,"abstract":"<p>Unit testing frameworks are nowadays considered a best practice, included in almost all modern software development processes, to achieve rapid development of <span>correct</span> specifications. Knowledge representation and reasoning paradigms such as Answer Set Programming (ASP), that have been used in industry-level applications, are not an exception. Indeed, the first unit testing specification language for ASP was proposed in 2011 as a feature of the ASPIDE development environment. Later, a more portable unit testing language was included in the LANA annotation language. In this paper we revisit both languages and tools for unit testing in ASP. We propose a new unit test specification language that allows one to inline tests within ASP programs, and we identify the computational complexity of the tasks associated with checking the various program-correctness assertions. Test-case specifications are transparent to the traditional evaluation, but can be interpreted by a specific testing tool. Thus, we present a novel environment supporting test-driven development of ASP programs.</p>","PeriodicalId":49436,"journal":{"name":"Theory and Practice of Logic Programming","volume":"203 1","pages":""},"PeriodicalIF":1.4000,"publicationDate":"2024-04-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Unit Testing in ASP Revisited: Language and Test-Driven Development Environment\",\"authors\":\"GIOVANNI AMENDOLA, GIUSEPPE MAZZOTTA, FRANCESCO RICCA, TOBIAS BEREI\",\"doi\":\"10.1017/s1471068424000103\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<p>Unit testing frameworks are nowadays considered a best practice, included in almost all modern software development processes, to achieve rapid development of <span>correct</span> specifications. Knowledge representation and reasoning paradigms such as Answer Set Programming (ASP), that have been used in industry-level applications, are not an exception. Indeed, the first unit testing specification language for ASP was proposed in 2011 as a feature of the ASPIDE development environment. Later, a more portable unit testing language was included in the LANA annotation language. In this paper we revisit both languages and tools for unit testing in ASP. We propose a new unit test specification language that allows one to inline tests within ASP programs, and we identify the computational complexity of the tasks associated with checking the various program-correctness assertions. Test-case specifications are transparent to the traditional evaluation, but can be interpreted by a specific testing tool. Thus, we present a novel environment supporting test-driven development of ASP programs.</p>\",\"PeriodicalId\":49436,\"journal\":{\"name\":\"Theory and Practice of Logic Programming\",\"volume\":\"203 1\",\"pages\":\"\"},\"PeriodicalIF\":1.4000,\"publicationDate\":\"2024-04-02\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Theory and Practice of Logic Programming\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://doi.org/10.1017/s1471068424000103\",\"RegionNum\":2,\"RegionCategory\":\"数学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q3\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Theory and Practice of Logic Programming","FirstCategoryId":"94","ListUrlMain":"https://doi.org/10.1017/s1471068424000103","RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
摘要
如今,单元测试框架已被视为一种最佳实践,几乎所有现代软件开发流程都包含了这种框架,以实现正确规范的快速开发。知识表示和推理范例也不例外,如答案集编程(ASP),已在行业级应用中使用。事实上,作为 ASPIDE 开发环境的一项功能,第一种 ASP 单元测试规范语言于 2011 年被提出。后来,LANA 注释语言中又包含了一种可移植性更强的单元测试语言。在本文中,我们重新审视了 ASP 中的单元测试语言和工具。我们提出了一种新的单元测试规范语言,允许在 ASP 程序中内嵌测试,并确定了与检查各种程序正确性断言相关的任务的计算复杂性。测试用例规范对传统的评估是透明的,但可以由特定的测试工具进行解释。因此,我们提出了一种支持 ASP 程序测试驱动开发的新型环境。
Unit Testing in ASP Revisited: Language and Test-Driven Development Environment
Unit testing frameworks are nowadays considered a best practice, included in almost all modern software development processes, to achieve rapid development of correct specifications. Knowledge representation and reasoning paradigms such as Answer Set Programming (ASP), that have been used in industry-level applications, are not an exception. Indeed, the first unit testing specification language for ASP was proposed in 2011 as a feature of the ASPIDE development environment. Later, a more portable unit testing language was included in the LANA annotation language. In this paper we revisit both languages and tools for unit testing in ASP. We propose a new unit test specification language that allows one to inline tests within ASP programs, and we identify the computational complexity of the tasks associated with checking the various program-correctness assertions. Test-case specifications are transparent to the traditional evaluation, but can be interpreted by a specific testing tool. Thus, we present a novel environment supporting test-driven development of ASP programs.
期刊介绍:
Theory and Practice of Logic Programming emphasises both the theory and practice of logic programming. Logic programming applies to all areas of artificial intelligence and computer science and is fundamental to them. Among the topics covered are AI applications that use logic programming, logic programming methodologies, specification, analysis and verification of systems, inductive logic programming, multi-relational data mining, natural language processing, knowledge representation, non-monotonic reasoning, semantic web reasoning, databases, implementations and architectures and constraint logic programming.