Package edu.cmu.cs.fusion.constraint

Examples of edu.cmu.cs.fusion.constraint.Operation


  @BeforeClass
  static public void setup() {
    utils = new TestUtils();
   
    Operation op;
    Predicate trigger;
    Predicate req;
    List<Effect> effects = new LinkedList<Effect>();
   
    op = new MethodInvocationOp("methodName", "Foo", new SpecVar[] {utils.getVar(0), utils.getVar(1)}, new String[] {"Foo", "Bar"}, "Bar", false);
View Full Code Here


  @BeforeClass
  static public void setup() {
    utils = new TestUtils();
   
    Operation op;
    Predicate trigger;
    Predicate rst;
   
    op = new MethodInvocationOp("methodName", "Foo", new SpecVar[] {utils.getVar(0), utils.getVar(1)}, new String[] {"Foo", "Bar"}, "Bar", false);
    trigger = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
View Full Code Here

    parsed.add(constraint);
  }

  private void parseConstraint(IAnnotation constraint, IType contextType) throws JavaModelException {
    FPLParser parser = new FPLParser(rels, contextType);
    Operation op = null;
    Predicate trigger = null, requires = null, restrict = null;
    List<Effect> effects = new LinkedList<Effect>();
   
    try {
      for (IMemberValuePair pair : constraint.getMemberValuePairs()) {
View Full Code Here

      }
    }
    parsed.add(method);
    assert(effects.size() > 0);
   
    Operation op;
    //this effect could be on a method OR a constructor.
    if (method.isConstructor()) {
      IType contextType = method.getDeclaringType();
      String type = contextType.getFullyQualifiedName();
      String[] paramTypes = new String[method.getParameterTypes().length];
View Full Code Here

      params[ndx] = new SpecVar(methodType.getParameterNames()[ndx]);
    }
   
    boolean isStatic = Flags.isStatic(methodType.getFlags());
   
    Operation op = new BeginOfMethodOp(declaringType.getFullyQualifiedName(), methodType.getElementName(), params, paramTypes, isStatic);
    List<Effect> effects = new LinkedList<Effect>();
    effects.add(RelEffect.createAddEffect(relation, new SpecVar[] {Constraint.RECEIVER}));
   
    String owner = methodType.getDeclaringType().getFullyQualifiedName();
    constraints.add(new Constraint(owner, op, new TruePredicate(), new TruePredicate(), new TruePredicate(), effects));
View Full Code Here

  @BeforeClass
  static public void setup() {
    utils = new TestUtils();
   
    Operation op;
    Predicate trigger;
    Predicate req;
    List<Effect> effects = new LinkedList<Effect>();
   
    op = new MethodInvocationOp("methodName", "Foo", new SpecVar[] {utils.getVar(0)}, new String[] {"Bar"}, "Foo", false);
View Full Code Here

   
    AliasDelta expected = new AliasDelta();
    expected.addChange(instr.getTarget(), labels[3]);
    expected.addChange(instr.getArgOperands().get(0), labels[5])
   
    Operation op = new ConstructorOp("Foo", new SpecVar[] {utils.getVar(0)}, new String[] {"Bar"});
    List<Effect> effects = new LinkedList<Effect>();
    effects.add(RelEffect.createRemoveEffect(utils.getRelation(1), new SpecVar[] {utils.getVar(0), utils.getVar(0)}));
    effects.add(RelEffect.createAddEffect(utils.getRelation(0), new SpecVar[] {Constraint.RESULT, utils.getVar(0)}));
   
    Constraint cons = new Constraint("", op, new TruePredicate(), new TruePredicate(), new TruePredicate(), effects);
View Full Code Here

TOP

Related Classes of edu.cmu.cs.fusion.constraint.Operation

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.