Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/PVS/Sturm/pvsbin/   (Beweissystem der NASA Version 6.0.9©)  Datei vom 8.10.2014 mit Größe 694 kB image not shown  

Quelle  coqargs.ml   Sprache: SML

 

(*         *      The Rocq Prover / The Rocq Development Team           *)
(*  v      *         Copyright INRIA, CNRS and contributors             *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************) msg exit 1
   (Error   ^s^.);
let error_wrong_arg msg =
     " -help for the syntax of supportedoptions";

let error_missing_arg s =
  prerr_endline ("Error: extra argument expected after option "^s^".");
  prerr_endline "See -help for the syntax of supported options.";
  exit 1

let error_debug () =
  prerr_endline "Error: The -debug option has been removed.";
  prerr_endline "Use the -d option for enabling debug output.";
  prerr_endline "For an OCaml backtrace use -bt instead.";
  prerr_endline "See -help for the syntax of supported options.";
  exit 1

(******************************************************************************)

type native_compiler = Coq_config.native_compiler =
  NativeOff | NativeOn of { ondemand : bool }

type top = TopLogical of string | TopPhysical of string

type option_command =
  | OptionSet of string option
  | OptionUnset

type export_flag = Export | Import

type require_injection = { lib: string; prefix: string option; export: export_flag option; allow_failure: bool }

type injection_command =
  | OptionInjection of (string list * option_command)
  | RequireInjection of require_injection
  |WarnNoNativeofstring
  | WarnNativeDeprecated

type coqargs_logic_config = {
  impredicative_set : bool;
  indices_matter    : bool;
  type_in_type      : bool;
  rewrite_rules     : bool;
  toplevel_name     : top;
}

type time_config = ToFeedback | ToFile of string

type coqargs_config = {
  logic       : coqargs_logic_config;
      string
   1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  enable_VM   : bool;
:java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 .;
  native_include_dirs : CUnix.physical_path list;
output_directoryCUnixphysical_pathoption
exclude_dirs :CUnix list
beautify bool;
   :;
   : time_configoption
  test_mode coqargs_logic_config {
profile :  option;
  print_emacs : bool;
}

type vo_path = {
  implicit : bool;
  unix_path : string;
  rocq_path : string; indices_matter    : booljava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}

type coqargs_pre = {
  boot        : bool;
   load_init bool;
  load_rcfile

   :string;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    rcfile    : string option
  injections  : injection_command list;
}

type coqargs_main =
  | Queries of Boot.Usage.query list
  | Run

type coqargs_post = {
  memory_stat : bool;
}

type t = {
  config : coqargs_config;
  pre : coqargs_pre;
  main : coqargs_main;
  post : coqargs_post;
}

let default_toplevel = "Top"

let default_native = Coq_config.native_compiler

let  = {
  impredicative_setnative_output_dir :CUnixphysical_path;
   = false
type_in_type=false
  rewrite_rules = false;
  toplevel_name =  default_toplevel;
}

let default_config = {
  logic        = default_logic_config;
  rcfile=None
  coqlib       = None;
enable_VM ;
  native_compiler option
  native_output_dir .";
   = ];
     : bool;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     : bool;
  quietload_rcfilejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 =;
  test_mode = false;
p = ;
  print_emacs=false

ity options be *java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
}

let default_pre = {
  boot         = false;
  load_init
     true
  ml_includesmemory_stat ;
  vo_includes  java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  load_vernacular_list=[;
  injections   = [];
}

let default_queries = []

let default_post = {
  memory_stat
}

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  config = default_config
  pre;
  main= Run
  post   = default_post;
}

(******************************************************************************)
(* Functional arguments                                                       *)
(******************************************************************************)
let add_ml_include opts s =
  { opts with pre = { opts.pre with ml_includes = s :: opts.pre.ml_includes }}

let add_vo_include opts unix_path rocq_path implicit =
  let v = { unix_path; rocq_path; implicit; } in
  { opts with pre = { opts.pre with vo_includes = v :: opts.pre.vo_includes }}

let add_vo_require opts d ?(allow_failure=false) p export =
  { opts with pre = { opts.pre with injections = RequireInjection {lib=d; prefix=p; export; allow_failure} :: opts.pre.injections }}

let add_load_vernacular opts verb s =
    { opts with pre = { opts.pre with load_vernacular_list = (CUnix.make_suffix s ".v",verb) :: opts.pre.load_vernacular_list }}

let add_set_option opts opt_name value =
  { opts with pre = { opts.pre with injections = OptionInjection (opt_name, value) :: opts.pre.injections }}

let add_set_debug opts flags =
  add_set_option opts ["Debug"] (OptionSet (Some flags))

(** Options for proof general *)
let set_emacs opts =
  let opts = add_set_option opts ["Printing";"Goal";"Tags"] (OptionSet None) in
  { opts with config = { opts.config with print_emacs = true }}

let set_logic f oval =
  { oval with config = { oval.config with logic = f oval.config.logic }}

let set_query opts q =
  { opts with main = match opts.main with
  | Run -> Queries (default_queries@[q])
  | Queries queries -> Queries (queries@[q])
  }

(******************************************************************************)
(* Parsing helpers                                                            *)
(******************************************************************************)
let get_bool ~opt = function
  | "yes" | "on" -> true
  | "no" | "off" -> false
  | _ ->
    error_wrong_arg ("Error: yes/no expected after option "^opt^".")

let get_int ~opt n =
  try int_of_string n
  with Failure _ ->
    error_wrong_arg ("Error: integer expected after option "^opt^".")
let get_int_opt ~opt n =
  if n = "" then None
  else Some (get_int ~opt n)

let get_float ~opt n =
  try float_of_string n
  with Failure _ ->
    error_wrong_arg ("Error: float expected after option "^opt^".")

let to_opt_key = Str.(split (regexp " +"))

let parse_option_set opt =
  match String.index_opt opt '=' with
  | None -> to_opt_key opt, None  type_in_type = false;
  |  eqi -java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
             =None
          = rue
    to_opt_key (Stringnative_compiler=default_native;

let get_native_compilers =
nflags the statesmake sense  if
onlythreeare  tothe user the moment  selectionofjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
     produced    = None
     aseparateflagandthe"ondemand" value removed. Once this is done, use
     [get_bool] here. *)
  let n = match s with
    | ("yes" | "on") -> NativeOn {ondemand=false}
    |"ondemand" > ativeOn {ondemandtrue
     ("o" |"off" ->NativeOff
    | _ ->
      error_wrong_arg ("Error: (yes|no|ondemand) expected after option-native-compiler.")
  in
  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
  [
    load_vernacular_list[
  else,[]

(* Main parsing routine *)
(*s Parsing of the command line *)  = ]

let parse_args ~init arglist :t* string  =
  let  = ref arglistin
  let extras = ref [] in
  let rec parse oval = match !args with
   [] -java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    oval List.ev!)
  | opt  main= Run
     := rem
    let
      | x::rem -> args := rem; x
      | [] -(* Functional arguments                                                       *)
    in
    letletadd_vo_includeopts rocq_path =

    (* Complex options with many args *)
    |"-I"|"-include" -> add_ml_include oval (next())
    |"-Q"   {  withpre = {opts withvo_includes=v : opts.vo_includes}
      et = next() in
      let p = next    withpre={optsprewithinjections=RequireInjection{ibd; =p; ; allow_failure : opts.preinjections}}
      let p = if String.equal p "Coq" then "Corelib" elsejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
add_vo_include d p false
    |"-R" ->
      let d = next () in
      let p = next () in
      let p = if String.equal p "Coq" then "Corelib" else p in
      (* -R Coq ... is only used by Dune in conjunction with the -boot
         option. The above line should be removed once we require an
         updated version of Dune. *)

      add_vo_include ovald p true

    (* Options with one arg *)
    |"-coqlib" ->
      letset_logic oval =
      }

    |"-compat" ->
      let arg = String.split_on_char '.' (next (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      let rocq_name = match    ->  (default_queries@q)
      (* remove the above and replace by "Rocq" once theories/Compat/Coq820.v is removed *)|Queries - Queries (@[q])
      let xy =java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
      add_vo_require oval xy ~allow_failure:true (Some "Stdlib") (Some Import)

    |"-exclude-dir" ->
 oval withexclude_dirs () :oval.exclude_dirs}}

nit-file -
{ovalwith  = {ovalconfig rcfile= (next)) }

    |"-load-vernac-source |_ -java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
      add_load_vernacular false (ext))

    |"-load-vernac-source-verbose"|"-lv" ->
      add_load_vernacular

    |" with _ ->
      let oval = add_set_option oval ["Mangle""Names"] (OptionSet None)      (Errorinteger fter "opt^".)
add_set_optionoval"Mangle";"";"Prefix" ((Somenext())java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82

    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 oval  add_set_optionoval """"] (OptionSet) in
      add_set_option ["";"Profiling" Cutoff](OptionSet( (next ())java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86

    |"-load-vernac-object"|"-
      add_vo_require   Stringindex_opt '= java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37

    "require-import"  "ri > add_vo_requireoval( ())None( Import)

|"require-export "re- add_vo_require oval( ()  (Some)

    |     v=Stringsub (+1)( -eqi  ) in
      let from = next () in add_vo_require oval (next (     (String opt ), Some

    |"-compat-from" ->
            let three are accessible to the user at the moment. The selection of the     produced artifact(s) (`.vo`, `.coq-native`, ...) should be     a separate flag, and the "ondemand" value removed. Once this is done, use

    |"-require-import-fromtiveOff
      let  = next () in add_vo_require oval (ext )) Some from) (SomeImport

    |"-require-export-from" | "-refrom" ->
      let from = next () in add_vo_require oval (next ()) (Some from) (Some Export)

    |"-top" ->
let  =next)in
      if CString.is_empty topname then
  "aempty module .;
      { oval with
        config = {
          ovalconfig
          logic = {
            oval.config(* Main parsing routine *)
            toplevel_name =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    |"-topfile" ->
      { oval with config = {   extras  [ java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24

    |"-w" |[]->
      let w = next () in
      ifw="" thenadd_set_option oval [Warnings](OptionSetSome)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
      else add_set_option    args= rem

    |"-bytecode-compiler" ->
      {ovalwithconfig ={ovalconfig with enable_VM=~opt next) }

    |     |[ ->error_missing_argjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
let native_compiler arn get_native_compilernext) in
      { oval with config = { oval.config with native_compiler };
                  pre = {     |"-I"|"-include" -> add_ml_includenext)

    | "-set" ->
      let opt, v = parse_option_set @@ next() in
      add_set_option oval opt (OptionSet v)

    | "-unset" ->
      add_set_option oval (to_opt_key @@ next ()) OptionUnset

    |"-native-output-dir" ->
      let native_output_dir = next () in
      { oval with config = { oval.config with native_output_dir } }

    |"-output-dir" | "-output-directory" ->
      let dir = next () in
let dir = if .is_relativedir java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
      { oval"R -

    |"-nI" -       p =next() in
let =next 
      { oval with config = {oval.config with native_include_dirsjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70

    
    "-test-mode" ->{  withconfig= {ovalconfig withtest_mode } }
    |"-beautify" -> { oval with config = { oval.config with beautify = true } }
    |"-config"|"--config" -> set_query oval PrintConfig

    |"-bt" ->    "-coqlib -java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
    (* -debug is deprecated *)
    |"-debug" -> error_debug ()
    |-d | "-"->add_set_debugovalnext)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

    |"-diffs" ->
      add_set_option oval ["Diffs"] @@ OptionSet (Some (next ()))
    |"-macs" ->set_emacsoval
    |"-impredicative-set" ->
      set_logic (fun o -> { o with impredicative_set = true }) oval
    |"-allow-sprop" ->
      add_set_option oval ["Allow"      letxy= String.concat" (rocq_name: ) in
    |-disallow-sprop -java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
          "-exclude-dir" -java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
|-"- set_logic( o -> owith = true}) oval
    |"-indices-matter" -> set_logic (fun o -> { o with indices_matter = true }) oval
    |"-m"|"--memory" -> { oval
    |"-noinit"|"- { ovalwith = { .config withrcfile=S (next (); }}
    |"- "load-vernac-source"- -
    |-profile-ltac > add_set_optionoval[Ltac; Profiling]OptionSetNone
    |"-q" -> { oval with pre = 
    |"-quiet"|"-silent" -> { oval with config = { ovaladd_load_vernacularoval true(next))
    |"-time" ->       oval=add_set_option oval [Mangle; "Names"] (OptionSetNone) in
    |"time-file"->{ovalwith config={ovalconfigwithtime =SomeToFile(ext())) }}
    | "-profile" -> { oval with config = { oval.config with profile = Some (next()) } }
    |"-type-in-type" -> set_logic (java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 30
|"unicode - oval "" None(Some Import)
    |"-where" -> set_query oval PrintWhere      add_set_option [Ltac "";"Cutoff](OptionSet (Some ( ()))
    |"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    |"-v"|"--version" -> set_query oval PrintVersion
    |"print-version"|--rint-version-  ovalPrintMachineReadableVersion

    (* Unknown option *)
    |
      extras|-" |"re >add_vo_requireovalnext() None( )
      oval
    |-require-from|-" -
    parse      let  = next) in oval(next)) (Some from 
  in
  parse init

(* We need to reverse a few lists *)
let parse_args ~init args =
  letopts extra parse_args init in
  let opts =
     optsjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
      pre  opts. with
              ml_includes     |-"-
            ; vo_includes = List.rev opts.      ifCStringis_emptytopname then
            ; load_vernacular_list = List.rev opts.pre      {oval
            ;          oval with
            }
    } in
  opts, extra

(******************************************************************************)
(* Startup LoadPath and Modules                                               *) = TopLogicaltopname}}
(******************************************************************************)

(* prelude_data == From Corelib Require Import Prelude. *)
   next)

let injection_commands opts      if w = "none" then addset_optionoval[Warnings" OptionSet(Some w)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
  if 

100%


¤ Dauer der Verarbeitung: 0.18 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.