edu.cmu.cs.crystal.tac
Interface ITACTransferFunction<LE>

Type Parameters:
LE - Type representing the analysis knowledge.
All Superinterfaces:
IFlowAnalysisDefinition<LE>
All Known Implementing Classes:
AbstractingTransferFunction, LiveVariableTransferFunction

public interface ITACTransferFunction<LE>
extends IFlowAnalysisDefinition<LE>

Interface for defining flow analysis transfer functions based on 3-address code instructions. Implement this interface directly or use one of the pre-defined abstract base classes for it. Use this interface for defining standard flow analyses; use ITACBranchSensitiveTransferFunction for branch-sensitive flow analyses. To create a flow analysis, pass an instance of this interface to TACFlowAnalysis.

Author:
Kevin Bierhoff
See Also:
TACInstruction

Method Summary
 void setAnalysisContext(ITACAnalysisContext context)
          This method is used to pass a variable query interface to the transfer function.
 LE transfer(ArrayInitInstruction instr, LE value)
           
 LE transfer(BinaryOperation binop, LE value)
           
 LE transfer(CastInstruction instr, LE value)
           
 LE transfer(ConstructorCallInstruction instr, LE value)
           
 LE transfer(CopyInstruction instr, LE value)
           
 LE transfer(DotClassInstruction instr, LE value)
           
 LE transfer(EnhancedForConditionInstruction instr, LE value)
           
 LE transfer(InstanceofInstruction instr, LE value)
           
 LE transfer(LoadArrayInstruction instr, LE value)
           
 LE transfer(LoadFieldInstruction instr, LE value)
           
 LE transfer(LoadLiteralInstruction instr, LE value)
           
 LE transfer(MethodCallInstruction instr, LE value)
           
 LE transfer(NewArrayInstruction instr, LE value)
           
 LE transfer(NewObjectInstruction instr, LE value)
           
 LE transfer(ReturnInstruction instr, LE value)
           
 LE transfer(SourceVariableDeclaration instr, LE value)
           
 LE transfer(SourceVariableReadInstruction instr, LE value)
           
 LE transfer(StoreArrayInstruction instr, LE value)
           
 LE transfer(StoreFieldInstruction instr, LE value)
           
 LE transfer(UnaryOperation unop, LE value)
           
 
Methods inherited from interface edu.cmu.cs.crystal.flow.IFlowAnalysisDefinition
createEntryValue, getAnalysisDirection, getLatticeOperations
 

Method Detail

setAnalysisContext

void setAnalysisContext(ITACAnalysisContext context)
This method is used to pass a variable query interface to the transfer function. Transfer functions can, but do not have to, store the passed object in one of their fields for future use. The provided object can be used to find Variable objects for AST nodes. Note that the entire context should be stored, and not individual variables like ThisVariable. This is because this method will be called in a state where the context is not yet ready for calls to methods like getThisVariable().

Parameters:
context - Interface to query for variables given AST nodes.

transfer

LE transfer(ArrayInitInstruction instr,
            LE value)

transfer

LE transfer(BinaryOperation binop,
            LE value)

transfer

LE transfer(CastInstruction instr,
            LE value)

transfer

LE transfer(DotClassInstruction instr,
            LE value)

transfer

LE transfer(ConstructorCallInstruction instr,
            LE value)

transfer

LE transfer(CopyInstruction instr,
            LE value)

transfer

LE transfer(EnhancedForConditionInstruction instr,
            LE value)

transfer

LE transfer(InstanceofInstruction instr,
            LE value)

transfer

LE transfer(LoadLiteralInstruction instr,
            LE value)

transfer

LE transfer(LoadArrayInstruction instr,
            LE value)

transfer

LE transfer(LoadFieldInstruction instr,
            LE value)

transfer

LE transfer(MethodCallInstruction instr,
            LE value)

transfer

LE transfer(NewArrayInstruction instr,
            LE value)

transfer

LE transfer(NewObjectInstruction instr,
            LE value)

transfer

LE transfer(ReturnInstruction instr,
            LE value)

transfer

LE transfer(StoreArrayInstruction instr,
            LE value)

transfer

LE transfer(StoreFieldInstruction instr,
            LE value)

transfer

LE transfer(SourceVariableDeclaration instr,
            LE value)

transfer

LE transfer(SourceVariableReadInstruction instr,
            LE value)

transfer

LE transfer(UnaryOperation unop,
            LE value)