Interface VarnodeEvaluator<T>

Type Parameters:
T - the type of values resulting from evaluation
All Known Implementing Classes:
AbstractVarnodeEvaluator, ArithmeticVarnodeEvaluator

public interface VarnodeEvaluator<T>
An evaluator of high varnodes

This is a limited analog to PcodeExecutor but for high p-code. It is limited in that it can only "execute" parts of the AST that represent expressions, as a means of evaluating them. If it encounters, e.g., a PcodeOp.MULTIEQUAL or phi node, it will terminate throw an exception.

  • Method Details

    • evaluateVarnode

      T evaluateVarnode(Program program, Varnode vn)
      Evaluate a varnode
      Parameters:
      program - the program containing the varnode
      vn - the varnode to evaluate
      Returns:
      the value of the varnode
    • evaluateStorage

      T evaluateStorage(Program program, VariableStorage storage)
      Evaluate variable storage

      Each varnode is evaluated as in evaluateStorage(Program, VariableStorage) and then concatenated. The lower-indexed varnodes in storage are the more significant pieces, similar to big endian.

      Parameters:
      program - the program containing the variable storage
      storage - the storage
      Returns:
      the value of the storage
    • evaluateOp

      T evaluateOp(Program program, PcodeOp op)
      Evaluate a high p-code op
      Parameters:
      program - the program containing the op
      op - the p-code op
      Returns:
      the value of the op's output