[m-dev.] choicepoint id bug
Paul Bone
pbone at csse.unimelb.edu.au
Thu Apr 30 14:57:20 AEST 2009
On Thu, Apr 30, 2009 at 02:08:18PM +1000, Julien Fischer wrote:
>
>
> 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).
>
I agree with this.
I've discussed this with Julien.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/developers/attachments/20090430/3d7a21d1/attachment.sig>
More information about the developers
mailing list