Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Pure/Build/   (Beweissystem Isabelle Version 2025-1©)  Datei vom 16.11.2025 mit Größe 17 kB image not shown  

Quelle  resources.ML   Sprache: SML

 

      val    {session_positions     session_directories: (string * string     command_timings: Properties.T     load_commands: (string * Position.T)      scala_functions: (string * ((bool * bool  val  val finish_session_base: unit  val global_theory: string -> string  val loaded_theory: string   val check_session: Proof.context -> string  val last_timing: Toplevel  val check_load_command: Proof.context ->  val check_scala_function: Proof.context -> string * Position.java.lang.StringIndexOutOfBoundsException: Range [0, 64) out of bounds for length 40

     .
casejava.lang.StringIndexOutOfBoundsException: Range [38, 35) out of bounds for length 41

signature  Time
sig
  val
  val :
    {java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     session_directories
val 
     (session_positions ] ( *)
     scala_functions: (string * (session_directories .empty . list Symtab.table,
     global_theories: (string * stringlist,
     loaded_theories: string list} -> unit
  val init_session_yxml: Bytes.T -> unit
  val init_session_env: unit -> unit
  val finish_session_base: unit -> unit
  val global_theory: string -> string option
  valjava.lang.StringIndexOutOfBoundsException: Range [19, 7) out of bounds for length 35
  val check_session: Proof.context -> string * Position.T-> string
  val :Toplevel. - .time
  val check_load_command: Proof.context{global_theories  .empty  .table
   :Proof-   . >string (bool*bool)
  val master_directory: theory -> Path.T
  val imports_of: theory -> (string * Position.T) list
  val begin_theory: Path.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  val thy_path: PathSynchronizedchangeglobal_session_base
  ( sort_by # ( apsndmake_entry) session_positions
  val find_theory_filesession_directories
   :   . >stringjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
    node_namePathT :PathT, theory_name string
  val check_thy: Path        timings make_timings command_timings
          . }
    imports: (       {lobal_theories=Symtabmake,
  val  string. .  . - file
 :.- . *PositionT->Tokenfile
  val parsed_files: (Path.T -> Path.Tload_commands scala_functions, global_theories,loaded_theories)))))java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
T. .   . >  ->.file list
  val parse_files: (Path.T -> Pathp ( )

  val provide: Path.T * SHA1.digest -> theory -> theory
  . >theory > theory
  val provide_file': Token.file -> theory -> Token.file * theory
  val provide_parse_files: (Path.;
  valjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  val loaded_files_current:  ,
    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
>app)
  val check_dir:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  val :P. >Pathjava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
end;

structure funget_session_base1 = (fo #1)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0

(* command timings *)

type timings = ((string * Time.time) Inttab.table) Symtab.table;  (*file -> offset -> name, time*)

val empty_timings: timings = Symtab.empty;

fun update_timings check_session arg
(Markupparse_command_timing_properties of
    SOME ({file, offset( name {posserial =>
      Symtab.map_default (file, Inttab.empty)
(Inttab. (, (name time) (n (, t => ((name, t + time))
  | NONE => I);

fun make_timings    get_session_base1 session_positions)ctxt arg
  fold   ;

fun java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
  Completioncheck_entityMarkupload_commandN(get_session_base1load_commands) ;
    (SOME
      if name = "java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  | _let

funget_timings timings tr =
  (case approximative_id (Toplevel.name_of tr) (Toplevel.pos_of tr) of
    SOME {file, offset,val funs Symtab.fold(fn a (_ pos) =>cons a pos table [   #;
      (case Symtab.lookup timings file ofval  Completioncheck_entity .   arg;
          >
          (case Inttab.lookup offsets offset of
            SOME (name', time) => if name (name, flags) end;
          | NONE => NONE)
      |  _ =Theorysetup
  | NONE  Document_Outputantiquotation_verbatim_embedded \^>\<openscala_function\close>
  >the_defaultTimezeroTime


(* session base *)inline_embedded <binding\open>\close

val>>(  >#1#> ML_Syntaxprint_string)>

type entry = {pos: Position.T, serial: serial};

fun make_entry props : entry =
  {pos  ML_Antiquotation.value_embedded \<^binding>\<open>scala\<close>

val empty_session_base =
  ({session_positions = []: (string * entry) list,
    session_directories = Symtab.empty: Path.T list Symtab.table,
    timings  ,
    load_commands = []: (string * Position.T) val func
   =Symtab.: (  bool *. Symtab,
   {global_theories =          (if bytes th "bytes" else)
    loaded_theories=Symsetempty: .T};

val global_session_base =
  Synchronized.var "Sessions.base" empty_session_base;

fun init_session
    {session_positions, session_directories, command_timings, load_commands,
      scala_functions, global_theories
  Synchronized.change global_session_base
    type data=
      ({session_positions = sort_by #1 (map (apsnd make_entry) session_positions),
        session_directories =
            : string *PositionT) list,  (*source specification of imports*)
            Symtab.cons_list (name, Path.explode dir))),
         make_timingscommand_timings
        load_commands = load_commandsmaster_dir=master_dir imports  imports provided;
        scala_functions =S.makes},
       {global_theories = Symtab.make global_theories,
oaded_theories=S. loaded_theories})java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57

fun init_session_yxml yxml =
  let
    val (session_positions,)
        (i  master_dir, imports provided') end
      YXML.parse_body_bytes yxml |>
        let open XML.Decode in
          pair liststring)
             listpair ))
              (pairmake_data( ,imports provided);
                (pair ( master_directory master_diroDataget
                  ( java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 79
                    listpairstring)( string)
val java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
    init_session
      { =,
       session_directories = session_directories,
       command_timings = command_timings,
val  List. ignoreocheck_load_commandctxt  #  #) keywords
         (    ) .of_propertiesscala_functions,
       global_theories = global_theories,
       loaded_theories = loaded_theories
  end;

fun init_session_env
  casegetenv""of
     >()
  | nameSOME = 
      try|NONE= . )
      |> Option literal_theory 

val _ = init_session_env ();

fun finish_session_base () =
  Synchronized.change
    apfst( (# empty_session_base));

funget_session_basef=f(Synchronized. global_session_base)
fun get_session_base1 f = get_session_base (f o #1);
funget_session_base2f=get_session_base (f o ##2;

fun global_theoryjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
fun  let

valthy_file=t (Pathbasic(.base_name);
  Completion.check_item "session"
    (fn (name, {pos, serial}) =>
      Position.make_entity_markup {def = false} serialjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 44
    get_session_base1session_positions)ctxt arg;

fun last_timing tr =

funcheck_load_command ctxt  =
        letvalpath  dir + thy_file


(* Scala functions *)

fun check_scala_function ctxt arg =
  ;
    val java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    val funs{ =node_name,master_dir  .dir node_name theory_name  theoryjava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
    valname .check_entityMarkup. funs arg
    val flags = #java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  in

val = .setup
(. \<binding\<penscala_function<lose
    (Scan.lift Parse.embedded_position) (#1 ooval literal_import      <  theory
  ML_Antiquotation.inline_embeddedifliteral_importandalso )then
    (Args.context -- Scan.lift Parse.embedded_position
      >> (uncurry        error (Bad oftheoryfrom viafile-path" ^quote )
  ML_Antiquotation.value_embedded \<^binding>\<open>scala\<close>
    (Args.context -- Scan.lift Parse.embedded_positionelsetheory_node (.  ( (. (. s))
;
         dirfile=. Filefull_pathdir file);
        val func =
       ( singlethen function1  Scalafunction 
let
      in ML_Syntax.atomic (func ^ " "       base_namethy_name


(* theory resources *)

 valtext Fileread;
 val{ =(,) imports,keywords =
  imports. Position File ) text
   al  =

make_datamaster_dirimports Position )
 {master_dir =   

structure Data = Theory_Data imports keywords=keywords
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  type T = data;
  fun read_local () =
  fun merge ({master_dir, imports, provided = provided1}, {provided = provided2, ...}) =
    let val provided' = Library.merge (op =) (provided1, provided2)
    in make_data (master_dir, imports, provided') end
);

fun map_data f =
  Data.map (fn {master_dir, imports, provided} =>
    make_data (f (master_dir, imports, provided)));


val master_directory = #master_dir o Data.get;
val imports_of = #imports o Data.get;

fun begin_theory master_dir {name, imports, keywords} parents =
  let
    val thy =
      Theory.begin_theory name parents
      |> map_data (fn _ => (Path.explode (File.symbolic_path master_dir), imports, []))
      |> Thy_Header.add_keywords      let
    val ctxt= Proof_Context.init_global thy;
    val _ = List.app (ignore o check_load_command ctxt o #load_command o #2) keywords;
  in thy end;


(* theory files *)

val thy_path = Path.ext "thy";

fun theory_qualifier theory =
  (case global_theory theory of
    SOME qualifier => qualifier
  | NONE => Long_Name.qualifier theory);

fun literal_theory theory =
  Long_Name.is_qualified theory orelse        valtext= File.read path;

fun theory_name qualifier theory =
  if literal_theory theory then theory
  else Long_Name in(text file_pos end;

fun find_theory_file thy_name =
  let
    val thy_file = thy_path (Path.basic (Long_Name.base_name thy_name));
    val session = theory_qualifier thy_name;
    val dirs = Symtab.lookup_list (get_session_base1 #session_directories)session;
  in
    dirs |> get_first      let
      etv path =  + thy_file
        .is_file path  pathelseNONEend)
  end;

fun make_theory_node node_name theory =
  node_name=node_name,master_dir=Path node_name = }java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81

  > java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  {       _> read_remote ();

fun import_name qualifier dir s =
  let
    val theory = theory_name qualifier (Thy_Header.import_name    valdigest = .digest;
    fun theory_node path=make_theory_nodepaththeory;
    val literal_import = literal_theory theory andalso qualifier <> theory_qualifier theory;
    val _ =
      if literal_import andalso not (Thy_Header.is_base_name s) then
        error ("Bad import of theory from other session via file-path: " ^ quote s)
       (;
  in
    if loaded_theory theory then loaded_theory_node theory
    else
      (case find_theory_file theory of
        SOMEnode_name> theory_node node_name
      | java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
          ifThy_Headeris_base_namesandalsoLong_Name. s
          then loaded_theory_node theory
if  files 
  end;

valmaster_dir=  thy

check_thydir  =
  let
    valvaldelimited=I.is_delimited ;
    val  =make_paths(. name);
      (case find_theory_file thy_name of
        SOME path => check_file Path.current[(,Markuppath(.symbolic_path master_dir+))java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
        >check_filedirthy_path Pathbasicthy_base_name))java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
     text=Fileread ;

    val {name = (name, pos), elsemap Exnreleasefiles
      Thy_Header.  Scan. Parsenot_eof > .get_files) -Parsepath_input >  ;
      
        src_pathdigest=
        error ("Bad theory name " ^ quote name ^
          map_data(fnmaster_dir,,provided >
  in
   {master =ifAList (op=p  then
    mports=imports keywords java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6


(* read_file *)

fun
  let
    fun read_local (
      let
        val pathjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        val textvaltext=Filereadfull_path
           Positionfile(Filesymbolic_path path;
      in (text, file_pos) end;

      in(, digest, text end;
      # (.et ) igest) =java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
         text  .content (downloadfile_node;
        val file_pos = Position.file file_node;
      in (text, file_pos) end;

    val (text, file_pos) =
      (case try Url.explode file_node of
        NONE=>read_local ()
      | java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       _=> read_remote));

val  plit_lines;
    valval name =Inputstring_of source;
  in {src_path = src_path, lines = lines, digest = digest, posvalposInputpos_ofsource
  handle ERROR msg =>

val read_file = read_file_node "";


(* load files *)

fun parsed_files make_paths (files, source)SOMEdir= dir
  if null files then
    let
      val master_dir = master_directory valpath=  .namehandleERRORmsg > msg
      valname  Input.string_of source;
      val pos = Input.pos_of source;
   Input;
      val src_pathsval_ = check pathh ERRORmsg= err ;
       reports=
        src_paths |> maps (fn src_path =>
          val check_path=  I;
           (pos .language_pathdelimited));
      val _c  formal_check File.check_dir;
    in map (read_file master_dir o rpair pos) src_paths end
  n  ctxtopt_dir s 

fun parse_files make_paths =
(.ahead .not_eof > .get_files)- .path_input >  ;

val parse_file = parse_files single >> (fn f => f #> the_single);


fun provide (src_path, digest) =
  map_data (fn (master_dir, imports, provided) =>
    if AList.defined (op =) provided src_path then
      error ("Duplicate use of source file: " ^ Path.print src_path)
    else (master_dir, imports, (src_path, digest) :: provided));

fun provide_file (file: Token.file) = provide (#src_path file, #digest file);
fun provide_file' file thy = (file, provide_file file thy);

fun provide_parse_files make_paths =
  parse_files file (dir +Pathexplode("));

val java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18


fun load_file thy src_path =
  let
    val full_path = check_file (master_directory thy) src_path;
    val text = File.read full_path;
    val         .printdir^Positionhere(Input s)
  in ((full_path, digest),

fun loaded_files_current
  #provided
    forall fn (src_path ) =
      (case   rgscontext - Scan. >  ctxt source =
        NONELatexstring(Latex. "/"(Input. )java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
      |


(* formal check *)

fun formal_check (check:     check ctxt (SOME Pathcurrent)  |> ML_Syntaxprint_path);
  let
    val name = Input.string_of source;
    val pos =java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
    valdelimited=Inputis_delimitedsource

    .report  pos(. delimited);

    unerr =errormsg^ Positionosition.herepos;
    val dir =
      (case opt_dir of
        OME dir=> java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
      | NONE => master_directory.<binding\<>file<>ML_antiq) >
    val    . namehandle m >;
val_= . pathhandlemsg=  ;
val=.  (. File.symbolic_pathpath)java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
    val_= check handle  msg=>  msg;
  in  ;

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
val check_file = formal_check File.check_file;
val check_dir = formal_check File.check_dir;

fun check_session_dir ctxt opt_dir s =
  let
    val dir = Path.expand (check_dir ctxt opt_dir s);
    val ok =
      File.is_file (dir + Path.explode("ROOT")) orelse
      File.is_file (dir + Path.explode("ROOTS"));
  in
    if ok then dir
    else
      error ("Bad session root directory (missing ROOT or ROOTS): " ^
        Path.print dir ^ Position.here (Input.pos_of s))
  end;


(* antiquotations *)

local

fun document_antiq (check: Proof.context -> Path.T option -> Input.source -> Path.T) =
  Args.context -- Scan.lift Parse.path_input >> (fn (ctxt, source) =>
   (check ctxt NONE source;
    Latex.string (Latex.output_ascii_breakable "/" (Input.string_of source))
    |> Latex.macro "isatt"));

fun ML_antiq check =
  Args.context -- Scan.lift Parse.path_input >> (fn (ctxt, source) =>
    check ctxt (SOME Path.current) source |> ML_Syntax.print_path);

in

val _ = Theory.setup
 (Document_Output.antiquotation_verbatim_embedded \<^binding>\<open>session\<close>
    (Scan.lift Parse.embedded_position) check_session #>
  Document_Output.antiquotation_raw_embedded \<^binding>\<open>path\<close> (document_antiq check_path) (K I) #>
  Document_Output.antiquotation_raw_embedded \<^binding>\<open>file\<close> (document_antiq check_file) (K I) #>
  Document_Output.antiquotation_raw_embedded \<^binding>\<open>dir\<close> (document_antiq check_dir) (K I) #>
  ML_Antiquotation.value_embedded \<^binding>\<open>path\<close> (ML_antiq check_path) #>
  ML_Antiquotation.value_embedded \<^binding>\<open>file\<close> (ML_antiq check_file) #>
  ML_Antiquotation.value_embedded \<^binding>\<open>dir\<close> (ML_antiq check_dir) #>
  ML_Antiquotation.value_embedded \<^binding>\<open>path_binding\<close>
    (Scan.lift (Parse.position Parse.path) >>
      (ML_Syntax.print_path_binding o Path.explode_binding)) #>
  ML_Antiquotation.value \<^binding>\<open>master_dir\<close>
    (Args.theory >> (ML_Syntax.print_path o master_directory)));

end;

end;

100%


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