Package edu.cmu.cs.fusion.constraint

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


        opParams[ndx] = new SpecVar(method.getParameterNames()[ndx]);
      }
      op = new MethodInvocationOp(methodName, receiverType, opParams, paramTypes, returnType, isStatic);
    }
    String owner = method.getDeclaringType().getFullyQualifiedName();
    constraints.add(new Constraint(owner, op, new TruePredicate(), new TruePredicate(), new TruePredicate(), effects));
  }
View Full Code Here


    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

    trigger = new TruePredicate();
    req = new TruePredicate();
    effects.add(RelEffect.createRemoveEffect(utils.getRelation(0), new SpecVar[] {Constraint.RECEIVER, utils.getVar(0)}));
    effects.add(RelEffect.createAddEffect(utils.getRelation(0), new SpecVar[] {Constraint.RESULT, utils.getVar(0)}));
   
    cons = new Constraint("", op, trigger, new TruePredicate(), req, effects);
   
    labels = new ObjectLabel[7];
    labels[0] = new AbstractObjectLabel("0", "Foo");
    labels[1] = new AbstractObjectLabel("1", "Bar");
    labels[2] = new AbstractObjectLabel("2", "Baz");
View Full Code Here

    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);

    FusionEnvironment<?> env = new FusionEnvironment<TestAliasContext>(aliases, rels, null, types, new InferenceEnvironment(null), variant);   
    Pair<RelationshipDelta, AliasDelta> deltas = runSingleConstraint(env, cons, instr);
    FusionErrorReport error = checkSingleConstraint(env, cons, instr);
    Relationship eff1 = new Relationship(utils.getRelation(1), new ObjectLabel[]{labels[5], labels[5]});
View Full Code Here

TOP

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

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.