Hi Everyone, <br>I took the code given in the Redex website (<a rel="nofollow" target="_blank" href="http://redex.plt-scheme.org/lam-v.html">http://redex.plt-scheme.org/lam-v.html</a>) and made the following changes to it.<br>
1. changed number pattern to string<br><br>2. Instead of +(in reduction-relation), I used string-append<br><br>3. (if0 0 e_1 e_2) to (if0 "true" e_1 e_2) and for the other case any other string except "true".<br>
<br>And called traces like this<br><br>(traces red<br> (term <br> ((ë (n) <br> (if0 <br> n<br>
1<br> ((ë (x) (x x)) <br> (ë (x) (x x)))))<br> (+ "2" "2"))))...<br><br>But it did not reduce the expression in any way. Basically The output was just<br>((ë (n) <br>
(if0 <br>
n<br>
1<br>
((ë (x) (x x)) <br>
(ë (x) (x x)))))<br>
(+ "2" "2")).<br><br>Where am I going wrong?<br><br>How
can I use symbol instead of string? When I used symbol, I got an error
saying expected a non-terminal pattern but got one of Expr, Var, Val,
Cntxt in symbol_1.<br>Why did I get that error?<br><br>Can someone throw some light on it.<br><br>Thanks<br>Hari