Newer
Older
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
* test
The idea is to run those tests before *each commit*.
All tests are done via file:src/Makefile; it runs the lus2lic
compiler with various options on every files contained in
- file:tests/should_work/ that contains correct Lustre V6 programs
- file:tests/should_fail/ that contains incorrect ones (e.g., that
contains a type error).
** Testing Correct Lustre V6 programs
The output of all lus2lic invocation are redirected to =test.res=.
This file is then compared to =test.res.exp= (=exp= stands for
expected). When the results (=.res=) and the expected results
(=.res.exp=) differs, the test fails. Note that tests do not only
fail during a regression, but also during a progression!
In order to update the expected result, just issue a 'make utest'.
Actually, 3 kinds of lus2lic invocation are performed:
- lic: just use lus2lic on all lustre files
- ec: ditto using the -ec option, plus calling ec2c on the generated files
- lv4: ditto using the -lv4 option, plus calling lus2ec on the generated files
** Testing Incorrect Lustre V6 programs
We check that all progs in file:tests/should_fail/ returns with an
exit code > 0.
* src
Here follows a description of the different modules used by this
lus2lic compiler (in src)
** First of all, the Lustre files are parsed,
lexer.mll
parser.mly
parserUtils.ml
lxm.mli/ml
which results into a parse tree containing raw source expressions.
syntaxTreeCore.ml, syntaxTree.ml -> should rather be called rawSyntaxTab.ml ? or just Src ?
** Then, we perform reference checking at module level + model expansion.
syntaxTab.mli/ml
syntaxTabUtil.ml/mli
instanciateModel.mli/ml
symbolTab.mli/ml (type/const/node)
syntaxTab is a kind of layer above syntaxTree to make things easier afterwards.
** Finally, the compilation (type checking+const/type evaluation) is performed.
compile.ml
lazyCompiler.mli/ml
evalConst.mli/ml
evalType.mli/ml
compiledData.ml
** Some misc (eponymous) modules are used along the way.
errors.ml
verbose.mli/ml
version.ml
ident.ml
* todo
cf file:todo.org