solve
,
solvable
, classify
, convert
, server
, and
display
. Each of these commands can be used from the
command-line or in the Utool Server (but running the server
command in the Utool Server doesn't do anything). In addition, Utool
supports several auxiliary pseudo-commands, which display help
information. solvable
command and outputs
some information about it:
$ utool solvable -s examples/chain3.cllsCommands typically require arguments (in the example, the filename
chain3.clls
of the USR that we want to solve), and
accept certain options (here, the -s
option, which
instructs Utool to display statistical information). These arguments
and options are written after the command on the command line.server
command:
$ utool serverAlternatively, you can also click the server button in the top right corner of a Ubench window to start or stop a server thread. The server doesn't output anything on the console on which you started it – unless you specified the
--logging
command-line option
and no name for the logfile, in which case it will write some
information to standard error. --port
option. The protocol for communicating with the server is as follows:
<utool cmd="..." (more options)> (arguments of the command) </utool>The command, options, and arguments in this XML element correspond to the command, options, and arguments of a single run of the command-line tool.
utool
element (i.e., after the closing </utool>
tag), the Utool Server processes the command. You may optionally close your side of the socket using the shutdown
function to notify the server that you're finished writing, but this is no longer necessary. Notice that you don't want to close
the socket yet at this point.<result .... />The particular attributes of this element depend on the command, and are described below. If an error occurred, the response will be a message of the following form instead:
<error code="..." explanation="..." />Here the “code” attribute will be a numeric error code, and the “explanation” attribute will be a plain-text explanation of the error that occurred.
ex:
, it is taken to represent one of the USRs that come bundled with Utool. For instance, when we used the specification ex:holesemantics-14.hs.pl
in the tutorial, this instructed Utool to look for an example with the name holesemantics-14.hs.pl
in the Jar file.ex:
, then it is up to the input codec how to interpret it. Most codecs take it to be a filename, and will attempt to read the USR from the file with this name. This is what happens when you unpack the Jar file and then execute utool solvable examples/chain3.clls
. The only codec that is currently distributed with Utool that interprets its input specification differently is the chain
codec, which interprets the string as the numeric chain length and not as a filename.usr
element that is embedded into the utool
element,
like so:
<utool cmd="solvable"> <usr codec="domcon-oz" string="[label(x f(y)) ...]" /> </utool>The
ex:
syntax is not available in server mode. Notice that the attribute values must be valid XML attribute
strings. This means that you must replace special characters by
their respective character entities (see also
Section 540Utool in Practicesection.5 for tips on this).code
attribute in the responses for many commands (and always
when it reports an error).exit codes | meaning |
0 – 127 | command was executed successfully |
128 – 191 | an error occurred in the main programme |
192 – 223 | an error occurred in the input codec |
224 – 255 | an error occurred in the output codec |
exit code | meaning |
128 | file I/O error |
129 | network I/O error |
130 | Ubench encountered an error while laying out a graph |
140 | error while configuring an (XML) parser |
141 | the command you specified was not recognised |
142 | error while registering a codec |
143 | error while parsing a builtin example |
150 | you didn't specify a USR, but the command requires one |
151 | you didn't specify an input codec, and Utool cannot guess it |
152 | there is no input codec of the name you specified |
153 | the input graph is not weakly normal or not compactifiable |
160 | you didn't specify an output codec, and Utool cannot guess it |
161 | there is no output codec of the name you specified |
162 | the specified output codec can't output multiple USRs |
170 | error while parsing an equivalence specification |
<result solvable='true' fragments='7' count='5' chartsize='10' time='30' />The
solvable
attribute contains the string true
if the
graph was solvable, and false
otherwise. The other attributes
contain statistical information: the number of fragments of the graph,
the number of solved forms, the number of splits in the chart, and the
time in milliseconds it took to compute the chart.solvable
command can take the following options:
--input-codec <codecname>
or -I <codecname>
. In server
mode, specify it as the codec
attribute of the usr
element.mrs-prolog
input codec has an option that tells it whether you want to normalise the dominance graph it computes from an USR in MRS format. You typically want this, but you can switch off the normalisation by passing the value none
in the normalisation
codec option.--input-codec-options <options>
, where <options>
is a comma-separated list of option-value pairs. In the example of the MRS codec above, you could pass the option --input-codec-options normalisation=none
to switch off the normalisation. In server mode, you can set codec options by passing this comma-separated option list in the codec-options
attribtue of the usr
element.--display-statistics
or -s
option. All such statistics
information will be written to standard error. This will do nothing in server mode; the server transmits statistical information in any case.--nochart
option on the command line. In server mode, you achieve the same effect by passing true
in the nochart
attribute of the main utool
element. This will make Utool compute an incomplete chart which is sufficient for determining solvability, but not for computing the number of solved forms. As a consequence, Utool will not print or return any statistics about chart size or number of solved forms.
<result solvable='true' fragments='7' count='5' chartsize='10' time-chart='30' time-extraction='100'> <solution string='....' /> <solution string='....' /> </result>The attributes of the
result
element are as for the
solvable
command, except that the runtime is now reported
separately for computing the chart and for enumerating (extracting)
the solved forms. The solutions are returned in attributes of
solution
elements below the result
element. Notice that
you may need to resolve XML character entities that were used in the
attribute value strings.solve
command can take the following options:
solvable
solvable
--output-codec <codecname>
or -O <codecname>
. In server
mode, specify it by passing the codec name as the output-codec
attribute of the main utool
element.solve
command potentially outputs more than one solved form. This means that the output codec you specify here must support the output of multiple solved forms. The utool -d
command shows you for each output codec whether it does this.--output-codec-options <options>
. In server mode, you can pass the output codec options in the output-codec-options
attribute of the main utool
element.--output <filename>
or -o <filename>
. This option is not applicable in server mode
because it doesn't write into files anyway.--no-output
or -n
on
the command line. In server mode, you get this effect if you simply
don't specify any output codec in the utool
element.solvable
<result usr='....' />The string in the
usr
attribute is the converted USR. Remember
that you may need to resolve XML character entities that were used in
the attribute value strings.convert
command can take the following options:
solvable
solvable
solve
, except that convert
doesn't require that the output codec supports the output of multiple solved forms
solve
solve
solve
solvable
classify
command checks whether a dominance graph belongs
to certain particularly well-behaved classes. It currently
recongises the following classes:
class | bit value |
weakly normal | 1 |
normal | 2 |
compact | 4 |
compactifiable | 8 |
hypernormally connected | 16 |
leaf-labelled | 32 |
<result code='63' weaklynormal='true' normal='true' compact='true' compactifiable='true' hypernormallyconnected='true' leaflabelled='true' />Here
code
is the exit code described above, and the other
attributes are either true
or false
.classify
command can take the following options:
solvable
solvable
solvable
server
command starts a new Utool Server. By default, this
server listens to new connections on port 2802, but you can specify a
different port using the --port
option. This command is ignored
if Utool is already running in server mode; it can only be run from
the command line.display
command), you can shut the server down by clicking on the server button in the top right corner.server
command can take the following
options:
--port <number>
(or -p <number>
), where <number>
is the port number you want.--logging
(or -l
) by itself, the log messages
will be written to standard error. Alternatively, you can log the
messages into a file by specifying the filename:
--logging <filename>
or -l <filename>
.--warmup
to the server, it will solve a number of dominance graphs before doing anything else. The effect of this is to encourage the Java Virtual Machine to compile parts of the solver to native machine code, so when you solve USRs that you are actually interested in, Utool will do this faster and in a more predictable time. Utool will keep you informed about the warmup process, and will print the message “Utool is now warmed up” when the warmup is finished.
display
command instructs Utool to display the input USR in
the Underspecification Workbench (Ubench). If the Utool process has
opened a Ubench window before, it will display the USR in a new tab of
the same window; otherwise it will open a new Ubench window first.display
command. This means
that you may specify an input USR (in which case it is displayed right
away), or you can call display
without arguments. In this case,
an empty Ubench window is displayed; you can still open USRs from the
File/Open menu or by sending further display
commands to the
Utool Server.display
command can take the following
options:
solvable
solvable
help [command]
: If you specify a command, this will
display a brief help message for that command. Otherwise, it will
display an overview over the possible commands.
--version
: Displays the version of Utool.
--display-codecs
or -d
: Displays the installed
codecs.
--help-options
: Displays an overview over some frequently
used options.
--equivalences <equivfile>
or -e <equivfile>
option. Here <equivfile>
is the name of a file which contains a
specification of the equation system. In server mode, you pass an
element <eliminate equations="..." />
as a child of the
utool
element, where the value of the equations
attribute is the specification of the equation system.<?xml version="1.0" ?> <equivalences style="(some name)"> ..... </equivalences>You may nest two kinds of elements below the root element:
equivalencegroup
: This element specifies a set of
label-hole pairs that can all be permuted with each other. For
instance, if you want to specify that existential quantifier in
first-order logic can be permuted with each other, regardless of
whether they are in each other's scopes or restrictions, you can use
the following specification:
<equivalencegroup> <quantifier label="exists" hole="0" /> <quantifier label="exists" hole="1" /> </equivalencegroup>By contrast, universal quantifiers only permute with each other if they are plugged into each other's scope:
<equivalencegroup> <quantifier label="every" hole="1" /> </equivalencegroup>You may have as many
equivalencegroup
elements as you
like, and you may have as many entries in each equivalencegroup
as you like.permutesWithEverything
: This element expresses that a
certain quantifier permutes with every other quantifier. For instance,
you can state that a proper name as analysed by the ERG permutes with
every other quantifier as follows:
<permutesWithEverything label="proper_q" hole="1" />
hole
attribute specifies the index of the child that is
used in the permutation system, starting at 0 for the leftmost
child. Notice that redundancy elimination is only defined for compact
dominance graphs in [[]Koller and Thater2006]. Utool automatically keeps track
of the hole indices when it compactifies the input graph, so the
compactification is transparent to the user. However, this translation
step is not well-defined in the case of multiple holes below the same
child of the labelled root.