programming-languages - 什么是逻辑编程?和其他的有什么不同

标签 programming-languages logic prolog

<分区>

今天我和其他 friend 聊天,他说他有逻辑编程能力,所以我对此很好奇。

最佳答案

wikipedia条目解释得很好:虽然表面上它似乎是一个多余的术语,因为所有编程都使用逻辑,但实际上它是一个定义良好的范例的术语,比如“函数式编程”和“面向对象编程”。具体来说,

logic programming, in the narrower sense in which it is more commonly understood, is the use of logic as both a declarative and procedural representation language. It is based upon the fact that a backwards reasoning theorem-prover applied to declarative sentences in the form of implications:

If B1 and … and Bn then H

treats the implications as goal-reduction procedures:

to show/solve H, show/solve B1 and … and Bn.

Prolog 语言(在某些变体中)可能仍然是最流行的逻辑编程语言。

关于programming-languages - 什么是逻辑编程?和其他的有什么不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2662670/

相关文章:

compiler-construction - 哪些编程语言具有 JIT 编译器?

programming-languages - 为什么动态类型语言变慢?

haskell - Haskell 在现实世界中的用途是什么?

node.js - 到达路线后,您应该将逻辑放在 Express 应用程序中的什么位置?

java - 打印下面提到的数字模式的逻辑是什么

python - 唯一值的动态分配 - Python

prolog - 将文本保存在列表或其他中

kotlin - Kotlin 语言是如何用 Kotlin 编写的?

parsing - Prolog 解析堆栈不足

ruby - Prolog(嗯,rubylog)中的一个简单的同义词匹配器