Operating Assignment Monitoring vs Testing Mistake Resolution
Explore common and interesting mistakes in monitoring and testing assignment expressions, focusing on operator precedence. Learn how to correctly substitute expressions and interpret implications for operating systems.
Operating Assignment Monitoring vs Testing Mistake Resolution
E N D
Presentation Transcript
Assignment 1 - A Let M = Monitoring T = Test state O = Operating Substituting the exclusive OR expression into the 2nd expression (as shown in the text book), we start with : (M Λ ~T V T Λ ~M) Λ ~T => O [ (M Λ ~T) V (T Λ ~M) ] Λ ~T => O ( order of operation with AND first) [ ( M Λ ~T) Λ ~T) ] V [ (T Λ ~M) Λ~T] => O (distrib. Λ V rule) (M Λ ~T Λ ~T ) V (T Λ ~M Λ ~T) => O (assoc. rule) ( M Λ ~T ) V ( ~M ΛT Λ~T) => O (AND same; assoc. rule) ( M Λ ~T) V (~M Λ False) => O (Contradiction rule) ( M Λ ~T) V (False) => O (AND False rule) ( M Λ ~T) => O (OR False rule) ( Monitoring Λ Not Testing ) => Operating
Assignment 1-A: “common mistake” ( M Λ ~T V T Λ ~M) Λ ~T => O ( M Λ True Λ ~M) Λ ~T => O ( M Λ ~M) Λ ~T => O ( False ) Λ ~T => O False => O False implies operating Using OR first and Ignoring operator Precedence !
Assignment 1-A : “Interesting mistake” [ ( M Λ ~T) V ( T Λ ~M) ] Λ ~T => O [ (M V (T Λ ~M)) Λ (~T V (T Λ ~M)) ] Λ ~T [ ( (M V T) Λ (M V ~M) ) Λ ( (~T V T) Λ (~T V ~M) ) ] Λ ~T [ ( (M V T) Λ (True) ) Λ ( (True) Λ (~TV~M) ) ] Λ ~T [ ( M V T ) Λ ( ~T V ~M) ] Λ ~T (M V T ) Λ (~T V ~M) Λ ~T (~T V ~M) Λ [ (T V M) Λ ~T ] (~T V ~M) Λ [ M ] (~T Λ M) V ( ~M Λ M) (~T Λ M ) V (False) (M Λ ~T ) => O ( Monitoring and Not Testing) implies Operating Using disjunctive syllogism (T v M) Λ~T=> M is true; BUT (T v M) Λ ~T<=> M is not true !
Answer borrowed from Joel (spring ’08 student) (M Λ ~T V T Λ ~M) Λ ~T => O [ (M Λ ~T) V (T Λ ~M) ] Λ ~T => O ( M Ve T ) Λ ~T => O (M Λ ~T) Ve (T Λ ~T) => O (M Λ ~T) Ve (false) => O (M Λ ~T) => O Look at this replacement with “Exclusive OR” !