let expr_to_kernel_function_state =
  expr_to_kernel_function_state ~with_alarms:warn_none_mode