Class SearchIndexTransfer

All Implemented Interfaces:
ForwardTransferFunction<CFValue,CFStore>, TransferFunction<CFValue,CFStore>, NodeVisitor<TransferResult<CFValue,CFStore>,TransferInput<CFValue,CFStore>>

public class SearchIndexTransfer extends IndexAbstractTransfer
The transfer function for the SearchIndexFor checker. Allows SearchIndexFor to be refined to NegativeIndexFor.

Contains 1 refinement rule: SearchIndexFor → NegativeIndexFor when compared against zero.

  • Constructor Details

    • SearchIndexTransfer

      public SearchIndexTransfer(CFAnalysis analysis)
      Create a new SearchIndexTransfer.
      Parameters:
      analysis - the CFAnalysis
  • Method Details

    • refineGT

      protected void refineGT(Node left, AnnotationMirror leftAnno, Node right, AnnotationMirror rightAnno, CFStore store, TransferInput<CFValue,CFStore> in)
      Description copied from class: IndexAbstractTransfer
      Refines the given store, given that left > right holds in it.
      Specified by:
      refineGT in class IndexAbstractTransfer
      Parameters:
      left - the greater operand of a comparison
      leftAnno - the annotation on the type of left
      right - the lesser operand of the comparison
      rightAnno - the annotation on the type of right
      store - the store to refine, in which left > right holds
      in - the input to the transfer function for the comparison
    • refineGTE

      protected void refineGTE(Node left, AnnotationMirror leftAnno, Node right, AnnotationMirror rightAnno, CFStore store, TransferInput<CFValue,CFStore> in)
      Description copied from class: IndexAbstractTransfer
      Refines the given store, given that left >= right holds in it.
      Specified by:
      refineGTE in class IndexAbstractTransfer
      Parameters:
      left - the greater-or-equal operand of a comparison
      leftAnno - the annotation on the type of left
      right - the lesser-or-equal operand of the comparison
      rightAnno - the annotation on the type of right
      store - the store to refine, in which left >= right holds
      in - the input to the transfer function for the comparison