Package gov.nasa.jpf.jvm.bytecode

Examples of gov.nasa.jpf.jvm.bytecode.InstanceInvocation


   */
  @Override
  public void executeInstruction(VM vm, ThreadInfo currentThread, Instruction instructionToExecute) {
    super.executeInstruction(vm, currentThread, instructionToExecute);

    InstanceInvocation ii;
    int callerRef;
    ElementInfo elementInfo;
    int port;
    if (JointstatesListener.side == Side.CLIENT) {
      // Before Socket.connect()
      if ((instructionToExecute instanceof InstanceInvocation) && (instructionToExecute.getAttr() == JointstatesInstructionFactory.connectFlag)) {
        ii = (InstanceInvocation) instructionToExecute;
        callerRef = ii.getCalleeThis(currentThread);
        elementInfo = vm.getHeap().get(callerRef);
        port = elementInfo.getIntField("port");
        logger.warning("jointstates connect to port " + port);

        // Save current state to continue model checking from this point later
        // PortCollector.addPort(vm.getSearch().getDepth(), port);

        // Reached the next connect() level, backtrack
        // vm.getSearch().setIgnoredState(true);
      }
    }

    if (JointstatesListener.side == Side.SERVER) {
      // ServerSocket.accept()
      if ((instructionToExecute instanceof InstanceInvocation) && (instructionToExecute.getAttr() == JointstatesInstructionFactory.acceptFlag)) {
        ii = (InstanceInvocation) instructionToExecute;
        callerRef = ii.getCalleeThis(currentThread);
        elementInfo = vm.getHeap().get(callerRef);
        port = elementInfo.getIntField("port");
        logger.warning("jointstates accept on port " + port);

        //@formatter:off
View Full Code Here

TOP

Related Classes of gov.nasa.jpf.jvm.bytecode.InstanceInvocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.