It is possible to run TDL scripts in "stand-alone" mode (i.e. without a working build of Timba). Of course, no forests will actually be generated, but at least you can check your scripts for syntax errors and consistency. To run TDL stand-alone, you need the following:
- Python 2.3
The numarray module for Python.
- a number of Python modules from Timba.
The easiest way to set up the Timba modules are as follows:
get a current copy of the LOFAR/Timba tree (check it out from cvs, or copy from another machine)
- set up symlinks to modules:
$ cd LOFAR $ mkdir installed $ cd installed $ tar zxvf ../Timba/install-symlinked.tgz
add LOFAR/installed/symlinked/libexec/python to your $PYTHONPATH.
You can now run a TDL script simply by typing python name.tdl. To print more debugging messages, use python name.tdl -dtdl=2. Use a number higher or lower than 2 for more or less verbosity. Output such as:
tdl(TDLimpl.py:404:resolve): 1840 total nodes in repository
indicates the script has been successfully processed. Syntax errors are reported by Python in the usual way:
File "tdl_error.tdl", line 26 ns.z4 << Meq.Matrix2 2(1,2,3); ^ SyntaxError: invalid syntax
Logical errors are accumulated in a list and reported by TDL itself:
Timba.TDL.TDLimpl.CumulativeError: [('NodeDefError', 'Meq.Matrix22 takes exactly 4 arguments (3 given)', 'tdl_error.tdl', 26), ('ChildError', 'children specified both by arguments and keyword', 'tdl_error.tdl', 27), ('ChildError', 'child 1 = xx is not initialized', 'tdl_error.tdl', 13), ('ChildError', 'child referenced here', 'tdl_error.tdl', 18)]
The above is a list of all logical errors detected in the script. For each error message the list also contains a filename and line number.
