next up previous contents index
Next: Loading/consulting and reconsulting programs Up: Using the System Previous: Filenames

Queries

   

After the system has been initialized, it will prompt the user for a query. bsphackfloatpenalty -Mii floatpenalty-Miii parmoderrfloatpenalty@ nextcurrboxfreelist currbox-2floatpenalty@ fltovf currboxtempboxa tempboxa @floatesphackbsphackfloatpenalty -Mii floatpenalty-Miii parmoderrfloatpenalty@ nextcurrboxfreelist currbox-3floatpenalty@ fltovf currboxtempboxa tempboxa @floatesphack It will continually accept user goals and solving for them until the session is terminated with a halt/0 or if it encounters the end of file (eg: tex2html_wrap_inline4410 D on UNIX or tex2html_wrap_inline4410 Z on MSDOS). This again is similar to the style of most PROLOG systems. If the user goal failed then the ``*** No'' message is output, otherwise the query is successful and the resulting answer constraints (the constraints on variables in the query) are output. A successful query will also display a ``*** Yes'' message, but if there are other alternatives to try for the query then the ``*** Retry?'' message is displayed and the user is prompted to either press carriage return or enter ``.'' (or ``n'') to accept the answers, or ``;'' (or ``y'') to cause backtracking. A different prompt is displayed if delayed (nonlinear) remain at the end    of the execution. The message ``*** Maybe'' replaces ``*** Yes'' and ``*** (Maybe) Retry?'' replaces ``*** Retry?'' to indicate that the satisfiability of the nonlinear constraints remaining has not been decided by CLP( tex2html_wrap_inline4020 ). Execution of a query can be interrupted at any time by using the interrupt keycode ( tex2html_wrap_inline4410 C usually).gif bsphackfloatpenalty -Mii floatpenalty-Miii parmoderrfloatpenalty@ nextcurrboxfreelist currbox-4floatpenalty@ fltovf currboxtempboxa tempboxa @floatesphack A buffer of the last 50 goals is kept, and may be examined by the history/0 (or h/0) predicate. An old query may be re-executed by just entering its history number as a goal (eg: ?- 5.).

For every top-level query. There is also an implicit dump on   the variables in the goal, i.e. the set of answer constraints using those variables are printed, with the exception that anonymous variables and also other variables beginning with an ``_'' are ignored. No implicit dump is performed for goals embedded in a file. (Note that the output constraints differs from many PROLOG systems which display the variable bindings produced from execution.)


next up previous contents index
Next: Loading/consulting and reconsulting programs Up: Using the System Previous: Filenames

Alan Borning
Fri Oct 8 12:51:18 PDT 1999