let cmdline_run () =
  let wp_main kf_list =
    Ast.compute ();
    Variables_analysis.precondition_compute ();
    let fun_iter = match kf_list with
      | [] -> on_all_functions
      | names -> on_function_names names
    in
    let bhvs = Wp_parameters.Behaviors.get () in
    let property =
      match Wp_parameters.Properties.get () with
        | [] -> None
        | [ p ] -> Some (NamedProp p)
        | ps ->
          Wp_parameters.not_yet_implemented 
            "several properties (%a) in -wp-prop"
            (Pretty_utils.pp_list ~sep:"," Format.pp_print_string) ps
    in
    do_wp_passes fun_iter bhvs property None
  in
  match Wp_parameters.job () with
    | Wp_parameters.WP_None -> ()
    | Wp_parameters.WP_All ->
        ignore (wp_main []);
        do_wp_checks ();
        do_wp_proofs ();
        do_wp_print ()
    | Wp_parameters.WP_Select fcts ->
        let goals = wp_main fcts in
        do_wp_checks_for goals ;
        do_wp_proofs_for goals ;
        do_wp_print_for goals