Newer
Older
* 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)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
** First of all, the Lustre files are parsed, and put input tables
lxm.ml
lxm.mli
lexer.mll
parser.mly
parserUtils.ml
astCore.ml
astV6.ml
astPredef.ml
ident.ml
ident.mli
** and put input tables performing some checks along the way (references)
astTab.ml
astTab.mli
astTabSymbol.ml
astTabSymbol.mli
astV6Dump.ml
astV6Dump.mli
** Some source to source manip are performed of those tables
astInstanciateModel.ml
astInstanciateModel.mli
astRecognizePredef.ml
astRecognizePredef.mli
** Then the source is statically evaluated and type/clock checked
ast2lic.ml
ast2lic.mli
lic.ml
licTab.ml
licTab.mli
licDump.ml
licDump.mli
licMetaOp.ml
licMetaOp.mli
licName.ml
licName.mli
licPredef.ml
licEvalClock.ml
licEvalClock.mli
licEvalConst.ml
licEvalConst.mli
licEvalType.ml
licEvalType.mli
evalClock.ml
evalClock.mli
evalConst.ml
evalConst.mli
evalType.ml
evalType.mli
unifyClock.ml
unifyClock.mli
unifyType.ml
unifyType.mli
** Lic is transformed into a LicPrg (imperative table->functional maps)
licPrg.ml
licPrg.mli
** Some source to source manip are performed
l2lAliasType.ml
l2lAliasType.mli
l2lCheckOutputs.ml
l2lCheckOutputs.mli
l2lExpandArrays.ml
l2lExpandArrays.mli
l2lExpandNodes.ml
l2lExpandNodes.mli
l2lRmPoly.ml
l2lRmPoly.mli
l2lSplit.ml
l2lSplit.mli
** All this don from a main program
main.ml
mainArgs.ml
mainArgs.mli
global.ml
compile.ml
compile.mli
** Some misc (eponymous) modules are used along the way.
verbose.ml
verbose.mli
filenameExtras.ml
filenameExtras.mli
errors.ml
** crutch to remove
uglyStuff.ml
* todo
cf file:todo.org