next up previous index
Next: Matrix Switches Up: Control Panel Previous: Control Panel

Buttons and Menus

The button panel contains various buttons and menubuttons which control the execution of the slave program:

STEP
  Executes one labelling step in the step mode. If the variable currently selected for labelling can obtain a value which is consistent with all other variables, the execution stops before next variable is labelled (a forward step). If no such value exists, the program backtracks until a new consistent value for a previously labelled variable is found and it stops before the next labelling step (a backward step).

After executing one labelling step, the status line displays the default message Stopped and all displayed windows are updated to reflect the current state.

If STEP is pressed in the run mode (see RUN), the execution mode changes to the step mode and the program stops in the next labelling step.

When STEP is pressed together with the Shift key, the program executes one fine step: it stops as soon as a domain variable is modified. The updated variable with its new value will be highlighted, the status line shows the message Old domain: DOM, where DOM is the domain of this variable before its modification. The program then waits for a user action; only actions which can be executed asynchronously are accepted.

When the program fails after executing a fine step, the status line displays the message Failing and the program stops again. This gives the user the possibility to inspect the inconsistent state in detail, just before backtracking takes place. A new fine step after a failure will initiate backtracking and the program stops as soon as a new domain variable is modified, but it does not stop after variable domains have been reset to their previous values due to backtracking.

RUN
  Starts execution in run mode - the program runs without stopping until one of the following conditions occurs: During the execution, the display is updated according to the selection in the DISPLAY... menu.

When the RUN button is pressed together with the Shift key, a series of fine steps is executed which stops either on failure, or success of the current labelling step. The former is a quick way to stop the execution immediately before backtracking so that the current state and reasons for failure can be inspected.

RESTART
  Restarts the program execution. This is executed by failing to the invocation of grace_start/1   and repeating the program from this point on.

LOOKAHEAD
  Performs lookahead on all currently displayed variable matrices. This is executed as follows: each variable is successively instantiated to values from its domain. If this instantiation fails, the value is removed from the domain and the next value is tried. When the whole domain has been checked, the instantiation is undone and the next variable is checked.

The whole process is executed only once, not until a fixpoint is reached and so it is possible that clicking several times on this button will result in more pruning (this is directly visible in the Size status field).

Looking ahead may be quite costly, because checking each domain element includes propagating changes and triggering related constraints. It can however provide important information about the real size of the search space.

PRINT
  All variable matrices will be printed on the printer. This command requires that the GNU program groff is installed and executable.

RETURN
  Stops Grace and returns the control to the Prolog top-level loop. All Grace windows stay displayed, they may however not be able to respond to some user actions and should not be used until Grace is restarted. When a program is started which invokes Grace , it decides whether the displayed windows can be reused for this execution (this more or less means that the same program is executed again) or whether it is necessary to delete them and display new ones.

VARIABLE...
  This button displays the menu of currently available variable selection strategies. It is a tear-off menu, it can be made permanent on the display. Its items can be defined using the var_selections   option, the selected item is controlled by the var_selection   option.

VALUE...
  This button displays the menu of currently available value selection strategies. It is a tear-off menu, it can be made permanent on the display. Its items can be defined using the value_selections   option, the selected item is controlled by the value_selection   option.

DISPLAY...
    This menu defines how much of the displayed data is updated when the program executes in run mode:

OPTIONS...
  This menu allows to set several options interactively. Currently, it contains the following options:

BREAK
  Starts a new top-level loop by calling break/0  . This allows to call intermediate Prolog goals while keeping the executed program. When the new break level is exited, Grace and its program become active again.

EXIT
  Exits Grace completely, destroys all its windows.



next up previous index
Next: Matrix Switches Up: Control Panel Previous: Control Panel



Micha Meier
Tue Jul 2 10:07:34 MET DST 1996