[m-rev.] for review: mdprof_test --verify-profile

Zoltan Somogyi zs at cs.mu.OZ.AU
Thu Aug 11 08:44:58 AEST 2005


On 10-Aug-2005, Julien Fischer <juliensf at cs.mu.OZ.AU> wrote:
> +    io__format("--verify-profile\n", []),
> +    io__format("            Verify that any file named Deep.data in the\n",
> +        []),
> +    io__format("            current directory is a well-formed deep\n", []),
> +    io__format("            profiling data file.  The <filename> argument\n",
> +        []),
> +    io__format("            is ignored.\n", []),

> +verify_profile(ProgName, Options, !IO) :-
> +    lookup_bool_option(Options, canonical_clique, Canonical),
> +    Machine = "dummy",      % For verification this doesn't matter.
> +    FileName = "Deep.data",
> +    read_and_startup(Machine, [FileName], Canonical, no, [], Res, !IO),
> +    (
> +        Res = ok(_Deep)
> +    ;
> +        Res = error(Error),
> +        io.set_exit_status(1, !IO),
> +        io.format("%s: error reading data file: %s\n",
> +            [s(ProgName), s(Error)], !IO)
> +    ).

I think it would be better if you didn't ignore the filename argument,
and used that instead of hardwiring the name Deep.data in there. Otherwise,
the diff is fine, and an excellent idea.

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