00 Verizon 4:56 PM An interpreder for a langaage L maps progras written in L to their answers Remember that a language is a set of words Let us define our language Lmas inductively as follows 1. The words 0, 1, and 2 are in 2 Assune that both A and B stand foe words in the language L. Thn (a) (A+B) are ako in L- Examples of add-mo3 expessios are(1 2) +0) and (1+(2 + 2)). However, 1 + 1 is not in the language (parenthesis are missing Give a rewrite system that auates or "computes" the value of expressions in L The optatoes + corresponds to the standard In xlulo 3 ackliton findti HB given Ixkm: 2 0 0 0 1. Define a rewrite system for moxdulo 3 expressions in Lit-mods that produces the final value of the expression. A final value is rpresented by cither 0, 1 or 2. Your rewrite system is basically an interpeter for Lali-mat For example, our two expressions ((1 2) 0) and ((22)) shoukl be rewritten to 0 axl 2, respectively. You can assune that your rewrite system will only be presented with corect Ldmts expressions, so don't worry about error messages 2. Shou your rewrite system steps that are performed for our two example expressions given above. For cach step clearly show the kft-hand side of the rule in the current expression that you are rewriting 3. Is the choice of your next rewrite rule and its left-hand side always unique in your rewrite system? If ot, show an example. 00 Verizon 4:56 PM An interpreder for a langaage L maps progras written in L to their answers Remember that a language is a set of words Let us define our language Lmas inductively as follows 1. The words 0, 1, and 2 are in 2 Assune that both A and B stand foe words in the language L. Thn (a) (A+B) are ako in L- Examples of add-mo3 expessios are(1 2) +0) and (1+(2 + 2)). However, 1 + 1 is not in the language (parenthesis are missing Give a rewrite system that auates or "computes" the value of expressions in L The optatoes + corresponds to the standard In xlulo 3 ackliton findti HB given Ixkm: 2 0 0 0 1. Define a rewrite system for moxdulo 3 expressions in Lit-mods that produces the final value of the expression. A final value is rpresented by cither 0, 1 or 2. Your rewrite system is basically an interpeter for Lali-mat For example, our two expressions ((1 2) 0) and ((22)) shoukl be rewritten to 0 axl 2, respectively. You can assune that your rewrite system will only be presented with corect Ldmts expressions, so don't worry about error messages 2. Shou your rewrite system steps that are performed for our two example expressions given above. For cach step clearly show the kft-hand side of the rule in the current expression that you are rewriting 3. Is the choice of your next rewrite rule and its left-hand side always unique in your rewrite system? If ot, show an example