Logic programming aims to combine logic and programming:
- Logic is used to express knowledge and describe the problem
- Inference is used to compute, manipulate knowledge, and obtain a solution
| Advantages | Disadvantages |
|---|---|
| Knowledge-based programming | Ability to support efficient arithmetic and input/output operations such as file handling, are provided at the expense of declarative semantics |
| Declarative style of programming; what should be computed instead of how | Most logic languages are restricted to a fragment of classical first-order logic. |
| Precise and simple semantics | |
| Same formalism used to specify a program, write a program, prove properties of the program | |
| Same program can be used in many different ways |