论文标题
使用规则和其他所有内容编程,无缝
Programming with rules and everything else, seamlessly
论文作者
论文摘要
逻辑规则对于表达复杂的推理和分析问题非常有力。同时,它们在应用程序的许多其他方面是不方便或不可能使用的。将规则与集合和功能集成,此外,对对象进行更新,这是一项重要研究的主题。缺少的是一种无缝整合所有构造的语言。 本文介绍了一种语言Alda,该语言支持所有规则,集合,功能,更新和对象,包括无缝集成的内置INS,包括并发和分布式流程。关键想法是将谓词作为设置值变量支持,这些变量可以在任何范围中使用和更新,并支持查询以及对推理功能的显式和自动调用的推断。我们为Alda开发了完整的正式语义。我们设计了一个汇编框架,可确保规则的声明性语义,同时也能够利用可用的优化。我们描述了一个原型实现,该实现建立在Python强大的扩展基础上,并采用了有效的逻辑规则引擎。我们开发了一系列基准测试和实验结果,以证明Alda的编程功能,并且通常是良好的性能。
Logic rules are powerful for expressing complex reasoning and analysis problems. At the same time, they are inconvenient or impossible to use for many other aspects of applications. Integrating rules in a language with sets and functions, and furthermore with updates to objects, has been a subject of significant study. What's lacking is a language that integrates all constructs seamlessly. This paper presents a language, Alda, that supports all of rules, sets, functions, updates, and objects as seamlessly integrated built-ins, including concurrent and distributed processes. The key idea is to support predicates as set-valued variables that can be used and updated in any scope, and support queries and inference with both explicit and automatic calls to an inference function. We develop a complete formal semantics for Alda. We design a compilation framework that ensures the declarative semantics of rules, while also being able to exploit available optimizations. We describe a prototype implementation that builds on a powerful extension of Python and employs an efficient logic rule engine. We develop a range of benchmarks and present results of experiments to demonstrate Alda's power for programming and generally good performance.