Package easysm.datatypes

Examples of easysm.datatypes.Expr


  }

  @Test
  public void doAddStateObserver_OneValidInvariant()
  {
    Expr e = new Expr("Pine");
    StateObserverInfo soInfo = new StateObserverInfo(soPine, Type.INTEGER, e);
    StateObserver so = new StateObserver(soInfo);
    main.doAddStateObserver(soInfo);
    assertTrue(so.invariant().equals(e));
  }
View Full Code Here


  }

  @Test
  public void doUpdateStateObserver_changeInvariant()
  {
    Expr e = new Expr("Pine");
    StateObserverInfo soInfo = new StateObserverInfo(soPine, Type.INTEGER, e);
    main.doAddStateObserver(soInfo);
    StateObserver so = new StateObserver(soInfo);
    Expr newE = new Expr("Pino");
    StateObserverInfo newSoInfo = new StateObserverInfo(soPine, Type.INTEGER, newE);
    main.doUpdateStateObserver(so, newSoInfo);
    assertTrue(so.name().equals(soPine));
    assertTrue(so.type().equals(Type.INTEGER));
    assertTrue(so.invariant().equals(newE));
View Full Code Here

    assertTrue(so.invariant().equals(newE));
  }

  public void doUpdateStateObserver_OneNullInvariant()
  {
    Expr e = new Expr("Pine");
    StateObserverInfo soInfo = new StateObserverInfo(soPine, Type.INTEGER, e);
    main.doAddStateObserver(soInfo);
    StateObserver so = new StateObserver(soInfo);
    StateObserverInfo newSoInfo = new StateObserverInfo(soPine, Type.INTEGER, Expr.EMPTY);
    main.doUpdateStateObserver(so, newSoInfo);
View Full Code Here

  {
    State source = new State(cPine, true);
    State target = new State(cTupe, false);
    CondReactInfo condReactInfo = new CondReactInfo(null, null);
    CondReact cr = new CondReact(condReactInfo);
    Expr cond = new Expr("cond");
    Action react = new Action("react");
    cr.changeRemCond(cond);
    cr.changeRemReact(react);
    EventInfo eInfo = new EventInfo(cGino, null);
    Event e = new Event(eInfo);
View Full Code Here

  {
    State source = new State(cPine, true);
    State target = new State(cTupe, false);
    CondReactInfo condReactInfo = new CondReactInfo(null, null);
    CondReact cr = new CondReact(condReactInfo);
    Expr cond = new Expr("cond");
    Action react = new Action("react");
    cr.changeRemCond(cond);
    cr.changeRemReact(react);
    Transition t = Generator.generateTransition(source, target, Event.CREATED, cr);
    assertTrue(t.source().equals(source));
View Full Code Here

  }

  private void jbutton_okActionPerformed(ActionEvent evt)
  {
    CondReactInfo newCr = new CondReactInfo(
        new Expr(jtextarea_condition.getText()),
        new Action(jtextarea_reaction.getText()));

    if (toMod == null) {
      updateEvents.addCondReact(toAddCondReact, newCr);
    } else {
View Full Code Here

    return true;
  }
 
  private boolean crExists(Event event, CondReactInfo crInfo)
  {
    Expr cond = crInfo.cond();
    for (CondReact cr : event.condsReacts()) {
      if (cr.cond().equals(cond)) {
        return true;
      }
    }
View Full Code Here

    jTextArea_react2.setText(cr.remReact().toString());
   
  }
 
  public SplitInfo getSplitInfo() {
    return new SplitInfo(cr, new Expr(jTextArea_cond1.getText()),
        new Action(jTextArea_react1.getText()),
        new Expr(jTextArea_cond2.getText()),
        new Action(jTextArea_react2.getText()));
  }
View Full Code Here

   * Event Handlers
   */
  private void jbutton_okActionPerformed(ActionEvent evt)
  {
    Type soType = availableTypes[types.getSelectedIndex()];
    Expr soExpr = new Expr(invariant.getText());
    Name soName;

    try {
      soName = new Name(name.getText());
    } catch (InvalidNameException e) {
View Full Code Here

TOP

Related Classes of easysm.datatypes.Expr

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.