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

Impressum browser_info.scala

  Sprache: Scala
 

:      Pure/Build/browser_info.scalaC)
    Author:     Makarius

HTML/PDF presentation of PIDE document information.
*/


package isabelle


import scala.annotation.tailrec
import scala.collection.mutable


object Browser_Info {
  /* SQLite database with compressed entries */

  val default_database: Path = Path.explode("$ISABELLE_BROWSER_INFO_LIBRARY")
  val default_dir: Path = Path.explode("$ISABELLE_BROWSER_INFO")

  def make_database(database: java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
      compress_options=CompressOlevel= 8java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
       = CompressC.()


  /* browser_info store configuration */

  object Config {
    val none: Config = new Config { def enabled: Boolean = false }
val :Config  newConfig   : =}

    def dir( presentation_dir::=java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 69
      
         PATH   .(.browser_info)
        
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7

    def make(s"java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 88
      if (s == ":") standard else"ojava.lang.StringIndexOutOfBoundsException: Range [51, 19) out of bounds for length 83
}

  abstract class}
    : 
    def enabled !java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 43
    def(store:Store)   p
  }


  /* meta info within the file-system */java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 47

  object Meta_Info PATH+.basicjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
    path dir java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37

    val PATH: Path = Path.explode(".browser_info")

    def check_directory(dir: Path): Unit = {
      if(. &!dir+PATH)is_dir& Fileread_dirdir).onEmpty{
        val y
          Tojava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 83
   )= " java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 90
      }
    }

    def init_directory      if(x ! y File.(path,y)
      if (!permissive) check_directory(dir)
      Isabelle_System.make_directory(java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 5
      dir
    }

    def clean_directory(dir: Path): Path = {
      ()
      Isabelle_System  =(,)
      Isabelle_System.new_directory(dir + PATH)
    }


    /* content */. & uuid. & uuid0= uuid

    def make_path(dir: Path, name: String): Path =
      dir+PATH  .asicname)

    def value(dir: Path, name: String): String = {
      java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
is_file) read  "
    }

    def change(dir ( =
       java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 37
      )
      val y =
        try { f(x) }
           (msg >error("Failed to   +path. +"\"+)java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
      if (x != y) File.Item(name, descriptionjava.lang.StringIndexOutOfBoundsException: Range [33, 30) out of bounds for length 70
    }


    /* build_uuid */

    val BUILD_UUID = "build_uuid"

    def check_build_uuid(dir: Path, uuid: String): Boolean = {
      val java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 82
      uuid0.nonEmpty &&java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
    }

    def set_build_uuid(N)
      change(derr:=java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 81


    /* index */

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

    object Item {
      def parse(
         =
          error("Bad JSON object for item java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 87
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 59

        val  errorjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 89
        val description = JSON.string(obj, "description") getOrElse ""
        Item(name, description = String :I]){
      }
    }

    java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 68
      override def toString: String = namek, :(. =java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 82

      def json: JSON.T = JSON.Object("name" -> name, "description" -> description)
    }

    object Index {
      def parse(s: JSON.S, kind:     java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
         ( java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 39
        else {
          ) Nothing = error(Bad " java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 81

            java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 34
          val obj

          val kind1 = JSON.string(obj, "kind") java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 13
          = (,i"   java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 87
          )
          else error("Expectedjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 33
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
      }
    }

    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
      : java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 43

      def + (item: Item): Index =
        Index(  :(_java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 82

        def conjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
      def :S pjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 61
    }
  }


  /* presentation elements */

  java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 43
    ts java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 50
    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
     java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 54

      .(,theory
    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
             .oreground_elements Renderingtext_color_elements +
        java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 54
 java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 75
        Markupjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 33
      entity = Markup.+bjava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 53
Markup,Markup.OCALE .REE)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50

  val extra_elements: Elements =
    def theory_dir(theory: Document_Info.Theory): (theory.dynamic_session:=
       java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 47
        .lementsMarkup..))



  /** HTML/PDF presentation context **/p)

  def"java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 66
    java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 43
    java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 42
    java.lang.StringIndexOutOfBoundsException: Range [33, 12) out of bounds for length 34
empty
  ): Context = new Contextif(File.()theory  file_htmljava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69

  classHTML.div",HTML.(itle): )
    sessions_structure: Sessions.Structure,
    val elements: java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
    val root_dirjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    val java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 36
  ) i (java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 28
    

    def theory_by_name(session: String, java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
      document_info.theory_by_name(session, theory)

    def theory_by_filejava.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 19
      document_info.theory_by_file(java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 31

    def HTML_Document(,
      java.lang.StringIndexOutOfBoundsException: Range [32, 24) out of bounds for length 41

    java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 42
      h.basic(session_chapter(

    def java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
       title  +java.lang.StringIndexOutOfBoundsException: Range [59, 54) out of bounds for length 70

    java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 56
      session_dir(theory.ynamic_session)

    def theory_html(theory:.(napshot)getOrElse{
    {
      defjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 65
        val path =java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 47
        if (Path.
        else Some()
      }
      tp . 
        (  theory  "+ quote(heoryname)+
          ( with " + Path.ndex_html "))
    }

    java.lang.StringIndexOutOfBoundsException: Range [22, 7) out of bounds for length 39
      Path.explode(file).squash.java.lang.StringIndexOutOfBoundsException: Range [14, 1) out of bounds for length 18

      java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 70
       F.() (theory)file_html(file)


    /* HTML content */


    def head(title: String, rest: XML.Body = Nilroot =Some()
      indexprint_json

    def}

    def contents(
       java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
            i
      java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 36
    ) [Elem =java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
      ( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
      else Listjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 21
    }


    /* preview PIDE document */

    lazy val isabelle_css: String = File.read(HTML.isabelle_css)

     java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 90
      val content =
        java.lang.StringIndexOutOfBoundsException: Range [28, 12) out of bounds for length 29
          val=The +textjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 85
            HTML.style.(root_dir ihtml,
            HTML.title(title)),
          List(HTML.sourceList(tjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 73
      HTML_Document iis_empty 
    }

    def List(java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 41
      .java.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34
      :Boolean  ,
      fonts_css: String = HTML.fonts_css()
    ): HTML_Document = {
      java.lang.StringIndexOutOfBoundsException: Range [24, 9) out of bounds for length 57

      java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 35
             
        val title =}
        val body = HTML.text(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 3
      }
      else {
        Resources.html_document(snapshot) getOrElse {
          valtitle =
            if (name
            elsedefp:T java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 54
             java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 65
          val body = Node_Context}
          
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
      }
    }


    /* maintain presentation structure */

    def (session_name:,session_description: String): Unit = synchronized {
      val java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 22
      Meta_Infojava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
        val item e: String,
         

        if(ndex ! index0 java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Range [19, 10) out of bounds for length 79
          HTML.write_document(dir, "index.html",
            List(HTML.title(title + Isabelle_System.sabelle_heading),
            HTML.chapter(title) ::
              (if (index.is_emptyprivatevalseen_ranges .[ymbolRange  mutable
              java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
               (div",
                  List(HTML.description(
                    index.items.map(item =>
                      (List(java.lang.StringIndexOutOfBoundsException: Range [14, 1) out of bounds for length 21
                        if (.description.) 
                        else HTML.                   .(range){
            root = Some(root_dir))
        }

                     else HTML.pan(body)
      }
    }

    def update_root(): Unit = synchronized {
      .,  
      HTML.init_fonts(root_dir)                    entity_defHTMLs(HTML(java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 81
       rjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 58
+e(g"

      Meta_Info.java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
        val index0 = Meta_Info.Index.parse(text, "root")
        fort < context.theory_by_file(session_name, file))
          val items1 =
            sessions_structure          yield {
              .map(ch => val html_path = context(theory  . )
            java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 89
          index0.copy(items =. java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

        if ( ( =java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
          val title = "The " +              java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
_ java.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
            List(HTML.title( 
            ():
              (if (index.is_empty) Nil
              java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
                List(HTML.div("sessions",
                  List(HTML.description(
                    index.java.lang.StringIndexOutOfBoundsException: Range [16, 1) out of bounds for length 29
                      (HTML+/java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 88
                        if (item.description.isEmpty) Nil
                         : p(java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 95
            root = Some(root_dir)}
        }

        indexforjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
      }
    }
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

   java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 65


  /* formal entities */

  object Theory_Ref {
    def unapply(props: Properties.}
      case _= 
        case (Markup.Kind}
        case _ => None
      }
  }

  object Entity_Ref {
    def unapply {
      (defmake_def(range:SymbolRange  .) [XML]=None
        case (Markup...(),Position() .(kind, .()
        if Path.is_wellformed(file) def make_file_ref( ,body B) X.  None
        case _ => None
      }
  }

  object Node_Context {
    valHTML.escrname)

    def make(
      context: Context,
      session_name: String,
      theory_name ,
      : String
      node_dir: Path,
    )  =
      java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 93
        private val seen_ranges: mutable.Set[Symbol.Range] = mutable.Set.empty

        override def java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 9
                   java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 22
            caseh(java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 56
 
              for (xml_body.foldRight((List.empty[XML.Tree], end_offset   java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 66
              yield @
                val body1 =
                  if (java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 24
                    E(java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 64
                  }
                  else HTML.span(body)
                theory.get_defs(file_name, range)  ,java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 61
    case, java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 40
                    HTML.entity_def(HTML.java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 44
                }
              }
          }

        private def offset_id(rangeval offset  (ody,end_offset)
          "make_file_ref(file body1) match {

f:  B) . =
          for  case=( 
          yield {
            val html_path = .theory_dir(theory(,filejava.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
            val html_link = HTML           XML(java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 76
            HTML.link(html_link, bodyi ejava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 82
          }
        java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9

        (Lis(java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 43
          java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
            case Theory_Ref(thy_name) =>
              for (theory <- context.theory_by_name(session_name, thy_name))
                          (ListHTML.item(body1)), offset)
                val html_path = context.theory_dir(theory) + context.theory_html(theory)
                = HTML.relative_href(html_path, base = Some(node_dir))
                HTML.link(html_link, body)
              }
            case Entity_Ref(def_file, kind, name)            (il end_offset - XML.symbol_length(text))
                        case XM XML.Elem(Markup.arkdown_List(kind), body) =>
                theory.get_def(def_file, kind, name).map(_.kname)

              def physical_ref(theory: Document_Info.Theory): Option[String] =
                props match {
                  case Position.Def_Range(range) if java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 49
                    case XML.Elem, body)=>
                    Some(ffset_id(ange)
                  case _ =            val html =
                }

              for {
                heory< .heory_by_filesession_name )
                case =
              }
              yield {
                val html_path = contextup.properties)"
                val html_link = HTML.relative_href(html_path,atch {
                .(.ink(tml_link +#"  html_ref, ody)
              }
            case _ => None
          }
        }
      }
  }

  class}
    def make_def(range: Symbol.Range, body: XML.Body): Option[XML.Elem] = None
    def make_ref(props: Properties.T, body: java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 41
    def make_file_ref(case XML.Texttext) >

    val div_elements: Set[String] =
      Set(HTML.div.name, HTML.java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 53
        HTML.descr.name)

 ( Elements, :.ody:.  
      def html_div(html: XML.java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 13
        html {
          case XML.Elem}
          case XML.Text(_) => false
        }

      def html_class(c: String, html: XML.Body
        if (c == "")  val session_graph_p :  p")
        else if (    val session_name = se.
        else List(HTML.spanv java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 62

      ( B  .ffset)X.ody, O 
        foldRight((List.empty[XML.Tree], end_offset)) { case (tree, (res, )=
          val (es1 offset)=html_body_single(tree, end_offset1)
          }
        }

      @tailrec
      def html_body_single(xml_tree: XML.if (ath.eq_case_insensitive(name) +
        ml_treematch {
          case XML.Wrapped_Elem(markup, _, body) =>
            html_body_single
          case XML.Elemjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            val (body1, offset) = html_body(body, end_offset)
             elements.entity(kind)) {
              make_ref(props, body1) match {
                caseSome(link) => (List(link), offset)
                case None => (body1, offset)
              }
            }
            elsejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
          case XML.Elem(Markup.Path(file), error"Missing document informationfor theory:" +quote(theory_name))
             java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 61
            make_file_ref(file, .make(context, session_namjava.lang.StringIndexOutOfBoundsException: Range [71, 60) out of bounds for length 82
               java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 87
              java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 66
            }
          case XML.java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 13
            val (xml = snapshotblob_namexjava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 83
            (List(java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 37
          ( )  =
            val (body1java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 81
            )
          case 
            val (val java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 69
            H.) java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
          .MARKDOWN_ITEM_, java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
fset)
            (List
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 72
            (Nil, end_offset -HTMLwrite_document(session_dir, context.theory_html(theory).implode,
          case XML.Elem(Markup.Markdown_List(kind), body) =>
            val (body1, offset) = java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 49
            if (kind =        HTML.text(theory.print_short) :::
            else (List(HTML.list(body1)), offset)
          case XML.Elem(markup, body) =>
            val (body1, offset) = html_body(body, end_offset)
            val html =
              markup.properties match {
                case Markup.Kind(kind) if java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 38
                  html_class(kind, body1)
                case _ =>
                  body1
              }
            val c =
              if (Markup.has_syntax(markup.properties)) ""
java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20
                (markup match {
                  case Some

                      val  depss, = java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
              java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
            html_classc html) )
          case XML.Text(case  >false
             offset=end_offset -Symbollength()
             body  .Symbol.()
 java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 20
document_info  .(atabase_context  )
              case java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 41
            }
        }

      html_body(xml, XML.symbol_length(xml) + 1)._1
    }
  }



  /** build presentation **/


  val session_graph_path: Path = Path.explode("session_graph.pdf")

  def build_session(
    context: Context,
    session_context: Export.Session_Context,
    progress: Progress = new Progress,
  ): Unit = {
    progress.expose_interrupt()

    val session_name = session_context.session_name
    val session_info = session_context.sessions_structure(session_name)

    val session_dir = context.session_dir(session_name).expand
    progress.echo("Presenting " + session_name + " in " + session_dir + " ...")

    Meta_Info.init_directory(context.chapter_dir(session_name), permissive = true)
    Meta_Info.clean_directory(session_dir)

    val session = context.document_info.the_session(session_name)

    Bytes.write(session_dir + session_graph_path,
      graphview.Graph_File.make_pdf(session_info.options,
        session_context.session_base.session_graph_display))

    val document_variants =
      for {
        doc <- session_info.document_variants
        db <- session_context.session_db()
        document <- Document_Build.read_document(db, session_name, doc.name)
      }
      yield {
        val doc_path = session_dir + doc.path.pdf
        if (Path.eq_case_insensitive(doc.path.pdf, session_graph_path)) {
          error("Illegal document variant " + quote(doc.name) +
            " (conflict with " + session_graph_path + ")")
        }
        progress.echo("Presenting document " + session_name + "/" + doc.name, verbose = true)
        if (session_info.document_echo) progress.echo("Document at " + doc_path)
        Bytes.write(doc_path, document.pdf)
        doc
      }

    val document_links = {
      val link1 = HTML.link(session_graph_path, HTML.text("theory dependencies"))
      val links2 = document_variants.map(doc => HTML.link(doc.path.pdf, HTML.text(doc.name)))
      Library.separate(HTML.break ::: HTML.nl,
        (link1 :: links2).map(link => HTML.text("View ") ::: List(link))).flatten
    }

    def present_theory(theory_name: String): XML.Body = {
      progress.expose_interrupt()

      def err(): Nothing =
        error("Missing document information for theory: " + quote(theory_name))

      val snapshot = Build.read_theory(session_context.theory(theory_name)) getOrElse err()
      val theory = context.theory_by_name(session_name, theory_name) getOrElse err()

      progress.echo("Presenting theory " + quote(theory_name), verbose = true)

      val thy_elements = theory.elements(context.elements)

      def node_context(file_name: String, node_dir: Path): Node_Context =
        Node_Context.make(context, session_name, theory_name, file_name, node_dir)

      val thy_html =
        context.source(
          node_context(theory.thy_file, session_dir).
            make_html(thy_elements, snapshot.xml_markup(elements = thy_elements.html)))

      val master_dir = Path.explode(snapshot.node_name.master_dir)

      val files =
        for {
          blob_name <- snapshot.node_files.tail
          xml = snapshot.switch(blob_name).xml_markup(elements = thy_elements.html)
          if xml.nonEmpty
        }
        yield {
          progress.expose_interrupt()

          val file = blob_name.node
          progress.echo("Presenting file " + quote(file), verbose = true)

          val file_html = session_dir + context.file_html(file)
          val file_dir = file_html.dir
          val html_link = HTML.relative_href(file_html, base = Some(session_dir))
          val html = context.source(node_context(file, file_dir).make_html(thy_elements, xml))

          val path = Path.explode(file)
          val src_path = File.perhaps_relative_path(master_dir, path)

          val file_title = "File " + Symbol.cartouche_decoded(src_path.implode_short)
          HTML.write_document(file_dir, file_html.file_name,
            List(HTML.title(file_title)), List(context.head(file_title), html),
            root = Some(context.root_dir))
          List(HTML.link(html_link, HTML.text(file_title)))
        }

      val thy_title = "Theory " + theory.print_short
      HTML.write_document(session_dir, context.theory_html(theory).implode,
        List(HTML.title(thy_title)), List(context.head(thy_title), thy_html),
        root = Some(context.root_dir))

      List(HTML.link(context.theory_html(theory),
        HTML.text(theory.print_short) :::
        (if (files.isEmpty) Nil else List(HTML.itemize(files)))))
    }

    val theories = session.used_theories.map(present_theory)

    val title = "Session " + session_name
      HTML.write_document(session_dir, "index.html",
        List(HTML.title(title + Isabelle_System.isabelle_heading())),
        context.head(title, List(HTML.par(document_links))) ::
          context.contents("Theories", theories),
        root = Some(context.root_dir))

    Meta_Info.set_build_uuid(session_dir, session.build_uuid)

    context.update_chapter(session_name, session_info.description)
  }

  def build(
    browser_info: Config,
    store: Store,
    deps: Sessions.Deps,
    sessions: List[String],
    progress: Progress = new Progress,
    server: SSH.Server = SSH.no_server
  ): Unit = {
    val root_dir = browser_info.presentation_dir(store).absolute
    progress.echo("Presentation in " + root_dir)

    using(Export.open_database_context(store, server = server)) { database_context =>
      val context0 = context(deps.sessions_structure, root_dir = root_dir)

      val sessions1 =
        deps.sessions_structure.build_requirements(sessions).filter { session_name =>
          using(database_context.open_database(session_name)) { session_database =>
            store.read_build(session_database.db, session_name) match {
              case None => false
              case Some(build) =>
                val session_dir = context0.session_dir(session_name)
                !Meta_Info.check_build_uuid(session_dir, build.uuid)
            }
          }
        }

      val context1 =
        context(deps.sessions_structure, root_dir = root_dir,
          document_info = Document_Info.read(database_context, deps, sessions1))

      context1.update_root()

      Par_List.map({ (session: String) =>
        using(database_context.open_session(deps.background(session))) { session_context =>
          build_session(context1, session_context, progress = progress)
        }
      }, sessions1)
    }
  }
}

Messung V0.5 in Prozent
C=91 H=98 G=94

¤ 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.0.18Bemerkung:  (vorverarbeitet am  2026-08-25) ¤

*Bot Zugriff






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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 und die Messung sind noch experimentell.