- 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:
-3.56, +17.E09, 4.95
- 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.
<bool exp> -> T |
-> F |
-> NOT (<bool exp>) |
-> (<bool exp> AND <bool exp>) |
-> (<bool exp> OR <bool exp>)
- Using the following rewrite rules for Boolean expressions, find two
different derivation trees for the Boolean expression NOT ( T OR T AND F ).
<bool exp> -> T |
-> F |
-> NOT (<bool exp>) |
-> <bool exp> AND <bool exp> |
-> <bool exp> OR <bool exp>