arXivDaily arXiv每日学术速递 周一至周五更新
arXiv cs/0003076cs.AIcs.PL
收藏

约束编程被视为基于规则的编程

Constraint Programming viewed as Rule-based Programming

Krzysztof R. Apt, Eric Monfroy

摘要:

我们在这里研究一个自然的情况下,约束编程可以完全减少到基于规则的编程。为此,我们首先解释如何可以计算约束满足的问题,使用简单的一阶公式表示的规则。然后我们考虑基于预定义的、显式给定的约束的约束满足问题。为了解决这些问题,我们首先从这些明确给定的约束条件中推导出规则,并将计算过程限制为重复应用这些规则,并结合标记。第一种类型,我们称之为相等规则,导致了一个新的局部一致性概念,称为{ \em规则一致性},对于任意arity的约束,它比弧一致性弱(在\cite{MS98b}中称为超弧一致性)。对于布尔约束,规则一致性与布尔约束的著名传播规则下的闭包一致。第二种类型的规则,我们称之为成员规则,产生基于规则的弧一致性的表征。为了表明这种基于规则的方法约束编程的可行性,我们将展示如何自动生成这两种类型的规则,作为\cite{fruhwirth-constraint-95}的{ \tt}规则。这就产生了一个实现这种方法来编程的约束逻辑编程的手段。我们说明了这种方法的有用性,约束编程讨论各种例子,包括布尔约束,两个典型的例子,许多值的逻辑,约束处理华尔兹的语言描述多面体的场景,和艾伦的定性方法时序逻辑。

英文摘要:

We study here a natural situation when constraint programming can be entirely reduced to rule-based programming. To this end we explain first how one can compute on constraint satisfaction problems using rules represented by simple first-order formulas. Then we consider constraint satisfaction problems that are based on predefined, explicitly given constraints. To solve them we first derive rules from these explicitly given constraints and limit the computation process to a repeated application of these rules, combined with labeling.We consider here two types of rules. The first type, that we call equality rules, leads to a new notion of local consistency, called {\em rule consistency} that turns out to be weaker than arc consistency for constraints of arbitrary arity (called hyper-arc consistency in \cite{MS98b}). For Boolean constraints rule consistency coincides with the closure under the well-known propagation rules for Boolean constraints. The second type of rules, that we call membership rules, yields a rule-based characterization of arc consistency. To show feasibility of this rule-based approach to constraint programming we show how both types of rules can be automatically generated, as {\tt CHR} rules of \cite{fruhwirth-constraint-95}. This yields an implementation of this approach to programming by means of constraint logic programming. We illustrate the usefulness of this approach to constraint programming by discussing various examples, including Boolean constraints, two typical examples of many valued logics, constraints dealing with Waltz's language for describing polyhedral scenes, and Allen's qualitative approach to temporal logic.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑