finite set select intersection

Irene Langkilde Geary irenelg at cs.byu.edu
Tue Jan 4 20:13:57 CET 2005


For anyone who may be interested for future reference, I developed a 
work-around in terms of more basic constraints that looks something like 
what is below, for selecting partitions.  It appears to be working 
satisfactorily for me.  I'd be interesting in hearing if anyone finds 
otherwise.

Usage: {SelectPartition $MVs $M1 $M2}

Definition:

proc {SelectPartition SetVecs SelectorSet ResultSet}
   {FS.forAllIn {FS.var.upperBound
                  {FoldL fun {$ Z S} {FS.reflect.upperBoundList S}|Z end
                  SetVecs}}   % union of domains of Sets in SetVecs
    proc {$ I}
        {FD.equi {FS.reified.isIn I ResultSet}
        {FD.reified.sum
          {List.mapInd SetVecs
            fun {$ Idx S}
               {FD.conj {FS.reified.isIn I S}
                 {FS.reified.isIn Idx SelectorSet}}
     end}
     '=:' 1} 1}
    end}
end

Irene




More information about the mozart-users mailing list