예제 #1
0
        public void EvaluateFalse(EvalStateNode fromNode, bool restartable)
        {
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().QPatternOrEvalFalse(EvalOrNode);
            }
            for (int i = 0; i < ChildNodes.Length; i++)
            {
                if (ChildNodes[i] == fromNode)
                {
                    ChildNodes[i] = null;
                }
            }

            bool allEmpty = true;

            for (int i = 0; i < ChildNodes.Length; i++)
            {
                if (ChildNodes[i] != null)
                {
                    allEmpty = false;
                    break;
                }
            }

            if (allEmpty)
            {
                ParentEvaluator.EvaluateFalse(this, true);
            }
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().APatternOrEvalFalse();
            }
        }
예제 #2
0
        public void EvaluateTrue(MatchedEventMap matchEvent, EvalStateNode fromNode, bool isQuitted)
        {
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().QPatternOrEvaluateTrue(EvalOrNode, matchEvent);
            }
            // If one of the children quits, the whole or expression turns true and all subexpressions must quit
            if (isQuitted)
            {
                for (int i = 0; i < ChildNodes.Length; i++)
                {
                    if (ChildNodes[i] == fromNode)
                    {
                        ChildNodes[i] = null;
                    }
                }
                QuitInternal();     // Quit the remaining listeners
            }

            ParentEvaluator.EvaluateTrue(matchEvent, this, isQuitted);
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().APatternOrEvaluateTrue(isQuitted);
            }
        }
예제 #3
0
        public void EvaluateFalse(EvalStateNode fromNode, bool restartable)
        {
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().QPatternAndEvaluateFalse(EvalAndNode);
            }
            int?indexFrom = null;

            for (int i = 0; i < ActiveChildNodes.Length; i++)
            {
                if (ActiveChildNodes[i] == fromNode)
                {
                    ActiveChildNodes[i] = null;
                    indexFrom           = i;
                }
            }

            if (indexFrom != null)
            {
                EventsPerChild[indexFrom.Value] = null;
            }

            // The and node cannot turn true anymore, might as well quit all child nodes
            QuitInternal();
            ParentEvaluator.EvaluateFalse(this, restartable ? true : false);
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().APatternAndEvaluateFalse();
            }
        }
예제 #4
0
        public void EvaluateTrue(
            MatchedEventMap matchEvent,
            EvalStateNode fromNode,
            bool isQuitted,
            EventBean optionalTriggeringEvent)
        {
            var agentInstanceContext = evalOrNode.Context.AgentInstanceContext;
            agentInstanceContext.InstrumentationProvider.QPatternOrEvaluateTrue(evalOrNode.factoryNode, matchEvent);

            // If one of the children quits, the whole or expression turns true and all subexpressions must quit
            if (isQuitted) {
                for (var i = 0; i < childNodes.Length; i++) {
                    if (childNodes[i] == fromNode) {
                        childNodes[i] = null;
                    }
                }

                agentInstanceContext.AuditProvider.PatternInstance(false, evalOrNode.factoryNode, agentInstanceContext);
                QuitInternal(); // Quit the remaining listeners
            }

            agentInstanceContext.AuditProvider.PatternTrue(
                evalOrNode.FactoryNode,
                this,
                matchEvent,
                isQuitted,
                agentInstanceContext);
            ParentEvaluator.EvaluateTrue(matchEvent, this, isQuitted, optionalTriggeringEvent);

            agentInstanceContext.InstrumentationProvider.APatternOrEvaluateTrue(isQuitted);
        }
예제 #5
0
        public void EvaluateFalse(
            EvalStateNode fromNode,
            bool restartable)
        {
            var agentInstanceContext = evalOrNode.Context.AgentInstanceContext;
            agentInstanceContext.InstrumentationProvider.QPatternOrEvalFalse(evalOrNode.factoryNode);

            for (var i = 0; i < childNodes.Length; i++) {
                if (childNodes[i] == fromNode) {
                    childNodes[i] = null;
                }
            }

            var allEmpty = true;
            for (var i = 0; i < childNodes.Length; i++) {
                if (childNodes[i] != null) {
                    allEmpty = false;
                    break;
                }
            }

            if (allEmpty) {
                agentInstanceContext.AuditProvider.PatternFalse(evalOrNode.FactoryNode, this, agentInstanceContext);
                agentInstanceContext.AuditProvider.PatternInstance(false, evalOrNode.factoryNode, agentInstanceContext);
                ParentEvaluator.EvaluateFalse(this, true);
            }

            agentInstanceContext.InstrumentationProvider.APatternOrEvalFalse();
        }
        public void EvaluateFalse(EvalStateNode fromNode, bool restartable)
        {
            int index;

            fromNode.Quit();

            var hasIndex = Nodes.TryGetValue(fromNode, out index);

            Nodes.Remove(fromNode);

            if (hasIndex && index > 0)
            {
                if (EvalFollowedByNode.IsTrackWithMax)
                {
                    CountActivePerChild[index - 1]--;
                }
                if (EvalFollowedByNode.IsTrackWithPool)
                {
                    PatternSubexpressionPoolStmtSvc poolSvc = EvalFollowedByNode.Context.StatementContext.PatternSubexpressionPoolSvc;
                    poolSvc.EngineSvc.DecreaseCount(EvalFollowedByNode, EvalFollowedByNode.Context.AgentInstanceContext);
                    poolSvc.StmtHandler.DecreaseCount();
                }
            }

            if (Nodes.IsEmpty())
            {
                ParentEvaluator.EvaluateFalse(this, true);
                Quit();
            }
        }
예제 #7
0
        public void EvaluateFalse(
            EvalStateNode fromNode,
            bool restartable)
        {
            var agentInstanceContext = evalAndNode.Context.AgentInstanceContext;
            agentInstanceContext.InstrumentationProvider.QPatternAndEvaluateFalse(evalAndNode.factoryNode);

            int? indexFrom = null;
            for (var i = 0; i < activeChildNodes.Length; i++) {
                if (activeChildNodes[i] == fromNode) {
                    activeChildNodes[i] = null;
                    indexFrom = i;
                }
            }

            if (indexFrom != null) {
                eventsPerChild[indexFrom.Value] = null;
            }

            // The and node cannot turn true anymore, might as well quit all child nodes
            QuitInternal();

            agentInstanceContext.AuditProvider.PatternFalse(evalAndNode.FactoryNode, this, agentInstanceContext);
            agentInstanceContext.AuditProvider.PatternInstance(false, evalAndNode.factoryNode, agentInstanceContext);
            ParentEvaluator.EvaluateFalse(this, restartable ? true : false);

            agentInstanceContext.InstrumentationProvider.APatternAndEvaluateFalse();
        }
예제 #8
0
        public void EvaluateTrue(MatchedEventMap matchEvent, EvalStateNode fromNode, bool isQuitted)
        {
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().QPatternGuardEvaluateTrue(_evalGuardNode, matchEvent);
            }
            bool haveQuitted = _activeChildNode == null;

            // If one of the children quits, remove the child
            if (isQuitted)
            {
                _activeChildNode = null;

                // Stop guard, since associated subexpression is gone
                _guard.StopGuard();
            }

            if (!(haveQuitted))
            {
                bool guardPass = _guard.Inspect(matchEvent);
                if (guardPass)
                {
                    ParentEvaluator.EvaluateTrue(matchEvent, this, isQuitted);
                }
            }
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().APatternGuardEvaluateTrue(isQuitted);
            }
        }
예제 #9
0
 public override void RemoveMatch(ISet <EventBean> matchEvent)
 {
     if (PatternConsumptionUtil.ContainsEvent(matchEvent, _eventObserver.BeginState))
     {
         Quit();
         ParentEvaluator.EvaluateFalse(this, true);
     }
 }
예제 #10
0
 public void ObserverEvaluateFalse(bool restartable)
 {
     var agentInstanceContext = evalObserverNode.Context.AgentInstanceContext;
     agentInstanceContext.AuditProvider.PatternFalse(evalObserverNode.FactoryNode, this, agentInstanceContext);
     agentInstanceContext.AuditProvider.PatternInstance(
         false,
         evalObserverNode.factoryNode,
         agentInstanceContext);
     ParentEvaluator.EvaluateFalse(this, restartable);
 }
예제 #11
0
        public void EvaluateFalse(EvalStateNode fromNode, bool restartable)
        {
            if (_evalAuditNode.FactoryNode.IsAuditPattern && AuditPath.IsInfoEnabled)
            {
                String message = ToStringEvaluateFalse(this, _evalAuditNode.FactoryNode.PatternExpr, fromNode);
                AuditPath.AuditLog(_evalAuditNode.Context.StatementContext.EngineURI, _evalAuditNode.Context.PatternContext.StatementName, AuditEnum.PATTERN, message);
            }

            _evalAuditNode.FactoryNode.DecreaseRefCount(this, _evalAuditNode.Context.PatternContext);
            ParentEvaluator.EvaluateFalse(this, restartable);
        }
예제 #12
0
 public override void RemoveMatch(ISet <EventBean> matchEvent)
 {
     if (PatternConsumptionUtil.ContainsEvent(matchEvent, BeginState))
     {
         Quit();
         ParentEvaluator.EvaluateFalse(this, true);
     }
     else
     {
         PatternConsumptionUtil.ChildNodeRemoveMatches(matchEvent, SpawnedNodes.Keys);
     }
 }
 public override void RemoveMatch(ISet<EventBean> matchEvent)
 {
     if (PatternConsumptionUtil.ContainsEvent(matchEvent, beginState)) {
         Quit();
         var agentInstanceContext = everyNode.Context.AgentInstanceContext;
         agentInstanceContext.AuditProvider.PatternFalse(everyNode.FactoryNode, this, agentInstanceContext);
         ParentEvaluator.EvaluateFalse(this, true);
     }
     else {
         PatternConsumptionUtil.ChildNodeRemoveMatches(matchEvent, spawnedNodes.Keys);
     }
 }
예제 #14
0
 public override void RemoveMatch(ISet <EventBean> matchEvent)
 {
     if (!IsStarted)
     {
         return;
     }
     if (PatternConsumptionUtil.ContainsEvent(matchEvent, BeginState))
     {
         Quit();
         ParentEvaluator.EvaluateFalse(this, true);
     }
 }
예제 #15
0
 public void EvaluateFalse(
     EvalStateNode fromNode,
     bool restartable)
 {
     activeChildNode = null;
     var agentInstanceContext = evalGuardNode.Context.AgentInstanceContext;
     agentInstanceContext.InstrumentationProvider.QPatternGuardEvalFalse(evalGuardNode.factoryNode);
     agentInstanceContext.AuditProvider.PatternFalse(evalGuardNode.FactoryNode, this, agentInstanceContext);
     agentInstanceContext.AuditProvider.PatternInstance(false, evalGuardNode.factoryNode, agentInstanceContext);
     ParentEvaluator.EvaluateFalse(this, true);
     agentInstanceContext.InstrumentationProvider.APatternGuardEvalFalse();
 }
예제 #16
0
 public override void RemoveMatch(ISet<EventBean> matchEvent)
 {
     if (PatternConsumptionUtil.ContainsEvent(matchEvent, eventObserver.BeginState)) {
         Quit();
         var agentInstanceContext = evalObserverNode.Context.AgentInstanceContext;
         agentInstanceContext.AuditProvider.PatternFalse(
             evalObserverNode.FactoryNode,
             this,
             agentInstanceContext);
         ParentEvaluator.EvaluateFalse(this, true);
     }
 }
예제 #17
0
 public void ObserverEvaluateTrue(MatchedEventMap matchEvent, bool quitted)
 {
     if (InstrumentationHelper.ENABLED)
     {
         InstrumentationHelper.Get().QPatternObserverEvaluateTrue(_evalObserverNode, matchEvent);
     }
     ParentEvaluator.EvaluateTrue(matchEvent, this, quitted);
     if (InstrumentationHelper.ENABLED)
     {
         InstrumentationHelper.Get().APatternObserverEvaluateTrue();
     }
 }
예제 #18
0
        public override void RemoveMatch(ISet<EventBean> matchEvent)
        {
            if (!_isStarted) {
                return;
            }

            if (PatternConsumptionUtil.ContainsEvent(matchEvent, _beginState)) {
                Quit();
                var agentInstanceContext = _evalFilterNode.Context.AgentInstanceContext;
                agentInstanceContext.AuditProvider.PatternFalse(_evalFilterNode.FactoryNode, this, agentInstanceContext);
                ParentEvaluator.EvaluateFalse(this, true);
            }
        }
예제 #19
0
 private void EvaluateTrue(
     MatchedEventMap theEvent,
     bool isQuitted,
     EventBean optionalTriggeringEvent)
 {
     var agentInstanceContext = _evalFilterNode.Context.AgentInstanceContext;
     agentInstanceContext.AuditProvider.PatternTrue(
         _evalFilterNode.FactoryNode,
         this,
         theEvent,
         isQuitted,
         agentInstanceContext);
     ParentEvaluator.EvaluateTrue(theEvent, this, isQuitted, optionalTriggeringEvent);
 }
예제 #20
0
 public override void RemoveMatch(ISet <EventBean> matchEvent)
 {
     if (PatternConsumptionUtil.ContainsEvent(matchEvent, _beginState))
     {
         Quit();
         ParentEvaluator.EvaluateFalse(this, true);
     }
     else
     {
         if (_activeChildNode != null)
         {
             _activeChildNode.RemoveMatch(matchEvent);
         }
     }
 }
예제 #21
0
        public void EvaluateTrue(MatchedEventMap matchEvent, EvalStateNode fromNode, bool isQuitted)
        {
            if (_evalAuditNode.FactoryNode.IsAuditPattern && AuditPath.IsInfoEnabled)
            {
                String message = ToStringEvaluateTrue(this, _evalAuditNode.FactoryNode.PatternExpr, matchEvent, fromNode, isQuitted);
                AuditPath.AuditLog(_evalAuditNode.Context.StatementContext.EngineURI, _evalAuditNode.Context.PatternContext.StatementName, AuditEnum.PATTERN, message);
            }

            ParentEvaluator.EvaluateTrue(matchEvent, this, isQuitted);

            if (isQuitted)
            {
                _evalAuditNode.FactoryNode.DecreaseRefCount(this, _evalAuditNode.Context.PatternContext);
            }
        }
예제 #22
0
        public void EvaluateTrue(
            MatchedEventMap matchEvent,
            EvalStateNode fromNode,
            bool isQuitted,
            EventBean optionalTriggeringEvent)
        {
            AgentInstanceContext agentInstanceContext = evalEveryNode.Context.AgentInstanceContext;
            agentInstanceContext.InstrumentationProvider.QPatternEveryEvaluateTrue(
                evalEveryNode.factoryNode,
                matchEvent);

            if (isQuitted) {
                spawnedNodes.Remove(fromNode);
            }

            // See explanation in EvalFilterStateNode for the type check
            if (fromNode.IsFilterStateNode || fromNode.IsObserverStateNodeNonRestarting) {
                // We do not need to newState new listeners here, since the filter state node below this node did not quit
            }
            else {
                // Spawn all nodes below this EVERY node
                // During the start of a child we need to use the temporary evaluator to catch any event created during a start
                // Such events can be raised when the "not" operator is used.
                var spawnEvaluator = new EvalEveryStateSpawnEvaluator(evalEveryNode.Context.StatementName);
                EvalStateNode spawned = evalEveryNode.ChildNode.NewState(spawnEvaluator);
                spawned.Start(beginState);

                // If the whole spawned expression already turned true, quit it again
                if (spawnEvaluator.IsEvaluatedTrue) {
                    spawned.Quit();
                }
                else {
                    spawnedNodes.Add(spawned);
                    spawned.ParentEvaluator = this;
                }
            }

            // All nodes indicate to their parents that their child node did not quit, therefore a false for isQuitted
            agentInstanceContext.AuditProvider.PatternTrue(
                evalEveryNode.FactoryNode,
                this,
                matchEvent,
                false,
                agentInstanceContext);
            ParentEvaluator.EvaluateTrue(matchEvent, this, false, optionalTriggeringEvent);

            agentInstanceContext.InstrumentationProvider.APatternEveryEvaluateTrue();
        }
예제 #23
0
        public void EvaluateFalse(EvalStateNode fromNode, bool restartable)
        {
            Instrument.With(
                i => i.QPatternFollowedByEvalFalse(EvalFollowedByNode),
                i => i.APatternFollowedByEvalFalse(),
                () =>
            {
                fromNode.Quit();
                Nodes.Remove(fromNode);

                if (Nodes.IsEmpty())
                {
                    ParentEvaluator.EvaluateFalse(this, true);
                    QuitInternal();
                }
            });
        }
예제 #24
0
        public override void RemoveMatch(ISet <EventBean> matchEvent)
        {
            bool quit = false;

            if (EventsPerChild != null)
            {
                foreach (Object entry in EventsPerChild)
                {
                    if (entry is MatchedEventMap)
                    {
                        quit = PatternConsumptionUtil.ContainsEvent(matchEvent, (MatchedEventMap)entry);
                    }
                    else if (entry != null)
                    {
                        var list = (IList <MatchedEventMap>)entry;
                        foreach (MatchedEventMap map in list)
                        {
                            quit = PatternConsumptionUtil.ContainsEvent(matchEvent, map);
                            if (quit)
                            {
                                break;
                            }
                        }
                    }
                    if (quit)
                    {
                        break;
                    }
                }
            }
            if (!quit && ActiveChildNodes != null)
            {
                foreach (EvalStateNode child in ActiveChildNodes)
                {
                    if (child != null)
                    {
                        child.RemoveMatch(matchEvent);
                    }
                }
            }
            if (quit)
            {
                Quit();
                ParentEvaluator.EvaluateFalse(this, true);
            }
        }
예제 #25
0
        public override void Start(MatchedEventMap beginState)
        {
            var factoryNode = evalNotNode.FactoryNode;
            var agentInstanceContext = evalNotNode.Context.AgentInstanceContext;
            agentInstanceContext.InstrumentationProvider.QPatternNotStart(evalNotNode.factoryNode, beginState);
            agentInstanceContext.AuditProvider.PatternInstance(true, factoryNode, agentInstanceContext);

            childNode = evalNotNode.ChildNode.NewState(this);
            childNode.Start(beginState);

            // The not node acts by inverting the truth
            // By default the child nodes are false. This not node acts inverts the truth and pretends the child is true,
            // raising an event up.
            agentInstanceContext.AuditProvider.PatternTrue(factoryNode, this, beginState, false, agentInstanceContext);
            ParentEvaluator.EvaluateTrue(beginState, this, false, null);
            agentInstanceContext.InstrumentationProvider.APatternNotStart();
        }
예제 #26
0
        public void EvaluateTrue(MatchedEventMap matchEvent, EvalStateNode fromNode, bool isQuitted)
        {
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().QPatternEveryEvaluateTrue(_evalEveryNode, matchEvent);
            }
            if (isQuitted)
            {
                _spawnedNodes.Remove(fromNode);
            }

            // See explanation in EvalFilterStateNode for the type check
            if (fromNode.IsFilterStateNode || fromNode.IsObserverStateNodeNonRestarting)
            {
                // We do not need to newState new listeners here, since the filter state node below this node did not quit
            }
            else
            {
                // Spawn all nodes below this EVERY node
                // During the start of a child we need to use the temporary evaluator to catch any event created during a start
                // Such events can be raised when the "not" operator is used.
                var spawnEvaluator = new EvalEveryStateSpawnEvaluator(_evalEveryNode.Context.PatternContext.StatementName);
                var spawned        = _evalEveryNode.ChildNode.NewState(spawnEvaluator, null, 0L);
                spawned.Start(_beginState);

                // If the whole spawned expression already turned true, quit it again
                if (spawnEvaluator.IsEvaluatedTrue)
                {
                    spawned.Quit();
                }
                else
                {
                    _spawnedNodes.Add(spawned);
                    spawned.ParentEvaluator = this;
                }
            }

            // All nodes indicate to their parents that their child node did not quit, therefore a false for isQuitted
            ParentEvaluator.EvaluateTrue(matchEvent, this, false);
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().APatternEveryEvaluateTrue();
            }
        }
예제 #27
0
        public void EvaluateTrue(MatchedEventMap matchEvent, EvalStateNode fromNode, bool isQuitted)
        {
            int index;
            var hasIndex = Nodes.TryGetValue(fromNode, out index);

            bool[] isFollowedByQuitted = { false };

            using (Instrument.With(
                       i => i.QPatternFollowedByEvaluateTrue(EvalFollowedByNode, matchEvent, index),
                       i => i.APatternFollowedByEvaluateTrue(isFollowedByQuitted[0])))
            {
                if (isQuitted)
                {
                    Nodes.Remove(fromNode);
                }

                // the node may already have quit as a result of an outer state quitting this state,
                // however the callback may still be received; It is fine to ignore this callback.
                if (!hasIndex)
                {
                    return;
                }

                // If the match came from the very last filter, need to escalate
                int numChildNodes = EvalFollowedByNode.ChildNodes.Length;
                if (index == (numChildNodes - 1))
                {
                    if (Nodes.IsEmpty())
                    {
                        isFollowedByQuitted[0] = true;
                    }

                    ParentEvaluator.EvaluateTrue(matchEvent, this, isFollowedByQuitted[0]);
                }
                // Else start a new sub-expression for the next-in-line filter
                else
                {
                    EvalNode      child      = EvalFollowedByNode.ChildNodes[index + 1];
                    EvalStateNode childState = child.NewState(this, null, 0L);
                    Nodes.Put(childState, index + 1);
                    childState.Start(matchEvent);
                }
            }
        }
예제 #28
0
        public override void RemoveMatch(ISet <EventBean> matchEvent)
        {
            bool quit = PatternConsumptionUtil.ContainsEvent(matchEvent, _beginState);

            if (!quit)
            {
                foreach (List <EventBean> list in _matchedEventArrays)
                {
                    if (list == null)
                    {
                        continue;
                    }
                    foreach (EventBean @event in list)
                    {
                        if (matchEvent.Contains(@event))
                        {
                            quit = true;
                            break;
                        }
                    }
                    if (quit)
                    {
                        break;
                    }
                }
            }
            if (quit)
            {
                Quit();
                ParentEvaluator.EvaluateFalse(this, true);
            }
            else
            {
                if (_stateMatcher != null)
                {
                    _stateMatcher.RemoveMatch(matchEvent);
                }
                if (_stateUntil != null)
                {
                    _stateUntil.RemoveMatch(matchEvent);
                }
            }
        }
예제 #29
0
        public void GuardQuit()
        {
            var agentInstanceContext = evalGuardNode.Context.AgentInstanceContext;
            agentInstanceContext.InstrumentationProvider.QPatternGuardGuardQuit(evalGuardNode.factoryNode);

            // It is possible that the child node has already been quit such as when the parent wait time was shorter.
            // 1. parent node's guard indicates quit to all children
            // 2. this node's guards also indicates quit, however that already occured
            activeChildNode?.Quit();

            activeChildNode = null;

            // Indicate to parent state that this is permanently false.
            agentInstanceContext.AuditProvider.PatternFalse(evalGuardNode.FactoryNode, this, agentInstanceContext);
            agentInstanceContext.AuditProvider.PatternInstance(false, evalGuardNode.factoryNode, agentInstanceContext);
            ParentEvaluator.EvaluateFalse(this, true);

            agentInstanceContext.InstrumentationProvider.APatternGuardGuardQuit();
        }
예제 #30
0
        public void EvaluateFalse(EvalStateNode fromNode, bool restartable)
        {
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().QPatternEveryEvalFalse(_evalEveryNode);
            }
            fromNode.Quit();
            _spawnedNodes.Remove(fromNode);

            if (!restartable)
            {
                ParentEvaluator.EvaluateFalse(this, false);
                if (InstrumentationHelper.ENABLED)
                {
                    InstrumentationHelper.Get().APatternEveryEvalFalse();
                }
                return;
            }

            // Spawn all nodes below this EVERY node
            // During the start of a child we need to use the temporary evaluator to catch any event created during a start
            // Such events can be raised when the "not" operator is used.
            var spawnEvaluator = new EvalEveryStateSpawnEvaluator(_evalEveryNode.Context.PatternContext.StatementName);
            var spawned        = _evalEveryNode.ChildNode.NewState(spawnEvaluator, null, 0L);

            spawned.Start(_beginState);

            // If the whole spawned expression already turned true, quit it again
            if (spawnEvaluator.IsEvaluatedTrue)
            {
                spawned.Quit();
            }
            else
            {
                _spawnedNodes.Add(spawned);
                spawned.ParentEvaluator = this;
            }
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().APatternEveryEvalFalse();
            }
        }