| author | wenzelm |
| Mon, 27 Aug 2018 14:42:24 +0200 | |
| changeset 68816 | 5a53724fe247 |
| parent 68812 | 10732941cc4b |
| child 68819 | 9cfa4aa35719 |
| permissions | -rw-r--r-- |
| 62887 | 1 |
(* Title: Pure/ML_Bootstrap.thy |
|
62868
61a691db1c4d
support for ML project ROOT file, with imitation of ML "use" commands;
wenzelm
parents:
diff
changeset
|
2 |
Author: Makarius |
|
61a691db1c4d
support for ML project ROOT file, with imitation of ML "use" commands;
wenzelm
parents:
diff
changeset
|
3 |
|
| 62887 | 4 |
ML bootstrap environment -- with access to low-level structures! |
|
62868
61a691db1c4d
support for ML project ROOT file, with imitation of ML "use" commands;
wenzelm
parents:
diff
changeset
|
5 |
*) |
|
61a691db1c4d
support for ML project ROOT file, with imitation of ML "use" commands;
wenzelm
parents:
diff
changeset
|
6 |
|
| 62887 | 7 |
theory ML_Bootstrap |
| 62880 | 8 |
imports Pure |
|
62868
61a691db1c4d
support for ML project ROOT file, with imitation of ML "use" commands;
wenzelm
parents:
diff
changeset
|
9 |
begin |
|
61a691db1c4d
support for ML project ROOT file, with imitation of ML "use" commands;
wenzelm
parents:
diff
changeset
|
10 |
|
|
67105
05ff3e6dbbce
clarified dependencies: "isabelle build -S" should be invariant wrt. change of ML system or platform;
wenzelm
parents:
64331
diff
changeset
|
11 |
external_file "$POLYML_EXE" |
|
05ff3e6dbbce
clarified dependencies: "isabelle build -S" should be invariant wrt. change of ML system or platform;
wenzelm
parents:
64331
diff
changeset
|
12 |
|
|
05ff3e6dbbce
clarified dependencies: "isabelle build -S" should be invariant wrt. change of ML system or platform;
wenzelm
parents:
64331
diff
changeset
|
13 |
|
|
68816
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
14 |
subsection \<open>ML environment for virtual bootstrap\<close> |
|
62944
3ee643c5ed00
more standard session build process, including browser_info;
wenzelm
parents:
62930
diff
changeset
|
15 |
|
|
68816
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
16 |
ML \<open> |
|
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
17 |
#allStruct ML_Name_Space.global () |> List.app (fn (name, _) => |
|
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
18 |
if member (op =) ML_Name_Space.hidden_structures name then |
|
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
19 |
ML (Input.string ("structure " ^ name ^ " = " ^ name))
|
|
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
20 |
else ()); |
|
62944
3ee643c5ed00
more standard session build process, including browser_info;
wenzelm
parents:
62930
diff
changeset
|
21 |
structure Output_Primitives = Output_Primitives_Virtual; |
|
3ee643c5ed00
more standard session build process, including browser_info;
wenzelm
parents:
62930
diff
changeset
|
22 |
structure Thread_Data = Thread_Data_Virtual; |
|
68816
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
23 |
structure PolyML = PolyML; |
| 64331 | 24 |
fun ML_system_pp (_: FixedInt.int -> 'a -> 'b -> PolyML_Pretty.pretty) = (); |
|
62930
51ac6bc389e8
shared output primitives of physical/virtual Pure;
wenzelm
parents:
62902
diff
changeset
|
25 |
\<close> |
|
51ac6bc389e8
shared output primitives of physical/virtual Pure;
wenzelm
parents:
62902
diff
changeset
|
26 |
|
|
62944
3ee643c5ed00
more standard session build process, including browser_info;
wenzelm
parents:
62930
diff
changeset
|
27 |
|
|
68816
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
28 |
subsection \<open>Global ML environment for Isabelle/Pure\<close> |
|
62944
3ee643c5ed00
more standard session build process, including browser_info;
wenzelm
parents:
62930
diff
changeset
|
29 |
|
|
3ee643c5ed00
more standard session build process, including browser_info;
wenzelm
parents:
62930
diff
changeset
|
30 |
ML \<open>Proofterm.proofs := 0\<close> |
|
3ee643c5ed00
more standard session build process, including browser_info;
wenzelm
parents:
62930
diff
changeset
|
31 |
|
|
68816
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
32 |
ML \<open> |
|
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
33 |
Context.setmp_generic_context NONE |
|
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
34 |
ML \<open> |
|
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
35 |
List.app ML_Name_Space.forget_structure ML_Name_Space.hidden_structures; |
|
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
36 |
structure PolyML = |
|
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
37 |
struct |
|
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
38 |
val pointerEq = pointer_eq; |
|
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
39 |
structure IntInf = PolyML.IntInf; |
|
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
40 |
end; |
|
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
41 |
\<close> |
|
62944
3ee643c5ed00
more standard session build process, including browser_info;
wenzelm
parents:
62930
diff
changeset
|
42 |
\<close> |
|
3ee643c5ed00
more standard session build process, including browser_info;
wenzelm
parents:
62930
diff
changeset
|
43 |
|
|
68816
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
44 |
setup \<open>Context.theory_map ML_Env.bootstrap_name_space\<close> |
|
5a53724fe247
support named ML environments, notably "Isabelle", "SML";
wenzelm
parents:
68812
diff
changeset
|
45 |
declare [[ML_read_global = false]] |
|
62868
61a691db1c4d
support for ML project ROOT file, with imitation of ML "use" commands;
wenzelm
parents:
diff
changeset
|
46 |
|
|
61a691db1c4d
support for ML project ROOT file, with imitation of ML "use" commands;
wenzelm
parents:
diff
changeset
|
47 |
end |