Files
mercury/browser
Mark Brown 8e0eb72c15 Various improvements to mdb's interactive query mechanism.
Estimated hours taken: 26

Implement the following improvements:
  - Pass mdb variable bindings to the interactive query processor,
    allowing queries to make use of live values.
  - Catch exceptions thrown by queries, rather than crashing mdb.
  - Write outputs using io.write_cc/3.
  - Don't output underscore variables, avoiding spurious warnings.
  - More protection of the user's namespace.
  - Updated the cleanup code.

browser/interactive_query.m:
    The interface now accepts corresponding lists of names and values,
    which are matched up with variables occurring in the queries.

    Replace the code generator with one that supports passing data
    to and from the query, and catching exceptions from the query.
    Pass the appropriate data at the time the query predicate is called.
    Distinguish between failure of the query and failure of the dynamic
    casts used to instantiate the query inputs.

    Use module qualifiers to avoid clashing with user imports. (Should the
    generated code use use_module, just in case?)

    Perform I/O, failure handling and exception handling in the caller
    instead of in the generated code. This is faster, more maintainable,
    and means that errors are caught earlier.

    Place source_file and line directives more carefully so as to ensure
    more consistent error messages, and to help distinguish errors in the
    template from errors in the query.

    Factor out the query command parser to avoid double maintenance.

browser/debugger_interface.m:
    Conform to above changes.

trace/mercury_trace_vars.[ch]:
    Export MR_trace_return_bindings, which constructs Mercury lists
    of the variable names and values in the current environment.

trace/mercury_trace_browse.c:
    Pass bindings from trace/mercury_trace_vars through to the interactive
    query processor.

tests/debugger/interactive.{m,inp,exp}:
    Update for changes to existing functionality. Additionally test the
    new functionality.

doc/user_guide.texi:
    Document the new behaviour.

NEWS:
    Announce the new behaviour.
2016-02-07 04:09:04 +11:00
..
2016-01-01 20:31:11 +11:00
2015-11-13 15:03:20 +11:00
2015-08-22 22:30:36 +10:00
2015-08-22 22:30:36 +10:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-08-22 22:30:36 +10:00
2015-08-22 22:30:36 +10:00
2015-11-13 15:03:20 +11:00