|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| OMakefile | H A D | 03-May-2022 | 62 | 3 | 2 |
| README | H A D | 26-Jul-2019 | 4.6 KiB | 157 | 119 |
| absyn.ml | H A D | 26-Jul-2019 | 69.4 KiB | 2,021 | 1,711 |
| absyn.mli | H A D | 26-Jul-2019 | 28.4 KiB | 671 | 588 |
| annvariables.ml | H A D | 26-Jul-2019 | 39.3 KiB | 882 | 811 |
| annvariables.mli | H A D | 26-Jul-2019 | 1.5 KiB | 28 | 27 |
| bytecode.ml | H A D | 26-Jul-2019 | 16.4 KiB | 468 | 396 |
| bytecode.mli | H A D | 26-Jul-2019 | 8.5 KiB | 209 | 173 |
| clausegen.ml | H A D | 26-Jul-2019 | 90.4 KiB | 2,233 | 2,075 |
| clausegen.mli | H A D | 26-Jul-2019 | 3.9 KiB | 67 | 62 |
| clauses.ml | H A D | 26-Jul-2019 | 48.7 KiB | 1,241 | 1,119 |
| clauses.mli | H A D | 26-Jul-2019 | 2.2 KiB | 47 | 45 |
| codegen.ml | H A D | 26-Jul-2019 | 51.8 KiB | 1,185 | 1,080 |
| codegen.mli | H A D | 26-Jul-2019 | 10 KiB | 171 | 143 |
| compile.ml | H A D | 26-Jul-2019 | 3.7 KiB | 97 | 90 |
| compile.mli | H A D | 26-Jul-2019 | 2.2 KiB | 49 | 44 |
| errormsg.ml | H A D | 26-Jul-2019 | 4.4 KiB | 134 | 120 |
| errormsg.mli | H A D | 26-Jul-2019 | 4.4 KiB | 104 | 91 |
| explicit.ml | H A D | 26-Jul-2019 | 14.8 KiB | 453 | 406 |
| explicit.mli | H A D | 26-Jul-2019 | 2.4 KiB | 52 | 45 |
| lplex.mll | H A D | 26-Jul-2019 | 10.3 KiB | 286 | 250 |
| lpyacc.mly | H A D | 26-Jul-2019 | 16.5 KiB | 497 | 393 |
| makefile | H A D | 26-Jul-2019 | 108 | 6 | 4 |
| option.ml | H A D | 26-Jul-2019 | 1.3 KiB | 38 | 33 |
| option.mli | H A D | 26-Jul-2019 | 2.1 KiB | 46 | 42 |
| parse.ml | H A D | 26-Jul-2019 | 65.9 KiB | 1,681 | 1,532 |
| parse.mli | H A D | 26-Jul-2019 | 3.6 KiB | 83 | 77 |
| pervasiveutils.ml | H A D | 26-Jul-2019 | 7.3 KiB | 184 | 164 |
| pervasiveutils.mli | H A D | 26-Jul-2019 | 1.7 KiB | 37 | 33 |
| preabsyn.ml | H A D | 26-Jul-2019 | 9.2 KiB | 261 | 225 |
| preabsyn.mli | H A D | 26-Jul-2019 | 7.5 KiB | 208 | 190 |
| processclauses.ml | H A D | 26-Jul-2019 | 48.3 KiB | 918 | 860 |
| processclauses.mli | H A D | 26-Jul-2019 | 2.3 KiB | 39 | 37 |
| registers.ml | H A D | 26-Jul-2019 | 20.2 KiB | 447 | 403 |
| registers.mli | H A D | 26-Jul-2019 | 9.5 KiB | 161 | 141 |
| spitcode.ml | H A D | 26-Jul-2019 | 13.2 KiB | 366 | 317 |
| spitcode.mli | H A D | 26-Jul-2019 | 1.5 KiB | 28 | 27 |
| symbol.ml | H A D | 26-Jul-2019 | 2.5 KiB | 77 | 64 |
| symbol.mli | H A D | 26-Jul-2019 | 3.5 KiB | 81 | 72 |
| table.ml | H A D | 26-Jul-2019 | 2 KiB | 66 | 56 |
| table.mli | H A D | 26-Jul-2019 | 1.6 KiB | 35 | 31 |
| translate.ml | H A D | 26-Jul-2019 | 78.1 KiB | 1,941 | 1,776 |
| translate.mli | H A D | 26-Jul-2019 | 2.3 KiB | 49 | 44 |
| typereduction.ml | H A D | 26-Jul-2019 | 27.9 KiB | 736 | 675 |
| typereduction.mli | H A D | 26-Jul-2019 | 1.8 KiB | 36 | 33 |
| types.ml | H A D | 26-Jul-2019 | 37.5 KiB | 988 | 903 |
| types.mli | H A D | 26-Jul-2019 | 7 KiB | 146 | 130 |
README
1The files in source/compiler implements the compiler.
2
3Utilities
4**********
5
6symbol.ml{mli}
7==============
8 Implements a simple module mapping strings to unique identifiers (symbols).
9
10table.ml{mli}
11============
12 Defines a "template" for symbol tables (binary search tree).
13
14errormsg.ml{mli}
15===============
16 Defines functions for handling error in compilation and for debugging.
17
18option.ml{mli}
19=============
20 Defines operations on option type with the system's own error handling.
21
22
23Parse into pre abstract syntax
24******************************
25
26lplex.mll
27=========
28 Implements the scanner.
29
30lpyacc.mly
31==========
32 Implements the parser (to pre abstract syntax).
33
34preabsyn.ml{mli}
35================
36 Defines the pre abstract syntax and their operations.
37
38compile.ml{mli}
39===============
40 Implements the top-level control of parsing a program (query/term) into
41 pre abstract syntax.
42 (Really should give it a more precise name.)
43
44
45Parse into abstract syntax
46***************************
47
48absyn.ml{mli}
49=============
50 Defines the abstract syntax and their operations.
51
52translate.ml{mli}
53=================
54 Defines functions for translating a pre abstract syntax module into an
55 abstract syntax module: processing kind and constant declarations and
56 generating compiler symbol tables and constant/kind lists; top-level
57 control of translating a preabstract syntax term into abstract syntax.
58
59parse.ml{mli}
60============
61 Defines functions for translating a pre abstract syntax clause into
62 an abstract syntax term and translating a pre abstract syntax term
63 (query/predicate term) into abstract syntax.
64
65
66types.ml{mli}
67=============
68 Implements type inference and operations on abstract syntax representation
69 of types needed for other modules.
70
71
72Clause processing
73*****************
74
75clauses.ml{mli}
76===============
77 Implements deorification and clause-normalization.
78
79typereduction.ml{mli}
80=====================
81 Implements type skeleton analysis and predicate type neededness
82 analysis.
83
84processclauses.ml{mli}
85======================
86 Implements the transformation from (absyn) term representation to
87 clause representations (without variable analysis).
88 1. Type environments associated with constants occurrences are trimmed
89 according to the type skeleton optimization.
90 2. Lambda-bound variables are transformed into de Bruijn indexes and the
91 list of binders in an abstraction term is removed.
92 3. Other variables (type variables) are transformed into logic (type)
93 variables with a form suitable for variable annotations; their scope
94 information are collected and recorded along with clauses and goals.
95 4. Clauses defining a predicate are collected and associated with the
96 predicate name being defined.
97 5. String arguments are collected.
98
99annvariables.ml{mli}
100====================
101 Process clause representations in a module, annotate type and term
102 variables as temporary or permanent, and decide offset for permanent
103 variables. Fill in variable related information for clause
104 representations: hasenv, cutvar and goal-environment size association.
105
106
107Code generation
108****************
109
110codegen.ml{mli}
111===============
112 Defines functions and structures for preparing all information gathered
113 from a module for dumping out into a bytecode file.
114
115clausegen.ml{mli}
116================
117 Implements code generation for each clause.
118
119registers.ml{mli}
120=================
121 Defines structures and functions for register allocation.
122
123instr.ml{mli}
124============
125 Defines instruction format. (Needed by the compiler and the disassembler.)
126 Note these files are automatically generated.
127
128
129Dump bytecode file
130******************
131
132spitcode.ml{mli}
133================
134 Defines functions for putting out all the information
135 generated by the procedures in codegen after a successful processing
136 of a module into in the required bytecode form into a specified bytecode
137 file.
138
139bytecode.ml{mli}
140===============
141 Defines functions and structures for write and read bytecode files
142 according to bytecode file format.
143 (Please refer to implnotes/bytecode.txt for the details of bytecode format.)
144
145
146Pervasives
147**********
148
149pervasive.ml{mli}
150=================
151 Defines the pervasive symbol tables.
152 Note these files are automatically generated.
153
154pervasiveutil.ml{mli}
155=====================
156 Defines some operations on pervasives which are not needed to be
157 automatically generated.