Ejemplo n.º 1
0
        static AddToTree.Tree ConvertAllMinuseToPluseActionFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            int  INCREASE = 2147483647 / 3;
            bool SecOND   = true;

            try
            {
                UIS.SetProgressValue(UIS.progressBar5, 0);

                if ((Dummy.ThreadAccess.SampleAccess == "-") && (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.RightSideAccess, Dummy)))
                {
                    AddToTree.Tree ONE = new AddToTree.Tree("-1", false);
                    AddToTree.Tree ADD = new AddToTree.Tree("*", false);
                    //Dummy = Dummy.LeftSideAccess;
                    ADD.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess), ONE);
                    ADD.LeftSideAccess.ThreadAccess  = ADD;
                    ADD.RightSideAccess.ThreadAccess = ADD;
                    Dummy = Dummy.ThreadAccess;
                    Dummy.SampleAccess   = "+";
                    Dummy.LeftSideAccess = ADD;
                    Dummy.LeftSideAccess.ThreadAccess = Dummy;
                    SecOND = false;
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            UIS.SetProgressValue(UIS.progressBar5, INCREASE + UIS.progressBar5.Value);

            try
            {
                if ((Dummy.SampleAccess == "-") && (SecOND))
                {
                    AddToTree.Tree ONE = new AddToTree.Tree("-1", false);
                    AddToTree.Tree ADD = new AddToTree.Tree("*", false);
                    ADD.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.RightSideAccess), ONE);
                    ADD.LeftSideAccess.ThreadAccess  = ADD;
                    ADD.RightSideAccess.ThreadAccess = ADD;
                    Dummy.SampleAccess    = "+";
                    Dummy.RightSideAccess = ADD;
                    Dummy.RightSideAccess.ThreadAccess = Dummy;
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            UIS.SetProgressValue(UIS.progressBar5, 2147483647);
            Dummy.LeftSideAccess  = ConvertAllMinuseToPluse.ConvertAllMinuseToPluseActionFx(Dummy.LeftSideAccess, ref UIS);
            Dummy.RightSideAccess = ConvertAllMinuseToPluse.ConvertAllMinuseToPluseActionFx(Dummy.RightSideAccess, ref UIS);
            return(Dummy);
        }
Ejemplo n.º 2
0
        static public AddToTree.Tree LocalSimplifierFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            Dummy = SuitableStructureForLocalSimplifier.SuitableStructureForLocalSimplifierFx(Dummy, ref UIS);
            bool MINUSEPLUSEEQUAL             = false;
            bool MULDIVISIONEQUAL             = false;
            bool MINUSEPLUSWITHNUMBERMULATED  = false;
            bool MULDIVISIONWITHNUMBERMULATED = false;
            int  INCREASE = 2147483647 / 5;

            do
            {
                MINUSEPLUSEEQUAL = false;

                UIS.SetProgressValue(UIS.progressBar10, 0);

                Dummy = LocalSearchMinusPlusEqualSimplifier.LocalSearchMinusPlusEqualSimplifierFx(Dummy, ref MINUSEPLUSEEQUAL, ref UIS);
                //Dummy = LocalSearchMinusPlusEqualSimplifier.LocalSearchMinusPlusEqualSimplifierFx(Dummy);

                UIS.SetProgressValue(UIS.progressBar10, INCREASE + UIS.progressBar10.Value);
                MULDIVISIONEQUAL = false;
                //ERROR30174253 :the result is invalid.refer to page338.
                Dummy = LocalSearchMulDivisionEqualSimplifier.LocalSearchMulDivisionEqualSimplifierFx(Dummy, ref MULDIVISIONEQUAL, ref UIS);

                UIS.SetProgressValue(UIS.progressBar10, INCREASE + UIS.progressBar10.Value);

                MINUSEPLUSWITHNUMBERMULATED = false;
                Dummy = LocalSearchMinusPlusWithNumberMulatedEqualSimplifier.LocalSearchMinusPlusWithNumberMulatedEqualSimplifierFx(Dummy, ref MINUSEPLUSWITHNUMBERMULATED, ref UIS);

                UIS.SetProgressValue(UIS.progressBar10, INCREASE + UIS.progressBar10.Value);
                MULDIVISIONWITHNUMBERMULATED = false;
                //Dummy = LocalSearchMinusPlusEqualSimplifier.LocalSearchMinusPlusEqualSimplifierFx(Dummy);

                //         Dummy = LocalSearchMinusPlusTowNumberSimplifier.LocalSearchMinusPlusTowNumberSimplifierFx(Dummy);

                UIS.SetProgressValue(UIS.progressBar10, INCREASE + UIS.progressBar10.Value);

                Dummy = LocalSearchMulDivionWithNumberMulatedEqualSimplifier.LocalSearchMulDivionWithNumberMulatedEqualSimplifierFx(Dummy, ref MULDIVISIONWITHNUMBERMULATED, ref UIS);

                //          Dummy = Simplifier.SimplifierFxSimpler(Dummy);
                UIS.SetProgressValue(UIS.progressBar10, 2147483647);
            } while (MINUSEPLUSEEQUAL || MULDIVISIONEQUAL || MINUSEPLUSWITHNUMBERMULATED || MULDIVISIONWITHNUMBERMULATED);

            return(Dummy);
        }
Ejemplo n.º 3
0
        static AddToTree.Tree MulTowDivisionCalculator(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            //int INCREASE = 2147483647;
            UIS.SetProgressValue(UIS.progressBar6, 0);
            if (IS.IsMul(Dummy.SampleAccess))
            {
                if (IS.IsDiv(Dummy.LeftSideAccess.SampleAccess) && IS.IsDiv(Dummy.RightSideAccess.SampleAccess))
                {
                    AddToTree.Tree MUL = new AddToTree.Tree(null, false);
                    MUL = Dummy.CopyNewTree(Dummy.LeftSideAccess.RightSideAccess);
                    Dummy.LeftSideAccess.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess.LeftSideAccess), Dummy.CopyNewTree(Dummy.RightSideAccess.LeftSideAccess));
                    Dummy.LeftSideAccess.SampleAccess = "*";
                    Dummy.LeftSideAccess.LeftSideAccess.ThreadAccess  = Dummy.LeftSideAccess;
                    Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;

                    Dummy.SampleAccess = "/";

                    Dummy.RightSideAccess.SetLefTandRightCommonlySide(MUL, Dummy.CopyNewTree(Dummy.RightSideAccess.RightSideAccess));
                    Dummy.RightSideAccess.SampleAccess = "*";
                    Dummy.RightSideAccess.LeftSideAccess.ThreadAccess  = Dummy.RightSideAccess;
                    Dummy.RightSideAccess.RightSideAccess.ThreadAccess = Dummy.RightSideAccess;
                }
                UIS.SetProgressValue(UIS.progressBar6, 2147483647);

/*                else
 *                  if (IS.IsDiv(Dummy.LeftSideAccess.SampleAccess))
 *                  {
 *                      AddToTree.Tree MUL = new AddToTree.Tree(null, false);
 *                      MUL = Dummy.CopyNewTree(Dummy.RightSideAccess);
 *                      Dummy.RightSideAccess = Dummy.LeftSideAccess.RightSideAccess;
 *                      Dummy.RightSideAccess.ThreadAccess = Dummy;
 *
 *                      Dummy.SampleAccess = "/";
 *
 *                      Dummy.LeftSideAccess.RightSideAccess = MUL;
 *                      Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;
 *                      Dummy.LeftSideAccess.SampleAccess = "*";
 *
 *
 *                  }
 *                  else
 *                      if (IS.IsDiv(Dummy.RightSideAccess.SampleAccess))
 *                      {
 *                          Dummy.SetLefTandRightCommonlySide(Dummy.RightSideAccess,Dummy.LeftSideAccess);
 *
 *                          AddToTree.Tree MUL = new AddToTree.Tree(null, false);
 *                          MUL = Dummy.CopyNewTree(Dummy.RightSideAccess);
 *                          Dummy.RightSideAccess = Dummy.LeftSideAccess.RightSideAccess;
 *                          Dummy.RightSideAccess.ThreadAccess = Dummy;
 *
 *                          Dummy.SampleAccess = "/";
 *
 *                          Dummy.LeftSideAccess.RightSideAccess = MUL;
 *                          Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;
 *                          Dummy.LeftSideAccess.SampleAccess = "*";
 *
 *
 *                      }
 */
            }
            MulTowDivision.MulTowDivisionCalculator(Dummy.LeftSideAccess, ref UIS);
            MulTowDivision.MulTowDivisionCalculator(Dummy.RightSideAccess, ref UIS);
            return(Dummy);
        }
Ejemplo n.º 4
0
        static public AddToTree.Tree SimplifierCommonSubFactorCalculatorFx(AddToTree.Tree Dummy, ref bool CONTINUE, ref UknownIntegralSolver UIS)
        {
            if ((Dummy == null) || (!(IS.IsDivInNode(Dummy))))
            {
                return(Dummy);
            }
            //ERRORCORECTION2189743 :the Second condition of above is added.
            int INCREASE = 2147483647 / 9;

            UIS.SetProgressValue(UIS.progressBar9, 0);
            if (Dummy.SampleAccess == "/")
            {
                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);
                Dummy = Simplifier.SimplifierFxSimpler(Dummy, ref UIS);

                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);
                Dummy.LeftSideAccess = FactorActivation.FactorActivationFx(Dummy.LeftSideAccess, ref UIS);

                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);

                Dummy.RightSideAccess = FactorActivation.FactorActivationFx(Dummy.RightSideAccess, ref UIS);

                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);

                /* try
                 * {
                 *    Dummy.LeftSideAccess.ThreadAccess = Dummy;
                 *   Dummy.RightSideAccess.ThreadAccess = Dummy;
                 * }
                 * catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
                 */
                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);

                Dummy = Simplifier.SimplifierFxSimpler(Dummy, ref UIS);

                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);

                Dummy = NumberDivMul.NumberDivMulFx(Dummy, ref UIS);

                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);
                AddToTreeTreeLinkList COMMONFACTOR = FindSubFactor.FindSubFactorFx(Dummy.LeftSideAccess, Dummy.RightSideAccess);
                bool           ENDLEFT             = false;
                bool           ENDRIGHT            = false;
                AddToTree.Tree COMMONSUBFACORT     = new AddToTree.Tree(null, false);

                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);

                while (!((COMMONFACTOR.ISEmpty())) && ((ENDLEFT && ENDRIGHT)))
                {
                    CONTINUE        = true;
                    COMMONSUBFACORT = COMMONFACTOR.DELETEFromTreeFirstNode();
                    if (!ENDLEFT)
                    {
                        Dummy.LeftSideAccess = SimplifierCommonSubFactor.SimplifierCommonSubFactorActionLeftSideFx(Dummy.LeftSideAccess, COMMONSUBFACORT, ref ENDLEFT, FindSubFactor.FACTORLISTEDSAccess());
                    }
                    if (!ENDRIGHT)
                    {
                        Dummy.RightSideAccess = SimplifierCommonSubFactor.SimplifierCommonSubFactorActionRightSideFx(Dummy.RightSideAccess, COMMONSUBFACORT, ref ENDRIGHT, FindSubFactor.NotExpectedAccess());
                    }

                    Dummy = Simplifier.SimplifierFxSimpler(Dummy, ref UIS);
                }

                UIS.SetProgressValue(UIS.progressBar9, 2147483647);

                if (!((IS.IsDivInNode(Dummy.LeftSideAccess)) || (IS.IsDivInNode(Dummy.RightSideAccess))))
                {
                    return(Dummy);
                }
            }
            if (Dummy.LeftSideAccess != null)
            {
                Dummy.LeftSideAccess = SimplifierCommonSubFactor.SimplifierCommonSubFactorCalculatorFx(Dummy.LeftSideAccess, ref CONTINUE, ref UIS);
            }

            if (Dummy.RightSideAccess != null)
            {
                Dummy.RightSideAccess = SimplifierCommonSubFactor.SimplifierCommonSubFactorCalculatorFx(Dummy.RightSideAccess, ref CONTINUE, ref UIS);
            }
            return(Dummy);
        }
Ejemplo n.º 5
0
        static AddToTree.Tree BesidesAverageActionFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            int INCREASE = 2147483647 / 4;

            UIS.SetProgressValue(UIS.progressBar8, 0);
            if (IS.IsDiv(Dummy.SampleAccess))
            {
                if (IS.IsDiv(Dummy.LeftSideAccess.SampleAccess) && IS.IsDiv(Dummy.RightSideAccess.SampleAccess))
                {
                    AddToTree.Tree MUL = new AddToTree.Tree(null, false);
                    MUL = Dummy.CopyNewTree(Dummy.LeftSideAccess.RightSideAccess);

                    UIS.SetProgressValue(UIS.progressBar8, INCREASE + UIS.progressBar8.Value);

                    Dummy.LeftSideAccess.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess.LeftSideAccess), Dummy.CopyNewTree(Dummy.RightSideAccess.RightSideAccess));
                    Dummy.LeftSideAccess.SampleAccess = "*";
                    Dummy.LeftSideAccess.LeftSideAccess.ThreadAccess  = Dummy.LeftSideAccess;
                    Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;

                    UIS.SetProgressValue(UIS.progressBar8, INCREASE + UIS.progressBar8.Value);

                    Dummy.SampleAccess = "/";

                    Dummy.RightSideAccess.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.RightSideAccess.LeftSideAccess), MUL);
                    Dummy.RightSideAccess.SampleAccess = "*";
                    Dummy.RightSideAccess.LeftSideAccess.ThreadAccess  = Dummy.RightSideAccess;
                    Dummy.RightSideAccess.RightSideAccess.ThreadAccess = Dummy.RightSideAccess;

                    UIS.SetProgressValue(UIS.progressBar8, INCREASE + UIS.progressBar8.Value);
                }
                UIS.SetProgressValue(UIS.progressBar8, 2147483647);

/*                else
 *                  if (IS.IsDiv(Dummy.LeftSideAccess.SampleAccess))
 *                  {
 *                      AddToTree.Tree MUL = new AddToTree.Tree(null, false);
 *                      MUL = Dummy.CopyNewTree(Dummy.RightSideAccess);
 *                      Dummy.RightSideAccess = Dummy.LeftSideAccess.RightSideAccess;
 *                      Dummy.RightSideAccess.ThreadAccess = Dummy;
 *
 *                      Dummy.SampleAccess = "/";
 *
 *                      Dummy.LeftSideAccess.RightSideAccess = MUL;
 *                      Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;
 *                      Dummy.LeftSideAccess.SampleAccess = "*";
 *
 *
 *                  }
 *                  else
 *                      if (IS.IsDiv(Dummy.RightSideAccess.SampleAccess))
 *                      {
 *                          Dummy.SetLefTandRightCommonlySide(Dummy.RightSideAccess, Dummy.LeftSideAccess);
 *
 *                          AddToTree.Tree MUL = new AddToTree.Tree(null, false);
 *                          MUL = Dummy.CopyNewTree(Dummy.RightSideAccess);
 *                          Dummy.RightSideAccess = Dummy.LeftSideAccess.RightSideAccess;
 *                          Dummy.RightSideAccess.ThreadAccess = Dummy;
 *
 *                          Dummy.SampleAccess = "/";
 *
 *                          Dummy.LeftSideAccess.RightSideAccess = MUL;
 *                          Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;
 *                          Dummy.LeftSideAccess.SampleAccess = "*";
 *
 *
 *                      }
 */
            }
            Dummy.LeftSideAccess  = BesidesAverage.BesidesAverageActionFx(Dummy.LeftSideAccess, ref UIS);
            Dummy.RightSideAccess = BesidesAverage.BesidesAverageActionFx(Dummy.RightSideAccess, ref UIS);
            return(Dummy);
        }
Ejemplo n.º 6
0
        static AddToTree.Tree NumberDivMulFxAction(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            Dummy.LeftSideAccess  = NumberDivMul.NumberDivMulFxAction(Dummy.LeftSideAccess, ref UIS);
            Dummy.RightSideAccess = NumberDivMul.NumberDivMulFxAction(Dummy.RightSideAccess, ref UIS);
            int INCREASE = 2147483647 / 6;

            try
            {
                UIS.SetProgressValue(UIS.progressBar15, 0);

                if (IS.IsMul(Dummy.SampleAccess))
                {
                    if (IS.IsMul(Dummy.RightSideAccess.SampleAccess))
                    {
                        if (IS.IsNumber(Dummy.RightSideAccess.LeftSideAccess.SampleAccess))
                        {
                            if (Dummy.LeftSideAccess.SampleAccess.ToLower() == "c")
                            {
                                Dummy.RightSideAccess.RightSideAccess.ThreadAccess = Dummy;
                                Dummy.RightSideAccess = Dummy.RightSideAccess.RightSideAccess;
                            }
                        }
                    }
                }
                UIS.SetProgressValue(UIS.progressBar15, INCREASE + UIS.progressBar15.Value);
                if (IS.IsDiv(Dummy.SampleAccess))
                {
                    if (IS.IsMul(Dummy.LeftSideAccess.SampleAccess))
                    {
                        if (IS.IsNumber(Dummy.RightSideAccess.SampleAccess))
                        {
                            if (IS.IsNumber(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess))
                            {
                                //ERRORCORECTION981273 :The Error corrected.refer to page218.
                                float Num = (float)System.Convert.ToDouble(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess);
                                Num = Num / (float)System.Convert.ToDouble(Dummy.RightSideAccess.SampleAccess);
                                Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                Dummy.LeftSideAccess.ThreadAccess = Dummy.ThreadAccess;
                                Dummy = Dummy.LeftSideAccess;
                            }
                        }
                    }
                }
                UIS.SetProgressValue(UIS.progressBar15, INCREASE + UIS.progressBar15.Value);
                if (IS.IsMul(Dummy.SampleAccess))
                {
                    if (IS.IsMul(Dummy.RightSideAccess.SampleAccess))
                    {
                        if (IS.IsNumber(Dummy.LeftSideAccess.SampleAccess))
                        {
                            if (IS.IsNumber(Dummy.RightSideAccess.LeftSideAccess.SampleAccess))
                            {
                                //ERRORCORECTION981273 :The Error corrected.refer to page218.
                                if (Dummy.LeftSideAccess.SampleAccess.ToLower() != "c")
                                {
                                    if (Dummy.RightSideAccess.SampleAccess.ToLower() != "c")
                                    {
                                        float Num = (float)System.Convert.ToDouble(Dummy.LeftSideAccess.SampleAccess);
                                        Num = Num * (float)System.Convert.ToDouble(Dummy.RightSideAccess.LeftSideAccess.SampleAccess);
                                        Dummy.LeftSideAccess.SampleAccess = Num.ToString();
                                        Dummy.RightSideAccess.RightSideAccess.ThreadAccess = Dummy.RightSideAccess.ThreadAccess;
                                        Dummy.RightSideAccess = Dummy.RightSideAccess.RightSideAccess;
                                    }
                                    else
                                    {
                                        Dummy.LeftSideAccess.SampleAccess = "C";
                                    }
                                }
                            }
                        }
                    }
                }
                UIS.SetProgressValue(UIS.progressBar15, INCREASE + UIS.progressBar15.Value);
                if (IS.IsDiv(Dummy.SampleAccess))
                {
                    if (IS.IsMul(Dummy.LeftSideAccess.SampleAccess))
                    {
                        if (IS.IsNumber(Dummy.RightSideAccess.SampleAccess))
                        {
                            if (IS.IsNumber(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess))
                            {
                                //ERRORCORECTION981273 :The Error corrected.refer to page218.
                                float Num = (float)System.Convert.ToDouble(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess);
                                Num = Num / (float)System.Convert.ToDouble(Dummy.RightSideAccess.SampleAccess);
                                Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                Dummy = Dummy.LeftSideAccess;
                            }
                        }
                    }
                }
                UIS.SetProgressValue(UIS.progressBar15, INCREASE + UIS.progressBar15.Value);
                //ADDCONDITION18979714 :Refer to page 248.
                if (Dummy.SampleAccess == "/")
                {
                    if (Dummy.LeftSideAccess.SampleAccess == "*")
                    {
                        if (Dummy.RightSideAccess.SampleAccess == "*")
                        {
                            if (IS.IsNumber(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess))
                            {
                                if (IS.IsNumber(Dummy.RightSideAccess.LeftSideAccess.SampleAccess))
                                {
                                    if ((Dummy.RightSideAccess.LeftSideAccess.SampleAccess.ToLower() != "c") && ((Dummy.LeftSideAccess.LeftSideAccess.SampleAccess.ToLower() != "c")))
                                    {
                                        float Num = (float)System.Convert.ToDouble(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess);
                                        Num = Num / (float)System.Convert.ToDouble(Dummy.RightSideAccess.LeftSideAccess.SampleAccess);
                                        Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                    }
                                    else
                                    {
                                        Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = "C";
                                    }
                                    Dummy.RightSideAccess.RightSideAccess.ThreadAccess = Dummy;
                                    Dummy.RightSideAccess = Dummy.RightSideAccess.RightSideAccess;
                                }
                            }
                        }
                    }
                }
                UIS.SetProgressValue(UIS.progressBar15, INCREASE + UIS.progressBar15.Value);
                if (Dummy.SampleAccess == "*")
                {
                    if (Dummy.LeftSideAccess.SampleAccess == "*")
                    {
                        if (Dummy.RightSideAccess.SampleAccess == "*")
                        {
                            if (IS.IsNumber(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess))
                            {
                                if (IS.IsNumber(Dummy.RightSideAccess.LeftSideAccess.SampleAccess))
                                {
                                    if ((Dummy.RightSideAccess.LeftSideAccess.SampleAccess.ToLower() != "c") && ((Dummy.LeftSideAccess.LeftSideAccess.SampleAccess.ToLower() != "c")))
                                    {
                                        float Num = (float)System.Convert.ToDouble(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess);
                                        Num = Num * (float)System.Convert.ToDouble(Dummy.RightSideAccess.LeftSideAccess.SampleAccess);
                                        Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                    }
                                    else
                                    {
                                        Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = "C";
                                    }
                                    Dummy.RightSideAccess.RightSideAccess.ThreadAccess = Dummy;
                                    Dummy.RightSideAccess = Dummy.RightSideAccess.RightSideAccess;
                                }
                            }
                        }
                    }
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }
            UIS.SetProgressValue(UIS.progressBar15, 2147483647);
            return(Dummy);
        }
        static AddToTree.Tree CommonFactorSimlificationActionFx(AddToTree.Tree Dummy, ref bool CONTINUE, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            Dummy.LeftSideAccess  = CommonFactorSimlification.CommonFactorSimlificationActionFx(Dummy.LeftSideAccess, ref CONTINUE, ref UIS);
            Dummy.RightSideAccess = CommonFactorSimlification.CommonFactorSimlificationActionFx(Dummy.RightSideAccess, ref CONTINUE, ref UIS);
            //Dummy = CommonFactorSimlification.CommonFactorSuitable(Dummy,ref CONTINUE);
            int INCREASE = 2147483647 / 20;

            UIS.SetProgressValue(UIS.progressBar7, 0);
            if (IS.IsMinuseOrPluse(Dummy.CopyNewTree(Dummy).SampleAccess))
            {
                if (IS.IsDiv(Dummy.LeftSideAccess.SampleAccess) && (IS.IsDiv(Dummy.RightSideAccess.SampleAccess)))
                {
                    UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                    AddToTree.Tree COMMONFACTOR = CommonFactor.CommonFactorFx(Dummy.LeftSideAccess.RightSideAccess, Dummy.RightSideAccess.RightSideAccess);
                    AddToTree.Tree COMMONFACTORSIMPLIFICATIONONE   = new AddToTree.Tree(null, false);
                    AddToTree.Tree COMMONFACTORSIMPLIFICATIONTOW   = new AddToTree.Tree(null, false);
                    AddToTree.Tree COMMONFACTORSIMPLIFICATIONTHREE = new AddToTree.Tree(null, false);
                    AddToTree.Tree COMMONFACTORSIMPLIFICATIONFOUR  = new AddToTree.Tree(null, false);
                    AddToTree.Tree COMMONFACTORSIMPLIFICATION      = new AddToTree.Tree(null, false);

                    /*COMMONFACTORSIMPLIFICATIONONE.SetLefTandRightCommonlySide(COMMONFACTOR.CopyNewTree(COMMONFACTOR),Dummy.CopyNewTree(Dummy.LeftSideAccess.RightSideAccess));
                     * COMMONFACTORSIMPLIFICATIONONE.LeftSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONONE;
                     * COMMONFACTORSIMPLIFICATIONONE.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONONE;
                     * COMMONFACTORSIMPLIFICATIONONE.SampleAccess = "/";
                     */
                    COMMONFACTORSIMPLIFICATIONONE = Dummy.CopyNewTree(Dummy.RightSideAccess.RightSideAccess);

                    UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                    COMMONFACTORSIMPLIFICATIONTOW.SetLefTandRightCommonlySide(COMMONFACTORSIMPLIFICATIONONE, Dummy.CopyNewTree(Dummy.LeftSideAccess.LeftSideAccess));
                    COMMONFACTORSIMPLIFICATIONTOW.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATIONTOW;
                    COMMONFACTORSIMPLIFICATIONTOW.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONTOW;
                    COMMONFACTORSIMPLIFICATIONTOW.SampleAccess = "*";

                    /*COMMONFACTORSIMPLIFICATIONTHREE.SetLefTandRightCommonlySide(COMMONFACTOR.CopyNewTree(COMMONFACTOR), Dummy.CopyNewTree(Dummy.RightSideAccess.RightSideAccess));
                     * COMMONFACTORSIMPLIFICATIONTHREE.LeftSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONTHREE;
                     * COMMONFACTORSIMPLIFICATIONTHREE.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONTHREE;
                     * COMMONFACTORSIMPLIFICATIONTHREE.SampleAccess = "/";
                     */
                    //ERRORCORECTION30704050  :Refer to page 302.
                    COMMONFACTORSIMPLIFICATIONTHREE = Dummy.CopyNewTree(Dummy.LeftSideAccess.RightSideAccess);

                    UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                    COMMONFACTORSIMPLIFICATIONFOUR.SetLefTandRightCommonlySide(COMMONFACTORSIMPLIFICATIONTHREE, Dummy.CopyNewTree(Dummy.RightSideAccess.LeftSideAccess));
                    COMMONFACTORSIMPLIFICATIONFOUR.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATIONFOUR;
                    COMMONFACTORSIMPLIFICATIONFOUR.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONFOUR;
                    COMMONFACTORSIMPLIFICATIONFOUR.SampleAccess = "*";

                    UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                    COMMONFACTORSIMPLIFICATION.SetLefTandRightCommonlySide(COMMONFACTORSIMPLIFICATIONTOW, COMMONFACTORSIMPLIFICATIONFOUR);
                    COMMONFACTORSIMPLIFICATION.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATION;
                    COMMONFACTORSIMPLIFICATION.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATION;
                    COMMONFACTORSIMPLIFICATION.SampleAccess = Dummy.SampleAccess;

                    UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                    COMMONFACTORSIMPLIFICATION.SetLefTandRightCommonlySide(COMMONFACTORSIMPLIFICATION.CopyNewTree(COMMONFACTORSIMPLIFICATION), COMMONFACTOR.CopyNewTree(COMMONFACTOR));
                    COMMONFACTORSIMPLIFICATION.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATION;
                    COMMONFACTORSIMPLIFICATION.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATION;
                    COMMONFACTORSIMPLIFICATION.SampleAccess = "/";

                    UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                    COMMONFACTORSIMPLIFICATION.ThreadAccess = Dummy.ThreadAccess;
                    //ERROCOCRECTIOn8912739879874 :The thread must be refernces to befor node.
                    Dummy    = COMMONFACTORSIMPLIFICATION;
                    CONTINUE = true;
                }
                else
                {
                    UIS.SetProgressValue(UIS.progressBar7, 2147483647 / 3);
                    if (IS.IsDiv(Dummy.LeftSideAccess.SampleAccess))
                    {
                        UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                        AddToTree.Tree COMMONFACTORSIMPLIFICATIONONE = new AddToTree.Tree(null, false);
                        AddToTree.Tree COMMONFACTORSIMPLIFICATIONTOW = new AddToTree.Tree(null, false);
                        AddToTree.Tree COMMONFACTORSIMPLIFICATION    = new AddToTree.Tree(null, false);

                        COMMONFACTORSIMPLIFICATIONONE.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess.RightSideAccess), Dummy.CopyNewTree(Dummy.RightSideAccess));
                        COMMONFACTORSIMPLIFICATIONONE.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATIONONE;
                        COMMONFACTORSIMPLIFICATIONONE.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONONE;
                        COMMONFACTORSIMPLIFICATIONONE.SampleAccess = "*";

                        UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                        COMMONFACTORSIMPLIFICATIONTOW.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess.LeftSideAccess), COMMONFACTORSIMPLIFICATIONONE.CopyNewTree(COMMONFACTORSIMPLIFICATIONONE));
                        COMMONFACTORSIMPLIFICATIONTOW.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATIONTOW;
                        COMMONFACTORSIMPLIFICATIONTOW.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONTOW;
                        COMMONFACTORSIMPLIFICATIONTOW.SampleAccess = Dummy.SampleAccess;

                        UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                        COMMONFACTORSIMPLIFICATION.SetLefTandRightCommonlySide(COMMONFACTORSIMPLIFICATIONTOW, Dummy.CopyNewTree(Dummy.LeftSideAccess.RightSideAccess));
                        COMMONFACTORSIMPLIFICATION.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATION;
                        COMMONFACTORSIMPLIFICATION.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATION;
                        COMMONFACTORSIMPLIFICATION.SampleAccess = "/";

                        COMMONFACTORSIMPLIFICATION.ThreadAccess = Dummy.ThreadAccess;
                        //ERROCOCRECTIOn8912739879874 :The thread must be refernces to befor node.
                        Dummy    = COMMONFACTORSIMPLIFICATION;
                        CONTINUE = true;

                        UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);
                    }
                    else
                    {
                        UIS.SetProgressValue(UIS.progressBar7, (2147483647 / 3) * 2);
                        if (IS.IsDiv(Dummy.RightSideAccess.SampleAccess))
                        {
                            UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                            AddToTree.Tree COMMONFACTORSIMPLIFICATIONONE = new AddToTree.Tree(null, false);
                            AddToTree.Tree COMMONFACTORSIMPLIFICATIONTOW = new AddToTree.Tree(null, false);
                            AddToTree.Tree COMMONFACTORSIMPLIFICATION    = new AddToTree.Tree(null, false);

                            UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                            COMMONFACTORSIMPLIFICATIONONE.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.RightSideAccess.RightSideAccess), Dummy.CopyNewTree(Dummy.LeftSideAccess));
                            COMMONFACTORSIMPLIFICATIONONE.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATIONONE;
                            COMMONFACTORSIMPLIFICATIONONE.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONONE;
                            COMMONFACTORSIMPLIFICATIONONE.SampleAccess = "*";

                            UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                            COMMONFACTORSIMPLIFICATIONTOW.SetLefTandRightCommonlySide(COMMONFACTORSIMPLIFICATIONONE.CopyNewTree(COMMONFACTORSIMPLIFICATIONONE), Dummy.CopyNewTree(Dummy.RightSideAccess.LeftSideAccess));
                            COMMONFACTORSIMPLIFICATIONTOW.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATIONTOW;
                            COMMONFACTORSIMPLIFICATIONTOW.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONTOW;
                            COMMONFACTORSIMPLIFICATIONTOW.SampleAccess = Dummy.SampleAccess;

                            UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                            COMMONFACTORSIMPLIFICATION.SetLefTandRightCommonlySide(COMMONFACTORSIMPLIFICATIONTOW, Dummy.CopyNewTree(Dummy.RightSideAccess.RightSideAccess));
                            COMMONFACTORSIMPLIFICATION.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATION;
                            COMMONFACTORSIMPLIFICATION.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATION;
                            COMMONFACTORSIMPLIFICATION.SampleAccess = "/";
                            //ERROCOCRECTIOn8912739879874 :The thread must be refernces to befor node.

                            UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                            COMMONFACTORSIMPLIFICATION.ThreadAccess = Dummy.ThreadAccess;

                            Dummy    = COMMONFACTORSIMPLIFICATION;
                            CONTINUE = true;

                            UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);
                        }
                    }
                }
            }
            UIS.SetProgressValue(UIS.progressBar7, 2147483647);


            return(Dummy);
        }
Ejemplo n.º 8
0
        static AddToTree.Tree MulDivisionSorterFxAction(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS, ref bool CONTINUE)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            AddToTree.Tree Holder = Dummy;
            Dummy.LeftSideAccess = MulDivisionSorter.MulDivisionSorterFxAction(Dummy.LeftSideAccess, ref UIS, ref CONTINUE);
            try
            {
                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.LeftSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.LeftSideAccess;
                }
                else
                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.RightSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.RightSideAccess;
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }
            Dummy.RightSideAccess = MulDivisionSorter.MulDivisionSorterFxAction(Dummy.RightSideAccess, ref UIS, ref CONTINUE);
            try
            {
                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.LeftSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.LeftSideAccess;
                }
                else
                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.RightSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.RightSideAccess;
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }
            int INCREASE = 2147483647 / 12;

            UIS.SetProgressValue(UIS.progressBar13, 0);

            AddToTree.Tree Current = new AddToTree.Tree(null, false);

            bool BREAK = false;

            UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);
            while ((Dummy != null) && (Dummy.RightSideAccess != null))
            {
                AddToTree.Tree HolderCurrent = Dummy;
                if (MULATED.FINDTreeWithThreadConsideration(Dummy))
                {
                    break;
                }
                if (IS.IsFunction(Dummy.SampleAccess))
                {
                    break;
                }
                Current = Dummy.RightSideAccess;
                if (!IS.IsDiv(Current.SampleAccess))
                {
                    break;
                }
                if (IS.IsOperator(Dummy.SampleAccess) && (!((Dummy.SampleAccess == "*") || (Dummy.SampleAccess == "/"))))
                {
                    BREAK = true;
                }

                UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);

                if (!BREAK)
                {
                    while ((Current != null) && (Current.RightSideAccess != null))
                    {
                        if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Current))
                        {
                            break;
                        }
                        if (IS.IsFunction(Current.SampleAccess))
                        {
                            break;
                        }
                        //ERRORCORECTION1982748234 :Refer to page 249.
                        if (!((Dummy.SampleAccess == "*") && (Current.SampleAccess == "/")))
                        {
                            break;
                        }
                        if (MULATED.FINDTreeWithThreadConsideration(Current))
                        {
                            break;
                        }
                        if (MULATED.FINDTreeWithThreadConsideration(Dummy))
                        {
                            break;
                        }
                        if (IS.IsOperator(Dummy.SampleAccess) && (!((Dummy.SampleAccess == "*") || (Dummy.SampleAccess == "/"))))
                        {
                            BREAK = true;//LOCATION98174723742 :Rfer to page 249.
                        }
                        //ERROR1892386124 :The Same node of Current and Dummy node.refer to page 238.
                        if (!BREAK)//ERRORCORECTION897123 :The ERROR31704152 corrected.
                        {
                            if ((Current.SampleAccess == "/") && (Dummy.SampleAccess == "*"))
                            {
                                UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);

                                if (Dummy.FINDTreeWithThreadConsideration(Current, Dummy) != null)
                                {
                                    break;
                                }
                                CONTINUE = true;
                                AddToTree.Tree LOCAL = Dummy;
                                //ERROR1928749712 :The *** Mraked edited.refer to page 256.
                                AddToTree.Tree MUL = new AddToTree.Tree("*", false);
                                MUL.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess), Current.CopyNewTree(Current.LeftSideAccess));

                                MUL.ThreadAccess = null;

                                MUL.LeftSideAccess.ThreadAccess  = MUL;
                                MUL.RightSideAccess.ThreadAccess = MUL;

                                UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);

                                AddToTree.Tree Contained = Dummy;

                                while (!(EqualToObject.IsEqualWithThreadConsiderationCommonly(Current, Dummy)))
                                {
                                    Dummy = Dummy.RightSideAccess;
                                }
                                //====

                                //LOCATION30415071.refer to page 256.
                                //ERRORCORECTION9318279 :The invalid leftside assignment.refer to page 218.
                                Dummy = Dummy.ThreadAccess;
                                //ERROR92834876 :The Division node is located at left side of Mul and in othere is located at right side.refer to page 336.

                                /*Dummy.RightSideAccess.LeftSideAccess = MUL;
                                 * Dummy.RightSideAccess.LeftSideAccess.ThreadAccess = Dummy.RightSideAccess;
                                 * Dummy.RightSideAccess.LeftSideAccess.LeftSideAccess.ThreadAccess = Dummy.RightSideAccess.LeftSideAccess;
                                 * Dummy.RightSideAccess.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.RightSideAccess.LeftSideAccess;
                                 */
                                //ERRORCORECTION19208734 :The Above Error.(ERROR92834876)refer to page 336.
                                Dummy.RightSideAccess.LeftSideAccess = MUL;
                                Dummy.RightSideAccess.LeftSideAccess.ThreadAccess = Dummy.RightSideAccess;
                                Dummy.RightSideAccess.LeftSideAccess.LeftSideAccess.ThreadAccess  = Dummy.RightSideAccess.LeftSideAccess;
                                Dummy.RightSideAccess.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.RightSideAccess.LeftSideAccess;

                                UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);



                                //while ((Dummy.ThreadAccess != null) && (!(EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy,LOCAL))))
                                //  Dummy = Dummy.ThreadAccess;

                                //LOCATION30415071.refer to page 256.
                                //ERRORCORECTION9318279 :The invalid leftside assignment.refer to page 218.
                                if (Dummy.ThreadAccess != null)
                                {
                                    //Dummy = Dummy.ThreadAccess;
                                    //Dummy.RightSideAccess = Dummy.LeftSideAccess.LeftSideAccess;
                                    //ERRORCUASED817263 :Refer to page 244.
                                    //Dummy.ThreadAccess = A;
                                    //Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                    Dummy.RightSideAccess.ThreadAccess = Dummy.ThreadAccess;
                                    Dummy = Dummy.RightSideAccess;
                                }
                                else
                                {
                                    Dummy = Dummy.RightSideAccess;
                                    Dummy.ThreadAccess = null;
                                }
                                UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);

                                MULATED.ADDToTree(Dummy);
                                MULATED.ADDToTree(Current);
                                //Holder = Dummy;
                                //        while ((Dummy != null) && (!EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy,LOCAL)))
                                //          Dummy = Dummy.RightSideAccess;
                                break;
                            }
                        }
                        Current = Current.RightSideAccess;
                    }
                }
                if (BREAK)
                {
                    break;
                }
                if (!CONTINUE)
                {
                    if (Dummy.RightSideAccess != null)
                    {
                        Dummy = Dummy.RightSideAccess;
                    }
                }
                else
                {
                    break;
                }
                //               if (Dummy.RightSideAccess != null)
                //             Current = Dummy.RightSideAccess;
            }

            UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);

            //while ((Dummy.ThreadAccess != null) && (!EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Holder)))
            //       Dummy = Dummy.ThreadAccess;


            Current = Dummy.LeftSideAccess;

            while ((Dummy != null) && (Dummy.LeftSideAccess != null))
            {
                if (MULATED.FINDTreeWithThreadConsideration(Dummy))
                {
                    break;
                }
                if (IS.IsFunction(Dummy.SampleAccess))
                {
                    break;
                }
                Current = Dummy.LeftSideAccess;
                if (!IS.IsDiv(Current.SampleAccess))
                {
                    break;
                }
                AddToTree.Tree HolderCurrent = Dummy;
                if (IS.IsOperator(Dummy.SampleAccess) && (!((Dummy.SampleAccess == "*") || (Dummy.SampleAccess == "/"))))
                {
                    BREAK = true;
                }
                if (!BREAK)
                {
                    while ((Current != null) && (Current.LeftSideAccess != null))
                    {
                        if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Current))
                        {
                            break;
                        }
                        if (MULATED.FINDTreeWithThreadConsideration(Current))
                        {
                            break;
                        }
                        //ERRORCORECTINO1782647 :On four Section of while added thwe non function condition.refre to page 226.
                        if (IS.IsFunction(Current.SampleAccess))
                        {
                            break;
                        }
                        if (MULATED.FINDTreeWithThreadConsideration(Dummy))
                        {
                            break;
                        }
                        if (IS.IsOperator(Dummy.SampleAccess) && (!((Dummy.SampleAccess == "*") || (Dummy.SampleAccess == "/"))))
                        {
                            BREAK = true;
                        }
                        //ERRORCORECTION1982748234 :Refer to page 249.
                        if (!((Dummy.SampleAccess == "*") && (Current.SampleAccess == "/")))
                        {
                            break;  //LOCATION98174723741 :Refer to page 249
                        }
                        if (!BREAK) //ERRORCORECTION897123 :The ERROR31704152 corrected.
                        {
                            if ((Current.SampleAccess == "/") && (Dummy.SampleAccess == "*"))
                            {
                                UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);

                                if (Dummy.FINDTreeWithThreadConsideration(Current, Dummy) != null)
                                {
                                    break;
                                }
                                CONTINUE = true;
                                AddToTree.Tree LOCAL = Dummy;
                                AddToTree.Tree MUL   = new AddToTree.Tree("*", false);
                                MUL.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.RightSideAccess), Current.CopyNewTree(Current.LeftSideAccess));

                                MUL.ThreadAccess = null;

                                UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);

                                MUL.LeftSideAccess.ThreadAccess  = MUL;
                                MUL.RightSideAccess.ThreadAccess = MUL;

                                AddToTree.Tree Contained = Dummy;

                                while (!(EqualToObject.IsEqualWithThreadConsiderationCommonly(Current, Dummy)))
                                {
                                    Dummy = Dummy.LeftSideAccess;
                                }
                                //ERRRORCORECTION1297192 :Replacement mul on non-proper location.reer to page 218.

                                //Dummy = Dummy.LeftSideAccess;

                                //                        Dummy.LeftSideAccess = MUL;
                                //                      Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                //                    Dummy.LeftSideAccess.LeftSideAccess.ThreadAccess = Dummy.LeftSideAccess;
                                //                  Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;
                                Dummy = Dummy.ThreadAccess;
                                //ERROR92834876 :The Division node is located at left side of Mul and in othere is located at right side.refer to page 336.

                                /*Dummy.RightSideAccess.LeftSideAccess = MUL;
                                 * Dummy.RightSideAccess.LeftSideAccess.ThreadAccess = Dummy.RightSideAccess;
                                 * Dummy.RightSideAccess.LeftSideAccess.LeftSideAccess.ThreadAccess = Dummy.RightSideAccess.LeftSideAccess;
                                 * Dummy.RightSideAccess.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.RightSideAccess.LeftSideAccess;
                                 */
                                //ERRORCORECTION19208734 :The Above Error.(ERROR92834876)refer to page 336.
                                Dummy.LeftSideAccess.LeftSideAccess = MUL;
                                Dummy.LeftSideAccess.LeftSideAccess.ThreadAccess = Dummy.RightSideAccess;
                                Dummy.LeftSideAccess.LeftSideAccess.LeftSideAccess.ThreadAccess  = Dummy.LeftSideAccess.LeftSideAccess;
                                Dummy.LeftSideAccess.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess.LeftSideAccess;

                                UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);



                                //while ((Dummy.ThreadAccess != null) && (!(EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy,LOCAL))))
                                //  Dummy = Dummy.ThreadAccess;

                                //LOCATION30415071.refer to page 256.
                                //ERRORCORECTION9318279 :The invalid leftside assignment.refer to page 218.
                                if (Dummy.ThreadAccess != null)
                                {
                                    //Dummy = Dummy.ThreadAccess;
                                    //Dummy.RightSideAccess = Dummy.LeftSideAccess.LeftSideAccess;
                                    //ERRORCUASED817263 :Refer to page 244.
                                    //Dummy.ThreadAccess = A;
                                    //Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                    Dummy.LeftSideAccess.ThreadAccess = Dummy.ThreadAccess;
                                    Dummy = Dummy.LeftSideAccess;
                                }
                                else
                                {
                                    Dummy = Dummy.LeftSideAccess;
                                    Dummy.ThreadAccess = null;
                                }
                                UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);

                                MULATED.ADDToTree(Dummy);
                                MULATED.ADDToTree(Current);
                                //Holder = Dummy;
                                //while (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy,Contained))
                                //  Dummy = Dummy.ThreadAccess;
                                break;
                            }
                        }
                        Current = Current.LeftSideAccess;
                    }
                }
                if (BREAK)
                {
                    break;
                }
                if (!CONTINUE)
                {
                    if (Dummy.LeftSideAccess != null)
                    {
                        Dummy = Dummy.LeftSideAccess;
                    }
                }
                else
                {
                    break;
                }
                //
                //if (Dummy.LeftSideAccess != null)
                //  Current = Dummy.LeftSideAccess;
            }
            //while ((Dummy.ThreadAccess != null) && (!EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Holder)))
            //  Dummy = Dummy.ThreadAccess;
            //ERROCORECTION198274896 :The Thread become null and the extra mulated nodes dose not removed.refer to page 336.
            try
            {
                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.LeftSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.LeftSideAccess;
                }
                else
                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.RightSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.RightSideAccess;
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }
            UIS.SetProgressValue(UIS.progressBar13, 2147483647);
            return(Dummy);
        }
Ejemplo n.º 9
0
        static AddToTree.Tree SpliterCalculator(AddToTree.Tree Dummy, ref bool Again, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            Dummy.LeftSideAccess = Spliter.SpliterCalculator(Dummy.LeftSideAccess, ref Again, ref UIS);
            try
            {
                if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.LeftSideAccess;
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }
            Dummy.RightSideAccess = Spliter.SpliterCalculator(Dummy.RightSideAccess, ref Again, ref UIS);
            try
            {
                if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.LeftSideAccess;
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }

            //ERROR091409214 :The some needed spliation dose not acts.
            //if (Dummy.SampleAccess == "/")
            //ERRORCORECTION98242184 :Corrected as below.
            int INCREASE = 2147483647 / 4;

            UIS.SetProgressValue(UIS.progressBar11, 0);
            try
            {
                if (Dummy.SampleAccess == "/")
                {
                    if (((Dummy.LeftSideAccess.SampleAccess == "+") || (Dummy.LeftSideAccess.SampleAccess == "-")) && (AllowToMulMinusePluse.AllowToMulMinusePluseFx(Dummy, ref UIS)) && (Dummy.SplitableAccess))
                    {
                        UIS.SetProgressValue(UIS.progressBar11, INCREASE + UIS.progressBar11.Value);
                        Again = true;
                        AddToTree.Tree Div1 = Dummy.CopyNewTree(Dummy.RightSideAccess);
                        AddToTree.Tree Div2 = Dummy.CopyNewTree(Dummy.RightSideAccess);

                        UIS.SetProgressValue(UIS.progressBar11, INCREASE + UIS.progressBar11.Value);

                        //Dummy = Dummy.LeftSideAccess;

                        AddToTree.Tree DummyLeft = new AddToTree.Tree("/", false);

                        DummyLeft.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess.LeftSideAccess), Div1);
                        DummyLeft.LeftSideAccess.ThreadAccess  = DummyLeft;
                        DummyLeft.RightSideAccess.ThreadAccess = DummyLeft;

                        UIS.SetProgressValue(UIS.progressBar11, INCREASE + UIS.progressBar11.Value);

                        Dummy.LeftSideAccess.LeftSideAccess = DummyLeft;
                        Dummy.LeftSideAccess.LeftSideAccess.ThreadAccess = Dummy.LeftSideAccess;

                        AddToTree.Tree DummyRight = new AddToTree.Tree("/", false);
                        //ERROR37492387 :Refe to page 261.
                        DummyRight.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess.RightSideAccess), Div2);
                        DummyRight.LeftSideAccess.ThreadAccess  = DummyRight;
                        DummyRight.RightSideAccess.ThreadAccess = DummyRight;

                        UIS.SetProgressValue(UIS.progressBar11, INCREASE + UIS.progressBar11.Value);

                        Dummy.LeftSideAccess.RightSideAccess = DummyRight;
                        Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;


                        Dummy.LeftSideAccess.ThreadAccess = Dummy.ThreadAccess;
                        Dummy = Dummy.LeftSideAccess;
                        UIS.SetProgressValue(UIS.progressBar11, 2147483647);
                    }
                    //  :The error is at here.refre to page 287.
                    //ADDDED73562150 :The added is here :Refer to page 331.

                    /*if ((Dummy.RightSideAccess.SampleAccess == "+") || (Dummy.RightSideAccess.SampleAccess == "-"))
                     * {
                     *  Again = true;
                     *  AddToTree.Tree Div1 = Dummy.CopyNewTree(Dummy.LeftSideAccess);
                     *  AddToTree.Tree Div2 = Dummy.CopyNewTree(Dummy.LeftSideAccess);
                     *
                     *  Dummy = Dummy.RightSideAccess;
                     *
                     *  AddToTree.Tree DummyRight=new AddToTree.Tree("/",false);
                     *
                     *  DummyRight.SetLefTandRightCommonlySide(Div1,Dummy.CopyNewTree(Dummy.RightSideAccess));
                     *  DummyRight.LeftSideAccess.ThreadAccess = DummyRight;
                     *  DummyRight.RightSideAccess.ThreadAccess = DummyRight;
                     *
                     *  DummyRight.RightSideAccess=DummyRight;
                     *  Dummy.RightSideAccess.ThreadAccess=Dummy;
                     *
                     *  AddToTree.Tree DummyLeft=new AddToTree.Tree("/",false);
                     *
                     *  DummyLeft.SetLefTandRightCommonlySide(Div2, Dummy.CopyNewTree(Dummy.RightSideAccess));
                     *  DummyLeft.LeftSideAccess.ThreadAccess = DummyLeft;
                     *  DummyLeft.RightSideAccess.ThreadAccess = DummyLeft;
                     *
                     *  DummyLeft.RightSideAccess=DummyLeft;
                     *  Dummy.LeftSideAccess.ThreadAccess=Dummy;
                     *
                     *  Dummy=Dummy.ThreadAccess;
                     *
                     *  Dummy.RightSideAccess.ThreadAccess=Dummy.ThreadAccess;
                     *  Dummy=Dummy.RightSideAccess;
                     *
                     * }
                     */
                    /*if (IS.IsOperator(Dummy.SampleAccess))
                     *  if (!IS.IsPower(Dummy.SampleAccess))
                     *      if (!IS.IsFunction(Dummy.SampleAccess))
                     *      {
                     *          AddToTree.Tree Div= Spliter.TheRightSideOperandOfDivision(Dummy)
                     *          if (!SPLITED.FINDTreeWithThreadConsideration(Dummy.LeftSideAccess))
                     *          {
                     *              Dummy.LeftSideAccess = Spliter.DivisionSpliter(Dummy.LeftSideAccess,Div, 0);
                     *              Dummy.LeftSideAccess.LeftSideAccess.ThreadAccess = Dummy.LeftSideAccess;
                     *              Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;
                     *          }
                     *          if (!SPLITED.FINDTreeWithThreadConsideration(Dummy.RightSideAccess))
                     *          {
                     *              Dummy.RightSideAccess = Spliter.DivisionSpliter(Dummy.RightSideAccess,Div, 0);
                     *              Dummy.RightSideAccess.LeftSideAccess.ThreadAccess = Dummy.RightSideAccess;
                     *              Dummy.RightSideAccess.RightSideAccess.ThreadAccess = Dummy.RightSideAccess;
                     *          }
                     *
                     *          SPLITED.ADDToTree(Dummy);
                     *          //Dummy.LeftSideAccess.ThreadAccess = Dummy;
                     *          //if (Dummy.ThreadAccess == null)
                     *          //  Dummy.LeftSideAccess.ThreadAccess = null;
                     *          //Dummy = Dummy.LeftSideAccess;
                     *
                     *
                     *      }
                     */
                }
                else
                {       //ERRORCORECTION981278 :Correction of ERRORCAUSE713040 .refer to page 182.
                        //ERROR30405031v :Refer to page 207.

                    /*if (!SPLITED.ISEmpty())
                     * {
                     *  if (Dummy.ThreadAccess == null)
                     *      Dummy.LeftSideAccess.ThreadAccess = null;
                     *  Dummy = Dummy.LeftSideAccess;
                     * }
                     */
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }

            /*
             *  if (Again)
             *  {
             *      Again = false;
             *      Spliter.SpliterCalculator(Dummy);
             *
             *  }*/
            return(Dummy);
        }
Ejemplo n.º 10
0
        static AddToTree.Tree AddingSameUnderElementsActionReciverFx(AddToTree.Tree Node, AddToTree.Tree Dummy, AddToTree.Tree DummySender, ref bool CllingRightTrueLeftFalse, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            try
            {
                if ((IS.IsPluSinNode(Dummy)))
                {
                    CllingRightTrueLeftFalse = false;
                    Dummy.LeftSideAccess     = AddingSameUnderElements.AddingSameUnderElementsActionReciverFx(Node, Dummy.LeftSideAccess, DummySender, ref CllingRightTrueLeftFalse, ref UIS);
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            try
            {
                if ((IS.IsPluSinNode(Dummy)))
                {
                    CllingRightTrueLeftFalse = true;
                    Dummy.RightSideAccess    = AddingSameUnderElements.AddingSameUnderElementsActionReciverFx(Node, Dummy.RightSideAccess, DummySender, ref CllingRightTrueLeftFalse, ref UIS);
                }
            }                        catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }

            bool CurrentSimplification = false;

            AddToTree.Tree Befor    = Dummy.CopyNewTree(Dummy);
            int            INCREASE = 2147483647 / 3;

            try
            {
                UIS.SetProgressValue(UIS.progressBar16, 0);

                if (((Dummy.ThreadAccess == null) || (Dummy.ThreadAccess.SampleAccess == "+")) && (((Dummy.SampleAccess == "/"))) && ((EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.RightSideAccess, DummySender.RightSideAccess))) && ((!(EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, DummySender)))))
                {
                    AddToTree.Tree ADD = new AddToTree.Tree("+", false);
                    AddToTree.Tree Div = new AddToTree.Tree("/", false);
                    ADD.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess), DummySender.CopyNewTree(DummySender.LeftSideAccess));
                    ADD.LeftSideAccess.ThreadAccess  = ADD;
                    ADD.RightSideAccess.ThreadAccess = ADD;
                    Div.SetLefTandRightCommonlySide(ADD, Dummy.CopyNewTree(Dummy.RightSideAccess));
                    if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.RightSideAccess, Dummy))
                    {
                        Dummy                 = Dummy.ThreadAccess;
                        Div.ThreadAccess      = Dummy;
                        Dummy.RightSideAccess = Div;
                    }
                    else
                    if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.LeftSideAccess, Dummy))
                    {
                        Dummy                = Dummy.ThreadAccess;
                        Div.ThreadAccess     = Dummy;
                        Dummy.LeftSideAccess = Div;
                    }
                    //AddToTree.Tree HOLDER = Dummy.CopyReferenclyTree(Dummy);
                    AddToTree.Tree HOLDER = Dummy.CopyReferenclyTree(Dummy);

                    UIS.SetProgressValue(UIS.progressBar16, INCREASE + UIS.progressBar16.Value);

                    Node = Dummy.CopyReferenclyTree(Dummy);
                    while (Node.ThreadAccess != null)
                    {
                        Node = Node.ThreadAccess;
                    }

                    Dummy = Dummy.FINDTreeWithOutThreadConsideration(Node, DummySender);

                    if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.RightSideAccess, Dummy))
                    {
                        Dummy = Dummy.ThreadAccess;
                        Dummy.LeftSideAccess.ThreadAccess = Dummy.ThreadAccess;
                        Dummy = Dummy.LeftSideAccess;
                    }
                    else
                    if (Dummy.ThreadAccess.LeftSideAccess != null && EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.LeftSideAccess, Dummy))
                    {
                        Dummy = Dummy.ThreadAccess;
                        Dummy.RightSideAccess.ThreadAccess = Dummy.ThreadAccess;
                        Dummy = Dummy.RightSideAccess;
                    }
                    //Node = AddingSameUnderElements.OptimizeNode(Dummy);

                    UIS.SetProgressValue(UIS.progressBar16, INCREASE + UIS.progressBar16.Value);

                    Node = Dummy.CopyReferenclyTree(Dummy);
                    while (Node.ThreadAccess != null)
                    {
                        Node = Node.ThreadAccess;
                    }

                    if (!(EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Node)))
                    {
                        Dummy = Dummy.FINDTreeWithOutThreadConsideration(HOLDER, Node);
                    }

                    CurrentSimplification = true;
                }
                else
                {
                    UIS.SetProgressValue(UIS.progressBar16, 2147483647);
                    //if(!CurrentSimplification)
                    //  Dummy = Dummy.FINDTreeWithThreadConsideration(Befor,Dummy);
                    return(Dummy);
                }
                if (CurrentSimplification)
                {
                    Dummy = SimplifierCommonSubFactor.SimplifierCommonSubFactorFx(Dummy, ref UIS);
                    Dummy = LocalSimplifier.LocalSimplifierFx(Dummy, ref UIS);
                }
                if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Befor))
                {
                    UIS.SetProgressValue(UIS.progressBar16, 2147483647);
                    return(Dummy);
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            UIS.SetProgressValue(UIS.progressBar16, 2147483647);
            return(Dummy);
        }
Ejemplo n.º 11
0
        static AddToTree.Tree RepeatedlyDeletedAction(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            DeletingMultaplification.RepeatedlyDeletedAction(Dummy.LeftSideAccess, ref UIS);
            DeletingMultaplification.RepeatedlyDeletedAction(Dummy.RightSideAccess, ref UIS);
            AddToTree.Tree Current    = Dummy;
            AddToTree.Tree CurrentTow = Dummy.LeftSideAccess;
            //int INCREASE = 2147483647 / 9;

            try
            {
                UIS.SetProgressValue(UIS.progressBar14, 0);
                if (CurrentTow != null)
                {
                    if (Dummy != null)
                    {
                        while ((IS.IsMul(Dummy.SampleAccess)))
                        {
                            if (!DELETED.FINDTreeWithThreadConsideration(Dummy))
                            {
                                if (!EqualToObject.IsEqualWithThreadConsiderationCommonly(CurrentTow, Dummy))
                                {
                                    if (CurrentTow != null)
                                    {
                                        while ((IS.IsMul(CurrentTow.SampleAccess)) && (CurrentTow != null))
                                        {
                                            if (IS.IsNumber(Dummy.LeftSideAccess.SampleAccess))
                                            {
                                                if (IS.IsNumber(CurrentTow.LeftSideAccess.SampleAccess))
                                                {
                                                    ///bool LeftTrueRightFalse = false;
                                                    ///if (EqualToObject.IsEqualWithThreadConsiderationCommonly(CurrentTow.ThreadAccess.LeftSideAccess, CurrentTow))
                                                    ///LeftTrueRightFalse = true;
                                                    ///else
                                                    //if (EqualToObject.IsEqualWithThreadConsiderationCommonly(CurrentTow.ThreadAccess.RightSideAccess, CurrentTow))
                                                    //  LeftTrueRightFalse = false;
                                                    AddToTree.Tree HOLDE           = Dummy;
                                                    AddToTree.Tree DummyCurrentTow = Dummy.LeftSideAccess;
                                                    Dummy.SetLefTandRightCommonlySide(CurrentTow.RightSideAccess, Dummy.RightSideAccess);
                                                    Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                    while (Dummy.ThreadAccess != null)
                                                    {
                                                        Dummy = Dummy.ThreadAccess;
                                                    }
                                                    Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, CurrentTow);
                                                    Dummy.SetLefTandRightCommonlySide(Dummy.LeftSideAccess, DummyCurrentTow);
                                                    Dummy.RightSideAccess.ThreadAccess = Dummy;
                                                    while (Dummy.ThreadAccess != null)
                                                    {
                                                        Dummy = Dummy.ThreadAccess;
                                                    }
                                                    Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, HOLDE);
                                                    DELETED.ADDToTree(Dummy);
                                                }
                                            }



                                            if (IS.ISindependenceVaribale(Dummy.LeftSideAccess.SampleAccess))
                                            {
                                                if (IS.IsNumber(CurrentTow.LeftSideAccess.SampleAccess))
                                                {
                                                    if ((IS.IsPower(CurrentTow.RightSideAccess.SampleAccess)) || (IS.ISindependenceVaribale(CurrentTow.RightSideAccess.SampleAccess)))
                                                    {
                                                        if ((IS.ISindependenceVaribale(CurrentTow.RightSideAccess.LeftSideAccess.SampleAccess)) || (IS.IsNumber(CurrentTow.RightSideAccess.RightSideAccess.SampleAccess)))
                                                        {
                                                            AddToTree.Tree HOLDE           = Dummy;
                                                            AddToTree.Tree DummyCurrentTow = Dummy.LeftSideAccess;
                                                            Dummy.SetLefTandRightCommonlySide(CurrentTow.LeftSideAccess, Dummy.RightSideAccess);
                                                            Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                            while (Dummy.ThreadAccess != null)
                                                            {
                                                                Dummy = Dummy.ThreadAccess;
                                                            }
                                                            Dummy = CurrentTow;
                                                            Dummy.SetLefTandRightCommonlySide(DummyCurrentTow, Dummy.RightSideAccess);
                                                            Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                            while (Dummy.ThreadAccess != null)
                                                            {
                                                                Dummy = Dummy.ThreadAccess;
                                                            }
                                                            while (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, HOLDE))
                                                            {
                                                                Dummy = Dummy.LeftSideAccess;
                                                            }
                                                            DELETED.ADDToTree(Dummy);
                                                        }
                                                    }
                                                }
                                            }

                                            if (IS.ISindependenceVaribale(CurrentTow.RightSideAccess.SampleAccess))
                                            {
                                                if (IS.IsNumber(CurrentTow.LeftSideAccess.SampleAccess))
                                                {
                                                    if ((IS.IsPower(Dummy.LeftSideAccess.SampleAccess)) || (IS.ISindependenceVaribale(CurrentTow.RightSideAccess.SampleAccess)))
                                                    {
                                                        if ((IS.ISindependenceVaribale(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess)) || (IS.IsNumber(CurrentTow.RightSideAccess.RightSideAccess.SampleAccess)))
                                                        {
                                                            AddToTree.Tree HOLDE           = Dummy;
                                                            AddToTree.Tree DummyCurrentTow = Dummy.LeftSideAccess;
                                                            Dummy.SetLefTandRightCommonlySide(CurrentTow.LeftSideAccess, Dummy.RightSideAccess);
                                                            Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                            while (Dummy.ThreadAccess != null)
                                                            {
                                                                Dummy = Dummy.ThreadAccess;
                                                            }
                                                            Dummy = CurrentTow;
                                                            Dummy.SetLefTandRightCommonlySide(DummyCurrentTow, Dummy.RightSideAccess);
                                                            Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                            while (Dummy.ThreadAccess != null)
                                                            {
                                                                Dummy = Dummy.ThreadAccess;
                                                            }
                                                            while (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, HOLDE))
                                                            {
                                                                Dummy = Dummy.LeftSideAccess;
                                                            }
                                                            DELETED.ADDToTree(Dummy);
                                                        }
                                                    }
                                                }
                                            }


                                            CurrentTow = CurrentTow.LeftSideAccess;
                                        }
                                    }
                                }
                            }
                            if (Dummy.LeftSideAccess == null)
                            {
                                break;
                            }
                            Dummy      = Dummy.LeftSideAccess;
                            CurrentTow = Dummy.LeftSideAccess;
                        }
                    }
                }
                //Dummy= Dummy;
                while ((!EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Current)) && (Dummy.ThreadAccess != null))
                {
                    Dummy = Dummy.ThreadAccess;
                }
                CurrentTow = Dummy.RightSideAccess;

                UIS.SetProgressValue(UIS.progressBar14, 2147483647 / 2);

                if (CurrentTow != null)
                {
                    while (IS.IsMul(Dummy.SampleAccess))
                    {
                        if (CurrentTow != null)
                        {
                            while (IS.IsMul(CurrentTow.SampleAccess) && (CurrentTow != null))
                            {
                                if (IS.IsNumber(Dummy.LeftSideAccess.SampleAccess))
                                {
                                    if (IS.IsNumber(CurrentTow.LeftSideAccess.SampleAccess))
                                    {
                                        ///bool LeftTrueRightFalse = false;
                                        ///if (EqualToObject.IsEqualWithThreadConsiderationCommonly(CurrentTow.ThreadAccess.LeftSideAccess, CurrentTow))
                                        ///LeftTrueRightFalse = true;
                                        ///else
                                        //if (EqualToObject.IsEqualWithThreadConsiderationCommonly(CurrentTow.ThreadAccess.RightSideAccess, CurrentTow))
                                        //  LeftTrueRightFalse = false;
                                        AddToTree.Tree HOLDE           = Dummy;
                                        AddToTree.Tree DummyCurrentTow = Dummy.LeftSideAccess;
                                        Dummy.SetLefTandRightCommonlySide(CurrentTow.RightSideAccess, Dummy.RightSideAccess);
                                        Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                        while (Dummy.ThreadAccess != null)
                                        {
                                            Dummy = Dummy.ThreadAccess;
                                        }
                                        Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, CurrentTow);
                                        Dummy.SetLefTandRightCommonlySide(Dummy.LeftSideAccess, DummyCurrentTow);
                                        Dummy.RightSideAccess.ThreadAccess = Dummy;
                                        while (Dummy.ThreadAccess != null)
                                        {
                                            Dummy = Dummy.ThreadAccess;
                                        }
                                        Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, HOLDE);
                                        DELETED.ADDToTree(Dummy);
                                    }
                                }


                                if (IS.ISindependenceVaribale(Dummy.LeftSideAccess.SampleAccess))
                                {
                                    if (IS.IsNumber(CurrentTow.LeftSideAccess.SampleAccess))
                                    {
                                        if ((IS.IsPower(CurrentTow.RightSideAccess.SampleAccess)) || (IS.ISindependenceVaribale(CurrentTow.RightSideAccess.SampleAccess)))
                                        {
                                            if ((IS.ISindependenceVaribale(CurrentTow.RightSideAccess.LeftSideAccess.SampleAccess)) || (IS.IsNumber(CurrentTow.RightSideAccess.RightSideAccess.SampleAccess)))
                                            {
                                                ///bool LeftTrueRightFalse = false;
                                                ///if (EqualToObject.IsEqualWithThreadConsiderationCommonly(CurrentTow.ThreadAccess.LeftSideAccess, CurrentTow))
                                                ///LeftTrueRightFalse = true;
                                                ///else
                                                //if (EqualToObject.IsEqualWithThreadConsiderationCommonly(CurrentTow.ThreadAccess.RightSideAccess, CurrentTow))
                                                //  LeftTrueRightFalse = false;
                                                AddToTree.Tree HOLDE           = Dummy;
                                                AddToTree.Tree DummyCurrentTow = Dummy.LeftSideAccess;
                                                Dummy.SetLefTandRightCommonlySide(CurrentTow.LeftSideAccess, Dummy.RightSideAccess);
                                                Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                while (Dummy.ThreadAccess != null)
                                                {
                                                    Dummy = Dummy.ThreadAccess;
                                                }
                                                //Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, CurrentTow);
                                                Dummy = CurrentTow;
                                                Dummy.SetLefTandRightCommonlySide(DummyCurrentTow, Dummy.RightSideAccess);
                                                Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                while (Dummy.ThreadAccess != null)
                                                {
                                                    Dummy = Dummy.ThreadAccess;
                                                }
                                                //Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, HOLDE);
                                                while (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, HOLDE))
                                                {
                                                    Dummy = Dummy.RightSideAccess;
                                                }
                                                DELETED.ADDToTree(Dummy);
                                            }
                                        }
                                    }
                                }


                                if (IS.ISindependenceVaribale(CurrentTow.RightSideAccess.SampleAccess))
                                {
                                    if (IS.IsNumber(CurrentTow.LeftSideAccess.SampleAccess))
                                    {
                                        if ((IS.IsPower(Dummy.LeftSideAccess.SampleAccess)) || (IS.ISindependenceVaribale(CurrentTow.RightSideAccess.SampleAccess)))
                                        {
                                            if ((IS.ISindependenceVaribale(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess)) || (IS.IsNumber(CurrentTow.RightSideAccess.RightSideAccess.SampleAccess)))
                                            {
                                                AddToTree.Tree HOLDE           = Dummy;
                                                AddToTree.Tree DummyCurrentTow = Dummy.LeftSideAccess;
                                                Dummy.SetLefTandRightCommonlySide(CurrentTow.LeftSideAccess, Dummy.RightSideAccess);
                                                Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                while (Dummy.ThreadAccess != null)
                                                {
                                                    Dummy = Dummy.ThreadAccess;
                                                }
                                                Dummy = CurrentTow;
                                                Dummy.SetLefTandRightCommonlySide(DummyCurrentTow, Dummy.RightSideAccess);
                                                Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                while (Dummy.ThreadAccess != null)
                                                {
                                                    Dummy = Dummy.ThreadAccess;
                                                }
                                                while (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, HOLDE))
                                                {
                                                    Dummy = Dummy.LeftSideAccess;
                                                }
                                                DELETED.ADDToTree(Dummy);
                                            }
                                        }
                                    }
                                }


                                CurrentTow = CurrentTow.RightSideAccess;
                            }
                        }
                        if (Dummy.RightSideAccess == null)
                        {
                            break;
                        }
                        Dummy      = Dummy.RightSideAccess;
                        CurrentTow = Dummy.RightSideAccess;
                    }
                }
                while ((!EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Current)) && (Dummy.ThreadAccess != null))
                {
                    Dummy = Dummy.ThreadAccess;
                }
            }
            catch (NullReferenceException t)
            {
                ExceptionClass.ExceptionClassMethod(t);
            }
            UIS.SetProgressValue(UIS.progressBar14, 2147483647);
            return(Dummy);
        }