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.
翻译:由于使用没有固定数据流量的上游数据,逻辑方案编制是一种灵活的方案拟定模式。为了将逻辑语言与功能方案编制的缩略语相扩展,有各种建议将可评价功能映射为上游,以便保持在逻辑方案编制框架之内。由于功能逻辑语言相结合既提供了灵活有效的评价战略,我们在本文件中提出了相反的方法。通过将逻辑程序映射为功能逻辑程序,根据功能依赖性推断进行转换,我们开发了完全自动的转换,保持逻辑方案编制的灵活性,但可以通过将无限搜索空间减少到有限空间来改进计算。