File: load_sets.ml

package info (click to toggle)
hol88 2.02.19940316-8
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 63,120 kB
  • ctags: 19,367
  • sloc: ml: 199,939; ansic: 9,300; sh: 7,118; makefile: 6,074; lisp: 2,747; yacc: 894; sed: 201; cpp: 87; awk: 5
file content (30 lines) | stat: -rw-r--r-- 1,393 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
% ===================================================================== %
% FILE		: load_sets.ml						%
% DESCRIPTION   : creates a function that loads the contents of the	%
%		  library "sets" into hol.				%
%									%
% AUTHOR	: T. Melham						%
% DATE		: 91.01.20						%
% ===================================================================== %

% --------------------------------------------------------------------- %
% define the function load_sets.					%
% --------------------------------------------------------------------- %

let load_sets (v:void) =
    if (mem `sets` (ancestry())) then
       (print_string `Loading contents of sets...`; print_newline();
        define_set_abstraction_syntax `GSPEC`;
        define_finite_set_syntax(`EMPTY`,`INSERT`);
        set_flag(`print_set`,true); 
        let path st = library_pathname() ^ `/sets/` ^ st in
            load(path `gspec`, get_flag_value `print_lib`);
            load(path `set_ind`, get_flag_value `print_lib`);
            load(path `fset_conv`, get_flag_value `print_lib`);
        let defs = map fst (definitions `sets`) in
            map (\st. autoload_theory(`definition`,`sets`,st)) defs;
        let thms = map fst (theorems `sets`) in
            map (\st. autoload_theory(`theorem`,`sets`,st)) thms; 
        delete_cache `sets`; ()) else
    failwith `theory sets not an ancestor of the current theory`;;