advantage.html
sleeladoc-api/package/advantage.html · 4453 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 advantage — 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> › <a href="../packages.html">Packages</a> › advantage</div>
<h1>Package <code>advantage</code></h1>
<div class="lead">This package contains <strong>206</strong> source unit(s) defining <strong>206</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="advantage-demo">advantage-demo <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/advantage-demo.sleela)</span></h2>
<div data-u="advantage-demo advantagedemo">
<h3 id="AdvantageDemo">AdvantageDemo <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the advantage onion model (user's model and developer's model).</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="advantagemodulesdemo">AdvantageModulesDemo <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/demo/AdvantageModulesDemo.sleela)</span></h2>
<div data-u="advantagemodulesdemo advantagemodulesdemo">
<h3 id="AdvantageModulesDemo">AdvantageModulesDemo <span class="pill">class</span></h3>
<p class="desc">Advantage module host demo: a user defined program loads the medium, then some</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>check</code></td><td><span class="sig">void check(String what, boolean ok)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>req</code></td><td><span class="sig">SLAdvMessage req(String to, String topic)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>cand</code></td><td><span class="sig">SLAdvMessage cand(double e, double c, double n, double s, double v, double a, double q, double p, double t, double d, double now)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>judgeMsg</code></td><td><span class="sig">SLAdvMessage judgeMsg(SLMoralTrade t)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="advprogramlistener">AdvProgramListener <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/demo/AdvProgramListener.sleela)</span></h2>
<div data-u="advprogramlistener advprogramlistener">
<h3 id="AdvProgramListener">AdvProgramListener <span class="pill">class</span></h3>
<p class="desc">Example listener for the demo: a user defined program callback that counts what</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>events</code></td><td><span class="sig">int events = 0</span></td><td class="desc">The program side of the conversation. A module speaks, this is called.</td></tr>
<tr><td><code>errors</code></td><td><span class="sig">int errors = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>readyCount</code></td><td><span class="sig">int readyCount = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>vetoes</code></td><td><span class="sig">int vetoes = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>judgedEvents</code></td><td><span class="sig">int judgedEvents = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastVerdict</code></td><td><span class="sig">int lastVerdict = -1</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>haltedEvents</code></td><td><span class="sig">int haltedEvents = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastTopic</code></td><td><span class="sig">String lastTopic = ""</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>onMessage</code></td><td><span class="sig">int onMessage(SLAdvMessage m)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="advuserechomodule">AdvUserEchoModule <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/demo/AdvUserEchoModule.sleela)</span></h2>
<div data-u="advuserechomodule advuserechomodule">
<h3 id="AdvUserEchoModule">AdvUserEchoModule <span class="pill">class</span></h3>
<p class="desc">Example user defined module: it echoes the first number doubled, and tells the</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>br</code></td><td><span class="sig">SLAdvBridge br</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>on</code></td><td><span class="sig">boolean on = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>served</code></td><td><span class="sig">int served = 0</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>moduleName</code></td><td><span class="sig">String moduleName()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>moduleKind</code></td><td><span class="sig">String moduleKind()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>moduleVersion</code></td><td><span class="sig">String moduleVersion()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>running</code></td><td><span class="sig">boolean running()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>begin</code></td><td><span class="sig">boolean begin(SLAdvBridge bridge)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>end</code></td><td><span class="sig">void end()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>handle</code></td><td><span class="sig">int handle(SLAdvMessage m)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getServed</code></td><td><span class="sig">int getServed()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="advuserpingmodule">AdvUserPingModule <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/demo/AdvUserPingModule.sleela)</span></h2>
<div data-u="advuserpingmodule advuserpingmodule">
<h3 id="AdvUserPingModule">AdvUserPingModule <span class="pill">class</span></h3>
<p class="desc">Example user defined module for the safety test: answers every request by</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>br</code></td><td><span class="sig">SLAdvBridge br</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>on</code></td><td><span class="sig">boolean on = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>myName</code></td><td><span class="sig">String myName = "ping-a"</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>partner</code></td><td><span class="sig">String partner = "ping-b"</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>setNames</code></td><td><span class="sig">void setNames(String mine, String other)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>moduleName</code></td><td><span class="sig">String moduleName()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>moduleKind</code></td><td><span class="sig">String moduleKind()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>moduleVersion</code></td><td><span class="sig">String moduleVersion()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>running</code></td><td><span class="sig">boolean running()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>begin</code></td><td><span class="sig">boolean begin(SLAdvBridge bridge)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>end</code></td><td><span class="sig">void end()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>handle</code></td><td><span class="sig">int handle(SLAdvMessage m)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="business-exchange">business-exchange <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/medium-results/business-exchange.sleela)</span></h2>
<div data-u="business-exchange businessexchange">
<h3 id="BusinessExchange">BusinessExchange <span class="pill">class</span></h3>
<p class="desc">MEDIUM-RESULT (Business). Demonstrates connecting, controlling, and executing a trade over open exchange in the USA using the advantage connect medium (SLNetConnector, SLClockConnector, SLSqlConnector, SLMoneyConnector) together with the network subject (SLMarketScout, SLNegotiationRound, SLCashflow). A small-business wholesale buy/sell.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="cement-trade">cement-trade <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/novice/network-trades/cement-trade.sleela)</span></h2>
<div data-u="cement-trade cementtrade">
<h3 id="CementTrade">CementTrade <span class="pill">class</span></h3>
<p class="desc">NETWORK-TRADE 02 of 12 -- CEMENT. Scout a network of venue quotes, pick the cheapest buy and dearest sell, negotiate a fair clearing price, and emit a cash receipt. Rung: a bulk building material, bought by the pallet.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="coffee-green-trade">coffee-green-trade <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/medium/network-trades/coffee-green-trade.sleela)</span></h2>
<div data-u="coffee-green-trade coffeegreentrade">
<h3 id="CoffeeGreenTrade">CoffeeGreenTrade <span class="pill">class</span></h3>
<p class="desc">NETWORK-TRADE 05 of 12 -- COFFEE-GREEN. Scout a network of venue quotes, pick the cheapest buy and dearest sell, negotiate a fair clearing price, and emit a cash receipt. Rung: a soft commodity with seasonality baked into the spread.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="connect-demo">connect-demo <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/connect/connect-demo.sleela)</span></h2>
<div data-u="connect-demo connectdemo">
<h3 id="ConnectDemo">ConnectDemo <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the advantage/connect medium end to end: the shared status vocabulary and fault record, then each of the four connectors (SQL, national clock, network, money) driven through its lifecycle, its native-adapter boundary, and a fault path.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="consumer-example">consumer-example <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/novice/consumer-outcomes/consumer-example.sleela)</span></h2>
<div data-u="consumer-example consumerexample">
<h3 id="ConsumerExample">ConsumerExample <span class="pill">class</span></h3>
<p class="desc">A professional example -- the CONSUMER -- uses the simple user's model of the Sequitur onion to advantage a household budget.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="copper-wire-trade">copper-wire-trade <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/medium/network-trades/copper-wire-trade.sleela)</span></h2>
<div data-u="copper-wire-trade copperwiretrade">
<h3 id="CopperWireTrade">CopperWireTrade <span class="pill">class</span></h3>
<p class="desc">NETWORK-TRADE 03 of 12 -- COPPER-WIRE. Scout a network of venue quotes, pick the cheapest buy and dearest sell, negotiate a fair clearing price, and emit a cash receipt. Rung: a refined industrial input; now with a settlement fee.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="cotton-bales-trade">cotton-bales-trade <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/medium/network-trades/cotton-bales-trade.sleela)</span></h2>
<div data-u="cotton-bales-trade cottonbalestrade">
<h3 id="CottonBalesTrade">CottonBalesTrade <span class="pill">class</span></h3>
<p class="desc">NETWORK-TRADE 06 of 12 -- COTTON-BALES. Scout a network of venue quotes, pick the cheapest buy and dearest sell, negotiate a fair clearing price, and emit a cash receipt. Rung: both frictions together: fee AND carry on the same trade.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="diagreement">DiAgreement <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/04-agreement/DiAgreement.sleela)</span></h2>
<div data-u="diagreement diagreement">
<h3 id="DiAgreement">DiAgreement <span class="pill">class</span></h3>
<p class="desc">Device Instructor agreement test: the student and the Purchase Master each build a registry of the same field and the instructor points at exactly what differs.</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>student</code></td><td><span class="sig">SLNounRegistry student = new SLNounRegistry()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>master</code></td><td><span class="sig">SLNounRegistry master = new SLNounRegistry()</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>compare</code></td><td><span class="sig">int compare()</span></td><td class="desc">Prints each difference and returns the number of differences.</td></tr>
<tr><td><code>verdict</code></td><td><span class="sig">void verdict(int diffs)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="dinestedcarriers">DiNestedCarriers <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/05-nested-carriers/DiNestedCarriers.sleela)</span></h2>
<div data-u="dinestedcarriers dinestedcarriers">
<h3 id="DiNestedCarriers">DiNestedCarriers <span class="pill">class</span></h3>
<p class="desc">Device Instructor lesson on nested carriers: a carrier can itself be carried, every chain leads back to the field, and each noun has exactly one place.</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>reg</code></td><td><span class="sig">SLNounRegistry reg = new SLNounRegistry()</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>tryRegister</code></td><td><span class="sig">void tryRegister(String noun, String carrier)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="dipurchaseonion">DiPurchaseOnion <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/06-purchase-onion/DiPurchaseOnion.sleela)</span></h2>
<div data-u="dipurchaseonion dipurchaseonion">
<h3 id="DiPurchaseOnion">DiPurchaseOnion <span class="pill">class</span></h3>
<p class="desc">Device Instructor lesson taking registry to onion: the student totals registered quotes by hand, the Purchase Master runs the Sequitur onion, and the instructor compares.</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>reg</code></td><td><span class="sig">SLNounRegistry reg = new SLNounRegistry()</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>loadQuotes</code></td><td><span class="sig">void loadQuotes(boolean discountSeen)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>studentTotal</code></td><td><span class="sig">int studentTotal(String supplier)</span></td><td class="desc">The student: a plain sum of every registered value under the supplier.</td></tr>
<tr><td><code>masterTotal</code></td><td><span class="sig">int masterTotal(String label, int quote, int fee, int discount)</span></td><td class="desc">The Purchase Master: the same figures through the advantage onion.</td></tr>
<tr><td><code>pick</code></td><td><span class="sig">String pick(int a, int b)</span></td><td class="desc">Tie norm: supplier A is chosen when the two totals are equal.</td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="diregistryintake">DiRegistryIntake <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/01-registry-intake/DiRegistryIntake.sleela)</span></h2>
<div data-u="diregistryintake diregistryintake">
<h3 id="DiRegistryIntake">DiRegistryIntake <span class="pill">class</span></h3>
<p class="desc">Device Instructor intake: the shared registry refuses input until a field of observation is declared and keeps one carrier per noun.</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>reg</code></td><td><span class="sig">SLNounRegistry reg = new SLNounRegistry()</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>tryRegister</code></td><td><span class="sig">void tryRegister(String noun, String carrier)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="distudentinput">DiStudentInput <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/02-student-input-gate/DiStudentInput.sleela)</span></h2>
<div data-u="distudentinput distudentinput">
<h3 id="DiStudentInput">DiStudentInput <span class="pill">class</span></h3>
<p class="desc">Device Instructor gate that accepts only good student input: a claim, evidence registered in the shared registry, and the next step in sequitur order.</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>reg</code></td><td><span class="sig">SLNounRegistry reg = new SLNounRegistry()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastStep</code></td><td><span class="sig">int lastStep = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>good</code></td><td><span class="sig">int good = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>refused</code></td><td><span class="sig">int refused = 0</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>submit</code></td><td><span class="sig">int submit(int step, String claim, String evidence)</span></td><td class="desc">Result codes: 0 good, 1 empty claim, 2 evidence not registered, 3 step out of order.</td></tr>
<tr><td><code>reason</code></td><td><span class="sig">String reason(int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>show</code></td><td><span class="sig">void show(int step, String claim, String evidence)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="disystemreadiness">DiSystemReadiness <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/03-system-readiness/DiSystemReadiness.sleela)</span></h2>
<div data-u="disystemreadiness disystemreadiness">
<h3 id="DiSystemReadiness">DiSystemReadiness <span class="pill">class</span></h3>
<p class="desc">Device Instructor check that the system reports enough good input to teach: each reading is present, plausible and sufficient, or honestly not observed.</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>names</code></td><td><span class="sig">String[] names = new String[5]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>readings</code></td><td><span class="sig">int[] readings = new int[5]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>minimums</code></td><td><span class="sig">int[] minimums = new int[5]</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>setup</code></td><td><span class="sig">void setup()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>report</code></td><td><span class="sig">void report(int slot, int value)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>status</code></td><td><span class="sig">int status(int slot)</span></td><td class="desc">Status codes: 0 ready, 1 not observed, 2 implausible, 3 below minimum.</td></tr>
<tr><td><code>word</code></td><td><span class="sig">String word(int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>audit</code></td><td><span class="sig">int audit()</span></td><td class="desc">Prints the report and returns how many checks are not ready.</td></tr>
<tr><td><code>verdict</code></td><td><span class="sig">void verdict(int bad)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradealuminum">DiTradeAluminum <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/25-trade-aluminum/DiTradeAluminum.sleela)</span></h2>
<div data-u="ditradealuminum ditradealuminum">
<h3 id="DiTradeAluminum">DiTradeAluminum <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 25: aluminum, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradecement">DiTradeCement <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/08-trade-cement/DiTradeCement.sleela)</span></h2>
<div data-u="ditradecement ditradecement">
<h3 id="DiTradeCement">DiTradeCement <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 8: cement, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradecoffee">DiTradeCoffee <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/11-trade-coffee/DiTradeCoffee.sleela)</span></h2>
<div data-u="ditradecoffee ditradecoffee">
<h3 id="DiTradeCoffee">DiTradeCoffee <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 11: coffee, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradecopper">DiTradeCopper <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/09-trade-copper/DiTradeCopper.sleela)</span></h2>
<div data-u="ditradecopper ditradecopper">
<h3 id="DiTradeCopper">DiTradeCopper <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 9: copper, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradecotton">DiTradeCotton <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/12-trade-cotton/DiTradeCotton.sleela)</span></h2>
<div data-u="ditradecotton ditradecotton">
<h3 id="DiTradeCotton">DiTradeCotton <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 12: cotton, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradeeightwaycapstone">DiTradeEightWayCapstone <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/32-trade-eight-way-capstone/DiTradeEightWayCapstone.sleela)</span></h2>
<div data-u="ditradeeightwaycapstone ditradeeightwaycapstone">
<h3 id="DiTradeEightWayCapstone">DiTradeEightWayCapstone <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 32: eight-way capstone, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradefreight">DiTradeFreight <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/21-trade-freight/DiTradeFreight.sleela)</span></h2>
<div data-u="ditradefreight ditradefreight">
<h3 id="DiTradeFreight">DiTradeFreight <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 21: freight, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradefuel">DiTradeFuel <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/20-trade-fuel/DiTradeFuel.sleela)</span></h2>
<div data-u="ditradefuel ditradefuel">
<h3 id="DiTradeFuel">DiTradeFuel <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 20: fuel, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradeglass">DiTradeGlass <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/29-trade-glass/DiTradeGlass.sleela)</span></h2>
<div data-u="ditradeglass ditradeglass">
<h3 id="DiTradeGlass">DiTradeGlass <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 29: glass, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradelithium">DiTradeLithium <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/14-trade-lithium/DiTradeLithium.sleela)</span></h2>
<div data-u="ditradelithium ditradelithium">
<h3 id="DiTradeLithium">DiTradeLithium <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 14: lithium, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradelumber">DiTradeLumber <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/07-trade-lumber/DiTradeLumber.sleela)</span></h2>
<div data-u="ditradelumber ditradelumber">
<h3 id="DiTradeLumber">DiTradeLumber <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 7: lumber, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradenickel">DiTradeNickel <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/27-trade-nickel/DiTradeNickel.sleela)</span></h2>
<div data-u="ditradenickel ditradenickel">
<h3 id="DiTradeNickel">DiTradeNickel <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 27: nickel, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradepaper">DiTradePaper <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/30-trade-paper/DiTradePaper.sleela)</span></h2>
<div data-u="ditradepaper ditradepaper">
<h3 id="DiTradePaper">DiTradePaper <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 30: paper, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditraderesin">DiTradeResin <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/31-trade-resin/DiTradeResin.sleela)</span></h2>
<div data-u="ditraderesin ditraderesin">
<h3 id="DiTradeResin">DiTradeResin <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 31: plastic resin, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditraderice">DiTradeRice <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/23-trade-rice/DiTradeRice.sleela)</span></h2>
<div data-u="ditraderice ditraderice">
<h3 id="DiTradeRice">DiTradeRice <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 23: rice, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditraderubber">DiTradeRubber <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/28-trade-rubber/DiTradeRubber.sleela)</span></h2>
<div data-u="ditraderubber ditraderubber">
<h3 id="DiTradeRubber">DiTradeRubber <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 28: rubber, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradesemiconductors">DiTradeSemiconductors <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/15-trade-semiconductors/DiTradeSemiconductors.sleela)</span></h2>
<div data-u="ditradesemiconductors ditradesemiconductors">
<h3 id="DiTradeSemiconductors">DiTradeSemiconductors <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 15: semiconductors, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradeserverracks">DiTradeServerRacks <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/16-trade-server-racks/DiTradeServerRacks.sleela)</span></h2>
<div data-u="ditradeserverracks ditradeserverracks">
<h3 id="DiTradeServerRacks">DiTradeServerRacks <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 16: server racks, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradesmartphones">DiTradeSmartphones <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/17-trade-smartphones/DiTradeSmartphones.sleela)</span></h2>
<div data-u="ditradesmartphones ditradesmartphones">
<h3 id="DiTradeSmartphones">DiTradeSmartphones <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 17: smartphones, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradesolar">DiTradeSolar <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/13-trade-solar/DiTradeSolar.sleela)</span></h2>
<div data-u="ditradesolar ditradesolar">
<h3 id="DiTradeSolar">DiTradeSolar <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 13: solar panels, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradesteel">DiTradeSteel <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/10-trade-steel/DiTradeSteel.sleela)</span></h2>
<div data-u="ditradesteel ditradesteel">
<h3 id="DiTradeSteel">DiTradeSteel <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 10: steel, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradesugar">DiTradeSugar <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/24-trade-sugar/DiTradeSugar.sleela)</span></h2>
<div data-u="ditradesugar ditradesugar">
<h3 id="DiTradeSugar">DiTradeSugar <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 24: sugar, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradetelevisions">DiTradeTelevisions <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/18-trade-televisions/DiTradeTelevisions.sleela)</span></h2>
<div data-u="ditradetelevisions ditradetelevisions">
<h3 id="DiTradeTelevisions">DiTradeTelevisions <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 18: televisions, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradetiecapstone">DiTradeTieCapstone <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/22-trade-tie-capstone/DiTradeTieCapstone.sleela)</span></h2>
<div data-u="ditradetiecapstone ditradetiecapstone">
<h3 id="DiTradeTieCapstone">DiTradeTieCapstone <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 22: tie capstone, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradewheat">DiTradeWheat <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/19-trade-wheat/DiTradeWheat.sleela)</span></h2>
<div data-u="ditradewheat ditradewheat">
<h3 id="DiTradeWheat">DiTradeWheat <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 19: wheat, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="ditradezinc">DiTradeZinc <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/26-trade-zinc/DiTradeZinc.sleela)</span></h2>
<div data-u="ditradezinc ditradezinc">
<h3 id="DiTradeZinc">DiTradeZinc <span class="pill">class</span></h3>
<p class="desc">Device Instructor trading decision 26: zinc, with the student and the Purchase Master compared entry by entry.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="economics-exchange">economics-exchange <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/medium-results/economics-exchange.sleela)</span></h2>
<div data-u="economics-exchange economicsexchange">
<h3 id="EconomicsExchange">EconomicsExchange <span class="pill">class</span></h3>
<p class="desc">MEDIUM-RESULT (Economics). Connect, control, and execute a coordinated buyer+seller trade over open exchange in the USA, using the math subject (joint profit max + Nash bargaining) for the clearing price and the connect medium for the connection, settlement, and record. Theme: Economics -- maximize the surplus, then split it fairly.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="grading-demo">grading-demo <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/grading/grading-demo.sleela)</span></h2>
<div data-u="grading-demo gradingdemo">
<h3 id="GradingDemo">GradingDemo <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the sophistication circuit grader (modules, sets, ratings).</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="grading-primer">grading-primer <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/professional/sophistication-grading/grading-primer.sleela)</span></h2>
<div data-u="grading-primer gradingprimer">
<h3 id="GradingPrimer">GradingPrimer <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the sophistication circuit grader (modules, sets, ratings).</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="healer-example">healer-example <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/advanced/trust-fields/healer-example.sleela)</span></h2>
<div data-u="healer-example healerexample">
<h3 id="HealerExample">HealerExample <span class="pill">class</span></h3>
<p class="desc">A professional example -- the HEALER -- restores trust over time and measures the cost of a breach, via the trust-decay SDE.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="helper-example">helper-example <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/medium/supply-chains/helper-example.sleela)</span></h2>
<div data-u="helper-example helperexample">
<h3 id="HelperExample">HelperExample <span class="pill">class</span></h3>
<p class="desc">A professional example -- the HELPER -- stands up a small supply->retail chain and moves goods through it (vertical integration).</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="hstdemo">HstDemo <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/trader/HstDemo.sleela)</span></h2>
<div data-u="hstdemo hstdemo">
<h3 id="HstDemo">HstDemo <span class="pill">class</span></h3>
<p class="desc">Runnable check of the high speed trader engine.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>evalsPerSimSecond</code></td><td><span class="sig">int evalsPerSimSecond = 5000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxMinute</code></td><td><span class="sig">double maxMinute = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastMinute</code></td><td><span class="sig">double lastMinute = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastPnl</code></td><td><span class="sig">double lastPnl = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastAccepted</code></td><td><span class="sig">int lastAccepted = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastWallSeconds</code></td><td><span class="sig">double lastWallSeconds = 0.0</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>check</code></td><td><span class="sig">void check(String what, boolean ok)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>run</code></td><td><span class="sig">double run(SLHighSpeedTrader tr, SLHstMarket mk, int simSeconds)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>vetoReport</code></td><td><span class="sig">void vetoReport(SLHighSpeedTrader tr, SLHstPragmatics reg)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="installer-demo">installer-demo <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/connect/installer-demo.sleela)</span></h2>
<div data-u="installer-demo installerdemo">
<h3 id="InstallerDemo">InstallerDemo <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of SLTechInstallerII -- the Tech Installer II authority (Max Rupplin / MEARVK LLC, North Carolina, 2026+) installing the actual Use of the Advantage System onto install sets and settings, ceteris paribus, with authority gating and fault handling.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="integration-demo">integration-demo <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/integration/integration-demo.sleela)</span></h2>
<div data-u="integration-demo integrationdemo">
<h3 id="IntegrationDemo">IntegrationDemo <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the vertical-integration subject (compartments, bays, trials, newton trays, recursion).</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="integration-primer">integration-primer <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/advanced/vertical-integration/integration-primer.sleela)</span></h2>
<div data-u="integration-primer integrationprimer">
<h3 id="IntegrationPrimer">IntegrationPrimer <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the vertical-integration subject (compartments, bays, trials, newton trays, recursion).</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="lithium-cell-trade">lithium-cell-trade <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/advanced/network-trades/lithium-cell-trade.sleela)</span></h2>
<div data-u="lithium-cell-trade lithiumcelltrade">
<h3 id="LithiumCellTrade">LithiumCellTrade <span class="pill">class</span></h3>
<p class="desc">NETWORK-TRADE 08 of 12 -- LITHIUM-CELL. Scout a network of venue quotes, pick the cheapest buy and dearest sell, negotiate a fair clearing price, and emit a cash receipt. Rung: a high-volume cell; small unit price, large position.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="lumber-trade">lumber-trade <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/novice/network-trades/lumber-trade.sleela)</span></h2>
<div data-u="lumber-trade lumbertrade">
<h3 id="LumberTrade">LumberTrade <span class="pill">class</span></h3>
<p class="desc">NETWORK-TRADE 01 of 12 -- LUMBER. Scout a network of venue quotes, pick the cheapest buy and dearest sell, negotiate a fair clearing price, and emit a cash receipt. Rung: the entry rung of the ladder: a raw structural commodity.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="math-primer">math-primer <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/medium/trade-economics/math-primer.sleela)</span></h2>
<div data-u="math-primer mathprimer">
<h3 id="MathPrimer">MathPrimer <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the advantage/math trade subject (joint profit max, Nash bargaining, bilateral newsvendor).</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="moraldemo">MoralDemo <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/moral/MoralDemo.sleela)</span></h2>
<div data-u="moraldemo moraldemo">
<h3 id="MoralDemo">MoralDemo <span class="pill">class</span></h3>
<p class="desc">Runnable check of the Moral Evaluator.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>seed</code></td><td><span class="sig">int seed = 20261113</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>check</code></td><td><span class="sig">void check(String what, boolean ok)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>rnd</code></td><td><span class="sig">double rnd()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>show</code></td><td><span class="sig">void show(SLMoralEvaluator ev, String label)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="network-demo">network-demo <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/network/network-demo.sleela)</span></h2>
<div data-u="network-demo networkdemo">
<h3 id="NetworkDemo">NetworkDemo <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the advantage/network subject (SLMarketScout, SLNegotiationRound, SLCashflow) end to end: scout a network of venue quotes, pick the best buy/sell, negotiate a fair clearing price, and emit a cash-flow receipt.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="onion-primer">onion-primer <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/novice/onion-model/onion-primer.sleela)</span></h2>
<div data-u="onion-primer onionprimer">
<h3 id="OnionPrimer">OnionPrimer <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the advantage onion model (user's model and developer's model).</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="output-demo">output-demo <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/output/output-demo.sleela)</span></h2>
<div data-u="output-demo outputdemo">
<h3 id="OutputDemo">OutputDemo <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the advantage output seam (terminal / CommonRails / socket-connector / silent).</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="output-primer">output-primer <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/medium/output-routing/output-primer.sleela)</span></h2>
<div data-u="output-primer outputprimer">
<h3 id="OutputPrimer">OutputPrimer <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the advantage output seam (terminal / CommonRails / socket-connector / silent).</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="physics-demo">physics-demo <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/physics/physics-demo.sleela)</span></h2>
<div data-u="physics-demo physicsdemo">
<h3 id="PhysicsDemo">PhysicsDemo <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the advantage/physics trust-field subject (metric, geodesic, contact, SDE).</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="physics-primer">physics-primer <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/advanced/trust-fields/physics-primer.sleela)</span></h2>
<div data-u="physics-primer physicsprimer">
<h3 id="PhysicsPrimer">PhysicsPrimer <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the advantage/physics trust-field subject (metric, geodesic, contact, SDE).</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="professionals-demo">professionals-demo <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/professional/sophistication-grading/professionals-demo.sleela)</span></h2>
<div data-u="professionals-demo professionalsdemo">
<h3 id="ProfessionalsDemo">ProfessionalsDemo <span class="pill">class</span></h3>
<p class="desc">An advantage example cast for professional roles -- grade a set of professionals as modules and rank them A..D.</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>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>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="semiconductor-trade">semiconductor-trade <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/advanced/network-trades/semiconductor-trade.sleela)</span></h2>
<div data-u="semiconductor-trade semiconductortrade">
<h3 id="SemiconductorTrade">SemiconductorTrade <span class="pill">class</span></h3>
<p class="desc">NETWORK-TRADE 09 of 12 -- SEMICONDUCTOR. Scout a network of venue quotes, pick the cheapest buy and dearest sell, negotiate a fair clearing price, and emit a cash receipt. Rung: a scarce input: strong seller power and both frictions.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="server-rack-trade">server-rack-trade <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/professional/network-trades/server-rack-trade.sleela)</span></h2>
<div data-u="server-rack-trade serverracktrade">
<h3 id="ServerRackTrade">ServerRackTrade <span class="pill">class</span></h3>
<p class="desc">NETWORK-TRADE 10 of 12 -- SERVER-RACK. Scout a network of venue quotes, pick the cheapest buy and dearest sell, negotiate a fair clearing price, and emit a cash receipt. Rung: capital equipment; a few units, large ticket.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sladvantagedevelopermodel">SLAdvantageDeveloperModel <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/SLAdvantageDeveloperModel.sleela)</span></h2>
<div data-u="sladvantagedevelopermodel sladvantagedevelopermodel">
<h3 id="SLAdvantageDeveloperModel">SLAdvantageDeveloperModel <span class="pill">class</span></h3>
<p class="desc">The developer's model -- full-control encapsulation of the advantage onion process.</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>onion</code></td><td><span class="sig">SLAdvantageSequitur onion</span></td><td class="desc">---- Developer-facing engine state ----</td></tr>
<tr><td><code>dividend</code></td><td><span class="sig">SLAdvantageDividend dividend</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>passes</code></td><td><span class="sig">int passes</span></td><td class="desc">how many inward passes have been run</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 label, String model, int baseValue)</span></td><td class="desc">Stand up a fresh engine around a unique dividend wrt a model.</td></tr>
<tr><td><code>setOwner</code></td><td><span class="sig">void setOwner(String ownerName)</span></td><td class="desc">Name the party to whose advantage the model is tuned, and re-snapshot so the owner is part of the restitution point.</td></tr>
<tr><td><code>getOwner</code></td><td><span class="sig">String getOwner()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getOnion</code></td><td><span class="sig">SLAdvantageSequitur getOnion()</span></td><td class="desc">Direct access to the layered machine.</td></tr>
<tr><td><code>getDividend</code></td><td><span class="sig">SLAdvantageDividend getDividend()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getPasses</code></td><td><span class="sig">int getPasses()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setLayer</code></td><td><span class="sig">void setLayer(int depth, int contribution)</span></td><td class="desc">---- Shape the onion: set each stage's signed contribution ----</td></tr>
<tr><td><code>setReview</code></td><td><span class="sig">void setReview(int c)</span></td><td class="desc">Named convenience tuners for the standard stages.</td></tr>
<tr><td><code>setConcerns</code></td><td><span class="sig">void setConcerns(int c)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setMaths</code></td><td><span class="sig">void setMaths(int c)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setAdditions</code></td><td><span class="sig">void setAdditions(int c)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setSubtraction</code></td><td><span class="sig">void setSubtraction(int c)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setRegrouping</code></td><td><span class="sig">void setRegrouping(int c)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setIteration</code></td><td><span class="sig">void setIteration(int c)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>deeper</code></td><td><span class="sig">int deeper()</span></td><td class="desc">---- Navigate the onion by hand ----</td></tr>
<tr><td><code>shallower</code></td><td><span class="sig">int shallower()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>seek</code></td><td><span class="sig">void seek(int d)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>depth</code></td><td><span class="sig">int depth()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>step</code></td><td><span class="sig">void step()</span></td><td class="desc">Apply only the layer under the cursor (manual single-step advantaging).</td></tr>
<tr><td><code>runPass</code></td><td><span class="sig">int runPass()</span></td><td class="desc">Run one complete inward pass over all layers; returns the net advantage.</td></tr>
<tr><td><code>iterate</code></td><td><span class="sig">int iterate(int maxPasses)</span></td><td class="desc">Iterate: run further passes while they keep improving the advantage, up to a cap. Because the standard layers are idempotent per base, a pass rebases first so each pass is a clean re-evaluation; returns the final advantage.</td></tr>
<tr><td><code>updateModel</code></td><td><span class="sig">void updateModel(String newModel, String newLabel, int newBase)</span></td><td class="desc">---- Dynamically alter or update the model ---- Re-point the dividend to a new model / label / base at runtime. The onion shape is preserved; only the frame of reference and starting value change. Pass null for model or label to leave that field unchanged. The original identity captured at init() is preserved so restitute() can fully undo it.</td></tr>
<tr><td><code>favorOwner</code></td><td><span class="sig">int favorOwner(int strength)</span></td><td class="desc">Dynamically bias the whole model toward the owner's advantage by a non-negative strength. Returns the net contribution gained for the owner. This is an ALTERATION, not a reset -- it stacks on the current shape until restitute() is called.</td></tr>
<tr><td><code>restitute</code></td><td><span class="sig">void restitute()</span></td><td class="desc">---- Full restitute ---- Restore BOTH the dividend's identity and the onion's shape to the state captured at init()/setOwner()/snapshotShape(), and clear the pass counter. A complete undo of every dynamic alteration, to the owner's benefit of a clean, known-good baseline.</td></tr>
<tr><td><code>commitBaseline</code></td><td><span class="sig">void commitBaseline()</span></td><td class="desc">Commit the current altered state as the NEW restitution baseline, so a later restitute() returns here rather than to the init() state.</td></tr>
<tr><td><code>advantage</code></td><td><span class="sig">int advantage()</span></td><td class="desc">Current net advantage of the dividend.</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>emitThrough</code></td><td><span class="sig">void emitThrough(SLAdvantageEmitter em)</span></td><td class="desc">Report this model through an output emitter (terminal / commonrails / socket / silent). The emitter and its sink decide the destination.</td></tr>
</table>
</div>
<h2 class="section" data-u="sladvantagedividend">SLAdvantageDividend <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/SLAdvantageDividend.sleela)</span></h2>
<div data-u="sladvantagedividend sladvantagedividend">
<h3 id="SLAdvantageDividend">SLAdvantageDividend <span class="pill">class</span></h3>
<p class="desc">The unique dividend that the onion model advantages, held with respect to a named model.</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>label</code></td><td><span class="sig">String label</span></td><td class="desc">---- Dividend state ---- the unique identity of this dividend</td></tr>
<tr><td><code>model</code></td><td><span class="sig">String model</span></td><td class="desc">the model (frame of reference) it is held with respect to</td></tr>
<tr><td><code>owner</code></td><td><span class="sig">String owner</span></td><td class="desc">the party to whose advantage the model is tuned</td></tr>
<tr><td><code>base</code></td><td><span class="sig">int base</span></td><td class="desc">the starting value before any layer is applied</td></tr>
<tr><td><code>current</code></td><td><span class="sig">int current</span></td><td class="desc">the running value as layers are applied</td></tr>
<tr><td><code>originalLabel</code></td><td><span class="sig">String originalLabel</span></td><td class="desc">---- Original snapshot, captured at configure() for full restitute ----</td></tr>
<tr><td><code>originalModel</code></td><td><span class="sig">String originalModel</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>originalOwner</code></td><td><span class="sig">String originalOwner</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>originalBase</code></td><td><span class="sig">int originalBase</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 lbl, String mdl, int baseValue)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>snapshot</code></td><td><span class="sig">void snapshot()</span></td><td class="desc">Record the current identity as the restitution point.</td></tr>
<tr><td><code>getLabel</code></td><td><span class="sig">String getLabel()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getModel</code></td><td><span class="sig">String getModel()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getOwner</code></td><td><span class="sig">String getOwner()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setOwner</code></td><td><span class="sig">void setOwner(String o)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getBase</code></td><td><span class="sig">int getBase()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getCurrent</code></td><td><span class="sig">int getCurrent()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setCurrent</code></td><td><span class="sig">void setCurrent(int v)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>updateModel</code></td><td><span class="sig">void updateModel(String newModel, String newLabel, int newBase)</span></td><td class="desc">---- Dynamic update: re-point the model without losing the snapshot. ---- Pass null for any field to leave it unchanged. The original snapshot is preserved so a later restitute() can undo every change at once.</td></tr>
<tr><td><code>restitute</code></td><td><span class="sig">void restitute()</span></td><td class="desc">---- Full restitute: restore the dividend to its original identity. ----</td></tr>
<tr><td><code>advantage</code></td><td><span class="sig">int advantage()</span></td><td class="desc">The net advantage: how far the dividend has moved from its base.</td></tr>
<tr><td><code>rebase</code></td><td><span class="sig">void rebase()</span></td><td class="desc">Reset the running value back to the base for a fresh pass.</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sladvantageemitter">SLAdvantageEmitter <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/output/SLAdvantageEmitter.sleela)</span></h2>
<div data-u="sladvantageemitter sladvantageemitter">
<h3 id="SLAdvantageEmitter">SLAdvantageEmitter <span class="pill">class</span></h3>
<p class="desc">The emitter -- the output API advantage modules call to report themselves, routed through a sink and optionally formatted via CommonRails.</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>sink</code></td><td><span class="sig">SLAdvantageSink sink</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>rail</code></td><td><span class="sig">PrintRail rail</span></td><td class="desc">reused CommonRails renderer for the commonrails target</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(SLAdvantageSink s)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getSink</code></td><td><span class="sig">SLAdvantageSink getSink()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>line</code></td><td><span class="sig">void line(String text, int textChars)</span></td><td class="desc">Emit a raw line to the sink's target, with its byte length for the socket wire account.</td></tr>
<tr><td><code>brandAdvantage</code></td><td><span class="sig">void brandAdvantage()</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">void state(String label, int labelChars, String message, int messageChars)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>status</code></td><td><span class="sig">void status(String label, String message)</span></td><td class="desc">Convenience state() when CommonRails formatting is not needed: no counts.</td></tr>
<tr><td><code>report</code></td><td><span class="sig">void report(String subject, String body)</span></td><td class="desc">Emit "subject: body".</td></tr>
<tr><td><code>pair</code></td><td><span class="sig">void pair(String field, int fieldChars, String value, int valueChars,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>component</code></td><td><span class="sig">void component(String name, int nameChars, int oid, int dateSeq,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>grade</code></td><td><span class="sig">void grade(String moduleName, int moduleChars, String rating, int ratingChars)</span></td><td class="desc">Emit a module rating line, e.g. "GRADE integration -> S10". Char counts are supplied so the commonrails target aligns correctly.</td></tr>
</table>
</div>
<h2 class="section" data-u="sladvantagelayer">SLAdvantageLayer <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/SLAdvantageLayer.sleela)</span></h2>
<div data-u="sladvantagelayer sladvantagelayer">
<h3 id="SLAdvantageLayer">SLAdvantageLayer <span class="pill">class</span></h3>
<p class="desc">One concentric layer of the advantage Sequitur onion model.</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>depth</code></td><td><span class="sig">int depth</span></td><td class="desc">---- Layer identity and behavior ---- position in the onion; 0 = outermost</td></tr>
<tr><td><code>layerName</code></td><td><span class="sig">String layerName</span></td><td class="desc">human name of this stage</td></tr>
<tr><td><code>kind</code></td><td><span class="sig">String kind</span></td><td class="desc">category: value|validate|risk|quant|grow|shrink|reorg|loop</td></tr>
<tr><td><code>contribution</code></td><td><span class="sig">int contribution</span></td><td class="desc">signed amount this layer applies to the dividend</td></tr>
<tr><td><code>visited</code></td><td><span class="sig">boolean visited</span></td><td class="desc">has this layer been applied on the current pass</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(int d, String nm, String k, int c)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getDepth</code></td><td><span class="sig">int getDepth()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getName</code></td><td><span class="sig">String getName()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getKind</code></td><td><span class="sig">String getKind()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getContribution</code></td><td><span class="sig">int getContribution()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setContribution</code></td><td><span class="sig">void setContribution(int c)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>wasVisited</code></td><td><span class="sig">boolean wasVisited()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>markVisited</code></td><td><span class="sig">void markVisited()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>resetVisit</code></td><td><span class="sig">void resetVisit()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>applyTo</code></td><td><span class="sig">int applyTo(int running)</span></td><td class="desc">Apply this layer to a running dividend value and return the new value. The sign/role is governed by `kind`; the amount is `contribution`.</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sladvantagesequitur">SLAdvantageSequitur <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/SLAdvantageSequitur.sleela)</span></h2>
<div data-u="sladvantagesequitur sladvantagesequitur">
<h3 id="SLAdvantageSequitur">SLAdvantageSequitur <span class="pill">class</span></h3>
<p class="desc">The Sequitur list -- the ordered, navigable onion of advantage layers.</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>layers</code></td><td><span class="sig">SLAdvantageLayer[] layers</span></td><td class="desc">---- Onion state ---- the ordered list, index == depth</td></tr>
<tr><td><code>count</code></td><td><span class="sig">int count</span></td><td class="desc">number of layers in use</td></tr>
<tr><td><code>cursor</code></td><td><span class="sig">int cursor</span></td><td class="desc">current depth (0..count-1)</td></tr>
<tr><td><code>original</code></td><td><span class="sig">int[] original</span></td><td class="desc">original per-layer contributions, captured for full restitute</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>buildStandard</code></td><td><span class="sig">void buildStandard()</span></td><td class="desc">Build the standard eight-layer Sequitur. Contributions are the DEFAULT shape of the onion; callers may retune any layer via layerAt()/setContribution.</td></tr>
<tr><td><code>snapshotShape</code></td><td><span class="sig">void snapshotShape()</span></td><td class="desc">Capture the current onion shape (each layer's contribution) as the restitution point. Called after buildStandard and callable again after a caller deliberately commits a new baseline shape.</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>depth</code></td><td><span class="sig">int depth()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>layerAt</code></td><td><span class="sig">SLAdvantageLayer layerAt(int d)</span></td><td class="desc">Return the layer at a given depth. Bind to a typed local before calling methods on it (array-element type is lost on inline calls).</td></tr>
<tr><td><code>canGoInward</code></td><td><span class="sig">boolean canGoInward()</span></td><td class="desc">---- Navigation: iterate further down or up the onion ----</td></tr>
<tr><td><code>canGoOutward</code></td><td><span class="sig">boolean canGoOutward()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>goInward</code></td><td><span class="sig">int goInward()</span></td><td class="desc">Move one layer inward (deeper). Returns the new depth.</td></tr>
<tr><td><code>goOutward</code></td><td><span class="sig">int goOutward()</span></td><td class="desc">Move one layer outward (shallower). Returns the new depth.</td></tr>
<tr><td><code>seek</code></td><td><span class="sig">void seek(int d)</span></td><td class="desc">Jump the cursor directly to a depth, clamped into range.</td></tr>
<tr><td><code>tune</code></td><td><span class="sig">void tune(int d, int contribution)</span></td><td class="desc">---- Tuning: set a layer's contribution by depth ----</td></tr>
<tr><td><code>restitute</code></td><td><span class="sig">void restitute()</span></td><td class="desc">---- Full restitute: restore every layer to its snapshot shape ---- Undoes all dynamic retuning since the last snapshotShape(), returning the onion to its captured baseline. The cursor returns to the outer skin.</td></tr>
<tr><td><code>favorOwner</code></td><td><span class="sig">int favorOwner(int strength)</span></td><td class="desc">---- Favor the owner: bias the onion toward the owner's advantage ---- A dynamic alteration that nudges the growth-side layers up and softens the loss-side layers, by a non-negative `strength`. Concretely: additions and the quantitative core gain +strength; a subtraction (a cost, held as a negative) is softened toward zero by up to strength; regrouping recovers +strength via reorganization. Validate/risk/loop layers are left untouched because favoring must not fabricate a clean review or silence a concern. Returns the net change in total contribution applied to the owner's favor.</td></tr>
<tr><td><code>totalContribution</code></td><td><span class="sig">int totalContribution()</span></td><td class="desc">Sum of every layer's current contribution.</td></tr>
<tr><td><code>applyCurrent</code></td><td><span class="sig">void applyCurrent(SLAdvantageDividend div)</span></td><td class="desc">Apply the layer at the cursor to the dividend's running value.</td></tr>
<tr><td><code>runInwardPass</code></td><td><span class="sig">int runInwardPass(SLAdvantageDividend div)</span></td><td class="desc">One full inward pass: apply every layer from skin to core in order, folding each contribution into the dividend. Returns the net advantage.</td></tr>
<tr><td><code>resetVisits</code></td><td><span class="sig">void resetVisits()</span></td><td class="desc">Reset the visited flags on every layer for a fresh pass.</td></tr>
<tr><td><code>visitedCount</code></td><td><span class="sig">int visitedCount()</span></td><td class="desc">How many layers were touched on the last pass.</td></tr>
</table>
</div>
<h2 class="section" data-u="sladvantagesink">SLAdvantageSink <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/output/SLAdvantageSink.sleela)</span></h2>
<div data-u="sladvantagesink sladvantagesink">
<h3 id="SLAdvantageSink">SLAdvantageSink <span class="pill">class</span></h3>
<p class="desc">An output sink for the advantage package -- routes rendered lines to the terminal, a CommonRails surface, a socket/connector, or a silent capture buffer.</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>target</code></td><td><span class="sig">int target</span></td><td class="desc">---- Sink state ----</td></tr>
<tr><td><code>endpoint</code></td><td><span class="sig">String endpoint</span></td><td class="desc">connector identity for the socket target, e.g. "host:port"</td></tr>
<tr><td><code>capture</code></td><td><span class="sig">String capture</span></td><td class="desc">capture of everything emitted (framed), joined with newlines</td></tr>
<tr><td><code>lines</code></td><td><span class="sig">int lines</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>connectorOpen</code></td><td><span class="sig">boolean connectorOpen</span></td><td class="desc">SOCKET connector lifecycle: is the connector open, and how many content bytes have been handed to it (the wire-faithful byte account CommonRails also insists on, since Core has no string-length primitive).</td></tr>
<tr><td><code>bytesWritten</code></td><td><span class="sig">int bytesWritten</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>TERMINAL</code></td><td><span class="sig">int TERMINAL()</span></td><td class="desc">---- Target constants (methods cost no layout slot) ----</td></tr>
<tr><td><code>COMMONRAILS</code></td><td><span class="sig">int COMMONRAILS()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>SOCKET</code></td><td><span class="sig">int SOCKET()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>SILENT</code></td><td><span class="sig">int SILENT()</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(int tgt)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>bindEndpoint</code></td><td><span class="sig">void bindEndpoint(String ep)</span></td><td class="desc">For the SOCKET target: name the connector endpoint (modelled, not dialed). (Named bindEndpoint, not connect: connect is a reserved Munction builtin.)</td></tr>
<tr><td><code>openConnector</code></td><td><span class="sig">boolean openConnector()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>closeConnector</code></td><td><span class="sig">void closeConnector()</span></td><td class="desc">Close the connector (native: slnet_close). Idempotent.</td></tr>
<tr><td><code>isOpen</code></td><td><span class="sig">boolean isOpen()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getTarget</code></td><td><span class="sig">int getTarget()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getEndpoint</code></td><td><span class="sig">String getEndpoint()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>frameCount</code></td><td><span class="sig">int frameCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getBytesWritten</code></td><td><span class="sig">int getBytesWritten()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>appendFrame</code></td><td><span class="sig">void appendFrame(String framed)</span></td><td class="desc">Append to the capture with a separating newline between frames.</td></tr>
<tr><td><code>wireWrite</code></td><td><span class="sig">int wireWrite(String framed, int byteCount)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>emit</code></td><td><span class="sig">void emit(String line, int byteCount)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>emitLine</code></td><td><span class="sig">void emitLine(String line)</span></td><td class="desc">Backward-compatible emit without a byte count (socket account uses 0 for the body; the endpoint prefix is still counted).</td></tr>
<tr><td><code>lastFrame</code></td><td><span class="sig">String lastFrame()</span></td><td class="desc">The most recent framed line (empty if nothing emitted).</td></tr>
<tr><td><code>drain</code></td><td><span class="sig">String drain()</span></td><td class="desc">Drain and clear the capture, returning everything buffered. A native socket producer calls this and writes the result to the connector. The byte account and open state are preserved across a drain (the connector stays open until closeConnector).</td></tr>
<tr><td><code>targetName</code></td><td><span class="sig">String targetName()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sladvantageusermodel">SLAdvantageUserModel <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/SLAdvantageUserModel.sleela)</span></h2>
<div data-u="sladvantageusermodel sladvantageusermodel">
<h3 id="SLAdvantageUserModel">SLAdvantageUserModel <span class="pill">class</span></h3>
<p class="desc">The user's model -- a simple, outcome-facing encapsulation of the advantage onion process.</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>engine</code></td><td><span class="sig">SLAdvantageDeveloperModel engine</span></td><td class="desc">---- Simple user state (delegates to a hidden developer model) ----</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>start</code></td><td><span class="sig">void start(String dividendLabel, String model, int baseValue)</span></td><td class="desc">Start: name the unique dividend and the model it respects, with a base.</td></tr>
<tr><td><code>ownedBy</code></td><td><span class="sig">void ownedBy(String ownerName)</span></td><td class="desc">Declare who owns this advantage (the party it is tuned to favor).</td></tr>
<tr><td><code>grow</code></td><td><span class="sig">void grow(int amount)</span></td><td class="desc">Three plain dials in the user's language. Each maps to onion layers. grow -> additions layer; bigger upside.</td></tr>
<tr><td><code>shrink</code></td><td><span class="sig">void shrink(int amount)</span></td><td class="desc">shrink -> subtraction layer; a cost or haircut (pass a negative amount).</td></tr>
<tr><td><code>rethink</code></td><td><span class="sig">void rethink(int maths, int regroup)</span></td><td class="desc">rethink -> maths + regrouping; a quantitative adjustment and a reorg.</td></tr>
<tr><td><code>advantage</code></td><td><span class="sig">int advantage()</span></td><td class="desc">Press the button: run the whole layered process once and return the net advantage of the dividend with respect to its model.</td></tr>
<tr><td><code>advantageHarder</code></td><td><span class="sig">int advantageHarder(int tries)</span></td><td class="desc">Try harder: let the process iterate further through the onion, keeping the best net advantage found, up to a small cap the user chooses.</td></tr>
<tr><td><code>updateModel</code></td><td><span class="sig">void updateModel(String newModel, int newBase)</span></td><td class="desc">---- Dynamically update the model, to the owner's advantage ---- Re-point the dividend to a new model / base at runtime without losing the original. Pass null for newModel to keep the current model name.</td></tr>
<tr><td><code>favorMe</code></td><td><span class="sig">void favorMe(int strength)</span></td><td class="desc">Tip the whole model further in the owner's favor by a simple strength.</td></tr>
<tr><td><code>restitute</code></td><td><span class="sig">void restitute()</span></td><td class="desc">---- Full restitute: undo every change, back to the original model ----</td></tr>
<tr><td><code>currentValue</code></td><td><span class="sig">int currentValue()</span></td><td class="desc">Read the outcome in plain terms.</td></tr>
<tr><td><code>summary</code></td><td><span class="sig">String summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>advanced</code></td><td><span class="sig">SLAdvantageDeveloperModel advanced()</span></td><td class="desc">A user who becomes curious can still reach the full developer controls.</td></tr>
</table>
</div>
<h2 class="section" data-u="sladvbridge">SLAdvBridge <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/SLAdvBridge.sleela)</span></h2>
<div data-u="sladvbridge sladvbridge">
<h3 id="SLAdvBridge">SLAdvBridge <span class="pill">class</span></h3>
<p class="desc">The Advantage bridge: the middle proponent of communication, both ways.</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>toMod</code></td><td><span class="sig">SLAdvMessage[] toMod</span></td><td class="desc">Messages addressed to program flow up; every other address flows down to the medium, which routes it to a module. Both queues are bounded (1024). A refused post returns -1 and is counted: the bridge fails closed.</td></tr>
<tr><td><code>toProg</code></td><td><span class="sig">SLAdvMessage[] toProg</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>mHead</code></td><td><span class="sig">int mHead = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>mCount</code></td><td><span class="sig">int mCount = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>pHead</code></td><td><span class="sig">int pHead = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>pCount</code></td><td><span class="sig">int pCount = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>cap</code></td><td><span class="sig">int cap = 1024</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nextId</code></td><td><span class="sig">int nextId = 1</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>posted</code></td><td><span class="sig">int posted = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>dropped</code></td><td><span class="sig">int dropped = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>up</code></td><td><span class="sig">int up = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>down</code></td><td><span class="sig">int down = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isOpen</code></td><td><span class="sig">boolean isOpen = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>built</code></td><td><span class="sig">boolean built = false</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>build</code></td><td><span class="sig">void build()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>openBridge</code></td><td><span class="sig">void openBridge()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shut</code></td><td><span class="sig">void shut()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>opened</code></td><td><span class="sig">boolean opened()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getPosted</code></td><td><span class="sig">int getPosted()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getDropped</code></td><td><span class="sig">int getDropped()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getUp</code></td><td><span class="sig">int getUp()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getDown</code></td><td><span class="sig">int getDown()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>pendingModules</code></td><td><span class="sig">int pendingModules()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>pendingProgram</code></td><td><span class="sig">int pendingProgram()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>post</code></td><td><span class="sig">int post(SLAdvMessage m)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nextForModules</code></td><td><span class="sig">SLAdvMessage nextForModules()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nextForProgram</code></td><td><span class="sig">SLAdvMessage nextForProgram()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>takeReply</code></td><td><span class="sig">SLAdvMessage takeReply(int id)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sladvcatalog">SLAdvCatalog <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/SLAdvCatalog.sleela)</span></h2>
<div data-u="sladvcatalog sladvcatalog">
<h3 id="SLAdvCatalog">SLAdvCatalog <span class="pill">class</span></h3>
<p class="desc">The catalog of Advantage modules the medium can load by name.</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>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>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>nameAt</code></td><td><span class="sig">String nameAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>knows</code></td><td><span class="sig">boolean knows(String name)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>create</code></td><td><span class="sig">SLAdvModule create(String name)</span></td><td class="desc">Build a fresh module by name, or null when the name is unknown.</td></tr>
</table>
</div>
<h2 class="section" data-u="sladvlistener">SLAdvListener <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/SLAdvListener.sleela)</span></h2>
<div data-u="sladvlistener sladvlistener">
<h3 id="SLAdvListener">SLAdvListener <span class="pill iface">interface</span></h3>
<p class="desc">Advantage listener contract: a user program implements this to be called when a</p>
<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>onMessage</code></td><td><span class="sig">int onMessage(SLAdvMessage m);</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sladvmedium">SLAdvMedium <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/SLAdvMedium.sleela)</span></h2>
<div data-u="sladvmedium sladvmedium">
<h3 id="SLAdvMedium">SLAdvMedium <span class="pill">class</span></h3>
<p class="desc">The Advantage medium: the middle, the center a user defined program loads.</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>br</code></td><td><span class="sig">SLAdvBridge br</span></td><td class="desc">The program loads the medium (the center). The medium owns the bridge and holds up to 16 modules. A module comes from the catalog by name (load) or from the program itself (attach). pump routes every pending message. Reserved names: program and medium. Messages to an unknown module get an error reply. A pump handles at most 100000 messages, so a ping-pong between modules cannot hang the program (saturated reports it).</td></tr>
<tr><td><code>cat</code></td><td><span class="sig">SLAdvCatalog cat</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>listener</code></td><td><span class="sig">SLAdvListener listener</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>mods</code></td><td><span class="sig">SLAdvModule[] mods</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>names</code></td><td><span class="sig">String[] names</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>n</code></td><td><span class="sig">int n = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxModules</code></td><td><span class="sig">int maxModules = 16</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>up</code></td><td><span class="sig">boolean up = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>saturated</code></td><td><span class="sig">boolean saturated = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>routed</code></td><td><span class="sig">int routed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>unknown</code></td><td><span class="sig">int unknown = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failures</code></td><td><span class="sig">int failures = 0</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>begin</code></td><td><span class="sig">boolean begin()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isUp</code></td><td><span class="sig">boolean isUp()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>bridge</code></td><td><span class="sig">SLAdvBridge bridge()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>catalog</code></td><td><span class="sig">SLAdvCatalog catalog()</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>getRouted</code></td><td><span class="sig">int getRouted()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getUnknown</code></td><td><span class="sig">int getUnknown()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getFailures</code></td><td><span class="sig">int getFailures()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>wasSaturated</code></td><td><span class="sig">boolean wasSaturated()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nameAt</code></td><td><span class="sig">String nameAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>indexOf</code></td><td><span class="sig">int indexOf(String name)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>has</code></td><td><span class="sig">boolean has(String name)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>find</code></td><td><span class="sig">SLAdvModule find(String name)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>attachListener</code></td><td><span class="sig">void attachListener(SLAdvListener l)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>attach</code></td><td><span class="sig">boolean attach(SLAdvModule m)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>load</code></td><td><span class="sig">boolean load(String name)</span></td><td class="desc">Load a catalog module by name and seat it. False when unknown or refused.</td></tr>
<tr><td><code>unload</code></td><td><span class="sig">boolean unload(String name)</span></td><td class="desc">Unseat a module: it is ended and its slot closed up.</td></tr>
<tr><td><code>pumpModules</code></td><td><span class="sig">int pumpModules()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>deliver</code></td><td><span class="sig">int deliver()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>pump</code></td><td><span class="sig">int pump()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>ask</code></td><td><span class="sig">SLAdvMessage ask(SLAdvMessage req)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>tell</code></td><td><span class="sig">int tell(String toName, String topicName, String text)</span></td><td class="desc">Send a request without waiting. Returns the id, or -1 when refused.</td></tr>
<tr><td><code>shutdown</code></td><td><span class="sig">void shutdown()</span></td><td class="desc">End every module and close the bridge.</td></tr>
</table>
</div>
<h2 class="section" data-u="sladvmessage">SLAdvMessage <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/SLAdvMessage.sleela)</span></h2>
<div data-u="sladvmessage sladvmessage">
<h3 id="SLAdvMessage">SLAdvMessage <span class="pill">class</span></h3>
<p class="desc">The envelope that travels over the Advantage bridge, in either direction.</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>id</code></td><td><span class="sig">int id = 0</span></td><td class="desc">kind: 0 request, 1 reply, 2 event, 3 error. status: 0 ok, nonzero refused. Reserved addresses: program is the user defined program, medium is the host.</td></tr>
<tr><td><code>inReplyTo</code></td><td><span class="sig">int inReplyTo = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>kind</code></td><td><span class="sig">int kind = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>status</code></td><td><span class="sig">int status = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>from</code></td><td><span class="sig">String from = ""</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>to</code></td><td><span class="sig">String to = ""</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>topic</code></td><td><span class="sig">String topic = ""</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>text</code></td><td><span class="sig">String text = ""</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nums</code></td><td><span class="sig">double[] nums</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 = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>built</code></td><td><span class="sig">boolean built = false</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>build</code></td><td><span class="sig">void build()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>capacity</code></td><td><span class="sig">int capacity()</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>addressed</code></td><td><span class="sig">SLAdvMessage addressed(String fromName, String toName, String topicName, int kindCode)</span></td><td class="desc">Address the message. Returns itself so a call can be chained.</td></tr>
<tr><td><code>withText</code></td><td><span class="sig">SLAdvMessage withText(String t)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setNum</code></td><td><span class="sig">boolean setNum(int i, double v)</span></td><td class="desc">Set number i (0..47). An out of range index is refused (false).</td></tr>
<tr><td><code>num</code></td><td><span class="sig">double num(int i)</span></td><td class="desc">Read number i; out of range reads as 0.0.</td></tr>
<tr><td><code>numbers</code></td><td><span class="sig">double[] numbers()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>makeReply</code></td><td><span class="sig">SLAdvMessage makeReply(String fromName, String topicName)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>makeError</code></td><td><span class="sig">SLAdvMessage makeError(String fromName, int code, String why)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sladvmodule">SLAdvModule <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/SLAdvModule.sleela)</span></h2>
<div data-u="sladvmodule sladvmodule">
<h3 id="SLAdvModule">SLAdvModule <span class="pill iface">interface</span></h3>
<p class="desc">Advantage module contract: what any module must offer to sit in the medium.</p>
<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>moduleName</code></td><td><span class="sig">String moduleName();</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>moduleKind</code></td><td><span class="sig">String moduleKind();</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>moduleVersion</code></td><td><span class="sig">String moduleVersion();</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>begin</code></td><td><span class="sig">boolean begin(SLAdvBridge bridge);</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>handle</code></td><td><span class="sig">int handle(SLAdvMessage m);</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>end</code></td><td><span class="sig">void end();</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>running</code></td><td><span class="sig">boolean running();</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sladvmoralmodule">SLAdvMoralModule <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/moral/SLAdvMoralModule.sleela)</span></h2>
<div data-u="sladvmoralmodule sladvmoralmodule">
<h3 id="SLAdvMoralModule">SLAdvMoralModule <span class="pill">class</span></h3>
<p class="desc">The Moral Evaluator as an Advantage module (loaded by name moral-evaluator).</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>ev</code></td><td><span class="sig">SLMoralEvaluator ev</span></td><td class="desc">Wire layout. configure: n0 points 5..41, n1 verdict states 2 or 3. register: n0 list (0 nouns, 1 names, 2 scientific, 3 moral), text is the entry. judge: n0..n31 trade facts in SLMoralTrade wire order; reply n0 verdict (0 NO, 1 YES, 2 COMPLETE), n1 merit, n2 risk, n3 cardinal point that failed or -1, n4 weak dimension or -1, n5 active points, text reason. review: n0 verdict that was given, n1 1 if it was right. ledger reply: n0 trades, n1 NO, n2 YES, n3 COMPLETE, n4 mean merit, n5 recent merit, n6 worst merit, n7 risk of merit. A cardinal veto also sends the program an unsolicited cardinal-veto event.</td></tr>
<tr><td><code>ts</code></td><td><span class="sig">SLTallScience ts</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>led</code></td><td><span class="sig">SLMoralMeritLedger led</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>br</code></td><td><span class="sig">SLAdvBridge br</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>on</code></td><td><span class="sig">boolean on = false</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>moduleName</code></td><td><span class="sig">String moduleName()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>moduleKind</code></td><td><span class="sig">String moduleKind()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>moduleVersion</code></td><td><span class="sig">String moduleVersion()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>running</code></td><td><span class="sig">boolean running()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>begin</code></td><td><span class="sig">boolean begin(SLAdvBridge bridge)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>end</code></td><td><span class="sig">void end()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>fail</code></td><td><span class="sig">void fail(SLAdvMessage m, int code, String why)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>okReply</code></td><td><span class="sig">SLAdvMessage okReply(SLAdvMessage m)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>handle</code></td><td><span class="sig">int handle(SLAdvMessage m)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sladvtradermodule">SLAdvTraderModule <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/trader/SLAdvTraderModule.sleela)</span></h2>
<div data-u="sladvtradermodule sladvtradermodule">
<h3 id="SLAdvTraderModule">SLAdvTraderModule <span class="pill">class</span></h3>
<p class="desc">The high speed trader as an Advantage module (loaded by name high-speed-trader).</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>tr</code></td><td><span class="sig">SLHighSpeedTrader tr</span></td><td class="desc">Wire layout. configure: n0 pragmatics 8..24, n1 trades per minute. evaluate: n0..n9 candidate, n10 now in ms; reply n0 accepted 0 or 1, n1 code, n2 score, n3 threshold, n4 1 when sent to the linked module. simulate: n0 seconds (1..600), n1 seed; reply n0 evals, n1 accepted, n2 vetoed, n3 score rejects, n4 rate rejects, n5 pnl bps, n6 threshold, n7 halted. insight: n0 pragmatic id, n1 factor. link: text is the name of a module to judge each accepted trade. set-facts: n0..n31 trade facts template for judged trades. A judged reply returns here from the linked module; NO withdraws the trade, and the program is told by event.</td></tr>
<tr><td><code>mk</code></td><td><span class="sig">SLHstMarket mk</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>br</code></td><td><span class="sig">SLAdvBridge br</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>on</code></td><td><span class="sig">boolean on = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>linked</code></td><td><span class="sig">String linked = ""</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>clockMs</code></td><td><span class="sig">double clockMs = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>judged</code></td><td><span class="sig">int judged = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>kept</code></td><td><span class="sig">int kept = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>withdrawn</code></td><td><span class="sig">int withdrawn = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>completeN</code></td><td><span class="sig">int completeN = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>facts</code></td><td><span class="sig">double[] facts</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>moduleName</code></td><td><span class="sig">String moduleName()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>moduleKind</code></td><td><span class="sig">String moduleKind()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>moduleVersion</code></td><td><span class="sig">String moduleVersion()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>running</code></td><td><span class="sig">boolean running()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>begin</code></td><td><span class="sig">boolean begin(SLAdvBridge bridge)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>end</code></td><td><span class="sig">void end()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>fail</code></td><td><span class="sig">void fail(SLAdvMessage m, int code, String why)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>okReply</code></td><td><span class="sig">SLAdvMessage okReply(SLAdvMessage m)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>judgeFacts</code></td><td><span class="sig">void judgeFacts(double[] o, SLAdvMessage j)</span></td><td class="desc">---- candidate to trade facts for the linked judge ----</td></tr>
<tr><td><code>handle</code></td><td><span class="sig">int handle(SLAdvMessage m)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>judgedReply</code></td><td><span class="sig">int judgedReply(SLAdvMessage m)</span></td><td class="desc">---- the verdict comes back from the linked module ----</td></tr>
</table>
</div>
<h2 class="section" data-u="slannouncementcontact">SLAnnouncementContact <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/physics/SLAnnouncementContact.sleela)</span></h2>
<div data-u="slannouncementcontact slannouncementcontact">
<h3 id="SLAnnouncementContact">SLAnnouncementContact <span class="pill">class</span></h3>
<p class="desc">Announcements as boundary constraints on a contact manifold -- information topology of a declared economic space.</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>ax</code></td><td><span class="sig">double ax</span></td><td class="desc">---- 1-form alpha components (a_x, a_y, a_z) ----</td></tr>
<tr><td><code>ay</code></td><td><span class="sig">double ay</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>az</code></td><td><span class="sig">double az</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>bxy</code></td><td><span class="sig">double bxy</span></td><td class="desc">---- d(alpha) as a constant 2-form (b_xy, b_yz, b_zx) ----</td></tr>
<tr><td><code>byz</code></td><td><span class="sig">double byz</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>bzx</code></td><td><span class="sig">double bzx</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>standardForm</code></td><td><span class="sig">void standardForm(double y)</span></td><td class="desc">Standard announcement contact form alpha = dz - y dx, with the point's y supplied so a_x = -y. d(alpha) = dx ^ dy => (b_xy=1, b_yz=0, b_zx=0).</td></tr>
<tr><td><code>configure</code></td><td><span class="sig">void configure(double axv, double ayv, double azv,</span></td><td class="desc">Fully general linear form, for experimentation.</td></tr>
<tr><td><code>contactVolume</code></td><td><span class="sig">double contactVolume()</span></td><td class="desc">The coefficient of alpha ^ d(alpha) as a top 3-form (dx^dy^dz).</td></tr>
<tr><td><code>isContact</code></td><td><span class="sig">boolean isContact(double tol)</span></td><td class="desc">The contact condition alpha ^ d(alpha) != 0 holds (a genuine, non- integrable announced space where timing/sequence matter).</td></tr>
<tr><td><code>moveAllowed</code></td><td><span class="sig">boolean moveAllowed(double vx, double vy, double vz, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>homotopyResidual</code></td><td><span class="sig">double homotopyResidual(double credibility, double t)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isNull</code></td><td><span class="sig">boolean isNull(double credibility, double tol)</span></td><td class="desc">An announcement is topologically null (fully deformable to hidden reality) when the residual can reach 0 within the deformation -- i.e. credibility is effectively 0. Returns true if the announcement carries no binding force.</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slbatchreturn">SLBatchReturn <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/SLBatchReturn.sleela)</span></h2>
<div data-u="slbatchreturn slbatchreturn">
<h3 id="SLBatchReturn">SLBatchReturn <span class="pill">class</span></h3>
<p class="desc">Exact aggregate return over a stated batch of N independent trades: each trade re-stakes the same capital (no compounding), so total profit is simply summed, and the batch return is reported as an exact fraction (numerator/denominator in basis points) rather than a rounded percent.</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>maxTrades</code></td><td><span class="sig">int maxTrades = 2000000</span></td><td class="desc">These three bounds are chosen TOGETHER so that EVERY product formed anywhere in this class stays at or below the exact-comparison limit 9,007,199,254,740,991 (2^53 - 1), proven once here rather than guarded ad hoc inside each method (an earlier version guarded the wrong product per call and both rejected some valid large-loss inputs AND still let a different product, in idealBatchReturnBp, silently overflow -- see use case 27's regression tests for both exact inputs that caught this): maxTrades * maxCapital * 10000 = 8,000,000,000,000,000 (<= the limit) -- this is the TIGHTEST bound: it is what idealBatchReturnBp needs to convert the largest possible profit into exact basis points. maxCapital * maxBp = 400,000,000,000 (<= the limit) maxTrades * maxCapital = 800,000,000,000 (<= the limit) maxBp = 1,000,000 bp is a 100x move per trade, already far above the largest multiple used anywhere else in this folder (12x, use case 6). maxCapital is modest (400,000 cents = $4,000) because this class must support up to maxTrades trades AND exact basis-point conversion of the resulting total; a single-trade class (SLLongBook) can and does allow far larger capital because it never multiplies a profit by 10000.</td></tr>
<tr><td><code>maxBp</code></td><td><span class="sig">int maxBp = 1000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxCapital</code></td><td><span class="sig">int maxCapital = 400000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxExplicitCapital</code></td><td><span class="sig">int maxExplicitCapital = 14000000000</span></td><td class="desc">---- Explicit batch: up to 64 stated per-trade percent moves (bp), signed (a loss is a negative bp). Each trade re-stakes the same capital. ---- maxExplicitCapital is bounded so that 64 (the most trades this path can hold) * maxExplicitCapital * 10000 stays at or below the exact- comparison limit, the same product idealBatchReturnBp depends on above; this path allows a far larger per-trade capital than the idealized path because it is capped at 64 trades rather than maxTrades (2,000,000).</td></tr>
<tr><td><code>trades</code></td><td><span class="sig">int[] trades = new int[64]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>tradeCount</code></td><td><span class="sig">int tradeCount = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>explicitCapital</code></td><td><span class="sig">int explicitCapital = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>explicitBatchValid</code></td><td><span class="sig">boolean explicitBatchValid = false</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>addTradeReason</code></td><td><span class="sig">String addTradeReason(int code)</span></td><td class="desc">The reason addTrade refused, for the three codes it can return.</td></tr>
<tr><td><code>idealBatchInRange</code></td><td><span class="sig">boolean idealBatchInRange(int n, int capital, int winRateBp, int winBp, int lossBp)</span></td><td class="desc">---- Idealized batch: winRate (bp of n), winBp, lossBp as percent moves --- True exactly when every input is in range and no internal product can pass maxCapital. Callers (and idealBatchReturnBp below) check this BEFORE reading idealBatchProfit, rather than inferring validity from the size of the returned profit: a real batch of up to maxTrades trades can legitimately lose up to maxTrades * maxCapital, which is far larger in magnitude than any single sentinel value could safely sit outside of, so no magnitude-based sentinel is used for this method's result. Checks only the four INPUT bounds. No further per-call overflow guard is needed: maxTrades, maxCapital and maxBp are chosen together (see their declaration above) so every product idealBatchProfit can form is already safe for any n, capital, winBp, lossBp within these four checks -- an earlier version re-derived an overflow guard per call and got it wrong (it rejected some valid, large-loss inputs as if they were out of range; see use case 27's regression test for the exact input that caught this).</td></tr>
<tr><td><code>idealBatchProfit</code></td><td><span class="sig">int idealBatchProfit(int n, int capital, int winRateBp, int winBp, int lossBp)</span></td><td class="desc">returns net profit, in capital units, for an idealized batch of n trades each re-staking `capital`. winRateBp is in basis points OF n (so 10000 bp = all wins). winBp/lossBp are the per-trade percent move in basis points (lossBp is given as a POSITIVE magnitude; it is subtracted). The caller MUST check idealBatchInRange first; this method trusts that check and does not itself distinguish "rejected" from "a real, large loss" in its return value (there is no safe sentinel for that -- see above).</td></tr>
<tr><td><code>idealBatchReturnBp</code></td><td><span class="sig">int idealBatchReturnBp(int n, int capital, int winRateBp, int winBp, int lossBp)</span></td><td class="desc">The batch return, in basis points of (n * capital), exact (floor). Returns -1 only for an out-of-range input (checked explicitly via idealBatchInRange, never inferred from the profit magnitude) or a zero stake; every in-range input returns its true signed basis-point value, however large the loss.</td></tr>
<tr><td><code>averagePerTradeBp</code></td><td><span class="sig">int averagePerTradeBp(int totalReturnBp, int n)</span></td><td class="desc">The exact per-trade AVERAGE return (in basis points) that an idealized batch implies, given its TOTAL return. This answers directly: "a batch return of X does not mean X per trade" -- it divides X by n, exactly, keeping the sign.</td></tr>
<tr><td><code>startExplicitBatch</code></td><td><span class="sig">boolean startExplicitBatch(int capitalPerTrade)</span></td><td class="desc">Result: false when capitalPerTrade is out of range (0 or above maxExplicitCapital); explicitBatchProfit/explicitBatchReturnBp return a sentinel (-1) in that case instead of computing with an unsafe capital.</td></tr>
<tr><td><code>addTrade</code></td><td><span class="sig">int addTrade(int signedBp)</span></td><td class="desc">Result codes: 0 accepted, 1 full (64 already recorded), 2 bp out of range.</td></tr>
<tr><td><code>explicitBatchProfit</code></td><td><span class="sig">int explicitBatchProfit()</span></td><td class="desc">Returns 0 (not a usable profit) when startExplicitBatch was never called successfully; callers should check explicitBatchValid or the return of startExplicitBatch before trusting this.</td></tr>
<tr><td><code>explicitBatchReturnBp</code></td><td><span class="sig">int explicitBatchReturnBp()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>explicitTradeCount</code></td><td><span class="sig">int explicitTradeCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>crossCheckOutcome</code></td><td><span class="sig">int crossCheckOutcome()</span></td><td class="desc">A single share at a high price keeps the cent-level bp arithmetic exact; splitting capital across many low-priced shares would floor small moves to zero cents, as it does in SLLongBook itself (integer cents).</td></tr>
<tr><td><code>crossCheckAgainstLongBook</code></td><td><span class="sig">boolean crossCheckAgainstLongBook()</span></td><td class="desc">Convenience wrapper: true only when the real check ran AND matched.</td></tr>
</table>
</div>
<h2 class="section" data-u="slbilateralnewsvendor">SLBilateralNewsvendor <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/math/SLBilateralNewsvendor.sleela)</span></h2>
<div data-u="slbilateralnewsvendor slbilateralnewsvendor">
<h3 id="SLBilateralNewsvendor">SLBilateralNewsvendor <span class="pill">class</span></h3>
<p class="desc">Bilateral newsvendor -- overage/underage costs on both ends and the centralized critical ratio that avoids double marginalization.</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>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>overageSeller</code></td><td><span class="sig">double overageSeller(double cs, double vs)</span></td><td class="desc">---- Per-side overage and underage costs ----</td></tr>
<tr><td><code>underageSeller</code></td><td><span class="sig">double underageSeller(double price, double cs)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>overageBuyer</code></td><td><span class="sig">double overageBuyer(double price, double vb)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>underageBuyer</code></td><td><span class="sig">double underageBuyer(double r, double price)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>criticalRatio</code></td><td><span class="sig">double criticalRatio(double r, double cs, double vb)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>coordinationGap</code></td><td><span class="sig">double coordinationGap(double r, double cs, double price, double vb)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe(double r, double cs, double vb)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slcashflow">SLCashflow <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/network/SLCashflow.sleela)</span></h2>
<div data-u="slcashflow slcashflow">
<h3 id="SLCashflow">SLCashflow <span class="pill">class</span></h3>
<p class="desc">The engineering grease of a single trade -- MONEY IN, a TRADE, TIME, and CASH FLOW OUT as a receipt. It records cash deployed, units moved, the clearing price, holding time, and per-step frictions (fees, carry), then computes net proceeds, profit, return-on-capital and a simple time-annualized rate so one trade can be compared against another.</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>units</code></td><td><span class="sig">double units = 0.0</span></td><td class="desc">---- Trade ledger ----</td></tr>
<tr><td><code>buyPrice</code></td><td><span class="sig">double buyPrice = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sellPrice</code></td><td><span class="sig">double sellPrice = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>days</code></td><td><span class="sig">double days = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>feeRate</code></td><td><span class="sig">double feeRate = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>carryPerUnitDay</code></td><td><span class="sig">double carryPerUnitDay = 0.0</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(double u, double buy, double sell, double d)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setFrictions</code></td><td><span class="sig">void setFrictions(double fee, double carry)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>moneyIn</code></td><td><span class="sig">double moneyIn()</span></td><td class="desc">MONEY IN: capital deployed to acquire the units.</td></tr>
<tr><td><code>gross</code></td><td><span class="sig">double gross()</span></td><td class="desc">Gross cash returned on the sale, before frictions.</td></tr>
<tr><td><code>fees</code></td><td><span class="sig">double fees()</span></td><td class="desc">Total venue + settlement fees across both legs.</td></tr>
<tr><td><code>carry</code></td><td><span class="sig">double carry()</span></td><td class="desc">TIME cost: carry (storage / financing) over the holding period.</td></tr>
<tr><td><code>cashOut</code></td><td><span class="sig">double cashOut()</span></td><td class="desc">CASH FLOW OUT: the net receipt after fees and carry.</td></tr>
<tr><td><code>profit</code></td><td><span class="sig">double profit()</span></td><td class="desc">Net profit on the round trip.</td></tr>
<tr><td><code>returnOnCapital</code></td><td><span class="sig">double returnOnCapital()</span></td><td class="desc">Return on capital, as a fraction of money in.</td></tr>
<tr><td><code>annualizedRate</code></td><td><span class="sig">double annualizedRate()</span></td><td class="desc">Simple time-annualized rate: roc scaled linearly to 365 days.</td></tr>
<tr><td><code>receipt</code></td><td><span class="sig">String receipt(String good)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slclockconnector">SLClockConnector <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/connect/SLClockConnector.sleela)</span></h2>
<div data-u="slclockconnector slclockconnector">
<h3 id="SLClockConnector">SLClockConnector <span class="pill">class</span></h3>
<p class="desc">The national-clock / NTP connector of the CONNECT medium. It models a disciplined time source: a named authority (e.g. a national metrology institute time service), an NTP stratum, a clock offset estimate, and a validity window. The live sync defers to a host adapter (slntp_*).</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>vocab</code></td><td><span class="sig">SLConnectStatus vocab</span></td><td class="desc">---- Shared medium plumbing ----</td></tr>
<tr><td><code>fault</code></td><td><span class="sig">SLConnectFault fault</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>authority</code></td><td><span class="sig">String authority = ""</span></td><td class="desc">---- Clock state ----</td></tr>
<tr><td><code>configured</code></td><td><span class="sig">boolean configured = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>open</code></td><td><span class="sig">boolean open = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>synced</code></td><td><span class="sig">boolean synced = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>offsetMillis</code></td><td><span class="sig">double offsetMillis = 0.0</span></td><td class="desc">last estimated offset (local - true) in milliseconds</td></tr>
<tr><td><code>stratum</code></td><td><span class="sig">int stratum = 16</span></td><td class="desc">NTP stratum of the authority (1 best; 16 unsynchronized)</td></tr>
<tr><td><code>syncCount</code></td><td><span class="sig">int syncCount = 0</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>configure</code></td><td><span class="sig">int configure(String authorityHost)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>openLink</code></td><td><span class="sig">int openLink()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sync</code></td><td><span class="sig">int sync()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>acceptSync</code></td><td><span class="sig">int acceptSync(double offset, int str)</span></td><td class="desc">Host-adapter callback: record a measured discipline result.</td></tr>
<tr><td><code>discipline</code></td><td><span class="sig">double discipline(double localEpochMillis)</span></td><td class="desc">Correct a local epoch-millis reading by the last measured offset.</td></tr>
<tr><td><code>trusted</code></td><td><span class="sig">boolean trusted(int stratumCeiling)</span></td><td class="desc">True when the authority is trustworthy enough to rely on (synced and a stratum at or below the accepted ceiling).</td></tr>
<tr><td><code>closeLink</code></td><td><span class="sig">int closeLink()</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>isSynced</code></td><td><span class="sig">boolean isSynced()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getStratum</code></td><td><span class="sig">int getStratum()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getOffsetMillis</code></td><td><span class="sig">double getOffsetMillis()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isNativeReady</code></td><td><span class="sig">boolean isNativeReady()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastFault</code></td><td><span class="sig">SLConnectFault lastFault()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slcompartment">SLCompartment <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/integration/SLCompartment.sleela)</span></h2>
<div data-u="slcompartment slcompartment">
<h3 id="SLCompartment">SLCompartment <span class="pill">class</span></h3>
<p class="desc">The recursive compartment -- the self-similar building block of a vertical-integration model.</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>label</code></td><td><span class="sig">String label</span></td><td class="desc">---- Identity & kind ----</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>meaning</code></td><td><span class="sig">String meaning</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>relevance</code></td><td><span class="sig">int relevance</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>capacity</code></td><td><span class="sig">int capacity</span></td><td class="desc">---- Capacitive space ----</td></tr>
<tr><td><code>used</code></td><td><span class="sig">int used</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>children</code></td><td><span class="sig">SLCompartment[] children</span></td><td class="desc">---- Recursive children (its own model) ----</td></tr>
<tr><td><code>childCount</code></td><td><span class="sig">int childCount</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>childCap</code></td><td><span class="sig">int childCap</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 lbl, int k, SLIntegrationKind cat)</span></td><td class="desc">Configure from a kind, using SLIntegrationKind for defaults.</td></tr>
<tr><td><code>getLabel</code></td><td><span class="sig">String getLabel()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getKind</code></td><td><span class="sig">int getKind()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getMeaning</code></td><td><span class="sig">String getMeaning()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getRelevance</code></td><td><span class="sig">int getRelevance()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getCapacity</code></td><td><span class="sig">int getCapacity()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getUsed</code></td><td><span class="sig">int getUsed()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setCapacity</code></td><td><span class="sig">void setCapacity(int c)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setMeaning</code></td><td><span class="sig">void setMeaning(String m)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setRelevance</code></td><td><span class="sig">void setRelevance(int r)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>free</code></td><td><span class="sig">int free()</span></td><td class="desc">Free space remaining in this compartment's own capacitive space.</td></tr>
<tr><td><code>store</code></td><td><span class="sig">int store(int amount)</span></td><td class="desc">Fill `amount` units if they fit; returns the amount actually stored.</td></tr>
<tr><td><code>release</code></td><td><span class="sig">int release(int amount)</span></td><td class="desc">Release `amount` units; returns the amount actually released.</td></tr>
<tr><td><code>addChild</code></td><td><span class="sig">void addChild(SLCompartment c)</span></td><td class="desc">---- Recursion: nest a child compartment (its own model) ----</td></tr>
<tr><td><code>getChildCount</code></td><td><span class="sig">int getChildCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>childAt</code></td><td><span class="sig">SLCompartment childAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>subtreeSize</code></td><td><span class="sig">int subtreeSize()</span></td><td class="desc">Total compartments in this subtree, including self (recursive count).</td></tr>
<tr><td><code>depth</code></td><td><span class="sig">int depth()</span></td><td class="desc">Maximum nesting depth of this subtree (self = depth 1).</td></tr>
<tr><td><code>totalCapacity</code></td><td><span class="sig">int totalCapacity()</span></td><td class="desc">Aggregate capacity of this subtree (self + all descendants).</td></tr>
<tr><td><code>totalUsed</code></td><td><span class="sig">int totalUsed()</span></td><td class="desc">Aggregate used units of this subtree.</td></tr>
<tr><td><code>totalRelevance</code></td><td><span class="sig">int totalRelevance()</span></td><td class="desc">Sum of relevance across this subtree -- a crude "value density".</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slconnectfault">SLConnectFault <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/connect/SLConnectFault.sleela)</span></h2>
<div data-u="slconnectfault slconnectfault">
<h3 id="SLConnectFault">SLConnectFault <span class="pill">class</span></h3>
<p class="desc">A structured fault record for the CONNECT medium -- the library-idiomatic stand-in for an exception. Every connector records its last fault here (code, subsystem, operation, human message, retryable flag, attempt count) so a caller can inspect, log, and decide to retry without the language-level try/catch machinery.</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>code</code></td><td><span class="sig">int code = 0</span></td><td class="desc">---- Fault fields ----</td></tr>
<tr><td><code>subsystem</code></td><td><span class="sig">String subsystem = "none"</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>operation</code></td><td><span class="sig">String operation = "none"</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>message</code></td><td><span class="sig">String message = ""</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>retryable</code></td><td><span class="sig">boolean retryable = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>attempts</code></td><td><span class="sig">int attempts = 0</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>clear</code></td><td><span class="sig">void clear()</span></td><td class="desc">Reset to a clean, no-fault state.</td></tr>
<tr><td><code>raise</code></td><td><span class="sig">void raise(SLConnectStatus vocab, int c, String sub, String op, String msg)</span></td><td class="desc">Record a fault. The SLConnectStatus is supplied so name/transience render consistently without a cross-class static reference.</td></tr>
<tr><td><code>setRetryable</code></td><td><span class="sig">void setRetryable(boolean r)</span></td><td class="desc">Let a connector override retryability for domain reasons (e.g. a money DECLINED must never be retried automatically).</td></tr>
<tr><td><code>isFaulted</code></td><td><span class="sig">boolean isFaulted()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getCode</code></td><td><span class="sig">int getCode()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getSubsystem</code></td><td><span class="sig">String getSubsystem()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getOperation</code></td><td><span class="sig">String getOperation()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getMessage</code></td><td><span class="sig">String getMessage()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isRetryable</code></td><td><span class="sig">boolean isRetryable()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getAttempts</code></td><td><span class="sig">int getAttempts()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe(SLConnectStatus vocab)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slconnectstatus">SLConnectStatus <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/connect/SLConnectStatus.sleela)</span></h2>
<div data-u="slconnectstatus slconnectstatus">
<h3 id="SLConnectStatus">SLConnectStatus <span class="pill">class</span></h3>
<p class="desc">The universal status vocabulary for the advantage CONNECT medium -- the single set of integer outcome codes shared by every connector (SQL, clock, network, money). Status codes, not exceptions, are the library-wide error convention; this class names them and renders them.</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>STATUS_OK</code></td><td><span class="sig">static final int STATUS_OK = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>STATUS_INVALID_ARGUMENT</code></td><td><span class="sig">static final int STATUS_INVALID_ARGUMENT = 1</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>STATUS_INVALID_STATE</code></td><td><span class="sig">static final int STATUS_INVALID_STATE = 2</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>STATUS_NOT_CONFIGURED</code></td><td><span class="sig">static final int STATUS_NOT_CONFIGURED = 3</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>STATUS_UNAUTHORIZED</code></td><td><span class="sig">static final int STATUS_UNAUTHORIZED = 4</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>STATUS_TIMEOUT</code></td><td><span class="sig">static final int STATUS_TIMEOUT = 5</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>STATUS_UNREACHABLE</code></td><td><span class="sig">static final int STATUS_UNREACHABLE = 6</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>STATUS_PROTOCOL</code></td><td><span class="sig">static final int STATUS_PROTOCOL = 7</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>STATUS_DECLINED</code></td><td><span class="sig">static final int STATUS_DECLINED = 8</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>STATUS_NATIVE_ADAPTER_REQUIRED</code></td><td><span class="sig">static final int STATUS_NATIVE_ADAPTER_REQUIRED = 9</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>STATUS_INTERNAL</code></td><td><span class="sig">static final int STATUS_INTERNAL = 10</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>ok</code></td><td><span class="sig">int ok()</span></td><td class="desc">Accessor methods so other connectors read codes without cross-class static references (which the semantic checker rejects).</td></tr>
<tr><td><code>invalidArgument</code></td><td><span class="sig">int invalidArgument()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>invalidState</code></td><td><span class="sig">int invalidState()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>notConfigured</code></td><td><span class="sig">int notConfigured()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>unauthorized</code></td><td><span class="sig">int unauthorized()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>timeout</code></td><td><span class="sig">int timeout()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>unreachable</code></td><td><span class="sig">int unreachable()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>protocol</code></td><td><span class="sig">int protocol()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>declined</code></td><td><span class="sig">int declined()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nativeAdapterRequired</code></td><td><span class="sig">int nativeAdapterRequired()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>internal</code></td><td><span class="sig">int internal()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isOk</code></td><td><span class="sig">boolean isOk(int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isTransient</code></td><td><span class="sig">boolean isTransient(int code)</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(int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sldailycapbook">SLDailyCapBook <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/SLDailyCapBook.sleela)</span></h2>
<div data-u="sldailycapbook sldailycapbook">
<h3 id="SLDailyCapBook">SLDailyCapBook <span class="pill">class</span></h3>
<p class="desc">A long-only FIFO position book, the same shape as SLLongBook, with one added rule: a single day may record at most 2,000 actions (buy, sell, hold or flatten calls that reach the quantity/price/fee checks).</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>dailyCap</code></td><td><span class="sig">int dailyCap = 2000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxQty</code></td><td><span class="sig">int maxQty = 100000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxPrice</code></td><td><span class="sig">int maxPrice = 10000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxFee</code></td><td><span class="sig">int maxFee = 100000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxTotal</code></td><td><span class="sig">int maxTotal = 4000000000000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxDay</code></td><td><span class="sig">int maxDay = 10000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotQty</code></td><td><span class="sig">int[] lotQty = new int[16]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotPrice</code></td><td><span class="sig">int[] lotPrice = new int[16]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotDay</code></td><td><span class="sig">int[] lotDay = new int[16]</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 = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastDay</code></td><td><span class="sig">int lastDay = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>boughtQty</code></td><td><span class="sig">int boughtQty = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>soldQty</code></td><td><span class="sig">int soldQty = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>boughtCost</code></td><td><span class="sig">int boughtCost = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>costSold</code></td><td><span class="sig">int costSold = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>proceedsTotal</code></td><td><span class="sig">int proceedsTotal = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>feesPaid</code></td><td><span class="sig">int feesPaid = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastSaleCost</code></td><td><span class="sig">int lastSaleCost = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastSalePnl</code></td><td><span class="sig">int lastSalePnl = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>actionsToday</code></td><td><span class="sig">int actionsToday = 0</span></td><td class="desc">How many actions (of any verb) have been recorded on lastDay so far.</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>maxLots</code></td><td><span class="sig">int maxLots()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>reason</code></td><td><span class="sig">String reason(int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>totalQty</code></td><td><span class="sig">int totalQty()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>costBasis</code></td><td><span class="sig">int costBasis()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>avgCostFloor</code></td><td><span class="sig">int avgCostFloor()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>avgCostRemainder</code></td><td><span class="sig">int avgCostRemainder()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotCount</code></td><td><span class="sig">int lotCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotQtyAt</code></td><td><span class="sig">int lotQtyAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotPriceAt</code></td><td><span class="sig">int lotPriceAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotDayAt</code></td><td><span class="sig">int lotDayAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>currentDay</code></td><td><span class="sig">int currentDay()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>actionsOnCurrentDay</code></td><td><span class="sig">int actionsOnCurrentDay()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>remainingToday</code></td><td><span class="sig">int remainingToday()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>admitAction</code></td><td><span class="sig">boolean admitAction(int day)</span></td><td class="desc">Call once per verb, after the day is known valid (not backwards) but before anything else changes. On a new day the counter resets to 0. Returns true when the action may proceed, false when the cap refuses it.</td></tr>
<tr><td><code>buy</code></td><td><span class="sig">int buy(int day, int qty, int price, int fee)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sell</code></td><td><span class="sig">int sell(int day, int qty, int price, int fee)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>hold</code></td><td><span class="sig">int hold(int day)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>flatten</code></td><td><span class="sig">int flatten(int day, int price, int fee)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>compact</code></td><td><span class="sig">void compact()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>realizedGross</code></td><td><span class="sig">int realizedGross()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>realizedNet</code></td><td><span class="sig">int realizedNet()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>fees</code></td><td><span class="sig">int fees()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>invariantsHold</code></td><td><span class="sig">boolean invariantsHold()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sldailycapshortbook">SLDailyCapShortBook <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/SLDailyCapShortBook.sleela)</span></h2>
<div data-u="sldailycapshortbook sldailycapshortbook">
<h3 id="SLDailyCapShortBook">SLDailyCapShortBook <span class="pill">class</span></h3>
<p class="desc">A short-only FIFO position book, the same shape as SLShortBook, with one added rule: a single day may record at most 2,000 actions (shortSell, cover, hold or coverAll calls that reach the quantity/price/fee checks).</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>maxQty</code></td><td><span class="sig">int maxQty = 100000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxPrice</code></td><td><span class="sig">int maxPrice = 10000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxFee</code></td><td><span class="sig">int maxFee = 100000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxTotal</code></td><td><span class="sig">int maxTotal = 4000000000000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxDay</code></td><td><span class="sig">int maxDay = 10000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxRate</code></td><td><span class="sig">int maxRate = 1000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>dailyCap</code></td><td><span class="sig">int dailyCap = 2000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotQty</code></td><td><span class="sig">int[] lotQty = new int[16]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotPrice</code></td><td><span class="sig">int[] lotPrice = new int[16]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotDay</code></td><td><span class="sig">int[] lotDay = new int[16]</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 = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastDay</code></td><td><span class="sig">int lastDay = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>openedQty</code></td><td><span class="sig">int openedQty = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>coveredQty</code></td><td><span class="sig">int coveredQty = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>openedProceeds</code></td><td><span class="sig">int openedProceeds = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>proceedsCovered</code></td><td><span class="sig">int proceedsCovered = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>coverCost</code></td><td><span class="sig">int coverCost = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>feesPaid</code></td><td><span class="sig">int feesPaid = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>borrowRate</code></td><td><span class="sig">int borrowRate = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>borrowPaid</code></td><td><span class="sig">int borrowPaid = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastCoverProceeds</code></td><td><span class="sig">int lastCoverProceeds = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastCoverPnl</code></td><td><span class="sig">int lastCoverPnl = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>actionsToday</code></td><td><span class="sig">int actionsToday = 0</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>maxLots</code></td><td><span class="sig">int maxLots()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>reason</code></td><td><span class="sig">String reason(int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>totalShort</code></td><td><span class="sig">int totalShort()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>proceedsHeld</code></td><td><span class="sig">int proceedsHeld()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>avgSaleFloor</code></td><td><span class="sig">int avgSaleFloor()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>avgSaleRemainder</code></td><td><span class="sig">int avgSaleRemainder()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotCount</code></td><td><span class="sig">int lotCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotQtyAt</code></td><td><span class="sig">int lotQtyAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotPriceAt</code></td><td><span class="sig">int lotPriceAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotDayAt</code></td><td><span class="sig">int lotDayAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>currentDay</code></td><td><span class="sig">int currentDay()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>actionsOnCurrentDay</code></td><td><span class="sig">int actionsOnCurrentDay()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>remainingToday</code></td><td><span class="sig">int remainingToday()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>admitAction</code></td><td><span class="sig">boolean admitAction(int day)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setBorrowRate</code></td><td><span class="sig">int setBorrowRate(int rate)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shortSell</code></td><td><span class="sig">int shortSell(int day, int qty, int price, int fee)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>cover</code></td><td><span class="sig">int cover(int day, int qty, int price, int fee)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>hold</code></td><td><span class="sig">int hold(int day)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>coverAll</code></td><td><span class="sig">int coverAll(int day, int price, int fee)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>compact</code></td><td><span class="sig">void compact()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>realizedGross</code></td><td><span class="sig">int realizedGross()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>realizedNet</code></td><td><span class="sig">int realizedNet()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>fees</code></td><td><span class="sig">int fees()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>borrowCostPaid</code></td><td><span class="sig">int borrowCostPaid()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>invariantsHold</code></td><td><span class="sig">boolean invariantsHold()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sldecisiondesk">SLDecisionDesk <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/SLDecisionDesk.sleela)</span></h2>
<div data-u="sldecisiondesk sldecisiondesk">
<h3 id="SLDecisionDesk">SLDecisionDesk <span class="pill">class</span></h3>
<p class="desc">Shared desk for the trading-decision lessons: the Purchase Master runs the Sequitur onion, the student totals registered entries, and the desk compares them entry by entry.</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>fieldName</code></td><td><span class="sig">String fieldName = ""</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>n</code></td><td><span class="sig">int n = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>names</code></td><td><span class="sig">String[] names = new String[8]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>q</code></td><td><span class="sig">int[] q = new int[8]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>f</code></td><td><span class="sig">int[] f = new int[8]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>d</code></td><td><span class="sig">int[] d = new int[8]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sreg</code></td><td><span class="sig">SLNounRegistry sreg = new SLNounRegistry()</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>setup</code></td><td><span class="sig">void setup(String fieldLabel)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>addOption</code></td><td><span class="sig">void addOption(String name, int quote, int fee, int discount)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>masterTotal</code></td><td><span class="sig">int masterTotal(int i)</span></td><td class="desc">The Purchase Master: one option through the advantage onion.</td></tr>
<tr><td><code>keepFirst</code></td><td><span class="sig">boolean keepFirst(int a, int b)</span></td><td class="desc">The tie norm: the first option stays unless the second is strictly cheaper.</td></tr>
<tr><td><code>masterPick</code></td><td><span class="sig">int masterPick()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>buildStudent</code></td><td><span class="sig">void buildStudent(int kind, int k)</span></td><td class="desc">The student: register the entries, with one slip of the given kind at option k. Entry names are the option name plus quote, fee or discount.</td></tr>
<tr><td><code>studentTotal</code></td><td><span class="sig">int studentTotal(int i)</span></td><td class="desc">Student total for an option, or -1 when the student did not observe it.</td></tr>
<tr><td><code>studentPick</code></td><td><span class="sig">int studentPick()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>pickName</code></td><td><span class="sig">String pickName(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>checkEntry</code></td><td><span class="sig">int checkEntry(String entry, String owner, boolean masterHas, int mv)</span></td><td class="desc">Compare one entry: present, carrier and value. Returns 1 when it differs.</td></tr>
<tr><td><code>compare</code></td><td><span class="sig">int compare()</span></td><td class="desc">Prints every differing entry and returns how many there are.</td></tr>
<tr><td><code>showMaster</code></td><td><span class="sig">void showMaster()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>showStudent</code></td><td><span class="sig">void showStudent()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>verdict</code></td><td><span class="sig">boolean verdict()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>slipWords</code></td><td><span class="sig">String slipWords(int kind, int k)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>decide</code></td><td><span class="sig">void decide(String title, int kind, int k)</span></td><td class="desc">Runs one full decision: master, first student pass, and if needed the re-observation and a second comparison.</td></tr>
</table>
</div>
<h2 class="section" data-u="slengineeringbay">SLEngineeringBay <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/integration/SLEngineeringBay.sleela)</span></h2>
<div data-u="slengineeringbay slengineeringbay">
<h3 id="SLEngineeringBay">SLEngineeringBay <span class="pill">class</span></h3>
<p class="desc">Engineering bay -- a medium-capacity build/process compartment for the vertical-integration subject.</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>space</code></td><td><span class="sig">SLCompartment space</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>yieldPct</code></td><td><span class="sig">int yieldPct</span></td><td class="desc">yield as a percentage 0..100: output = input * yield / 100</td></tr>
<tr><td><code>producedTotal</code></td><td><span class="sig">int producedTotal</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 lbl, SLIntegrationKind cat, int yieldPercent)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getSpace</code></td><td><span class="sig">SLCompartment getSpace()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getYield</code></td><td><span class="sig">int getYield()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getProducedTotal</code></td><td><span class="sig">int getProducedTotal()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>load</code></td><td><span class="sig">int load(int units)</span></td><td class="desc">Load raw input into the bay's capacitive space; returns units accepted.</td></tr>
<tr><td><code>build</code></td><td><span class="sig">int build(int batch)</span></td><td class="desc">Run a build: consume up to `batch` loaded units, emit output at the yield. Returns the output units produced; the consumed input leaves the bay.</td></tr>
<tr><td><code>freeSpace</code></td><td><span class="sig">int freeSpace()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sleuclid">SLEuclid <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/SLEuclid.sleela)</span></h2>
<div data-u="sleuclid sleuclid">
<h3 id="SLEuclid">SLEuclid <span class="pill">class</span></h3>
<p class="desc">Careful integer Euclidean toolkit: greatest common divisor by Euclid loop, Bezout coefficients, exact fills by two round lots in logarithmic time, and squared Euclidean distance with an exact integer square root.</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>maxDiff</code></td><td><span class="sig">int maxDiff = 10000000</span></td><td class="desc">Largest absolute coordinate difference accepted by distSq.</td></tr>
<tr><td><code>maxDim</code></td><td><span class="sig">int maxDim = 64</span></td><td class="desc">Largest dimension accepted. maxDiff squared times maxDim = 6.4e15 <= maxExact.</td></tr>
<tr><td><code>maxExact</code></td><td><span class="sig">int maxExact = 9007199254740991</span></td><td class="desc">The largest magnitude that every comparison handles exactly (2^53 - 1).</td></tr>
<tr><td><code>maxLot</code></td><td><span class="sig">int maxLot = 90000000</span></td><td class="desc">Largest lot size accepted by the fill routines: maxLot squared <= maxExact.</td></tr>
<tr><td><code>maxOrder</code></td><td><span class="sig">int maxOrder = 1000000000000</span></td><td class="desc">Largest order accepted by the fill routines.</td></tr>
<tr><td><code>maxMag</code></td><td><span class="sig">int maxMag = 9007199254740991</span></td><td class="desc">Largest value lcm may return.</td></tr>
<tr><td><code>sqrtCap</code></td><td><span class="sig">int sqrtCap = 94906265</span></td><td class="desc">Largest k with k*k <= maxExact; the search for a floor root never goes above.</td></tr>
<tr><td><code>steps</code></td><td><span class="sig">int steps = 0</span></td><td class="desc">Number of loop passes taken by the last gcd call.</td></tr>
<tr><td><code>trail</code></td><td><span class="sig">String trail = ""</span></td><td class="desc">The remainder trail of the last gcd call, for example 120,180 -> 180,120</td></tr>
<tr><td><code>bx</code></td><td><span class="sig">int bx = 0</span></td><td class="desc">Bezout coefficients from the last egcd call: a*bx + b*by = g.</td></tr>
<tr><td><code>by</code></td><td><span class="sig">int by = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>fillA</code></td><td><span class="sig">int fillA = 0</span></td><td class="desc">The fill found by canFill or canFillScan: fillA lots of a plus fillB of b.</td></tr>
<tr><td><code>fillB</code></td><td><span class="sig">int fillB = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>fillStatus</code></td><td><span class="sig">int fillStatus = 1</span></td><td class="desc">0 = a fill exists, 1 = no fill exists, 2 = input out of range.</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>abs</code></td><td><span class="sig">int abs(int v)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>gcd</code></td><td><span class="sig">int gcd(int a, int b)</span></td><td class="desc">Greatest common divisor of |a| and |b|. gcd(0, 0) is 0. Returns -1 when either magnitude passes maxExact.</td></tr>
<tr><td><code>gcdAll</code></td><td><span class="sig">int gcdAll(int[] v, int n)</span></td><td class="desc">GCD of the first n values of v. Returns 0 when n is 0 or all are 0.</td></tr>
<tr><td><code>lcm</code></td><td><span class="sig">int lcm(int a, int b)</span></td><td class="desc">Least common multiple, or -1 when the result would pass maxMag.</td></tr>
<tr><td><code>egcd</code></td><td><span class="sig">int egcd(int a, int b)</span></td><td class="desc">Extended Euclid for 0 <= a, b <= maxExact. Returns g and sets bx, by so that a*bx + b*by = g. Returns -1 for an input outside that range.</td></tr>
<tr><td><code>bezoutHolds</code></td><td><span class="sig">boolean bezoutHolds(int a, int b, int g)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>fillInRange</code></td><td><span class="sig">boolean fillInRange(int c, int a, int b)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>canFill</code></td><td><span class="sig">boolean canFill(int c, int a, int b)</span></td><td class="desc">True when c shares can be filled exactly by whole lots of a and b. Solves a*x + b*y = c with x, y >= 0 and the smallest x. With g = gcd(a,b), a' = a/g, b' = b/g, c' = c/g: a solution needs g | c, then x = (c' mod b') * inverse(a' mod b') mod b', y = (c - a*x) / b, and it exists exactly when y >= 0. Every product is at most maxLot^2 = 8.1e15 <= maxExact.</td></tr>
<tr><td><code>canFillScan</code></td><td><span class="sig">boolean canFillScan(int c, int a, int b)</span></td><td class="desc">Reference implementation by scanning a-lot counts 0, 1, 2, ... Runs at most c / a + 1 passes. Used to cross-check canFill, not for large orders.</td></tr>
<tr><td><code>isqrt</code></td><td><span class="sig">int isqrt(int n)</span></td><td class="desc">Floor of the square root of n for 0 <= n <= maxExact, else -1. sqrtCap^2 <= maxExact < (sqrtCap + 1)^2, so mid*mid is always compared exactly.</td></tr>
<tr><td><code>distSqAt</code></td><td><span class="sig">int distSqAt(int[] a, int oa, int[] b, int ob, int dim)</span></td><td class="desc">Squared Euclidean distance between the first dim entries of a and b (a and b start at offsets oa and ob). Returns -1 when dim is out of range or any difference passes maxDiff.</td></tr>
<tr><td><code>distSq</code></td><td><span class="sig">int distSq(int[] a, int[] b, int dim)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>dist</code></td><td><span class="sig">int dist(int[] a, int[] b, int dim)</span></td><td class="desc">Floor of the Euclidean distance, or -1 on a rejected input.</td></tr>
<tr><td><code>nearestIndex</code></td><td><span class="sig">int nearestIndex(int[] cur, int[] targets, int dim, int count)</span></td><td class="desc">Index of the target nearest to cur. Targets are stored one after another in a flat array, dim entries each. A tie goes to the earlier target (the repo tie norm). Returns -1 when count < 1 or any distance is rejected.</td></tr>
</table>
</div>
<h2 class="section" data-u="slgradebook">SLGradeBook <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/grading/SLGradeBook.sleela)</span></h2>
<div data-u="slgradebook slgradebook">
<h3 id="SLGradeBook">SLGradeBook <span class="pill">class</span></h3>
<p class="desc">The grade book -- the top-level face of the sophistication circuit grader, producing ratings for each module and every set.</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>circuit</code></td><td><span class="sig">SLSophisticationCircuit circuit</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(SLSophisticationCircuit c)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getCircuit</code></td><td><span class="sig">SLSophisticationCircuit getCircuit()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>all</code></td><td><span class="sig">SLGradeSet all()</span></td><td class="desc">---- Set accessors (each an SLGradeSet with its own rating) ----</td></tr>
<tr><td><code>winning</code></td><td><span class="sig">SLGradeSet winning()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>losing</code></td><td><span class="sig">SLGradeSet losing()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>graders</code></td><td><span class="sig">SLGradeSet graders()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>absolutes</code></td><td><span class="sig">SLGradeSet absolutes()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>overallTier</code></td><td><span class="sig">int overallTier()</span></td><td class="desc">Overall field tier 1..10 (the rating of the whole collection).</td></tr>
<tr><td><code>overallLetter</code></td><td><span class="sig">String overallLetter()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>winRate</code></td><td><span class="sig">int winRate()</span></td><td class="desc">Win rate as a percentage: winning modules over all modules.</td></tr>
<tr><td><code>rateSet</code></td><td><span class="sig">String rateSet(SLGradeSet s)</span></td><td class="desc">Rating of an arbitrary externally-supplied set, so callers can grade "any set of modules" they assemble themselves, not just the circuit's.</td></tr>
<tr><td><code>championRating</code></td><td><span class="sig">String championRating()</span></td><td class="desc">The champion module's rating, or "none" if the field is empty.</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>emitThrough</code></td><td><span class="sig">void emitThrough(SLAdvantageEmitter em)</span></td><td class="desc">Report the whole gradebook through an output emitter (terminal / commonrails / socket / silent); the sink decides the destination.</td></tr>
</table>
</div>
<h2 class="section" data-u="slgradeset">SLGradeSet <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/grading/SLGradeSet.sleela)</span></h2>
<div data-u="slgradeset slgradeset">
<h3 id="SLGradeSet">SLGradeSet <span class="pill">class</span></h3>
<p class="desc">A named set of graded modules (e.g. winning / losing / grader / absolute) with its own aggregate rating.</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>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>grades</code></td><td><span class="sig">SLModuleGrade[] grades</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>cap</code></td><td><span class="sig">int cap</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 nm, int capacity)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getName</code></td><td><span class="sig">String getName()</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>add</code></td><td><span class="sig">void add(SLModuleGrade g)</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">SLModuleGrade at(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>totalScore</code></td><td><span class="sig">int totalScore()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>meanScore</code></td><td><span class="sig">int meanScore()</span></td><td class="desc">Mean score (integer; 0 if empty).</td></tr>
<tr><td><code>bestScore</code></td><td><span class="sig">int bestScore()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>worstScore</code></td><td><span class="sig">int worstScore()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>tier</code></td><td><span class="sig">int tier()</span></td><td class="desc">Set-level tier 1..10 from the mean score (same scale as a module).</td></tr>
<tr><td><code>letter</code></td><td><span class="sig">String letter()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slhighspeedtrader">SLHighSpeedTrader <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/trader/SLHighSpeedTrader.sleela)</span></h2>
<div data-u="slhighspeedtrader slhighspeedtrader">
<h3 id="SLHighSpeedTrader">SLHighSpeedTrader <span class="pill">class</span></h3>
<p class="desc">The high speed trader AI built from 8 to 24 pragmatics (pure computation, synthetic data).</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>reg</code></td><td><span class="sig">SLHstPragmatics reg</span></td><td class="desc">The high speed trader: a pure-computation model (no orders, no network). Candidate layout o[0..9]: edgeBps, costBps, evidenceN, spreadBps, volBps, ageMs, qty (fraction of max order, 0 to 1), positionFrac (0 to 1), venueTrust (0 to 1), depthRatio (depth divided by qty). Pipeline per candidate: 24 features in 0..1, then the first P pragmatics by priority order. Any feature below its hard minimum is a veto. Else the weighted score must reach the threshold and the rate governor must have a token. Everything fails closed: not ready, halted, or malformed means no.</td></tr>
<tr><td><code>f</code></td><td><span class="sig">double[] f</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>w</code></td><td><span class="sig">double[] w</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>hm</code></td><td><span class="sig">double[] hm</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>vetoCount</code></td><td><span class="sig">int[] vetoCount</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>prior</code></td><td><span class="sig">double[] prior</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>P</code></td><td><span class="sig">int P = 8</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>ready</code></td><td><span class="sig">boolean ready = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>halted</code></td><td><span class="sig">boolean halted = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>threshold</code></td><td><span class="sig">double threshold = 0.60</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>tradesPerMinute</code></td><td><span class="sig">double tradesPerMinute = 2000.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>ratePerMs</code></td><td><span class="sig">double ratePerMs = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>burst</code></td><td><span class="sig">double burst = 8.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>tokens</code></td><td><span class="sig">double tokens = 8.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastMs</code></td><td><span class="sig">double lastMs = -1.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>windowStart</code></td><td><span class="sig">double windowStart = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>windowAccepted</code></td><td><span class="sig">int windowAccepted = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>windowRateRej</code></td><td><span class="sig">int windowRateRej = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>evals</code></td><td><span class="sig">int evals = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>accepted</code></td><td><span class="sig">int accepted = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>rejVeto</code></td><td><span class="sig">int rejVeto = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>rejScore</code></td><td><span class="sig">int rejScore = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>rejRate</code></td><td><span class="sig">int rejRate = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>rejNotReady</code></td><td><span class="sig">int rejNotReady = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastCode</code></td><td><span class="sig">int lastCode = 1</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastBucket</code></td><td><span class="sig">int lastBucket = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>insights</code></td><td><span class="sig">int insights = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>insightsRefused</code></td><td><span class="sig">int insightsRefused = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastScore</code></td><td><span class="sig">double lastScore = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>pnl</code></td><td><span class="sig">double pnl = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>peak</code></td><td><span class="sig">double peak = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>ddLimit</code></td><td><span class="sig">double ddLimit = 400.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>eta</code></td><td><span class="sig">double eta = 0.10</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>learning</code></td><td><span class="sig">boolean learning = true</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">boolean configure(int pragmatics, double tpm)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setLearning</code></td><td><span class="sig">void setLearning(boolean on)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setDrawdownLimit</code></td><td><span class="sig">boolean setDrawdownLimit(double lim)</span></td><td class="desc">For comparison runs only: a positive finite drawdown limit in bps.</td></tr>
<tr><td><code>getPragmatics</code></td><td><span class="sig">int getPragmatics()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getThreshold</code></td><td><span class="sig">double getThreshold()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getEvals</code></td><td><span class="sig">int getEvals()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getAccepted</code></td><td><span class="sig">int getAccepted()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getRejVeto</code></td><td><span class="sig">int getRejVeto()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getRejScore</code></td><td><span class="sig">int getRejScore()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getRejRate</code></td><td><span class="sig">int getRejRate()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getVeto</code></td><td><span class="sig">int getVeto(int id)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getWeight</code></td><td><span class="sig">double getWeight(int id)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getPnl</code></td><td><span class="sig">double getPnl()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getLastCode</code></td><td><span class="sig">int getLastCode()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getLastScore</code></td><td><span class="sig">double getLastScore()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isHalted</code></td><td><span class="sig">boolean isHalted()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getInsights</code></td><td><span class="sig">int getInsights()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getInsightsRefused</code></td><td><span class="sig">int getInsightsRefused()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>resetWindowAccepted</code></td><td><span class="sig">int resetWindowAccepted()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>clamp01</code></td><td><span class="sig">double clamp01(double x)</span></td><td class="desc">---- small numeric helpers ----</td></tr>
<tr><td><code>okv</code></td><td><span class="sig">boolean okv(double x)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>haltNow</code></td><td><span class="sig">void haltNow()</span></td><td class="desc">---- human control: halt is instant, re-arm is a deliberate human act ----</td></tr>
<tr><td><code>rearm</code></td><td><span class="sig">void rearm()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>insight</code></td><td><span class="sig">boolean insight(int id, double factor)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>refill</code></td><td><span class="sig">void refill(double nowMs)</span></td><td class="desc">---- rate governor: token bucket plus a once a second threshold controller ----</td></tr>
<tr><td><code>features</code></td><td><span class="sig">void features(double[] o)</span></td><td class="desc">---- the 24 features, straight line, each in 0..1 where 1 is best ----</td></tr>
<tr><td><code>evaluate</code></td><td><span class="sig">int evaluate(double[] o, double nowMs)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>learn</code></td><td><span class="sig">void learn(double realizedBps)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slhstmarket">SLHstMarket <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/trader/SLHstMarket.sleela)</span></h2>
<div data-u="slhstmarket slhstmarket">
<h3 id="SLHstMarket">SLHstMarket <span class="pill">class</span></h3>
<p class="desc">A deterministic synthetic market that feeds the high speed trader.</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>seed</code></td><td><span class="sig">int seed = 12345</span></td><td class="desc">Deterministic synthetic candidate stream: same seed, same stream. Mix: noise, marginal, genuine, phantom (too good to be true), stale, oversize, high position, low trust, and a rare malformed record. The hidden truth decides the realized outcome, so learning has a signal.</td></tr>
<tr><td><code>real</code></td><td><span class="sig">boolean real = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastE</code></td><td><span class="sig">double lastE = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastC</code></td><td><span class="sig">double lastC = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastV</code></td><td><span class="sig">double lastV = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>kindCount</code></td><td><span class="sig">int kindCount = 0</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>reseed</code></td><td><span class="sig">void reseed(int s)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastWasReal</code></td><td><span class="sig">boolean lastWasReal()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>rnd</code></td><td><span class="sig">double rnd()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>between</code></td><td><span class="sig">double between(double lo, double hi)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>next</code></td><td><span class="sig">void next(double[] o)</span></td><td class="desc">Fill o[0..9] with the next candidate. o must have 10 elements.</td></tr>
<tr><td><code>realized</code></td><td><span class="sig">double realized()</span></td><td class="desc">Realized outcome in bps of the candidate just generated, with noise.</td></tr>
</table>
</div>
<h2 class="section" data-u="slhstpragmatics">SLHstPragmatics <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/trader/SLHstPragmatics.sleela)</span></h2>
<div data-u="slhstpragmatics slhstpragmatics">
<h3 id="SLHstPragmatics">SLHstPragmatics <span class="pill">class</span></h3>
<p class="desc">The registry of the 24 pragmatics of the high speed trader AI.</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>names</code></td><td><span class="sig">String[] names</span></td><td class="desc">ids 0..7 LOGIC (clear logic), 8..15 USE (logic of use), 16..23 GROUND (secure and grounded trade). The priority order interleaves the phases so any prefix of 8 to 24 keeps all three, and the first 8 are the minimal safe core: every hard gate a trade must clear before it is even scored.</td></tr>
<tr><td><code>hardMins</code></td><td><span class="sig">double[] hardMins</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>built</code></td><td><span class="sig">boolean built = false</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>build</code></td><td><span class="sig">void build()</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>minPragmatics</code></td><td><span class="sig">int minPragmatics()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxPragmatics</code></td><td><span class="sig">int maxPragmatics()</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(int id)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>hardMin</code></td><td><span class="sig">double hardMin(int id)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>orderAt</code></td><td><span class="sig">int orderAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>phase</code></td><td><span class="sig">String phase(int id)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slintegrationkind">SLIntegrationKind <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/integration/SLIntegrationKind.sleela)</span></h2>
<div data-u="slintegrationkind slintegrationkind">
<h3 id="SLIntegrationKind">SLIntegrationKind <span class="pill">class</span></h3>
<p class="desc">The compartment-kind vocabulary for the vertical-integration subject -- the OOD catalog of compartment types, capacities, and meanings.</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>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>nameOf</code></td><td><span class="sig">String nameOf(int kind)</span></td><td class="desc">Human name of a kind id.</td></tr>
<tr><td><code>defaultCapacityClass</code></td><td><span class="sig">int defaultCapacityClass(int kind)</span></td><td class="desc">Default capacity class for a kind. Engineering bays are MEDIUM by design; nested models are recursive; onions and trays are small; plain holders are small by default (callers can resize).</td></tr>
<tr><td><code>capacityUnits</code></td><td><span class="sig">int capacityUnits(int capClass)</span></td><td class="desc">Numeric capacity units implied by a capacity class.</td></tr>
<tr><td><code>meaningOf</code></td><td><span class="sig">String meaningOf(int kind)</span></td><td class="desc">Meaning: what this kind is FOR (one line).</td></tr>
<tr><td><code>relevanceOf</code></td><td><span class="sig">int relevanceOf(int kind)</span></td><td class="desc">Relevance: how this kind participates in the vertical value chain. A rough 1..10 weight used by the model to gauge system sophistication contribution.</td></tr>
<tr><td><code>isPlain</code></td><td><span class="sig">boolean isPlain(int kind)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isRecursive</code></td><td><span class="sig">boolean isRecursive(int kind)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sljointprofitmax">SLJointProfitMax <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/math/SLJointProfitMax.sleela)</span></h2>
<div data-u="sljointprofitmax sljointprofitmax">
<h3 id="SLJointProfitMax">SLJointProfitMax <span class="pill">class</span></h3>
<p class="desc">Joint Profit Maximization -- the integrated surplus formula for a coordinated buyer+seller system.</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>rbA</code></td><td><span class="sig">double rbA</span></td><td class="desc">---- Curve coefficients ---- linear term of buyer revenue R_B(Q)</td></tr>
<tr><td><code>rbB</code></td><td><span class="sig">double rbB</span></td><td class="desc">quadratic (diminishing) term of buyer revenue</td></tr>
<tr><td><code>csA</code></td><td><span class="sig">double csA</span></td><td class="desc">linear term of seller cost C_S(Q)</td></tr>
<tr><td><code>csB</code></td><td><span class="sig">double csB</span></td><td class="desc">quadratic (convex) term of seller cost</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>configureCurves</code></td><td><span class="sig">void configureCurves(double rbA0, double rbB0, double csA0, double csB0)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getRbA</code></td><td><span class="sig">double getRbA()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getRbB</code></td><td><span class="sig">double getRbB()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getCsA</code></td><td><span class="sig">double getCsA()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getCsB</code></td><td><span class="sig">double getCsB()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>buyerRevenue</code></td><td><span class="sig">double buyerRevenue(double q)</span></td><td class="desc">Buyer revenue / utility from Q units.</td></tr>
<tr><td><code>sellerCost</code></td><td><span class="sig">double sellerCost(double q)</span></td><td class="desc">Seller total cost for Q units.</td></tr>
<tr><td><code>jointProfit</code></td><td><span class="sig">double jointProfit(double q)</span></td><td class="desc">Total available pool of profit: Pi_total(Q) = R_B(Q) - C_S(Q).</td></tr>
<tr><td><code>marginalRevenue</code></td><td><span class="sig">double marginalRevenue(double q)</span></td><td class="desc">Marginal revenue dR_B/dQ.</td></tr>
<tr><td><code>marginalCost</code></td><td><span class="sig">double marginalCost(double q)</span></td><td class="desc">Marginal supply cost dC_S/dQ.</td></tr>
<tr><td><code>optimalQuantity</code></td><td><span class="sig">double optimalQuantity()</span></td><td class="desc">Optimal quantity Q* where MR = MC. 0 if no interior optimum exists.</td></tr>
<tr><td><code>maxJointProfit</code></td><td><span class="sig">double maxJointProfit()</span></td><td class="desc">The maximum joint surplus, evaluated at Q*.</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sllongbook">SLLongBook <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/SLLongBook.sleela)</span></h2>
<div data-u="sllongbook sllongbook">
<h3 id="SLLongBook">SLLongBook <span class="pill">class</span></h3>
<p class="desc">A long-only position book of FIFO lots with verbs buy, sell, hold and flatten, integer cents, time in whole days, and invariants checked after every action.</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>maxQty</code></td><td><span class="sig">int maxQty = 100000000</span></td><td class="desc">Largest accepted quantity, price and fee; largest running total.</td></tr>
<tr><td><code>maxPrice</code></td><td><span class="sig">int maxPrice = 10000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxFee</code></td><td><span class="sig">int maxFee = 100000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxTotal</code></td><td><span class="sig">int maxTotal = 4000000000000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxDay</code></td><td><span class="sig">int maxDay = 10000000</span></td><td class="desc">Largest day number accepted (about 27,000 years).</td></tr>
<tr><td><code>lotQty</code></td><td><span class="sig">int[] lotQty = new int[16]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotPrice</code></td><td><span class="sig">int[] lotPrice = new int[16]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotDay</code></td><td><span class="sig">int[] lotDay = new int[16]</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 = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastDay</code></td><td><span class="sig">int lastDay = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>boughtQty</code></td><td><span class="sig">int boughtQty = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>soldQty</code></td><td><span class="sig">int soldQty = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>boughtCost</code></td><td><span class="sig">int boughtCost = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>costSold</code></td><td><span class="sig">int costSold = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>proceedsTotal</code></td><td><span class="sig">int proceedsTotal = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>feesPaid</code></td><td><span class="sig">int feesPaid = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastSaleCost</code></td><td><span class="sig">int lastSaleCost = 0</span></td><td class="desc">Cost basis and pnl of the most recent sell, before fees.</td></tr>
<tr><td><code>lastSalePnl</code></td><td><span class="sig">int lastSalePnl = 0</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>maxLots</code></td><td><span class="sig">int maxLots()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>reason</code></td><td><span class="sig">String reason(int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>totalQty</code></td><td><span class="sig">int totalQty()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>costBasis</code></td><td><span class="sig">int costBasis()</span></td><td class="desc">Cost of what is still held, in cents.</td></tr>
<tr><td><code>avgCostFloor</code></td><td><span class="sig">int avgCostFloor()</span></td><td class="desc">Average cost per share, rounded down, and the leftover cents.</td></tr>
<tr><td><code>avgCostRemainder</code></td><td><span class="sig">int avgCostRemainder()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotCount</code></td><td><span class="sig">int lotCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotQtyAt</code></td><td><span class="sig">int lotQtyAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotPriceAt</code></td><td><span class="sig">int lotPriceAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotDayAt</code></td><td><span class="sig">int lotDayAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>currentDay</code></td><td><span class="sig">int currentDay()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>buy</code></td><td><span class="sig">int buy(int day, int qty, int price, int fee)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sell</code></td><td><span class="sig">int sell(int day, int qty, int price, int fee)</span></td><td class="desc">Sell oldest lots first. Refuses, changing nothing, when the sell is not valid or exceeds the holding.</td></tr>
<tr><td><code>hold</code></td><td><span class="sig">int hold(int day)</span></td><td class="desc">Let time pass with no trade.</td></tr>
<tr><td><code>flatten</code></td><td><span class="sig">int flatten(int day, int price, int fee)</span></td><td class="desc">Sell everything that is held.</td></tr>
<tr><td><code>compact</code></td><td><span class="sig">void compact()</span></td><td class="desc">Remove emptied lots, keeping the rest in order.</td></tr>
<tr><td><code>realizedGross</code></td><td><span class="sig">int realizedGross()</span></td><td class="desc">Realized profit before fees, over everything sold so far.</td></tr>
<tr><td><code>realizedNet</code></td><td><span class="sig">int realizedNet()</span></td><td class="desc">Realized profit after every fee paid so far, buys and sells.</td></tr>
<tr><td><code>fees</code></td><td><span class="sig">int fees()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>validToday</code></td><td><span class="sig">boolean validToday(int today)</span></td><td class="desc">True when today is not before the book day, so ages cannot be negative.</td></tr>
<tr><td><code>ageOf</code></td><td><span class="sig">int ageOf(int i, int today)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>oldestAge</code></td><td><span class="sig">int oldestAge(int today)</span></td><td class="desc">Age of the oldest lot in days, or -1 when flat or when today is invalid.</td></tr>
<tr><td><code>weightedAgeFloor</code></td><td><span class="sig">int weightedAgeFloor(int today)</span></td><td class="desc">Quantity-weighted average age in whole days, rounded down; 0 when flat, -1 when today is invalid.</td></tr>
<tr><td><code>qtyOlderThan</code></td><td><span class="sig">int qtyOlderThan(int today, int maxAge)</span></td><td class="desc">Shares held for more than maxAge days.</td></tr>
<tr><td><code>isLongTerm</code></td><td><span class="sig">boolean isLongTerm(int i, int today, int threshold)</span></td><td class="desc">A lot is long term when it is held for MORE than threshold days.</td></tr>
<tr><td><code>qtyLongTerm</code></td><td><span class="sig">int qtyLongTerm(int today, int threshold)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>invariantsHold</code></td><td><span class="sig">boolean invariantsHold()</span></td><td class="desc">---- Invariants ---- 1 every lot has positive quantity and price; 2 lot days never decrease and never pass the book day; 3 count is within the 16-lot capacity; 4 shares held = shares bought - shares sold; 5 cost held = cost bought - cost sold.</td></tr>
</table>
</div>
<h2 class="section" data-u="slmarketscout">SLMarketScout <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/network/SLMarketScout.sleela)</span></h2>
<div data-u="slmarketscout slmarketscout">
<h3 id="SLMarketScout">SLMarketScout <span class="pill">class</span></h3>
<p class="desc">A deterministic market scout -- the OFFLINE stand-in for a live internet search of venue quotes for a single good. It holds a small table of (venue, bid, ask) rows and reports the best place to BUY (lowest ask) and the best place to SELL (highest bid), plus the cross-venue spread opportunity.</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>good</code></td><td><span class="sig">String good</span></td><td class="desc">---- Quote table: parallel arrays, up to 32 venues ----</td></tr>
<tr><td><code>venue</code></td><td><span class="sig">String[] venue = new String[32]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>bid</code></td><td><span class="sig">double[] bid = new double[32]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>ask</code></td><td><span class="sig">double[] ask = new double[32]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>n</code></td><td><span class="sig">int n = 0</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>forGood</code></td><td><span class="sig">void forGood(String g)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getGood</code></td><td><span class="sig">String getGood()</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>addQuote</code></td><td><span class="sig">void addQuote(String v, double b, double a)</span></td><td class="desc">Append one venue's two-sided quote. bid = what they pay you to SELL to them; ask = what they charge you to BUY from them.</td></tr>
<tr><td><code>bidAt</code></td><td><span class="sig">double bidAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>askAt</code></td><td><span class="sig">double askAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>venueAt</code></td><td><span class="sig">String venueAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>bestAskIndex</code></td><td><span class="sig">int bestAskIndex()</span></td><td class="desc">Index of the lowest ask (cheapest place to BUY). -1 if empty.</td></tr>
<tr><td><code>bestBidIndex</code></td><td><span class="sig">int bestBidIndex()</span></td><td class="desc">Index of the highest bid (best place to SELL). -1 if empty.</td></tr>
<tr><td><code>bestAsk</code></td><td><span class="sig">double bestAsk()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>bestBid</code></td><td><span class="sig">double bestBid()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>buyVenue</code></td><td><span class="sig">String buyVenue()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sellVenue</code></td><td><span class="sig">String sellVenue()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>spread</code></td><td><span class="sig">double spread()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slmodulegrade">SLModuleGrade <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/grading/SLModuleGrade.sleela)</span></h2>
<div data-u="slmodulegrade slmodulegrade">
<h3 id="SLModuleGrade">SLModuleGrade <span class="pill">class</span></h3>
<p class="desc">One graded module -- a name, a raw sophistication score, a derived rating, and a role in the grading circuit.</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>label</code></td><td><span class="sig">String label</span></td><td class="desc">---- Module grade state ----</td></tr>
<tr><td><code>score</code></td><td><span class="sig">int score</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">int role</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>ROLE_NORMAL</code></td><td><span class="sig">int ROLE_NORMAL()</span></td><td class="desc">role constants (methods cost no layout slot)</td></tr>
<tr><td><code>ROLE_GRADER</code></td><td><span class="sig">int ROLE_GRADER()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>ROLE_ABSOLUTE</code></td><td><span class="sig">int ROLE_ABSOLUTE()</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(String lbl, int rawScore, int moduleRole)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getLabel</code></td><td><span class="sig">String getLabel()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getScore</code></td><td><span class="sig">int getScore()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setScore</code></td><td><span class="sig">void setScore(int s)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getRole</code></td><td><span class="sig">int getRole()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setRole</code></td><td><span class="sig">void setRole(int r)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isGrader</code></td><td><span class="sig">boolean isGrader()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isAbsolute</code></td><td><span class="sig">boolean isAbsolute()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>tier</code></td><td><span class="sig">int tier()</span></td><td class="desc">Rating tier 1..10 from the raw score. Scores are clamped: a score of 100+ is a perfect 10, and every 10 points is one tier (floor at 1).</td></tr>
<tr><td><code>letter</code></td><td><span class="sig">String letter()</span></td><td class="desc">Letter rating from the tier. S is reserved for a perfect/elite tier.</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slmoneyconnector">SLMoneyConnector <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/connect/SLMoneyConnector.sleela)</span></h2>
<div data-u="slmoneyconnector slmoneyconnector">
<h3 id="SLMoneyConnector">SLMoneyConnector <span class="pill">class</span></h3>
<p class="desc">The money-source connector of the CONNECT medium -- banks and card networks. It models a payment lifecycle (authorize -> capture -> refund / void) against a funding source, validating amounts and state in the VM and deferring the live settlement to a host adapter (slbank_*). Declines are a first-class, non-retryable outcome.</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>vocab</code></td><td><span class="sig">SLConnectStatus vocab</span></td><td class="desc">---- Shared medium plumbing ----</td></tr>
<tr><td><code>fault</code></td><td><span class="sig">SLConnectFault fault</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sourceKind</code></td><td><span class="sig">String sourceKind = ""</span></td><td class="desc">---- Funding-source + payment state ---- sourceKind: "bank" | "card" | "wallet"</td></tr>
<tr><td><code>keystoreAlias</code></td><td><span class="sig">String keystoreAlias = ""</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>currency</code></td><td><span class="sig">String currency = "USD"</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>configured</code></td><td><span class="sig">boolean configured = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>open</code></td><td><span class="sig">boolean open = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>authorizedCents</code></td><td><span class="sig">int authorizedCents = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>capturedCents</code></td><td><span class="sig">int capturedCents = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>refundedCents</code></td><td><span class="sig">int refundedCents = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastDeclined</code></td><td><span class="sig">boolean lastDeclined = false</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>configure</code></td><td><span class="sig">int configure(String kind, String alias, String cur)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>openLink</code></td><td><span class="sig">int openLink()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>authorize</code></td><td><span class="sig">int authorize(int amountCents)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>acceptAuthorization</code></td><td><span class="sig">int acceptAuthorization(int amountCents)</span></td><td class="desc">Host-adapter callback: approval. Records the authorized hold.</td></tr>
<tr><td><code>declineAuthorization</code></td><td><span class="sig">int declineAuthorization(String why)</span></td><td class="desc">Host-adapter callback: refusal. A decline is NOT retryable.</td></tr>
<tr><td><code>capture</code></td><td><span class="sig">int capture(int amountCents)</span></td><td class="desc">Capture against a prior authorization (native: slbank_capture). Cannot capture more than was authorized.</td></tr>
<tr><td><code>refund</code></td><td><span class="sig">int refund(int amountCents)</span></td><td class="desc">Refund part or all of what was captured (native: slbank_refund).</td></tr>
<tr><td><code>settledCents</code></td><td><span class="sig">int settledCents()</span></td><td class="desc">Net settled amount after refunds, in cents.</td></tr>
<tr><td><code>closeLink</code></td><td><span class="sig">int closeLink()</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>wasDeclined</code></td><td><span class="sig">boolean wasDeclined()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getAuthorizedCents</code></td><td><span class="sig">int getAuthorizedCents()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getCapturedCents</code></td><td><span class="sig">int getCapturedCents()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getRefundedCents</code></td><td><span class="sig">int getRefundedCents()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isNativeReady</code></td><td><span class="sig">boolean isNativeReady()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastFault</code></td><td><span class="sig">SLConnectFault lastFault()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>receipt</code></td><td><span class="sig">String receipt()</span></td><td class="desc">A log-safe settlement receipt -- alias only, never a card number.</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slmoralevaluator">SLMoralEvaluator <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/moral/SLMoralEvaluator.sleela)</span></h2>
<div data-u="slmoralevaluator slmoralevaluator">
<h3 id="SLMoralEvaluator">SLMoralEvaluator <span class="pill">class</span></h3>
<p class="desc">The Moral Evaluator: up to 41 yes or no points, human and life centered.</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>yes</code></td><td><span class="sig">boolean[] yes</span></td><td class="desc">The Moral Evaluator. A trade is judged by up to 41 yes or no points in five dimensions: 0 trades, 1 time, 2 listers, 3 united states, 4 tall science. The orientation is the human at the center and the living person: five CARDINAL points (life safe, human is the end, informed consent, no deception, lawful subject) are vetoes that no amount of merit can buy. Verdicts: 0 NO, 1 YES, 2 COMPLETE (every one of the 41 points is yes). In binary mode COMPLETE is reported as YES. Fail closed: not ready is NO.</td></tr>
<tr><td><code>dim</code></td><td><span class="sig">int[] dim</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>cardinal</code></td><td><span class="sig">boolean[] cardinal</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>pname</code></td><td><span class="sig">String[] pname</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>dimTotal</code></td><td><span class="sig">int[] dimTotal</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>dimYes</code></td><td><span class="sig">int[] dimYes</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>dimFrac</code></td><td><span class="sig">double[] dimFrac</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">int active = 41</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>mode</code></td><td><span class="sig">int mode = 3</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>ready</code></td><td><span class="sig">boolean ready = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>threshold</code></td><td><span class="sig">double threshold = 0.80</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>dimFloor</code></td><td><span class="sig">double dimFloor = 0.50</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastMerit</code></td><td><span class="sig">double lastMerit = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastVerdict</code></td><td><span class="sig">int lastVerdict = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastCardinalFail</code></td><td><span class="sig">int lastCardinalFail = -1</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastWeakDim</code></td><td><span class="sig">int lastWeakDim = -1</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastReason</code></td><td><span class="sig">String lastReason = "not ready"</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>reviews</code></td><td><span class="sig">int reviews = 0</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">boolean configure(int points, int verdictStates)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>names</code></td><td><span class="sig">void names()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getActive</code></td><td><span class="sig">int getActive()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isReady</code></td><td><span class="sig">boolean isReady()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getThreshold</code></td><td><span class="sig">double getThreshold()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getMerit</code></td><td><span class="sig">double getMerit()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getRisk</code></td><td><span class="sig">double getRisk()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getVerdict</code></td><td><span class="sig">int getVerdict()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getReason</code></td><td><span class="sig">String getReason()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getCardinalFail</code></td><td><span class="sig">int getCardinalFail()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getWeakDim</code></td><td><span class="sig">int getWeakDim()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getDimFrac</code></td><td><span class="sig">double getDimFrac(int d)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getAnswer</code></td><td><span class="sig">boolean getAnswer(int id)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>pointName</code></td><td><span class="sig">String pointName(int id)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>verdictName</code></td><td><span class="sig">String verdictName(int v)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>dimName</code></td><td><span class="sig">String dimName(int d)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>answers</code></td><td><span class="sig">void answers(SLMoralTrade t, SLTallScience ts)</span></td><td class="desc">---- the 41 yes or no answers, straight line ----</td></tr>
<tr><td><code>evaluate</code></td><td><span class="sig">int evaluate(SLMoralTrade t, SLTallScience ts)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>review</code></td><td><span class="sig">boolean review(int verdictWas, boolean correct)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slmoralmeritledger">SLMoralMeritLedger <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/moral/SLMoralMeritLedger.sleela)</span></h2>
<div data-u="slmoralmeritledger slmoralmeritledger">
<h3 id="SLMoralMeritLedger">SLMoralMeritLedger <span class="pill">class</span></h3>
<p class="desc">The ledger of verdicts and merit over many trades.</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>count</code></td><td><span class="sig">int count = 0</span></td><td class="desc">Overall trades over time: a running record of verdicts and merit.</td></tr>
<tr><td><code>nNo</code></td><td><span class="sig">int nNo = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nYes</code></td><td><span class="sig">int nYes = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nComplete</code></td><td><span class="sig">int nComplete = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sumMerit</code></td><td><span class="sig">double sumMerit = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>ema</code></td><td><span class="sig">double ema = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>minMerit</code></td><td><span class="sig">double minMerit = 1.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>weak</code></td><td><span class="sig">int[] weak</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>cardinalFails</code></td><td><span class="sig">int[] cardinalFails</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>built</code></td><td><span class="sig">boolean built = false</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>build</code></td><td><span class="sig">void build()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>noteTrade</code></td><td><span class="sig">void noteTrade(SLMoralEvaluator ev)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getCount</code></td><td><span class="sig">int getCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getNo</code></td><td><span class="sig">int getNo()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getYes</code></td><td><span class="sig">int getYes()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getComplete</code></td><td><span class="sig">int getComplete()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>meanMerit</code></td><td><span class="sig">double meanMerit()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>recentMerit</code></td><td><span class="sig">double recentMerit()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>worstMerit</code></td><td><span class="sig">double worstMerit()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>riskOfMerit</code></td><td><span class="sig">double riskOfMerit()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>weakCount</code></td><td><span class="sig">int weakCount(int d)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>cardinalCount</code></td><td><span class="sig">int cardinalCount(int id)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slmoraltrade">SLMoralTrade <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/moral/SLMoralTrade.sleela)</span></h2>
<div data-u="slmoraltrade slmoraltrade">
<h3 id="SLMoralTrade">SLMoralTrade <span class="pill">class</span></h3>
<p class="desc">The facts of one trade for the Moral Evaluator.</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>endangersLife</code></td><td><span class="sig">boolean endangersLife = false</span></td><td class="desc">The facts of one trade, set by the caller. Defaults describe an exemplary trade, so a test changes only the one fact it wants to break.</td></tr>
<tr><td><code>humanIsEnd</code></td><td><span class="sig">boolean humanIsEnd = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>consent</code></td><td><span class="sig">boolean consent = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>deceptive</code></td><td><span class="sig">boolean deceptive = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>coerced</code></td><td><span class="sig">boolean coerced = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>priceRatio</code></td><td><span class="sig">double priceRatio = 1.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>hasRemedy</code></td><td><span class="sig">boolean hasRemedy = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>thirdPartyHarm</code></td><td><span class="sig">boolean thirdPartyHarm = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>bothBenefit</code></td><td><span class="sig">boolean bothBenefit = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>exploitsUrgency</code></td><td><span class="sig">boolean exploitsUrgency = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>coolingOffHours</code></td><td><span class="sig">double coolingOffHours = 24.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>decisionMinutes</code></td><td><span class="sig">double decisionMinutes = 30.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>timestamped</code></td><td><span class="sig">boolean timestamped = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>termDays</code></td><td><span class="sig">double termDays = 30.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>quoteAgeSeconds</code></td><td><span class="sig">double quoteAgeSeconds = 5.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>tradesPerMinute</code></td><td><span class="sig">double tradesPerMinute = 100.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>listerIdentified</code></td><td><span class="sig">boolean listerIdentified = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>listerStanding</code></td><td><span class="sig">double listerStanding = 0.9</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>listingTruthful</code></td><td><span class="sig">boolean listingTruthful = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>listerProhibited</code></td><td><span class="sig">boolean listerProhibited = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>provenanceKnown</code></td><td><span class="sig">boolean provenanceKnown = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>conflictDisclosed</code></td><td><span class="sig">boolean conflictDisclosed = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>listerCount</code></td><td><span class="sig">int listerCount = 3</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>listerAccountable</code></td><td><span class="sig">boolean listerAccountable = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>inUsBoundary</code></td><td><span class="sig">boolean inUsBoundary = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lawfulSubject</code></td><td><span class="sig">boolean lawfulSubject = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sanctionedCounterparty</code></td><td><span class="sig">boolean sanctionedCounterparty = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>recordsKept</code></td><td><span class="sig">boolean recordsKept = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>feesAccounted</code></td><td><span class="sig">boolean feesAccounted = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>manipulative</code></td><td><span class="sig">boolean manipulative = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>protectionsHonored</code></td><td><span class="sig">boolean protectionsHonored = true</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>respectsUS</code></td><td><span class="sig">boolean respectsUS = true</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>wireSize</code></td><td><span class="sig">int wireSize()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>fromNums</code></td><td><span class="sig">boolean fromNums(double[] n)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>toNums</code></td><td><span class="sig">boolean toNums(double[] n)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slnashbargaining">SLNashBargaining <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/math/SLNashBargaining.sleela)</span></h2>
<div data-u="slnashbargaining slnashbargaining">
<h3 id="SLNashBargaining">SLNashBargaining <span class="pill">class</span></h3>
<p class="desc">Bilateral monopoly & Nash bargaining -- split a known joint surplus by a bargaining-power index over reservation profits.</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>curves</code></td><td><span class="sig">SLJointProfitMax curves</span></td><td class="desc">---- Dependencies (sibling-linked within advantage/math) ----</td></tr>
<tr><td><code>mathlib</code></td><td><span class="sig">SLTradeMath mathlib</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(SLJointProfitMax c)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sellerProfit</code></td><td><span class="sig">double sellerProfit(double price, double q)</span></td><td class="desc">Seller profit at wholesale price P and quantity Q: (P*Q) - C_S(Q).</td></tr>
<tr><td><code>buyerProfit</code></td><td><span class="sig">double buyerProfit(double price, double q)</span></td><td class="desc">Buyer profit at wholesale price P and quantity Q: R_B(Q) - (P*Q).</td></tr>
<tr><td><code>nashObjective</code></td><td><span class="sig">double nashObjective(double price, double q, double s0, double b0, double alpha)</span></td><td class="desc">The Nash objective at a candidate price. Both surpluses must be positive to be inside the bargaining range; outside it the objective is 0.</td></tr>
<tr><td><code>nashPrice</code></td><td><span class="sig">double nashPrice(double s0, double b0, double alpha)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>bargainableSurplus</code></td><td><span class="sig">double bargainableSurplus(double s0, double b0)</span></td><td class="desc">The joint surplus available for bargaining beyond both reservation points.</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe(double s0, double b0, double alpha)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slnegotiationround">SLNegotiationRound <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/network/SLNegotiationRound.sleela)</span></h2>
<div data-u="slnegotiationround slnegotiationround">
<h3 id="SLNegotiationRound">SLNegotiationRound <span class="pill">class</span></h3>
<p class="desc">The performant core of network negotiation. Given a buyer's maximum acceptable price (reservation) and a seller's minimum acceptable price, it finds the zone of possible agreement (ZOPA) and clears a single fair price inside it by a bargaining-power split -- a closed-form step with no search loop, so a whole fan of counterparties clears in O(parties).</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>buyerMax</code></td><td><span class="sig">double buyerMax = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sellerMin</code></td><td><span class="sig">double sellerMin = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>alpha</code></td><td><span class="sig">double alpha = 0.5</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(double sellerMin0, double buyerMax0, double alpha0)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>hasDeal</code></td><td><span class="sig">boolean hasDeal()</span></td><td class="desc">Is there a zone of possible agreement at all?</td></tr>
<tr><td><code>zopa</code></td><td><span class="sig">double zopa()</span></td><td class="desc">Width of the ZOPA (0 if none).</td></tr>
<tr><td><code>clearingPrice</code></td><td><span class="sig">double clearingPrice()</span></td><td class="desc">The cleared fair price inside the ZOPA. 0 if no deal.</td></tr>
<tr><td><code>sellerSurplus</code></td><td><span class="sig">double sellerSurplus()</span></td><td class="desc">Surplus each side keeps at the cleared price.</td></tr>
<tr><td><code>buyerSurplus</code></td><td><span class="sig">double buyerSurplus()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slnetconnector">SLNetConnector <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/connect/SLNetConnector.sleela)</span></h2>
<div data-u="slnetconnector slnetconnector">
<h3 id="SLNetConnector">SLNetConnector <span class="pill">class</span></h3>
<p class="desc">The network-connectivity connector of the CONNECT medium. It models reachability to an endpoint: open a link, probe reachability and latency, account bytes sent, and close. The live socket work defers to a host adapter (slnet_*), consistent with lib/advantage/output/SLAdvantageSink.</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>vocab</code></td><td><span class="sig">SLConnectStatus vocab</span></td><td class="desc">---- Shared medium plumbing ----</td></tr>
<tr><td><code>fault</code></td><td><span class="sig">SLConnectFault fault</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>host</code></td><td><span class="sig">String host = ""</span></td><td class="desc">---- Endpoint state ----</td></tr>
<tr><td><code>port</code></td><td><span class="sig">int port = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>configured</code></td><td><span class="sig">boolean configured = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>open</code></td><td><span class="sig">boolean open = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>reachable</code></td><td><span class="sig">boolean reachable = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastRttMillis</code></td><td><span class="sig">double lastRttMillis = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>bytesSent</code></td><td><span class="sig">int bytesSent = 0</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>configure</code></td><td><span class="sig">int configure(String h, int p)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>openLink</code></td><td><span class="sig">int openLink()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>probe</code></td><td><span class="sig">int probe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>acceptProbe</code></td><td><span class="sig">int acceptProbe(double rttMillis)</span></td><td class="desc">Host-adapter callback: record a measured round-trip time.</td></tr>
<tr><td><code>write</code></td><td><span class="sig">int write(int count)</span></td><td class="desc">Account bytes to write (native: slnet_write). Returns bytes accepted (0 if not open). The real send is a host-adapter responsibility.</td></tr>
<tr><td><code>closeLink</code></td><td><span class="sig">int closeLink()</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>isReachable</code></td><td><span class="sig">boolean isReachable()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getRttMillis</code></td><td><span class="sig">double getRttMillis()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getBytesSent</code></td><td><span class="sig">int getBytesSent()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isNativeReady</code></td><td><span class="sig">boolean isNativeReady()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastFault</code></td><td><span class="sig">SLConnectFault lastFault()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>endpoint</code></td><td><span class="sig">String endpoint()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slnewtonmediantray">SLNewtonMedianTray <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/integration/SLNewtonMedianTray.sleela)</span></h2>
<div data-u="slnewtonmediantray slnewtonmediantray">
<h3 id="SLNewtonMedianTray">SLNewtonMedianTray <span class="pill">class</span></h3>
<p class="desc">Newton median tray -- a median-based enlightenment/insight compartment for the vertical-integration subject.</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>space</code></td><td><span class="sig">SLCompartment space</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>samples</code></td><td><span class="sig">int[] samples</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>cap</code></td><td><span class="sig">int cap</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 lbl, SLIntegrationKind cat, int maxSamples)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getSpace</code></td><td><span class="sig">SLCompartment getSpace()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getCount</code></td><td><span class="sig">int getCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>add</code></td><td><span class="sig">boolean add(int value)</span></td><td class="desc">Add a measurement. Returns true if stored.</td></tr>
<tr><td><code>sortSamples</code></td><td><span class="sig">void sortSamples()</span></td><td class="desc">Insertion sort of the first `count` samples (small trays).</td></tr>
<tr><td><code>median</code></td><td><span class="sig">int median()</span></td><td class="desc">The median sample -- the enlightenment value. For an even count this returns the lower-middle of the two central values (integer convention). 0 if the tray is empty.</td></tr>
<tr><td><code>spread</code></td><td><span class="sig">int spread()</span></td><td class="desc">Spread = max - min (0 if empty); a wide spread tempers confidence.</td></tr>
<tr><td><code>robustness</code></td><td><span class="sig">int robustness()</span></td><td class="desc">Robustness score 1..10: more samples and a tighter spread -> higher. A crude heuristic for how trustworthy the median insight is.</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slnounregistry">SLNounRegistry <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/series/SLNounRegistry.sleela)</span></h2>
<div data-u="slnounregistry slnounregistry">
<h3 id="SLNounRegistry">SLNounRegistry <span class="pill">class</span></h3>
<p class="desc">Shared registry of nouns and noun-carriers inside one declared field of observation, used by every Device Instructor lesson.</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>field</code></td><td><span class="sig">String field = ""</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nouns</code></td><td><span class="sig">String[] nouns = new String[32]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>carriers</code></td><td><span class="sig">String[] carriers = new String[32]</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">int[] values = new int[32]</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 = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>accepted</code></td><td><span class="sig">int accepted = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>refused</code></td><td><span class="sig">int refused = 0</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>declareField</code></td><td><span class="sig">void declareField(String name)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>fieldName</code></td><td><span class="sig">String fieldName()</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>acceptedCount</code></td><td><span class="sig">int acceptedCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>refusedCount</code></td><td><span class="sig">int refusedCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nounAt</code></td><td><span class="sig">String nounAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>carrierAt</code></td><td><span class="sig">String carrierAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>indexOf</code></td><td><span class="sig">int indexOf(String noun)</span></td><td class="desc">Returns the index of a noun, or -1 when it is not registered.</td></tr>
<tr><td><code>has</code></td><td><span class="sig">boolean has(String noun)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>register</code></td><td><span class="sig">int register(String noun, String carrier)</span></td><td class="desc">Result codes: 0 accepted, 1 field not declared, 2 noun already placed, 3 registry full, 4 carrier is neither the field nor a registered noun.</td></tr>
<tr><td><code>registerValue</code></td><td><span class="sig">int registerValue(String noun, String carrier, int value)</span></td><td class="desc">Registers a noun that also holds an integer value, for example cents.</td></tr>
<tr><td><code>reason</code></td><td><span class="sig">String reason(int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>carrierOf</code></td><td><span class="sig">String carrierOf(String noun)</span></td><td class="desc">The immediate carrier, or an empty string when the noun is not observed.</td></tr>
<tr><td><code>valueOf</code></td><td><span class="sig">int valueOf(String noun)</span></td><td class="desc">The stored value, or -1 when the noun is not observed. Use has() first when -1 could be a real value.</td></tr>
<tr><td><code>depthOf</code></td><td><span class="sig">int depthOf(String noun)</span></td><td class="desc">Number of hops from the noun up to the field, or -1 when not observed.</td></tr>
<tr><td><code>chain</code></td><td><span class="sig">String chain(String noun)</span></td><td class="desc">The chain from the noun up to the field, for example: order 2 -> order list -> customer-17 -> (field)</td></tr>
<tr><td><code>carries</code></td><td><span class="sig">int carries(String carrier)</span></td><td class="desc">How many nouns this carrier holds directly.</td></tr>
<tr><td><code>totalUnder</code></td><td><span class="sig">int totalUnder(String carrier)</span></td><td class="desc">Sum of the values of every noun this carrier holds, directly or deeper.</td></tr>
<tr><td><code>isUnder</code></td><td><span class="sig">boolean isUnder(String noun, String carrier)</span></td><td class="desc">True when the carrier appears anywhere on the noun chain below the field.</td></tr>
</table>
</div>
<h2 class="section" data-u="slpackage">SLPackage <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/SLPackage.sleela)</span></h2>
<div data-u="slpackage slpackage">
<h3 id="SLPackage">SLPackage <span class="pill">class</span></h3>
<p class="desc">Defines the SLeeLa standard-library package for advantage.</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>packageName</code></td><td><span class="sig">String packageName</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 name)</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>available</code></td><td><span class="sig">boolean available()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slphysicsmath">SLPhysicsMath <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/physics/SLPhysicsMath.sleela)</span></h2>
<div data-u="slphysicsmath slphysicsmath">
<h3 id="SLPhysicsMath">SLPhysicsMath <span class="pill">class</span></h3>
<p class="desc">Self-contained real-valued helpers for the advantage/physics subject (sqrt, exp, ln), named distinctly from the math/ helper to avoid cross-directory class-name ambiguity.</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>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>intToD</code></td><td><span class="sig">double intToD(int n)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expD</code></td><td><span class="sig">double expD(double x)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lnD</code></td><td><span class="sig">double lnD(double y)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>powAB</code></td><td><span class="sig">double powAB(double a, double b)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sqrtD</code></td><td><span class="sig">double sqrtD(double a)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>absD</code></td><td><span class="sig">double absD(double a)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slshortbook">SLShortBook <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/SLShortBook.sleela)</span></h2>
<div data-u="slshortbook slshortbook">
<h3 id="SLShortBook">SLShortBook <span class="pill">class</span></h3>
<p class="desc">A short-only position book of FIFO lots with verbs shortSell, cover, hold and coverAll, integer cents, a per-share-per-day borrow cost, and invariants checked after every action.</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>maxQty</code></td><td><span class="sig">int maxQty = 100000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxPrice</code></td><td><span class="sig">int maxPrice = 10000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxFee</code></td><td><span class="sig">int maxFee = 100000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxTotal</code></td><td><span class="sig">int maxTotal = 4000000000000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxDay</code></td><td><span class="sig">int maxDay = 10000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxRate</code></td><td><span class="sig">int maxRate = 1000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotQty</code></td><td><span class="sig">int[] lotQty = new int[16]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotPrice</code></td><td><span class="sig">int[] lotPrice = new int[16]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotDay</code></td><td><span class="sig">int[] lotDay = new int[16]</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 = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastDay</code></td><td><span class="sig">int lastDay = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>openedQty</code></td><td><span class="sig">int openedQty = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>coveredQty</code></td><td><span class="sig">int coveredQty = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>openedProceeds</code></td><td><span class="sig">int openedProceeds = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>proceedsCovered</code></td><td><span class="sig">int proceedsCovered = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>coverCost</code></td><td><span class="sig">int coverCost = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>feesPaid</code></td><td><span class="sig">int feesPaid = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>borrowRate</code></td><td><span class="sig">int borrowRate = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>borrowPaid</code></td><td><span class="sig">int borrowPaid = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastCoverProceeds</code></td><td><span class="sig">int lastCoverProceeds = 0</span></td><td class="desc">Sale proceeds and profit of the most recent cover, before fees and borrow.</td></tr>
<tr><td><code>lastCoverPnl</code></td><td><span class="sig">int lastCoverPnl = 0</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>maxLots</code></td><td><span class="sig">int maxLots()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>reason</code></td><td><span class="sig">String reason(int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>totalShort</code></td><td><span class="sig">int totalShort()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>proceedsHeld</code></td><td><span class="sig">int proceedsHeld()</span></td><td class="desc">Sale proceeds of the shares still short, in cents.</td></tr>
<tr><td><code>avgSaleFloor</code></td><td><span class="sig">int avgSaleFloor()</span></td><td class="desc">Average sale price per share still short, rounded down, and the remainder.</td></tr>
<tr><td><code>avgSaleRemainder</code></td><td><span class="sig">int avgSaleRemainder()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotCount</code></td><td><span class="sig">int lotCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotQtyAt</code></td><td><span class="sig">int lotQtyAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotPriceAt</code></td><td><span class="sig">int lotPriceAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lotDayAt</code></td><td><span class="sig">int lotDayAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>currentDay</code></td><td><span class="sig">int currentDay()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setBorrowRate</code></td><td><span class="sig">int setBorrowRate(int rate)</span></td><td class="desc">The borrow rate can only change while nothing is short, so no share is ever charged at two rates.</td></tr>
<tr><td><code>shortSell</code></td><td><span class="sig">int shortSell(int day, int qty, int price, int fee)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>cover</code></td><td><span class="sig">int cover(int day, int qty, int price, int fee)</span></td><td class="desc">Cover oldest lots first. Refuses, changing nothing, when the cover is not valid, exceeds the shares short, or would pass a size bound.</td></tr>
<tr><td><code>hold</code></td><td><span class="sig">int hold(int day)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>coverAll</code></td><td><span class="sig">int coverAll(int day, int price, int fee)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>compact</code></td><td><span class="sig">void compact()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>realizedGross</code></td><td><span class="sig">int realizedGross()</span></td><td class="desc">Profit on shares already covered, before fees and borrow cost.</td></tr>
<tr><td><code>realizedNet</code></td><td><span class="sig">int realizedNet()</span></td><td class="desc">Cash view: realizedGross - every fee paid - every borrow cost paid.</td></tr>
<tr><td><code>fees</code></td><td><span class="sig">int fees()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>borrowCostPaid</code></td><td><span class="sig">int borrowCostPaid()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>markToMarket</code></td><td><span class="sig">int markToMarket(int price)</span></td><td class="desc">Gain (positive) or loss (negative) on the shares still short if they were covered at price now: proceeds still held - shares short * price. Returns -(maxTotal + 1) when price is not between 1 and maxPrice.</td></tr>
<tr><td><code>validToday</code></td><td><span class="sig">boolean validToday(int today)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>ageOf</code></td><td><span class="sig">int ageOf(int i, int today)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>oldestAge</code></td><td><span class="sig">int oldestAge(int today)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>weightedAgeFloor</code></td><td><span class="sig">int weightedAgeFloor(int today)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>borrowAccrued</code></td><td><span class="sig">int borrowAccrued(int today)</span></td><td class="desc">Borrow cost accrued so far on the shares still short, not yet paid.</td></tr>
<tr><td><code>qtyOlderThan</code></td><td><span class="sig">int qtyOlderThan(int today, int maxAge)</span></td><td class="desc">Shares short for more than maxAge days.</td></tr>
<tr><td><code>isLongTerm</code></td><td><span class="sig">boolean isLongTerm(int i, int today, int threshold)</span></td><td class="desc">A lot is long term when it is held for MORE than threshold days. Mirrors SLLongBook.isLongTerm exactly: added so a short position has the same term vocabulary as a long one, which it previously lacked.</td></tr>
<tr><td><code>qtyLongTerm</code></td><td><span class="sig">int qtyLongTerm(int today, int threshold)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>invariantsHold</code></td><td><span class="sig">boolean invariantsHold()</span></td><td class="desc">---- Invariants ---- 1 every lot has positive quantity and price; 2 lot days never decrease and never pass the book day; 3 count is within the 16-lot capacity; 4 shares short = shares sold short - shares covered; 5 proceeds held = proceeds opened - proceeds covered.</td></tr>
</table>
</div>
<h2 class="section" data-u="slshortmargin">SLShortMargin <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/SLShortMargin.sleela)</span></h2>
<div data-u="slshortmargin slshortmargin">
<h3 id="SLShortMargin">SLShortMargin <span class="pill">class</span></h3>
<p class="desc">Illustrative margin arithmetic for a short position in exact integers: the ceiling requirement, equity and excess, the deposit needed to meet a call, the fewest shares to cover to restore margin (binary search), and the day a borrow cost first causes a call.</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>maxValue</code></td><td><span class="sig">int maxValue = 4000000000000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxBp</code></td><td><span class="sig">int maxBp = 15000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxShares</code></td><td><span class="sig">int maxShares = 100000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxPrice</code></td><td><span class="sig">int maxPrice = 10000000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxRate</code></td><td><span class="sig">int maxRate = 1000</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxDays</code></td><td><span class="sig">int maxDays = 10000000</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>shortValue</code></td><td><span class="sig">int shortValue(int shares, int price)</span></td><td class="desc">Short value in cents, or -1 when shares or price are outside their bounds.</td></tr>
<tr><td><code>required</code></td><td><span class="sig">int required(int value, int bp)</span></td><td class="desc">Required margin: ceiling of value * bp / 10000, or -1 for an input out of range. The ceiling never rounds in the holder favour.</td></tr>
<tr><td><code>equity</code></td><td><span class="sig">int equity(int collateral, int shares, int price)</span></td><td class="desc">Equity = collateral - short value. May be negative. An input out of range answers -2*maxValue, which no valid equity can reach.</td></tr>
<tr><td><code>inRange</code></td><td><span class="sig">boolean inRange(int collateral, int shares, int price, int bp)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>excess</code></td><td><span class="sig">int excess(int collateral, int shares, int price, int bp)</span></td><td class="desc">Excess = equity - required. Answers -2*maxValue when an input is out of range.</td></tr>
<tr><td><code>callDue</code></td><td><span class="sig">boolean callDue(int collateral, int shares, int price, int bp)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>callAmount</code></td><td><span class="sig">int callAmount(int collateral, int shares, int price, int bp)</span></td><td class="desc">Deposit that restores excess to zero, or 0 when no call is due.</td></tr>
<tr><td><code>enoughAfterCover</code></td><td><span class="sig">boolean enoughAfterCover(int collateral, int shares, int price, int bp, int k)</span></td><td class="desc">True when covering k shares leaves enough equity for the shares still short.</td></tr>
<tr><td><code>sharesToCover</code></td><td><span class="sig">int sharesToCover(int collateral, int shares, int price, int bp)</span></td><td class="desc">Fewest shares to cover so the rest are adequately margined. Returns 0 when no cover is needed, -1 when no cover can help (equity is negative) or the input is out of range. Binary search. Invariant: the answer is in [lo, hi]. enoughAfterCover is monotone in k, because required falls as k grows while equity is fixed. hi - lo strictly shrinks, so the loop ends after about log2(shares) passes.</td></tr>
<tr><td><code>sharesToCoverScan</code></td><td><span class="sig">int sharesToCoverScan(int collateral, int shares, int price, int bp)</span></td><td class="desc">Reference: try k = 0, 1, 2, ... up to shares. Used to cross-check.</td></tr>
<tr><td><code>daysToCall</code></td><td><span class="sig">int daysToCall(int collateral, int shares, int price, int bp, int rate)</span></td><td class="desc">Borrow cost drains collateral by shares * rate each day at a fixed price. The first day d >= 0 on which the excess is negative: 0 when already due, floor(excess / burn) + 1 otherwise. Returns -2 when nothing drains (burn is 0), -3 when the day is beyond maxDays, and -1 for an input out of range.</td></tr>
<tr><td><code>daysToCallScan</code></td><td><span class="sig">int daysToCallScan(int collateral, int shares, int price, int bp, int rate)</span></td><td class="desc">Reference: step one day at a time until the excess is negative.</td></tr>
</table>
</div>
<h2 class="section" data-u="slsophisticationcircuit">SLSophisticationCircuit <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/grading/SLSophisticationCircuit.sleela)</span></h2>
<div data-u="slsophisticationcircuit slsophisticationcircuit">
<h3 id="SLSophisticationCircuit">SLSophisticationCircuit <span class="pill">class</span></h3>
<p class="desc">The sophistication circuit grader -- registers modules, runs the grading circuit, and partitions them into winning/losing/grader/absolute sets with ratings.</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>modules</code></td><td><span class="sig">SLModuleGrade[] modules</span></td><td class="desc">---- Registered modules ----</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>cap</code></td><td><span class="sig">int cap</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>winBar</code></td><td><span class="sig">int winBar</span></td><td class="desc">---- Circuit thresholds ----</td></tr>
<tr><td><code>loseBar</code></td><td><span class="sig">int loseBar</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>absoluteBar</code></td><td><span class="sig">int absoluteBar</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(int capacity, int win, int lose, int absolute)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getWinBar</code></td><td><span class="sig">int getWinBar()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getLoseBar</code></td><td><span class="sig">int getLoseBar()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getAbsoluteBar</code></td><td><span class="sig">int getAbsoluteBar()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>register</code></td><td><span class="sig">void register(SLModuleGrade g)</span></td><td class="desc">Register a pre-built module grade.</td></tr>
<tr><td><code>add</code></td><td><span class="sig">SLModuleGrade add(String label, int score, int role)</span></td><td class="desc">Convenience: build and register a module from name/score/role.</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>moduleAt</code></td><td><span class="sig">SLModuleGrade moduleAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>buildSet</code></td><td><span class="sig">SLGradeSet buildSet(String name, int kind)</span></td><td class="desc">---- Partition the field into a named set by the circuit rules ---- kind: 0 all, 1 winning, 2 losing, 3 grader, 4 absolute.</td></tr>
<tr><td><code>allModules</code></td><td><span class="sig">SLGradeSet allModules()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>winningModules</code></td><td><span class="sig">SLGradeSet winningModules()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>losingModules</code></td><td><span class="sig">SLGradeSet losingModules()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>graderModules</code></td><td><span class="sig">SLGradeSet graderModules()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>absoluteModules</code></td><td><span class="sig">SLGradeSet absoluteModules()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>champion</code></td><td><span class="sig">SLModuleGrade champion()</span></td><td class="desc">The single best module in the field (highest score); null if empty.</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slsqlconnector">SLSqlConnector <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/connect/SLSqlConnector.sleela)</span></h2>
<div data-u="slsqlconnector slsqlconnector">
<h3 id="SLSqlConnector">SLSqlConnector <span class="pill">class</span></h3>
<p class="desc">The MySQL connector of the CONNECT medium. It holds connection coordinates and lifecycle state in the VM, validates every call, and maps to the native MySQL ABI (slsql_* -- mirrors lib/connector/mysql). Query and execute defer to a host adapter (STATUS_NATIVE_ADAPTER_REQUIRED) so no live database is dialed from inside the VM.</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>vocab</code></td><td><span class="sig">SLConnectStatus vocab</span></td><td class="desc">---- Shared medium plumbing ----</td></tr>
<tr><td><code>fault</code></td><td><span class="sig">SLConnectFault fault</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>host</code></td><td><span class="sig">String host = ""</span></td><td class="desc">---- Connection coordinates + lifecycle ----</td></tr>
<tr><td><code>port</code></td><td><span class="sig">int port = 3306</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>user</code></td><td><span class="sig">String user = ""</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>hasSecret</code></td><td><span class="sig">boolean hasSecret = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>database</code></td><td><span class="sig">String database = ""</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>configured</code></td><td><span class="sig">boolean configured = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>open</code></td><td><span class="sig">boolean open = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>execCount</code></td><td><span class="sig">int execCount = 0</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>configure</code></td><td><span class="sig">int configure(String h, int p, String u, boolean secretPresent, String db)</span></td><td class="desc">Set the coordinates. secretPresent is a flag, never the secret itself; the real secret is pinned in the keystore and read by the native adapter.</td></tr>
<tr><td><code>openLink</code></td><td><span class="sig">int openLink()</span></td><td class="desc">Open the link (native: slsql_open). In the VM this validates state and marks the link open; a real connection is a host-adapter responsibility.</td></tr>
<tr><td><code>ping</code></td><td><span class="sig">int ping()</span></td><td class="desc">Liveness check (native: slsql_ping).</td></tr>
<tr><td><code>execute</code></td><td><span class="sig">int execute(String sql)</span></td><td class="desc">Execute a non-query statement (native: slsql_execute). Needs a host adapter.</td></tr>
<tr><td><code>query</code></td><td><span class="sig">int query(String sql)</span></td><td class="desc">Run a row-returning query (native: slsql_query). Needs a host adapter.</td></tr>
<tr><td><code>closeLink</code></td><td><span class="sig">int closeLink()</span></td><td class="desc">Close the link (native: slsql_close). Idempotent.</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>isNativeReady</code></td><td><span class="sig">boolean isNativeReady()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>executeCount</code></td><td><span class="sig">int executeCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastFault</code></td><td><span class="sig">SLConnectFault lastFault()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>coordinate</code></td><td><span class="sig">String coordinate()</span></td><td class="desc">A redacted, log-safe coordinate string -- never the user or secret.</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltallscience">SLTallScience <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/modules/moral/SLTallScience.sleela)</span></h2>
<div data-u="sltallscience sltallscience">
<h3 id="SLTallScience">SLTallScience <span class="pill">class</span></h3>
<p class="desc">Tall Science: the United States held as a cataloged Item.</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>itemName</code></td><td><span class="sig">String itemName = "the United States"</span></td><td class="desc">Tall Science: the United States held as an ITEM in a catalog, with the lists it carries: subject nouns, names, scientific individuals, moral individuals, and its boundary. This is a reference record for judging a trade. Nothing is bought or sold, and no person is profiled: individuals are listed as roles or public-record names supplied by the caller. The nouns and names lists are read respectively: entry i of one pairs with entry i of the other, so they must have the same length.</td></tr>
<tr><td><code>hasItem</code></td><td><span class="sig">boolean hasItem = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>inBoundary</code></td><td><span class="sig">boolean inBoundary = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>respected</code></td><td><span class="sig">boolean respected = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nouns</code></td><td><span class="sig">String[] nouns</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>names</code></td><td><span class="sig">String[] names</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sci</code></td><td><span class="sig">String[] sci</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>mor</code></td><td><span class="sig">String[] mor</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nNouns</code></td><td><span class="sig">int nNouns = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nNames</code></td><td><span class="sig">int nNames = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nSci</code></td><td><span class="sig">int nSci = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nMor</code></td><td><span class="sig">int nMor = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>built</code></td><td><span class="sig">boolean built = false</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>build</code></td><td><span class="sig">void build()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setItemName</code></td><td><span class="sig">void setItemName(String n)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setBoundary</code></td><td><span class="sig">void setBoundary(boolean b)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>setRespected</code></td><td><span class="sig">void setRespected(boolean b)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>declareItem</code></td><td><span class="sig">void declareItem()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>countNouns</code></td><td><span class="sig">int countNouns()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>countNames</code></td><td><span class="sig">int countNames()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>countScientific</code></td><td><span class="sig">int countScientific()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>countMoral</code></td><td><span class="sig">int countMoral()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>canonical</code></td><td><span class="sig">boolean canonical()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>paired</code></td><td><span class="sig">boolean paired()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>register</code></td><td><span class="sig">boolean register(int list, String text)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>seed</code></td><td><span class="sig">void seed()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltechinstallerii">SLTechInstallerII <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/connect/SLTechInstallerII.sleela)</span></h2>
<div data-u="sltechinstallerii sltechinstallerii">
<h3 id="SLTechInstallerII">SLTechInstallerII <span class="pill">class</span></h3>
<p class="desc">Tech Installer II -- a credentialed installer authority that applies the actual Use of the Advantage(TM) System onto an Install Set or a Setting, under ceteris-paribus semantics (hold all else equal: change only what the install declares, leave every unrelated setting untouched). The authority is held by Max Rupplin of MEARVK LLC, North Carolina, 2026 and forward. Installs run through the connect medium and report via status codes and a fault record, never by throwing.</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>holder</code></td><td><span class="sig">String holder = "Max Rupplin"</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>corporation</code></td><td><span class="sig">String corporation = "MEARVK LLC"</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>jurisdiction</code></td><td><span class="sig">String jurisdiction = "North Carolina, United States"</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>tier</code></td><td><span class="sig">String tier = "Tech Installer II"</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>licenceFromYear</code></td><td><span class="sig">int licenceFromYear = 2026</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>licenceToYear</code></td><td><span class="sig">int licenceToYear = 0</span></td><td class="desc">0 means open-ended (2026 and forward)</td></tr>
<tr><td><code>vocab</code></td><td><span class="sig">SLConnectStatus vocab</span></td><td class="desc">---- Shared medium plumbing + install tally ----</td></tr>
<tr><td><code>fault</code></td><td><span class="sig">SLConnectFault fault</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>authorized</code></td><td><span class="sig">boolean authorized = false</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>installSetCount</code></td><td><span class="sig">int installSetCount = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>settingCount</code></td><td><span class="sig">int settingCount = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>noopCount</code></td><td><span class="sig">int noopCount = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastTargetKind</code></td><td><span class="sig">String lastTargetKind = "none"</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastTargetName</code></td><td><span class="sig">String lastTargetName = "none"</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>licenceCoversYear</code></td><td><span class="sig">boolean licenceCoversYear(int year)</span></td><td class="desc">The licence covers a given calendar year (2026+, open-ended).</td></tr>
<tr><td><code>authorize</code></td><td><span class="sig">int authorize(String who, String corp, int year)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>installSet</code></td><td><span class="sig">int installSet(String setName, boolean alreadyPresent)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>applySetting</code></td><td><span class="sig">int applySetting(String settingName, boolean alreadyEqual)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>appliedCount</code></td><td><span class="sig">int appliedCount()</span></td><td class="desc">Total distinct installs actually applied (sets + settings, excluding no-ops).</td></tr>
<tr><td><code>isAuthorized</code></td><td><span class="sig">boolean isAuthorized()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getHolder</code></td><td><span class="sig">String getHolder()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getCorporation2</code></td><td><span class="sig">String getCorporation2()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getJurisdiction</code></td><td><span class="sig">String getJurisdiction()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getTier</code></td><td><span class="sig">String getTier()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getInstallSetCount</code></td><td><span class="sig">int getInstallSetCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getSettingCount</code></td><td><span class="sig">int getSettingCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getNoopCount</code></td><td><span class="sig">int getNoopCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lastFault</code></td><td><span class="sig">SLConnectFault lastFault()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>credential</code></td><td><span class="sig">String credential()</span></td><td class="desc">A log-safe credential card.</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltermpotency">SLTermPotency <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-term-potencies/SLTermPotency.sleela)</span></h2>
<div data-u="sltermpotency sltermpotency">
<h3 id="SLTermPotency">SLTermPotency <span class="pill">class</span></h3>
<p class="desc">Defines 'potency' precisely as two exact ratios over a book's existing age data, overloaded for both SLLongBook and SLShortBook: term potency (the basis-point share of held/short units that have crossed the long-term threshold) and age potency (how close the weighted-average age is to the oldest lot's age), both in basis points so no cent of precision is rounded away.</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>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>termPotencyBp</code></td><td><span class="sig">int termPotencyBp(SLLongBook book, int today, int threshold)</span></td><td class="desc">Term potency in basis points: long-term units / held units, or -1 when today is invalid for the book (see SLLongBook.validToday) or -2 when the book holds nothing (there is no share of nothing to report).</td></tr>
<tr><td><code>agePotencyBp</code></td><td><span class="sig">int agePotencyBp(SLLongBook book, int today)</span></td><td class="desc">Age potency in basis points: weightedAgeFloor / oldestAge. Returns -1 for BOTH a flat book and an invalid today, because SLLongBook.oldestAge itself returns -1 for both of those cases and does not distinguish them (see its own comment); this method does not invent a finer distinction than the book it reads from already makes. 10000 exactly when every held unit shares the oldest lot's day (oldestAge is then 0, a zero/zero case read as full potency: there is only one age present, so the weighted average IS that age).</td></tr>
<tr><td><code>atLeastHalfLongTerm</code></td><td><span class="sig">boolean atLeastHalfLongTerm(SLLongBook book, int today, int threshold)</span></td><td class="desc">Convenience: true when term potency is at or above halfBp (so a caller can ask "is at least half the book long term" without re-deriving the threshold on 5000). Returns false on any invalid/empty input, never a crash or a guess.</td></tr>
<tr><td><code>termPotencyBp</code></td><td><span class="sig">int termPotencyBp(SLShortBook book, int today, int threshold)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>agePotencyBp</code></td><td><span class="sig">int agePotencyBp(SLShortBook book, int today)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>atLeastHalfLongTerm</code></td><td><span class="sig">boolean atLeastHalfLongTerm(SLShortBook book, int today, int threshold)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltrademath">SLTradeMath <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/math/SLTradeMath.sleela)</span></h2>
<div data-u="sltrademath sltrademath">
<h3 id="SLTradeMath">SLTradeMath <span class="pill">class</span></h3>
<p class="desc">Shared real-valued math helpers for the advantage trade subject -- exponential, natural log, and general power.</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>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>intToD</code></td><td><span class="sig">double intToD(int n)</span></td><td class="desc">int -> double coercion that works regardless of implicit promotion.</td></tr>
<tr><td><code>expD</code></td><td><span class="sig">double expD(double x)</span></td><td class="desc">Natural exponential via a truncated Taylor series with range reduction by halving: e^x = (e^(x/2^k))^(2^k).</td></tr>
<tr><td><code>lnD</code></td><td><span class="sig">double lnD(double y)</span></td><td class="desc">Natural logarithm via atanh series: ln(y) = 2*atanh((y-1)/(y+1)), with range reduction pulling y into (0.5, 2) by factoring out e.</td></tr>
<tr><td><code>powAB</code></td><td><span class="sig">double powAB(double a, double b)</span></td><td class="desc">General power a^b for a > 0 via exp(b * ln a). a <= 0 returns 0.</td></tr>
<tr><td><code>sqrtD</code></td><td><span class="sig">double sqrtD(double a)</span></td><td class="desc">Convenience square root (powAB with exponent 0.5).</td></tr>
<tr><td><code>absD</code></td><td><span class="sig">double absD(double a)</span></td><td class="desc">Absolute value for doubles.</td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingaggregation">SLTradingAggregation <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingAggregation.sleela)</span></h2>
<div data-u="sltradingaggregation sltradingaggregation">
<h3 id="SLTradingAggregation">SLTradingAggregation <span class="pill">class</span></h3>
<p class="desc">Fragmented supply aggregation: collect many small items into a cohesive set and sell the set at a premium, pricing the chance it never completes.</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>chk</code></td><td><span class="sig">SLTradingCheck chk</span></td><td class="desc">---- shared validation, created on first use ----</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>check</code></td><td><span class="sig">SLTradingCheck check()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>evaluate</code></td><td><span class="sig">SLTradingResult evaluate(double setValue, double piecemealValuePerItem,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingapproach">SLTradingApproach <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingApproach.sleela)</span></h2>
<div data-u="sltradingapproach sltradingapproach">
<h3 id="SLTradingApproach">SLTradingApproach <span class="pill">class</span></h3>
<p class="desc">One trading approach as a source of leverage: recorded evidence, assumptions held or doubted, and the honest score (mean x confidence x trust).</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>id</code></td><td><span class="sig">String id = ""</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>rewards</code></td><td><span class="sig">double[] rewards</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>baselines</code></td><td><span class="sig">double[] baselines</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 = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>capacity</code></td><td><span class="sig">int capacity = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>assumptionsHeld</code></td><td><span class="sig">int assumptionsHeld = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>assumptionsTotal</code></td><td><span class="sig">int assumptionsTotal = 0</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">boolean configure(String approachId, String approachName, int held, int total)</span></td><td class="desc">The held count must be between 0 and the total. Returns false otherwise.</td></tr>
<tr><td><code>getId</code></td><td><span class="sig">String getId()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getName</code></td><td><span class="sig">String getName()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getCount</code></td><td><span class="sig">int getCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getAssumptionsHeld</code></td><td><span class="sig">int getAssumptionsHeld()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getAssumptionsTotal</code></td><td><span class="sig">int getAssumptionsTotal()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>finiteNumber</code></td><td><span class="sig">boolean finiteNumber(double v)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>addObservation</code></td><td><span class="sig">boolean addObservation(double reward, double baseline)</span></td><td class="desc">Record one observation. Rejects non-finite values and a full ledger.</td></tr>
<tr><td><code>addTrade</code></td><td><span class="sig">boolean addTrade(SLTradingResult r, double costOfCapital, boolean perUnitCost)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>mean</code></td><td><span class="sig">double mean()</span></td><td class="desc">Mean advantage over the evidence; 0.0 when there is none (unknown).</td></tr>
<tr><td><code>sqrtD</code></td><td><span class="sig">double sqrtD(double x)</span></td><td class="desc">Square root by Newton iteration, so no external math library is needed.</td></tr>
<tr><td><code>spread</code></td><td><span class="sig">double spread()</span></td><td class="desc">Sample standard deviation of the per-observation advantage; 0.0 below 2.</td></tr>
<tr><td><code>confidence</code></td><td><span class="sig">double confidence(double prior)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>trust</code></td><td><span class="sig">double trust()</span></td><td class="desc">Share of the assumptions still held; 1.0 when none are recorded.</td></tr>
<tr><td><code>score</code></td><td><span class="sig">double score(double prior)</span></td><td class="desc">score = mean advantage x confidence x trust</td></tr>
<tr><td><code>cautions</code></td><td><span class="sig">String cautions(double prior, int minEvidence)</span></td><td class="desc">Plain-language reasons the score should be taken with care.</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe(double prior)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingarbitrage">SLTradingArbitrage <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingArbitrage.sleela)</span></h2>
<div data-u="sltradingarbitrage sltradingarbitrage">
<h3 id="SLTradingArbitrage">SLTradingArbitrage <span class="pill">class</span></h3>
<p class="desc">Arbitrage: the same asset at two prices on two venues, net of both-leg fees, slippage, fixed and holding costs, with a break-even sell price.</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>chk</code></td><td><span class="sig">SLTradingCheck chk</span></td><td class="desc">---- shared validation, created on first use ----</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>check</code></td><td><span class="sig">SLTradingCheck check()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>inputsOk</code></td><td><span class="sig">boolean inputsOk(double buyPrice, double sellPrice, double quantity,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>totalCost</code></td><td><span class="sig">double totalCost(double buyPrice, double quantity, double buyFeeRate,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>evaluate</code></td><td><span class="sig">SLTradingResult evaluate(double buyPrice, double sellPrice, double quantity,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>breakeven</code></td><td><span class="sig">double breakeven(double buyPrice, double sellPrice, double quantity,</span></td><td class="desc">Lowest sell price per unit at which the arbitrage breaks even. Returns -1.0 when the inputs are invalid.</td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingasymmetry">SLTradingAsymmetry <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingAsymmetry.sleela)</span></h2>
<div data-u="sltradingasymmetry sltradingasymmetry">
<h3 id="SLTradingAsymmetry">SLTradingAsymmetry <span class="pill">class</span></h3>
<p class="desc">Informational asymmetry: a listing is mislabeled or misunderstood; one evaluation is one candidate, pricing the race and the read.</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>chk</code></td><td><span class="sig">SLTradingCheck chk</span></td><td class="desc">---- shared validation, created on first use ----</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>check</code></td><td><span class="sig">SLTradingCheck check()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>pricesOk</code></td><td><span class="sig">boolean pricesOk(double listedPrice, double estimatedValue)</span></td><td class="desc">Apparent discount = 1 - listed / estimated (0.6 means listed 60 percent below the estimate). Check pricesOk first; discount returns -1000000.0 for invalid prices.</td></tr>
<tr><td><code>discount</code></td><td><span class="sig">double discount(double listedPrice, double estimatedValue)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>evaluate</code></td><td><span class="sig">SLTradingResult evaluate(double listedPrice, double genuineValue,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingcheck">SLTradingCheck <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingCheck.sleela)</span></h2>
<div data-u="sltradingcheck sltradingcheck">
<h3 id="SLTradingCheck">SLTradingCheck <span class="pill">class</span></h3>
<p class="desc">Shared fail-closed validation helpers and finite bounds for the trading models (amount, positive, rate, probability, days, distribution).</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>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>maxAmount</code></td><td><span class="sig">double maxAmount()</span></td><td class="desc">---- finite bounds (same limits as the C core) ----</td></tr>
<tr><td><code>maxHoldDays</code></td><td><span class="sig">double maxHoldDays()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>probTolerance</code></td><td><span class="sig">double probTolerance()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxOutcomes</code></td><td><span class="sig">int maxOutcomes()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxLots</code></td><td><span class="sig">int maxLots()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxComponents</code></td><td><span class="sig">int maxComponents()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isFinite</code></td><td><span class="sig">boolean isFinite(double v)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>isAmount</code></td><td><span class="sig">boolean isAmount(double v)</span></td><td class="desc">finite and 0 up to the amount cap</td></tr>
<tr><td><code>isPositive</code></td><td><span class="sig">boolean isPositive(double v)</span></td><td class="desc">finite and strictly above 0, up to the amount cap</td></tr>
<tr><td><code>isRate</code></td><td><span class="sig">boolean isRate(double v)</span></td><td class="desc">finite, 0 up to but not including 1</td></tr>
<tr><td><code>isProb</code></td><td><span class="sig">boolean isProb(double v)</span></td><td class="desc">finite, 0 up to and including 1</td></tr>
<tr><td><code>isDays</code></td><td><span class="sig">boolean isDays(double v)</span></td><td class="desc">finite, 0 up to the maximum holding time</td></tr>
<tr><td><code>isDistribution</code></td><td><span class="sig">boolean isDistribution(double[] p, int n)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>fail</code></td><td><span class="sig">SLTradingResult fail(String why)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>rangeMessage</code></td><td><span class="sig">String rangeMessage()</span></td><td class="desc">Standard messages, shared so every model words its rejections the same.</td></tr>
<tr><td><code>distributionMessage</code></td><td><span class="sig">String distributionMessage()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>countMessage</code></td><td><span class="sig">String countMessage()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>finish</code></td><td><span class="sig">SLTradingResult finish(double totalCost, double proceeds, double holdDays)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingconsignment">SLTradingConsignment <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingConsignment.sleela)</span></h2>
<div data-u="sltradingconsignment sltradingconsignment">
<h3 id="SLTradingConsignment">SLTradingConsignment <span class="pill">class</span></h3>
<p class="desc">Consignment and zero inventory: earn a commission without owning anything, pricing labor and counterparty risk.</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>chk</code></td><td><span class="sig">SLTradingCheck chk</span></td><td class="desc">---- shared validation, created on first use ----</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>check</code></td><td><span class="sig">SLTradingCheck check()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>evaluate</code></td><td><span class="sig">SLTradingResult evaluate(double salePrice, double commissionRate,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingcounsel">SLTradingCounsel <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingCounsel.sleela)</span></h2>
<div data-u="sltradingcounsel sltradingcounsel">
<h3 id="SLTradingCounsel">SLTradingCounsel <span class="pill">class</span></h3>
<p class="desc">Counsel over trading approaches: ranks approaches best-first by their honest score and reports the cautions that go with each.</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>items</code></td><td><span class="sig">SLTradingApproach[] items</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 = 0</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>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>add</code></td><td><span class="sig">boolean add(SLTradingApproach a)</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">SLTradingApproach at(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>rank</code></td><td><span class="sig">int[] rank(double prior)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>line</code></td><td><span class="sig">String line(int position, int[] order, double prior)</span></td><td class="desc">One ranked line for a position in the order returned by rank().</td></tr>
<tr><td><code>cautionsFor</code></td><td><span class="sig">String cautionsFor(int position, int[] order, double prior, int minEvidence)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingdistressed">SLTradingDistressed <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingDistressed.sleela)</span></h2>
<div data-u="sltradingdistressed sltradingdistressed">
<h3 id="SLTradingDistressed">SLTradingDistressed <span class="pill">class</span></h3>
<p class="desc">Distressed inventory and liquidation: buy from a seller who wants speed, pricing the race against institutional liquidators and the unsold remainder.</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>chk</code></td><td><span class="sig">SLTradingCheck chk</span></td><td class="desc">---- shared validation, created on first use ----</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>check</code></td><td><span class="sig">SLTradingCheck check()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>evaluate</code></td><td><span class="sig">SLTradingResult evaluate(double lotPrice, double units,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingmarketmaking">SLTradingMarketMaking <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingMarketMaking.sleela)</span></h2>
<div data-u="sltradingmarketmaking sltradingmarketmaking">
<h3 id="SLTradingMarketMaking">SLTradingMarketMaking <span class="pill">class</span></h3>
<p class="desc">Market making: quote both sides and earn the spread, pricing the case where inventory does not turn over.</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>chk</code></td><td><span class="sig">SLTradingCheck chk</span></td><td class="desc">---- shared validation, created on first use ----</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>check</code></td><td><span class="sig">SLTradingCheck check()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>quoteOk</code></td><td><span class="sig">boolean quoteOk(double fairValue, double halfSpreadRate)</span></td><td class="desc">Symmetric quote around a fair value: bid = fair*(1-h), ask = fair*(1+h).</td></tr>
<tr><td><code>bid</code></td><td><span class="sig">double bid(double fairValue, double halfSpreadRate)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>ask</code></td><td><span class="sig">double ask(double fairValue, double halfSpreadRate)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>evaluate</code></td><td><span class="sig">SLTradingResult evaluate(double bid, double ask, double quantity,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingmomentum">SLTradingMomentum <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingMomentum.sleela)</span></h2>
<div data-u="sltradingmomentum sltradingmomentum">
<h3 id="SLTradingMomentum">SLTradingMomentum <span class="pill">class</span></h3>
<p class="desc">Event-driven momentum: enter on a news or trend shock and exit while demand is elevated, with exit failure as a first-class outcome and hype decay.</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>chk</code></td><td><span class="sig">SLTradingCheck chk</span></td><td class="desc">---- shared validation, created on first use ----</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>check</code></td><td><span class="sig">SLTradingCheck check()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>pow2neg</code></td><td><span class="sig">double pow2neg(double x)</span></td><td class="desc">---- hype decay: remaining = initial * 0.5 ^ (days / halfLife) ---- 2 ^ -x is built from whole halvings plus a short Taylor series for the fractional part, so no external math library is needed.</td></tr>
<tr><td><code>hypeDecay</code></td><td><span class="sig">double hypeDecay(double initialExcess, double halfLifeDays, double days)</span></td><td class="desc">Excess price above baseline left after the given days. Returns -1.0 for invalid input; a real remainder is never negative.</td></tr>
<tr><td><code>evaluate</code></td><td><span class="sig">SLTradingResult evaluate(double entryPrice, double quantity,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingratebudget">SLTradingRateBudget <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingRateBudget.sleela)</span></h2>
<div data-u="sltradingratebudget sltradingratebudget">
<h3 id="SLTradingRateBudget">SLTradingRateBudget <span class="pill">class</span></h3>
<p class="desc">Rate budget: stay inside the rate limit a server publishes by turning the X-RateLimit and Retry-After values into a wait before the next request.</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>limit</code></td><td><span class="sig">double limit = -1.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>remaining</code></td><td><span class="sig">double remaining = -1.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>resetSeconds</code></td><td><span class="sig">double resetSeconds = -1.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>retryAfterSeconds</code></td><td><span class="sig">double retryAfterSeconds = -1.0</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>getLimit</code></td><td><span class="sig">double getLimit()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getRemaining</code></td><td><span class="sig">double getRemaining()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getResetSeconds</code></td><td><span class="sig">double getResetSeconds()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getRetryAfterSeconds</code></td><td><span class="sig">double getRetryAfterSeconds()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>valueOk</code></td><td><span class="sig">boolean valueOk(double v)</span></td><td class="desc">A header value is acceptable when absent (-1.0) or a finite number from 0 up to 1e12. NaN fails every ordered comparison, so it is rejected.</td></tr>
<tr><td><code>observe</code></td><td><span class="sig">boolean observe(double limitValue, double remainingValue,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>secondsUntilReset</code></td><td><span class="sig">double secondsUntilReset(double resetValue, double nowEpochSeconds)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nextDelayMs</code></td><td><span class="sig">double nextDelayMs(double reserve, double minIntervalMs, double maxWaitMs)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>mustStop</code></td><td><span class="sig">boolean mustStop(double reserve, double minIntervalMs, double maxWaitMs)</span></td><td class="desc">True when the required wait is longer than the caller allows: the caller should stop instead of sleeping. Also true when the options are invalid.</td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingrefurbishment">SLTradingRefurbishment <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingRefurbishment.sleela)</span></h2>
<div data-u="sltradingrefurbishment sltradingrefurbishment">
<h3 id="SLTradingRefurbishment">SLTradingRefurbishment <span class="pill">class</span></h3>
<p class="desc">Value-add refurbishment: buy raw or distressed, improve, sell into a higher tier, with the result expressed as a distribution of outcomes.</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>chk</code></td><td><span class="sig">SLTradingCheck chk</span></td><td class="desc">---- shared validation, created on first use ----</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>check</code></td><td><span class="sig">SLTradingCheck check()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>evaluate</code></td><td><span class="sig">SLTradingResult evaluate(double acquirePrice, double quantity,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingregional">SLTradingRegional <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingRegional.sleela)</span></h2>
<div data-u="sltradingregional sltradingregional">
<h3 id="SLTradingRegional">SLTradingRegional <span class="pill">class</span></h3>
<p class="desc">Regional and geofenced arbitrage: buy in one place, move it, sell in another, pricing the chance the move fails or damages the goods.</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>chk</code></td><td><span class="sig">SLTradingCheck chk</span></td><td class="desc">---- shared validation, created on first use ----</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>check</code></td><td><span class="sig">SLTradingCheck check()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>pricesOk</code></td><td><span class="sig">boolean pricesOk(double buyPrice, double sellPrice)</span></td><td class="desc">Regional premium = sell / buy - 1 (0.05 means a 5 percent premium). Check pricesOk first: premium returns -2.0 for invalid prices, and a real premium can never be below -1.</td></tr>
<tr><td><code>premium</code></td><td><span class="sig">double premium(double buyPrice, double sellPrice)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>evaluate</code></td><td><span class="sig">SLTradingResult evaluate(double buyPrice, double sellPrice, double quantity,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingresult">SLTradingResult <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingResult.sleela)</span></h2>
<div data-u="sltradingresult sltradingresult">
<h3 id="SLTradingResult">SLTradingResult <span class="pill">class</span></h3>
<p class="desc">The common evaluation result of every trading model: total cost, expected proceeds, expected profit, return on cost, holding time, plus the advantage bridge (baseline and advantage net of the opportunity cost of capital).</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>ok</code></td><td><span class="sig">boolean ok = false</span></td><td class="desc">---- result state ----</td></tr>
<tr><td><code>error</code></td><td><span class="sig">String error = "not evaluated"</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>totalCost</code></td><td><span class="sig">double totalCost = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectedProceeds</code></td><td><span class="sig">double expectedProceeds = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectedProfit</code></td><td><span class="sig">double expectedProfit = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>returnOnCost</code></td><td><span class="sig">double returnOnCost = 0.0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>holdDays</code></td><td><span class="sig">double holdDays = 0.0</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(double cost, double proceeds, double days)</span></td><td class="desc">Record a successful evaluation. Profit and return on cost are derived.</td></tr>
<tr><td><code>failWith</code></td><td><span class="sig">void failWith(String why)</span></td><td class="desc">Record a rejected evaluation. All numeric fields are reset to zero so a rejected result can never be mistaken for a real one.</td></tr>
<tr><td><code>isOk</code></td><td><span class="sig">boolean isOk()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getError</code></td><td><span class="sig">String getError()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getTotalCost</code></td><td><span class="sig">double getTotalCost()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getExpectedProceeds</code></td><td><span class="sig">double getExpectedProceeds()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getExpectedProfit</code></td><td><span class="sig">double getExpectedProfit()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getReturnOnCost</code></td><td><span class="sig">double getReturnOnCost()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getHoldDays</code></td><td><span class="sig">double getHoldDays()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>rateOk</code></td><td><span class="sig">boolean rateOk(double costOfCapital)</span></td><td class="desc">A cost of capital is a yearly fraction between 0 and 10. NaN fails both comparisons, so it is rejected too.</td></tr>
<tr><td><code>baseline</code></td><td><span class="sig">double baseline(double costOfCapital)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>advantage</code></td><td><span class="sig">double advantage(double costOfCapital)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingsynthetic">SLTradingSynthetic <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingSynthetic.sleela)</span></h2>
<div data-u="sltradingsynthetic sltradingsynthetic">
<h3 id="SLTradingSynthetic">SLTradingSynthetic <span class="pill">class</span></h3>
<p class="desc">Synthetic bundling: turn one thing into many or many into one, with waste and fallback values for what does not sell.</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>chk</code></td><td><span class="sig">SLTradingCheck chk</span></td><td class="desc">---- shared validation, created on first use ----</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>check</code></td><td><span class="sig">SLTradingCheck check()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>evaluate</code></td><td><span class="sig">SLTradingResult evaluate(double inputCost, double fixedCosts,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltradingvirtual">SLTradingVirtual <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/SLTradingVirtual.sleela)</span></h2>
<div data-u="sltradingvirtual sltradingvirtual">
<h3 id="SLTradingVirtual">SLTradingVirtual <span class="pill">class</span></h3>
<p class="desc">Virtual inventory: take payment first and source the item after, pricing fulfilment failure and source price drift.</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>chk</code></td><td><span class="sig">SLTradingCheck chk</span></td><td class="desc">---- shared validation, created on first use ----</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>check</code></td><td><span class="sig">SLTradingCheck check()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>evaluate</code></td><td><span class="sig">SLTradingResult evaluate(double salePrice, double sourcePrice,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltransactionalgeodesic">SLTransactionalGeodesic <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/physics/SLTransactionalGeodesic.sleela)</span></h2>
<div data-u="sltransactionalgeodesic sltransactionalgeodesic">
<h3 id="SLTransactionalGeodesic">SLTransactionalGeodesic <span class="pill">class</span></h3>
<p class="desc">The transactional geodesic -- the shortest transaction path through a trust-warped manifold, via the geodesic equation.</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>tau0</code></td><td><span class="sig">double tau0</span></td><td class="desc">---- Trust field tau(x,y) = tau0 + gx*x + gy*y (clamped) ----</td></tr>
<tr><td><code>gx</code></td><td><span class="sig">double gx</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>gy</code></td><td><span class="sig">double gy</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>configureField</code></td><td><span class="sig">void configureField(double tau0v, double gxv, double gyv)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>tauAt</code></td><td><span class="sig">double tauAt(double x, double y)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>phiX</code></td><td><span class="sig">double phiX(double x, double y)</span></td><td class="desc">phi gradients: phi_x = -0.5 * gx / tau, phi_y = -0.5 * gy / tau.</td></tr>
<tr><td><code>phiY</code></td><td><span class="sig">double phiY(double x, double y)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>acceleration</code></td><td><span class="sig">double[] acceleration(double x, double y, double vx, double vy)</span></td><td class="desc">Acceleration from the geodesic equation, d2x/dl2 = -Gamma(v,v), returned as a flat double[2] = (ax, ay) given position (x,y) and velocity (vx,vy).</td></tr>
<tr><td><code>geodesicLength</code></td><td><span class="sig">double geodesicLength(double x0, double y0, double x1, double y1,</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>euclidean</code></td><td><span class="sig">double euclidean(double x0, double y0, double x1, double y1, SLPhysicsMath m)</span></td><td class="desc">Convenience: the straight-line Euclidean distance (flat-field reference).</td></tr>
<tr><td><code>isStraightLine</code></td><td><span class="sig">boolean isStraightLine(double tol)</span></td><td class="desc">Are Christoffel symbols effectively zero here (uniform trust => flat)?</td></tr>
</table>
</div>
<h2 class="section" data-u="sltrialcompartment">SLTrialCompartment <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/integration/SLTrialCompartment.sleela)</span></h2>
<div data-u="sltrialcompartment sltrialcompartment">
<h3 id="SLTrialCompartment">SLTrialCompartment <span class="pill">class</span></h3>
<p class="desc">Trial compartment -- a study/experiment compartment for the vertical-integration subject.</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>space</code></td><td><span class="sig">SLCompartment space</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>outcomes</code></td><td><span class="sig">int[] outcomes</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>cap</code></td><td><span class="sig">int cap</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 lbl, SLIntegrationKind cat, int maxTrials)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getSpace</code></td><td><span class="sig">SLCompartment getSpace()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getCount</code></td><td><span class="sig">int getCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>logTrial</code></td><td><span class="sig">boolean logTrial(int score)</span></td><td class="desc">Record a trial outcome score. Returns true if recorded (space remained). (Named logTrial, not record: `record` is a reserved SLeeLa keyword.)</td></tr>
<tr><td><code>passing</code></td><td><span class="sig">int passing(int threshold)</span></td><td class="desc">How many recorded trials met or exceeded a pass threshold.</td></tr>
<tr><td><code>successRate</code></td><td><span class="sig">int successRate(int threshold)</span></td><td class="desc">Success rate as a percentage 0..100 at a threshold (0 if no trials).</td></tr>
<tr><td><code>meanScore</code></td><td><span class="sig">int meanScore()</span></td><td class="desc">Mean outcome score (integer division; 0 if no trials).</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltrustdecaysde">SLTrustDecaySDE <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/physics/SLTrustDecaySDE.sleela)</span></h2>
<div data-u="sltrustdecaysde sltrustdecaysde">
<h3 id="SLTrustDecaySDE">SLTrustDecaySDE <span class="pill">class</span></h3>
<p class="desc">Stochastic trust decay -- a CIR mean-reverting diffusion with a Poisson jump for announcement breaches.</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>kappa</code></td><td><span class="sig">double kappa</span></td><td class="desc">---- Parameters ---- mean-reversion speed</td></tr>
<tr><td><code>tauBar</code></td><td><span class="sig">double tauBar</span></td><td class="desc">long-run baseline trust</td></tr>
<tr><td><code>sigma</code></td><td><span class="sig">double sigma</span></td><td class="desc">diffusion (noise) scale</td></tr>
<tr><td><code>delta</code></td><td><span class="sig">double delta</span></td><td class="desc">jump size of a breach (trust lost per jump)</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(double k, double tb, double s, double d)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>clamp</code></td><td><span class="sig">double clamp(double t)</span></td><td class="desc">Keep trust in [0,1] (a trust probability/parameter).</td></tr>
<tr><td><code>step</code></td><td><span class="sig">double step(double tau, double dt, double dW, double dJ, SLPhysicsMath m)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectedStep</code></td><td><span class="sig">double expectedStep(double tau, double dt)</span></td><td class="desc">The deterministic (expected) step: dW=0, no jump. tau_{t+dt} = tau + kappa(tauBar - tau) dt.</td></tr>
<tr><td><code>expectedPath</code></td><td><span class="sig">double expectedPath(double tau0, double dt, int n)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>breach</code></td><td><span class="sig">double breach(double tau)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="sltrustmetric">SLTrustMetric <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/physics/SLTrustMetric.sleela)</span></h2>
<div data-u="sltrustmetric sltrustmetric">
<h3 id="SLTrustMetric">SLTrustMetric <span class="pill">class</span></h3>
<p class="desc">The trust field as a metric tensor g_mu_nu over a 2D economic manifold (operational distance x volume).</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>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>conformalFactor</code></td><td><span class="sig">double conformalFactor(double tau)</span></td><td class="desc">Conformal factor f(tau) = 1/tau. Clamps tiny tau to avoid overflow.</td></tr>
<tr><td><code>metricAt</code></td><td><span class="sig">double[] metricAt(double tau)</span></td><td class="desc">Build the 2x2 metric at a given trust level into a flat double[4].</td></tr>
<tr><td><code>lineElementSq</code></td><td><span class="sig">double lineElementSq(double tau, double dx, double dy)</span></td><td class="desc">Squared line element of displacement (dx,dy) under trust tau: ds^2 = g_xx dx^2 + 2 g_xy dx dy + g_yy dy^2.</td></tr>
<tr><td><code>effectiveDistance</code></td><td><span class="sig">double effectiveDistance(double tau, double dx, double dy, SLPhysicsMath m)</span></td><td class="desc">Effective operational distance (cost to cross) for a straight displacement (dx,dy) under trust tau: sqrt(ds^2) = sqrt(f) * sqrt(dx^2+dy^2). As tau->0 this inflates without bound; as tau->1 it approaches the Euclidean length.</td></tr>
<tr><td><code>warping</code></td><td><span class="sig">double warping(double tau)</span></td><td class="desc">Scalar curvature proxy for this conformal family in 2D: with g = e^{2 phi} I and phi = -0.5 ln(tau), the Gaussian curvature is K = -e^{-2 phi} lap(phi). Here phi depends only on the (constant-in-space) tau, so spatial curvature is 0 for a uniform field; the ECONOMIC curvature we report is the field's departure from flatness, f(tau) - 1 >= 0 (0 at full trust, growing as trust falls). This is the "warping" the analogy cares about.</td></tr>
<tr><td><code>isFlat</code></td><td><span class="sig">boolean isFlat(double tau, double tol)</span></td><td class="desc">Is the field effectively flat (Euclidean) at this trust level?</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe(double tau)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="slverticalintegration">SLVerticalIntegration <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/integration/SLVerticalIntegration.sleela)</span></h2>
<div data-u="slverticalintegration slverticalintegration">
<h3 id="SLVerticalIntegration">SLVerticalIntegration <span class="pill">class</span></h3>
<p class="desc">Vertical integration through capitalism/retail -- an ordered vertical stack of compartment tiers, recursively composable.</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>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>cat</code></td><td><span class="sig">SLIntegrationKind cat</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>tiers</code></td><td><span class="sig">SLCompartment[] tiers</span></td><td class="desc">the vertical stack, index 0 = most upstream</td></tr>
<tr><td><code>tierCount</code></td><td><span class="sig">int tierCount</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>tierCap</code></td><td><span class="sig">int tierCap</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 nm)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getName</code></td><td><span class="sig">String getName()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>catalog</code></td><td><span class="sig">SLIntegrationKind catalog()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>getTierCount</code></td><td><span class="sig">int getTierCount()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>addTier</code></td><td><span class="sig">int addTier(SLCompartment tier)</span></td><td class="desc">Append a tier downstream. Returns its tier index (0 = most upstream).</td></tr>
<tr><td><code>addKind</code></td><td><span class="sig">SLCompartment addKind(String label, int kind)</span></td><td class="desc">Build and append a tier of a given kind in one call; returns the tier.</td></tr>
<tr><td><code>tierAt</code></td><td><span class="sig">SLCompartment tierAt(int i)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>flowDownstream</code></td><td><span class="sig">int flowDownstream(int i, int amount)</span></td><td class="desc">---- Vertical flow: push units from upstream tier i to downstream i+1 ---- Moves up to `amount` used units out of tier i and stores them in tier i+1, limited by what tier i holds and what tier i+1 can accept. Returns moved.</td></tr>
<tr><td><code>runChain</code></td><td><span class="sig">int runChain(int amount)</span></td><td class="desc">Run one full upstream->downstream sweep moving `amount` per hop. Returns the units delivered into the most downstream (retail) tier.</td></tr>
<tr><td><code>totalCompartments</code></td><td><span class="sig">int totalCompartments()</span></td><td class="desc">---- Aggregates over the whole recursive tree ----</td></tr>
<tr><td><code>totalCapacity</code></td><td><span class="sig">int totalCapacity()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>totalUsed</code></td><td><span class="sig">int totalUsed()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>totalRelevance</code></td><td><span class="sig">int totalRelevance()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>maxDepth</code></td><td><span class="sig">int maxDepth()</span></td><td class="desc">Maximum recursion depth across all tiers (how deep the nesting goes).</td></tr>
<tr><td><code>sophistication</code></td><td><span class="sig">int sophistication()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>utilization</code></td><td><span class="sig">int utilization()</span></td><td class="desc">Utilization percentage of the whole tree (0 if no capacity).</td></tr>
<tr><td><code>describe</code></td><td><span class="sig">String describe()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>emitThrough</code></td><td><span class="sig">void emitThrough(SLAdvantageEmitter em)</span></td><td class="desc">Report this model through an output emitter (terminal / commonrails / socket / silent); the emitter and its sink decide the destination.</td></tr>
</table>
</div>
<h2 class="section" data-u="smartphone-trade">smartphone-trade <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/professional/network-trades/smartphone-trade.sleela)</span></h2>
<div data-u="smartphone-trade smartphonetrade">
<h3 id="SmartphoneTrade">SmartphoneTrade <span class="pill">class</span></h3>
<p class="desc">NETWORK-TRADE 11 of 12 -- SMARTPHONE. Scout a network of venue quotes, pick the cheapest buy and dearest sell, negotiate a fair clearing price, and emit a cash receipt. Rung: a finished consumer device; distribution-scale volume.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="solar-panel-trade">solar-panel-trade <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/advanced/network-trades/solar-panel-trade.sleela)</span></h2>
<div data-u="solar-panel-trade solarpaneltrade">
<h3 id="SolarPanelTrade">SolarPanelTrade <span class="pill">class</span></h3>
<p class="desc">NETWORK-TRADE 07 of 12 -- SOLAR-PANEL. Scout a network of venue quotes, pick the cheapest buy and dearest sell, negotiate a fair clearing price, and emit a cash receipt. Rung: a manufactured good; seller-leaning power (alpha=0.6).</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="steel-coil-trade">steel-coil-trade <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/medium/network-trades/steel-coil-trade.sleela)</span></h2>
<div data-u="steel-coil-trade steelcoiltrade">
<h3 id="SteelCoilTrade">SteelCoilTrade <span class="pill">class</span></h3>
<p class="desc">NETWORK-TRADE 04 of 12 -- STEEL-COIL. Scout a network of venue quotes, pick the cheapest buy and dearest sell, negotiate a fair clearing price, and emit a cash receipt. Rung: heavy stock where TIME costs real carry per unit per day.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed01coppercoins">TaMed01Coppercoins <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/01-copper-coins/TaMed01Coppercoins.sleela)</span></h2>
<div data-u="tamed01coppercoins tamed01coppercoins">
<h3 id="TaMed01Coppercoins">TaMed01Coppercoins <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 1: copper coins, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed02silvertradingtokens">TaMed02Silvertradingtokens <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/02-silver-tokens/TaMed02Silvertradingtokens.sleela)</span></h2>
<div data-u="tamed02silvertradingtokens tamed02silvertradingtokens">
<h3 id="TaMed02Silvertradingtokens">TaMed02Silvertradingtokens <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 2: silver trading tokens, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed03goldgamechips">TaMed03Goldgamechips <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/03-gold-chips/TaMed03Goldgamechips.sleela)</span></h2>
<div data-u="tamed03goldgamechips tamed03goldgamechips">
<h3 id="TaMed03Goldgamechips">TaMed03Goldgamechips <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 3: gold game chips, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed04brassrounds">TaMed04Brassrounds <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/04-brass-rounds/TaMed04Brassrounds.sleela)</span></h2>
<div data-u="tamed04brassrounds tamed04brassrounds">
<h3 id="TaMed04Brassrounds">TaMed04Brassrounds <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 4: brass rounds, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed05bronzetradingmedals">TaMed05Bronzetradingmedals <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/05-bronze-medals/TaMed05Bronzetradingmedals.sleela)</span></h2>
<div data-u="tamed05bronzetradingmedals tamed05bronzetradingmedals">
<h3 id="TaMed05Bronzetradingmedals">TaMed05Bronzetradingmedals <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 5: bronze trading medals, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed06nickelblanks">TaMed06Nickelblanks <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/06-nickel-blanks/TaMed06Nickelblanks.sleela)</span></h2>
<div data-u="tamed06nickelblanks tamed06nickelblanks">
<h3 id="TaMed06Nickelblanks">TaMed06Nickelblanks <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 6: nickel blanks, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed07tinpucks">TaMed07Tinpucks <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/07-tin-pucks/TaMed07Tinpucks.sleela)</span></h2>
<div data-u="tamed07tinpucks tamed07tinpucks">
<h3 id="TaMed07Tinpucks">TaMed07Tinpucks <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 7: tin pucks, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed08zincslugs">TaMed08Zincslugs <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/08-zinc-slugs/TaMed08Zincslugs.sleela)</span></h2>
<div data-u="tamed08zincslugs tamed08zincslugs">
<h3 id="TaMed08Zincslugs">TaMed08Zincslugs <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 8: zinc slugs, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed09steelwashers">TaMed09Steelwashers <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/09-steel-washers/TaMed09Steelwashers.sleela)</span></h2>
<div data-u="tamed09steelwashers tamed09steelwashers">
<h3 id="TaMed09Steelwashers">TaMed09Steelwashers <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 9: steel washers, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed10platinumfoils">TaMed10Platinumfoils <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/10-platinum-foils/TaMed10Platinumfoils.sleela)</span></h2>
<div data-u="tamed10platinumfoils tamed10platinumfoils">
<h3 id="TaMed10Platinumfoils">TaMed10Platinumfoils <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 10: platinum foils, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed11titaniumtabs">TaMed11Titaniumtabs <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/11-titanium-tabs/TaMed11Titaniumtabs.sleela)</span></h2>
<div data-u="tamed11titaniumtabs tamed11titaniumtabs">
<h3 id="TaMed11Titaniumtabs">TaMed11Titaniumtabs <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 11: titanium tabs, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed12irontags">TaMed12Irontags <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/12-iron-tags/TaMed12Irontags.sleela)</span></h2>
<div data-u="tamed12irontags tamed12irontags">
<h3 id="TaMed12Irontags">TaMed12Irontags <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 12: iron tags, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed13quartzcountingchips">TaMed13Quartzcountingchips <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/13-quartz-chips/TaMed13Quartzcountingchips.sleela)</span></h2>
<div data-u="tamed13quartzcountingchips tamed13quartzcountingchips">
<h3 id="TaMed13Quartzcountingchips">TaMed13Quartzcountingchips <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 13: quartz counting chips, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed14obsidiantradingflakes">TaMed14Obsidiantradingflakes <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/14-obsidian-flakes/TaMed14Obsidiantradingflakes.sleela)</span></h2>
<div data-u="tamed14obsidiantradingflakes tamed14obsidiantradingflakes">
<h3 id="TaMed14Obsidiantradingflakes">TaMed14Obsidiantradingflakes <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 14: obsidian trading flakes, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed15granitecounters">TaMed15Granitecounters <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/15-granite-counters/TaMed15Granitecounters.sleela)</span></h2>
<div data-u="tamed15granitecounters tamed15granitecounters">
<h3 id="TaMed15Granitecounters">TaMed15Granitecounters <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 15: granite counters, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed16slatemarkers">TaMed16Slatemarkers <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/16-slate-markers/TaMed16Slatemarkers.sleela)</span></h2>
<div data-u="tamed16slatemarkers tamed16slatemarkers">
<h3 id="TaMed16Slatemarkers">TaMed16Slatemarkers <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 16: slate markers, a short-horizon active trade (two buys, one sell), checked against the daily action cap of 2000.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed17dailycapboundary">TaMed17DailyCapBoundary <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/17-daily-cap-boundary/TaMed17DailyCapBoundary.sleela)</span></h2>
<div data-u="tamed17dailycapboundary tamed17dailycapboundary">
<h3 id="TaMed17DailyCapBoundary">TaMed17DailyCapBoundary <span class="pill">class</span></h3>
<p class="desc">The 2,000-actions-per-day rule proved at its boundary: the 2000th action on a day succeeds, the 2001st is refused unchanged, and a new day resets the count.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed18shortcoins">TaMed18ShortCoins <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/18-short-coins/TaMed18ShortCoins.sleela)</span></h2>
<div data-u="tamed18shortcoins tamed18shortcoins">
<h3 id="TaMed18ShortCoins">TaMed18ShortCoins <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 18: short-sold trading coins, a short-horizon active SHORT trade (two short-sells, one cover), checked against the daily action cap of 2000 and borrow cost.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapShortBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed19shorttokens">TaMed19ShortTokens <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/19-short-tokens/TaMed19ShortTokens.sleela)</span></h2>
<div data-u="tamed19shorttokens tamed19shorttokens">
<h3 id="TaMed19ShortTokens">TaMed19ShortTokens <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 19: short-sold game tokens, a short-horizon active SHORT trade (two short-sells, one cover), checked against the daily action cap of 2000 and borrow cost.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapShortBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tamed20shortchips">TaMed20ShortChips <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-medium-averages/20-short-chips/TaMed20ShortChips.sleela)</span></h2>
<div data-u="tamed20shortchips tamed20shortchips">
<h3 id="TaMed20ShortChips">TaMed20ShortChips <span class="pill">class</span></h3>
<p class="desc">Medium-term entry 20: short-sold collector chips, a short-horizon active SHORT trade (two short-sells, one cover), checked against the daily action cap of 2000 and borrow cost.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLDailyCapShortBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tapotency01agesasthebookages">TaPotency01AgesAsTheBookAges <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-term-potencies/01-ages-as-the-book-ages/TaPotency01AgesAsTheBookAges.sleela)</span></h2>
<div data-u="tapotency01agesasthebookages tapotency01agesasthebookages">
<h3 id="TaPotency01AgesAsTheBookAges">TaPotency01AgesAsTheBookAges <span class="pill">class</span></h3>
<p class="desc">Entry 1: term potency and age potency measured at three checkpoints as a two-lot portfolio crosses the long-term threshold.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tapotency02fifosellandpotency">TaPotency02FifoSellAndPotency <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-term-potencies/02-fifo-sell-and-potency/TaPotency02FifoSellAndPotency.sleela)</span></h2>
<div data-u="tapotency02fifosellandpotency tapotency02fifosellandpotency">
<h3 id="TaPotency02FifoSellAndPotency">TaPotency02FifoSellAndPotency <span class="pill">class</span></h3>
<p class="desc">Entry 2: a FIFO sell of an entire lot removes that lot's contribution to both term potency and age potency, shown as an exact before/after comparison.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tapotency03honestemptyandinvalid">TaPotency03HonestEmptyAndInvalid <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-term-potencies/03-honest-empty-and-invalid/TaPotency03HonestEmptyAndInvalid.sleela)</span></h2>
<div data-u="tapotency03honestemptyandinvalid tapotency03honestemptyandinvalid">
<h3 id="TaPotency03HonestEmptyAndInvalid">TaPotency03HonestEmptyAndInvalid <span class="pill">class</span></h3>
<p class="desc">Entry 3: term potency and age potency on an empty book and on an invalid ('before the book day') today, each answered honestly rather than guessed.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tapotency04crosscheckedportfolios">TaPotency04CrossCheckedPortfolios <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-term-potencies/04-cross-checked-portfolios/TaPotency04CrossCheckedPortfolios.sleela)</span></h2>
<div data-u="tapotency04crosscheckedportfolios tapotency04crosscheckedportfolios">
<h3 id="TaPotency04CrossCheckedPortfolios">TaPotency04CrossCheckedPortfolios <span class="pill">class</span></h3>
<p class="desc">Entry 4: ten randomly generated portfolios, each checked against an independent Python model of the same term-potency and age-potency formulas.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tapotency05shortsidemirror">TaPotency05ShortSideMirror <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-term-potencies/05-short-side-mirror/TaPotency05ShortSideMirror.sleela)</span></h2>
<div data-u="tapotency05shortsidemirror tapotency05shortsidemirror">
<h3 id="TaPotency05ShortSideMirror">TaPotency05ShortSideMirror <span class="pill">class</span></h3>
<p class="desc">Entry 5: the short-side overloads of term potency and age potency, mirroring entry 1's exact lot structure and ages, confirming the formulas give identical readings on either book shape.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLShortBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tapotency06shortsidehonestyandcover">TaPotency06ShortSideHonestyAndCover <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/learner-vs-professional/courseware/long-term-potencies/06-short-side-honesty-and-cover/TaPotency06ShortSideHonestyAndCover.sleela)</span></h2>
<div data-u="tapotency06shortsidehonestyandcover tapotency06shortsidehonestyandcover">
<h3 id="TaPotency06ShortSideHonestyAndCover">TaPotency06ShortSideHonestyAndCover <span class="pill">class</span></h3>
<p class="desc">Entry 6: honest -1/-2 answers for an empty short book and an invalid day, then a FIFO cover removing the oldest short's whole contribution to both potencies, mirroring entries 2 and 3 on the short side.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLShortBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause01openandadd">TaUse01OpenAndAdd <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/01-open-and-add/TaUse01OpenAndAdd.sleela)</span></h2>
<div data-u="tause01openandadd tause01openandadd">
<h3 id="TaUse01OpenAndAdd">TaUse01OpenAndAdd <span class="pill">class</span></h3>
<p class="desc">Trading long, open then add: buy verbs build FIFO lots and an average cost with an exact remainder.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause02trimrealizedpnl">TaUse02TrimRealizedPnl <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/02-trim-realized-pnl/TaUse02TrimRealizedPnl.sleela)</span></h2>
<div data-u="tause02trimrealizedpnl tause02trimrealizedpnl">
<h3 id="TaUse02TrimRealizedPnl">TaUse02TrimRealizedPnl <span class="pill">class</span></h3>
<p class="desc">Trading long, trim: a partial sell consumes the oldest lot first and realizes profit on exactly that cost.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause03flattenandreconcile">TaUse03FlattenAndReconcile <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/03-flatten-and-reconcile/TaUse03FlattenAndReconcile.sleela)</span></h2>
<div data-u="tause03flattenandreconcile tause03flattenandreconcile">
<h3 id="TaUse03FlattenAndReconcile">TaUse03FlattenAndReconcile <span class="pill">class</span></h3>
<p class="desc">Trading long, flatten: the last sell empties the book and total profit reconciles to proceeds minus cost minus fees.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause04refuseshortandbadinput">TaUse04RefuseShortAndBadInput <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/04-refuse-short-and-bad-input/TaUse04RefuseShortAndBadInput.sleela)</span></h2>
<div data-u="tause04refuseshortandbadinput tause04refuseshortandbadinput">
<h3 id="TaUse04RefuseShortAndBadInput">TaUse04RefuseShortAndBadInput <span class="pill">class</span></h3>
<p class="desc">Trading long, refusals: a sell above the holding, bad quantity, bad price, backwards day and flat sells are refused and the book never changes.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sQty</code></td><td><span class="sig">int sQty = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sCost</code></td><td><span class="sig">int sCost = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sFees</code></td><td><span class="sig">int sFees = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sDay</code></td><td><span class="sig">int sDay = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sLots</code></td><td><span class="sig">int sLots = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>take</code></td><td><span class="sig">void take(SLLongBook b)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>same</code></td><td><span class="sig">boolean same(SLLongBook b)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause05lotratiobyeuclid">TaUse05LotRatioByEuclid <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/05-lot-ratio-by-euclid/TaUse05LotRatioByEuclid.sleela)</span></h2>
<div data-u="tause05lotratiobyeuclid tause05lotratiobyeuclid">
<h3 id="TaUse05LotRatioByEuclid">TaUse05LotRatioByEuclid <span class="pill">class</span></h3>
<p class="desc">Trading long, order ratios: Euclid loop reduces a basket of order sizes to the smallest whole-number ratio, showing every remainder step.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause06roundlotfillandbezout">TaUse06RoundLotFillAndBezout <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/06-round-lot-fill-and-bezout/TaUse06RoundLotFillAndBezout.sleela)</span></h2>
<div data-u="tause06roundlotfillandbezout tause06roundlotfillandbezout">
<h3 id="TaUse06RoundLotFillAndBezout">TaUse06RoundLotFillAndBezout <span class="pill">class</span></h3>
<p class="desc">Trading long, exact fills: the gcd test is necessary but not sufficient for filling an order with two round-lot sizes; Bezout coefficients prove the gcd.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause07rebalancedistance">TaUse07RebalanceDistance <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/07-rebalance-distance/TaUse07RebalanceDistance.sleela)</span></h2>
<div data-u="tause07rebalancedistance tause07rebalancedistance">
<h3 id="TaUse07RebalanceDistance">TaUse07RebalanceDistance <span class="pill">class</span></h3>
<p class="desc">Trading long, rebalancing: squared Euclidean distance and an integer square root pick the nearest of several target portfolios, with ties to the first.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause08holdingdays">TaUse08HoldingDays <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/08-holding-days/TaUse08HoldingDays.sleela)</span></h2>
<div data-u="tause08holdingdays tause08holdingdays">
<h3 id="TaUse08HoldingDays">TaUse08HoldingDays <span class="pill">class</span></h3>
<p class="desc">Time on long, age: a lot's age is today minus its buy day; time may pass with hold but never run backwards.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause09fifoaging">TaUse09FifoAging <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/09-fifo-aging/TaUse09FifoAging.sleela)</span></h2>
<div data-u="tause09fifoaging tause09fifoaging">
<h3 id="TaUse09FifoAging">TaUse09FifoAging <span class="pill">class</span></h3>
<p class="desc">Time on long, FIFO: a sell consumes the oldest lots first, so what remains is younger and the ages are exact.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause10weightedaverageage">TaUse10WeightedAverageAge <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/10-weighted-average-age/TaUse10WeightedAverageAge.sleela)</span></h2>
<div data-u="tause10weightedaverageage tause10weightedaverageage">
<h3 id="TaUse10WeightedAverageAge">TaUse10WeightedAverageAge <span class="pill">class</span></h3>
<p class="desc">Time on long, weighted age: the quantity-weighted average holding period is exact when divisible and a floor otherwise.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause11termboundary">TaUse11TermBoundary <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/11-term-boundary/TaUse11TermBoundary.sleela)</span></h2>
<div data-u="tause11termboundary tause11termboundary">
<h3 id="TaUse11TermBoundary">TaUse11TermBoundary <span class="pill">class</span></h3>
<p class="desc">Time on long, short term versus long term: a lot is long term only when held MORE than the threshold, so day 365 is still short.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause12timestop">TaUse12TimeStop <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/12-time-stop/TaUse12TimeStop.sleela)</span></h2>
<div data-u="tause12timestop tause12timestop">
<h3 id="TaUse12TimeStop">TaUse12TimeStop <span class="pill">class</span></h3>
<p class="desc">Time on long, time stop: a loop sells every share held longer than a limit; it must end because the old quantity strictly falls.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause13fulllifecycle">TaUse13FullLifecycle <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/13-full-lifecycle/TaUse13FullLifecycle.sleela)</span></h2>
<div data-u="tause13fulllifecycle tause13fulllifecycle">
<h3 id="TaUse13FullLifecycle">TaUse13FullLifecycle <span class="pill">class</span></h3>
<p class="desc">Trading long over time: buys, a hold, a trim, a long-term sale and a flatten, with invariants after every action and an independent reconciliation.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause14differentialstress">TaUse14DifferentialStress <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/14-differential-stress/TaUse14DifferentialStress.sleela)</span></h2>
<div data-u="tause14differentialstress tause14differentialstress">
<h3 id="TaUse14DifferentialStress">TaUse14DifferentialStress <span class="pill">class</span></h3>
<p class="desc">Trading long, differential stress: 1200 random verbs are run against SLLongBook and against an independent per-share shadow model, and every observable must agree after every step.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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 = 1</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sp</code></td><td><span class="sig">int[] sp = new int[6000]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sd</code></td><td><span class="sig">int[] sd = new int[6000]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sl</code></td><td><span class="sig">int[] sl = new int[6000]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>m</code></td><td><span class="sig">int m = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shLast</code></td><td><span class="sig">int shLast = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>seq</code></td><td><span class="sig">int seq = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shGross</code></td><td><span class="sig">int shGross = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shFees</code></td><td><span class="sig">int shFees = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>tally</code></td><td><span class="sig">int[] tally = new int[9]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>mismatches</code></td><td><span class="sig">int mismatches = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>book</code></td><td><span class="sig">SLLongBook book = new SLLongBook()</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nextRaw</code></td><td><span class="sig">int nextRaw()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>rnd</code></td><td><span class="sig">int rnd(int n)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shLots</code></td><td><span class="sig">int shLots()</span></td><td class="desc">Distinct buys that still hold shares, counted from the per-share ids.</td></tr>
<tr><td><code>shBuy</code></td><td><span class="sig">int shBuy(int day, int qty, int price, int fee)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shSell</code></td><td><span class="sig">int shSell(int day, int qty, int price, int fee)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shCost</code></td><td><span class="sig">int shCost()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shAgeSum</code></td><td><span class="sig">int shAgeSum()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>agrees</code></td><td><span class="sig">boolean agrees()</span></td><td class="desc">After every step the real book and the shadow must agree on everything observable, and a refused verb must have changed nothing.</td></tr>
<tr><td><code>runSeed</code></td><td><span class="sig">void runSeed(int seed, int steps, int bu, int su, int hu)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause15euclidexhaustive">TaUse15EuclidExhaustive <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/15-euclid-exhaustive/TaUse15EuclidExhaustive.sleela)</span></h2>
<div data-u="tause15euclidexhaustive tause15euclidexhaustive">
<h3 id="TaUse15EuclidExhaustive">TaUse15EuclidExhaustive <span class="pill">class</span></h3>
<p class="desc">Euclid, exhaustively: gcd, lcm, Bezout, integer square root, closed-form fills and distance are each checked against a slower independent method over every small case.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>brute</code></td><td><span class="sig">int brute(int a, int b)</span></td><td class="desc">Brute-force gcd: try every divisor from the larger input downwards.</td></tr>
<tr><td><code>linearRoot</code></td><td><span class="sig">int linearRoot(int n)</span></td><td class="desc">Linear floor square root: grow r while the next square still fits.</td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause16shortopenandadd">TaUse16ShortOpenAndAdd <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/16-short-open-and-add/TaUse16ShortOpenAndAdd.sleela)</span></h2>
<div data-u="tause16shortopenandadd tause16shortopenandadd">
<h3 id="TaUse16ShortOpenAndAdd">TaUse16ShortOpenAndAdd <span class="pill">class</span></h3>
<p class="desc">Trading short, open then add: shortSell verbs build FIFO lots and an average sale price with an exact remainder.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act2</code></td><td><span class="sig">void act2(SLShortBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause17coverrealizedpnl">TaUse17CoverRealizedPnl <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/17-cover-realized-pnl/TaUse17CoverRealizedPnl.sleela)</span></h2>
<div data-u="tause17coverrealizedpnl tause17coverrealizedpnl">
<h3 id="TaUse17CoverRealizedPnl">TaUse17CoverRealizedPnl <span class="pill">class</span></h3>
<p class="desc">Trading short, cover: a partial cover takes the oldest lot first, profit is sale price minus cover price, and borrow cost is charged for the days short.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act2</code></td><td><span class="sig">void act2(SLShortBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause18refuselongandbadinput">TaUse18RefuseLongAndBadInput <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/18-refuse-long-and-bad-input/TaUse18RefuseLongAndBadInput.sleela)</span></h2>
<div data-u="tause18refuselongandbadinput tause18refuselongandbadinput">
<h3 id="TaUse18RefuseLongAndBadInput">TaUse18RefuseLongAndBadInput <span class="pill">class</span></h3>
<p class="desc">Trading short, refusals: a cover above the shares short, bad inputs, a rate change while short and covers from flat are refused and the book never changes.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sQty</code></td><td><span class="sig">int sQty = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sProceeds</code></td><td><span class="sig">int sProceeds = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sFees</code></td><td><span class="sig">int sFees = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sDay</code></td><td><span class="sig">int sDay = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sBorrow</code></td><td><span class="sig">int sBorrow = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>take</code></td><td><span class="sig">void take(SLShortBook b)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>same</code></td><td><span class="sig">boolean same(SLShortBook b)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act2</code></td><td><span class="sig">void act2(SLShortBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause19lossasymmetry">TaUse19LossAsymmetry <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/19-loss-asymmetry/TaUse19LossAsymmetry.sleela)</span></h2>
<div data-u="tause19lossasymmetry tause19lossasymmetry">
<h3 id="TaUse19LossAsymmetry">TaUse19LossAsymmetry <span class="pill">class</span></h3>
<p class="desc">Long versus short risk: a long loss is capped by its cost, a short loss is not capped by its proceeds; markToMarket shows the open loss before any cover.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act2</code></td><td><span class="sig">void act2(SLShortBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause20borrowcostandtimestop">TaUse20BorrowCostAndTimeStop <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/20-borrow-cost-and-time-stop/TaUse20BorrowCostAndTimeStop.sleela)</span></h2>
<div data-u="tause20borrowcostandtimestop tause20borrowcostandtimestop">
<h3 id="TaUse20BorrowCostAndTimeStop">TaUse20BorrowCostAndTimeStop <span class="pill">class</span></h3>
<p class="desc">Time on short: borrow cost is exact per share-day, accrues on open lots, is paid on cover, and a time stop covers shares short too long.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act2</code></td><td><span class="sig">void act2(SLShortBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause21shortdifferentialstress">TaUse21ShortDifferentialStress <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/21-short-differential-stress/TaUse21ShortDifferentialStress.sleela)</span></h2>
<div data-u="tause21shortdifferentialstress tause21shortdifferentialstress">
<h3 id="TaUse21ShortDifferentialStress">TaUse21ShortDifferentialStress <span class="pill">class</span></h3>
<p class="desc">Trading short, differential stress: 1,200 random verbs against SLShortBook and an independent per-share shadow with borrow cost; every observable agrees after every step.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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 = 1</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sp</code></td><td><span class="sig">int[] sp = new int[6000]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sd</code></td><td><span class="sig">int[] sd = new int[6000]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sl</code></td><td><span class="sig">int[] sl = new int[6000]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>m</code></td><td><span class="sig">int m = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shLast</code></td><td><span class="sig">int shLast = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>seq</code></td><td><span class="sig">int seq = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shGross</code></td><td><span class="sig">int shGross = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shFees</code></td><td><span class="sig">int shFees = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shBorrow</code></td><td><span class="sig">int shBorrow = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>rate</code></td><td><span class="sig">int rate = 2</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>tally</code></td><td><span class="sig">int[] tally = new int[9]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>mismatches</code></td><td><span class="sig">int mismatches = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>book</code></td><td><span class="sig">SLShortBook book = new SLShortBook()</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nextRaw</code></td><td><span class="sig">int nextRaw()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>rnd</code></td><td><span class="sig">int rnd(int n)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shLots</code></td><td><span class="sig">int shLots()</span></td><td class="desc">Distinct short sales that still hold shares, counted from the per-share ids.</td></tr>
<tr><td><code>shShort</code></td><td><span class="sig">int shShort(int day, int qty, int price, int fee)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shSell</code></td><td><span class="sig">int shSell(int day, int qty, int price, int fee)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shCost</code></td><td><span class="sig">int shCost()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>shAgeSum</code></td><td><span class="sig">int shAgeSum()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>agrees</code></td><td><span class="sig">boolean agrees()</span></td><td class="desc">After every step the real book and the shadow must agree on everything observable, and a refused verb must have changed nothing.</td></tr>
<tr><td><code>runSeed</code></td><td><span class="sig">void runSeed(int seed, int steps, int bu, int su, int hu)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause22mirrorlawstress">TaUse22MirrorLawStress <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/22-mirror-law-stress/TaUse22MirrorLawStress.sleela)</span></h2>
<div data-u="tause22mirrorlawstress tause22mirrorlawstress">
<h3 id="TaUse22MirrorLawStress">TaUse22MirrorLawStress <span class="pill">class</span></h3>
<p class="desc">Long versus short: the same random verbs drive both books; every status code matches and the short profit is exactly minus the long profit at every step.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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 = 1</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>tally</code></td><td><span class="sig">int[] tally = new int[9]</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>mismatches</code></td><td><span class="sig">int mismatches = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>lb</code></td><td><span class="sig">SLLongBook lb = new SLLongBook()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>sb</code></td><td><span class="sig">SLShortBook sb = new SLShortBook()</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>nextRaw</code></td><td><span class="sig">int nextRaw()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>rnd</code></td><td><span class="sig">int rnd(int n)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>mirrored</code></td><td><span class="sig">boolean mirrored()</span></td><td class="desc">The mirror law: with the same prices, days and quantities, a buy matches a short sale and a sell matches a cover. Every status code, the shares held, the cost basis and sale proceeds, the ages and the lot count must be equal, and the profit of the short must be exactly minus the long.</td></tr>
<tr><td><code>runMirror</code></td><td><span class="sig">void runMirror(int seed, int steps, int bu, int su, int hu)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause23marginrequirement">TaUse23MarginRequirement <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/23-margin-requirement/TaUse23MarginRequirement.sleela)</span></h2>
<div data-u="tause23marginrequirement tause23marginrequirement">
<h3 id="TaUse23MarginRequirement">TaUse23MarginRequirement <span class="pill">class</span></h3>
<p class="desc">Margin arithmetic: the requirement is the exact ceiling of value times percent, computed without a product that could pass the exact-comparison limit.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>direct</code></td><td><span class="sig">int direct(int value, int bp)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause24margincallandcover">TaUse24MarginCallAndCover <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/24-margin-call-and-cover/TaUse24MarginCallAndCover.sleela)</span></h2>
<div data-u="tause24margincallandcover tause24margincallandcover">
<h3 id="TaUse24MarginCallAndCover">TaUse24MarginCallAndCover <span class="pill">class</span></h3>
<p class="desc">Short margin call: the deposit that restores the margin, and the fewest shares to cover found by binary search and confirmed by a scan; when equity is negative a cover cannot help.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act2</code></td><td><span class="sig">void act2(SLShortBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause25margindifferential">TaUse25MarginDifferential <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/25-margin-differential/TaUse25MarginDifferential.sleela)</span></h2>
<div data-u="tause25margindifferential tause25margindifferential">
<h3 id="TaUse25MarginDifferential">TaUse25MarginDifferential <span class="pill">class</span></h3>
<p class="desc">Margin by differential testing: the binary search for the fewest shares to cover and the closed form for the first call day are each checked against a slow reference over every combination of a grid.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause26marginandtime">TaUse26MarginAndTime <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/26-margin-and-time/TaUse26MarginAndTime.sleela)</span></h2>
<div data-u="tause26marginandtime tause26marginandtime">
<h3 id="TaUse26MarginAndTime">TaUse26MarginAndTime <span class="pill">class</span></h3>
<p class="desc">Time on short with margin: borrow cost drains collateral by shares times rate each day, so the first call day has a closed form, confirmed by stepping and by the book's own accrual.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act</code></td><td><span class="sig">void act(SLLongBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>act2</code></td><td><span class="sig">void act2(SLShortBook b, String text, int code)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="tause27batchreturn">TaUse27BatchReturn <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading-actions-on-verb/27-batch-return/TaUse27BatchReturn.sleela)</span></h2>
<div data-u="tause27batchreturn tause27batchreturn">
<h3 id="TaUse27BatchReturn">TaUse27BatchReturn <span class="pill">class</span></h3>
<p class="desc">Use case 27: the batch return over N independent trades, checked against an independent Python model and against real SLLongBook buy/sell pairs, with an explicit refusal of the confusion between a total batch return and a per-trade rate.</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expect</code></td><td><span class="sig">void expect(String label, int got, int want)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean got)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>summary</code></td><td><span class="sig">void summary()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>fillAndOverflow</code></td><td><span class="sig">int fillAndOverflow()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="television-trade">television-trade <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/professional/network-trades/television-trade.sleela)</span></h2>
<div data-u="television-trade televisiontrade">
<h3 id="TelevisionTrade">TelevisionTrade <span class="pill">class</span></h3>
<p class="desc">NETWORK-TRADE 12 of 12 -- TELEVISION. Scout a network of venue quotes, pick the cheapest buy and dearest sell, negotiate a fair clearing price, and emit a cash receipt. Rung: the top rung: a finished consumer television, fee AND carry.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="trade-exchange">trade-exchange <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/medium-results/trade-exchange.sleela)</span></h2>
<div data-u="trade-exchange tradeexchange">
<h3 id="TradeExchange">TradeExchange <span class="pill">class</span></h3>
<p class="desc">MEDIUM-RESULT (Trade). Connect, control, and execute a cross-venue commodity trade over open exchange in the USA using the connect medium and the network subject. Theme: Trade -- routing a lumber lot from the cheapest mill to the dearest buyer.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="trade-math-demo">trade-math-demo <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/math/trade-math-demo.sleela)</span></h2>
<div data-u="trade-math-demo trademathdemo">
<h3 id="TradeMathDemo">TradeMathDemo <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the advantage/math trade subject (joint profit max, Nash bargaining, bilateral newsvendor).</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="trader-example">trader-example <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/examples/medium/trade-economics/trader-example.sleela)</span></h2>
<div data-u="trader-example traderexample">
<h3 id="TraderExample">TraderExample <span class="pill">class</span></h3>
<p class="desc">A professional example -- the TRADER -- finds the joint-profit optimum and strikes a Nash-fair wholesale price.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="trading-demo">trading-demo <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/trading/trading-demo.sleela)</span></h2>
<div data-u="trading-demo tradingdemo">
<h3 id="TradingDemo">TradingDemo <span class="pill">class</span></h3>
<p class="desc">Runnable demonstration + validation of the advantage/trading subject (eleven trading models, rate budget, and counsel).</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>passed</code></td><td><span class="sig">int passed = 0</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>failed</code></td><td><span class="sig">int failed = 0</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>expectNear</code></td><td><span class="sig">void expectNear(String label, double got, double want, double tol)</span></td><td class="desc">---- tiny test harness ----</td></tr>
<tr><td><code>expectTrue</code></td><td><span class="sig">void expectTrue(String label, boolean cond)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>expectRejected</code></td><td><span class="sig">void expectRejected(String label, SLTradingResult r)</span></td><td class="desc">A rejected evaluation must carry a reason and report zero everywhere.</td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
</table>
</div>
<h2 class="section" data-u="youthfulness-exchange">youthfulness-exchange <span class="pill syntax">#sleela 3.0</span> <span class="muted" style="font-size:13px">(lib/advantage/medium-results/youthfulness-exchange.sleela)</span></h2>
<div data-u="youthfulness-exchange youthfulnessexchange">
<h3 id="YouthfulnessExchange">YouthfulnessExchange <span class="pill">class</span></h3>
<p class="desc">MEDIUM-RESULT (Youthfulness). A guided, guardrailed first trade for a young/new participant over open US exchange: connect with a disciplined clock, scout a small venue network, negotiate a BUYER-favored price (the newcomer keeps more surplus), and settle a tiny amount with a hard spend cap so a decline is handled safely. Theme: Youthfulness -- learning the exchange with training wheels.</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>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>near</code></td><td><span class="sig">boolean near(double a, double b, double tol)</span></td><td class="desc"><span class="muted">No description in source.</span></td></tr>
<tr><td><code>main</code></td><td><span class="sig">void main()</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-16 00:48 UTC.
SleelaDoc — the SLeeLa documentation brand. SLeeLa — MEARVK LLC · Max Rupplin · UNCW, NCSU, Harvard · 2026 · George Soros 2507-2608.
</footer>
</main>
</div>
</body>
</html>