I think it is possible, if I remember, there is a function to know if a expr has side effect...
but I think it is a complex rule with some "exception" (as virtual)...
it is in my todo list ^_^