NullabilityDomain class
Nullability domain for tracking null/non-null states of variables.
Used for null safety verification and detecting potential null dereferences.
- Implemented types
Constructors
- NullabilityDomain(Nullability state)
-
const
Properties
- bottom → NullabilityDomain
-
Returns the bottom element (⊥).
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
- isBottom → bool
-
Checks if this is the bottom element.
no setteroverride
- isDefinitelyNonNull → bool
-
Whether this state definitely represents non-null.
no setter
- isDefinitelyNull → bool
-
Whether this state definitely represents null.
no setter
- isTop → bool
-
Checks if this is the top element.
no setteroverride
- mayBeNull → bool
-
Whether this state may be null (including definitely null).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → Nullability
-
final
- top → NullabilityDomain
-
Returns the top element (⊤).
no setteroverride
Methods
-
applyNonNullConstraint(
) → NullabilityDomain - Applies a null check constraint.
-
applyNullConstraint(
) → NullabilityDomain - Applies a null constraint.
-
isSubsetOf(
NullabilityDomain other) → bool -
Checks if this value is less than or equal to another (⊑).
override
-
join(
NullabilityDomain other) → NullabilityDomain -
Join operation (⊔): least upper bound of two abstract values.
override
-
meet(
NullabilityDomain other) → NullabilityDomain -
Meet operation (⊓): greatest lower bound of two abstract values.
override
-
narrow(
NullabilityDomain other) → NullabilityDomain -
Narrowing operation (△): refines over-approximation after widening.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
widen(
NullabilityDomain other) → NullabilityDomain -
Widening operation (∇): ensures termination in fixpoint iteration.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- bottomValue → const NullabilityDomain
- Bottom element (unreachable).
- nonNullValue → const NullabilityDomain
- Definitely non-null constant.
- nullValue → const NullabilityDomain
- Definitely null constant.
- topValue → const NullabilityDomain
- Top element (may be null).