edu.toronto.cs.yasm.abstractor
Class PredicateRefiner

java.lang.Object
  extended by edu.toronto.cs.yasm.abstractor.PredicateRefiner
All Implemented Interfaces:
Refiner
Direct Known Subclasses:
BranchPredicateRefiner, CBJPredicateRefiner, CFFCPredicateRefiner, LadderPredicateRefiner

public class PredicateRefiner
extends java.lang.Object
implements Refiner


Field Summary
 YasmStatistics stats
           
 
Constructor Summary
PredicateRefiner(ExprFactory _fac)
           
PredicateRefiner(ExprFactory _fac, java.util.List _newPredicates)
           
 
Method Summary
 void addPredicate(Expr p)
          Deprecated. Use addToNewPredicates
 void addPredicates(java.util.List l)
          Deprecated. Use addToNewPredicates
 void addToNewPredicates(Expr p)
           
 void addToNewPredicates(java.util.List l)
           
protected  java.util.List computeDependency(java.util.List l, Expr e, java.util.Map m)
           
 CVCLMemoryModel computeMemoryModel(PrllAsmtPStmt s)
           
 MemoryModel computeRegularMemoryModel(PrllAsmtPStmt s)
           
protected  boolean contains(Expr e, java.util.List l)
           
 PrllAsmtPStmt doAsmtRefine(PrllAsmtPStmt s)
           
 PCond doCondRefine(PCond e)
           
 void doDeclRefine(PDecl pDecl)
          Registers a variable v corresponding to pDecl with the vc and also stores a reference to v in pDecl (to prevent CVCL from garbage collecting v).
 void doDeclsRefine(PProgram p)
           
 FunctionCallPStmt doFunctionCallRefine(FunctionCallPStmt fcall)
           
 void doFunctionDeclsRefine(PFunctionDef f)
           
 PFunctionDef doFunctionRefine(PFunctionDef f)
           
 GotoPStmt doGotoRefine(GotoPStmt s)
           
 IfPStmt doIfRefine(IfPStmt s)
           
 PStmt doInsideFunctionRefine(PStmt s)
           
 NDGotoPStmt doNDGotoRefine(NDGotoPStmt s)
           
 PProgram doProgramRefine(PProgram p)
           
 ReturnSelectorPStmt doReturnSelectorRefine(ReturnSelectorPStmt s)
           
 SkipPStmt doSkipRefine(SkipPStmt skip)
           
protected  java.util.List findVars(Expr e)
           
 CVCLExprConverter getCVCLConverter()
           
 CVCLMemoryModel getMemoryModel(PrllAsmtPStmt asmt)
           
 java.util.List getNewPredicates()
           
 java.util.List getPredicates()
           
 ValidityChecker getVC()
           
 WPComputer getWPComputer(PrllAsmtPStmt asmt)
           
 boolean hasNewPredicates()
           
 boolean knownCond(Expr expr)
           
 void readPredicates(java.io.Reader in)
          Parses stream read from Reader; each predicate parsed is added to the list of predicates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stats

public YasmStatistics stats
Constructor Detail

PredicateRefiner

public PredicateRefiner(ExprFactory _fac)

PredicateRefiner

public PredicateRefiner(ExprFactory _fac,
                        java.util.List _newPredicates)
Method Detail

getPredicates

public java.util.List getPredicates()

getNewPredicates

public java.util.List getNewPredicates()

getVC

public ValidityChecker getVC()

getCVCLConverter

public CVCLExprConverter getCVCLConverter()

addToNewPredicates

public void addToNewPredicates(java.util.List l)

addToNewPredicates

public void addToNewPredicates(Expr p)

addPredicates

public void addPredicates(java.util.List l)
Deprecated. Use addToNewPredicates


addPredicate

public void addPredicate(Expr p)
Deprecated. Use addToNewPredicates


doProgramRefine

public PProgram doProgramRefine(PProgram p)
Specified by:
doProgramRefine in interface Refiner

doDeclsRefine

public void doDeclsRefine(PProgram p)

doFunctionDeclsRefine

public void doFunctionDeclsRefine(PFunctionDef f)

hasNewPredicates

public boolean hasNewPredicates()

doDeclRefine

public void doDeclRefine(PDecl pDecl)
Registers a variable v corresponding to pDecl with the vc and also stores a reference to v in pDecl (to prevent CVCL from garbage collecting v).

Parameters:
pDecl - the declaration to process.

doFunctionRefine

public PFunctionDef doFunctionRefine(PFunctionDef f)

doInsideFunctionRefine

public PStmt doInsideFunctionRefine(PStmt s)

doIfRefine

public IfPStmt doIfRefine(IfPStmt s)

knownCond

public boolean knownCond(Expr expr)

doCondRefine

public PCond doCondRefine(PCond e)

getMemoryModel

public CVCLMemoryModel getMemoryModel(PrllAsmtPStmt asmt)

getWPComputer

public WPComputer getWPComputer(PrllAsmtPStmt asmt)

computeRegularMemoryModel

public MemoryModel computeRegularMemoryModel(PrllAsmtPStmt s)

computeMemoryModel

public CVCLMemoryModel computeMemoryModel(PrllAsmtPStmt s)

doAsmtRefine

public PrllAsmtPStmt doAsmtRefine(PrllAsmtPStmt s)

doGotoRefine

public GotoPStmt doGotoRefine(GotoPStmt s)

doReturnSelectorRefine

public ReturnSelectorPStmt doReturnSelectorRefine(ReturnSelectorPStmt s)

doNDGotoRefine

public NDGotoPStmt doNDGotoRefine(NDGotoPStmt s)

doSkipRefine

public SkipPStmt doSkipRefine(SkipPStmt skip)

doFunctionCallRefine

public FunctionCallPStmt doFunctionCallRefine(FunctionCallPStmt fcall)

readPredicates

public void readPredicates(java.io.Reader in)
                    throws antlr.RecognitionException,
                           antlr.TokenStreamException
Parses stream read from Reader; each predicate parsed is added to the list of predicates.

Parameters:
in - Source of predicates.
Throws:
antlr.RecognitionException
antlr.TokenStreamException

computeDependency

protected java.util.List computeDependency(java.util.List l,
                                           Expr e,
                                           java.util.Map m)

contains

protected boolean contains(Expr e,
                           java.util.List l)

findVars

protected java.util.List findVars(Expr e)