예제 #1
0
        private void EnumerateUsages()
        {
            foreach (KeyValuePair <long, ICollection <long> > nodeVariablesPair in Usages)
            {
                long uNodeId = nodeVariablesPair.Key;

                foreach (long variable in nodeVariablesPair.Value)
                {
                    long usage = (long)(UsagesCount++);

                    AppHelper.TakeValueByKey(
                        NodeToUsesSet,
                        uNodeId,
                        () => new List <long>())
                    .Add(usage);

                    if (!CFG.IsSinkNode(uNodeId))
                    {
                        Ensure.That(NodeToVarMap.ContainsKey(uNodeId)).IsTrue();
                    }

                    UseToNodeMap[usage] = uNodeId;
                }
            }
        }