Open HyeongMee opened 9 years ago
optimize_0plus_aexp (APlus a1 a2)
is not the same as APlus (opt.. a1)(opt.. a2)
. If it is, [ optimize (0+1) ] will be [ optimize (0+1) ]=[ (optimize 0)+(optimize 1) ]=[ 0+1 ]. So that simply means there is no optimization at all.
Oh I can see it right now THX ㅎ
optimize_0plus_aexp (APlus a1 a2) If I apply 'simpl' to here, I thought that the result should be "APlus (opt.. a1)(opt.. a2)" because that's how this function (opt...) is defined. However, when I apply simpl, opt... function suddenly unfolds itself, showing every possible case (a1 destructed, a2 destructed.. etc) I think it's possible to proceed with the unfolded result, but why does 'simpl' work like that here?
Thanks