add generate_expression in generate.c