File: load_pred_sets.ml

package info (click to toggle)
hol88 2.02.19940316-28
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 65,924 kB
  • ctags: 21,595
  • sloc: ml: 199,939; ansic: 9,666; sh: 7,118; makefile: 6,075; lisp: 2,747; yacc: 894; sed: 201; cpp: 87; awk: 5
file content (30 lines) | stat: -rw-r--r-- 1,457 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_pred_sets.ml					%
% DESCRIPTION   : creates a function that loads the contents of the	%
%		  library "pred_sets" into hol.				%
%									%
% AUTHOR	: T. Melham						%
% DATE		: 92.01.26						%
% ===================================================================== %

% --------------------------------------------------------------------- %
% define the function load_pred_sets.					%
% --------------------------------------------------------------------- %

let load_pred_sets (v:void) =
    if (mem `pred_sets` (ancestry())) then
       (print_string `Loading contents of pred_sets...`; print_newline();
        define_set_abstraction_syntax `GSPEC`;
        define_finite_set_syntax(`EMPTY`,`INSERT`);
        set_flag(`print_set`,true); 
        let path st = library_pathname() ^ `/pred_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 `pred_sets`) in
            map (\st. autoload_theory(`definition`,`pred_sets`,st)) defs;
        let thms = map fst (theorems `pred_sets`) in
            map (\st. autoload_theory(`theorem`,`pred_sets`,st)) thms; 
        delete_cache `pred_sets`; ()) else
    failwith `theory pred_sets not an ancestor of the current theory`;;