Beispiel #1
0
//#############################################################################################

        /// <summary>
        /// If-Then operator for Bdds.
        /// Implemented as conjunction.
        /// </summary>
        /// <param name="condition">Condition Bdd</param>
        /// <param name="then">Then Bdd</param>
        /// <returns>Resulting Bdd</returns>
        public static Bdd IfThen(Bdd condition, Bdd then)
        {
            int u = Apply(Op.CON, condition.U, then.U);

            return(Bdd.CreateBdd(u));
        }
Beispiel #2
0
        /// <summary>
        /// Substitution of a list of variablepairs in a Bdd.
        /// </summary>
        /// <param name="bpl">Variablepairlist</param>
        /// <param name="root">bdd</param>
        /// <returns>Resulting Bdd</returns>
        public static Bdd VarListCompose(BddPairList bpl, Bdd root)
        {
            int u = VarListCompose(ref bpl, root.U);

            return(Bdd.CreateBdd(u));
        }
Beispiel #3
0
        /// <summary>
        /// Universal quatification on a variabel.
        /// </summary>
        /// <param name="var">Variable number</param>
        /// <param name="root">Bdd</param>
        /// <returns>Resulting Bdd</returns>
        public static Bdd ForAll(int var, Bdd root)
        {
            int u = ForAll(var, root.U);

            return(Bdd.CreateBdd(u));
        }
Beispiel #4
0
        /// <summary>
        /// Substitution of one variable with another variable in a Bdd.
        /// </summary>
        /// <param name="t">The Bdd the substitution is performed on.</param>
        /// <param name="replace">The variable number that is inserted.</param>
        /// <param name="x">The variable number that is substituted</param>
        /// <returns>Resulting Bdd</returns>
        public static Bdd Compose(Bdd t, int replace, int x)
        {
            int u = Compose(t.U, replace, x);

            return(Bdd.CreateBdd(u));
        }
Beispiel #5
0
        private static Bdd ExecuteTransition(Bdd R, Bdd T, BddPairList bpl)
        {
            Bdd temp = Kernel.ApplyExists(Op.CON, T, R, bpl);

            return(Kernel.VarListCompose(bpl, temp));
        }