Example #1
0
        public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list)
        {
            //List<Configuration> returnList = new List<Configuration>();
            //List<Configuration> list1 = new List<Configuration>();
            FirstProcess.SyncInput(eStep, list);

            for (int i = 0; i < list.Count; i++)
            {
                Configuration step = list[i];

                if (step.Event != Constants.TERMINATION)
                {
                    Interrupt inter = new Interrupt(step.Process, SecondProcess);
                    step.Process = inter;
                }
                //list.Add(list1[i]);
                list[i] = step;
            }

            SecondProcess.SyncInput(eStep, list);
            //list1 =
            //for (int i = 0; i < list1.Count; i++)
            //{
            //    list.Add(list1[i]);
            //}

            //return returnList;
        }
Example #2
0
        public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list)
        {
            //List<Configuration> returnList = new List<Configuration>();

            for (int i = 0; i < Processes.Count; i++)
            {
                Process process            = Processes[i];
                List <Configuration> list1 = new List <Configuration>();
                process.SyncInput(eStep, list1);

                if (list1.Count > 0)
                {
                    List <Dictionary <string, int> > nextProcessCounters =
                        Common.Classes.Ultility.Ultility.ProcessCounterDecrement(Common.Classes.Ultility.Ultility.CutNumber, ProcessesCounter, process.ProcessID, 1);

                    for (int j = 0; j < list1.Count; j++)
                    {
                        Configuration step = list1[j];

                        foreach (Dictionary <string, int> ints in nextProcessCounters)
                        {
                            List <Process>           newProcess   = new List <Process>(Processes);
                            Dictionary <string, int> listInstance = new Dictionary <string, int>(ints);
                            AddOneProcess(newProcess, step.Process, listInstance);
                            IndexInterleaveAbstract interleave = new IndexInterleaveAbstract(newProcess, listInstance);
                            step.Process = interleave;
                            list.Add(step);
                        }
                    }
                }
            }

            //return returnList;
        }
Example #3
0
        public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list)
        {
            Process.SyncInput(eStep, list);
            for (int i = 0; i < list.Count; i++)
            {
                list[i].Process = new Hiding(list[i].Process, HidingAlphabets);
            }

            //return list;
        }
Example #4
0
        public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list)
        {
            ExpressionValue v = EvaluatorDenotational.Evaluate(Condition, eStep.GlobalEnv);

            if ((v as BoolConstant).Value)
            {
                Process.SyncInput(eStep, list);
            }

            //return new List<Configuration>(0);
        }
Example #5
0
        public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list)
        {
            Process.SyncInput(eStep, list);
            for (int i = 0; i < list.Count; i++)
            {
                list[i].Process  = new AtomicProcess(list[i].Process, true);
                list[i].IsAtomic = Started;
            }

            //return returnlist;
        }
Example #6
0
        public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list)
        {
            if (FirstProcess is Skip || (FirstProcess is AtomicProcess && (FirstProcess as AtomicProcess).Process is Skip))
            {
                SecondProcess.SyncInput(eStep, list);
                return;
            }

            FirstProcess.SyncInput(eStep, list);

            for (int i = 0; i < list.Count; i++)
            {
                list[i].Process = new Sequence(list[i].Process, SecondProcess);
            }

            //return list;
        }
Example #7
0
        public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list)
        {
            //List<Configuration> returnList = new List<Configuration>();

            for (int i = 0; i < Processes.Count; i++)
            {
                Process process            = Processes[i];
                List <Configuration> list1 = new List <Configuration>();
                process.SyncInput(eStep, list1);

                for (int j = 0; j < list1.Count; j++)
                {
                    Configuration step = list1[j];

                    List <Process> newProcess = new List <Process>(Processes.Count);
                    newProcess.AddRange(Processes);
                    newProcess[i] = step.Process;
                    step.Process  = new IndexInterleave(newProcess);
                    list.Add(step);
                }
            }

            //return returnList;
        }