• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

OMakefileH A D03-May-202262 32

READMEH A D26-Jul-20194.6 KiB157119

absyn.mlH A D26-Jul-201969.4 KiB2,0211,711

absyn.mliH A D26-Jul-201928.4 KiB671588

annvariables.mlH A D26-Jul-201939.3 KiB882811

annvariables.mliH A D26-Jul-20191.5 KiB2827

bytecode.mlH A D26-Jul-201916.4 KiB468396

bytecode.mliH A D26-Jul-20198.5 KiB209173

clausegen.mlH A D26-Jul-201990.4 KiB2,2332,075

clausegen.mliH A D26-Jul-20193.9 KiB6762

clauses.mlH A D26-Jul-201948.7 KiB1,2411,119

clauses.mliH A D26-Jul-20192.2 KiB4745

codegen.mlH A D26-Jul-201951.8 KiB1,1851,080

codegen.mliH A D26-Jul-201910 KiB171143

compile.mlH A D26-Jul-20193.7 KiB9790

compile.mliH A D26-Jul-20192.2 KiB4944

errormsg.mlH A D26-Jul-20194.4 KiB134120

errormsg.mliH A D26-Jul-20194.4 KiB10491

explicit.mlH A D26-Jul-201914.8 KiB453406

explicit.mliH A D26-Jul-20192.4 KiB5245

lplex.mllH A D26-Jul-201910.3 KiB286250

lpyacc.mlyH A D26-Jul-201916.5 KiB497393

makefileH A D26-Jul-2019108 64

option.mlH A D26-Jul-20191.3 KiB3833

option.mliH A D26-Jul-20192.1 KiB4642

parse.mlH A D26-Jul-201965.9 KiB1,6811,532

parse.mliH A D26-Jul-20193.6 KiB8377

pervasiveutils.mlH A D26-Jul-20197.3 KiB184164

pervasiveutils.mliH A D26-Jul-20191.7 KiB3733

preabsyn.mlH A D26-Jul-20199.2 KiB261225

preabsyn.mliH A D26-Jul-20197.5 KiB208190

processclauses.mlH A D26-Jul-201948.3 KiB918860

processclauses.mliH A D26-Jul-20192.3 KiB3937

registers.mlH A D26-Jul-201920.2 KiB447403

registers.mliH A D26-Jul-20199.5 KiB161141

spitcode.mlH A D26-Jul-201913.2 KiB366317

spitcode.mliH A D26-Jul-20191.5 KiB2827

symbol.mlH A D26-Jul-20192.5 KiB7764

symbol.mliH A D26-Jul-20193.5 KiB8172

table.mlH A D26-Jul-20192 KiB6656

table.mliH A D26-Jul-20191.6 KiB3531

translate.mlH A D26-Jul-201978.1 KiB1,9411,776

translate.mliH A D26-Jul-20192.3 KiB4944

typereduction.mlH A D26-Jul-201927.9 KiB736675

typereduction.mliH A D26-Jul-20191.8 KiB3633

types.mlH A D26-Jul-201937.5 KiB988903

types.mliH A D26-Jul-20197 KiB146130

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.