use of org.checkerframework.framework.flow.CFValue in project checker-framework by typetools.
the class LowerBoundTransfer method visitSignedRightShift.
@Override
public TransferResult<CFValue, CFStore> visitSignedRightShift(SignedRightShiftNode n, TransferInput<CFValue, CFStore> p) {
TransferResult<CFValue, CFStore> transferResult = super.visitSignedRightShift(n, p);
AnnotationMirror resultAnno = getAnnotationForRightShift(n, p);
return createNewResult(transferResult, resultAnno);
}
use of org.checkerframework.framework.flow.CFValue in project checker-framework by typetools.
the class LowerBoundTransfer method visitIntegerRemainder.
@Override
public TransferResult<CFValue, CFStore> visitIntegerRemainder(IntegerRemainderNode n, TransferInput<CFValue, CFStore> p) {
TransferResult<CFValue, CFStore> transferResult = super.visitIntegerRemainder(n, p);
AnnotationMirror resultAnno = getAnnotationForRemainder(n, p);
return createNewResult(transferResult, resultAnno);
}
use of org.checkerframework.framework.flow.CFValue in project checker-framework by typetools.
the class ValueTransfer method stringConcatenation.
public TransferResult<CFValue, CFStore> stringConcatenation(Node leftOperand, Node rightOperand, TransferInput<CFValue, CFStore> p, TransferResult<CFValue, CFStore> result) {
AnnotationMirror resultAnno = createAnnotationForStringConcatenation(leftOperand, rightOperand, p);
TypeMirror underlyingType = result.getResultValue().getUnderlyingType();
CFValue newResultValue = analysis.createSingleAnnotationValue(resultAnno, underlyingType);
return new RegularTransferResult<>(newResultValue, result.getRegularStore());
}
use of org.checkerframework.framework.flow.CFValue in project checker-framework by typetools.
the class ValueTransfer method getBooleanValues.
/**
* Get possible boolean values from @BoolVal.
*/
private List<Boolean> getBooleanValues(Node subNode, TransferInput<CFValue, CFStore> p) {
CFValue value = p.getValueOfSubNode(subNode);
AnnotationMirror intAnno = AnnotationUtils.getAnnotationByClass(value.getAnnotations(), BoolVal.class);
return ValueAnnotatedTypeFactory.getBooleanValues(intAnno);
}
use of org.checkerframework.framework.flow.CFValue in project checker-framework by typetools.
the class ValueTransfer method visitFloatingRemainder.
@Override
public TransferResult<CFValue, CFStore> visitFloatingRemainder(FloatingRemainderNode n, TransferInput<CFValue, CFStore> p) {
TransferResult<CFValue, CFStore> transferResult = super.visitFloatingRemainder(n, p);
AnnotationMirror resultAnno = calculateNumericalBinaryOp(n.getLeftOperand(), n.getRightOperand(), NumericalBinaryOps.REMAINDER, p);
return createNewResult(transferResult, resultAnno);
}
Aggregations