MPS issue job003867

TitleRankAMBIG is misleadingly used to mean "minimum rank"
Statusclosed
Prioritynice
Assigned userGareth Rees
OrganizationRavenbrook
DescriptionGRM [1]: "We have the concept of the maximum rank (RankMAX), and we often use the minimum rank, but assume it to be RankAMBIG. This is storing up serious problems for the future. We should have a RankMIN, and change uses of RankAMBIG as appropriate."
AnalysisThe cases where RankMIN needs be used are as follows:

traceFlip:
    for(rank = RankAMBIG; rank <= RankEXACT; ++rank) {

TraceCreate:
    trace->band = RankAMBIG; /* Required to be the earliest rank. */

ArenaRootsWalk:
    for(rank = RankAMBIG; rank < RankLIMIT; ++rank) {

traceFindGrey:
    /* then successively earlier ones. Slight hack: We never */
    /* expect to find any segments of RankAMBIG, so we use */
    /* this as a terminating condition for the loop. */
    for(rank = band; rank > RankAMBIG; --rank) {

TraceRankForAccess:
    band = RankAMBIG; /* initialize band to avoid warning */
How foundinspection
Evidence[1] https://info.ravenbrook.com/project/mp...2001-11-05/mmprevol/request/mps/160097/
Created byGareth Rees
Created on2014-10-01 20:09:36
Last modified byGareth Rees
Last modified on2014-10-07 22:31:12
History2014-10-01 GDR Created.

Fixes

Change Effect Date User Description
187156 closed 2014-10-07 22:31:12 Gareth Rees New constant RankMIN gives the minimum rank. Use this (rather than 0 or RankAMBIG) to better express the intention.