Constraint Answer Set Programming (CASP) is a hybrid paradigm that enriches Answer Set Programming (ASP) with numerical constraint processing, a crucial requirement for many real-world applications. However, the specification of constraints in most CASP solvers aligns more closely with the expressiveness and semantics of the numerical back-end than the ASP paradigm. In the latter, numerical attributes are represented as predicates, which 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 within 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范式。在ASP范式中,数值属性被表示为谓词,这使得可以声明默认值、保持属性未定义、通过选择规则进行非确定性赋值或使用聚合值。在CASP中,一旦转向基于约束的数值属性表示,大部分(若非全部)这些特性便会丧失。本文提出flingo语言(及工具),将前述表达能力融入数值约束,并通过多个示例说明其应用。基于先前建立其语义基础的工作,我们还给出了从新引入的flingo语法到遵循clingcon输入格式的常规CASP程序的转换规则。