Search in sources :

Example 1 with CFStore

use of org.checkerframework.framework.flow.CFStore in project checker-framework by typetools.

the class ValueTransfer method visitBitwiseComplement.

@Override
public TransferResult<CFValue, CFStore> visitBitwiseComplement(BitwiseComplementNode n, TransferInput<CFValue, CFStore> p) {
    TransferResult<CFValue, CFStore> transferResult = super.visitBitwiseComplement(n, p);
    AnnotationMirror resultAnno = calculateNumericalUnaryOp(n.getOperand(), NumericalUnaryOps.BITWISE_COMPLEMENT, p);
    return createNewResult(transferResult, resultAnno);
}
Also used : CFValue(org.checkerframework.framework.flow.CFValue) AnnotationMirror(javax.lang.model.element.AnnotationMirror) CFStore(org.checkerframework.framework.flow.CFStore)

Example 2 with CFStore

use of org.checkerframework.framework.flow.CFStore in project checker-framework by typetools.

the class ValueTransfer method visitNumericalSubtraction.

@Override
public TransferResult<CFValue, CFStore> visitNumericalSubtraction(NumericalSubtractionNode n, TransferInput<CFValue, CFStore> p) {
    TransferResult<CFValue, CFStore> transferResult = super.visitNumericalSubtraction(n, p);
    AnnotationMirror resultAnno = calculateNumericalBinaryOp(n.getLeftOperand(), n.getRightOperand(), NumericalBinaryOps.SUBTRACTION, p);
    return createNewResult(transferResult, resultAnno);
}
Also used : CFValue(org.checkerframework.framework.flow.CFValue) AnnotationMirror(javax.lang.model.element.AnnotationMirror) CFStore(org.checkerframework.framework.flow.CFStore)

Example 3 with CFStore

use of org.checkerframework.framework.flow.CFStore in project checker-framework by typetools.

the class ValueTransfer method visitNumericalMinus.

@Override
public TransferResult<CFValue, CFStore> visitNumericalMinus(NumericalMinusNode n, TransferInput<CFValue, CFStore> p) {
    TransferResult<CFValue, CFStore> transferResult = super.visitNumericalMinus(n, p);
    AnnotationMirror resultAnno = calculateNumericalUnaryOp(n.getOperand(), NumericalUnaryOps.MINUS, p);
    return createNewResult(transferResult, resultAnno);
}
Also used : CFValue(org.checkerframework.framework.flow.CFValue) AnnotationMirror(javax.lang.model.element.AnnotationMirror) CFStore(org.checkerframework.framework.flow.CFStore)

Example 4 with CFStore

use of org.checkerframework.framework.flow.CFStore in project checker-framework by typetools.

the class ValueTransfer method visitLeftShift.

@Override
public TransferResult<CFValue, CFStore> visitLeftShift(LeftShiftNode n, TransferInput<CFValue, CFStore> p) {
    TransferResult<CFValue, CFStore> transferResult = super.visitLeftShift(n, p);
    AnnotationMirror resultAnno = calculateNumericalBinaryOp(n.getLeftOperand(), n.getRightOperand(), NumericalBinaryOps.SHIFT_LEFT, p);
    return createNewResult(transferResult, resultAnno);
}
Also used : CFValue(org.checkerframework.framework.flow.CFValue) AnnotationMirror(javax.lang.model.element.AnnotationMirror) CFStore(org.checkerframework.framework.flow.CFStore)

Example 5 with CFStore

use of org.checkerframework.framework.flow.CFStore in project checker-framework by typetools.

the class ValueTransfer method visitUnsignedRightShift.

@Override
public TransferResult<CFValue, CFStore> visitUnsignedRightShift(UnsignedRightShiftNode n, TransferInput<CFValue, CFStore> p) {
    TransferResult<CFValue, CFStore> transferResult = super.visitUnsignedRightShift(n, p);
    AnnotationMirror resultAnno = calculateNumericalBinaryOp(n.getLeftOperand(), n.getRightOperand(), NumericalBinaryOps.UNSIGNED_SHIFT_RIGHT, p);
    return createNewResult(transferResult, resultAnno);
}
Also used : CFValue(org.checkerframework.framework.flow.CFValue) AnnotationMirror(javax.lang.model.element.AnnotationMirror) CFStore(org.checkerframework.framework.flow.CFStore)

Aggregations

CFStore (org.checkerframework.framework.flow.CFStore)45 CFValue (org.checkerframework.framework.flow.CFValue)41 AnnotationMirror (javax.lang.model.element.AnnotationMirror)31 MethodInvocationNode (org.checkerframework.dataflow.cfg.node.MethodInvocationNode)8 Node (org.checkerframework.dataflow.cfg.node.Node)8 Receiver (org.checkerframework.dataflow.analysis.FlowExpressions.Receiver)7 TypeMirror (javax.lang.model.type.TypeMirror)5 ConditionalTransferResult (org.checkerframework.dataflow.analysis.ConditionalTransferResult)5 AssignmentNode (org.checkerframework.dataflow.cfg.node.AssignmentNode)5 ArrayCreationNode (org.checkerframework.dataflow.cfg.node.ArrayCreationNode)4 FieldAccessNode (org.checkerframework.dataflow.cfg.node.FieldAccessNode)4 Tree (com.sun.source.tree.Tree)3 ExecutableElement (javax.lang.model.element.ExecutableElement)3 RegularTransferResult (org.checkerframework.dataflow.analysis.RegularTransferResult)3 ClassNameNode (org.checkerframework.dataflow.cfg.node.ClassNameNode)3 GreaterThanNode (org.checkerframework.dataflow.cfg.node.GreaterThanNode)3 GreaterThanOrEqualNode (org.checkerframework.dataflow.cfg.node.GreaterThanOrEqualNode)3 IntegerLiteralNode (org.checkerframework.dataflow.cfg.node.IntegerLiteralNode)3 LessThanNode (org.checkerframework.dataflow.cfg.node.LessThanNode)3 LessThanOrEqualNode (org.checkerframework.dataflow.cfg.node.LessThanOrEqualNode)3