IncrementDepthCost() public method

public IncrementDepthCost ( ) : void
return void
Example #1
0
        protected TraversalInfo(StateImpl s, StateType st,
            TraversalInfo pred, Via bt)
        {
            stateType = st;
            Via = bt;
            NumProcesses = s.NumProcesses;
            ProcessInfo = s.GetProcessInfo();
            events = s.GetEvents();
            exception = s.Exception;
            IsAcceptingState = s.IsAcceptingState;

            //initialize the plugin information.

            if (pred != null)
            {
                Predecessor = pred;
                CurrentDepth = pred.CurrentDepth + 1;
                zBounds = new ZingerBounds(pred.zBounds.ExecutionCost, pred.zBounds.ChoiceCost);
                zBounds.IncrementDepthCost();

                doDelay = false;
                if (ZingerConfiguration.DoDelayBounding)
                {
                    ZingDBSchedState = s.ZingDBSchedState;
                    ZingDBScheduler = s.ZingDBScheduler;
                }
                else if (ZingerConfiguration.DoPreemptionBounding)
                {
                    preemptionBounding = new ZingPreemptionBounding(ProcessInfo, NumProcesses, Predecessor.preemptionBounding.currentProcess);
                }

                if (ZingerConfiguration.DronacharyaEnabled || ZingerConfiguration.IsPluginEnabled)
                {
                    ZingerPlugin = s.ZingerPlugin;
                    ZingerPluginState = s.ZingerPluginState;
                }
                pred.Successor = this;
                MagicBit = pred.MagicBit;
            }
            else
            {
                zBounds = new ZingerBounds();
                MagicBit = false;
                CurrentDepth = 0;
                if (ZingerConfiguration.DoDelayBounding)
                {
                    ZingDBSchedState = s.ZingDBSchedState.Clone(false);
                    ZingDBScheduler = s.ZingDBScheduler;
                }
                else if (ZingerConfiguration.DoPreemptionBounding)
                {
                    preemptionBounding = new ZingPreemptionBounding(ProcessInfo, NumProcesses, 0);
                }
                if (ZingerConfiguration.DronacharyaEnabled || ZingerConfiguration.IsPluginEnabled)
                {
                    ZingerPlugin = s.ZingerPlugin;
                    ZingerPluginState = s.ZingerPluginState.Clone();
                }
            }
        }