146 pos: Position.T = Position.none, |
146 pos: Position.T = Position.none, |
147 doc_names: List[String] = Nil, |
147 doc_names: List[String] = Nil, |
148 global_theories: Map[String, String] = Map.empty, |
148 global_theories: Map[String, String] = Map.empty, |
149 loaded_theories: Graph[String, Outer_Syntax] = Graph.string, |
149 loaded_theories: Graph[String, Outer_Syntax] = Graph.string, |
150 used_theories: List[((Document.Node.Name, Options), List[Document.Node.Name])] = Nil, |
150 used_theories: List[((Document.Node.Name, Options), List[Document.Node.Name])] = Nil, |
151 dump_checkpoint: List[Document.Node.Name] = Nil, |
151 dump_checkpoints: Set[Document.Node.Name] = Set.empty, |
152 known: Known = Known.empty, |
152 known: Known = Known.empty, |
153 overall_syntax: Outer_Syntax = Outer_Syntax.empty, |
153 overall_syntax: Outer_Syntax = Outer_Syntax.empty, |
154 imported_sources: List[(Path, SHA1.Digest)] = Nil, |
154 imported_sources: List[(Path, SHA1.Digest)] = Nil, |
155 sources: List[(Path, SHA1.Digest)] = Nil, |
155 sources: List[(Path, SHA1.Digest)] = Nil, |
156 session_graph_display: Graph_Display.Graph = Graph_Display.empty_graph, |
156 session_graph_display: Graph_Display.Graph = Graph_Display.empty_graph, |
199 def get(name: String): Option[Base] = session_bases.get(name) |
199 def get(name: String): Option[Base] = session_bases.get(name) |
200 |
200 |
201 def imported_sources(name: String): List[SHA1.Digest] = |
201 def imported_sources(name: String): List[SHA1.Digest] = |
202 session_bases(name).imported_sources.map(_._2) |
202 session_bases(name).imported_sources.map(_._2) |
203 |
203 |
204 def dump_checkpoint: List[Document.Node.Name] = |
204 def dump_checkpoints: Set[Document.Node.Name] = |
205 (for { |
205 (for { |
206 (_, base) <- session_bases.iterator |
206 (_, base) <- session_bases.iterator |
207 name <- base.dump_checkpoint.iterator |
207 name <- base.dump_checkpoints.iterator |
208 } yield name).toList |
208 } yield name).toSet |
209 |
209 |
210 def used_theories_condition(default_options: Options, progress: Progress = No_Progress) |
210 def used_theories_condition(default_options: Options, progress: Progress = No_Progress) |
211 : Graph[Document.Node.Name, Options] = |
211 : Graph[Document.Node.Name, Options] = |
212 { |
212 { |
213 val default_skip_proofs = default_options.bool("skip_proofs") |
213 val default_skip_proofs = default_options.bool("skip_proofs") |
309 progress.echo("Session " + info.chapter + "/" + info.name + groups) |
309 progress.echo("Session " + info.chapter + "/" + info.name + groups) |
310 } |
310 } |
311 |
311 |
312 val dependencies = resources.session_dependencies(info) |
312 val dependencies = resources.session_dependencies(info) |
313 |
313 |
314 val dump_checkpoint = resources.dump_checkpoint(info) |
314 val dump_checkpoints = resources.dump_checkpoints(info) |
315 |
315 |
316 val overall_syntax = dependencies.overall_syntax |
316 val overall_syntax = dependencies.overall_syntax |
317 |
317 |
318 val theory_files = dependencies.theories.map(_.path) |
318 val theory_files = dependencies.theories.map(_.path) |
319 val loaded_files = |
319 val loaded_files = |
391 pos = info.pos, |
391 pos = info.pos, |
392 doc_names = doc_names, |
392 doc_names = doc_names, |
393 global_theories = global_theories, |
393 global_theories = global_theories, |
394 loaded_theories = dependencies.loaded_theories, |
394 loaded_theories = dependencies.loaded_theories, |
395 used_theories = used_theories, |
395 used_theories = used_theories, |
396 dump_checkpoint = dump_checkpoint, |
396 dump_checkpoints = dump_checkpoints, |
397 known = known, |
397 known = known, |
398 overall_syntax = overall_syntax, |
398 overall_syntax = overall_syntax, |
399 imported_sources = check_sources(imported_files), |
399 imported_sources = check_sources(imported_files), |
400 sources = check_sources(session_files), |
400 sources = check_sources(session_files), |
401 session_graph_display = session_graph_display, |
401 session_graph_display = session_graph_display, |