Пример #1
0
        internal override Automaton <BDD> GetAutomatonBDD(SimpleList <Variable> variables, IBDDAlgebra alg, int nrOfLabelBits)
        {
            var pos1 = variables.IndexOf(var1);
            var pos2 = variables.IndexOf(var2);

            if (pos1 < 0)
            {
                throw new ArgumentOutOfRangeException("variables", string.Format("does not contain {0}", var1));
            }
            if (pos2 < 0)
            {
                throw new ArgumentOutOfRangeException("variables", string.Format("does not contain {0}", var2));
            }

            pos1 = pos1 + nrOfLabelBits;
            pos2 = pos2 + nrOfLabelBits;

            if (var1.IsFirstOrder)
            {
                return(BasicAutomata.MkEqualPositions2(pos1, pos2, alg));
            }
            else
            {
                return(BasicAutomata.MkEqualSets(pos1, pos2, alg));
            }
        }
Пример #2
0
        internal override Automaton <IMonadicPredicate <BDD, T> > GetAutomatonX(SimpleList <Variable> variables, ICartesianAlgebraBDD <T> alg, bool singletonSetSemantics)
        {
            var pos1 = GetVarIndex(var1, variables);
            var pos2 = GetVarIndex(var2, variables);

            if (var1.IsFirstOrder)
            {
                if (singletonSetSemantics)
                {
                    return(BasicAutomata.MkEqualPositions1 <T>(pos1, pos2, alg));
                }
                else
                {
                    return(BasicAutomata.MkEqualPositions2 <T>(pos1, pos2, alg));
                }
            }
            else
            {
                return(BasicAutomata.MkEqualSets <T>(pos1, pos2, alg));
            }
        }
Пример #3
0
        internal override Automaton <BDD> GetAutomatonBDD(SimpleList <Variable> variables, IBDDAlgebra alg, int nrOfLabelBits, bool singletonSetSemantics)
        {
            var pos1 = GetVarIndex(var1, variables) + nrOfLabelBits;
            var pos2 = GetVarIndex(var2, variables) + nrOfLabelBits;

            if (var1.IsFirstOrder)
            {
                if (singletonSetSemantics)
                {
                    return(BasicAutomata.MkEqualPositions1(pos1, pos2, alg));
                }
                else
                {
                    return(BasicAutomata.MkEqualPositions2(pos1, pos2, alg));
                }
            }
            else
            {
                return(BasicAutomata.MkEqualSets(pos1, pos2, alg));
            }
        }