论文标题
从逻辑到功能逻辑程序
From Logic to Functional Logic Programs
论文作者
论文摘要
逻辑编程是一种灵活的编程范式,因为没有固定数据流的谓词。为了通过功能编程的紧凑表示法扩展逻辑语言,有各种建议将可评估功能映射到谓词中,以便留在逻辑编程框架中。由于合并的功能逻辑语言提供灵活的和有效的评估策略,因此我们在本文中提出了一种相反的方法。通过将逻辑程序映射到基于推断功能依赖性的转换的功能逻辑程序中,我们开发了一个全自动转换,从而保持逻辑编程的灵活性,但可以通过将无限搜索空间减少到有限的搜索空间来改善计算。
Logic programming is a flexible programming paradigm due to the use of predicates without a fixed data flow. To extend logic languages with the compact notation of functional programming, there are various proposals to map evaluable functions into predicates in order to stay in the logic programming framework. Since amalgamated functional logic languages offer flexible as well as efficient evaluation strategies, we propose an opposite approach in this paper. By mapping logic programs into functional logic programs with a transformation based on inferring functional dependencies, we develop a fully automatic transformation which keeps the flexibility of logic programming but can improve computations by reducing infinite search spaces to finite ones.