[m-dev.] choicepoint id bug

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Apr 30 14:08:18 AEST 2009



On Thu, 30 Apr 2009, Julien Fischer wrote:

> In short, the code for foo/3 ought to  be something like the following:
>
>    cptest.foo(Thing, STATE_VARIABLE_IO_0, STATE_VARIABLE_IO) :-
>        impure private_builtin.store_ticket(TrailTicket),
>        impure private_buitin.mark_ticket_stack(SavedTicketCounter),

The order of these two calls has been inverted.

>        (if
>            builtin.dynamic_cast(Thing, String)
>         then
>           impure private_builtin.reset_ticket_commit(TrailTicket),
>           impure private_builtin.prune_tickets_to(SavedTicketCounter)
>           V_12 = "\n",
>           V_11 = string.(String ++ V_12),
>           io.write_string(V_11, STATE_VARIABLE_IO_0, STATE_VARIABLE_IO)
>         else
>           impure private_builtin.reset_ticket_undo(TrailTicket),
>           impure private_builtin.discard_ticket_to(SavedTicketCounter) **
>           V_14 = "Not a string\n",
>           io.write_string(V_14, STATE_VARIABLE_IO_0, STATE_VARIABLE_IO)
>       ).
>
> ** this doesn't actually exist in private_builtin.m (yet).

Julien.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list