Class AuxStateHandler
java.lang.Object
liquidjava.processor.refinement_checker.object_checkers.AuxStateHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddStateRefinements(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 varNamestatic voidcheckTargetChanges(TypeChecker tc, RefinedFunction f, spoon.reflect.code.CtExpression<?> target2, Map<String, String> map, spoon.reflect.declaration.CtElement invocation) Checks the changes in the state of the targetstatic voidconstructorStateMetadata(String refKey, RefinedFunction f, Map<String, String> map, spoon.reflect.code.CtConstructorCall<?> ctConstructorCall) Sets the new state acquired from the constructor callstatic voidhandleConstructorState(spoon.reflect.declaration.CtConstructor<?> c, RefinedFunction f, TypeChecker tc) Handles the passage of the written state annotations to the context for Constructorsstatic voidhandleMethodState(spoon.reflect.declaration.CtMethod<?> method, RefinedFunction f, TypeChecker tc, String prefix) Handles the passage of the written state annotations to the context for regular Methodsstatic voidSets a default state where all ghost states are initialized to their default valuesstatic voidupdateGhostField(spoon.reflect.code.CtFieldWrite<?> fw, TypeChecker tc) Updates the ghost field after a write
-
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
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 LJErrorChecks 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
-