Next: , Previous: XTAGDerivation, Up: Outputs


9.36 Output Language

In this section, we describe how to transform Solver Language (SL) expressions into Output Language (OL) expressions.

Notice that the XDK also provides output in abbreviated form: the abbreviated OL syntax is like the OL syntax, but with the following abbreviations to make the output a little less cluttered:

The abbreviated OL syntax is used by the Pretty and output functors to visualize all the information contained in a solution.

9.36.1 Feature path

Here is the syntax of a SL feature path:

     featurepath(root: RootA
                 dimension: DVA
                 dimension_idref: IDA
                 aspect: AspectA
                 fields: FieldAs)

The corresponding OL expression is an Oz atom made up of the following parts:

     '<root>.<dim var>(<dim id>).<aspect>.<field_1>.....<field_n>'

<root> corresponds to (RootA), <dim var> to DVA, <dim id> to IDA, <aspect> to AspectA, and <field_i> (1<=i<=n) to FieldAs.

9.36.2 Cardinality set

Here is the syntax of SL cardinality sets:

     M

where M is an Oz finite set encoding the cardinality set IL.

And here is the corresponding OL expression:

     OL

where OL is the OL expression encoding the cardinality set M.

9.36.3 Constraint

Undefined.

9.36.4 Domain

Here is the syntax of SL constants:

     I

I is an Oz integer encoding the constant.

And here is the corresponding OL expression:

     A

A is the constant encoded by I.

9.36.5 Integer

Here is the syntax of SL integers:

     I

And here is the corresponding OL expression:

     I

I stays the same.

9.36.6 List

Here is the syntax of SL lists:

     SLs

SLs is an Oz list of SL expressions.

And here is the corresponding OL expression:

     OLs

OLs is an Oz list of OL expressions encoding SLs.

9.36.7 Map

See Record.

9.36.8 Record

Here is the syntax of SL records:

     o(A1:SL1
       ...
       An:SLn)

Ai:SLi (1<=i<=n) is a feature of an Oz atom Ai (the field) and a SL expression SLi (the value).

And here is the corresponding OL expression:

     o(A1:OL1
       ...
       An:OLn)

Ai (1<=i<=n) stays the same, and OLi is the OL expression encoding SLi.

9.36.9 Set

The syntax of SL sets differs depending on the type of the domain of the set:

  1. a finite domain of constants
  2. a tuple of which all projections are finite domains of constants
  3. any other type

Here is the syntax of SL sets for the different cases:

  1.           M
         

    M is an Oz finite set of integers encoding the constants in the set.

  2. (see 1.)
  3.           SLs
         

    SLs is an Oz list of SL expressions in the set.

And here is the syntax of the corresponding OL expressions:

  1.           As
         

    As is an Oz list of Oz atoms encoding the set M.

  2.           Tups
         

    Tups is an Oz list of Oz tuples encoded in set M. 1

  3.           OLs
         

    OLs is an Oz list of OL expressions encoding SLs.

9.36.10 String

Here is the syntax of SL strings:

     A

A is an Oz atom encoding the string.

And here is the OL syntax:

     A

A stays the same.

9.36.11 Tuple

The syntax of SL tuples differs depending on the type of the projections of the tuple:

  1. all projections are finite domains of constants
  2. at least one projection is not a finite domain of constants

Here is the syntax of SL tuples for the different cases:

  1.           I
         

    I is an Oz integer encoding the tuple.

  2.           [SL1 ... SLn]
         

    SLi is the SL expression on projection i (1<=i<=n) of the tuple.

And here is the syntax of the corresponding OL expressions:

  1.           OL1#...#OLn
         

    OLi is the OL expression encoding SLi (1<=i<=n).

  2. (see 1.)

9.36.12 Undetermined values

The XDK solver can also yield partial solutions in which not all values in the node record are determined; instead some of the values are still variables. In the following, we show how these variables are represented in the OL.

9.36.12.1 Undetermined constants

This is the OL syntax for undetermined constants (i.e. constant variables):

     '_'(DSpec)

DSpec is a domain specification representing the set of constants which can still be bound to the constant variable.

9.36.12.2 Undetermined integers

This is the OL syntax for undetermined integers (i.e. integer variables):

     '_'(DSpec)

DSpec is a domain specification representing the set of integers which can still be bound to the integer variable.

9.36.12.3 Undetermined lists

This is the OL syntax for undetermined lists (i.e. list variables):

     '_'
9.36.12.4 Undetermined sets

The OL syntax for undetermined sets (i.e. set variables) differs depending on the domain of the set:

  1. a finite domain of constants or a tuple of which all projections are finite domains of constants
  2. any other type

Here is the OL syntax of undetermined sets for the different cases:

  1.           '_'(MSpec1 MSpec2 DSpec)
         

    MSpec1 is a set specification, representing the set of constants which are already known to be in the set variable.2

    MSpec2 is a set specification representing the set of constants which could still end up in the set variable.3

    DSpec is a domain specification representing the set of integers which can still be bound to the integer variable representing the cardinality of the set variable.

  2.           '_'
         
9.36.12.5 Undetermined strings

This is the OL syntax for undetermined strings (i.e. string variables):

     '_'
9.36.12.6 Undetermined tuples

The OL syntax for undetermined tuples (i.e. tuple variables) differs depending on the projections of the tuple:

  1. all projections are finite domains of constants
  2. at least one of the projections is no finite domain of constants

Here is the OL syntax of undetermined tuples for the different cases:

  1.           '_'(Tups)
         

    Tups is an Oz list of tuples representing the the set of tuples which can still be bound to the tuple variable.4

  2.           '_'
         
9.36.12.7 Undetermined cardinality sets in valencies

This is the OL syntax for undetermined cardinality sets (i.e. cardinality set variables) in valencies:

     '_'(OL1 OL2)

OL1 is the cardinality set representing the set of integers which are already known to be in the cardinality set variable. OL2 is the cardinality set representing the set of integers which can still be bound to the cardinality set variable.


Footnotes

[1] The abbreviated OL syntax is A, and A is a set generator expression encoding the set of tuples M.

[2] The abbreviated OL syntax is A, and A is a set generator expression representing the set of constants which are already known to be in the set variable (if the set is over a tuple of which all projections are finite sets of constants).

[3] The abbreviated OL syntax is A, and A is a set generator expression representing the set of constants which are already known to be in the set variable (if the set is over a tuple of which all projections are finite sets of constants).

[4] The abbreviated OL syntax is '_'(A), and A is a set generator expression representing the set of tuples which can still be bound to the tuple variable.