src/Pure/Thy/sessions.scala
changeset 70674 29bb1ebb188f
parent 70673 b0172698d0d3
child 70676 73812c598a26
equal deleted inserted replaced
70673:b0172698d0d3 70674:29bb1ebb188f
   117         theories_local = for ((a, b) <- theories_local) yield (a, b.map(File.standard_path(_))),
   117         theories_local = for ((a, b) <- theories_local) yield (a, b.map(File.standard_path(_))),
   118         files = for ((a, b) <- files) yield (a, b.map(c => c.map(File.standard_path(_)))))
   118         files = for ((a, b) <- files) yield (a, b.map(c => c.map(File.standard_path(_)))))
   119 
   119 
   120     def theory_names: List[Document.Node.Name] = theories.iterator.map(p => p._2.name).toList
   120     def theory_names: List[Document.Node.Name] = theories.iterator.map(p => p._2.name).toList
   121 
   121 
   122     lazy val theory_graph: Document.Theory_Graph[Unit] =
   122     lazy val theory_graph: Document.Node.Name.Graph[Unit] =
   123       Document.theory_graph(
   123       Document.Node.Name.make_graph(
   124         for ((_, entry) <- theories.toList)
   124         for ((_, entry) <- theories.toList)
   125         yield ((entry.name, ()), entry.header.imports.map(imp => theories(imp.theory).name)))
   125         yield ((entry.name, ()), entry.header.imports.map(imp => theories(imp.theory).name)))
   126 
   126 
   127     def get_file(file: JFile, bootstrap: Boolean = false): Option[Document.Node.Name] =
   127     def get_file(file: JFile, bootstrap: Boolean = false): Option[Document.Node.Name] =
   128     {
   128     {
   207       (for {
   207       (for {
   208         (_, base) <- session_bases.iterator
   208         (_, base) <- session_bases.iterator
   209         name <- base.dump_checkpoints.iterator
   209         name <- base.dump_checkpoints.iterator
   210       } yield name).toSet
   210       } yield name).toSet
   211 
   211 
   212     def used_theories_condition(
   212     def used_theories_condition(default_options: Options, progress: Progress = No_Progress)
   213       default_options: Options, progress: Progress = No_Progress): Document.Theory_Graph[Options] =
   213       : Document.Node.Name.Graph[Options] =
   214     {
   214     {
   215       val default_skip_proofs = default_options.bool("skip_proofs")
   215       val default_skip_proofs = default_options.bool("skip_proofs")
   216       Document.theory_graph(
   216       Document.Node.Name.make_graph(
   217         permissive = true,
   217         permissive = true,
   218         entries =
   218         entries =
   219           for {
   219           for {
   220             session_name <- sessions_structure.build_topological_order
   220             session_name <- sessions_structure.build_topological_order
   221             entry @ ((name, options), _) <- session_bases(session_name).used_theories
   221             entry @ ((name, options), _) <- session_bases(session_name).used_theories