The tlcore application
Now that the Core TransLucid library has been developed, it is time to develop some applications.
The first application is called tlcore. It simply reads, either from a file or from the standard input, a TransLucid header, set of equations and set of expressions. The expressions are then evaluated one by one, and the results are placed on the standard output or in a file.
The interface is as follows:
tlcore --input=infile --output=outfile
along with the standard –verbose and –version options.
If the –input option is not provided, input is read from the standard input.
If the –output option is not provided, output is written to the standard output.
All errors or log messages, including version information, are written to the standard error.
The syntax of the files is simple. It consists of three parts:
header
%%
equations
%%
expressions
where each part follows its standard syntax.
The expressions are to be read, one by one, and then evaluated. The answers are provided as follows:
answer1;;
...;;
answern;;
Should the –verbose option be used, then the output will be
expr1 → answer1;;
...;;
exprn → answern;;
The inContext variable is used to define the default context for parsing expressions.
The outContext variable is used to define the default context for printing expressions.
superspreadsheet 15:31 on 2010/06/11 Permalink |
What is the difference between the Core TransLucid library and tlcore? Why is tlcore an application? Or rather what does it do exactly for the user?
cartesianprogramming 15:34 on 2010/06/11 Permalink |
tlcore is an interpreter of the TransLucid language, implemented using the Core TransLucid library. It allows direct use of TransLucid without having to write any C++ code.
superspreadsheet 15:34 on 2010/06/11 Permalink |
Again, from a user point of view, what ts the syntax of the header, equation and expression. Where can we find out? Is there a link?
cartesianprogramming 15:37 on 2010/06/11 Permalink |
Official user documentation does not yet exist. When it does, it will be made part of the TransLucid distribution. In the meantime, use the papers on TransLucid as a guide.
superspreadsheet 15:36 on 2010/06/11 Permalink |
Where are inContext and outContext defined? In the command line? In the program? IOW, by user or programmer?
cartesianprogramming 15:38 on 2010/06/11 Permalink |
inContext and outContext are variables defined in the set of equations. They should be tuple-valued.