Enum Class ObligationKind
- All Implemented Interfaces:
Serializable, Comparable<ObligationKind>, Constable
The taxonomy of contract/partiality obligations the census counts, from what already exists in the
language and analysis (docs/tooling/EK9_SYMBOLIC_SCANNER_IMPLEMENTATION_SPEC.md §2.2). Each kind
carries a distinct failure identity: silent-unset (arithmetic partiality), Exception (a normal
catchable error path), Panic (an uncatchable contract violation — the worst) and silent-skip (a
for range that runs zero iterations for some input).
An obligation is a point in the code that could fail for some input; the census marks whether an existing analysis already discharges it (proves it safe). Undischarged obligations are the Layer-2 bounded-model solver's candidates.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA constrained-type constructor (Percentage(...)) fed a computed value that could fall outside the type's interval — an invariantPanicon construction.A container unwrap (Optional.get,Result.ok/error,Iterator.next) that throws today when the container is empty/absent.A partial arithmetic operator (/ mod rem) whose divisor could be zero — silently yields an unset result (matchesInteger._divAssguarding!= 0).Arequirepre/post/invariant that throwsPanic(uncatchable in production) when false.Afor rangestep-viability advisory (step == 0, or a step whose direction cannot reach the end) — the loop silently runs zero iterations rather than failing.An operation with a possibly-unset operand (tri-state) whose result silently propagates unset. -
Method Summary
Modifier and TypeMethodDescriptionstatic ObligationKindReturns the enum constant of this class with the specified name.static ObligationKind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DIV_BY_ZERO
A partial arithmetic operator (/ mod rem) whose divisor could be zero — silently yields an unset result (matchesInteger._divAssguarding!= 0). Discharged when the divisor is provably non-zero from the narrowed flow state. -
UNSET_PROPAGATION
An operation with a possibly-unset operand (tri-state) whose result silently propagates unset. Reserved for a later slice. -
CONTAINER_UNWRAP
A container unwrap (Optional.get,Result.ok/error,Iterator.next) that throws today when the container is empty/absent. Unguarded access already fails compilation (E08030); a compiling unwrap is therefore GUARD-discharged. -
REQUIRE
Arequirepre/post/invariant that throwsPanic(uncatchable in production) when false. The primary contract obligation. Discharged when the require expression is provably true from the narrowed flow state. -
SILENT_SKIP
Afor rangestep-viability advisory (step == 0, or a step whose direction cannot reach the end) — the loop silently runs zero iterations rather than failing. Deliberately a distinct advisory class, never filed underPanic. Reserved for a later slice. -
CONSTRAINED_CONSTRUCTION
A constrained-type constructor (Percentage(...)) fed a computed value that could fall outside the type's interval — an invariantPanicon construction. Reserved for a later slice.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-