edu.toronto.cs.yasm.abstractor
Class PredicateRefiner
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
stats
public YasmStatistics stats
PredicateRefiner
public PredicateRefiner(ExprFactory _fac)
PredicateRefiner
public PredicateRefiner(ExprFactory _fac,
java.util.List _newPredicates)
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)