Next: , Previous: Principles, Up: Compiler


4.5 Outputs

In a dimension definition, you can specify a set of outputs to visualize the solutions on that dimension. The outputs must be taken from the predefined output library, of the XDK. Using outputs proceeds in two steps:

  1. choose outputs
  2. use outputs

4.5.1 Choosing outputs

First, you choose the subset of chosen outputs from the outputs available in the output library. All of these outputs must be able to visualize the solution on the currently defined dimension.

In the UL, you choose an output as follows:

     output <constant>

where the <constant> is an output identifier.

4.5.2 Using outputs

Then, you use a subset of the chosen outputs (the used outputs) which are actually utilized by the XDK to visualize the individual solutions of a solution for that dimension.

In the UL, you use an output as follows:

     useoutput <constant>

where the <constant> is an output identifier.

This rather artificial difference between choosing and using outputs has its roots in the GUI of the XDK. Here, all the chosen outputs are available in the Outputs menu (so that you can still use them on demand), but only the used outputs are actually used for visualizing solutions.

4.5.3 Example

In our example grammar file, only the output output.pretty is chosen on both the id and the lp dimension (but not used):

       %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%
       %% use and choose outputs
       output "output.pretty"

The multi-dimensional outputs output.dags1 and output.latexs1 are used on the lex dimension, but only the former is chosen:

       %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%
       %% use and choose outputs
       output "output.dags1"
       output "output.latexs1"
       useoutput "output.dags1"