Examples of Program


Examples of org.eclipse.swt.program.Program

          Debug.printStackTrace(t);
        }
      }

      if (imageData == null) {
        Program program = Program.findProgram(ext);
        if (program != null) {
          imageData = program.getImageData();
        }
      }

      if (imageData != null) {
        image = new Image(Display.getDefault(), imageData);
View Full Code Here

Examples of org.ethereum.vm.Program

        repository.saveCode(contractAddrB, codeB);
        repository.addStorageRow(contractAddrB, key1, value1);

        // Play the program
        VM vm = new VM();
        Program program = new Program(codeB, pi);

        try {
            while(!program.isStopped())
                vm.step(program);
        } catch (RuntimeException e) {
            program.setRuntimeFailure(e);
        }

        System.out.println();
        System.out.println("============ Results ============");

        BigInteger balance = repository.getBalance(callerAddrB);

        System.out.println("*** Used gas: " + program.getResult().getGasUsed());
        System.out.println("*** Contract Balance: " + balance);

        // todo: assert caller balance after contract exec

        repository.close();
        assertEquals(expectedGas, program.getResult().getGasUsed());
    }
View Full Code Here

Examples of org.jakstab.Program

  @Override
  public Precision initPrecision(Location location, StateTransformer transformer) {
    ExplicitPrecision p = new ExplicitPrecision(varThreshold.getValue());
   
    // Increase precision of ecx, esi, edi for REP prefixed instructions
    Program program = Program.getProgram();
    if (BoundedAddressTracking.repPrecBoost.getValue()) {
      AbsoluteAddress addr = location.getAddress();
      X86Instruction instr = (X86Instruction)program.getInstruction(addr);
      if (instr != null && (instr.hasPrefixREPZ() || instr.hasPrefixREPNZ())) {
        logger.debug("boost-rep: REP instruction at " + location + ", increasing precision of loop registers.");
        p.setThreshold(ExpressionFactory.createVariable("%ecx"), 1000);
        p.setThreshold(ExpressionFactory.createVariable("%esi"), 1000);
        p.setThreshold(ExpressionFactory.createVariable("%edi"), 1000);
View Full Code Here

Examples of org.nlogo.api.Program

    createPatches(minPxcor, maxPxcor, minPycor, maxPycor, 0, 0);
  }

  @Override
  public Program newProgram() {
    return new Program(true);
  }
View Full Code Here

Examples of org.openmrs.Program

      for(int i = 0; i < programs.length; i++)
      {
        String prog = programs[i];
        if(prog != null && prog.trim().length() > 0)
        {
          Program personProgram = Context.getProgramWorkflowService().getProgramByUuid(prog);
          if(personProgram == null)
          {
            personProgram = Context.getProgramWorkflowService().getProgram(Integer.parseInt(prog));
          }
          if(personProgram != null)
View Full Code Here

Examples of org.spw.model.Program

        VolunteerApplication application = getSessionBean1().getVolunteer().getApplication();
        if (application == null) {
            return null;
        }
        getSessionBean1().setVolunteerApplication(application);
        Program program = application.getProgram();
        getSessionBean1().setProgram(program);
       
        return "application";
    }
View Full Code Here

Examples of org.teavm.model.Program

* @author Alexey Andreev
*/
public class ProgramIOTest {
    @Test
    public void emptyInstruction() {
        Program program = new Program();
        BasicBlock block = program.createBasicBlock();
        block.getInstructions().add(new EmptyInstruction());

        program = inputOutput(program);
        block = program.basicBlockAt(0);

        assertThat(block.getInstructions().size(), is(1));
        assertThat(block.getInstructions().get(0), instanceOf(EmptyInstruction.class));
    }
View Full Code Here

Examples of org.teiid.query.processor.proc.Program

          }
        }

        Block block = cupc.getBlock();

    Program programBlock = planBlock(cupc, block, metadata, debug, idGenerator, capFinder, analysisRecord, context);

        if(debug) {
            analysisRecord.println("\n####################################################"); //$NON-NLS-1$
        }
               
View Full Code Here

Examples of org.teiid.query.processor.xml.Program

    public void testTempGroupPlan() throws Exception {
        QueryMetadataInterface qmi = example1();
       
        XMLPlan plan = helpPlan("SELECT * FROM vm1.doc6", qmi); //$NON-NLS-1$
       
        Program program = plan.getOriginalProgram();

        int i = 0;
        assertTrue(program.getInstructionAt(i++) instanceof ExecStagingTableInstruction);
        assertTrue(program.getInstructionAt(i++) instanceof ExecSqlInstruction);
        assertTrue(program.getInstructionAt(i++) instanceof BlockInstruction);
        assertTrue(program.getInstructionAt(i++) instanceof MoveCursorInstruction);
        assertTrue(program.getInstructionAt(i++) instanceof WhileInstruction);
        assertTrue(program.getInstructionAt(i++) instanceof EndBlockInstruction);
        assertTrue(program.getInstructionAt(i++) instanceof ExecStagingTableInstruction);
    }
View Full Code Here

Examples of org.xtext.tortoiseshell.tortoiseShell.Program

      _builder.append("\t");
      _builder.append("turnLeft(10)");
      _builder.newLine();
      _builder.append("end");
      _builder.newLine();
      final Program program = this._parseHelper.parse(_builder);
      this._tortoiseShellInterpeter.run(tortoise, program, (-10));
      final Procedure1<Tortoise> _function_1 = new Procedure1<Tortoise>() {
        public void apply(final Tortoise it) {
          boolean _isPaint = it.isPaint();
          Assert.assertFalse(_isPaint);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.