[m-rev.] for review: syntactically correct goals in decl debug
Zoltan Somogyi
zs at cs.mu.OZ.AU
Wed Oct 16 12:24:35 AEST 2002
On 16-Oct-2002, Mark Brown <dougl at cs.mu.OZ.AU> wrote:
> - { check_trace_atom_size(Indent, Which, TraceAtom, RemSize) },
> - (
> - { RemSize > 0 },
> - { IoActions = [] }
> - ->
> - write_decl_atom_direct(User ^ outstr, TraceAtom, Which)
> - ;
> - write_decl_atom_limited(User, DeclAtom, Which)
> - ).
> + { maybe_filter_headvars(Which, Args0, Args1) },
> + { list__map(trace_atom_arg_to_univ, Args1, Args) },
> + %
> + % Call the term browser to print the atom as a goal.
> + %
> + browse__print_synthetic(Functor, Args, is_function(PredOrFunc),
> + User ^ outstr, CallerType, User ^ browser),
> + write_io_actions(User, IoActions).
The comment here is misleading. print_synthetic doesn't always print the atom
fully, since it imposes a size limit.
> mdb> dd
> -pred app
> - [4, 5]
> - [6, 7, 8]
> - [4, 5, 6, 7, 8]
> +app([|](4, [|](5, [])), [|](6, [|](7, [|]/2)), [|](4, [|](5, [|]/2)))
It is nice that we print the atom as an atom, but printing lists like that
looks like a regression. The default size is also too small, since some of the
arguments are abbreviated.
Could I also ask you to change browse__print_common to check for lists
and to print them nicely? That could be done in a separate change, or as part
of this one.
We should also have a test case in tests/debugger/declarative that tests the
printing of the atoms of function calls.
Apart from those points, the change is fine.
Zoltan.
--------------------------------------------------------------------------
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