[m-dev.] More trailing bugs. :-)
Warwick Harvey
wharvey at cs.monash.edu.au
Mon Jan 31 12:19:49 AEDT 2000
Fergus wrote:
> On 28-Jan-2000, Warwick Harvey <wharvey at cs.monash.edu.au> wrote:
> > My understanding of how the trailing operations should work, is that during
> > forward execution, the ticket counter should never decrease.
>
> This is not the case.
[...]
OK, you've convinced me there are some problems with this.
So I have another proposal. :-)
The problem I described is not so much that the ticket counter / choicepoint
ID is decremented, but rather that values are re-used. What if we introduce
a ticket "high water mark", and redefine MR_store_ticket() as follows:
/*
** Called when we create a choice point
** (including semidet choice points).
*/
/* void MR_store_ticket(Word &); */
#define MR_store_ticket(save_trail_ptr) \
do { \
(save_trail_ptr) = (Word) MR_trail_ptr; \
MR_ticket_counter = ++MR_ticket_high_water; \
} while(0)
That avoids the ID re-use problem, and means we are allowed to decrement the
counter, so that redundant trailing isn't crippled. Can you see any
problems with this approach?
Warwick
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list