contents index next

4. Global Variables

Hdrug manages a number of `global' variables. A flag consists of a ground key (the `global variable') and a value (arbitrary Prolog term). Flags can be set by means of command-line options, command-interpreter commands, the Options menu, and directly by Prolog predicates.

Global variables are passed on to Tcl/Tk. For this purpose there exists a Tcl/Tk array variable, called `flag'. If the graphical user interface is running, then this Tcl/Tk variable is automatically updated when the Prolog flag is altered. The predicate tk_flag/1 can be used to explicitly send the value of a flag to Tcl/Tk.

4.1. generator(Generator)

on/off. determines whether Generator is currently active or not, i.e. whether it will take part in generator comparison runs or not.

4.2. parser(Parser)

on/off. Determines whether Parser is currently active or not, i.e. whether it will take part in parser comparison runs or not.

4.3. application_name

Used by the graphical user interface. Determines which application default file is loaded, and the title of the widget.

4.4. batch_command

This flag can be used to run a command after `hdrug' is initialized and after the application is initialized by hdrug_initialization/0. The value of the flag is called as a goal and all solutions are found using a failure-driven loop, after which the program terminates.

4.5. clig_tree_active_nodes

Boolean flag which determines whether nodes of clig_trees should be clickable. This is nice, but for large trees slow.

4.6. blt_graph_lines

on/off. Should we connect dots in a blt_graph widget? Default: off.

4.7. debug

0/1/2. Determines the number and detail of continuation messages. Default: 0 (minimum)

4.8. demo

on/off. If demo=on then the system provides somewhat more information. A short representation of the semantic form of a parse will be shown. Note that during test-suite runs this value is off.

4.9. nodeskip

Integer. This flag determines for LaTeX-based tree output the value of nodeskip that is passed on to pstree. If you don't like the tree that is produced then you might try to increase or decrease this value. If the tree is ugly because nodes are too far apart, decrease this value; if the tree is a mess, increase it.

4.10. object_exists_check

on/off. If parse and generation results are saved as objects (flag object_saving) then the system normally checks whether an equivalent object has already been constructed on the basis of the same parse / generation request. This flag determines wether such a check should be made

4.11. object_saving

This value determines whether parse/generation results should be kept as objects for later inspection. If the value is off, no objects are asserted. If it is semi then for each new parse request older objects are removed. If it is on ojbjects are never removed.

4.12. parser

Atom. Determines which parser is currently the parser to use for parse commands.

4.13. add_help_menu

on/off. determines whether on-line help info must be available through the graphical user interface. Should be switched off if you run Hdrug on the display of a different machine and the connection with that machine is slow (like over a phone-line).

4.14. print_table_total

on/off. determines whether during a parse comparison totals should be displayed after each sentence.

4.15. start_results_within_bound

Integer. Determines for the results_within_bound command (hdrug_stats) at which number of millisecond reporting should start. Default: 100.

4.16. end_results_within_bound

Integer. Determines for the results_within_bound command (hdrug_stats) at which number of millisecond reporting should end. Default: 5000.

4.17. incr_results_within_bound

Integer. Determines for the results_within_bound command (hdrug_stats) with which number of millisecond increment percentages should be shown. Default: 100.

4.18. clig_tree_hspace

Integer. Determines the horizontal width between nodes in CLIG trees.

4.19. clig_tree_vspace

Integer. Determines the vertical width between nodes in CLIG trees.

4.20. tcltk

on/off. Determines whether the graphical user interface starts. Default: on

4.21. tkconsol

on/off. Determines whether or not the tkconsol feature (cf. library(tkconsol) should be used. Default: off.

4.22. top_features

Atom. Determines top category used by the parsers. If the value is `vp', then the predicate user:top(vp,Cat) determines the top category (start symbol)

4.23. useful_try_check

on/off. This flag determines during a test-suite run whether a sentence should be parsed even if a shorter sentence has already been timed-out for the current parser. If the value is on, then the sentence is skipped for the current parser.

4.24. user_clause_expansion

on/off. This flag determines whether term_expansion should be used to expand each clause into a user:user_clause/2 predicate. Default: off. Note that you need a multifile declaration for user:user_clause/2 in each file that you load with this flag on. It is often better to load your grammar files with `assertall' and then explicitly construct the user_clause definitions using the `compile_user_clause/[0,1]' predicate.

4.25. cmdint

on/off. This flag determines whether the command-interpreter should be switched on upon startup. Default: off.~n

4.26. update_array_max

Integer. Indicates how many items are passed on in update_array/2 (this predicate is used to inform the gui about the available predicates, types, lexical entries, test sentences, etc.). The default is 1000.

4.27. hdrug_status

This flag is not meant to be set by an application, but is set by Hdrug to communicate the status of the latest parse/generation attempt. The flag has three possible values: success, out_of_memory, time_out. Every parse/generation starts out with te value 'success'. The latter two values are set in the case of a time out exception and a resource error exception.

contents index next