예제 #1
0
        private BVAlgebra(DecisionTree dtree, IntervalSet[] partition) : base(dtree, partition, partition.Length)
        {
            var   K        = (nrOfBits - 1) / 64;
            int   last     = nrOfBits % 64;
            ulong lastMask = (last == 0 ? ulong.MaxValue : (((ulong)1 << last) - 1));

            all0 = new ulong[K];
            all1 = new ulong[K];
            for (int i = 0; i < K; i++)
            {
                all0[0] = 0;
                if (i < K - 1)
                {
                    all1[i] = ulong.MaxValue;
                }
                else
                {
                    all1[i] = lastMask;
                }
            }
            this.zero  = new BV(0, all0);
            this.ones  = new BV((K == 0 ? lastMask : ulong.MaxValue), all1);
            this.mtg   = new MintermGenerator <BV>(this);
            this.atoms = new BV[nrOfBits];
            for (int i = 0; i < nrOfBits; i++)
            {
                atoms[i] = MkBV(i);
            }
        }
예제 #2
0
 private BV64Algebra(DecisionTree dtree, IntervalSet[] partition) : base(dtree, partition, partition.Length)
 {
     this.all   = ulong.MaxValue >> (64 - this.nrOfBits);
     this.mtg   = new MintermGenerator <ulong>(this);
     this.atoms = new ulong[this.nrOfBits];
     for (int i = 0; i < this.nrOfBits; i++)
     {
         atoms[i] = ((ulong)1) << i;
     }
 }
예제 #3
0
 /// <summary>
 /// Construct a solver for bitvector sets.
 /// </summary>
 public BDDAlgebra()
 {
     mintermGen = new MintermGenerator <BDD>(this);
     _True      = new BDD(this, -1, null, null);
     _False     = new BDD(this, -2, null, null);
 }
예제 #4
0
 internal EquivClass(bool useEquivalenceChecking, MintermGenerator <PRED> gen, PRED set)
 {
     this.set = set;
     this.gen = gen;
     this.useEquivalenceChecking = useEquivalenceChecking;
 }