equal
deleted
inserted
replaced
61 private sealed case class Checkpoints_State( |
61 private sealed case class Checkpoints_State( |
62 status: Checkpoints_State.Status.Value, |
62 status: Checkpoints_State.Status.Value, |
63 nodes: List[Document.Node.Name]) |
63 nodes: List[Document.Node.Name]) |
64 { |
64 { |
65 def next( |
65 def next( |
66 dep_graph: Document.Theory_Graph[Unit], |
66 dep_graph: Document.Node.Name.Graph[Unit], |
67 finished: Document.Node.Name => Boolean): (List[Document.Node.Name], Checkpoints_State) = |
67 finished: Document.Node.Name => Boolean): (List[Document.Node.Name], Checkpoints_State) = |
68 { |
68 { |
69 import Checkpoints_State.Status |
69 import Checkpoints_State.Status |
70 |
70 |
71 def descendants: List[Document.Node.Name] = |
71 def descendants: List[Document.Node.Name] = |
148 last_update: Time = Time.now(), |
148 last_update: Time = Time.now(), |
149 nodes_status: Document_Status.Nodes_Status = Document_Status.Nodes_Status.empty, |
149 nodes_status: Document_Status.Nodes_Status = Document_Status.Nodes_Status.empty, |
150 already_committed: Map[Document.Node.Name, Document_Status.Node_Status] = Map.empty, |
150 already_committed: Map[Document.Node.Name, Document_Status.Node_Status] = Map.empty, |
151 result: Option[Exn.Result[Use_Theories_Result]] = None) |
151 result: Option[Exn.Result[Use_Theories_Result]] = None) |
152 { |
152 { |
153 def dep_graph: Document.Theory_Graph[Unit] = dependencies.theory_graph |
153 def dep_graph: Document.Node.Name.Graph[Unit] = dependencies.theory_graph |
154 |
154 |
155 def update(new_nodes_status: Document_Status.Nodes_Status): Use_Theories_State = |
155 def update(new_nodes_status: Document_Status.Nodes_Status): Use_Theories_State = |
156 copy(last_update = Time.now(), nodes_status = new_nodes_status) |
156 copy(last_update = Time.now(), nodes_status = new_nodes_status) |
157 |
157 |
158 def watchdog: Boolean = |
158 def watchdog: Boolean = |
477 } |
477 } |
478 |
478 |
479 |
479 |
480 /* theories */ |
480 /* theories */ |
481 |
481 |
482 lazy val theory_graph: Document.Theory_Graph[Unit] = |
482 lazy val theory_graph: Document.Node.Name.Graph[Unit] = |
483 Document.theory_graph( |
483 Document.Node.Name.make_graph( |
484 for ((name, theory) <- theories.toList) |
484 for ((name, theory) <- theories.toList) |
485 yield ((name, ()), theory.node_header.imports.filter(theories.isDefinedAt(_)))) |
485 yield ((name, ()), theory.node_header.imports.filter(theories.isDefinedAt(_)))) |
486 |
486 |
487 def is_required(name: Document.Node.Name): Boolean = required.isDefinedAt(name) |
487 def is_required(name: Document.Node.Name): Boolean = required.isDefinedAt(name) |
488 |
488 |