Beispiel #1
0
        public static void GarbageCollect(ref BDDHash H, ref BddTable T)
        {
            foreach (KeyValuePair <int, int> root in dic)
            {
                int u = root.Key;
                Mark(u);
            }
            int size = H.Size;

            H = new BDDHash(size * 2);
            Kernel.G.Clear();
            BddTable newT = new BddTable(size * 2);

            foreach (BddTableEntry entry in T)
            {
                if (entry.node.mark == true)
                {
                    BddNode n = entry.node;
                    if (!Kernel.IsIthNode(entry.u) && !Kernel.IsTerminal(entry.u))
                    {
                        n.mark = false;
                    }
                    newT.Add(entry.u, n);
                    H.Add(entry.node.var, entry.node.low, entry.node.high, entry.u);
                }
            }
            T = newT;
        }
Beispiel #2
0
 public static void Setup()
 {
     T = new BddTable();
     H = new BDDHash(0x100000);
     MarkAndSweep.dic.Clear();
     G.Clear();
     maxVar = 1;
     MaxU   = 1;
     T.Add(bddfalse, new BddNode(int.MaxValue));
     T.Add(bddtrue, new BddNode(int.MaxValue));
 }
 public static void Setup()
 {
     ithsw.Reset();
     applysw.Reset();
     GCsw.Reset();
     MKsw.Reset();
     addrefsw.Reset();
     T = new BddTable(0x100000);
     H = new BDDHash(0x100000);
     MarkAndSweep.dic.Clear();
     G.Clear();
     maxVar = 1;
     MaxU   = 1;
     T.Add(bddfalse, new BddNode(int.MaxValue));
     T.Add(bddtrue, new BddNode(int.MaxValue));
 }