Пример #1
0
        public SymbolicVariable GetFreshSymbolic(Variable Origin, ExecutionState owner)
        {
            ++Requests;
            SymbolicVariableStack varStack = null;

            try
            {
                varStack = VariableStacks[Origin];
            }
            catch (KeyNotFoundException)
            {
                // XXX: This is a little misleading the "Pool" doesn't use the owner argument
                // so the SymbolicVariableStack doesn't known about this owner
                varStack = new SymbolicVariableStack(() => Pool.GetFreshSymbolic(Origin, null));
                VariableStacks.Add(Origin, varStack);
            }

            return(varStack.GetVariable(owner));
        }
Пример #2
0
        // Maybe use Modset instead of Procedure??
        public SymbolicVariable GetFreshSymbolic(Procedure proc, int modSetIndex, ExecutionState owner)
        {
            ++Requests;
            SymbolicVariableStack modsetVarStack = null;
            var key = Tuple.Create(proc, modSetIndex);

            try
            {
                modsetVarStack = ModsetStacks[key];
            }
            catch (KeyNotFoundException)
            {
                // XXX: This is a little misleading the "Pool" doesn't use the owner argument
                // so the SymbolicVariableStack doesn't known about this owner
                modsetVarStack = new SymbolicVariableStack(() => Pool.GetFreshSymbolic(proc, modSetIndex, null));
                ModsetStacks.Add(key, modsetVarStack);
            }

            return(modsetVarStack.GetVariable(owner));
        }
Пример #3
0
        public SymbolicVariable GetFreshSymbolic(HavocCmd havocCmd, int varsIndex, ExecutionState owner)
        {
            ++Requests;
            SymbolicVariableStack havocVarStack = null;
            var key = Tuple.Create(havocCmd, varsIndex);

            try
            {
                havocVarStack = HavocCmdStacks[key];
            }
            catch (KeyNotFoundException)
            {
                // XXX: This is a little misleading the "Pool" doesn't use the owner argument
                // so the SymbolicVariableStack doesn't known about this owner
                havocVarStack = new SymbolicVariableStack(() => Pool.GetFreshSymbolic(havocCmd, varsIndex, null));
                HavocCmdStacks.Add(key, havocVarStack);
            }

            return(havocVarStack.GetVariable(owner));
        }