add intermediate result handling for generator definitions & usages