Formal Methods in Software Engineering: (FMSE)
Formal Methods in Software Engineering: (FMSE)
(FMSE)
Lecture # 5
(Lecture # 5 ) FMSE 1 / 23
First Order Logic
First Order Logic allows reasoning about properties that are shared by
many objects through the use of variables.
(Lecture # 5 ) FMSE 2 / 23
First Order Logic or Predicate Logic
“Sky is blue” Sky acts as the subject, and is blue acts as the
predicate.
(Lecture # 5 ) FMSE 3 / 23
First Order Logic
First-order logic (FOL) is the logic to speak about objects, which are
the domain of discourse (variables range over individuals) or universe.
logical connectives: ¬, ∨, ∧, ⇒, ⇔
Quantifiers:
Universal: ∀x, King(x) ∧ Greedy(x) ⇒ Evil(x)
(Lecture # 5 ) FMSE 5 / 23
Properties of Quantifiers
Quantifiers Daulity:
∀x Likes(x, IceCream) ≡ ¬∃x¬ Likes(x, IceCream)
(Lecture # 5 ) FMSE 6 / 23
Properties of Quantifiers
Equivalence
∃xP is equivalent to ¬∀x¬P
(Lecture # 5 ) FMSE 7 / 23
FOL Formulas
(Lecture # 5 ) FMSE 8 / 23
Expressing Facts in FOL
Lucy is a professor
(Lecture # 5 ) FMSE 9 / 23
Knowledge base in FOL
(Lecture # 5 ) FMSE 10 / 23
(Lecture # 5 ) FMSE 11 / 23
Knowledge Engineering Steps
(Lecture # 5 ) FMSE 12 / 23
(Lecture # 5 ) FMSE 13 / 23
(Lecture # 5 ) FMSE 14 / 23
(Lecture # 5 ) FMSE 15 / 23
(Lecture # 5 ) FMSE 16 / 23
Syntax of First Order Logic
(Lecture # 5 ) FMSE 17 / 23
(Lecture # 5 ) FMSE 18 / 23
Primitive symbols are ¬, ∧, ∃.
(Lecture # 5 ) FMSE 19 / 23
(Lecture # 5 ) FMSE 20 / 23
FOL Semantics
(Lecture # 5 ) FMSE 21 / 23
FOL Semantics
(Lecture # 5 ) FMSE 22 / 23
Thanks!
(Lecture # 5 ) FMSE 23 / 23