public class LowerBoundAnnotatedTypeFactory
extends org.checkerframework.common.basetype.BaseAnnotatedTypeFactory
The type hierarchy is:
Top = lbu ("Lower Bound Unknown")
|
gte-1 ("Greater than or equal to -1")
|
nn ("NonNegative")
|
pos ("Positive")
In general, check whether the constant Value Checker can determine the value of a variable; if it
can, use that; if not, use more specific rules based on expression type. This class implements
the following type rules:
--i when
i is non-negative implies that i will be GTEN1 afterwards). Should this be
3 rules?
++i when
i is non-negative implies that i will be positive afterwards). Should this
be 3 rules?
| Modifier and Type | Field and Description |
|---|---|
AnnotationMirror |
BOTTOM
The bottom annotation.
|
AnnotationMirror |
GTEN1
The canonical @
GTENegativeOne annotation. |
AnnotationMirror |
NN
The canonical @
NonNegative annotation. |
AnnotationMirror |
POLY
The canonical @
PolyLowerBound annotation. |
AnnotationMirror |
POS
The canonical @
Positive annotation. |
AnnotationMirror |
UNKNOWN
The canonical @
LowerBoundUnknown annotation. |
analysis, cfgVisualizer, defaults, dependentTypesHelper, emptyStore, flowByDefault, flowResult, flowResultAnalysisCaches, initializationStaticStore, initializationStore, methodInvocationStores, poly, regularExitStores, returnStatementStores, scannedClasses, transfer, treeAnnotator, typeAnnotatorchecker, elements, fromExpressionTreeCache, fromMemberTreeCache, fromTypeTreeCache, ignoreUninferredTypeArguments, loader, processingEnv, qualHierarchy, reflectionResolver, root, shouldCache, trees, typeArgumentInference, typeFormatter, typeHierarchy, types, typeVarSubstitutor, uid, visitorState| Constructor and Description |
|---|
LowerBoundAnnotatedTypeFactory(org.checkerframework.common.basetype.BaseTypeChecker checker) |
| Modifier and Type | Method and Description |
|---|---|
void |
addComputedTypeAnnotations(Element element,
org.checkerframework.framework.type.AnnotatedTypeMirror type)
Handles cases 1, 2, and 3.
|
void |
addComputedTypeAnnotations(Tree tree,
org.checkerframework.framework.type.AnnotatedTypeMirror type,
boolean iUseFlow)
Handles cases 1, 2, and 3.
|
protected Set<Class<? extends Annotation>> |
createSupportedTypeQualifiers() |
org.checkerframework.framework.type.treeannotator.TreeAnnotator |
createTreeAnnotator() |
LessThanAnnotatedTypeFactory |
getLessThanAnnotatedTypeFactory()
Returns the LessThan Checker's annotated type factory.
|
SearchIndexAnnotatedTypeFactory |
getSearchIndexAnnotatedTypeFactory()
Returns the SearchIndexFor Checker's annotated type factory.
|
org.checkerframework.common.value.ValueAnnotatedTypeFactory |
getValueAnnotatedTypeFactory()
Returns the Value Checker's annotated type factory.
|
boolean |
isNonNegative(Tree tree)
Checks if the expression is non-negative, i.e.
|
createFlowAnalysisaddCheckedCodeDefaults, addCheckedStandardDefaults, addComputedTypeAnnotations, addDefaultAnnotations, addTypeNameImplicit, addUncheckedCodeDefaults, addUncheckedStandardDefaults, analyze, applyInferredAnnotations, checkAndPerformFlowAnalysis, checkForDefaultQualifierInHierarchy, constructorFromUse, createAndInitQualifierDefaults, createCFGVisualizer, createDependentTypesHelper, createFlowTransferFunction, createQualifierDefaults, createQualifierPolymorphism, createTypeAnnotator, fromNewClass, getAnnotatedTypeLhs, getAnnotatedTypeLhsNoTypeVarDefault, getAnnotatedTypeRhsUnaryAssign, getAnnotatedTypeVarargsArray, getAnnotationFromJavaExpressionString, getAnnotationFromReceiver, getAnnotationMirrorFromJavaExpressionString, getCFGVisualizer, getDependentTypesHelper, getEmptyStore, getFinalLocalValues, getFirstNodeOfKindForTree, getInferredValueFor, getMethodReturnType, getMethodReturnType, getNodesForTree, getQualifierPolymorphism, getReceiverFromJavaExpressionString, getRegularExitStore, getResultingTypeOfConstructorMemberReference, getReturnStatementStores, getShouldDefaultTypeVarLocals, getSortedQualifierNames, getStoreAfter, getStoreAfter, getStoreAfter, getStoreBefore, getStoreBefore, getStoreBefore, getSupportedMonotonicTypeQualifiers, getTypeFactoryOfSubchecker, handleCFGViz, methodFromUse, performFlowAnalysis, postDirectSuperTypes, postInit, preProcessClassTree, setRoot, typeVariablesFromUseadaptGetClassReturnTypeToReceiver, addAliasedAnnotation, addAliasedAnnotation, addAliasedAnnotation, addAliasedAnnotation, addAliasedDeclAnnotation, addAnnotationFromFieldInvariant, addInheritedAnnotation, aliasedAnnotation, annotateInheritedFromClass, annotateInheritedFromClass, checkInvalidOptionsInferSignatures, createAnnotatedTypeFormatter, createAnnotationClassLoader, createAnnotationFormatter, createQualifierHierarchy, createQualifierHierarchy, createQualifierHierarchy, createQualifierHierarchyFactory, createTypeArgumentInference, createTypeHierarchy, createTypeVariableSubstitutor, declarationFromElement, fromElement, fromElement, fromElement, getAnnotatedNullType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedTypeFormatter, getAnnotatedTypeFromTypeTree, getAnnotationFormatter, getAnnotationMirror, getAnnotationWithMetaAnnotation, getBoxedType, getBundledTypeQualifiersWithoutPolyAll, getBundledTypeQualifiersWithPolyAll, getCacheSize, getContext, getCurrentClassTree, getCurrentClassType, getCurrentMethodReceiver, getDeclAnnotation, getDeclAnnotationNoAliases, getDeclAnnotations, getDeclAnnotationWithMetaAnnotation, getElementUtils, getEnclosingMethod, getEnclosingType, getFieldInvariantAnnotationTree, getFieldInvariantDeclarationAnnotations, getFieldInvariants, getFnInterfaceFromTree, getFnInterfaceFromTree, getImplicitReceiverType, getNarrowedPrimitive, getPath, getProcessingEnv, getQualifierHierarchy, getReceiverType, getSelfType, getStringType, getSupportedTypeQualifiers, getTreeUtils, getTypeArgumentInference, getTypeHierarchy, getTypeVarSubstitutor, getUnboxedType, getUninferredWildcardType, getVisitorState, getWholeProgramInference, initializeReflectionResolution, isAnyEnclosingThisDeref, isFromByteCode, isFromStubFile, isMostEnclosingThisDeref, isSupportedQualifier, isWithinConstructor, methodFromUse, parseStubFiles, postAsMemberOf, postProcessClassTree, postTypeVarSubstitution, setPathHack, toAnnotatedType, toString, type, widenToUpperBoundpublic final AnnotationMirror GTEN1
GTENegativeOne annotation.public final AnnotationMirror NN
NonNegative annotation.public final AnnotationMirror POS
Positive annotation.public final AnnotationMirror BOTTOM
public final AnnotationMirror UNKNOWN
LowerBoundUnknown annotation.public final AnnotationMirror POLY
PolyLowerBound annotation.public LowerBoundAnnotatedTypeFactory(org.checkerframework.common.basetype.BaseTypeChecker checker)
protected Set<Class<? extends Annotation>> createSupportedTypeQualifiers()
createSupportedTypeQualifiers in class org.checkerframework.framework.type.AnnotatedTypeFactorypublic void addComputedTypeAnnotations(Element element, org.checkerframework.framework.type.AnnotatedTypeMirror type)
addComputedTypeAnnotations in class org.checkerframework.framework.type.GenericAnnotatedTypeFactory<org.checkerframework.framework.flow.CFValue,org.checkerframework.framework.flow.CFStore,org.checkerframework.framework.flow.CFTransfer,org.checkerframework.framework.flow.CFAnalysis>public void addComputedTypeAnnotations(Tree tree, org.checkerframework.framework.type.AnnotatedTypeMirror type, boolean iUseFlow)
addComputedTypeAnnotations in class org.checkerframework.framework.type.GenericAnnotatedTypeFactory<org.checkerframework.framework.flow.CFValue,org.checkerframework.framework.flow.CFStore,org.checkerframework.framework.flow.CFTransfer,org.checkerframework.framework.flow.CFAnalysis>public org.checkerframework.common.value.ValueAnnotatedTypeFactory getValueAnnotatedTypeFactory()
public SearchIndexAnnotatedTypeFactory getSearchIndexAnnotatedTypeFactory()
public LessThanAnnotatedTypeFactory getLessThanAnnotatedTypeFactory()
public org.checkerframework.framework.type.treeannotator.TreeAnnotator createTreeAnnotator()
createTreeAnnotator in class org.checkerframework.framework.type.GenericAnnotatedTypeFactory<org.checkerframework.framework.flow.CFValue,org.checkerframework.framework.flow.CFStore,org.checkerframework.framework.flow.CFTransfer,org.checkerframework.framework.flow.CFAnalysis>public boolean isNonNegative(Tree tree)