Beispiel #1
0
        private PropagationInfo getPropagation(ReadSnapshotEntryBase lValue)
        {
            var variable = lValue.GetVariableIdentifier(Input);

            if (!variable.IsDirect)
            {
                throw new NotImplementedException();
            }

            var info = lValue.ReadMemory(Output);

            if (info.Count != 1)
            {
                throw new NotImplementedException();
            }

            var infoValue = info.PossibleValues.First();

            if (infoValue is UndefinedValue)
            {
                //variable hasn't been propagated nowhere already
                return(new PropagationInfo(variable.DirectName.Value));
            }
            else
            {
                //we have propagation info from previous steps
                var result = ((InfoValue <PropagationInfo>)infoValue).Data;
                return(result);
            }
        }
Beispiel #2
0
 /// <summary>
 /// Returns the VariableIdentifier of given snapshot entry or null if it does not exist
 /// </summary>
 /// <param name="b">variable identifier or null</param>
 /// <returns></returns>
 private VariableIdentifier getVariableIdentifier(ReadSnapshotEntryBase b)
 {
     try
     {
         return(b.GetVariableIdentifier(Output));
     }
     catch (System.Exception e)
     {
         return(null);
     }
 }