It's so hard to find information on a topic when you don't know the term!
Consider the following code
int x = 5;
x = 42;
x = 3;
This code can be optimized, because its effects are the same as
int x = 3;
I'm trying to find the term for this particular property. I know that, mathematically, they are a left-zero band, which means for any two operations A
and B
, A∘B = A
... only the last operation has any effect. I also know that this is an extension of the idea of idempotence, which states A∘A=A
(doing an operation twice is the same as doing it once). This covers what happens if you do two different operations in the same class.
This seems like a very fundamental concept for optimization, so I expect it will have a name, but I have not been able to find it. I need to relate this concept to non-mathematicians, so saying that the operations form a left-zero band isn't going to cut it.