Skip to content
Snippets Groups Projects
user avatar
Erwan Jahier authored
+ remise en place du souk qu'il a mis dans le repertoire test.

- il a commencé à rajouter le CondAct (tout est parti de la en fait...)
- il a coupé le LazyCompiler en morceaux

Pour cela, il a créé un nouveau module LicPrg qui définit la
structure de données (SDD) en sortie du LazyCompiler. Ensuite, les
diverses tranformations src2src sont faites à partir de cette SDD.

- il a débranché (temporairement) l'expansion de noeud et de array/structure

- il a débranché ma pseudo inférence de type et a mis à la place une
vérification de types.

- Le traitement du polymorphisme est effectué via une transfo src2src
dans DoNoPoly (que je vais renommer en RmPoly)

--------------------------------------------------------------------------
Par ailleurs,

J'ai créé un todo.org et un README.org que je vais essayer de tenir à jour.

nb: les tests ne passent toujours bien sur.
dce00f59
History

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