Package edu.cmu.cs.fusion

Examples of edu.cmu.cs.fusion.BooleanContext


      while (itr.hasNext()) {
        params.add(getAnalysisContext().getSourceVariable(itr.next().resolveBinding()));
      }   
      EntryInstruction entry = new EntryInstruction(thisVar, params, method.resolveBinding());
     
      BooleanContext bContext = new BooleanConstantWrapper(method.getBody(), mainAnalysis.getBooleanAnalysis(), aliases);
      FusionEnvironment<AC> env = new FusionEnvironment<AC>(aliases, startingContext, bContext, types, infers, mainAnalysis.getVariant());
     
      return convertToLattice(checker.runGenericTransfer(env, entry), aliases);
    }
    else {
View Full Code Here


      ILabel trueLabel = BooleanLabel.getBooleanLabel(true);
      ILabel falseLabel = BooleanLabel.getBooleanLabel(false);
     
      //true branch
      AC aAfterContextTrue = aliasResults.get(trueLabel);
      BooleanContext tBContext = new BooleanConstantWrapper(instr, mainAnalysis.getBooleanAnalysis(), aBeforeContext, aAfterContextTrue, true);
      FusionEnvironment<AC> tEnv = new FusionEnvironment<AC>(aAfterContextTrue, relsContext, tBContext, types, infers, mainAnalysis.getVariant());
      FusionLattice<AC> tPair = convertToLattice(checker.runGenericTransfer(tEnv, instr), aAfterContextTrue);
     
      //false branch
      AC aAfterContextFalse = aliasResults.get(falseLabel);
      BooleanContext fBContext = new BooleanConstantWrapper(instr, mainAnalysis.getBooleanAnalysis(), aBeforeContext, aAfterContextFalse, false);
      FusionEnvironment<AC> fEnv = new FusionEnvironment<AC>(aAfterContextFalse, relsContext, fBContext, types, infers, mainAnalysis.getVariant());
      FusionLattice<AC> fPair = convertToLattice(checker.runGenericTransfer(fEnv, instr), aAfterContextFalse);

     
      FusionLattice<AC> defPair = new FusionLattice<AC>(new RelationshipContext(false), aliasResults.get(NormalLabel.getNormalLabel()), aliasResults.get(NormalLabel.getNormalLabel()));
   
      LabeledResult<FusionLattice<AC>> result = LabeledResult.createResult(labels, defPair);
      result.put(trueLabel, tPair);
      result.put(falseLabel, fPair);
      return result;
    }
    else {
      AC aAfterContext = aliasResults.get(NormalLabel.getNormalLabel());
      BooleanContext bContext = new BooleanConstantWrapper(instr, mainAnalysis.getBooleanAnalysis(), aAfterContext);
      FusionEnvironment<AC> env = new FusionEnvironment<AC>(aAfterContext, relsContext, bContext, types, infers, mainAnalysis.getVariant());
      FusionLattice<AC> pair = convertToLattice(checker.runGenericTransfer(env, instr), aAfterContext);
     
      return LabeledSingleResult.createResult(pair, labels);
    }
View Full Code Here

    AC aBeforeContext = value.getAliasContext();
    RelationshipContext relsContext = value.getRelContext();
    IResult<AC> aliasResults = aliasTF.transfer(instr, labels, aliasOps.copy(aBeforeContext));
    AC aAfterContext = aliasResults.get(NormalLabel.getNormalLabel());

    BooleanContext bContext = new BooleanConstantWrapper(instr, mainAnalysis.getBooleanAnalysis(), aAfterContext);
    FusionEnvironment<AC> env = new FusionEnvironment<AC>(aAfterContext, relsContext, bContext, types, infers, mainAnalysis.getVariant());
    FusionLattice<AC> pair = convertToLattice(checker.runGenericTransfer(env, instr), aAfterContext);
 
    return LabeledSingleResult.createResult(pair, labels);
  }
View Full Code Here

TOP

Related Classes of edu.cmu.cs.fusion.BooleanContext

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.