equal
deleted
inserted
replaced
10 end; |
10 end; |
11 |
11 |
12 structure Build: BUILD = |
12 structure Build: BUILD = |
13 struct |
13 struct |
14 |
14 |
15 fun use_theories name options = |
15 fun use_theories options = |
16 Thy_Info.use_thys |
16 Thy_Info.use_thys |
17 |> Session.with_timing name (Options.bool options "timing") |
|
18 |> Unsynchronized.setmp Proofterm.proofs (Options.int options "proofs") |
17 |> Unsynchronized.setmp Proofterm.proofs (Options.int options "proofs") |
19 |> Unsynchronized.setmp print_mode |
18 |> Unsynchronized.setmp print_mode |
20 (space_explode "," (Options.string options "print_mode") @ print_mode_value ()) |
19 (space_explode "," (Options.string options "print_mode") @ print_mode_value ()) |
21 |> Unsynchronized.setmp Goal.parallel_proofs (Options.int options "parallel_proofs") |
20 |> Unsynchronized.setmp Goal.parallel_proofs (Options.int options "parallel_proofs") |
22 |> Unsynchronized.setmp Goal.parallel_proofs_threshold |
21 |> Unsynchronized.setmp Goal.parallel_proofs_threshold |
25 |> Unsynchronized.setmp Multithreading.max_threads (Options.int options "threads_limit") |
24 |> Unsynchronized.setmp Multithreading.max_threads (Options.int options "threads_limit") |
26 |> Options.bool options "no_document" ? Present.no_document; |
25 |> Options.bool options "no_document" ? Present.no_document; |
27 |
26 |
28 fun build args_file = |
27 fun build args_file = |
29 let |
28 let |
30 val (save, (options, (verbose, (browser_info, (parent, (name, (base_name, theories))))))) = |
29 val (save, (options, (timing, (verbose, (browser_info, (parent, |
|
30 (name, (base_name, theories)))))))) = |
31 File.read (Path.explode args_file) |> YXML.parse_body |> |
31 File.read (Path.explode args_file) |> YXML.parse_body |> |
32 let open XML.Decode in |
32 let open XML.Decode in |
33 pair bool (pair Options.decode (pair bool (pair string (pair string |
33 pair bool (pair Options.decode (pair bool (pair bool (pair string (pair string |
34 (pair string (pair string ((list (pair Options.decode (list string)))))))))) |
34 (pair string (pair string ((list (pair Options.decode (list string))))))))))) |
35 end; |
35 end; |
36 |
36 |
37 val _ = |
37 val _ = |
38 Session.init |
38 Session.init |
39 save |
39 save |
47 (true (* FIXME copy document/ files on Scala side!? *), |
47 (true (* FIXME copy document/ files on Scala side!? *), |
48 Options.string options "document_dump") |
48 Options.string options "document_dump") |
49 "" |
49 "" |
50 verbose; |
50 verbose; |
51 |
51 |
52 val _ = List.app (uncurry (use_theories name)) theories; |
52 val _ = List.app (uncurry (use_theories |> Session.with_timing name timing)) theories; |
53 val _ = Session.finish (); |
53 val _ = Session.finish (); |
54 |
54 |
55 val _ = if save then () else quit (); |
55 val _ = if save then () else quit (); |
56 in () end |
56 in () end |
57 handle exn => (Output.error_msg (ML_Compiler.exn_message exn); exit 1); |
57 handle exn => (Output.error_msg (ML_Compiler.exn_message exn); exit 1); |