Home /Modules/api/sldocument.html

sldocument.html

api/sleela/3.1/version-025/package/sldocument.html · 402 line(s) · html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Package sldocument — SleelaDoc API</title>
<link rel="stylesheet" href="../style.css">

</head>
<body>
<header class="top">
  <div class="brand"><a href="../index.html">SleelaDoc API</a></div>
  <div class="tag">HTML documentation for the SLeeLa standard library (/lib)</div>
</header>
<div class="wrap">
<nav class="side">
  <a href="../index.html"><strong>Home</strong></a>
  <a href="../packages.html"><strong>All packages</strong></a>
  <a href="../glossary.html"><strong>Glossary</strong></a>
  <a href="../authorship.html"><strong>Authorship</strong></a>
  <h2>Packages</h2><ul>
<li><a href="../package/advantage.html">advantage</a></li>
<li><a href="../package/alphabet.html">alphabet</a></li>
<li><a href="../package/antivirus.html">antivirus</a></li>
<li><a href="../package/api.html">api</a></li>
<li><a href="../package/array.html">array</a></li>
<li><a href="../package/audio.html">audio</a></li>
<li><a href="../package/autocad.html">autocad</a></li>
<li><a href="../package/ballum.html">ballum</a></li>
<li><a href="../package/bash.html">bash</a></li>
<li><a href="../package/boolean.html">boolean</a></li>
<li><a href="../package/cdma.html">cdma</a></li>
<li><a href="../package/char.html">char</a></li>
<li><a href="../package/character.html">character</a></li>
<li><a href="../package/character-recognition.html">character-recognition</a></li>
<li><a href="../package/churn.html">churn</a></li>
<li><a href="../package/citizen.html">citizen</a></li>
<li><a href="../package/codecs.html">codecs</a></li>
<li><a href="../package/collections.html">collections</a></li>
<li><a href="../package/common-rails.html">common-rails</a></li>
<li><a href="../package/compiler.html">compiler</a></li>
<li><a href="../package/compression.html">compression</a></li>
<li><a href="../package/config.html">config</a></li>
<li><a href="../package/connector.html">connector</a></li>
<li><a href="../package/coorenagraph.html">coorenagraph</a></li>
<li><a href="../package/core.html">core</a></li>
<li><a href="../package/cpu.html">cpu</a></li>
<li><a href="../package/crypto.html">crypto</a></li>
<li><a href="../package/data.html">data</a></li>
<li><a href="../package/data-structures.html">data-structures</a></li>
<li><a href="../package/database.html">database</a></li>
<li><a href="../package/debugger.html">debugger</a></li>
<li><a href="../package/decompiler.html">decompiler</a></li>
<li><a href="../package/deliberation.html">deliberation</a></li>
<li><a href="../package/drivers.html">drivers</a></li>
<li><a href="../package/examples.html">examples</a></li>
<li><a href="../package/filesystem.html">filesystem</a></li>
<li><a href="../package/gameplay.html">gameplay</a></li>
<li><a href="../package/governance.html">governance</a></li>
<li><a href="../package/gui.html">gui</a></li>
<li><a href="../package/guidoc.html">guidoc</a></li>
<li><a href="../package/hotlink.html">hotlink</a></li>
<li><a href="../package/html.html">html</a></li>
<li><a href="../package/http.html">http</a></li>
<li><a href="../package/http-1.0.html">http-1.0</a></li>
<li><a href="../package/http-2.0.html">http-2.0</a></li>
<li><a href="../package/http-3.0.html">http-3.0</a></li>
<li><a href="../package/http-4.0.html">http-4.0</a></li>
<li><a href="../package/http-5.0.html">http-5.0</a></li>
<li><a href="../package/http-6.0.html">http-6.0</a></li>
<li><a href="../package/http-7.0.html">http-7.0</a></li>
<li><a href="../package/http-8.0.html">http-8.0</a></li>
<li><a href="../package/http-9.0.html">http-9.0</a></li>
<li><a href="../package/http-servers.html">http-servers</a></li>
<li><a href="../package/ide.html">ide</a></li>
<li><a href="../package/ide-workbench.html">ide-workbench</a></li>
<li><a href="../package/idea.html">idea</a></li>
<li><a href="../package/inference-model.html">inference-model</a></li>
<li><a href="../package/inputs.html">inputs</a></li>
<li><a href="../package/international-criminal-court.html">international-criminal-court</a></li>
<li><a href="../package/io.html">io</a></li>
<li><a href="../package/java.html">java</a></li>
<li><a href="../package/java28.html">java28</a></li>
<li><a href="../package/journey.html">journey</a></li>
<li><a href="../package/languages.html">languages</a></li>
<li><a href="../package/large-language-models.html">large-language-models</a></li>
<li><a href="../package/ledger.html">ledger</a></li>
<li><a href="../package/linux-editors.html">linux-editors</a></li>
<li><a href="../package/manifesto.html">manifesto</a></li>
<li><a href="../package/math.html">math</a></li>
<li><a href="../package/memory.html">memory</a></li>
<li><a href="../package/modules.html">modules</a></li>
<li><a href="../package/moral-capacitor.html">moral-capacitor</a></li>
<li><a href="../package/munction.html">munction</a></li>
<li><a href="../package/native.html">native</a></li>
<li><a href="../package/net.html">net</a></li>
<li><a href="../package/neural-nets.html">neural-nets</a></li>
<li><a href="../package/nordshrift.html">nordshrift</a></li>
<li><a href="../package/observer.html">observer</a></li>
<li><a href="../package/opcodes.html">opcodes</a></li>
<li><a href="../package/operating-system.html">operating-system</a></li>
<li><a href="../package/os-level-support.html">os-level-support</a></li>
<li><a href="../package/philosophers.html">philosophers</a></li>
<li><a href="../package/philosophy.html">philosophy</a></li>
<li><a href="../package/politico.html">politico</a></li>
<li><a href="../package/process.html">process</a></li>
<li><a href="../package/psychiatry.html">psychiatry</a></li>
<li><a href="../package/public.html">public</a></li>
<li><a href="../package/reflection.html">reflection</a></li>
<li><a href="../package/regex.html">regex</a></li>
<li><a href="../package/registry.html">registry</a></li>
<li><a href="../package/rmi.html">rmi</a></li>
<li><a href="../package/rrs.html">rrs</a></li>
<li><a href="../package/runtime.html">runtime</a></li>
<li><a href="../package/security.html">security</a></li>
<li><a href="../package/server-edition.html">server-edition</a></li>
<li><a href="../package/signal-processing.html">signal-processing</a></li>
<li><a href="../package/sldocument.html">sldocument</a></li>
<li><a href="../package/sleela.html">sleela</a></li>
<li><a href="../package/sleela-sql.html">sleela-sql</a></li>
<li><a href="../package/sleela-terminal.html">sleela-terminal</a></li>
<li><a href="../package/sleeladoc.html">sleeladoc</a></li>
<li><a href="../package/slrtp.html">slrtp</a></li>
<li><a href="../package/social-model.html">social-model</a></li>
<li><a href="../package/softlisten.html">softlisten</a></li>
<li><a href="../package/sommeliers.html">sommeliers</a></li>
<li><a href="../package/spatial.html">spatial</a></li>
<li><a href="../package/sst.html">sst</a></li>
<li><a href="../package/synchro.html">synchro</a></li>
<li><a href="../package/systems.html">systems</a></li>
<li><a href="../package/telephony-skya.html">telephony-skya</a></li>
<li><a href="../package/terminal.html">terminal</a></li>
<li><a href="../package/terminal_pixel.html">terminal_pixel</a></li>
<li><a href="../package/text.html">text</a></li>
<li><a href="../package/ui.html">ui</a></li>
<li><a href="../package/us-infrastructure.html">us-infrastructure</a></li>
<li><a href="../package/user-interface.html">user-interface</a></li>
<li><a href="../package/video.html">video</a></li>
<li><a href="../package/vm.html">vm</a></li>
<li><a href="../package/web-server-technology.html">web-server-technology</a></li>
<li><a href="../package/website.html">website</a></li>
<li><a href="../package/wifi.html">wifi</a></li>
<li><a href="../package/xlt.html">xlt</a></li>
<li><a href="../package/xml.html">xml</a></li>
</ul>
</nav>
<main>
<div class="crumbs"><a href="../index.html">Home</a> &rsaquo; <a href="../packages.html">Packages</a> &rsaquo; sldocument</div>
<h1>Package <code>sldocument</code></h1>
<div class="lead">This package contains <strong>9</strong> source unit(s) defining <strong>9</strong> 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.</div>
<input class="search" placeholder="Filter on this page (Ctrl+F also works)…" oninput="flt(this.value)">
<h2 class="section" data-u="sldocument">SLDocument <span class="pill syntax">#sleela 2.5</span> <span class="muted" style="font-size:13px">(lib/sldocument/SLDocument.sleela)</span></h2>
<div data-u="sldocument sldocument">
<h3 id="SLDocument">SLDocument <span class="pill">class</span></h3>
<p class="desc">Defines SLDocument, an ordered .sldocument whose annotated method steps run top-down and are compiled against and with standard SLeeLa source. An .sldocument is a document, not a free script: its order is already established, so running it is a matter of flow and architecture rather than control plumbing. These documents suit tasks more sophisticated than bash scripting, and clear &quot;national program&quot; work where the sequence A..Z is settled in advance. Running the document: 1. steps are arranged by effective order (explicit @order, else top-down); 2. each step is invoked in that order and its single binary veritable value is recorded; 3. by default the document stops at the first unsound step (fail-closed), because an ordered program should not proceed past a broken step; this may be relaxed with permitContinue() to record every step. Family: sldocument. Native VM/OS work crosses an explicit bridge.</p>
<div class="meta-note">Carries the standard <strong>Metadata Class record</strong> — 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.</div>
<p class="muted"><strong>Fields</strong> — the named values this unit stores.</p>
<table class="members"><tr><th>Field</th><th>Declaration</th><th>What it holds</th></tr>
<tr><td><code>MAX_STEPS</code></td><td><span class="sig">static final int MAX_STEPS = 65536</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>title</code></td><td><span class="sig">String title</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>version</code></td><td><span class="sig">String version</span></td><td class="desc">the declared #sldocument version, e.g. &quot;1.0&quot;</td></tr>
<tr><td><code>steps</code></td><td><span class="sig">SLDocumentStep[] steps</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>count</code></td><td><span class="sig">int count</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>frame</code></td><td><span class="sig">int frame</span></td><td class="desc">VM frame the steps execute against</td></tr>
<tr><td><code>continueOnUnsound</code></td><td><span class="sig">boolean continueOnUnsound</span></td><td class="desc">false = stop at first unsound step</td></tr>
<tr><td><code>result</code></td><td><span class="sig">SLDocumentResult result</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>state</code></td><td><span class="sig">int state</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastError</code></td><td><span class="sig">String lastError</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
<p class="muted"><strong>Methods</strong> — the actions this unit can perform.</p>
<table class="members"><tr><th>Method</th><th>Signature</th><th>What it does</th></tr>
<tr><td><code>init</code></td><td><span class="sig">void init(String docTitle, String docVersion, int vmFrame)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>permitContinue</code></td><td><span class="sig">void permitContinue()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>addStep</code></td><td><span class="sig">boolean addStep(SLDocumentAnnotation annotation)</span></td><td class="desc">Add a step in textual (top-down) order. The textual position becomes the step&#x27;s order unless the annotation carries an explicit @order.</td></tr>
<tr><td><code>valid</code></td><td><span class="sig">boolean valid()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>enable</code></td><td><span class="sig">void enable()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>disable</code></td><td><span class="sig">void disable()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>active</code></td><td><span class="sig">boolean active()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>size</code></td><td><span class="sig">int size()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>arrange</code></td><td><span class="sig">void arrange()</span></td><td class="desc">Arrange steps by effective order so the run is strictly top-down/ascending.</td></tr>
<tr><td><code>run</code></td><td><span class="sig">SLDocumentResult run()</span></td><td class="desc">Run the document top-down. Returns the result collection.</td></tr>
<tr><td><code>outcome</code></td><td><span class="sig">SLVeritable outcome()</span></td><td class="desc">The whole document&#x27;s single binary item: sound and final-bit together.</td></tr>
<tr><td><code>results</code></td><td><span class="sig">SLDocumentResult results()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sldocumentannotation">SLDocumentAnnotation <span class="pill syntax">#sleela 2.5</span> <span class="muted" style="font-size:13px">(lib/sldocument/SLDocumentAnnotation.sleela)</span></h2>
<div data-u="sldocumentannotation sldocumentannotation">
<h3 id="SLDocumentAnnotation">SLDocumentAnnotation <span class="pill">class</span></h3>
<p class="desc">Defines SLDocumentAnnotation, the annotation vocabulary that marks how an .sldocument step is named and ordered. A step&#x27;s method may be annotated to indicate its order, its function, or it may simply be named as the method itself. The three annotation kinds: ORDER — @order(n): an explicit 1-based position in the top-down run. FUNCTION — @function(&quot;name&quot;): the step&#x27;s declared role/purpose, independent of its identifier. METHOD — no annotation: the method name itself is the step&#x27;s name, and its order is its textual position in the document (top-down). When ORDER is present it governs; otherwise textual order governs. A FUNCTION annotation never changes order, only the step&#x27;s declared purpose. Family: sldocument. Native VM/OS work crosses an explicit bridge.</p>
<div class="meta-note">Carries the standard <strong>Metadata Class record</strong> — 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.</div>
<p class="muted"><strong>Fields</strong> — the named values this unit stores.</p>
<table class="members"><tr><th>Field</th><th>Declaration</th><th>What it holds</th></tr>
<tr><td><code>METHOD</code></td><td><span class="sig">static final int METHOD   = 0</span></td><td class="desc">bare method name; order = textual position</td></tr>
<tr><td><code>ORDER</code></td><td><span class="sig">static final int ORDER    = 1</span></td><td class="desc">@order(n)</td></tr>
<tr><td><code>FUNCTION</code></td><td><span class="sig">static final int FUNCTION = 2</span></td><td class="desc">@function(&quot;name&quot;)</td></tr>
<tr><td><code>kind</code></td><td><span class="sig">int kind</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>order</code></td><td><span class="sig">int order</span></td><td class="desc">meaningful when kind == ORDER</td></tr>
<tr><td><code>role</code></td><td><span class="sig">String role</span></td><td class="desc">meaningful when kind == FUNCTION</td></tr>
<tr><td><code>methodName</code></td><td><span class="sig">String methodName</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
<p class="muted"><strong>Methods</strong> — the actions this unit can perform.</p>
<table class="members"><tr><th>Method</th><th>Signature</th><th>What it does</th></tr>
<tr><td><code>asMethod</code></td><td><span class="sig">void asMethod(String name)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>asOrder</code></td><td><span class="sig">void asOrder(String name, int n)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>asFunction</code></td><td><span class="sig">void asFunction(String name, String functionRole)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>kindOf</code></td><td><span class="sig">int kindOf()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>orderValue</code></td><td><span class="sig">int orderValue()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>role_</code></td><td><span class="sig">String role_()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>method</code></td><td><span class="sig">String method()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>hasExplicitOrder</code></td><td><span class="sig">boolean hasExplicitOrder()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sldocumentcompiler">SLDocumentCompiler <span class="pill syntax">#sleela 2.5</span> <span class="muted" style="font-size:13px">(lib/sldocument/SLDocumentCompiler.sleela)</span></h2>
<div data-u="sldocumentcompiler sldocumentcompiler">
<h3 id="SLDocumentCompiler">SLDocumentCompiler <span class="pill">class</span></h3>
<p class="desc">Defines SLDocumentCompiler, which compiles an .sldocument against and with standard SLeeLa source so the document&#x27;s ordered steps resolve to compiled methods on the same VM. An .sldocument is not interpreted in isolation: its step methods are ordinary SLeeLa, compiled through the normal SLeeLa Compiler path alongside the accompanying .sleela source units. This class is the document-aware front end to that path. It: 1. registers the companion .sleela source so symbols the steps call resolve; 2. lowers each annotated step to a method entry the VM can invoke; 3. validates that the resolved order has no gaps or duplicate @order values; 4. yields a frame handle the SLDocument runs against. The authoritative compilation remains the SLeeLa Compiler (lib/compiler / impl/frontend); this class drives it with document semantics. Family: sldocument. Native VM/OS work crosses an explicit bridge.</p>
<div class="meta-note">Carries the standard <strong>Metadata Class record</strong> — 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.</div>
<p class="muted"><strong>Fields</strong> — the named values this unit stores.</p>
<table class="members"><tr><th>Field</th><th>Declaration</th><th>What it holds</th></tr>
<tr><td><code>companionSources</code></td><td><span class="sig">String[] companionSources</span></td><td class="desc">.sleela source units compiled alongside</td></tr>
<tr><td><code>companionCount</code></td><td><span class="sig">int companionCount</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>state</code></td><td><span class="sig">int state</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastError</code></td><td><span class="sig">String lastError</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
<p class="muted"><strong>Methods</strong> — the actions this unit can perform.</p>
<table class="members"><tr><th>Method</th><th>Signature</th><th>What it does</th></tr>
<tr><td><code>init</code></td><td><span class="sig">void init()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>withSource</code></td><td><span class="sig">boolean withSource(String sleelaSourcePath)</span></td><td class="desc">Register a companion .sleela source unit the document compiles with.</td></tr>
<tr><td><code>enable</code></td><td><span class="sig">void enable()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>active</code></td><td><span class="sig">boolean active()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>validateOrder</code></td><td><span class="sig">boolean validateOrder(SLDocument doc)</span></td><td class="desc">Validate that the document&#x27;s resolved order is a clean 1..N with no gaps and no duplicate explicit @order values — a national/ordered program must have a settled sequence.</td></tr>
<tr><td><code>compile</code></td><td><span class="sig">int compile(SLDocument doc)</span></td><td class="desc">Compile the document together with its companion sources through the SLeeLa Compiler path. Returns a VM frame handle (&gt;= 0) on success, or -1 on failure.</td></tr>
<tr><td><code>compileAndRun</code></td><td><span class="sig">SLDocumentResult compileAndRun(SLDocument doc)</span></td><td class="desc">Compile and run in one call, binding the compiled frame into the document.</td></tr>
</table>
</div>
<h2 class="section" data-u="sldocumentconverter">SLDocumentConverter <span class="pill syntax">#sleela 2.5</span> <span class="muted" style="font-size:13px">(lib/sldocument/SLDocumentConverter.sleela)</span></h2>
<div data-u="sldocumentconverter sldocumentconverter">
<h3 id="SLDocumentConverter">SLDocumentConverter <span class="pill">class</span></h3>
<p class="desc">Defines SLDocumentConverter, which converts an ordered .sldocument</p>
<div class="meta-note">Carries the standard <strong>Metadata Class record</strong> — 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.</div>
<p class="muted"><strong>Fields</strong> — the named values this unit stores.</p>
<table class="members"><tr><th>Field</th><th>Declaration</th><th>What it holds</th></tr>
<tr><td><code>naming</code></td><td><span class="sig">SLDocumentNaming naming</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>comparison</code></td><td><span class="sig">SLSourceNameComparison comparison</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>className</code></td><td><span class="sig">String className</span></td><td class="desc">the .sleela class the document becomes</td></tr>
<tr><td><code>state</code></td><td><span class="sig">int state</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastError</code></td><td><span class="sig">String lastError</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
<p class="muted"><strong>Methods</strong> — the actions this unit can perform.</p>
<table class="members"><tr><th>Method</th><th>Signature</th><th>What it does</th></tr>
<tr><td><code>configure</code></td><td><span class="sig">void configure(String targetClassName)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>active</code></td><td><span class="sig">boolean active()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>plan</code></td><td><span class="sig">boolean plan(SLDocument doc)</span></td><td class="desc">Build the naming comparison for a whole document (does not emit yet).</td></tr>
<tr><td><code>synthesizedCount</code></td><td><span class="sig">int synthesizedCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>toSleela</code></td><td><span class="sig">String toSleela(SLDocument doc)</span></td><td class="desc">Emit the .sleela class text. Each step becomes a named method; run() calls them in order. Returns the emitted .sleela source, or &quot;&quot; on failure.</td></tr>
<tr><td><code>convertToFile</code></td><td><span class="sig">boolean convertToFile(SLDocument doc, String sleelaPath)</span></td><td class="desc">Convert and write the .sleela to a path for safekeeping. Returns true on success. The path should carry the .sleela extension.</td></tr>
<tr><td><code>names</code></td><td><span class="sig">SLSourceNameComparison names()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>error</code></td><td><span class="sig">String error()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sldocumentnaming">SLDocumentNaming <span class="pill syntax">#sleela 2.5</span> <span class="muted" style="font-size:13px">(lib/sldocument/SLDocumentNaming.sleela)</span></h2>
<div data-u="sldocumentnaming sldocumentnaming">
<h3 id="SLDocumentNaming">SLDocumentNaming <span class="pill">class</span></h3>
<p class="desc">Defines SLDocumentNaming, the naming convention that compares a</p>
<div class="meta-note">Carries the standard <strong>Metadata Class record</strong> — 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.</div>
<p class="muted"><strong>Fields</strong> — the named values this unit stores.</p>
<table class="members"><tr><th>Field</th><th>Declaration</th><th>What it holds</th></tr>
<tr><td><code>prefix</code></td><td><span class="sig">String prefix</span></td><td class="desc">prefix for synthesized names (default &quot;step&quot;)</td></tr>
<tr><td><code>state</code></td><td><span class="sig">int state</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
<p class="muted"><strong>Methods</strong> — the actions this unit can perform.</p>
<table class="members"><tr><th>Method</th><th>Signature</th><th>What it does</th></tr>
<tr><td><code>configure</code></td><td><span class="sig">void configure()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>withPrefix</code></td><td><span class="sig">void withPrefix(String p)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>active</code></td><td><span class="sig">boolean active()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isNamed</code></td><td><span class="sig">boolean isNamed(SLDocumentAnnotation ann)</span></td><td class="desc">Does the step already carry an explicit method name (vs. being anonymous)?</td></tr>
<tr><td><code>nameFor</code></td><td><span class="sig">String nameFor(SLDocumentAnnotation ann, int textualPosition)</span></td><td class="desc">Produce the stable .sleela method name for a step, per the convention. `textualPosition` is the step&#x27;s 1-based top-down position used when a name must be synthesized.</td></tr>
<tr><td><code>isSynthesized</code></td><td><span class="sig">boolean isSynthesized(SLDocumentAnnotation ann)</span></td><td class="desc">Was this name synthesized (vs. authored by the engineer)?</td></tr>
<tr><td><code>sanitize</code></td><td><span class="sig">String sanitize(String raw)</span></td><td class="desc">Make an arbitrary string a legal SLeeLa identifier.</td></tr>
<tr><td><code>camelFromRole</code></td><td><span class="sig">String camelFromRole(String role)</span></td><td class="desc">Turn a human role (&quot;reconcile accounts&quot;) into camelCase (&quot;reconcileAccounts&quot;).</td></tr>
</table>
</div>
<h2 class="section" data-u="sldocumentresult">SLDocumentResult <span class="pill syntax">#sleela 2.5</span> <span class="muted" style="font-size:13px">(lib/sldocument/SLDocumentResult.sleela)</span></h2>
<div data-u="sldocumentresult sldocumentresult">
<h3 id="SLDocumentResult">SLDocumentResult <span class="pill">class</span></h3>
<p class="desc">Defines SLDocumentResult, the ordered collection of per-step veritable-and-kind values produced by running an .sldocument top-down. The document&#x27;s overall outcome is the composition of its steps: it is sound only when every step that ran was itself sound (veritable AND kind). The result also records where the first unsound step occurred so a national program with established order can see exactly where flow broke. Family: sldocument. Native VM/OS work crosses an explicit bridge.</p>
<div class="meta-note">Carries the standard <strong>Metadata Class record</strong> — 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.</div>
<p class="muted"><strong>Fields</strong> — the named values this unit stores.</p>
<table class="members"><tr><th>Field</th><th>Declaration</th><th>What it holds</th></tr>
<tr><td><code>MAX_STEPS</code></td><td><span class="sig">static final int MAX_STEPS = 65536</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>values</code></td><td><span class="sig">SLVeritable[] values</span></td><td class="desc">one per step, in run order</td></tr>
<tr><td><code>names</code></td><td><span class="sig">String[] names</span></td><td class="desc">the step name for each value</td></tr>
<tr><td><code>count</code></td><td><span class="sig">int count</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>firstUnsound</code></td><td><span class="sig">int firstUnsound</span></td><td class="desc">index of the first unsound step, or -1</td></tr>
<tr><td><code>state</code></td><td><span class="sig">int state</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
<p class="muted"><strong>Methods</strong> — the actions this unit can perform.</p>
<table class="members"><tr><th>Method</th><th>Signature</th><th>What it does</th></tr>
<tr><td><code>init</code></td><td><span class="sig">void init()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>record</code></td><td><span class="sig">void record(String stepName, SLVeritable v)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>size</code></td><td><span class="sig">int size()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>active</code></td><td><span class="sig">boolean active()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sound</code></td><td><span class="sig">boolean sound()</span></td><td class="desc">The document is sound when every recorded step was sound.</td></tr>
<tr><td><code>firstFault</code></td><td><span class="sig">int firstFault()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>at</code></td><td><span class="sig">SLVeritable at(int index)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>finalBit</code></td><td><span class="sig">int finalBit()</span></td><td class="desc">The final binary item of the whole document: the last step&#x27;s bit, which in an ordered program is the established &quot;final result&quot; of the flow.</td></tr>
</table>
</div>
<h2 class="section" data-u="sldocumentstep">SLDocumentStep <span class="pill syntax">#sleela 2.5</span> <span class="muted" style="font-size:13px">(lib/sldocument/SLDocumentStep.sleela)</span></h2>
<div data-u="sldocumentstep sldocumentstep">
<h3 id="SLDocumentStep">SLDocumentStep <span class="pill">class</span></h3>
<p class="desc">Defines SLDocumentStep, one ordered step of an .sldocument — an annotated method that runs in top-down order and usually returns a single binary veritable-and-kind value. A step pairs an annotation (how it is named/ordered) with the method it invokes on the VM. When the document runs, each step is executed in order and its SLVeritable result is captured. The method body is ordinary compiled SLeeLa; the step is the document-level wrapper that records order and result. Family: sldocument. Native VM/OS work crosses an explicit bridge.</p>
<div class="meta-note">Carries the standard <strong>Metadata Class record</strong> — 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.</div>
<p class="muted"><strong>Fields</strong> — the named values this unit stores.</p>
<table class="members"><tr><th>Field</th><th>Declaration</th><th>What it holds</th></tr>
<tr><td><code>annotation</code></td><td><span class="sig">SLDocumentAnnotation annotation</span></td><td class="desc">how the step is named/ordered</td></tr>
<tr><td><code>effectiveOrder</code></td><td><span class="sig">int effectiveOrder</span></td><td class="desc">resolved 1-based position in the run</td></tr>
<tr><td><code>frame</code></td><td><span class="sig">int frame</span></td><td class="desc">VM frame the method is invoked against</td></tr>
<tr><td><code>result</code></td><td><span class="sig">SLVeritable result</span></td><td class="desc">the single binary value the step returned</td></tr>
<tr><td><code>ran</code></td><td><span class="sig">boolean ran</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>state</code></td><td><span class="sig">int state</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
<p class="muted"><strong>Methods</strong> — the actions this unit can perform.</p>
<table class="members"><tr><th>Method</th><th>Signature</th><th>What it does</th></tr>
<tr><td><code>configure</code></td><td><span class="sig">void configure(SLDocumentAnnotation ann, int textualPosition, int vmFrame)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>enable</code></td><td><span class="sig">void enable()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>disable</code></td><td><span class="sig">void disable()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>active</code></td><td><span class="sig">boolean active()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>order</code></td><td><span class="sig">int order()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>name</code></td><td><span class="sig">String name()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>invoke</code></td><td><span class="sig">SLVeritable invoke()</span></td><td class="desc">Invoke the step&#x27;s method on the VM and capture its single binary result. The native side evaluates the compiled method and reports a 1 (veritable) or 0 (not), together with a kindness flag for well-formedness.</td></tr>
<tr><td><code>hasRun</code></td><td><span class="sig">boolean hasRun()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>value</code></td><td><span class="sig">SLVeritable value()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slsourcenamecomparison">SLSourceNameComparison <span class="pill syntax">#sleela 2.5</span> <span class="muted" style="font-size:13px">(lib/sldocument/SLSourceNameComparison.sleela)</span></h2>
<div data-u="slsourcenamecomparison slsourcenamecomparison">
<h3 id="SLSourceNameComparison">SLSourceNameComparison <span class="pill">class</span></h3>
<p class="desc">Defines SLSourceNameComparison, which compares the naming of a .sleela program against a .sldocument so an engineer can see how the two forms line up before or after a conversion. The two forms name things differently: - .sleela names every method explicitly (it is class/method shaped); - .sldocument may leave steps anonymous (ordered position or role only). This comparison pairs each document step with the .sleela method name it would have (via SLDocumentNaming) and reports, per step, whether the names match, whether a name had to be synthesized, and whether any collision arose. Family: sldocument. Native VM/OS work crosses an explicit bridge.</p>
<div class="meta-note">Carries the standard <strong>Metadata Class record</strong> — 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.</div>
<p class="muted"><strong>Fields</strong> — the named values this unit stores.</p>
<table class="members"><tr><th>Field</th><th>Declaration</th><th>What it holds</th></tr>
<tr><td><code>MAX_ROWS</code></td><td><span class="sig">static final int MAX_ROWS = 65536</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>naming</code></td><td><span class="sig">SLDocumentNaming naming</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>documentName</code></td><td><span class="sig">String[] documentName</span></td><td class="desc">the step&#x27;s name in the document (may be &quot;&quot;)</td></tr>
<tr><td><code>sleelaName</code></td><td><span class="sig">String[] sleelaName</span></td><td class="desc">the method name it would have in .sleela</td></tr>
<tr><td><code>synthesized</code></td><td><span class="sig">boolean[] synthesized</span></td><td class="desc">true when the .sleela name had to be synthesized</td></tr>
<tr><td><code>collided</code></td><td><span class="sig">boolean[] collided</span></td><td class="desc">true when this name duplicates an earlier one</td></tr>
<tr><td><code>rows</code></td><td><span class="sig">int rows</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>state</code></td><td><span class="sig">int state</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
<p class="muted"><strong>Methods</strong> — the actions this unit can perform.</p>
<table class="members"><tr><th>Method</th><th>Signature</th><th>What it does</th></tr>
<tr><td><code>init</code></td><td><span class="sig">void init(SLDocumentNaming conv)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>active</code></td><td><span class="sig">boolean active()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>size</code></td><td><span class="sig">int size()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>compareStep</code></td><td><span class="sig">void compareStep(SLDocumentAnnotation ann, int textualPosition)</span></td><td class="desc">Compare one document step. `textualPosition` is its 1-based top-down index.</td></tr>
<tr><td><code>synthesizedCount</code></td><td><span class="sig">int synthesizedCount()</span></td><td class="desc">How many steps had to be given a synthesized .sleela name?</td></tr>
<tr><td><code>hasCollision</code></td><td><span class="sig">boolean hasCollision()</span></td><td class="desc">Did any two steps resolve to the same .sleela method name?</td></tr>
<tr><td><code>convertible</code></td><td><span class="sig">boolean convertible()</span></td><td class="desc">True when the comparison is clean enough to convert safely: no collisions.</td></tr>
<tr><td><code>documentNameAt</code></td><td><span class="sig">String documentNameAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sleelaNameAt</code></td><td><span class="sig">String sleelaNameAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slveritable">SLVeritable <span class="pill syntax">#sleela 2.5</span> <span class="muted" style="font-size:13px">(lib/sldocument/SLVeritable.sleela)</span></h2>
<div data-u="slveritable slveritable">
<h3 id="SLVeritable">SLVeritable <span class="pill">class</span></h3>
<p class="desc">Defines SLVeritable, the single binary value an .sldocument step usually returns — a verified truth that is &quot;veritable and kind&quot;. An .sldocument runs top-down, and each ordered step generally returns one binary item. That item is modeled here as a two-fold judgement: - veritable: the step&#x27;s result is true / holds (the binary truth), AND - kind: the result is well-formed and benign — the right *kind* of value, not a malformed or hostile one. Both must hold for the value to be &quot;sound&quot;. A step that produces a true but ill-formed result is veritable-but-not-kind, and the document does not treat it as a clean pass. Family: sldocument. Native VM/OS work crosses an explicit bridge.</p>
<div class="meta-note">Carries the standard <strong>Metadata Class record</strong> — 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.</div>
<p class="muted"><strong>Fields</strong> — the named values this unit stores.</p>
<table class="members"><tr><th>Field</th><th>Declaration</th><th>What it holds</th></tr>
<tr><td><code>veritable</code></td><td><span class="sig">boolean veritable</span></td><td class="desc">the binary truth: did the step hold?</td></tr>
<tr><td><code>kind</code></td><td><span class="sig">boolean kind</span></td><td class="desc">is the result well-formed and benign?</td></tr>
<tr><td><code>label</code></td><td><span class="sig">String label</span></td><td class="desc">the symbol this value answers for</td></tr>
<tr><td><code>state</code></td><td><span class="sig">int state</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
<p class="muted"><strong>Methods</strong> — the actions this unit can perform.</p>
<table class="members"><tr><th>Method</th><th>Signature</th><th>What it does</th></tr>
<tr><td><code>affirm</code></td><td><span class="sig">void affirm(String forSymbol)</span></td><td class="desc">The two canonical constructions.</td></tr>
<tr><td><code>deny</code></td><td><span class="sig">void deny(String forSymbol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>configure</code></td><td><span class="sig">void configure(boolean isVeritable, boolean isKind, String forSymbol)</span></td><td class="desc">General construction from an explicit pair.</td></tr>
<tr><td><code>active</code></td><td><span class="sig">boolean active()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isVeritable</code></td><td><span class="sig">boolean isVeritable()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isKind</code></td><td><span class="sig">boolean isKind()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>symbol</code></td><td><span class="sig">String symbol()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sound</code></td><td><span class="sig">boolean sound()</span></td><td class="desc">Sound == veritable AND kind: a true result of the right kind.</td></tr>
<tr><td><code>bit</code></td><td><span class="sig">int bit()</span></td><td class="desc">The binary item itself, as a single bit (1 = veritable, 0 = not), which is what the step hands back by default.</td></tr>
<tr><td><code>and</code></td><td><span class="sig">SLVeritable and(SLVeritable other)</span></td><td class="desc">Logical composition, preserving kindness: an unkind operand makes the result unkind, so faults propagate rather than hide.</td></tr>
<tr><td><code>or</code></td><td><span class="sig">SLVeritable or(SLVeritable other)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<script>function flt(q){q=q.toLowerCase();document.querySelectorAll('[data-u]').forEach(function(el){el.style.display = el.getAttribute('data-u').indexOf(q)>=0||q==''?'':'none';});}</script>
<footer>
Generated by <code>tools/generate-sleeladoc-api.py</code> from the live
<code>/lib</code> tree on 2026-11-15 03:46 UTC.
SleelaDoc — the SLeeLa documentation brand. SLeeLa — MEARVK LLC · Max Rupplin · UNCW, NCSU, Harvard · 2026 · George Soros 2507-2608.
</footer>
</main>
</div>
</body>
</html>