Class AuxStateHandler

java.lang.Object
liquidjava.processor.refinement_checker.object_checkers.AuxStateHandler

public class AuxStateHandler extends Object
  • Constructor Details

    • AuxStateHandler

      public AuxStateHandler()
  • Method Details

    • handleConstructorState

      public static void handleConstructorState(spoon.reflect.declaration.CtConstructor<?> c, RefinedFunction f, TypeChecker tc) throws LJError
      Handles the passage of the written state annotations to the context for Constructors
      Parameters:
      c -
      f -
      tc -
      Throws:
      LJError
    • setDefaultState

      public static void setDefaultState(RefinedFunction f, TypeChecker tc)
      Sets a default state where all ghost states are initialized to their default values
      Parameters:
      f -
      tc -
    • handleMethodState

      public static void handleMethodState(spoon.reflect.declaration.CtMethod<?> method, RefinedFunction f, TypeChecker tc, String prefix) throws LJError
      Handles the passage of the written state annotations to the context for regular Methods
      Parameters:
      method -
      f -
      tc -
      Throws:
      LJError
    • constructorStateMetadata

      public static void constructorStateMetadata(String refKey, RefinedFunction f, Map<String,String> map, spoon.reflect.code.CtConstructorCall<?> ctConstructorCall)
      Sets the new state acquired from the constructor call
      Parameters:
      refKey -
      f -
      map -
      ctConstructorCall -
    • addStateRefinements

      public static void addStateRefinements(TypeChecker tc, String varName, spoon.reflect.code.CtExpression<?> e)
      If an expression has a state in metadata, then its state is passed to the last instance of the variable with varName
      Parameters:
      tc -
      varName -
      e -
    • checkTargetChanges

      public static void checkTargetChanges(TypeChecker tc, RefinedFunction f, spoon.reflect.code.CtExpression<?> target2, Map<String,String> map, spoon.reflect.declaration.CtElement invocation) throws LJError
      Checks the changes in the state of the target
      Parameters:
      tc -
      f -
      target2 -
      map -
      invocation -
      Throws:
      LJError
    • updateGhostField

      public static void updateGhostField(spoon.reflect.code.CtFieldWrite<?> fw, TypeChecker tc) throws LJError
      Updates the ghost field after a write
      Parameters:
      fw -
      tc -
      Throws:
      LJError