多范式编程环境中的逻辑编程:Oz经验
Logic programming in the context of multiparadigm programming: the Oz experience
摘要:
Oz是一种多范式语言,支持逻辑编程作为其主要范式之一。多范式语言被设计为支持不同的编程范式(逻辑、函数、约束、面向对象、顺序、并发等)。同样轻松。本文有两个目标:在Oz中给出逻辑编程的教程,并展示逻辑编程如何自然地融入多范式编程的更广泛背景。我们的经验表明,有两类问题,我们称之为算法和搜索问题,逻辑编程可以帮助制定实际的解决方案。数学问题有已知的有效算法。搜索问题没有已知的有效算法,但可以用搜索来解决。Oz对逻辑编程的支持专门针对这两个问题类,使用每个问题类所需的概念。这与Prolog方法相反,Prolog方法用一组概念来针对两个类,这导致对每个类的支持不是最佳的。为了解释算法程序和搜索程序之间的本质区别,我们定义了Oz执行模型。这个模型包含了并发逻辑编程(committed-choice-style)和基于搜索的逻辑编程(Prolog-style)。与Horn子句语法不同,Oz有一个简单的、完全组合的、高阶的语法,它适应了语言的能力。最后,我们总结了从这项工作中吸取的教训,奥兹国的简史,以及奥兹国文学的许多切入点。
英文摘要:
Oz is a multiparadigm language that supports logic programming as one of its major paradigms. A multiparadigm language is designed to support different programming paradigms (logic, functional, constraint, object-oriented, sequential, concurrent, etc.) with equal ease. This article has two goals: to give a tutorial of logic programming in Oz and to show how logic programming fits naturally into the wider context of multiparadigm programming. Our experience shows that there are two classes of problems, which we call algorithmic and search problems, for which logic programming can help formulate practical solutions. Algorithmic problems have known efficient algorithms. Search problems do not have known efficient algorithms but can be solved with search. The Oz support for logic programming targets these two problem classes specifically, using the concepts needed for each. This is in contrast to the Prolog approach, which targets both classes with one set of concepts, which results in less than optimal support for each class. To explain the essential difference between algorithmic and search programs, we define the Oz execution model. This model subsumes both concurrent logic programming (committed-choice-style) and search-based logic programming (Prolog-style). Instead of Horn clause syntax, Oz has a simple, fully compositional, higher-order syntax that accommodates the abilities of the language. We conclude with lessons learned from this work, a brief history of Oz, and many entry points into the Oz literature.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。