Home /Modules/philosophers/SLPhilosopherSeating.sleela

SLPhilosopherSeating.sleela

lib/philosophers/SLPhilosopherSeating.sleela · 204 line(s) · sleela

<< lib/philosophers/SLPhilosopherSeating.sleela
   SLeeLa Standard Library Definition.
   Definition: The twenty-one catalogued "seatings" a perfect Constructor can
   admit -- each a Guide/Wisdom slot that governs the maturation of principle
   over a static constructor. >>
#sleela 2.5
material;
<< Family: philosophers. A Constructor in procedural design has only so many
   perfect forms even across an infinite number of possible classes; this class
   fixes the vocabulary of that finitude. There is a BASE of 21 seatings, and a
   Constructor may admit a signed band of additional seatings in [-2, +6], so
   the admitted capacity lives in [19, 27]. Each seating is a named Guide/Wisdom
   that runs from Approach through Approval, naming the pace at which a man's
   principle matures as his Health -- his IQ versus his Income -- changes.

   This class is descriptive and finite on purpose: it does not execute a chain
   (SLPhilosopherChain does that), it declares what a chain is allowed to seat
   and in what order the seatings progress. Values are faithful where publicly
   known and are "none" where they are a model of the project's own making. >>
class SLPhilosopherSeating {
  < ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- >
  << Eleven catalogued attributes with getter/setter pairs, so a GUI, loader,
     or catalog can read and (where appropriate) override this record.
     Values are faithful to the subject's real origin where publicly known. >>
  String metaVersion = "1.0.0";
  int metaId = 11563;
  String metaAuthor = "Kiro Agent";
  String metaDate = "2026-10-24";
  String metaCopyright = "SLeeLa project";
  String metaTrademark = "none";
  String metaCorporation = "none";
  < metaOrigin: National | <nation> | International | Galactic >
  String metaOrigin = "International";
  String metaBirthDate = "2026-10-24";
  < metaScienceRating: maturity/robustness on a 1..10 scale >
  int metaScienceRating = 6;
  < metaNationalSchedule: a real, citable instrument or "none" >
  String metaNationalSchedule = "none";

  String getMetaVersion() { return metaVersion; }
  void setMetaVersion(String v) { metaVersion = v; }
  int getMetaId() { return metaId; }
  void setMetaId(int v) { metaId = v; }
  String getAuthor() { return metaAuthor; }
  void setAuthor(String v) { metaAuthor = v; }
  String getDate() { return metaDate; }
  void setDate(String v) { metaDate = v; }
  String getCopyright() { return metaCopyright; }
  void setCopyright(String v) { metaCopyright = v; }
  String getTrademark() { return metaTrademark; }
  void setTrademark(String v) { metaTrademark = v; }
  String getCorporation() { return metaCorporation; }
  void setCorporation(String v) { metaCorporation = v; }
  String getOrigin() { return metaOrigin; }
  void setOrigin(String v) { metaOrigin = v; }
  String getBirthDate() { return metaBirthDate; }
  void setBirthDate(String v) { metaBirthDate = v; }
  int getScienceRating() { return metaScienceRating; }
  void setScienceRating(int v) { metaScienceRating = v; }
  String getNationalSchedule() { return metaNationalSchedule; }
  void setNationalSchedule(String v) { metaNationalSchedule = v; }

  < --- the finitude of a perfect Constructor ------------------------------ >
  < BASE seatings that every perfect Constructor approves by default. >
  static final int BASE_SEATINGS = 21;
  < The signed band of additional seatings a Constructor may admit. >
  static final int ADDITIONAL_MIN = -2;
  static final int ADDITIONAL_MAX = 6;
  < Admitted capacity therefore lives in [MIN_CAPACITY, MAX_CAPACITY]. >
  static final int MIN_CAPACITY = 19;
  static final int MAX_CAPACITY = 27;

  << --- the twenty-one seatings, Approach .. Approval (ordinals 0..20) ------
     The IQ-201+ register. The progression is a career of principle in seven
     ternary CATEGORIES, each a phase of the construction event:
       I   Admission  (0..2)   Approach, Notice, Warrant
       II  Inception  (3..5)   Patch, Seed, Frame
       III Intent     (6..8)   Aim, Course, Measure
       IV  Vitality   (9..11)  Health, Vigor, Pattern
       V   Governance (12..14) Guide, Ministry, Counsel
       VI  Standing   (15..17) Office, Saint, Favor
       VII Closure    (18..20) Impart, Conform, Approval
     Orthogonal to all of this is ORDAIN (see SLOrdain): not a seat but the
     ordinality itself -- the principle of rank/order (the ordering of order)
     that stands across every seating rather than occupying one. >>
  static final int SEAT_APPROACH = 0;
  static final int SEAT_NOTICE = 1;
  static final int SEAT_WARRANT = 2;
  static final int SEAT_PATCH = 3;
  static final int SEAT_SEED = 4;
  static final int SEAT_FRAME = 5;
  static final int SEAT_AIM = 6;
  static final int SEAT_COURSE = 7;
  static final int SEAT_MEASURE = 8;
  static final int SEAT_HEALTH = 9;
  static final int SEAT_VIGOR = 10;
  static final int SEAT_PATTERN = 11;
  static final int SEAT_GUIDE = 12;
  static final int SEAT_MINISTRY = 13;
  static final int SEAT_COUNSEL = 14;
  static final int SEAT_OFFICE = 15;
  static final int SEAT_SAINT = 16;
  static final int SEAT_FAVOR = 17;
  static final int SEAT_IMPART = 18;
  static final int SEAT_CONFORM = 19;
  static final int SEAT_APPROVAL = 20;

  < --- the seven categories (the ordinal ternary phases) ------------------- >
  static final int CAT_ADMISSION = 0;
  static final int CAT_INCEPTION = 1;
  static final int CAT_INTENT = 2;
  static final int CAT_VITALITY = 3;
  static final int CAT_GOVERNANCE = 4;
  static final int CAT_STANDING = 5;
  static final int CAT_CLOSURE = 6;

  < the number of additional seatings this register has admitted, in band >
  int additional;
  < admitted capacity = BASE + additional, clamped to [MIN, MAX] >
  int capacity;

  < Prepare the register at the default (band = 0) capacity. >
  void create() {
    additional = 0;
    capacity = BASE_SEATINGS;
  }

  < Admit a signed number of additional seatings. Out-of-band requests are >
  < clamped into [ADDITIONAL_MIN, ADDITIONAL_MAX]; the method returns the band >
  < actually admitted so the caller learns the truth rather than a silent lie. >
  int admit(int band) {
    int b = band;
    if (b < ADDITIONAL_MIN) { b = ADDITIONAL_MIN; }
    if (b > ADDITIONAL_MAX) { b = ADDITIONAL_MAX; }
    additional = b;
    capacity = BASE_SEATINGS + b;
    return b;
  }

  int getCapacity() { return capacity; }
  int getAdditional() { return additional; }

  < Is an ordinal a real seating in the current admitted capacity? >
  boolean seats(int ordinal) {
    return ordinal >= 0 && ordinal < capacity;
  }

  < Is a band value inside the signed admission band? >
  boolean inBand(int band) {
    return band >= ADDITIONAL_MIN && band <= ADDITIONAL_MAX;
  }

  < The human name of a baseline seating ordinal, or "unseated" past 20. >
  String seatName(int ordinal) {
    if (ordinal == SEAT_APPROACH) { return "Approach"; }
    if (ordinal == SEAT_NOTICE) { return "Notice"; }
    if (ordinal == SEAT_WARRANT) { return "Warrant"; }
    if (ordinal == SEAT_PATCH) { return "Patch"; }
    if (ordinal == SEAT_SEED) { return "Seed"; }
    if (ordinal == SEAT_FRAME) { return "Frame"; }
    if (ordinal == SEAT_AIM) { return "Aim"; }
    if (ordinal == SEAT_COURSE) { return "Course"; }
    if (ordinal == SEAT_MEASURE) { return "Measure"; }
    if (ordinal == SEAT_HEALTH) { return "Health"; }
    if (ordinal == SEAT_VIGOR) { return "Vigor"; }
    if (ordinal == SEAT_PATTERN) { return "Pattern"; }
    if (ordinal == SEAT_GUIDE) { return "Guide"; }
    if (ordinal == SEAT_MINISTRY) { return "Ministry"; }
    if (ordinal == SEAT_COUNSEL) { return "Counsel"; }
    if (ordinal == SEAT_OFFICE) { return "Office"; }
    if (ordinal == SEAT_SAINT) { return "Saint"; }
    if (ordinal == SEAT_FAVOR) { return "Favor"; }
    if (ordinal == SEAT_IMPART) { return "Impart"; }
    if (ordinal == SEAT_CONFORM) { return "Conform"; }
    if (ordinal == SEAT_APPROVAL) { return "Approval"; }
    return "unseated";
  }

  < The category ordinal (0..6) of a baseline seating, or -1 if unseated. >
  < Each category holds three consecutive seatings, so the category is the >
  < seating ordinal divided by three. >
  int category(int ordinal) {
    if (ordinal < 0 || ordinal > SEAT_APPROVAL) { return -1; }
    return ordinal / 3;
  }

  < The human name of a category ordinal (0..6), or "none". >
  String categoryName(int cat) {
    if (cat == CAT_ADMISSION) { return "Admission"; }
    if (cat == CAT_INCEPTION) { return "Inception"; }
    if (cat == CAT_INTENT) { return "Intent"; }
    if (cat == CAT_VITALITY) { return "Vitality"; }
    if (cat == CAT_GOVERNANCE) { return "Governance"; }
    if (cat == CAT_STANDING) { return "Standing"; }
    if (cat == CAT_CLOSURE) { return "Closure"; }
    return "none";
  }

  < The category name of a seating ordinal directly, or "none" if unseated. >
  String seatCategoryName(int ordinal) {
    return categoryName(category(ordinal));
  }
}