use of org.checkerframework.framework.flow.CFValue in project checker-framework by typetools.
the class ValueTransfer method visitBitwiseAnd.
@Override
public TransferResult<CFValue, CFStore> visitBitwiseAnd(BitwiseAndNode n, TransferInput<CFValue, CFStore> p) {
TransferResult<CFValue, CFStore> transferResult = super.visitBitwiseAnd(n, p);
AnnotationMirror resultAnno = calculateNumericalBinaryOp(n.getLeftOperand(), n.getRightOperand(), NumericalBinaryOps.BITWISE_AND, p);
return createNewResult(transferResult, resultAnno);
}
use of org.checkerframework.framework.flow.CFValue in project checker-framework by typetools.
the class ValueTransfer method visitFloatingDivision.
@Override
public TransferResult<CFValue, CFStore> visitFloatingDivision(FloatingDivisionNode n, TransferInput<CFValue, CFStore> p) {
TransferResult<CFValue, CFStore> transferResult = super.visitFloatingDivision(n, p);
AnnotationMirror resultAnno = calculateNumericalBinaryOp(n.getLeftOperand(), n.getRightOperand(), NumericalBinaryOps.DIVISION, p);
return createNewResult(transferResult, resultAnno);
}
use of org.checkerframework.framework.flow.CFValue in project checker-framework by typetools.
the class ValueTransfer method visitGreaterThan.
@Override
public TransferResult<CFValue, CFStore> visitGreaterThan(GreaterThanNode n, TransferInput<CFValue, CFStore> p) {
TransferResult<CFValue, CFStore> transferResult = super.visitGreaterThan(n, p);
CFStore thenStore = transferResult.getThenStore();
CFStore elseStore = transferResult.getElseStore();
List<Boolean> resultValues = calculateBinaryComparison(n.getLeftOperand(), p.getValueOfSubNode(n.getLeftOperand()), n.getRightOperand(), p.getValueOfSubNode(n.getRightOperand()), ComparisonOperators.GREATER_THAN, thenStore, elseStore);
TypeMirror underlyingType = transferResult.getResultValue().getUnderlyingType();
return createNewResultBoolean(thenStore, elseStore, resultValues, underlyingType);
}
use of org.checkerframework.framework.flow.CFValue in project checker-framework by typetools.
the class ValueTransfer method visitIntegerRemainder.
@Override
public TransferResult<CFValue, CFStore> visitIntegerRemainder(IntegerRemainderNode n, TransferInput<CFValue, CFStore> p) {
TransferResult<CFValue, CFStore> transferResult = super.visitIntegerRemainder(n, p);
AnnotationMirror resultAnno = calculateNumericalBinaryOp(n.getLeftOperand(), n.getRightOperand(), NumericalBinaryOps.REMAINDER, p);
return createNewResult(transferResult, resultAnno);
}
use of org.checkerframework.framework.flow.CFValue in project checker-framework by typetools.
the class ValueTransfer method visitBitwiseOr.
@Override
public TransferResult<CFValue, CFStore> visitBitwiseOr(BitwiseOrNode n, TransferInput<CFValue, CFStore> p) {
TransferResult<CFValue, CFStore> transferResult = super.visitBitwiseOr(n, p);
AnnotationMirror resultAnno = calculateNumericalBinaryOp(n.getLeftOperand(), n.getRightOperand(), NumericalBinaryOps.BITWISE_OR, p);
return createNewResult(transferResult, resultAnno);
}
Aggregations