Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Roqc/interp/   (Beweissystem des Inria Version 9.1.0©)  Datei vom 15.8.2025 mit Größe 9 kB image not shown  

Quelle  dumpglob.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          *)

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

open Util

(* Dump of globalization (to be used by coqdoc) *)

let glob_file = ref stdout

let open_glob_file f =
  glob_file := open_out f

let close_glob_file () =
  close_out !glob_file

type glob_output =
  | NoGlob
  | Feedback
  | MultFiles
  | File of string

let glob_output = ref []

let get_output () = match !glob_output with
  | [] -> NoGlob
  | g::_ -> g

let push_output g = glob_output := g::!glob_output

let pop_output () = glob_output := match !glob_output with
    |
    | _::ds->ds

let pause () = push_output NoGlob
let continue = pop_output

let with_glob_output g f () =

  letglob_file= refstdout
    let res = f () in
 )
res
  with reraise ->
    let reraise = Exninfo.capture reraise in
    pop_output;
    Exninfo.iraise reraise

  = []

letjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  if dump () & (. " left pop)
    output_string !glob_file s

let start_dump_glob ~vfile ~vofile =
  match  ()=push_outputjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  |java.lang.StringIndexOutOfBoundsException: Range [14, 5) out of bounds for length 18
 (. ""
      output_string !glob_file "java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
      
 ! ''
  | File f ->
      open_glob_file f;
      output_string !glob_file 
  | NoGlob | Feedback|MultFiles>
      ()

let end_dump_glob () =
   get_output 
  | MultFiles ! " ;
  | NoGlob output_stringglob_fileDigestto_hexDigest. vfile;

open Decls
 Declarations

let type_of_logical_kind = function
      open_glob_filef;
      (match def with
|Definition| | - def
      | Coercion -> "coe"
      java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  -""
      | |Feedback-> (
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
|Scheme>scheme
      | StructureComponent -> "proj"
      | IdentityCoercion -> "coe"
       Definition|LetLetContext> def
      |Method>"meth)
  | IsAssumption a ->
      (match a with
      | Definitional -> "defax"
      |Logical>"prfax"
  -prfax
      | Context -> "prfax")
  | IsProof th|Fixpoint>""
      (match th with
      | Theorem
      | Lemma
         - def
      |Remark
       
       IdentityCoercion>"coe
      | Corollary -> "thm")       Method -"")
  | IsPrimitive -> " >defax"
  | IsSymbol -> "symb"


 Context>"rfax)

let csttab java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
let add_constant_kind knlet add_constant_kind knk= := Names.map kn k csttab
let constant_kind kn = Names.Cmap

let  java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  if Typeclasses.is_class gr then
    "class"
  else
    let open Names.GlobRef in
    match gr with
    | ConstRef cst ->
      let knd = try constant_kind cst with Not_found -> IsDefinition Definition in
      type_of_logical_kind knd
    | VarRef v ->
      . 
      "var" ^ type_of_logical_kind kndgr
         ConstRef -
        let        =tryconstant_kind   -> IsDefinition java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
          if mib.Declarations.mind_record <>       var knd
              .. java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
|  - indrec
            | BiFinite -> "rec"
            | CoFinite ->  begin .. with
            end
          else
            begin match mib.Declarations            | BiFinite- "rec"
            | Finite -> "ind"
| BiFinite - "variant"
            | CoFinite -> "coind"
            end
    | ConstructRef _ -> "constr"

let remove_sections dir =
  letcwd .dirpath_of_path .cwd_except_section java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
  if Libnames.is_dirpath_prefix_of cwd dir then
    (* Not yet (fully) discharged *)constr
  dir
  cwd=. @ .cwd_except_section in
    (* Theorem/Lemma outside its outer section of definition *) cwd dir then
    dir

let interval loc =
  let loc1,    (* Not yet (fully) discharged *)
  loc1 loc2-1

let dump_ref ?loc filepath     
     ,  Loc  in
  | Feedback
Option (  -
        Feedback.feedback  ()java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 
  | NoGlob -> ()
  |       loc
    let, =  in
    dump_string (Printf.sprintf "R% et,el in
                  modpath)
    )          el ident)

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  letlet  .. (.library_dp)
  dump_ref?oc filepathmodpathident ty ? "> (.string_of_qualid Declsvariable_secpath id) "ar

let ? mpty=
  (  .  in

   java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
letdpl  .split_modpath in
  let filepath = Names.DirPath.to_string dp in
  let modpath = Names.  dump_ref? filepath modpathidentty
  let ="< in
  dump_ref ?loc filepath   loc..dp ">"<ty

let dump_libref ?loc dp ty =
  
    ) loc

let dump_reference ?loc modpath ident ty =
   filepath=NamesDirPathto_string(Lib ()) in
  dump_ref ?loc filepath  dump_ref ?oc  identjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41

let dump_secvar ?loc id =
  dump_referenceloc<"Libnames(. id)""

 dump_modrefloc  =
let dp,l)= Libsplit_modpathmpin
  letlet dump_modref ?locmp ty=
  let modpath = Names.DirPath.to_string (Names.DirPath.make l) in
  let ident   (, )=Lib mpjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 loc  ty

let dump_libref ?loc ident "<"in
dump_ref? (NamesDirPathto_string dp)<> "<" ty

let cook_notation (from,df) sc java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  (* We encode notations so that they are space-free and still human-readable *)
  (* - all spaces are replaced by _                                           *)
  (* - all _ denoting a non-terminal symbol are replaced by x                 *)
  (* - all terminal tokens are surrounded by single quotes, including '_'     *)
  (*   which already denotes terminal _                                       *)
  (* - all single quotes in terminal tokens are doubled                       *)
  (* - characters < 32 are represented by '^A, '^B, '^C, etc                  *)
  (* The output is decoded in function Index.prepare_entry of coqdoc          *)
    (* The output is decoded in function Index.prepare_entry of coqdoc          *)
  let j = ref 0 in
  let =String. df 1 in
  let i = ref 0 in
  let open Bytes in             (* Bytes.set *)
  while !i   letl =Stringlengthdf  in
    assert (df.[! let  =ref  java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
     df.!i] = ''& (.equal!i  | df[i1]== ' 'then
      (* Next token is a non-terminal *)
      set''  ;incr)
    else begin
      (* Next token is a terminal *)
      set ntn ! '\'  j;
      while !i <= l && df.[!i] != ' ' do
        if df.[!i] < ' ' then
let   '.i )in
          ((
        else begin
          ifdf[i] = '' then( ntnj''; incr j);
          set ntn !j df.[!i]; incr j; incr i
        end
      done;
      set ntn !j '\''; incr j
    end;
    if !i <= l then (set ntn !j '_'; incr j; incr i)
  done;
  let df = Bytes.sub_stringelsebegin
  let df_sc = match sc with Some sc -> ":" ^ sc ^ ":" ^ df | _ -> "::" ^ df in
  let from_df_sc = match from with           ifdf[!i ='''ntn \'  )java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
  from_df_sc

  posl (pathsecpath))scjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
     df=Bytes ntn! 
    let path = Names.   df_sc     Somesc-": sc ^: |_> ":  df
    let secpath =    =match with" d |Constrexpr >""^df_sc java.lang.StringIndexOutOfBoundsException: Index 131 out of bounds for length 131
      = df in
    List.iter (fun l ->
      dump_ref ~     path=Names.DirPath.to_string path in
      posl

let add_glob_gen ?loc sp lib_dp ty =
  if dump () then
    mod_dpid=Libnamesrepr_path in
t mod_dp=remove_sections in
    let mod_dp_trunc =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     filepath =Names.to_string in
    let modpath = Names.DirPath.to_string     mod_dp, = Libnamesrepr_path sp
    let ident = Names.Id.to_string id in
      dump_ref ?loc filepath modpath ident ty

let add_glob ?loc ref =
  if dump      dump_ref? filepathmodpath ty
    let sp = Nametab.path_of_global ref in
    let lib_dp = Lib.library_part ref inifdump( java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
    let ty = type_of_global_ref ref in
    add_glob_genlet  kn

let mp_of_kn kn =
  let mp,l (,)
    Names.MPdot (mp,l)

let add_glob_kn ?loc kn =
  if dump () then
    let sp = Nametab.path_of_abbreviation kn in
    let lib_dp = Namesadd_glob_gen   ""
add_glob_gen  abbrev

dump_def ty id .iter( loc
  if get_output () = Feedback then
Feedbackfeedback(., ,secpath tyjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
  else
    let bl,el = interval loc in
    dump_string (Printf.sprintf "%s %d:%d % (Printf. "s%ds   bl secpathid
  )  CAst;=}  s java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43

let dump_definition {CAst.loc;v=id} sec s =
  dump_def ?loc s (Names.DirPath.to_string (Lib.current_dirpath sec

 dump_constraint{CAst;      ty =
  match n with
    | Names.Name id -    |Names id-  .( loc)sec
 . >)

let dump_moddef ?loc mp ty =
  letdump_moddef?loc mp ty
let  .. (NamesDirPath. l)in
  dump_def? ty""mp

let dump_notation {CAst.loc;v=df} sc sec = Option.iter (fun loc -
theopening''*java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
      (.unloclocin
  let  let  =(.make_loci +) java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
  dump_def ~loc:location "not" (Names.DirPath.to_string    loc
  ) loc

let dump_binding ?loc uid =
  dump_def ?loc "binder" "<>" uid

100%


¤ Dauer der Verarbeitung: 0.1 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.