Update code generator to handle new types of approximation algorithms.