Пример #1
0
        internal override Automaton <IMonadicPredicate <BDD, T> > getAutomaton(SimpleList <Variable> variables, ICartesianAlgebraBDD <T> ca)
        {
            var pos1 = variables.IndexOf(var1);
            var pos2 = variables.IndexOf(var2);

            if (pos1 < 0 || pos2 < 0)
            {
                throw new AutomataException(AutomataExceptionKind.InvalidWS1Sformula_UnknownVariable);
            }

            if (var1.IsFirstOrder)
            {
                return(BasicAutomata.MkEqualPositions(pos1, pos2, ca));
            }
            else
            {
                return(BasicAutomata.MkEqualSets(pos1, pos2, ca));
            }
        }
Пример #2
0
        internal override Automaton <BDD> getAutomatonBDD(SimpleList <WS1SVariable <T> > variables, IBDDAlgebra alg, int nrOfLabelBits)
        {
            var pos1 = variables.IndexOf(var1);
            var pos2 = variables.IndexOf(var2);

            if (pos1 < 0 || pos2 < 0)
            {
                throw new AutomataException(AutomataExceptionKind.InvalidWS1Sformula_UnknownVariable);
            }

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

            if (var1.isFirstOrder)
            {
                return(BasicAutomata.MkEqualPositions(pos1, pos2, alg));
            }
            else
            {
                return(BasicAutomata.MkEqualSets(pos1, pos2, alg));
            }
        }