Beispiel #1
0
        public void DoOperation(T snapshot, TestOperationLogger logger)
        {
            MemoryEntry entry = new MemoryEntry(value);

            snapshotEntry.WriteMemory(snapshot, entry);

            logger.WriteLine("WRITE: {0} = {1}", snapshotEntry, value);
            logger.WriteLine("------------------------------------------------\n");
            logger.WriteLine(snapshot.ToString());
            logger.WriteLine("------------------------------------------------");
        }
Beispiel #2
0
        public void DoOperation(T snapshot, TestOperationLogger logger)
        {
            MemoryEntry entry = sourceEntry.ReadMemory(snapshot);

            targetEntry.WriteMemory(snapshot, entry);

            logger.WriteLine("WRITE: {0} = {1}", targetEntry, sourceEntry);
            logger.WriteLine("VALUES: {0}", entry);
            logger.WriteLine("------------------------------------------------\n");
            logger.WriteLine(snapshot.ToString());
            logger.WriteLine("------------------------------------------------");
        }
Beispiel #3
0
        public override void Foreach(MemoryEntry enumeree, ReadWriteSnapshotEntryBase keyVariable,
                                     ReadWriteSnapshotEntryBase valueVariable)
        {
            var values = new HashSet <Value>();

            var array      = enumeree.PossibleValues.First() as AssociativeArray;
            var arrayEntry = OutSet.CreateSnapshotEntry(new MemoryEntry(array));

            var indexes = arrayEntry.IterateIndexes(OutSnapshot);

            foreach (var index in indexes)
            {
                var indexEntry = arrayEntry.ReadIndex(OutSnapshot, index);
                var element    = indexEntry.ReadMemory(OutSnapshot);
                values.UnionWith(element.PossibleValues);
            }

            valueVariable.WriteMemory(OutSnapshot, new MemoryEntry(values));
        }
Beispiel #4
0
        private void setPropagation(ReadWriteSnapshotEntryBase variable, PropagationInfo propagation)
        {
            var infoValue = Output.CreateInfo(propagation);

            variable.WriteMemory(Output, new MemoryEntry(infoValue));
        }
Beispiel #5
0
        private void setTaint(ReadWriteSnapshotEntryBase variable, bool taint)
        {
            var infoValue = Output.CreateInfo(taint);

            variable.WriteMemory(Output, new MemoryEntry(infoValue));
        }
Beispiel #6
0
 public override void Assign(ReadWriteSnapshotEntryBase target, MemoryEntry value)
 {
     target.WriteMemory(OutSnapshot, value);
 }