Currently functions to access the previous value and current value of a variable are being created for each variable event, e.g. an event counter@() will result in the following functions being added to the smart contract:
function LARVA_set_counter_pre (uint counter) ... {
.....
}
function LARVA_set_counter_post (uint counter) ... {
.....
}
However this is wasteful. The code in the event condition should be analysed to only create the functions required.