Record Class ConfineCensus

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase9.ConfineCensus
Record Components:
placed - how many CONFINEs the placement put in, both forms
placedWith - how many of those are the conditional form, CONFINE v, with, h (N-V V3)
placedByType - the same by the allocated type's fully qualified name, in name order
fuseFindings - the derivation contradictions that tripped the fuse (E1a, E1b); empty when it held

public record ConfineCensus(int placed, int placedWith, Map<String,Integer> placedByType, List<String> fuseFindings) extends Record
THE census of one program's CONFINE placement (N-V V1; master plan row 5, M2): how many sites ConfinePlacement stamped, by the allocated type's fully qualified name, and whether the program's fuse (DerivationContradictions) tripped - the numbers the -v line and -Dek9.confine.print quote, kept on the program (CompilableProgram.getConfineCensus()) so a harness that compiled a program in-process can ask it, never a stderr parser. Gate step 18's selection reads it: a native program is run under ThreadSanitizer because its IR carries a site stamp (stampsASite()), not because its name matches a pattern - a stamp on a type a site stamp can matter for is by construction a stamp on a type that is not [confined] (ConfinedSites rule 4), so "allocates a non-confined type with a site stamp" and "placed at least one" are the same question.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ConfineCensus
    The census of a program the pass was not run over (the confine switch off, or before IR_OPTIMISATION).
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConfineCensus(int placed, int placedWith, Map<String,Integer> placedByType, List<String> fuseFindings)
    Creates an instance of a ConfineCensus record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the fuseFindings record component.
    boolean
    Did the program's fuse trip, so that no site was stamped whatever the records said.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the placed record component.
    Returns the value of the placedByType record component.
    int
    Returns the value of the placedWith record component.
    boolean
    Did the placement stamp at least one allocation site of this program.
    The one-line form the -v reporter line and the CONFINE-CENSUS triage line carry.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • NONE

      public static final ConfineCensus NONE
      The census of a program the pass was not run over (the confine switch off, or before IR_OPTIMISATION).
  • Constructor Details

    • ConfineCensus

      public ConfineCensus(int placed, int placedWith, Map<String,Integer> placedByType, List<String> fuseFindings)
      Creates an instance of a ConfineCensus record class.
      Parameters:
      placed - the value for the placed record component
      placedWith - the value for the placedWith record component
      placedByType - the value for the placedByType record component
      fuseFindings - the value for the fuseFindings record component
  • Method Details

    • stampsASite

      public boolean stampsASite()
      Did the placement stamp at least one allocation site of this program.
    • fuseTripped

      public boolean fuseTripped()
      Did the program's fuse trip, so that no site was stamped whatever the records said.
    • summary

      public String summary()
      The one-line form the -v reporter line and the CONFINE-CENSUS triage line carry.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • placed

      public int placed()
      Returns the value of the placed record component.
      Returns:
      the value of the placed record component
    • placedWith

      public int placedWith()
      Returns the value of the placedWith record component.
      Returns:
      the value of the placedWith record component
    • placedByType

      public Map<String,Integer> placedByType()
      Returns the value of the placedByType record component.
      Returns:
      the value of the placedByType record component
    • fuseFindings

      public List<String> fuseFindings()
      Returns the value of the fuseFindings record component.
      Returns:
      the value of the fuseFindings record component