Optimization - Symmetric Reductions

I notice in stack based languages certain symmetric programs reduce to no-ops:

f1 = [swap swap] = []
f2 = [dup pop] = []
f3 = [cons uncons] = [] 
f4 = [dup swap cons uncons swap pop] = [dup swap swap pop] = [dup pop] = []

So how much of this is blindingly obvious to the research community? It seems that this must be much harder to detect in non stack based languages.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Algebra of Joy

You'll probably like The Algebra of Joy.