orm_schema.ml 1.45 KB
Newer Older
MARCHE Claude's avatar
MARCHE Claude committed
1 2 3 4 5 6 7 8 9 10 11 12
#load "printer_utils.cmo"
#load "sql_orm_header.cmo"
#load "sql_orm.cmo"

open Sql_orm

open Schema

let boolean = integer

let all_tables = make 
  [
MARCHE Claude's avatar
db  
MARCHE Claude committed
13 14 15 16 17 18
    (* table of locs *)
    ("loc",
     [ text "file";
       integer "line";
       integer "start";
       integer "stop";
MARCHE Claude's avatar
MARCHE Claude committed
19 20 21
     ],
     [], default_opts);

MARCHE Claude's avatar
db  
MARCHE Claude committed
22 23 24 25 26 27 28 29 30 31
    (* external proofs *)
    ("external_proof",
     [ text "prover"; (* prover identifier *)
       integer "timelimit"; (* CPU limit given in seconds *)
       integer "memlimit"; (* VM limit given in megabytes *)
       integer "status"; (* enum{proof_attempt_status}; the current state *)
       real "result_time"; (* CPU time for that run in seconds *)
       text "trace"; (* any kind of trace returned by an automatic prover,
			or any kind of proof script for an interactive prover *)
       boolean "obsolete";
MARCHE Claude's avatar
MARCHE Claude committed
32 33 34
     ],
     [], default_opts);

MARCHE Claude's avatar
db  
MARCHE Claude committed
35 36 37 38 39 40 41 42 43
    (* goal *)
    ("goal",
     [ text "task_checksum";
       foreign "transf" "parent"; (* parent transf if any *)
       text "name"; (* qualified proposition name *)
       foreign "loc" "pos"; 
       foreign_many "external_proof" "external_proofs";
       foreign_many "transf" "transformations";
       boolean "proved";
MARCHE Claude's avatar
MARCHE Claude committed
44 45 46
     ],
     [], default_opts);

MARCHE Claude's avatar
db  
MARCHE Claude committed
47 48 49 50 51
    (* transformations *)
    ("transf",
     [ text "name"; (* transformation name *)
       boolean "obsolete";
       foreign_many "goal" "subgoals";
MARCHE Claude's avatar
MARCHE Claude committed
52
     ],
MARCHE Claude's avatar
db  
MARCHE Claude committed
53
     [], default_opts);
MARCHE Claude's avatar
MARCHE Claude committed
54 55 56 57 58
    
  ]       

let () = generate ~debug:false all_tables "src/manager/db"