Implement generate_variable_instantiations
merge