Skip to content
Snippets Groups Projects
readme-dev.org 3.04 KiB
Newer Older
requires =sudo apt-get install dejagnu=

The idea is to run those tests before *each commit*.

All  tests  are  controlled  by file:test/Makefile;  which  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).
-  file:tests/should_work/broken   and  file:tests/should_fail/broken
  that contain broken tests
a 'make test' in  this =test= dir will run quite a  lot of tests, and
generate several files:
- file:testslus2lic.sum: a summary generated by the runtest (dejagnu) program
- lus2lic.log: a log file generated by runtest
- lus2lic.diff: which is a diff betwenn lus2lic.log and lus2lic.log.ref
'make test' exits normally iff =lus2lic.diff= is empty.
'make utest' will update the =lus2lic.log.ref=
'make test' is actually equivalent to 'make nonreg' plus 'make prog'.
The goal is that:
- 'make nonreg'  have no unexpected failures/successes
- 'make prog' have no expected failures/successes
Hence, before issuing a 'make utest', it  is better if it is the case
unless you plan to fix the problems in the very short term.
'make  html' in  the  top directory  produces html  doc  that can  be
browsed here: file:ocamldoc/index.html
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
astCore.ml
astV6.ml
astPredef.ml
Mamadou Ndiaye's avatar
Mamadou Ndiaye committed
Lv6Id.{ml|mli}

** and put input tables performing some checks along the way (references)

astTab.{ml|mli}
astTabSymbol.{ml|mli}
astV6Dump.{ml|mli}

** Some source to source manip are performed of those tables

astInstanciateModel.{ml|mli}
astRecognizePredef.{ml|mli}
** Then the source is statically evaluated and type/clock checked
licTab.{ml|mli}
licDump.{ml|mli}
licMetaOp.{ml|mli}
licName.{ml|mli}
licEvalClock.{ml|mli}
licEvalConst.{ml|mli}
licEvalType.{ml|mli}
evalClock.{ml|mli}
evalConst.{ml|mli}
evalType.{ml|mli}
unifyClock.{ml|mli}
unifyType.{ml|mli}

** Lic is transformed into a LicPrg (imperative table->functional maps)


** Some source to source manip are performed 

l2lAliasType.{ml|mli}
l2lCheckOutputs.{ml|mli}
l2lExpandArrays.{ml|mli}
l2lExpandNodes.{ml|mli}
l2lRmPoly.{ml|mli}
l2lSplit.{ml|mli}

** All this controlled from a main program
** Some misc (eponymous) modules are used along the way.
filenameExtras.ml
filenameExtras.mli
#+END_SRC

* Compiling on windows

In order to install a win32 cross compiler: 
#+BEGIN_SRC sh
aptitude install mingw32 mingw32-binutils mingw32-runtime mingw32-ocaml gcc-mingw32 
#+END_SRC