src/Pure/Thy/chart.ML
author paulson
Fri, 11 Aug 1995 12:36:15 +0200
changeset 1227 c9f7848bc5ee
permissions -rw-r--r--
Mateja Jamnik's theory to html converter
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1227
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
     1
(*  ID:         $Id$
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
     2
    Author:	Mateja Jamnik, University of Cambridge
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
     3
    Copyright   1995  University of Cambridge
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
     4
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
     5
   Generator of the dependency charts of Isabelle theories.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
     6
*)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
     7
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
     8
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
     9
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    10
   Declaration of the variables carrying the name 
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    11
   of the location of source files:
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    12
   
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    13
   path -    location where the generated HTML files
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    14
	     should be stored
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    15
   srcpath - location where the source files are stored
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    16
	     (ie. the graphics files)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    17
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    18
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    19
val htmlpath = "/homes/lcp/html_isa/";
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    20
val srcpath = "/homes/lcp/Isa/Theory/";
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    21
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    22
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    23
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    24
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    25
   Notices that display the legend for every dependency 
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    26
   chart, and the link back to the main listing of all
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    27
   theories.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    28
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    29
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    30
val notice1 =
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    31
"<BR>\n"^"The name of the file is linked to the theory file <BR>\n";
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    32
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    33
val notice2 =
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    34
"<IMG SRC = \""^srcpath^"red_arrow.gif\" ALT = (sub)></A>\n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    35
" stands for subtheories (child theories) <BR>\n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    36
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    37
"<IMG SRC = \""^srcpath^"blue_arrow.gif\" ALT = (super)></A>\n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    38
" stands for supertheories (parent theories) <BR>\n<BR>\n";
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    39
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    40
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    41
val back = "<A HREF = \""^htmlpath^"00-chart.html\">Back</A>\n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    42
" to the original listing of all the theories. <BR>\n<HR>\n<BR>\n";
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    43
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    44
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    45
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    46
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    47
   Get a list of all theory files in Isabelle
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    48
   that have been loaded.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    49
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    50
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    51
print_depth 1000;
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    52
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    53
val theory_list = !loaded_thys;
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    54
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    55
val files = Symtab.alist_of (theory_list);
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    56
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    57
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    58
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    59
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    60
   Get a list of all theory files and their children.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    61
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    62
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    63
fun subtheory (tname, ThyInfo{children,...}) = (tname,children);
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    64
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    65
val subtheories = map subtheory (files);
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    66
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    67
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    68
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    69
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    70
   Extract a list of all theory files only.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    71
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    72
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    73
fun theory ( [], list ) = list
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    74
  | theory ( (string, _)::rest, list ) = theory(rest, string::list);
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    75
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    76
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    77
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    78
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    79
   Use quick sort to sort the theories in
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    80
   the alphabetic order. Variable a as the first 
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    81
   element of the list is used as a pivot value.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    82
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    83
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    84
fun quick [] = []
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    85
  | quick [x] = [x]
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    86
  | quick (a::bs) = let
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    87
          fun part (l,r,[]) : string list = (quick l) @ (a::quick r)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    88
            | part (l,r,x::xs) = if x<=a then part(x::l, r, xs)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    89
                                         else part(l, x::r, xs)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    90
          in part([], [], bs) end;
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    91
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    92
val theories = quick(theory(subtheories,[]));
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    93
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    94
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    95
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    96
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    97
   Insert the identifier of the supertheory
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    98
   matrix for every row. Also insert elements
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
    99
   into the list of identifier's parents in
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   100
   alphabetic order.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   101
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   102
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   103
fun listins ( l, [], x:string ) = l@[x]
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   104
  | listins ( l, e::r, x ) = if x>e then listins( l@[e], r, x )
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   105
                                    else if x<>e then l@[x,e]@r
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   106
					         else l@[x]@r;
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   107
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   108
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   109
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   110
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   111
   Arguments:
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   112
   t         - accumulator of the resulting supertheory matrix
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   113
   result    - temporary resulting matrix (up until now)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   114
   (e,ident) - a list of identifier and its child
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   115
   The child e of subtheory matrix becomes identifier ident of
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   116
   the supertheory matrix. The identifier ident of subtheory
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   117
   matrix becomes the parent elem of supertheory matrix.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   118
   Call function:
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   119
		- listins
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   120
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   121
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   122
fun matins ( t, [], (ident:string, elem:string) ) = t@[(ident,[elem])]
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   123
  | matins ( t, (x:string,y:string list)::b, 
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   124
	        (ident:string, elem:string) ) =
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   125
    if x=ident then t@[(x,listins([],y,elem))]@b
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   126
               else matins (t@[(x,y)], b, (ident,elem));
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   127
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   128
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   129
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   130
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   131
   Instantiate the identifier ident, and the list of
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   132
   its children (e::l), where e is its first child.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   133
   Call function:
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   134
		- matins
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   135
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   136
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   137
fun rowins ( (ident, []), result ) = result
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   138
  | rowins ( (ident, e::l), result ) =
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   139
    rowins ( (ident, l), matins([],result,(e,ident)) );
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   140
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   141
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   142
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   143
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   144
   Extract recursively one row at a time of the
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   145
   subtheory matrix.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   146
   Call function:
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   147
		-rowins
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   148
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   149
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   150
fun matinv ( [], result ) = result
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   151
  | matinv ( l::b, result ) = matinv( b, rowins(l, result) );
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   152
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   153
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   154
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   155
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   156
   Holds the value of supertheory matrix.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   157
   Call function:
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   158
		-matinv
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   159
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   160
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   161
val supertheories = matinv ( subtheories, [] );
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   162
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   163
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   164
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   165
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   166
(* ---------------------------------------------------------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   167
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   168
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   169
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   170
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   171
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   172
   Entries for the main chart of all the theories.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   173
   Every theory name is a link to the theory definition.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   174
   Down arrow is a link to the subtheory chart of that theory.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   175
   Up arrow is a link to the supertheory chart of that theory.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   176
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   177
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   178
fun entries x = "\n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   179
    "<A HREF = \""^htmlpath^x^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   180
    "_sub.html\">\n<IMG SRC = \""^srcpath^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   181
    "red_arrow.gif\" ALT = (sub)></A>\n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   182
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   183
    "<A HREF = \""^htmlpath^x^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   184
    "_sup.html\">\n<IMG SRC = \""^srcpath^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   185
    "blue_arrow.gif\" ALT = (super)></A> \n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   186
    "<A HREF = \""^htmlpath^x^".html\">"^x^"</A><BR>\n";
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   187
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   188
fun all_list x = map entries x;
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   189
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   190
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   191
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   192
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   193
   Convert a list of characters and strings
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   194
   into a string.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   195
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   196
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   197
fun join ([],res) = res
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   198
  | join (x::xs,res) = join(xs,res^x);
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   199
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   200
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   201
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   202
val bottom =
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   203
"<HR>\n\n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   204
"<! ---------------------------------------------------------------- >\n\n";
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   205
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   206
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   207
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   208
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   209
   Find the row of the matrix into which
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   210
   the parent (or children) theories
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   211
   are going to be inserted.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   212
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   213
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   214
fun findline (_,[]) = []
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   215
  | findline (th:string,(id,row:string list)::mat) =
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   216
    if th=id then row else findline(th,mat);
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   217
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   218
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   219
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   220
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   221
   Once a parent (or child) theory has been identified
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   222
   make an entry for it with appropriate indentation and with
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   223
   further links to its parent (or child) dependency chart.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   224
   It contains the subfunction:
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   225
           - maketableentry
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   226
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   227
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   228
fun dependencies (th, mat) =
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   229
    let
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   230
	val stringlist = findline(th,mat);
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   231
	fun maketableentry name =
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   232
	    "<LI> <A HREF=\""^htmlpath^name^".html\">"^name^"</A>\n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   233
	    " <A HREF = \""^htmlpath^name^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   234
	    "_sub.html\">\n<IMG SRC = \""^srcpath^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   235
	    "red_arrow.gif\" ALT = (sub)></A> \n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   236
	    "<A HREF = \""^htmlpath^name^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   237
	    "_sup.html\">\n<IMG SRC = \""^srcpath^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   238
	    "blue_arrow.gif\" ALT = (super)></A>\n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   239
	    "<UL>\n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   240
	    join(dependencies(name,mat),"")^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   241
	    "</UL>\n"
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   242
    in
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   243
	map maketableentry stringlist
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   244
    end;
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   245
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   246
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   247
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   248
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   249
   Create individual super- and sub-theory charts for
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   250
   each theory. Store them in separate files.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   251
   It contains the subfunction:
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   252
             - page
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   253
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   254
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   255
fun pages ([],_,_,_) = 0
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   256
  | pages (th::theories,theorymatrix,suffix,headline) =
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   257
    let
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   258
	fun page th =
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   259
	    let
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   260
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   261
		(* Open files for output of individual charts. *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   262
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   263
		val outf_each = open_out (htmlpath^th^"_"^suffix^".html")
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   264
	    in
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   265
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   266
		(* Recursively write to the output files the *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   267
                (* dependent theories with appropriate links *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   268
		(* depending upon the suffix.		     *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   269
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   270
		output(outf_each,
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   271
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   272
			(* Heading of each dependency chart. *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   273
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   274
		       "<A NAME=\""^th^"_"^suffix^".html\"></a>\n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   275
		       "<BR><H1>"^headline^"</H1>\n\n"^notice1^notice2^back^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   276
		       "\n"^"<A HREF=\""^htmlpath^th^".html\">"^th^"</A>\n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   277
		       (if suffix="sup"
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   278
			    then ("<A HREF = \""^htmlpath^th^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   279
				 "_sub.html\">\n<IMG SRC = \""^srcpath^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   280
				 "red_arrow.gif\" ALT = (sub)></A>\n")
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   281
			    else ("<A HREF = \""^htmlpath^th^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   282
				 "_sup.html\">\n<IMG SRC = \""^srcpath^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   283
				 "blue_arrow.gif\" ALT = (super)></A>\n"))^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   284
				 "<UL>\n");
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   285
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   286
		(* Recursively call the function dependencies  *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   287
		(* to create an entry in the chart for all the *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   288
		(* levels of dependencies in the hierarchical  *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   289
		(* structure of theory files for a given       *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   290
		(* theory.                                     *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   291
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   292
		output(outf_each,
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   293
		       join(dependencies(th,theorymatrix),""));
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   294
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   295
		output(outf_each,
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   296
		       "</UL>\n"^bottom);
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   297
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   298
		(* Close for output the individual *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   299
	        (* dependency charts.              *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   300
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   301
		close_out (outf_each)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   302
	    end;
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   303
    in
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   304
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   305
	(* Anti-bugging technique to follow the *) 
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   306
	(* execution of the program.	       *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   307
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   308
	output(std_out,"theory: "^th^"\n");
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   309
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   310
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   311
	(* The main driver for the creation of the dependencies *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   312
	(* which calls the functions page and pages. This will  *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   313
	(* go into depth of dependency of each theory with the  *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   314
	(* appropriate indentation.				*)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   315
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   316
	page(th);
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   317
	pages(theories,theorymatrix,suffix,headline)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   318
    end;
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   319
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   320
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   321
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   322
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   323
(* ---------------------------------------------------------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   324
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   325
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   326
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   327
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   328
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   329
   Generate the main chart 00-chart.html containing 
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   330
   the listing of all the theories and the links to charts.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   331
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   332
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   333
val outtext = htmlpath^"00-chart.html";
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   334
val outfile = open_out outtext;
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   335
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   336
val head = "<HTML>\n<HEAD>\n<TITLE>"^outtext^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   337
    "</TITLE>\n</HEAD>\n\n"^"<BODY>\n";
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   338
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   339
val title = "<H1>Dependency Diagram</H1></P>\n\n"^notice1^notice2;
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   340
val page1part1 = "<H2>Subtheories and Supertheories</H2>\n<BR>\n\n"^
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   341
    join(all_list(theories),"")^"<BR>\n";
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   342
val page1part3 = bottom;
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   343
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   344
val tail = "</BODY>\n"^"</HTML>";
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   345
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   346
output(outfile,head);
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   347
output(outfile,title);
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   348
output(outfile,page1part1);
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   349
output(outfile,page1part3);
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   350
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   351
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   352
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   353
(* ---------------------------------------------------------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   354
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   355
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   356
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   357
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   358
   The main driver to create individual super- and sub-theory
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   359
   charts for each individual theory. The arguments passed are:
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   360
          - the list of all the theories
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   361
          - the super- or sub-theory matrix
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   362
	  - the appropriate suffix sup or sub
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   363
	  - the title of the chart
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   364
   It calls the function:
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   365
          - pages
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   366
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   367
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   368
pages(theories,subtheories,"sub","Subtheories");
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   369
pages(theories,supertheories,"sup","Supertheories");
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   370
output(outfile,tail);
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   371
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   372
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   373
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   374
(* --------------------
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   375
   Close file for output.
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   376
   -------------------- *)
c9f7848bc5ee Mateja Jamnik's theory to html converter
paulson
parents:
diff changeset
   377
close_out(outfile);