Professional Documents
Culture Documents
Introduction To Logic Programming: Dr. Abdelaziz Said
Introduction To Logic Programming: Dr. Abdelaziz Said
1
Introduction to Logic Programming
Dr. Abdelaziz Said
2
Contents
1 Course Information
2 Course Description
3 Human Logic
4 Formal Logic
5 Logic Applications
3
Course Information
4
Course Description
Propositional
Logic types
First order
Part _1
Classical
methods
Reasoning
procedures
Course
Resolution
Prolog
Part_2
Visual prolog
5
Introduction
6
Introduction
7
Introduction
❖ Uses of Logic:
8
Human Logic
9
Human Logic
10
Human Logic
Example:
11
Human Logic
Example:
12
Human Logic
Example:
13
Human Logic
Example:
14
Human Logic
15
Human Logic
Deduction reasoning
Induction reasoning
Reasoning Types
Abduction reasoning
Reasoning by analogy
16
Human Logic
Deductive Reasoning:
Example:
17
Human Logic
Inductive Reasoning:
Example:
18
Human Logic
19
Human Logic
Abductive Reasoning:
Example:
20
Human Logic
21
Human Logic
Reasoning by analogy:
Example:
• The water flow in a pipe is proportional to its
diameter.
• Wires are like pipes.
• Therefore, the current in a wire is proportional to its
diameter.
22
Human Logic
23
Formal Logic
EXAMPLE :
▪ x - 3y = 0 Formalization
▪ x + y = 12
25
Formal Logic
EXAMPLE :
▪ Ahmed likes reading and swimming .
▪ If Ahmed likes something, then Ali likes it.
▪ Does Ali like swimming ?
Formalization
Likes( Ahmed, reading)
Likes( Ahmed, swimming)
Likes( Ahmed, X) → likes ( Ali, X)
26
Formal Logic
❖ Example:
▪ Propositional logic
▪ First Order Logic ( predicate Logic)
27
Applications of Logic
❖ Artificial Intelligence
❖ Mathematics
▪ Automated reasoning programs could be used to check
mathematical proofs and in some cases, could be used to
produce proofs or portions of proofs.
❖ Software analysis
▪ verify various properties of programs such as
correctness, termination, complexity, etc.
❖ Law and business
28
Applications of Logic
❖ Hardware Engineering:
• Simulations
• Configuration and simplification
• Diagnosis
• Testing
29
Applications of Logic
❖ Data Bases:
30
Chapter 1
31