194 catch { case ERROR(_) => /*error should be exposed in ML*/ } |
194 catch { case ERROR(_) => /*error should be exposed in ML*/ } |
195 |
195 |
196 private val future_result: Future[Process_Result] = |
196 private val future_result: Future[Process_Result] = |
197 Future.thread("build") { |
197 Future.thread("build") { |
198 val parent = info.parent.getOrElse("") |
198 val parent = info.parent.getOrElse("") |
199 |
199 val base = deps(name) |
200 val args_yxml = |
200 val args_yxml = |
201 YXML.string_of_body( |
201 YXML.string_of_body( |
202 { |
202 { |
203 import XML.Encode._ |
203 import XML.Encode._ |
204 pair(list(pair(string, int)), pair(list(properties), pair(bool, pair(bool, |
204 pair(list(pair(string, int)), pair(list(properties), pair(bool, pair(bool, |
205 pair(Path.encode, pair(list(pair(Path.encode, Path.encode)), pair(string, |
205 pair(Path.encode, pair(list(pair(Path.encode, Path.encode)), pair(string, |
206 pair(string, pair(string, pair(string, pair(Path.encode, |
206 pair(string, pair(string, pair(string, pair(Path.encode, |
207 pair(list(pair(Options.encode, list(string))), |
207 pair(list(pair(Options.encode, list(string))), |
208 list(pair(string, string))))))))))))))( |
208 pair(list(string), |
|
209 pair(list(pair(string, string)), list(pair(string, string))))))))))))))))( |
209 (Symbol.codes, (command_timings, (do_output, (verbose, |
210 (Symbol.codes, (command_timings, (do_output, (verbose, |
210 (store.browser_info, (info.document_files, (File.standard_path(graph_file), |
211 (store.browser_info, (info.document_files, (File.standard_path(graph_file), |
211 (parent, (info.chapter, (name, (Path.current, |
212 (parent, (info.chapter, (name, (Path.current, |
212 (info.theories, |
213 (info.theories, |
213 deps(name).dest_known_theories))))))))))))) |
214 (base.global_theories.toList, |
|
215 (base.dest_loaded_theories, base.dest_known_theories))))))))))))))) |
214 }) |
216 }) |
215 |
217 |
216 val env = |
218 val env = |
217 Isabelle_System.settings() + |
219 Isabelle_System.settings() + |
218 ("ISABELLE_ML_DEBUGGER" -> options.bool("ML_debugger").toString) |
220 ("ISABELLE_ML_DEBUGGER" -> options.bool("ML_debugger").toString) |
220 def save_heap: String = |
222 def save_heap: String = |
221 "ML_Heap.share_common_data (); ML_Heap.save_child " + |
223 "ML_Heap.share_common_data (); ML_Heap.save_child " + |
222 ML_Syntax.print_string0(File.platform_path(output)) |
224 ML_Syntax.print_string0(File.platform_path(output)) |
223 |
225 |
224 if (pide && !Sessions.is_pure(name)) { |
226 if (pide && !Sessions.is_pure(name)) { |
225 val resources = new Resources(name, deps(parent)) |
227 val resources = new Resources(deps(parent), default_qualifier = name) |
226 val session = new Session(options, resources) |
228 val session = new Session(options, resources) |
227 val handler = new Handler(progress, session, name) |
229 val handler = new Handler(progress, session, name) |
228 session.init_protocol_handler(handler) |
230 session.init_protocol_handler(handler) |
229 |
231 |
230 val session_result = Future.promise[Process_Result] |
232 val session_result = Future.promise[Process_Result] |