internal static bool CheckEquivalence(PDA<A, S> pda1, PDA<A, S> pda2, S initialStackSymbol1, S initialStackSymbol2, A furtherAlphabetSymbol)
        {
            Assertion.Assert(pda1.Deterministic, String.Format(NotDeterministicError, "first"));
            Assertion.Assert(pda2.Deterministic, String.Format(NotDeterministicError, "second"));

            bool pdaDoesNotHaveSymbol(PDA<A, S> pda, A symbol) => pda.States.All(s => s.Value.Transitions.All(t => t.SymbolIn.IsEmpty() || !t.SymbolIn.GetSymbol().Equals(symbol)));
            Assertion.Assert(pdaDoesNotHaveSymbol(pda1, furtherAlphabetSymbol) && pdaDoesNotHaveSymbol(pda2, furtherAlphabetSymbol), FurtherAlphabetSymbolInvalidError);

            //TODO: the PDAs have both acceptance conditions, check also the equivalence of this pda with itself (and the other acceptance condition)
            var convertedPDAs = ConvertDPDAsToEmptyStack(pda1, pda2, furtherAlphabetSymbol);
            var mergedDPDA = PDATransformer<A, S>.MergeDPDAsWithEmptyStack(convertedPDAs.Item1, convertedPDAs.Item2, initialStackSymbol1, initialStackSymbol2);
            var mergedDPDAInNormalForm = DPDAToNormalFormConverter<A, S>.ToNormalForm(mergedDPDA);

            var initialStackSymbol1NormalForm = GetStackSymbol(mergedDPDAInNormalForm, initialStackSymbol1);
            var initialStackSymbol2NormalForm = GetStackSymbol(mergedDPDAInNormalForm, initialStackSymbol2);

            var determinisedSDAResult = DPDAInNormalFormToSDAConverter<A, StackSymbolSequence<S>>.ToDeterminisedSDA(mergedDPDAInNormalForm, initialStackSymbol1NormalForm, initialStackSymbol2NormalForm);


            //TODO: create in the FromPDA-method already the partition (see Fact 3.2 in the paper) if it is necessary; 
            //maybe remove the own step of the creation of the SDA and integrate this into the determinisedSDA, 
            //as the partition depends on the DPDA that the SDA is created of

            return false; //FIXME
        }
        public void MergeDPDAsWithEmptyStackTest()
        {
            var dpda1 = new PDA <char, char>(new AcceptanceCondition.EmptyStack(), true, 'A', false, "ABC", 'Z');

            dpda1.AddState(1, false);
            dpda1.AddState(2, false);
            dpda1.AddState(3, false);
            dpda1.AddState(4, false);
            dpda1.AddState(5, false);
            dpda1.AddState(6, false);
            dpda1.AddState(7, false);

            dpda1.AddTransition().From(0).To(1).Read().Pop('A').Push("AAA");
            dpda1.AddTransition().From(1).To(2).Read('a').Pop('A').Push();
            dpda1.AddTransition().From(2).To(3).Read('a').Pop('A').Push();
            dpda1.AddTransition().From(3).To(4).Read().Pop('A').Push("BBCC");
            dpda1.AddTransition().From(4).To(4).Read('b').Pop('B').Push();
            dpda1.AddTransition().From(4).To(4).Read('c').Pop('C').Push();

            dpda1.AddTransition().From(1).To(5).Read().Pop('B').Push();
            dpda1.AddTransition().From(2).To(6).Read().Pop('B').Push("B");
            dpda1.AddTransition().From(6).To(7).Read().Pop('B').Push("B");
            dpda1.AddTransition().From(7).To(6).Read().Pop('B').Push("B");


            var dpda2 = new PDA <char, char>(new AcceptanceCondition.EmptyStack(), true, 'A', false, "ABC", 'Z');

            dpda2.AddState(1, false);
            dpda2.AddState(2, false);
            dpda2.AddState(3, false);
            dpda2.AddState(4, false);

            dpda2.AddTransition().From(0).To(1).Read().Pop('A').Push("AAA");
            dpda2.AddTransition().From(1).To(2).Read('a').Pop('A').Push();
            dpda2.AddTransition().From(2).To(3).Read('a').Pop('A').Push();
            dpda2.AddTransition().From(3).To(4).Read().Pop('A').Push("BBCC");
            dpda2.AddTransition().From(4).To(4).Read('b').Pop('B').Push();
            dpda2.AddTransition().From(4).To(4).Read('c').Pop('C').Push();

            var mergedDPDAForSimulationOf1 = PDATransformer <char, char> .MergeDPDAsWithEmptyStack(dpda1, dpda2, 'X', 'Y');

            dpda1.CreateRunner();
            mergedDPDAForSimulationOf1.CreateRunner();

            var equalityResult1 = new PDAEqualityResult <char, char>(dpda1, mergedDPDAForSimulationOf1, "abc", 10, 400000, 3000);

            Assert.IsTrue(equalityResult1.AreEqual);


            var mergedDPDAForSimulationOf2 = PDATransformer <char, char> .MergeDPDAsWithEmptyStack(dpda2, dpda1, 'X', 'Y');

            dpda2.CreateRunner();
            mergedDPDAForSimulationOf2.CreateRunner();

            var equalityResult2 = new PDAEqualityResult <char, char>(dpda2, mergedDPDAForSimulationOf2, "abc", 10, 400000, 3000);

            Assert.IsTrue(equalityResult2.AreEqual);
        }