Framework Support for the Efficient Implementation of Multi-version Algorithms