tip.cfg
Class CFGAnalysisAdapter

java.lang.Object
  extended by tip.cfg.CFGAnalysisAdapter
All Implemented Interfaces:
ICFGAnalysis
Direct Known Subclasses:
FlowAnalysis

public class CFGAnalysisAdapter
extends Object
implements ICFGAnalysis

CFGAnalysisAdapter implements ICFGAnalysis by defering all case-methods to defaultNode(Node,IProgramPoint).

Author:
Johnni Winther, jw@brics.dk

Constructor Summary
CFGAnalysisAdapter()
           
 
Method Summary
 boolean caseCAssignPtrStmPoint(AAssignPtrStm node, CAssignPtrStmPoint point)
          Default implementation.
 boolean caseCAssignVarStmPoint(AAssignVarStm node, CAssignVarStmPoint point)
          Default implementation.
 boolean caseCBinopExpPoint(ABinopExp node, CBinopExpPoint point)
          Default implementation.
 boolean caseCBlockPoint(ABlock node, CBlockPoint point)
          Default implementation.
 boolean caseCDeclStmPoint(ADeclStm node, CDeclStmPoint point)
          Default implementation.
 boolean caseCDerefExpPoint(ADerefExp node, CDerefExpPoint point)
          Default implementation.
 boolean caseCFunctionCallExpPoint(AFunctionCallExp node, CFunctionCallExpPoint point)
          Default implementation.
 boolean caseCFunctionPtrCallExpPoint(AFunctionPtrCallExp node, CFunctionPtrCallExpPoint point)
          Default implementation.
 boolean caseCIfThenElseStmPoint(AIfThenElseStm node, CIfThenElseStmPoint point)
          Default implementation.
 boolean caseCIfThenStmPoint(AIfThenStm node, CIfThenStmPoint point)
          Default implementation.
 boolean caseCInputExpPoint(AInputExp node, CInputExpPoint point)
          Default implementation.
 boolean caseCIntConstExpPoint(AIntConstExp node, CIntConstExpPoint point)
          Default implementation.
 boolean caseCMallocExpPoint(AMallocExp node, CMallocExpPoint point)
          Default implementation.
 boolean caseCNullExpPoint(ANullExp node, CNullExpPoint point)
          Default implementation.
 boolean caseCOutputStmPoint(AOutputStm node, COutputStmPoint point)
          Default implementation.
 boolean caseCPointerExpPoint(APointerExp node, CPointerExpPoint point)
          Default implementation.
 boolean caseCReturnStmPoint(AReturnStm node, CReturnStmPoint point)
          Default implementation.
 boolean caseCVarExpPoint(AVarExp node, CVarExpPoint point)
          Default implementation.
 boolean caseCWhileStmPoint(AWhileStm node, CWhileStmPoint point)
          Default implementation.
 boolean caseEntryPoint(Node node, EntryPoint point)
          Default implementation.
 boolean caseExitPoint(Node node, ExitPoint point)
          Default implementation.
 boolean defaultNode(Node node, IProgramPoint point)
          Base implementation for all case-methods.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CFGAnalysisAdapter

public CFGAnalysisAdapter()
Method Detail

defaultNode

public boolean defaultNode(Node node,
                           IProgramPoint point)
Base implementation for all case-methods. Returns false.

Parameters:
node - the Node associated with point
point - the IProgramPoint calling the method
Returns:
true if the result of the analysis is changed.

caseEntryPoint

public boolean caseEntryPoint(Node node,
                              EntryPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseEntryPoint in interface ICFGAnalysis
Parameters:
node - the Node associated with point
point - the EntryPoint calling the method
Returns:
true if the result of the analysis is changed.

caseExitPoint

public boolean caseExitPoint(Node node,
                             ExitPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseExitPoint in interface ICFGAnalysis
Parameters:
node - the Node associated with point
point - the ExitPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCReturnStmPoint

public boolean caseCReturnStmPoint(AReturnStm node,
                                   CReturnStmPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCReturnStmPoint in interface ICFGAnalysis
Parameters:
node - the AReturnStm associated with point
point - the CReturnStmPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCAssignPtrStmPoint

public boolean caseCAssignPtrStmPoint(AAssignPtrStm node,
                                      CAssignPtrStmPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCAssignPtrStmPoint in interface ICFGAnalysis
Parameters:
node - the AAssignPtrStm associated with point
point - the CAssignPtrStmPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCBlockPoint

public boolean caseCBlockPoint(ABlock node,
                               CBlockPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCBlockPoint in interface ICFGAnalysis
Parameters:
node - the ABlock associated with point
point - the CBlockPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCVarExpPoint

public boolean caseCVarExpPoint(AVarExp node,
                                CVarExpPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCVarExpPoint in interface ICFGAnalysis
Parameters:
node - the AVarExp associated with point
point - the CVarExpPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCFunctionCallExpPoint

public boolean caseCFunctionCallExpPoint(AFunctionCallExp node,
                                         CFunctionCallExpPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCFunctionCallExpPoint in interface ICFGAnalysis
Parameters:
node - the AFunctionCallExp associated with point
point - the CFunctionCallExpPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCDerefExpPoint

public boolean caseCDerefExpPoint(ADerefExp node,
                                  CDerefExpPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCDerefExpPoint in interface ICFGAnalysis
Parameters:
node - the ADerefExp associated with point
point - the CDerefExpPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCDeclStmPoint

public boolean caseCDeclStmPoint(ADeclStm node,
                                 CDeclStmPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCDeclStmPoint in interface ICFGAnalysis
Parameters:
node - the ADeclStm associated with point
point - the CDeclStmPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCInputExpPoint

public boolean caseCInputExpPoint(AInputExp node,
                                  CInputExpPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCInputExpPoint in interface ICFGAnalysis
Parameters:
node - the AInputExp associated with point
point - the CInputExpPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCMallocExpPoint

public boolean caseCMallocExpPoint(AMallocExp node,
                                   CMallocExpPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCMallocExpPoint in interface ICFGAnalysis
Parameters:
node - the AMallocExp associated with point
point - the CMallocExpPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCIfThenStmPoint

public boolean caseCIfThenStmPoint(AIfThenStm node,
                                   CIfThenStmPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCIfThenStmPoint in interface ICFGAnalysis
Parameters:
node - the AIfThenStm associated with point
point - the CIfThenStmPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCIntConstExpPoint

public boolean caseCIntConstExpPoint(AIntConstExp node,
                                     CIntConstExpPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCIntConstExpPoint in interface ICFGAnalysis
Parameters:
node - the AIntConstExp associated with point
point - the CIntConstExpPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCFunctionPtrCallExpPoint

public boolean caseCFunctionPtrCallExpPoint(AFunctionPtrCallExp node,
                                            CFunctionPtrCallExpPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCFunctionPtrCallExpPoint in interface ICFGAnalysis
Parameters:
node - the AFunctionPtrCallExp associated with point
point - the CFunctionPtrCallExpPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCWhileStmPoint

public boolean caseCWhileStmPoint(AWhileStm node,
                                  CWhileStmPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCWhileStmPoint in interface ICFGAnalysis
Parameters:
node - the AWhileStm associated with point
point - the CWhileStmPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCBinopExpPoint

public boolean caseCBinopExpPoint(ABinopExp node,
                                  CBinopExpPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCBinopExpPoint in interface ICFGAnalysis
Parameters:
node - the ABinopExp associated with point
point - the CBinopExpPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCAssignVarStmPoint

public boolean caseCAssignVarStmPoint(AAssignVarStm node,
                                      CAssignVarStmPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCAssignVarStmPoint in interface ICFGAnalysis
Parameters:
node - the AAssignVarStm associated with point
point - the CAssignVarStmPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCIfThenElseStmPoint

public boolean caseCIfThenElseStmPoint(AIfThenElseStm node,
                                       CIfThenElseStmPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCIfThenElseStmPoint in interface ICFGAnalysis
Parameters:
node - the AIfThenElseStm associated with point
point - the CIfThenElseStmPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCOutputStmPoint

public boolean caseCOutputStmPoint(AOutputStm node,
                                   COutputStmPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCOutputStmPoint in interface ICFGAnalysis
Parameters:
node - the AOutputStm associated with point
point - the COutputStmPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCPointerExpPoint

public boolean caseCPointerExpPoint(APointerExp node,
                                    CPointerExpPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCPointerExpPoint in interface ICFGAnalysis
Parameters:
node - the APointerExp associated with point
point - the CPointerExpPoint calling the method
Returns:
true if the result of the analysis is changed.

caseCNullExpPoint

public boolean caseCNullExpPoint(ANullExp node,
                                 CNullExpPoint point)
Default implementation. Calls defaultNode(Node,IProgramPoint).

Specified by:
caseCNullExpPoint in interface ICFGAnalysis
Parameters:
node - the ANullExp associated with point
point - the CNullExpPoint calling the method
Returns:
true if the result of the analysis is changed.