a rule :
a;b;c;…; (X <+ Y <+ Z …)
is transformed in
((a;b;c;…;X) <+ (a;b;c;…;Y) <+ (a;b;c;…;Z) <+ …)
which leads to undesirable side effects (for example if a is say(!"hello))

the complete source can be found @ https://svn.lrde.epita.fr/websvn/wsvn/xrm/trunk/src/str/prism-desugar.str?op=file&rev=38 (and is also attached to this issue)

the revision can be checkouted with svn co -r38 https://svn.lrde.epita.fr/svn/xrm/trunk/ xrm

if the current term is
Eq(Double(“10”),[Double(“1”),Double(“10”)])

prism-desugar will call EvalEq which will issue:

@@@ EvalEq starting:
Eq(Double(“10”),[Double(“1”),Double(“10”)])
@@@ EvalEq starting:
Eq(Double(“10”),[Double(“1”),Double(“10”)])
@@@ EvalEq starting:
Eq(Double(“10”),[Double(“1”),Double(“10”)])
@@@ EvalEq starting:
Eq(Double(“10”),[Double(“1”),Double(“10”)])

four times instead of one (because of the side effects)

the complete input source for xrm-front is:

module range
[] 10=1,10 -> true;
endmodule

Submitted on 26 May 2006 at 18:12

On 28 January 2013 at 14:46 Eelco Visser removed tag 0.18M3

On 28 January 2013 at 14:46 Eelco Visser tagged interesting

Log in to post comments