Next: Output record, Previous: XTAGDerivation, Up: Outputs
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:
top
bot
The abbreviated OL syntax is used by the Pretty and output functors to visualize all the information contained in a solution.
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
.
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
.
Undefined.
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
.
Here is the syntax of SL integers:
I
And here is the corresponding OL expression:
I
I
stays the same.
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
.
See 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
.
The syntax of SL sets differs depending on the type of the domain of the set:
Here is the syntax of SL sets for the different cases:
M
M
is an Oz finite set of integers encoding the constants in the
set.
SLs
SLs
is an Oz list of SL expressions in the set.
And here is the syntax of the corresponding OL expressions:
As
As
is an Oz list of Oz atoms encoding the set M
.
Tups
Tups
is an Oz list of Oz tuples encoded in set M
.
1
OLs
OLs
is an Oz list of OL expressions encoding SLs
.
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.
The syntax of SL tuples differs depending on the type of the projections of the tuple:
Here is the syntax of SL tuples for the different cases:
I
I
is an Oz integer encoding the tuple.
[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:
OL1#...#OLn
OLi
is the OL expression encoding SLi
(1<=i<=n
).
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.
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.
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.
This is the OL syntax for undetermined lists (i.e. list variables):
'_'
The OL syntax for undetermined sets (i.e. set variables) differs depending on the domain of the set:
Here is the OL syntax of undetermined sets for the different cases:
'_'(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.
'_'
This is the OL syntax for undetermined strings (i.e. string variables):
'_'
The OL syntax for undetermined tuples (i.e. tuple variables) differs depending on the projections of the tuple:
Here is the OL syntax of undetermined tuples for the different cases:
'_'(Tups)
Tups
is an Oz list of tuples representing the the set of tuples
which can still be bound to the tuple variable.4
'_'
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.
[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.