Constraint Answer Set Programming (CASP) is a hybrid paradigm that enriches Answer Set Programming (ASP) with numerical constraint processing, something required in many real-world applications. The usual specification of constraints in most CASP solvers is closer to the numerical back-end expressiveness and semantics, rather than to standard specification in ASP. In the latter, numerical attributes are represented with predicates and this allows declaring default values, leaving the attribute undefined, making non-deterministic assignments with choice rules or using aggregated values. In CASP, most (if not all) of these features are lost once we switch to a constraint-based representation of those same attributes. In this paper, we present the FLINGO language (and tool) that incorporates the aforementioned expressiveness inside the numerical constraints and we illustrate its use with several examples. Based on previous work that established its semantic foundations, we also present a translation from the newly introduced FLINGO syntax to regular CASP programs following the CLINGCON input format.
翻译:约束回答集编程(CASP)是一种混合范式,它通过数值约束处理增强了回答集编程(ASP)的能力,这在许多实际应用中至关重要。大多数CASP求解器中约束的常规规范更接近数值后端的表达能力和语义,而非ASP中的标准规范。在后者中,数值属性通过谓词表示,这允许声明默认值、保留属性未定义、使用选择规则进行非确定性赋值或使用聚合值。在CASP中,一旦我们将这些相同属性转换为基于约束的表示,大多数(若非全部)这些特性便会丢失。本文提出了FLINGO语言(及工具),它将上述表达能力纳入数值约束内部,并通过多个示例说明其应用。基于先前奠定其语义基础的研究,我们还提出了从新引入的FLINGO语法到遵循CLINGCON输入格式的常规CASP程序的转换方法。