Class ReferenceHandler

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

public class ReferenceHandler extends Object implements Plugin
Models GC behavior that it assigns every reference to Reference.pending. As a result, Reference.pending can point to every reference. The ReferenceHandler takes care of enqueueing the references in a reference queue. If we do not model this GC behavior, Reference.pending points to nothing, and finalize() methods won't get invoked. TODO: update it for Java 9+ (current model doesn't work for Java 9+).
  • Constructor Details

    • ReferenceHandler

      public ReferenceHandler()
  • 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
    • 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