]> matita.cs.unibo.it Git - helm.git/blob - helm/software/helena/src/text/txt.ml
update in helena
[helm.git] / helm / software / helena / src / text / txt.ml
1 (*
2     ||M||  This file is part of HELM, an Hypertextual, Electronic        
3     ||A||  Library of Mathematics, developed at the Computer Science     
4     ||T||  Department, University of Bologna, Italy.                     
5     ||I||                                                                
6     ||T||  HELM is free software; you can redistribute it and/or         
7     ||A||  modify it under the terms of the GNU General Public License   
8     \   /  version 2 or (at your option) any later version.              
9      \ /   This software is distributed as is, NO WARRANTY.              
10       V_______________________________________________________________ *)
11
12 module N = Layer
13
14 type ix = int (* index *)
15
16 type id = string (* identifier *)
17
18 type info = string * string (* language, text *)
19
20 type kind = Decl (* generic declaration *) 
21           | Ax   (* axiom               *)
22           | Cong (* conjecture          *)
23           | Def  (* generic definition  *)
24           | Th   (* theorem             *)
25
26 type bind = 
27 (* layer, name, real?, domain *)
28           | Abst of N.layer * id * bool * term
29 (* name, bodies *)
30           | Abbr of id * term                  
31 (* name *)
32           | Void of id
33
34 and lenv = bind list
35
36 and term =
37 (* level *)
38          | Sort of ix
39 (* named level *)
40          | NSrt of id
41 (* index, offset *)
42          | LRef of ix
43 (* name *)
44          | NRef of id
45 (* domain, element *)
46          | Cast of term * term
47 (* arguments, function *)
48          | Appl of term * term
49 (* environment, scope *)
50          | Proj of lenv * term
51 (* function, arguments *)
52          | Inst of term * term list
53
54 type command =
55 (* required files: names *)
56              | Require of id list
57 (* hierarchy graph: name *)
58              | Graph of id
59 (* sorts: index, name *)
60              | Sorts of (int option * id) list
61 (* section: Some id = open, None = close last *)
62              | Section of id option
63 (* entity: main?, class, name, info, contents *)
64              | Constant of bool * kind * id * info * term
65 (* predefined generated entity: arguments *)
66              | Generate of term list