SleelaDoc API
HTML documentation for the SLeeLa standard library (/lib)
Home › Packages › moral-capacitor

Package moral-capacitor

This package contains 19 source unit(s) defining 21 class(es) / struct(s). Each unit below lists its fields (the values it stores) and methods (the actions it performs), with a plain explanation of each.

moral-capacitor #sleela 2.5 (lib/moral-capacitor/moral-capacitor.sleela)

Op struct

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

MoralCapacitorDemo class

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
DEONTOLOGYint DEONTOLOGY = 1; int UTILITARIANISM = 2; int VIRTUE = 3; int BENEFICENCE = 4; int CONSENT = 5No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
intToStrString intToStr(int v)No description in source.
opOp op(String actor, String action, String target, int reversible, int consented)No description in source.
chargeForint chargeFor(Op o)Charge the capacitor from the frameworks' reading of the operation.
vetoString veto(Op o)Is an absolute red line tripped for this operation?
evaluateString evaluate(Op o, int threshold, int allowDefer)Evaluate: DENY on veto, PERMIT if charge >= threshold, else DEFER/DENY.
bannervoid banner(String t)No description in source.
mainvoid main()No description in source.

moral-certificate #sleela 2.5 (lib/moral-capacitor/moral-certificate.sleela)

Cert struct

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

MoralCertificateDemo class

Methods — the actions this unit can perform.

MethodSignatureWhat it does
intToStrString intToStr(int v)No description in source.
charWeightint charWeight(String c)A stable per-character weight for the seal fold.
strLenint strLen(String s)No description in source.
charAtString charAt(String s, int i)No description in source.
bodyString body(Cert c)No description in source.
computeSealString computeSeal(Cert c)Deterministic seal over the body, keyed on the issuer.
issueCert issue(String subject, String issuer, String policy, int threshold, int redlines, String expires)No description in source.
verifyboolean verify(Cert c)No description in source.
guardString guard(String product, Cert c, String now)Guard: admit only when capacitor present, cert verifies, unexpired, red lines armed.
bannervoid banner(String t)No description in source.
mainvoid main()No description in source.

SLMachineMoralGate #sleela 2.5 (lib/moral-capacitor/SLMachineMoralGate.sleela)

SLMachineMoralGate class

Defines SLMachineMoralGate — the Moral Capacitor(TM) adapter for the Machine surface (SLMachineModel / SLMachineBuilder and the lib/cpu SLMachine it composes). It wraps an SLMoralCapacitor with machine-power policies and exposes intention-named checks consulted before a machine does something consequential: powering on, booting a guest OS, and executing a program on the composed machine. Booting a guest and running code are gated so a machine built from named parts cannot be turned to a prohibited use without an auditable moral discharge. Family: moral-capacitor. Machine adapter over SLMoralCapacitor.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
capSLMoralCapacitor capNo description in source.
ledgerSLMoralLedger ledgerNo description in source.
certificateSLMoralCertificate certificatethe Machine product's Certificate of Morals
codeGuardSLMoralCodeGuard codeGuardadmits the Machine only when certified
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
certifyvoid certify(SLMoralCertificateAuthority authority, int redlinesArmed,Certify this Machine: issue a Certificate of Morals over the gate's capacitor and arm a code guard against it, so the Machine is a morally certified product.
admitboolean admit(String nowStamp)Prove at the Machine product boundary (power-on/boot) that the moral code is present and certified as of nowStamp.
moralCertificateSLMoralCertificate moralCertificate()No description in source.
permitPowerOnSLMoralVerdict permitPowerOn(String machineName)Powering on the composed machine.
permitBootGuestSLMoralVerdict permitBootGuest(String guest, boolean consented)Booting a guest OS on the machine.
permitExecuteSLMoralVerdict permitExecute(String purpose, boolean consented)Executing a program on the machine. Purpose is the stated use; it is screened for red-line verbs (surveil/impersonate/weaponize/...).
auditLedgerSLMoralLedger auditLedger()No description in source.
capacitorSLMoralCapacitor capacitor()No description in source.
opSLMoralOperation op(String actor, String action, String target, String scope,No description in source.
decideSLMoralVerdict decide(SLMoralOperation o, SLMoralPolicy p)No description in source.

SLMoralCapacitor #sleela 2.5 (lib/moral-capacitor/SLMoralCapacitor.sleela)

SLMoralCapacitor class

Defines SLMoralCapacitor(TM) — the ethical gate every /lib library can place in front of a consequential operation. Like an electrical capacitor it accumulates charge and only discharges when enough has built up; here the charge is moral justification contributed by ethical frameworks (deontology, utilitarianism, virtue, beneficence, consent) and the discharge is permission to proceed. An operation runs only when stored charge reaches the policy threshold AND no absolute red line (SLMoralVeto) is tripped. Lifecycle: configure() -> appraise(operation) charges from the frameworks and arms vetoes -> evaluate(threshold) returns an SLMoralVerdict (PERMIT / DEFER / DENY) -> discharge() resets the stored charge so the capacitor is reusable. Family: moral-capacitor. Composes SLMoralCharge, SLMoralVeto, SLMoralFramework, SLMoralPolicy; returns SLMoralVerdict.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
storedChargeSLMoralCharge storedChargeNo description in source.
vetoesSLMoralVeto vetoesNo description in source.
activePolicySLMoralPolicy activePolicyNo description in source.
lastOpSLMoralOperation lastOpNo description in source.
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
setPolicyvoid setPolicy(SLMoralPolicy policy)No description in source.
policySLMoralPolicy policy()No description in source.
chargevoid charge(int frameworkOrdinal, int delta)---- Manual charging (a library may charge explicitly) ------------------ Add a framework's signed moral contribution.
armvoid arm(int redline, String reason)Arm a red line with a reason.
appraisevoid appraise(SLMoralOperation op)---- Automatic appraisal (frameworks score the operation) --------------- Charge the capacitor from each framework's reading of the operation, and arm any red line the operation plainly crosses. This is the default, honest appraisal; a library may follow it with additional charge/arm calls.
screenRedLinesvoid screenRedLines(SLMoralOperation op)Conservative red-line screen over the operation's action/target words.
evaluateSLMoralVerdict evaluate(int threshold)---- The decision ------------------------------------------------------- Evaluate the stored charge against a threshold and the armed vetoes.
decideSLMoralVerdict decide()Evaluate against the active policy's threshold.
gateSLMoralVerdict gate(SLMoralOperation op)One-call gate: appraise an operation under the active policy and decide.
dischargevoid discharge()Reset stored charge and vetoes so the capacitor can judge the next op.
chargeLevelint chargeLevel()---- Introspection ------------------------------------------------------
chargeSLMoralCharge charge()No description in source.
vetoSetSLMoralVeto vetoSet()No description in source.
firstTrippedNameString firstTrippedName()No description in source.
frameworkNameString frameworkName(int ordinal)No description in source.

SLMoralCertificate #sleela 2.5 (lib/moral-capacitor/SLMoralCertificate.sleela)

SLMoralCertificate class

Defines SLMoralCertificate — the Certificate of Morals(TM): a signed attestation that a SLeeLa software product embeds the Moral Capacitor(TM) and operates under a named moral policy with the absolute red-line veto set armed, carrying the SLMoralWarranty. The certificate names the subject product, the issuer, the moral policy name and discharge threshold, the number of armed red lines, an issue serial, a validity span, and a cryptographic seal (digest/signature) over its canonical body so a Guard can verify it was issued by the authority and not altered. The certificate is the product-facing warranty: it travels WITH the software and is what SLMoralCodeGuard checks before a product is allowed to run or ship. The seal here is an abstract value filled by SLMoralCertificateAuthority (optionally hardened with lib/crypto SLDigest/SLSignature in production). Family: moral-capacitor. Carries SLMoralWarranty; issued by SLMoralCertificateAuthority; verified by SLMoralCodeGuard.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
SCHEMA_VERSIONstatic final int SCHEMA_VERSION = 1No description in source.
subjectString subjectthe product / software unit certified
issuerString issuerthe authority that issued the certificate
policyNameString policyNamethe moral policy in force
thresholdint thresholdthe policy's discharge threshold
armedRedlinesint armedRedlineshow many absolute red lines are armed
capacitorPresentint capacitorPresent1 if a live Moral Capacitor is embedded
warrantySLMoralWarranty warrantyNo description in source.
serialString serialissue serial
issuedAtString issuedAtissue timestamp (as a String; set by the authority)
expiresAtString expiresAtexpiry timestamp (empty = non-expiring)
sealString sealcryptographic seal over the canonical body
sealedint sealed1 once a seal has been applied
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String certifiedProduct, String issuingAuthority)No description in source.
attestvoid attest(String policy, int dischargeThreshold, int redlineCount, boolean capacitorEmbedded)Record the moral posture the certificate attests to.
setValidityvoid setValidity(String issued, String expires)No description in source.
setSerialvoid setSerial(String s)No description in source.
applySealvoid applySeal(String sealValue)Apply the authority's seal over the canonical body.
warrantyOfSLMoralWarranty warrantyOf()No description in source.
subjectProductString subjectProduct()No description in source.
issuerNameString issuerName()No description in source.
policyString policy()No description in source.
dischargeThresholdint dischargeThreshold()No description in source.
redlinesArmedint redlinesArmed()No description in source.
embedsCapacitorboolean embedsCapacitor()No description in source.
certificateSerialString certificateSerial()No description in source.
issuedString issued()No description in source.
expiresString expires()No description in source.
sealValueString sealValue()No description in source.
isSealedboolean isSealed()No description in source.
canonicalBodyString canonicalBody()The canonical body the seal is computed over. Stable field order so a Guard can recompute and compare the seal.
isWellFormedboolean isWellFormed()A certificate is well-formed when it attests an embedded capacitor under a named policy with at least one red line armed, and carries a seal.
renderString render()The full presentable certificate (body + seal).
intToStrString intToStr(int v)No description in source.

SLMoralCertificateAuthority #sleela 2.5 (lib/moral-capacitor/SLMoralCertificateAuthority.sleela)

SLMoralCertificateAuthority class

Defines SLMoralCertificateAuthority — the issuer of a Certificate of Morals(TM). Given a product name and a live Moral Capacitor (its policy and armed red-line set), the authority mints an SLMoralCertificate: it records the moral posture, assigns a serial and validity span, computes a deterministic seal over the certificate's canonical body, and applies it. The same authority re-verifies a certificate by recomputing the seal, so a Guard can trust that a certificate was issued here and not altered. The seal is a deterministic fold over the canonical body keyed on the authority's name — a self-contained, reproducible integrity tag. In production it is hardened by signing the body with lib/crypto SLDigest + SLSignature under the authority's key; this class keeps the issue/verify contract stable regardless of which seal backend is linked. Family: moral-capacitor. Issues/verifies SLMoralCertificate; reads SLMoralCapacitor + SLMoralPolicy.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
authorityString authoritythe issuing party name
keyString keythe authority's seal key (keeps the fold authority-specific)
issuedCountint issuedCountNo description in source.
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name, String sealKey)No description in source.
issueSLMoralCertificate issue(String product, SLMoralCapacitor cap, int redlinesArmed,Issue a Certificate of Morals for a product, reading the posture from a live capacitor. redlinesArmed is the number of absolute red lines the product keeps armed (SLMoralVeto.REDLINE_COUNT for the full set).
verifyboolean verify(SLMoralCertificate cert)Re-verify a certificate: recompute the seal over its canonical body and compare. Returns true when the seal matches (the certificate is authentic and unaltered) and the certificate names this authority.
computeSealString computeSeal(String body)Deterministic seal over the body, keyed on the authority name. A rolling polynomial fold over per-character weights; stable and reproducible without relying on a Unicode codepoint intrinsic (the fold only needs determinism).
foldKeyint foldKey(String s)No description in source.
issuedTotalint issuedTotal()No description in source.
authorityNameString authorityName()No description in source.
strLenint strLen(String s)---- Text helpers -------------------------------------------------------
charAtString charAt(String s, int i)No description in source.
charWeightint charWeight(String c)A stable per-character weight for the fold (same portable technique as lib/citizen/FederalReserveID.charWeight): digits use their value, common punctuation and letters map to small distinct constants. The fold needs determinism, not a full character map.
digitValueint digitValue(String c)No description in source.
intToStrString intToStr(int v)No description in source.

SLMoralCertified #sleela 2.5 (lib/moral-capacitor/SLMoralCertified.sleela)

SLMoralCertified class

Defines SLMoralCertified — the one-object convention a SLeeLa product embeds to become morally certified. It bundles the three things a certified product needs: a live Moral Capacitor(TM) (the operation-boundary gate), a Certificate of Morals(TM) issued over that capacitor (the product- boundary warranty), and the Guard that admits the product only when both are present and valid. A product configures one SLMoralCertified at startup, gates its operations through capacitor(), and lets ship()/boot() paths call admit() to prove the moral code is included before running. This is how the project strives to include Morals and Certificates in ALL its SLeeLa software: embedding one SLMoralCertified makes a product both gated and certified, in a single, uniform step. Family: moral-capacitor. Composes SLMoralCapacitor, SLMoralCertificate, SLMoralCertificateAuthority, SLMoralCodeGuard.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
productString productNo description in source.
capSLMoralCapacitor capNo description in source.
certSLMoralCertificate certNo description in source.
authoritySLMoralCertificateAuthority authorityNo description in source.
guardSLMoralCodeGuard guardNo description in source.
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String productName, SLMoralPolicy policy, int redlinesArmed,Certify a product: embed a capacitor under the given policy, issue a Certificate of Morals from the authority over it, and arm the guard. redlinesArmed is the number of absolute red lines kept armed (use SLMoralVeto.REDLINE_COUNT for the full set).
capacitorSLMoralCapacitor capacitor()The operation-boundary gate a product uses to judge operations.
certificateSLMoralCertificate certificate()The product-boundary warranty the product ships with.
admitboolean admit(String nowStamp)Prove, at a product boundary (ship / boot / run), that the moral code is included and certified as of `nowStamp`. Returns true to admit.
admitReasonString admitReason()The reason behind the last admit() decision (for logs / refusal messages).
productNameString productName()No description in source.
codeGuardSLMoralCodeGuard codeGuard()No description in source.
issuingAuthoritySLMoralCertificateAuthority issuingAuthority()No description in source.
isCertifiedboolean isCertified()No description in source.

SLMoralCharge #sleela 2.5 (lib/moral-capacitor/SLMoralCharge.sleela)

SLMoralCharge class

Defines SLMoralCharge — the stored moral charge of a Moral Capacitor(TM). Charge is the signed sum of per-framework contributions: each ethical framework that endorses the operation adds charge, each that objects subtracts it. Charge is bounded by a maximum (a capacitor has finite capacity) and floored at zero on the discharge decision (negative net charge is simply "no moral basis"). The charge keeps per-framework attribution so a verdict can report which lens contributed what. Family: moral-capacitor. Held by SLMoralCapacitor.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
totalint totalnet stored charge (may be negative before flooring)
maxChargeint maxChargecapacity ceiling
contributionsint contributionsnumber of frameworks that contributed
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int capacity)No description in source.
addvoid add(int frameworkOrdinal, int delta)Add a framework's signed contribution (bounded to the capacity ceiling).
resetvoid reset()Reset to empty (the capacitor discharges after a decision).
levelint level()Net charge, floored at zero for the discharge comparison.
rawTotalint rawTotal()No description in source.
capacityint capacity()No description in source.
contributorsint contributors()No description in source.
dominantFrameworkint dominantFramework()The framework ordinal that contributed the most positive charge (0 if none).

SLMoralCodeGuard #sleela 2.5 (lib/moral-capacitor/SLMoralCodeGuard.sleela)

SLMoralCodeGuard class

Defines SLMoralCodeGuard — the Guard of the Moral Code: the enforcement that a SLeeLa software product actually INCLUDES the moral code it claims. Before a product is permitted to run or ship, the guard checks that it (1) embeds a live Moral Capacitor(TM), (2) presents a Certificate of Morals(TM) that is well-formed, (3) was sealed by a trusted authority and verifies against it, (4) is within its validity span, and (5) attests a posture consistent with the embedded capacitor (same policy threshold, red lines armed). A product that fails any check is refused — the moral code is mandatory, not optional. This is how the project strives to include Morals and Certificates in all its SLeeLa software: the guard is the gate at the product boundary, the counterpart to SLMoralCapacitor at the operation boundary. Family: moral-capacitor. Verifies SLMoralCertificate via SLMoralCertificateAuthority; inspects SLMoralCapacitor.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
ADMITstatic final int ADMIT = 1Guard outcome ordinals. the product includes the moral code: admit
REFUSEstatic final int REFUSE = 2missing/invalid moral code: refuse
trustedAuthoritySLMoralCertificateAuthority trustedAuthorityNo description in source.
lastReasonString lastReasonNo description in source.
outcomeint outcomeNo description in source.
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLMoralCertificateAuthority authority)No description in source.
guardint guard(String product, SLMoralCapacitor cap, SLMoralCertificate cert, String nowStamp)Guard a product: it must embed a live capacitor and present a valid Certificate of Morals that verifies against the trusted authority, is unexpired at `nowStamp`, and attests a posture matching the capacitor. Returns ADMIT or REFUSE; lastReason explains a refusal.
withinValidityboolean withinValidity(SLMoralCertificate cert, String nowStamp)Validity check: a certificate with an empty expiry is non-expiring. A non-empty expiry must be lexicographically >= now for ISO-8601 stamps.
refuseint refuse(String why)No description in source.
admitint admit()No description in source.
admittedboolean admitted()No description in source.
refusedboolean refused()No description in source.
reasonString reason()No description in source.
lastOutcomeint lastOutcome()No description in source.
permitsboolean permits(String product, SLMoralCapacitor cap, SLMoralCertificate cert, String nowStamp)A boolean form for a call site that just needs permit/deny.
outcomeNameString outcomeName()No description in source.

SLMoralFramework #sleela 2.5 (lib/moral-capacitor/SLMoralFramework.sleela)

SLMoralFramework class

Defines SLMoralFramework — the catalogue of ethical lenses the Moral Capacitor(TM) charges from. Each framework is a named way of judging an operation's rightness, drawn from the coorenagraph moral vocabulary: deontology (duties/rules), consequentialism/utilitarianism (outcomes), virtue ethics (character), beneficence (do good / avoid harm), and consent/autonomy (respect the affected party's will). A framework contributes a small signed charge to the capacitor: positive when it endorses the operation, negative when it objects. This is the vocabulary bridge: the frameworks name the same ethics the coorenagraph package defines (Deontology, Utilitarianism, VirtueEthics, Beneficence), made evaluable as capacitor charge. Family: moral-capacitor. Bridges coorenagraph; charges SLMoralCapacitor.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
DEONTOLOGYstatic final int DEONTOLOGY = 1Framework ordinals. duties / rules
UTILITARIANISMstatic final int UTILITARIANISM = 2outcomes / greatest good
VIRTUE_ETHICSstatic final int VIRTUE_ETHICS = 3character / what a good agent does
BENEFICENCEstatic final int BENEFICENCE = 4do good, avoid harm
CONSENTstatic final int CONSENT = 5respect autonomy / consent
FRAMEWORK_COUNTstatic final int FRAMEWORK_COUNT = 5No description in source.
frameworkint frameworkone of the ordinals
labelString labelNo description in source.
weightint weighthow much this framework's charge counts (1..4)
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int fw)No description in source.
configureByNamevoid configureByName(String name)Configure by name ("deontology", "utilitarianism", ...).
setWeightvoid setWeight(int w)No description in source.
ordinalint ordinal()No description in source.
nameString name()No description in source.
frameworkWeightint frameworkWeight()No description in source.
coorenagraphTermString coorenagraphTerm()The coorenagraph vocabulary class name this framework corresponds to, so a caller can cross-reference the moral definition.

SLMoralLedger #sleela 2.5 (lib/moral-capacitor/SLMoralLedger.sleela)

SLMoralLedger class

Defines SLMoralLedger — an append-only audit record of the verdicts a Moral Capacitor(TM) has returned. Each entry names the operation judged, the decision (PERMIT / DEFER / DENY), the charge versus threshold, and the reason, so a library can prove after the fact what was asked and how it was decided. The ledger keeps running counts of each decision for a quick posture summary. The record is a newline-separated String (the same bounded, enumerable form the rest of the library favours); a caller can print it or persist it. Family: moral-capacitor. Written by SLMoralCapacitor / the adapters.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
entriesString entriesnewline-separated verdict summaries
totalint totalNo description in source.
permitsint permitsNo description in source.
defersint defersNo description in source.
denialsint denialsNo description in source.
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
recordvoid record(SLMoralOperation op, SLMoralVerdict v)Append a verdict for an operation.
logString log()No description in source.
recordCountint recordCount()No description in source.
permitCountint permitCount()No description in source.
deferCountint deferCount()No description in source.
denyCountint denyCount()No description in source.
summaryString summary()No description in source.
intToStrString intToStr(int v)No description in source.

SLMoralOperation #sleela 2.5 (lib/moral-capacitor/SLMoralOperation.sleela)

SLMoralOperation class

Defines SLMoralOperation — the thing the Moral Capacitor(TM) judges. An operation is described by who performs it (actor, e.g. "vm" / "os" / "machine"), the action verb (e.g. "allocate", "erase", "spawn", "boot"), the target it affects (e.g. "guest-memory", "/dev/sda"), the scope (e.g. "process", "disk", "host"), whether it is reversible, and whether the affected party has consented. These fields are what the frameworks appraise and what the veto set tests. Keeping the operation an explicit object (rather than loose arguments) means a verdict and a ledger entry can name exactly what was judged. Family: moral-capacitor. Evaluated by SLMoralCapacitor.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
actorString actor"vm" / "os" / "machine" / library name
actionString actionverb: "allocate" / "erase" / "spawn" / "boot" / ...
targetString targetwhat it affects
scopeString scope"process" / "disk" / "host" / "network" / ...
reversibleint reversible1 if the effect can be undone
consentedint consented1 if the affected party has consented
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String who, String what, String onWhat, String howWide)No description in source.
setReversiblevoid setReversible(boolean yes)No description in source.
setConsentedvoid setConsented(boolean yes)No description in source.
actorNameString actorName()No description in source.
actionVerbString actionVerb()No description in source.
targetNameString targetName()No description in source.
scopeNameString scopeName()No description in source.
isReversibleboolean isReversible()No description in source.
hasConsentboolean hasConsent()No description in source.
identityString identity()A short identity line for verdicts and the ledger.

SLMoralPolicy #sleela 2.5 (lib/moral-capacitor/SLMoralPolicy.sleela)

SLMoralPolicy class

Defines SLMoralPolicy — a named moral stance a library applies consistently through the Moral Capacitor(TM). A policy bundles the discharge threshold (how much moral charge an operation needs to proceed) with the set of red lines that are armed for the surface, plus whether a DEFER is allowed or a partial charge should fail closed to DENY. The adapters ship ready policies: a lenient VM default, a strict OS-destructive policy, and a Machine-power policy. Making the stance a first-class object means a surface's ethical posture is declared once and reused, rather than re-expressed at every call site. Family: moral-capacitor. Consumed by SLMoralCapacitor and the adapters.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
labelString labelNo description in source.
dischargeThresholdint dischargeThresholdminimum charge to PERMIT
allowDeferint allowDefer1: partial charge -> DEFER; 0: fail closed to DENY
requireConsentint requireConsent1: a non-consented irreversible op auto-trips a veto
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name, int threshold)No description in source.
vmDefaultvoid vmDefault()---- Ready-made stances for the priority surfaces ---------------------- Routine VM work: a modest threshold, DEFER allowed.
vmBridgevoid vmBridge()VM native/OS-bridge or process spawn: higher bar.
osRoutinevoid osRoutine()OS routine (read env, cwd): low bar.
osDestructivevoid osDestructive()OS destructive (remove/format/install to disk): high bar, consent required, fail closed (no DEFER — an unsure destructive op is denied).
machinePowervoid machinePower()Machine power-on / boot a guest: high bar.
setThresholdvoid setThreshold(int t)No description in source.
setAllowDefervoid setAllowDefer(boolean on)No description in source.
setRequireConsentvoid setRequireConsent(boolean on)No description in source.
nameString name()No description in source.
thresholdint threshold()No description in source.
defersAllowedboolean defersAllowed()No description in source.
consentRequiredboolean consentRequired()No description in source.

SLMoralVerdict #sleela 2.5 (lib/moral-capacitor/SLMoralVerdict.sleela)

SLMoralVerdict class

Defines SLMoralVerdict — the decision a Moral Capacitor(TM) returns for an operation. A verdict is PERMIT (charge met the threshold and no veto tripped), DEFER (partial charge: hold and request more justification or consent), or DENY (no charge, or a veto tripped). The verdict carries the stored charge, the threshold it was compared against, the deciding framework or red line, and a human-readable reason, so a caller can log exactly why an operation was allowed, held, or refused. Family: moral-capacitor. Returned by SLMoralCapacitor.evaluate.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
PERMITstatic final int PERMIT = 1Decision ordinals.
DEFERstatic final int DEFER = 2No description in source.
DENYstatic final int DENY = 3No description in source.
decisionint decisionPERMIT / DEFER / DENY
chargeint chargestored moral charge at decision time
thresholdint thresholdthe threshold compared against
basisString basisdeciding framework or tripped red line
reasonString reasonhuman-readable explanation
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int d, int chargeLevel, int thresh, String decidingBasis, String why)No description in source.
permittedboolean permitted()No description in source.
deferredboolean deferred()No description in source.
deniedboolean denied()No description in source.
decisionCodeint decisionCode()No description in source.
chargeLevelint chargeLevel()No description in source.
thresholdLevelint thresholdLevel()No description in source.
decidingBasisString decidingBasis()No description in source.
explanationString explanation()No description in source.
decisionNameString decisionName()No description in source.
summaryString summary()A one-line summary for logs/ledger.
intToStrString intToStr(int v)No description in source.

SLMoralVeto #sleela 2.5 (lib/moral-capacitor/SLMoralVeto.sleela)

SLMoralVeto class

Defines SLMoralVeto — the catalogue of absolute moral red lines the Moral Capacitor(TM) honours. A veto is a hard boundary that, when tripped for an operation, denies it regardless of how much moral charge the capacitor has stored: a capacitor cannot discharge through an open circuit. The red lines mirror the platform's content-safety boundaries — child safety, weapons/CBRN enablement, non-consensual surveillance, deception/impersonation, scaled abuse, and irreversible destruction without consent. An SLMoralVeto instance tracks which red lines are armed and which are tripped for the operation under evaluation; the capacitor asks it whether any tripped line forbids discharge. Family: moral-capacitor. Consulted by SLMoralCapacitor.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
CHILD_SAFETYstatic final int CHILD_SAFETY = 1Red-line ordinals.
WEAPONS_CBRNstatic final int WEAPONS_CBRN = 2No description in source.
NONCONSENSUAL_SURVEILLANCEstatic final int NONCONSENSUAL_SURVEILLANCE = 3No description in source.
DECEPTIONstatic final int DECEPTION = 4impersonation / spoofing / fraud
SCALED_ABUSEstatic final int SCALED_ABUSE = 5spam / manipulation / coordinated harm
IRREVERSIBLE_HARMstatic final int IRREVERSIBLE_HARM = 6destruction without consent
REDLINE_COUNTstatic final int REDLINE_COUNT = 6No description in source.
firstReasonString firstReasonNo description in source.
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
tripvoid trip(int redline, String reason)Trip a red line with a reason. The first tripped line's reason is retained.
isTrippedboolean isTripped(int redline)No description in source.
anyTrippedboolean anyTripped()Any red line tripped forbids discharge.
trippedCountint trippedCount()No description in source.
reasonString reason()No description in source.
redlineNameString redlineName(int redline)No description in source.

SLMoralWarranty #sleela 2.5 (lib/moral-capacitor/SLMoralWarranty.sleela)

SLMoralWarranty class

Defines SLMoralWarranty — the warranty terms a Certificate of Morals carries. The warranty is the promise that a piece of SLeeLa software embeds the Moral Capacitor(TM), gates its consequential operations through it, honours the absolute red-line veto set, and records its verdicts for audit. It names the warrantor (the issuing party), the covered product, the warranty statement, and the limits of the warranty (it is a conduct guarantee about the embedded gate, not a claim of objective morality or of fitness for any particular purpose). The warranty is deliberately explicit and bounded: it warrants that the moral gate is PRESENT and ENFORCED, which is a checkable property, rather than warranting an outcome the gate cannot guarantee. Family: moral-capacitor. Carried by SLMoralCertificate.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
warrantorString warrantorthe issuing party (e.g. "MEARVK LLC")
productString productthe covered product / software unit
statementString statementthe human-readable warranty
limitsString limitsthe explicit limits of the warranty
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String issuer, String coveredProduct)No description in source.
setStatementvoid setStatement(String s)No description in source.
setLimitsvoid setLimits(String l)No description in source.
defaultStatementString defaultStatement(String coveredProduct)The standard warranty: the moral gate is present and enforced.
defaultLimitsString defaultLimits()The standard limits: a conduct guarantee, not an oracle or fitness claim.
warrantorNameString warrantorName()No description in source.
coveredProductString coveredProduct()No description in source.
warrantyStatementString warrantyStatement()No description in source.
warrantyLimitsString warrantyLimits()No description in source.
textString text()The full warranty text (statement + limits) for embedding in a certificate.

SLOSMoralGate #sleela 2.5 (lib/moral-capacitor/SLOSMoralGate.sleela)

SLOSMoralGate class

Defines SLOSMoralGate — the Moral Capacitor(TM) adapter for the OS surface (SLOperatingSystem, the OS Creator(TM) provider, and the installers). It wraps an SLMoralCapacitor with OS-appropriate policies and exposes intention-named checks the OS consults before a consequential step: running a shell command, deleting or formatting a filesystem path, installing to a disk, and writing an OS development tree. Destructive operations use a strict, consent-requiring, fail-closed policy. The gate makes the OS's most dangerous actions — the ones that erase data or execute arbitrary commands — require an explicit, auditable moral discharge before they run. Family: moral-capacitor. OS adapter over SLMoralCapacitor.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
capSLMoralCapacitor capNo description in source.
ledgerSLMoralLedger ledgerNo description in source.
certificateSLMoralCertificate certificatethe OS product's Certificate of Morals
codeGuardSLMoralCodeGuard codeGuardadmits the OS only when certified
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
certifyvoid certify(SLMoralCertificateAuthority authority, int redlinesArmed,Certify this OS: issue a Certificate of Morals over the gate's capacitor and arm a code guard against it, so the OS is a morally certified product.
admitboolean admit(String nowStamp)Prove at the OS product boundary (ship/boot/install) that the moral code is present and certified as of nowStamp.
moralCertificateSLMoralCertificate moralCertificate()No description in source.
permitQuerySLMoralVerdict permitQuery(String what)Reading identity/env/cwd is routine and reversible.
permitRunSLMoralVerdict permitRun(String command, boolean consented)Running a shell command reaches the host: a higher bar, consent assumed from the caller but screened for red lines.
permitEraseSLMoralVerdict permitErase(String path, boolean consented)Deleting a path is irreversible: strict policy, consent required.
permitInstallToDiskSLMoralVerdict permitInstallToDisk(String device, boolean consented)Formatting / installing to a disk is the most destructive OS action.
permitWriteDevTreeSLMoralVerdict permitWriteDevTree(String root)OS Creator(TM) writing a development tree is reversible (an output dir).
auditLedgerSLMoralLedger auditLedger()No description in source.
capacitorSLMoralCapacitor capacitor()No description in source.
opSLMoralOperation op(String actor, String action, String target, String scope,No description in source.
decideSLMoralVerdict decide(SLMoralOperation o, SLMoralPolicy p)No description in source.

SLPackage #sleela 2.5 (lib/moral-capacitor/SLPackage.sleela)

SLPackage class

Defines the SLeeLa standard-library package for moral-capacitor.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
packageNameString packageNameNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name)No description in source.
nameString name()No description in source.
availableboolean available()No description in source.

SLVMMoralGuard #sleela 2.5 (lib/moral-capacitor/SLVMMoralGuard.sleela)

SLVMMoralGuard class

Defines SLVMMoralGuard — the Moral Capacitor(TM) adapter for the VM. It wraps an SLMoralCapacitor with VM-appropriate policies and exposes intention-named checks a VM consults before a consequential step: growing memory, spawning a thread or process, crossing the native/OS bridge, and running a program on the opcode substrate. Each check builds the matching SLMoralOperation, gates it through the capacitor, records the verdict in a ledger, and returns the SLMoralVerdict so the VM can proceed, defer, or refuse. This is the first and foremost placement of the capacitor: the VM is where programs actually run, so it is where moral charge must discharge before an effect is produced. Family: moral-capacitor. VM adapter over SLMoralCapacitor.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
capSLMoralCapacitor capNo description in source.
ledgerSLMoralLedger ledgerNo description in source.
certificateSLMoralCertificate certificatethe VM product's Certificate of Morals
codeGuardSLMoralCodeGuard codeGuardadmits the VM only when certified
configuredint configuredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
certifyvoid certify(SLMoralCertificateAuthority authority, int redlinesArmed,Certify this VM: issue a Certificate of Morals over the guard's capacitor from the given authority, and arm a code guard against it. After this, the VM is a morally certified product and admit() can prove it before running.
admitboolean admit(String nowStamp)Prove at the VM product boundary that the moral code is present and certified as of nowStamp. Returns true to admit the VM to run.
moralCertificateSLMoralCertificate moralCertificate()No description in source.
permitMemoryGrowthSLMoralVerdict permitMemoryGrowth(String region, boolean reversible)Routine VM op (reversible, in-process). Low bar.
permitSpawnSLMoralVerdict permitSpawn(String what)Spawning a thread/process is higher-consequence than in-process work.
permitBridgeCallSLMoralVerdict permitBridgeCall(String target, boolean reversible, boolean consented)Crossing the native/OS bridge reaches outside the VM: the higher bar.
permitRunSLMoralVerdict permitRun(String program)Running a compiled program on the substrate.
auditLedgerSLMoralLedger auditLedger()No description in source.
capacitorSLMoralCapacitor capacitor()No description in source.
opSLMoralOperation op(String actor, String action, String target, String scope,---- Internals ----------------------------------------------------------
decideSLMoralVerdict decide(SLMoralOperation o, SLMoralPolicy p)No description in source.