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

Curry的默认规则

Default Rules for Curry

Sergio Antoy, Michael Hanus

摘要:

在功能逻辑程序中,规则是独立于文本顺序而适用的,即,任何规则都可以潜在地用于评估表达式。这类似于逻辑语言,而与函数语言相反,例如,Haskell对规则执行严格的顺序解释。然而,在某些情况下,通过紧凑的默认规则来表达替代方案是方便的。虽然函数式程序中经常使用缺省规则,但函数式逻辑程序的非确定性本质不允许以有意义的方式将此概念从函数式语言直接转移到函数式逻辑语言。在本文中,我们提出了一个新的概念,Curry的默认规则,支持类似于函数式编程的编程风格,同时保留了函数式逻辑编程的核心属性,即,完整性、非确定性和面向逻辑的函数使用。我们讨论的基本概念,并提出了一个实现,利用先进的功能的功能逻辑语言。

英文摘要:

In functional logic programs, rules are applicable independently of textual order, i.e., any rule can potentially be used to evaluate an expression. This is similar to logic languages and contrary to functional languages, e.g., Haskell enforces a strict sequential interpretation of rules. However, in some situations it is convenient to express alternatives by means of compact default rules. Although default rules are often used in functional programs, the non-deterministic nature of functional logic programs does not allow to directly transfer this concept from functional to functional logic languages in a meaningful way. In this paper we propose a new concept of default rules for Curry that supports a programming style similar to functional programming while preserving the core properties of functional logic programming, i.e., completeness, non-determinism, and logic-oriented use of functions. We discuss the basic concept and propose an implementation which exploits advanced features of functional logic languages.

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

↑