Exemplo n.º 1
0
 /** Resets the execution context. */
 public void reset() {
   locus.extensionalValues = new ExtensionalValueList();
   breakpoints = new HashMap<ActivityNode, Breakpoint>();
   activityExecutionOutput = new HashMap<Integer, ParameterValueList>();
   executionStatus = new ExecutionStatus();
   traceHandler = new TraceHandler(executionStatus);
   eventHandler = new EventHandler(executionStatus);
   eventHandler.addPrimaryEventListener(traceHandler);
 }
Exemplo n.º 2
0
  protected ExecutionContext() {
    eventHandler.addPrimaryEventListener(traceHandler);

    /*
     * Locus initialization
     */
    this.locus = new Locus();
    this.locus.setFactory(new ExecutionFactoryL3()); // Uses local subclass for ExecutionFactory
    this.locus.setExecutor(new Executor());

    // this.locus.factory.setStrategy(new RedefinitionBasedDispatchStrategy()); //TODO remove
    this.locus.factory.setStrategy(new InheritanceBasedDispatchStrategy());
    this.locus.factory.setStrategy(new FIFOGetNextEventStrategy());
    this.locus.factory.setStrategy(new FirstChoiceStrategy());

    this.createPrimitiveType("Boolean");
    this.createPrimitiveType("String");
    this.createPrimitiveType("Integer");
    this.createPrimitiveType("UnlimitedNatural");
  }