Class ConstraintChecker

java.lang.Object
pascal.taie.analysis.pta.plugin.ConstraintChecker
All Implemented Interfaces:
Plugin

public class ConstraintChecker extends Object implements Plugin
This class is for debugging/testing purpose.

Solver needs to satisfy some important constraints:

  1. onNewMethod(m) must happen before onNewCSMethod(csM) for any context-sensitive method csM for m.
  2. onNewMethod(m) must happen before onNewPointsToSet(csV, pts) for any context-sensitive variable csV in m, and
  3. onNewCSMethod(csM) must happen before onNewPointsToSet(csV, pts) for any context-sensitive variable csV in csM.

This class checks the constraints and issues warnings when they are unsatisfied.

  • Constructor Details

    • ConstraintChecker

      public ConstraintChecker()
  • Method Details

    • setSolver

      public void setSolver(Solver solver)
      Description copied from interface: Plugin
      Sets pointer analysis solver which will be used later by the plugin.
      Specified by:
      setSolver in interface Plugin
    • onNewMethod

      public void onNewMethod(JMethod method)
      Description copied from interface: Plugin
      Invoked when a new reachable method is discovered.
      Specified by:
      onNewMethod in interface Plugin
      Parameters:
      method - new reachable method
    • onNewCSMethod

      public void onNewCSMethod(CSMethod csMethod)
      Description copied from interface: Plugin
      Invoked when a new reachable context-sensitive method is discovered.
      Specified by:
      onNewCSMethod in interface Plugin
      Parameters:
      csMethod - new reachable context-sensitive method
    • onNewPointsToSet

      public void onNewPointsToSet(CSVar csVar, PointsToSet pts)
      Description copied from interface: Plugin
      Invoked when set of new objects flow to a context-sensitive variable.
      Specified by:
      onNewPointsToSet in interface Plugin
      Parameters:
      csVar - variable whose points-to set changes
      pts - set of new objects