Applications of Propositional Logic
Applications of Propositional Logic
a→ (c ∨ ¬ f )
System Specifications
The system and software engineers take requirements in English
and express them in a precise specification language based on
logic.
q→ ¬ p
Consistent System Specifications
Definition: A list of propositions is consistent if it is possible to
assign truth values to the proposition variables so that each
proposition is true.
Solution: Let p denote “The diagnostic message is not stored in the buffer.”
Let q denote “The diagnostic message is retransmitted” The specification
can be written as: p ∨ q, p→ q, ¬p. When p is false and q is true, all three
statements are true. So the specification is consistent.
Logic Circuits (optional)
(Studied in depth in Chapter 12)
Electronic circuits; each input/output signal can be viewed as a 0 or 1.
0 represents False
1 represents True
Complicated circuits are constructed from three basic circuits called gates.
The inverter (NOT gate)takes an input bit and produces the negation of that bit.
The OR gate takes two input bits and produces the value equivalent to the disjunction of the two
bits.
The AND gate takes two input bits and produces the value equivalent to the conjunction of the
two bits.
More complicated digital circuits can be constructed by combining these basic circuits to
produce the desired output given the input signals by building a circuit for each piece of
the output expression and then combining them. For example:
Diagnosis of Faults in an Electrical
System (Optional)
AI Example (from Artificial Intelligence: Foundations of
Computational Agents by David Poole and Alan Mackworth,
2010)
l1
l2
Representing the Electrical System
in Propositional Logic (optional)
We need to represent our common-sense understanding of how the
electrical system works in propositional logic.
Both Switches up
up_s1
up_s2