Package edu.cmu.cs.fusion.relationship

Examples of edu.cmu.cs.fusion.relationship.RelationshipContext


    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[0], labels[3]}), SevenPointLattice.FAL);
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[1], labels[2]}), SevenPointLattice.TRU);
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[1], labels[3]}), SevenPointLattice.FAL);
    delta.setRelationship(new Relationship(relations[1], new ObjectLabel[] {labels[2], labels[3]}), SevenPointLattice.TRU);
    delta.setRelationship(new Relationship(relations[1], new ObjectLabel[] {labels[3], labels[2]}), SevenPointLattice.UNK);
    contexts[0] = new RelationshipContext(true).applyChangesFromDelta(delta);
   
    delta = new RelationshipDelta();
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[0], labels[2]}), SevenPointLattice.TRU);
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[0], labels[3]}), SevenPointLattice.FAL);
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[1], labels[2]}), SevenPointLattice.FAL);
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[1], labels[3]}), SevenPointLattice.TRU);
    delta.setRelationship(new Relationship(relations[1], new ObjectLabel[] {labels[2], labels[3]}), SevenPointLattice.UNK);
    delta.setRelationship(new Relationship(relations[1], new ObjectLabel[] {labels[3], labels[2]}), SevenPointLattice.UNK);
    contexts[1] = new RelationshipContext(true).applyChangesFromDelta(delta);

    delta = new RelationshipDelta();
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[0], labels[2]}), SevenPointLattice.TRU);
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[0], labels[3]}), SevenPointLattice.FAL);
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[1], labels[2]}), SevenPointLattice.UNK);
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[1], labels[3]}), SevenPointLattice.UNK);
    delta.setRelationship(new Relationship(relations[1], new ObjectLabel[] {labels[2], labels[3]}), SevenPointLattice.UNK);
    delta.setRelationship(new Relationship(relations[1], new ObjectLabel[] {labels[3], labels[2]}), SevenPointLattice.UNK);
    contexts[2] = new RelationshipContext(true).applyChangesFromDelta(delta);

    delta = new RelationshipDelta();
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[0], labels[2]}), SevenPointLattice.TRU);
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[0], labels[3]}), SevenPointLattice.UNK);
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[1], labels[2]}), SevenPointLattice.FAL);
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[1], labels[3]}), SevenPointLattice.UNK);
    delta.setRelationship(new Relationship(relations[1], new ObjectLabel[] {labels[2], labels[3]}), SevenPointLattice.UNK);
    delta.setRelationship(new Relationship(relations[1], new ObjectLabel[] {labels[3], labels[2]}), SevenPointLattice.UNK);
    contexts[3] = new RelationshipContext(true).applyChangesFromDelta(delta);
   
   
    delta = new RelationshipDelta();
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[0], labels[2]}), SevenPointLattice.TRU);
    delta.setRelationship(new Relationship(relations[0], new ObjectLabel[] {labels[1], labels[3]}), SevenPointLattice.FAL);
View Full Code Here


    }
  }

  private void check(TACInstruction instr, ASTNode node) {
    AliasContext triggerAliases = fa.getPointsToResultsIntermediate(node);
    RelationshipContext rels = fa.getRelResultsBefore(node);
    BooleanContext bools = new BooleanConstantWrapper(node, fa.getBooleanAnalysis(), triggerAliases);
    FusionEnvironment<?> triggerEnv = new FusionEnvironment<AliasContext>(triggerAliases, rels , bools, fa.getHierarchy(), fa.getInfers(), fa.getVariant());
   
    if (rels.isBottom()) {
      log.log(Level.WARNING, "Found an unanalyzed node in " + className + ": " + node.toString());
      return;
    }
   
    List<FusionErrorReport> errors = checker.checkForErrors(triggerEnv, instr);
View Full Code Here

  public Set<ObjectLabel> getAllLabels() {
    return new HashSet<ObjectLabel>();
  }

  public RelationshipContext getStartContext() {
    return new RelationshipContext(false);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see edu.cmu.cs.fusion.xml.DeclarativeRetriever#getStartContext()
   */
  public RelationshipContext getStartContext() {
    return new RelationshipContext(false).applyChangesFromDelta(delta);
  }
View Full Code Here

   
    if (val == ThreeValue.UNKNOWN) {
      RelationshipDelta delta = env.getInferredDelta(this, sub);
     
      if (delta != null) {
        RelationshipContext newContext = env.getContext().applyChangesFromDelta(delta);
        FusionEnvironment newEnv = env.copy(newContext);
        val = getTruth(newEnv, sub);
      }
    }
   
View Full Code Here

      sharedData.checkForProjectReset(compUnit.getJavaProject(), analysisInput.getProgressMonitor().isSome() ? analysisInput.getProgressMonitor().unwrap() : null);
      retriever.retrieveRelationships(ResourcesPlugin.getWorkspace().getRoot(), sharedData.getHierarchy());
     
      ConstraintChecker checker = new ConstraintChecker(constraints, getHierarchy(), variant, null);
      NoVarsAliasContext aContext = new NoVarsAliasContext(retriever.getAllLabels());
      RelationshipContext rels = retriever.getStartContext();
      new ErrorReporterVisitor<AC>(this, checker, reporter, null, compUnitName).checkXMLError(aContext, rels, rootNode);
     
    } catch (JavaModelException e) {
      log.log(Level.SEVERE, "Could not set up compilation unit for analysis", e);
      majorErrorOccured = true;
View Full Code Here

      fa = new TACFlowAnalysis<FusionLattice<AC>>(tfR, this.analysisInput.getComUnitTACs().unwrap());
     
      ConstantTransferFunction tfC = new ConstantTransferFunction();
      constants = new TACFlowAnalysis<TupleLatticeElement<Variable, BooleanConstantLE>>(tfC, this.analysisInput.getComUnitTACs().unwrap());

      RelationshipContext finalLattice = fa.getEndResults(methodDecl).getRelContext();
     
      reportResults(methodDecl, tfR.getConstraintChecker());
   
    } catch (FusionException e) {
      log.log(Level.SEVERE, "Error in Fusion analysis", e);
View Full Code Here

TOP

Related Classes of edu.cmu.cs.fusion.relationship.RelationshipContext

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.