首页> 外文会议>Logic programming >Constraint Handling Rules A Tutorial for (Prolog) Programmers
【24h】

Constraint Handling Rules A Tutorial for (Prolog) Programmers

机译:约束处理规则(Prolog)程序员指南

获取原文
获取原文并翻译 | 示例

摘要

Constraint Handling Rules (CHR) [2,5] is a high-level programming language based on multi-headed, committed-choice, guarded multiset rewrite rules. Originally designed in 1991 by Friihwirth for the particular purpose of adding user-defined constraint solvers to a host-language, CHR has matured over the last decade to a powerful and elegant general-purpose language with a wide spectrum of application domains.rnDifferent semantics have been proposed for the language, based on various logics (first-order logic, linear logic, ...). These logics, in combination with rewriting techniques, have been used to study program properties such as soundness and completeness, confluence, termination, ... While that line of work treats CHR as a calculus, this tutorial teaches CHR as a proper programming language.rnAs a programming language, CHR seems simple enough: The programmer specifies a number of rewrite rules, and the CHR engine applies these rules exhaustively to an initial (multi-)set of constraints. Yet, this simplicity hides great power: e.g., the power to quickly prototype new constraint solvers, the power to implement Prolog's co-routining predicates freeze/2 and when/2 in a single CHR rule each, and the power to subsume Guarded Horn Clauses while still not exploiting CHR's full potential. Moreover, CHR is the only declarative language known in which every algorithm can be implemented with optimal space and time complexity [4].rnUnfortunately, few Prolog programmers are aware of the CHR language or that it is available in their Prolog system. These programmers are unable to tap into CHR's power, so they have to go to great length to accomplish even simple tasks. Or they simply give up. This tutorial shows how to use CHR for solving their problems quickly and elegantly. Simple examples teach interactively how to write and reason about CHR programs, and what problems one can solve effectively with CHR.rnThis tutorial starts with ground CHR, the three types of rules, and the refined semantics [1] which is based on the notion of the active constraint and its occurrences. Other topics covered are triggering of rules, the propagation history, the use of data structures and the host language, declarations and impure features, and the common pitfalls of CHR.rnThis tutorial intends to make the attendants aware of CHR's strengths as a programming language, and teaches them when and how to applyrnCHR for small to medium sized problems. The full set of tutorial slides. About the Speaker. Tom Schrijvers is a post-doctoral researcher at the K.U.Leuven in Belgium, who has defended his Ph.D. thesis on Analyses, Optimizations and Extensions of Constraint Handling Rules in 2005 [3]. His CHR implementation, the K.U.Leuven CHR system, is the most advanced in its kind and is in wide-spread use in many Prolog systems. Tom uses CHR on a daily basis, for implementing his compiler, for supporting his type checking and test generation research, or simply for gaining an edge in the Prolog Programming Contest.
机译:约束处理规则(CHR)[2,5]是一种基于多头,承诺选择,受保护的多集重写规则的高级编程语言。 CHR最初是由Friihwirth于1991年设计的,其特定目的是将用户定义的约束求解器添加到宿主语言中,在过去的十年中,CHR已发展成为功能强大且优雅的通用语言,具有广泛的应用领域。该语言基于各种逻辑(一阶逻辑,线性逻辑等)提出。这些逻辑与重写技术相结合,已被用于研究程序属性,例如健全性,完整性,融合性,终止性……。尽管该工作系列将CHR视为微积分,但本教程将CHR视为一种合适的编程语言。作为一种编程语言,CHR看起来很简单:程序员指定了许多重写规则,并且CHR引擎将这些规则详尽地应用于初始(多)约束集。但是,这种简单性隐藏了强大的功能:例如,快速原型化新约束求解器的功能,在单个CHR规则中实现Prolog共同例程谓词freeze / 2和when / 2的功能以及包含Guarded Horn子句的功能同时仍未充分利用CHR的全部潜力。此外,CHR是已知的唯一一种声明性语言,在该语言中,可以以最佳的空间和时间复杂度来实现每种算法[4]。不幸的是,很少有Prolog程序员意识到CHR语言或它在Prolog系统中可用。这些程序员无法利用CHR的功能,因此他们不得不花很多时间才能完成甚至简单的任务。或者他们只是放弃。本教程说明如何使用CHR快速而优雅地解决其问题。简单的示例以交互方式教授如何编写和推理CHR程序,以及使用CHR可以有效解决哪些问题。rn本教程以基础CHR,三种规则类型和基于[...]概念的精细语义[1]开始。活动约束及其发生。涵盖的其他主题包括规则的触发,传播历史,数据结构和宿主语言的使用,声明和不纯功能以及CHR的常见陷阱。rn本教程旨在使与会人员了解CHR作为编程语言的优势,并教他们何时,如何将CHR应用于中小型问题。完整的教程幻灯片。关于演讲者。 Tom Schrijvers是比利时鲁汶大学的博士后研究员,为他的博士学位辩护。 2005年约束处理规则的分析,优化和扩展[3]。他的CHR实施K.U.Leuven CHR系统是同类中最先进的,并且在许多Prolog系统中得到了广泛的使用。 Tom每天使用CHR来实现他的编译器,来支持他的类型检查和测试生成研究,或者仅仅是为了在Prolog编程大赛中获得优势。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号