Exemple #1
0
        public Bdd execute()
        {
            // Calls specific methods from Kernel
            Bdd l      = left.execute();
            Bdd r      = right.execute();
            Bdd result = new Bdd(false);

            switch (op)
            {
            case Kind.DIS:
                result = BDD.Or(l, r);
                break;

            case Kind.CON:
                result = BDD.And(l, r);
                break;

            case Kind.BIMP:
                result = BDD.Equal(l, r);
                break;

            case Kind.NAND:
                result = BDD.Nand(l, r);
                break;

            case Kind.XOR:
                result = BDD.Xor(l, r);
                break;

            case Kind.NOR:
                result = BDD.Nor(l, r);
                break;

            case Kind.NOT:
                result = BDD.Not(r);
                break;
            }
            l.Dispose();                //forced garbage collection
            r.Dispose();

            return(result);
        }