Пример #1
0
  /*
   * (non-Javadoc)
   * @see gov.nasa.jpf.jdart.objects.SymbolicObjectHandler#annotateObject(gov.nasa.jpf.vm.ElementInfo, java.lang.String, gov.nasa.jpf.jdart.objects.SymbolicObjectsContext)
   */
  @Override
  public void annotateObject(ElementInfo ei, String name, SymbolicObjectsContext ctx) {
    int size = ei.getIntField(sizeField);
    int edRef = ei.getReferenceField(edField);
    Heap heap = ctx.getHeap();
    ElementInfo data = heap.get(edRef);
    if (data == null) return;

    for (int i = 0; i < size; i++) {
      int elemRef = data.getReferenceElement(i);
      ElementInfo elem = heap.get(elemRef);
      if (elem == null) continue;
      ctx.processObject(elem, name + "[" + i + "]");
    }
  }