CSE 321 Homework 11


  1. Using the grammar for <real constant> as discussed in class, write a set of rewrite rules for <signed real constant>. Examples of valid signed real constants are:
  2.            -3.56, +17.E09, 4.95
    
  3. Using the following rewrite rules for Boolean expressions, find a derivation for the Boolean expression (NOT (( F AND T )) OR F ). Also draw a derivation tree corresponding to the derivation.
  4.     
    <bool exp>  -> T |
                -> F |
                -> NOT (<bool exp>) |
                -> (<bool exp> AND <bool exp>) | 
                -> (<bool exp> OR <bool exp>)  
    
  5. Using the following rewrite rules for Boolean expressions, find two different derivation trees for the Boolean expression NOT ( T OR T AND F ).
  6.         
    <bool exp>  -> T |
                -> F |
                -> NOT (<bool exp>)  |
                -> <bool exp> AND <bool exp> |
                -> <bool exp> OR <bool exp>