[m-rev.] for review: printing of I/O actions in the declarative debugger
Mark Brown
dougl at cs.mu.OZ.AU
Fri Nov 1 13:54:53 AEDT 2002
On 30-Oct-2002, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> Make it easier to print and browse I/O actions in the declarative debugger.
>
> browser/browser_info.m:
> Add a new component to the debugger's permanent state to record the
> user's preference as to how many I/O actions can be printed with each
> atom. If an atom has this many I/O actions or fewer, they are printed.
> If it has more, only a notice about too many I/O actions to show is
> printed, and the user has to look up the others manually.
s/others/actions/
>
> browser/browse.m:
> Update the help message and the printing of the current settings
> accordingly.
>
> browser/parse.m:
> Add a new general browser command, "num_io_actions <n>", that allows
> the user to set the value of this new parameter.
Why not make this part of the browser's "set" command? Oh wait, I see
that is what you have done; the log message is a bit misleading.
> Index: browser/browser_info.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/browser/browser_info.m,v
> retrieving revision 1.9
> diff -u -b -r1.9 browser_info.m
> --- browser/browser_info.m 16 Apr 2002 13:54:29 -0000 1.9
> +++ browser/browser_info.m 28 Oct 2002 14:17:38 -0000
> @@ -271,7 +275,8 @@
> ---> browser_persistent_state(
> print_params :: caller_params,
> browse_params :: caller_params,
> - print_all_params :: caller_params
> + print_all_params :: caller_params,
> + num_printed_io_actions :: int
Okay, so the io action limit is independent of the caller type. Fair
enough; we should probably assume the caller is like "print all" anyway.
> @@ -340,6 +346,10 @@
> Pretty = format_params(3, 10, 80, 2),
> Params = caller_params(DefaultFormat, Flat, RawPretty, Verbose, Pretty).
>
> +:- func num_printed_io_actions_default = int.
> +
> +num_printed_io_actions_default = 20.
> +
I guess the rationale for that number is that it is a bit less than a
normal 25 line screenful. You should document the rationale here.
> @@ -293,6 +361,9 @@
> "\ts\tskip\t\tskip this question\n",
> "\tr\trestart\t\task the skipped questions again\n",
> "\tb <n>\tbrowse <n>\tbrowse the nth argument of the atom\n",
> + "\tb io <n>\tbrowse io <n>\tbrowse the atom's nth I/O action\n",
> + "\tp <n>\tprint <n>\tprint the nth argument of the atom\n",
> + "\tp io <n>\tprint io <n>\tprint the atom's nth I/O action\n",
You should also add lines for the forms:
print <from>-<to>
print io <from>-<to>
Other than that, this change is fine.
Cheers,
Mark.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list