Add generate_expression_val and fix binary sum