Enum Class DischargeReason

java.lang.Object
java.lang.Enum<DischargeReason>
org.ek9lang.compiler.phase5.DischargeReason
All Implemented Interfaces:
Serializable, Comparable<DischargeReason>, Constable

enum DischargeReason extends Enum<DischargeReason>
Why an obligation is considered discharged (proven safe) by an existing analysis, or UNDISCHARGED when no analysis proves it — the discharge-detection order of docs/tooling/EK9_SYMBOLIC_SCANNER_IMPLEMENTATION_SPEC.md §2.3. The reason is reuse, not re-derivation: each maps to a specific existing compiler analysis.
  • Enum Constant Details

    • GUARD

      public static final DischargeReason GUARD
      A safe-generic-access guard proves a container unwrap safe (SymbolsAndScopes.isGetOptionalAccessSafe and siblings).
    • RANGE

      public static final DischargeReason RANGE
      The narrowed flow state proves the value safe — a divisor provably non-zero, or a require provably true (ValueTrackingAnalyzer / RangeValue). Covers both the range and constant cases.
    • DEFINITE_ASSIGNMENT

      public static final DischargeReason DEFINITE_ASSIGNMENT
      Definite-assignment proves the variable is initialised at this point (SymbolsAndScopes.isVariableInitialised). Reserved for a later slice.
    • UNDISCHARGED

      public static final DischargeReason UNDISCHARGED
      No existing analysis discharges the obligation — a Layer-2 bounded-model solver candidate.
  • Method Details

    • values

      public static DischargeReason[] 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

      public static DischargeReason valueOf(String name)
      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 name
      NullPointerException - if the argument is null