<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[171213] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/171213">171213</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2014-07-17 21:34:16 -0700 (Thu, 17 Jul 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Need ability to fuzz exception throwing
https://bugs.webkit.org/show_bug.cgi?id=134945
&lt;rdar://problem/17722027&gt;

Reviewed by Sam Weinig.
        

Source/JavaScriptCore: 
Adds the ability to instrument exception checks, and to force some random
exception check to artificially throw an exception. Also adds new tests that
are suitable for testing this. Note that this is closely tied to the Tools
directory changes that are also part of this changeset.
        
This also fixes an activation tear-off bug that arises if we ever throw an
exception from operationOptimize, or if due to some other bug it's only due
to the operationOptimize exception check that we realize that there is an
exception to be thrown.

* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::fastExceptionCheck):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::callCheck):
* interpreter/Interpreter.cpp:
(JSC::unwindCallFrame):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::callExceptionFuzz):
(JSC::AssemblyHelpers::emitExceptionCheck):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::emitExceptionCheck): Deleted.
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_enter):
* jit/JITOperations.cpp:
(JSC::numberOfExceptionFuzzChecks):
* jit/JITOperations.h:
* jsc.cpp:
(jscmain):
* runtime/Options.h:
* runtime/TestRunnerUtils.h:
* tests/exceptionFuzz.yaml: Added.
* tests/exceptionFuzz: Added.
* tests/exceptionFuzz/3d-cube.js: Added.
* tests/exceptionFuzz/date-format-xparb.js: Added.
* tests/exceptionFuzz/earley-boyer.js: Added.

Tools: 
Adds a new script, js-exception-fuzz, which will run some jsc command-line using
exception fuzzing. This means that we will force exceptions to be thrown in random
places to see how the engine reacts. This is now integrated with the various test
drivers, so run-javascriptcore-tests will run some exception fuzzing tests by
default.

* Scripts/jsc-stress-test-helpers/js-exception-fuzz: Added.
(fail):
* Scripts/run-javascriptcore-tests:
* Scripts/run-jsc-stress-tests:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGJITCompilerh">trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLIntrinsicRepositoryh">trunk/Source/JavaScriptCore/ftl/FTLIntrinsicRepository.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp">trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterInterpretercpp">trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterStackVisitorcpp">trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitAssemblyHelperscpp">trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitAssemblyHelpersh">trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITcpp">trunk/Source/JavaScriptCore/jit/JIT.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOpcodescpp">trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOperationscpp">trunk/Source/JavaScriptCore/jit/JITOperations.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOperationsh">trunk/Source/JavaScriptCore/jit/JITOperations.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejsccpp">trunk/Source/JavaScriptCore/jsc.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeOptionsh">trunk/Source/JavaScriptCore/runtime/Options.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeTestRunnerUtilsh">trunk/Source/JavaScriptCore/runtime/TestRunnerUtils.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptsrunjavascriptcoretests">trunk/Tools/Scripts/run-javascriptcore-tests</a></li>
<li><a href="#trunkToolsScriptsrunjscstresstests">trunk/Tools/Scripts/run-jsc-stress-tests</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/Source/JavaScriptCore/tests/exceptionFuzz/</li>
<li><a href="#trunkSourceJavaScriptCoretestsexceptionFuzz3dcubejs">trunk/Source/JavaScriptCore/tests/exceptionFuzz/3d-cube.js</a></li>
<li><a href="#trunkSourceJavaScriptCoretestsexceptionFuzzdateformatxparbjs">trunk/Source/JavaScriptCore/tests/exceptionFuzz/date-format-xparb.js</a></li>
<li><a href="#trunkSourceJavaScriptCoretestsexceptionFuzzearleyboyerjs">trunk/Source/JavaScriptCore/tests/exceptionFuzz/earley-boyer.js</a></li>
<li><a href="#trunkSourceJavaScriptCoretestsexceptionFuzzyaml">trunk/Source/JavaScriptCore/tests/exceptionFuzz.yaml</a></li>
<li><a href="#trunkToolsScriptsjscstresstesthelpersjsexceptionfuzz">trunk/Tools/Scripts/jsc-stress-test-helpers/js-exception-fuzz</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -1,3 +1,50 @@
</span><ins>+2014-07-15  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        Need ability to fuzz exception throwing
+        https://bugs.webkit.org/show_bug.cgi?id=134945
+        &lt;rdar://problem/17722027&gt;
+
+        Reviewed by Sam Weinig.
+        
+        Adds the ability to instrument exception checks, and to force some random
+        exception check to artificially throw an exception. Also adds new tests that
+        are suitable for testing this. Note that this is closely tied to the Tools
+        directory changes that are also part of this changeset.
+        
+        This also fixes an activation tear-off bug that arises if we ever throw an
+        exception from operationOptimize, or if due to some other bug it's only due
+        to the operationOptimize exception check that we realize that there is an
+        exception to be thrown.
+
+        * dfg/DFGJITCompiler.h:
+        (JSC::DFG::JITCompiler::fastExceptionCheck):
+        * ftl/FTLIntrinsicRepository.h:
+        * ftl/FTLLowerDFGToLLVM.cpp:
+        (JSC::FTL::LowerDFGToLLVM::callCheck):
+        * interpreter/Interpreter.cpp:
+        (JSC::unwindCallFrame):
+        * jit/AssemblyHelpers.cpp:
+        (JSC::AssemblyHelpers::callExceptionFuzz):
+        (JSC::AssemblyHelpers::emitExceptionCheck):
+        * jit/AssemblyHelpers.h:
+        (JSC::AssemblyHelpers::emitExceptionCheck): Deleted.
+        * jit/JIT.cpp:
+        (JSC::JIT::privateCompileMainPass):
+        * jit/JITOpcodes.cpp:
+        (JSC::JIT::emit_op_enter):
+        * jit/JITOperations.cpp:
+        (JSC::numberOfExceptionFuzzChecks):
+        * jit/JITOperations.h:
+        * jsc.cpp:
+        (jscmain):
+        * runtime/Options.h:
+        * runtime/TestRunnerUtils.h:
+        * tests/exceptionFuzz.yaml: Added.
+        * tests/exceptionFuzz: Added.
+        * tests/exceptionFuzz/3d-cube.js: Added.
+        * tests/exceptionFuzz/date-format-xparb.js: Added.
+        * tests/exceptionFuzz/earley-boyer.js: Added.
+
</ins><span class="cx"> 2014-07-17  David Kilzer  &lt;ddkilzer@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGJITCompilerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.h (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.h        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.h        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -186,6 +186,7 @@
</span><span class="cx">     // Add a call out from JIT code, with a fast exception check that tests if the return value is zero.
</span><span class="cx">     void fastExceptionCheck()
</span><span class="cx">     {
</span><ins>+        callExceptionFuzz();
</ins><span class="cx">         m_exceptionChecks.append(branchTestPtr(Zero, GPRInfo::returnValueGPR));
</span><span class="cx">     }
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLIntrinsicRepositoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLIntrinsicRepository.h (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLIntrinsicRepository.h        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/ftl/FTLIntrinsicRepository.h        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx">     macro(S_JITOperation_EJ, functionType(intPtr, intPtr, int64)) \
</span><span class="cx">     macro(S_JITOperation_EJJ, functionType(intPtr, intPtr, int64, int64)) \
</span><span class="cx">     macro(S_JITOperation_J, functionType(intPtr, int64)) \
</span><ins>+    macro(V_JITOperation, functionType(voidType)) \
</ins><span class="cx">     macro(V_JITOperation_EJJJ, functionType(voidType, intPtr, int64, int64, int64)) \
</span><span class="cx">     macro(V_JITOperation_EOZD, functionType(voidType, intPtr, intPtr, int32, doubleType)) \
</span><span class="cx">     macro(V_JITOperation_EOZJ, functionType(voidType, intPtr, intPtr, int32, int64)) \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -5760,6 +5760,9 @@
</span><span class="cx">         if (mode == NoExceptions)
</span><span class="cx">             return;
</span><span class="cx">         
</span><ins>+        if (Options::enableExceptionFuzz())
+            m_out.call(m_out.operation(operationExceptionFuzz));
+        
</ins><span class="cx">         LBasicBlock continuation = FTL_NEW_BLOCK(m_out, (&quot;Exception check continuation&quot;));
</span><span class="cx">         
</span><span class="cx">         m_out.branch(
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterInterpretercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -457,13 +457,19 @@
</span><span class="cx">         RELEASE_ASSERT(!visitor-&gt;isInlinedFrame());
</span><span class="cx"> #endif
</span><span class="cx">         activation = callFrame-&gt;uncheckedActivation();
</span><del>-        if (activation)
-            jsCast&lt;JSActivation*&gt;(activation)-&gt;tearOff(*scope-&gt;vm());
</del><ins>+        // Protect against the activation not being created, or the variable still being
+        // initialized to Undefined inside op_enter.
+        if (activation &amp;&amp; activation.isCell()) {
+            JSActivation* activationObject = jsCast&lt;JSActivation*&gt;(activation);
+            // Protect against throwing exceptions after tear-off.
+            if (!activationObject-&gt;isTornOff())
+                activationObject-&gt;tearOff(*scope-&gt;vm());
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (codeBlock-&gt;codeType() == FunctionCode &amp;&amp; codeBlock-&gt;usesArguments()) {
</span><span class="cx">         if (Arguments* arguments = visitor-&gt;existingArguments()) {
</span><del>-            if (activation)
</del><ins>+            if (activation &amp;&amp; activation.isCell())
</ins><span class="cx">                 arguments-&gt;didTearOffActivation(callFrame, jsCast&lt;JSActivation*&gt;(activation));
</span><span class="cx"> #if ENABLE(DFG_JIT)
</span><span class="cx">             else if (visitor-&gt;isInlinedFrame())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterStackVisitorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -278,7 +278,7 @@
</span><span class="cx">         reg = codeBlock()-&gt;argumentsRegister();
</span><span class="cx">     
</span><span class="cx">     JSValue result = callFrame()-&gt;r(unmodifiedArgumentsRegister(reg).offset()).jsValue();
</span><del>-    if (!result)
</del><ins>+    if (!result || !result.isCell()) // Protect against Undefined in case we throw in op_enter.
</ins><span class="cx">         return 0;
</span><span class="cx">     return jsCast&lt;Arguments*&gt;(result);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitAssemblyHelperscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(JIT)
</span><span class="cx"> 
</span><ins>+#include &quot;JITOperations.h&quot;
</ins><span class="cx"> #include &quot;JSCInlines.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="lines">@@ -195,6 +196,33 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // !ASSERT_DISABLED
</span><span class="cx"> 
</span><ins>+void AssemblyHelpers::callExceptionFuzz()
+{
+    if (!Options::enableExceptionFuzz())
+        return;
+
+    ASSERT(stackAlignmentBytes() &gt;= sizeof(void*) * 2);
+    subPtr(TrustedImm32(stackAlignmentBytes()), stackPointerRegister);
+    poke(GPRInfo::returnValueGPR, 0);
+    poke(GPRInfo::returnValueGPR2, 1);
+    move(TrustedImmPtr(bitwise_cast&lt;void*&gt;(operationExceptionFuzz)), GPRInfo::nonPreservedNonReturnGPR);
+    call(GPRInfo::nonPreservedNonReturnGPR);
+    peek(GPRInfo::returnValueGPR, 0);
+    peek(GPRInfo::returnValueGPR2, 1);
+    addPtr(TrustedImm32(stackAlignmentBytes()), stackPointerRegister);
+}
+
+AssemblyHelpers::Jump AssemblyHelpers::emitExceptionCheck(ExceptionCheckKind kind)
+{
+    callExceptionFuzz();
+    
+#if USE(JSVALUE64)
+    return branchTest64(kind == NormalExceptionCheck ? NonZero : Zero, AbsoluteAddress(vm()-&gt;addressOfException()));
+#elif USE(JSVALUE32_64)
+    return branch32(kind == NormalExceptionCheck ? NotEqual : Equal, AbsoluteAddress(reinterpret_cast&lt;char*&gt;(vm()-&gt;addressOfException()) + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), TrustedImm32(JSValue::EmptyValueTag));
+#endif
+}
+
</ins><span class="cx"> void AssemblyHelpers::emitStoreStructureWithTypeInfo(AssemblyHelpers&amp; jit, TrustedImmPtr structure, RegisterID dest)
</span><span class="cx"> {
</span><span class="cx">     const Structure* structurePtr = static_cast&lt;const Structure*&gt;(structure.m_value);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitAssemblyHelpersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -481,15 +481,10 @@
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx">     
</span><ins>+    void callExceptionFuzz();
+    
</ins><span class="cx">     enum ExceptionCheckKind { NormalExceptionCheck, InvertedExceptionCheck };
</span><del>-    Jump emitExceptionCheck(ExceptionCheckKind kind = NormalExceptionCheck)
-    {
-#if USE(JSVALUE64)
-        return branchTest64(kind == NormalExceptionCheck ? NonZero : Zero, AbsoluteAddress(vm()-&gt;addressOfException()));
-#elif USE(JSVALUE32_64)
-        return branch32(kind == NormalExceptionCheck ? NotEqual : Equal, AbsoluteAddress(reinterpret_cast&lt;char*&gt;(vm()-&gt;addressOfException()) + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), TrustedImm32(JSValue::EmptyValueTag));
-#endif
-    }
</del><ins>+    Jump emitExceptionCheck(ExceptionCheckKind kind = NormalExceptionCheck);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(SAMPLING_COUNTERS)
</span><span class="cx">     static void emitCount(MacroAssembler&amp; jit, AbstractSamplingCounter&amp; counter, int32_t increment = 1)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JIT.cpp (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JIT.cpp        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/jit/JIT.cpp        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -167,7 +167,10 @@
</span><span class="cx">                 AbsoluteAddress(m_compilation-&gt;executionCounterFor(Profiler::OriginStack(Profiler::Origin(
</span><span class="cx">                     m_compilation-&gt;bytecodes(), m_bytecodeOffset)))-&gt;address()));
</span><span class="cx">         }
</span><del>-
</del><ins>+        
+        if (Options::eagerlyUpdateTopCallFrame())
+            updateTopCallFrame();
+        
</ins><span class="cx">         switch (opcodeID) {
</span><span class="cx">         DEFINE_SLOW_OP(del_by_val)
</span><span class="cx">         DEFINE_SLOW_OP(in)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOpcodescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -762,8 +762,6 @@
</span><span class="cx"> 
</span><span class="cx"> void JIT::emit_op_enter(Instruction*)
</span><span class="cx"> {
</span><del>-    emitEnterOptimizationCheck();
-    
</del><span class="cx">     // Even though CTI doesn't use them, we initialize our constant
</span><span class="cx">     // registers to zap stale pointers, to avoid unnecessarily prolonging
</span><span class="cx">     // object lifetime and increasing GC pressure.
</span><span class="lines">@@ -772,6 +770,8 @@
</span><span class="cx">         emitInitRegister(virtualRegisterForLocal(j).offset());
</span><span class="cx"> 
</span><span class="cx">     emitWriteBarrier(m_codeBlock-&gt;ownerExecutable());
</span><ins>+
+    emitEnterOptimizationCheck();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JIT::emit_op_create_activation(Instruction* currentInstruction)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.cpp (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -51,10 +51,14 @@
</span><span class="cx"> #include &quot;JSCInlines.h&quot;
</span><span class="cx"> #include &quot;Repatch.h&quot;
</span><span class="cx"> #include &quot;RepatchBuffer.h&quot;
</span><ins>+#include &quot;TestRunnerUtils.h&quot;
</ins><span class="cx"> #include &lt;wtf/InlineASM.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><ins>+static unsigned s_numberOfExceptionFuzzChecks;
+unsigned numberOfExceptionFuzzChecks() { return s_numberOfExceptionFuzzChecks; }
+
</ins><span class="cx"> extern &quot;C&quot; {
</span><span class="cx"> 
</span><span class="cx"> #if COMPILER(MSVC)
</span><span class="lines">@@ -1028,7 +1032,7 @@
</span><span class="cx">     DeferGCForAWhile deferGC(vm.heap);
</span><span class="cx">     
</span><span class="cx">     CodeBlock* codeBlock = exec-&gt;codeBlock();
</span><del>-
</del><ins>+    
</ins><span class="cx">     if (bytecodeIndex) {
</span><span class="cx">         // If we're attempting to OSR from a loop, assume that this should be
</span><span class="cx">         // separately optimized.
</span><span class="lines">@@ -1799,6 +1803,31 @@
</span><span class="cx">     genericUnwind(vm, exec, vm-&gt;exception());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+// This function &quot;should&quot; just take the ExecState*, but doing so would make it more difficult
+// to call from exception check sites. So, unlike all of our other functions, we allow
+// ourselves to play some gnarly ABI tricks just to simplify the calling convention. This is
+// particularly safe here since this is never called on the critical path - it's only for
+// testing.
+void JIT_OPERATION operationExceptionFuzz()
+{
+    ASSERT(Options::enableExceptionFuzz());
+
+    // This probably &quot;just works&quot; for GCC also, but I haven't tried.
+#if COMPILER(CLANG)
+    ExecState* exec = static_cast&lt;ExecState*&gt;(__builtin_frame_address(1));
+    DeferGCForAWhile deferGC(exec-&gt;vm().heap);
+    
+    s_numberOfExceptionFuzzChecks++;
+    
+    unsigned fireTarget = Options::fireExceptionFuzzAt();
+    if (fireTarget == s_numberOfExceptionFuzzChecks) {
+        printf(&quot;JSC EXCEPTION FUZZ: Throwing fuzz exception with call frame %p and return address %p.\n&quot;, exec, __builtin_return_address(0));
+        exec-&gt;vm().throwException(
+            exec, createError(exec-&gt;lexicalGlobalObject(), ASCIILiteral(&quot;Exception Fuzz&quot;)));
+    }
+#endif // COMPILER(CLANG)
+}
+
</ins><span class="cx"> } // extern &quot;C&quot;
</span><span class="cx"> 
</span><span class="cx"> // Note: getHostCallReturnValueWithExecState() needs to be placed before the
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.h (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.h        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.h        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -143,6 +143,7 @@
</span><span class="cx"> typedef size_t JIT_OPERATION (*S_JITOperation_EOJss)(ExecState*, JSObject*, JSString*);
</span><span class="cx"> typedef size_t JIT_OPERATION (*S_JITOperation_J)(EncodedJSValue);
</span><span class="cx"> typedef SlowPathReturnType JIT_OPERATION (*Sprt_JITOperation_EZ)(ExecState*, int32_t);
</span><ins>+typedef void JIT_OPERATION (*V_JITOperation)();
</ins><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_E)(ExecState*);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_EC)(ExecState*, JSCell*);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_ECb)(ExecState*, CodeBlock*);
</span><span class="lines">@@ -300,6 +301,8 @@
</span><span class="cx"> 
</span><span class="cx"> void JIT_OPERATION operationInitGlobalConst(ExecState*, Instruction*);
</span><span class="cx"> 
</span><ins>+void JIT_OPERATION operationExceptionFuzz();
+
</ins><span class="cx"> } // extern &quot;C&quot;
</span><span class="cx"> 
</span><span class="cx"> inline P_JITOperation_ECli operationLinkFor(
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejsccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jsc.cpp (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jsc.cpp        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/jsc.cpp        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -1273,6 +1273,9 @@
</span><span class="cx">             if (!vm-&gt;m_perBytecodeProfiler-&gt;save(options.m_profilerOutput.utf8().data()))
</span><span class="cx">                 fprintf(stderr, &quot;could not save profiler output.\n&quot;);
</span><span class="cx">         }
</span><ins>+        
+        if (Options::enableExceptionFuzz())
+            printf(&quot;JSC EXCEPTION FUZZ: encountered %u checks.\n&quot;, numberOfExceptionFuzzChecks());
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     return result;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeOptionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Options.h (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Options.h        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/runtime/Options.h        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -141,6 +141,7 @@
</span><span class="cx">     v(bool, testTheFTL, false) \
</span><span class="cx">     v(bool, verboseSanitizeStack, false) \
</span><span class="cx">     v(bool, alwaysDoFullCollection, false) \
</span><ins>+    v(bool, eagerlyUpdateTopCallFrame, false) \
</ins><span class="cx">     \
</span><span class="cx">     v(bool, enableOSREntryToDFG, true) \
</span><span class="cx">     v(bool, enableOSREntryToFTL, true) \
</span><span class="lines">@@ -269,7 +270,10 @@
</span><span class="cx">     v(bool, disableGC, false) \
</span><span class="cx">     v(unsigned, gcMaxHeapSize, 0) \
</span><span class="cx">     v(bool, recordGCPauseTimes, false) \
</span><del>-    v(bool, logHeapStatisticsAtExit, false)
</del><ins>+    v(bool, logHeapStatisticsAtExit, false) \
+    \
+    v(bool, enableExceptionFuzz, false) \
+    v(unsigned, fireExceptionFuzzAt, 0)
</ins><span class="cx"> 
</span><span class="cx"> class Options {
</span><span class="cx"> public:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeTestRunnerUtilsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/TestRunnerUtils.h (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/TestRunnerUtils.h        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Source/JavaScriptCore/runtime/TestRunnerUtils.h        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -44,6 +44,8 @@
</span><span class="cx"> JS_EXPORT_PRIVATE JSValue setNeverInline(ExecState*);
</span><span class="cx"> JS_EXPORT_PRIVATE JSValue optimizeNextInvocation(ExecState*);
</span><span class="cx"> 
</span><ins>+JS_EXPORT_PRIVATE unsigned numberOfExceptionFuzzChecks();
+
</ins><span class="cx"> } // namespace JSC
</span><span class="cx"> 
</span><span class="cx"> #endif // TestRunnerUtils_h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestsexceptionFuzz3dcubejs"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/tests/exceptionFuzz/3d-cube.js (0 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/exceptionFuzz/3d-cube.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/tests/exceptionFuzz/3d-cube.js        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -0,0 +1,360 @@
</span><ins>+try {
+
+// 3D Cube Rotation
+// http://www.speich.net/computer/moztesting/3d.htm
+// Created by Simon Speich
+
+var Q = new Array();
+var MTrans = new Array();  // transformation matrix
+var MQube = new Array();  // position information of qube
+var I = new Array();      // entity matrix
+var Origin = new Object();
+var Testing = new Object();
+var LoopTimer;
+
+var validation = {
+ 20: 2889.0000000000045,
+ 40: 2889.0000000000055,
+ 80: 2889.000000000005,
+ 160: 2889.0000000000055
+};
+
+var DisplArea = new Object();
+DisplArea.Width = 300;
+DisplArea.Height = 300;
+
+function DrawLine(From, To) {
+  var x1 = From.V[0];
+  var x2 = To.V[0];
+  var y1 = From.V[1];
+  var y2 = To.V[1];
+  var dx = Math.abs(x2 - x1);
+  var dy = Math.abs(y2 - y1);
+  var x = x1;
+  var y = y1;
+  var IncX1, IncY1;
+  var IncX2, IncY2;  
+  var Den;
+  var Num;
+  var NumAdd;
+  var NumPix;
+
+  if (x2 &gt;= x1) {  IncX1 = 1; IncX2 = 1;  }
+  else { IncX1 = -1; IncX2 = -1; }
+  if (y2 &gt;= y1)  {  IncY1 = 1; IncY2 = 1; }
+  else { IncY1 = -1; IncY2 = -1; }
+  if (dx &gt;= dy) {
+    IncX1 = 0;
+    IncY2 = 0;
+    Den = dx;
+    Num = dx / 2;
+    NumAdd = dy;
+    NumPix = dx;
+  }
+  else {
+    IncX2 = 0;
+    IncY1 = 0;
+    Den = dy;
+    Num = dy / 2;
+    NumAdd = dx;
+    NumPix = dy;
+  }
+
+  NumPix = Math.round(Q.LastPx + NumPix);
+
+  var i = Q.LastPx;
+  for (; i &lt; NumPix; i++) {
+    Num += NumAdd;
+    if (Num &gt;= Den) {
+      Num -= Den;
+      x += IncX1;
+      y += IncY1;
+    }
+    x += IncX2;
+    y += IncY2;
+  }
+  Q.LastPx = NumPix;
+}
+
+function CalcCross(V0, V1) {
+  var Cross = new Array();
+  Cross[0] = V0[1]*V1[2] - V0[2]*V1[1];
+  Cross[1] = V0[2]*V1[0] - V0[0]*V1[2];
+  Cross[2] = V0[0]*V1[1] - V0[1]*V1[0];
+  return Cross;
+}
+
+function CalcNormal(V0, V1, V2) {
+  var A = new Array();   var B = new Array(); 
+  for (var i = 0; i &lt; 3; i++) {
+    A[i] = V0[i] - V1[i];
+    B[i] = V2[i] - V1[i];
+  }
+  A = CalcCross(A, B);
+  var Length = Math.sqrt(A[0]*A[0] + A[1]*A[1] + A[2]*A[2]); 
+  for (var i = 0; i &lt; 3; i++) A[i] = A[i] / Length;
+  A[3] = 1;
+  return A;
+}
+
+function CreateP(X,Y,Z) {
+  this.V = [X,Y,Z,1];
+}
+
+// multiplies two matrices
+function MMulti(M1, M2) {
+  var M = [[],[],[],[]];
+  var i = 0;
+  var j = 0;
+  for (; i &lt; 4; i++) {
+    j = 0;
+    for (; j &lt; 4; j++) M[i][j] = M1[i][0] * M2[0][j] + M1[i][1] * M2[1][j] + M1[i][2] * M2[2][j] + M1[i][3] * M2[3][j];
+  }
+  return M;
+}
+
+//multiplies matrix with vector
+function VMulti(M, V) {
+  var Vect = new Array();
+  var i = 0;
+  for (;i &lt; 4; i++) Vect[i] = M[i][0] * V[0] + M[i][1] * V[1] + M[i][2] * V[2] + M[i][3] * V[3];
+  return Vect;
+}
+
+function VMulti2(M, V) {
+  var Vect = new Array();
+  var i = 0;
+  for (;i &lt; 3; i++) Vect[i] = M[i][0] * V[0] + M[i][1] * V[1] + M[i][2] * V[2];
+  return Vect;
+}
+
+// add to matrices
+function MAdd(M1, M2) {
+  var M = [[],[],[],[]];
+  var i = 0;
+  var j = 0;
+  for (; i &lt; 4; i++) {
+    j = 0;
+    for (; j &lt; 4; j++) M[i][j] = M1[i][j] + M2[i][j];
+  }
+  return M;
+}
+
+function Translate(M, Dx, Dy, Dz) {
+  var T = [
+  [1,0,0,Dx],
+  [0,1,0,Dy],
+  [0,0,1,Dz],
+  [0,0,0,1]
+  ];
+  return MMulti(T, M);
+}
+
+function RotateX(M, Phi) {
+  var a = Phi;
+  a *= Math.PI / 180;
+  var Cos = Math.cos(a);
+  var Sin = Math.sin(a);
+  var R = [
+  [1,0,0,0],
+  [0,Cos,-Sin,0],
+  [0,Sin,Cos,0],
+  [0,0,0,1]
+  ];
+  return MMulti(R, M);
+}
+
+function RotateY(M, Phi) {
+  var a = Phi;
+  a *= Math.PI / 180;
+  var Cos = Math.cos(a);
+  var Sin = Math.sin(a);
+  var R = [
+  [Cos,0,Sin,0],
+  [0,1,0,0],
+  [-Sin,0,Cos,0],
+  [0,0,0,1]
+  ];
+  return MMulti(R, M);
+}
+
+function RotateZ(M, Phi) {
+  var a = Phi;
+  a *= Math.PI / 180;
+  var Cos = Math.cos(a);
+  var Sin = Math.sin(a);
+  var R = [
+  [Cos,-Sin,0,0],
+  [Sin,Cos,0,0],
+  [0,0,1,0],   
+  [0,0,0,1]
+  ];
+  return MMulti(R, M);
+}
+
+function DrawQube() {
+  // calc current normals
+  var CurN = new Array();
+  var i = 5;
+  Q.LastPx = 0;
+  for (; i &gt; -1; i--) CurN[i] = VMulti2(MQube, Q.Normal[i]);
+  if (CurN[0][2] &lt; 0) {
+    if (!Q.Line[0]) { DrawLine(Q[0], Q[1]); Q.Line[0] = true; };
+    if (!Q.Line[1]) { DrawLine(Q[1], Q[2]); Q.Line[1] = true; };
+    if (!Q.Line[2]) { DrawLine(Q[2], Q[3]); Q.Line[2] = true; };
+    if (!Q.Line[3]) { DrawLine(Q[3], Q[0]); Q.Line[3] = true; };
+  }
+  if (CurN[1][2] &lt; 0) {
+    if (!Q.Line[2]) { DrawLine(Q[3], Q[2]); Q.Line[2] = true; };
+    if (!Q.Line[9]) { DrawLine(Q[2], Q[6]); Q.Line[9] = true; };
+    if (!Q.Line[6]) { DrawLine(Q[6], Q[7]); Q.Line[6] = true; };
+    if (!Q.Line[10]) { DrawLine(Q[7], Q[3]); Q.Line[10] = true; };
+  }
+  if (CurN[2][2] &lt; 0) {
+    if (!Q.Line[4]) { DrawLine(Q[4], Q[5]); Q.Line[4] = true; };
+    if (!Q.Line[5]) { DrawLine(Q[5], Q[6]); Q.Line[5] = true; };
+    if (!Q.Line[6]) { DrawLine(Q[6], Q[7]); Q.Line[6] = true; };
+    if (!Q.Line[7]) { DrawLine(Q[7], Q[4]); Q.Line[7] = true; };
+  }
+  if (CurN[3][2] &lt; 0) {
+    if (!Q.Line[4]) { DrawLine(Q[4], Q[5]); Q.Line[4] = true; };
+    if (!Q.Line[8]) { DrawLine(Q[5], Q[1]); Q.Line[8] = true; };
+    if (!Q.Line[0]) { DrawLine(Q[1], Q[0]); Q.Line[0] = true; };
+    if (!Q.Line[11]) { DrawLine(Q[0], Q[4]); Q.Line[11] = true; };
+  }
+  if (CurN[4][2] &lt; 0) {
+    if (!Q.Line[11]) { DrawLine(Q[4], Q[0]); Q.Line[11] = true; };
+    if (!Q.Line[3]) { DrawLine(Q[0], Q[3]); Q.Line[3] = true; };
+    if (!Q.Line[10]) { DrawLine(Q[3], Q[7]); Q.Line[10] = true; };
+    if (!Q.Line[7]) { DrawLine(Q[7], Q[4]); Q.Line[7] = true; };
+  }
+  if (CurN[5][2] &lt; 0) {
+    if (!Q.Line[8]) { DrawLine(Q[1], Q[5]); Q.Line[8] = true; };
+    if (!Q.Line[5]) { DrawLine(Q[5], Q[6]); Q.Line[5] = true; };
+    if (!Q.Line[9]) { DrawLine(Q[6], Q[2]); Q.Line[9] = true; };
+    if (!Q.Line[1]) { DrawLine(Q[2], Q[1]); Q.Line[1] = true; };
+  }
+  Q.Line = [false,false,false,false,false,false,false,false,false,false,false,false];
+  Q.LastPx = 0;
+}
+
+function Loop() {
+  if (Testing.LoopCount &gt; Testing.LoopMax) return;
+  var TestingStr = String(Testing.LoopCount);
+  while (TestingStr.length &lt; 3) TestingStr = &quot;0&quot; + TestingStr;
+  MTrans = Translate(I, -Q[8].V[0], -Q[8].V[1], -Q[8].V[2]);
+  MTrans = RotateX(MTrans, 1);
+  MTrans = RotateY(MTrans, 3);
+  MTrans = RotateZ(MTrans, 5);
+  MTrans = Translate(MTrans, Q[8].V[0], Q[8].V[1], Q[8].V[2]);
+  MQube = MMulti(MTrans, MQube);
+  var i = 8;
+  for (; i &gt; -1; i--) {
+    Q[i].V = VMulti(MTrans, Q[i].V);
+  }
+  DrawQube();
+  Testing.LoopCount++;
+  Loop();
+}
+
+function Init(CubeSize) {
+  // init/reset vars
+  Origin.V = [150,150,20,1];
+  Testing.LoopCount = 0;
+  Testing.LoopMax = 50;
+  Testing.TimeMax = 0;
+  Testing.TimeAvg = 0;
+  Testing.TimeMin = 0;
+  Testing.TimeTemp = 0;
+  Testing.TimeTotal = 0;
+  Testing.Init = false;
+
+  // transformation matrix
+  MTrans = [
+  [1,0,0,0],
+  [0,1,0,0],
+  [0,0,1,0],
+  [0,0,0,1]
+  ];
+  
+  // position information of qube
+  MQube = [
+  [1,0,0,0],
+  [0,1,0,0],
+  [0,0,1,0],
+  [0,0,0,1]
+  ];
+  
+  // entity matrix
+  I = [
+  [1,0,0,0],
+  [0,1,0,0],
+  [0,0,1,0],
+  [0,0,0,1]
+  ];
+  
+  // create qube
+  Q[0] = new CreateP(-CubeSize,-CubeSize, CubeSize);
+  Q[1] = new CreateP(-CubeSize, CubeSize, CubeSize);
+  Q[2] = new CreateP( CubeSize, CubeSize, CubeSize);
+  Q[3] = new CreateP( CubeSize,-CubeSize, CubeSize);
+  Q[4] = new CreateP(-CubeSize,-CubeSize,-CubeSize);
+  Q[5] = new CreateP(-CubeSize, CubeSize,-CubeSize);
+  Q[6] = new CreateP( CubeSize, CubeSize,-CubeSize);
+  Q[7] = new CreateP( CubeSize,-CubeSize,-CubeSize);
+  
+  // center of gravity
+  Q[8] = new CreateP(0, 0, 0);
+  
+  // anti-clockwise edge check
+  Q.Edge = [[0,1,2],[3,2,6],[7,6,5],[4,5,1],[4,0,3],[1,5,6]];
+  
+  // calculate squad normals
+  Q.Normal = new Array();
+  for (var i = 0; i &lt; Q.Edge.length; i++) Q.Normal[i] = CalcNormal(Q[Q.Edge[i][0]].V, Q[Q.Edge[i][1]].V, Q[Q.Edge[i][2]].V);
+  
+  // line drawn ?
+  Q.Line = [false,false,false,false,false,false,false,false,false,false,false,false];
+  
+  // create line pixels
+  Q.NumPx = 9 * 2 * CubeSize;
+  for (var i = 0; i &lt; Q.NumPx; i++) CreateP(0,0,0);
+  
+  MTrans = Translate(MTrans, Origin.V[0], Origin.V[1], Origin.V[2]);
+  MQube = MMulti(MTrans, MQube);
+
+  var i = 0;
+  for (; i &lt; 9; i++) {
+    Q[i].V = VMulti(MTrans, Q[i].V);
+  }
+  DrawQube();
+  Testing.Init = true;
+  Loop();
+  
+  // Perform a simple sum-based verification.
+  var sum = 0;
+  for (var i = 0; i &lt; Q.length; ++i) {
+    var vector = Q[i].V;
+    for (var j = 0; j &lt; vector.length; ++j)
+      sum += vector[j];
+  }
+  if (sum != validation[CubeSize])
+    throw &quot;Error: bad vector sum for CubeSize = &quot; + CubeSize + &quot;; expected &quot; + validation[CubeSize] + &quot; but got &quot; + sum;
+}
+
+for ( var i = 20; i &lt;= 160; i *= 2 ) {
+  Init(i);
+}
+
+Q = null;
+MTrans = null;
+MQube = null;
+I = null;
+Origin = null;
+Testing = null;
+LoopTime = null;
+DisplArea = null;
+
+} catch (e) {
+    print(&quot;JSC EXCEPTION FUZZ: Caught exception: &quot; + e);
+}
</ins><span class="cx">Property changes on: trunk/Source/JavaScriptCore/tests/exceptionFuzz/3d-cube.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="allowtabs"></a>
<div class="addfile"><h4>Added: allow-tabs</h4></div>
<a id="trunkSourceJavaScriptCoretestsexceptionFuzzdateformatxparbjs"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/tests/exceptionFuzz/date-format-xparb.js (0 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/exceptionFuzz/date-format-xparb.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/tests/exceptionFuzz/date-format-xparb.js        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -0,0 +1,426 @@
</span><ins>+try {
+
+/*
+ * Copyright (C) 2004 Baron Schwartz &lt;baron at sequent dot org&gt;
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation, version 2.1.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
+ * details.
+ */
+
+Date.parseFunctions = {count:0};
+Date.parseRegexes = [];
+Date.formatFunctions = {count:0};
+
+Date.prototype.dateFormat = function(format) {
+    if (Date.formatFunctions[format] == null) {
+        Date.createNewFormat(format);
+    }
+    var func = Date.formatFunctions[format];
+    return this[func]();
+}
+
+Date.createNewFormat = function(format) {
+    var funcName = &quot;format&quot; + Date.formatFunctions.count++;
+    Date.formatFunctions[format] = funcName;
+    var code = &quot;Date.prototype.&quot; + funcName + &quot; = function(){return &quot;;
+    var special = false;
+    var ch = '';
+    for (var i = 0; i &lt; format.length; ++i) {
+        ch = format.charAt(i);
+        if (!special &amp;&amp; ch == &quot;\\&quot;) {
+            special = true;
+        }
+        else if (special) {
+            special = false;
+            code += &quot;'&quot; + String.escape(ch) + &quot;' + &quot;;
+        }
+        else {
+            code += Date.getFormatCode(ch);
+        }
+    }
+    eval(code.substring(0, code.length - 3) + &quot;;}&quot;);
+}
+
+Date.getFormatCode = function(character) {
+    switch (character) {
+    case &quot;d&quot;:
+        return &quot;String.leftPad(this.getDate(), 2, '0') + &quot;;
+    case &quot;D&quot;:
+        return &quot;Date.dayNames[this.getDay()].substring(0, 3) + &quot;;
+    case &quot;j&quot;:
+        return &quot;this.getDate() + &quot;;
+    case &quot;l&quot;:
+        return &quot;Date.dayNames[this.getDay()] + &quot;;
+    case &quot;S&quot;:
+        return &quot;this.getSuffix() + &quot;;
+    case &quot;w&quot;:
+        return &quot;this.getDay() + &quot;;
+    case &quot;z&quot;:
+        return &quot;this.getDayOfYear() + &quot;;
+    case &quot;W&quot;:
+        return &quot;this.getWeekOfYear() + &quot;;
+    case &quot;F&quot;:
+        return &quot;Date.monthNames[this.getMonth()] + &quot;;
+    case &quot;m&quot;:
+        return &quot;String.leftPad(this.getMonth() + 1, 2, '0') + &quot;;
+    case &quot;M&quot;:
+        return &quot;Date.monthNames[this.getMonth()].substring(0, 3) + &quot;;
+    case &quot;n&quot;:
+        return &quot;(this.getMonth() + 1) + &quot;;
+    case &quot;t&quot;:
+        return &quot;this.getDaysInMonth() + &quot;;
+    case &quot;L&quot;:
+        return &quot;(this.isLeapYear() ? 1 : 0) + &quot;;
+    case &quot;Y&quot;:
+        return &quot;this.getFullYear() + &quot;;
+    case &quot;y&quot;:
+        return &quot;('' + this.getFullYear()).substring(2, 4) + &quot;;
+    case &quot;a&quot;:
+        return &quot;(this.getHours() &lt; 12 ? 'am' : 'pm') + &quot;;
+    case &quot;A&quot;:
+        return &quot;(this.getHours() &lt; 12 ? 'AM' : 'PM') + &quot;;
+    case &quot;g&quot;:
+        return &quot;((this.getHours() %12) ? this.getHours() % 12 : 12) + &quot;;
+    case &quot;G&quot;:
+        return &quot;this.getHours() + &quot;;
+    case &quot;h&quot;:
+        return &quot;String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + &quot;;
+    case &quot;H&quot;:
+        return &quot;String.leftPad(this.getHours(), 2, '0') + &quot;;
+    case &quot;i&quot;:
+        return &quot;String.leftPad(this.getMinutes(), 2, '0') + &quot;;
+    case &quot;s&quot;:
+        return &quot;String.leftPad(this.getSeconds(), 2, '0') + &quot;;
+    case &quot;O&quot;:
+        return &quot;this.getGMTOffset() + &quot;;
+    case &quot;T&quot;:
+        return &quot;this.getTimezone() + &quot;;
+    case &quot;Z&quot;:
+        return &quot;(this.getTimezoneOffset() * -60) + &quot;;
+    default:
+        return &quot;'&quot; + String.escape(character) + &quot;' + &quot;;
+    }
+}
+
+Date.parseDate = function(input, format) {
+    if (Date.parseFunctions[format] == null) {
+        Date.createParser(format);
+    }
+    var func = Date.parseFunctions[format];
+    return Date[func](input);
+}
+
+Date.createParser = function(format) {
+    var funcName = &quot;parse&quot; + Date.parseFunctions.count++;
+    var regexNum = Date.parseRegexes.length;
+    var currentGroup = 1;
+    Date.parseFunctions[format] = funcName;
+
+    var code = &quot;Date.&quot; + funcName + &quot; = function(input){\n&quot;
+        + &quot;var y = -1, m = -1, d = -1, h = -1, i = -1, s = -1;\n&quot;
+        + &quot;var d = new Date();\n&quot;
+        + &quot;y = d.getFullYear();\n&quot;
+        + &quot;m = d.getMonth();\n&quot;
+        + &quot;d = d.getDate();\n&quot;
+        + &quot;var results = input.match(Date.parseRegexes[&quot; + regexNum + &quot;]);\n&quot;
+        + &quot;if (results &amp;&amp; results.length &gt; 0) {&quot;
+    var regex = &quot;&quot;;
+
+    var special = false;
+    var ch = '';
+    for (var i = 0; i &lt; format.length; ++i) {
+        ch = format.charAt(i);
+        if (!special &amp;&amp; ch == &quot;\\&quot;) {
+            special = true;
+        }
+        else if (special) {
+            special = false;
+            regex += String.escape(ch);
+        }
+        else {
+            obj = Date.formatCodeToRegex(ch, currentGroup);
+            currentGroup += obj.g;
+            regex += obj.s;
+            if (obj.g &amp;&amp; obj.c) {
+                code += obj.c;
+            }
+        }
+    }
+
+    code += &quot;if (y &gt; 0 &amp;&amp; m &gt;= 0 &amp;&amp; d &gt; 0 &amp;&amp; h &gt;= 0 &amp;&amp; i &gt;= 0 &amp;&amp; s &gt;= 0)\n&quot;
+        + &quot;{return new Date(y, m, d, h, i, s);}\n&quot;
+        + &quot;else if (y &gt; 0 &amp;&amp; m &gt;= 0 &amp;&amp; d &gt; 0 &amp;&amp; h &gt;= 0 &amp;&amp; i &gt;= 0)\n&quot;
+        + &quot;{return new Date(y, m, d, h, i);}\n&quot;
+        + &quot;else if (y &gt; 0 &amp;&amp; m &gt;= 0 &amp;&amp; d &gt; 0 &amp;&amp; h &gt;= 0)\n&quot;
+        + &quot;{return new Date(y, m, d, h);}\n&quot;
+        + &quot;else if (y &gt; 0 &amp;&amp; m &gt;= 0 &amp;&amp; d &gt; 0)\n&quot;
+        + &quot;{return new Date(y, m, d);}\n&quot;
+        + &quot;else if (y &gt; 0 &amp;&amp; m &gt;= 0)\n&quot;
+        + &quot;{return new Date(y, m);}\n&quot;
+        + &quot;else if (y &gt; 0)\n&quot;
+        + &quot;{return new Date(y);}\n&quot;
+        + &quot;}return null;}&quot;;
+
+    Date.parseRegexes[regexNum] = new RegExp(&quot;^&quot; + regex + &quot;$&quot;);
+    eval(code);
+}
+
+Date.formatCodeToRegex = function(character, currentGroup) {
+    switch (character) {
+    case &quot;D&quot;:
+        return {g:0,
+        c:null,
+        s:&quot;(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)&quot;};
+    case &quot;j&quot;:
+    case &quot;d&quot;:
+        return {g:1,
+            c:&quot;d = parseInt(results[&quot; + currentGroup + &quot;], 10);\n&quot;,
+            s:&quot;(\\d{1,2})&quot;};
+    case &quot;l&quot;:
+        return {g:0,
+            c:null,
+            s:&quot;(?:&quot; + Date.dayNames.join(&quot;|&quot;) + &quot;)&quot;};
+    case &quot;S&quot;:
+        return {g:0,
+            c:null,
+            s:&quot;(?:st|nd|rd|th)&quot;};
+    case &quot;w&quot;:
+        return {g:0,
+            c:null,
+            s:&quot;\\d&quot;};
+    case &quot;z&quot;:
+        return {g:0,
+            c:null,
+            s:&quot;(?:\\d{1,3})&quot;};
+    case &quot;W&quot;:
+        return {g:0,
+            c:null,
+            s:&quot;(?:\\d{2})&quot;};
+    case &quot;F&quot;:
+        return {g:1,
+            c:&quot;m = parseInt(Date.monthNumbers[results[&quot; + currentGroup + &quot;].substring(0, 3)], 10);\n&quot;,
+            s:&quot;(&quot; + Date.monthNames.join(&quot;|&quot;) + &quot;)&quot;};
+    case &quot;M&quot;:
+        return {g:1,
+            c:&quot;m = parseInt(Date.monthNumbers[results[&quot; + currentGroup + &quot;]], 10);\n&quot;,
+            s:&quot;(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)&quot;};
+    case &quot;n&quot;:
+    case &quot;m&quot;:
+        return {g:1,
+            c:&quot;m = parseInt(results[&quot; + currentGroup + &quot;], 10) - 1;\n&quot;,
+            s:&quot;(\\d{1,2})&quot;};
+    case &quot;t&quot;:
+        return {g:0,
+            c:null,
+            s:&quot;\\d{1,2}&quot;};
+    case &quot;L&quot;:
+        return {g:0,
+            c:null,
+            s:&quot;(?:1|0)&quot;};
+    case &quot;Y&quot;:
+        return {g:1,
+            c:&quot;y = parseInt(results[&quot; + currentGroup + &quot;], 10);\n&quot;,
+            s:&quot;(\\d{4})&quot;};
+    case &quot;y&quot;:
+        return {g:1,
+            c:&quot;var ty = parseInt(results[&quot; + currentGroup + &quot;], 10);\n&quot;
+                + &quot;y = ty &gt; Date.y2kYear ? 1900 + ty : 2000 + ty;\n&quot;,
+            s:&quot;(\\d{1,2})&quot;};
+    case &quot;a&quot;:
+        return {g:1,
+            c:&quot;if (results[&quot; + currentGroup + &quot;] == 'am') {\n&quot;
+                + &quot;if (h == 12) { h = 0; }\n&quot;
+                + &quot;} else { if (h &lt; 12) { h += 12; }}&quot;,
+            s:&quot;(am|pm)&quot;};
+    case &quot;A&quot;:
+        return {g:1,
+            c:&quot;if (results[&quot; + currentGroup + &quot;] == 'AM') {\n&quot;
+                + &quot;if (h == 12) { h = 0; }\n&quot;
+                + &quot;} else { if (h &lt; 12) { h += 12; }}&quot;,
+            s:&quot;(AM|PM)&quot;};
+    case &quot;g&quot;:
+    case &quot;G&quot;:
+    case &quot;h&quot;:
+    case &quot;H&quot;:
+        return {g:1,
+            c:&quot;h = parseInt(results[&quot; + currentGroup + &quot;], 10);\n&quot;,
+            s:&quot;(\\d{1,2})&quot;};
+    case &quot;i&quot;:
+        return {g:1,
+            c:&quot;i = parseInt(results[&quot; + currentGroup + &quot;], 10);\n&quot;,
+            s:&quot;(\\d{2})&quot;};
+    case &quot;s&quot;:
+        return {g:1,
+            c:&quot;s = parseInt(results[&quot; + currentGroup + &quot;], 10);\n&quot;,
+            s:&quot;(\\d{2})&quot;};
+    case &quot;O&quot;:
+        return {g:0,
+            c:null,
+            s:&quot;[+-]\\d{4}&quot;};
+    case &quot;T&quot;:
+        return {g:0,
+            c:null,
+            s:&quot;[A-Z]{3}&quot;};
+    case &quot;Z&quot;:
+        return {g:0,
+            c:null,
+            s:&quot;[+-]\\d{1,5}&quot;};
+    default:
+        return {g:0,
+            c:null,
+            s:String.escape(character)};
+    }
+}
+
+Date.prototype.getTimezone = function() {
+    return this.toString().replace(
+        /^.*? ([A-Z]{3}) [0-9]{4}.*$/, &quot;$1&quot;).replace(
+        /^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/, &quot;$1$2$3&quot;);
+}
+
+Date.prototype.getGMTOffset = function() {
+    return (this.getTimezoneOffset() &gt; 0 ? &quot;-&quot; : &quot;+&quot;)
+        + String.leftPad(Math.floor(this.getTimezoneOffset() / 60), 2, &quot;0&quot;)
+        + String.leftPad(this.getTimezoneOffset() % 60, 2, &quot;0&quot;);
+}
+
+Date.prototype.getDayOfYear = function() {
+    var num = 0;
+    Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28;
+    for (var i = 0; i &lt; this.getMonth(); ++i) {
+        num += Date.daysInMonth[i];
+    }
+    return num + this.getDate() - 1;
+}
+
+Date.prototype.getWeekOfYear = function() {
+    // Skip to Thursday of this week
+    var now = this.getDayOfYear() + (4 - this.getDay());
+    // Find the first Thursday of the year
+    var jan1 = new Date(this.getFullYear(), 0, 1);
+    var then = (7 - jan1.getDay() + 4);
+    document.write(then);
+    return String.leftPad(((now - then) / 7) + 1, 2, &quot;0&quot;);
+}
+
+Date.prototype.isLeapYear = function() {
+    var year = this.getFullYear();
+    return ((year &amp; 3) == 0 &amp;&amp; (year % 100 || (year % 400 == 0 &amp;&amp; year)));
+}
+
+Date.prototype.getFirstDayOfMonth = function() {
+    var day = (this.getDay() - (this.getDate() - 1)) % 7;
+    return (day &lt; 0) ? (day + 7) : day;
+}
+
+Date.prototype.getLastDayOfMonth = function() {
+    var day = (this.getDay() + (Date.daysInMonth[this.getMonth()] - this.getDate())) % 7;
+    return (day &lt; 0) ? (day + 7) : day;
+}
+
+Date.prototype.getDaysInMonth = function() {
+    Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28;
+    return Date.daysInMonth[this.getMonth()];
+}
+
+Date.prototype.getSuffix = function() {
+    switch (this.getDate()) {
+        case 1:
+        case 21:
+        case 31:
+            return &quot;st&quot;;
+        case 2:
+        case 22:
+            return &quot;nd&quot;;
+        case 3:
+        case 23:
+            return &quot;rd&quot;;
+        default:
+            return &quot;th&quot;;
+    }
+}
+
+String.escape = function(string) {
+    return string.replace(/('|\\)/g, &quot;\\$1&quot;);
+}
+
+String.leftPad = function (val, size, ch) {
+    var result = new String(val);
+    if (ch == null) {
+        ch = &quot; &quot;;
+    }
+    while (result.length &lt; size) {
+        result = ch + result;
+    }
+    return result;
+}
+
+Date.daysInMonth = [31,28,31,30,31,30,31,31,30,31,30,31];
+Date.monthNames =
+   [&quot;January&quot;,
+    &quot;February&quot;,
+    &quot;March&quot;,
+    &quot;April&quot;,
+    &quot;May&quot;,
+    &quot;June&quot;,
+    &quot;July&quot;,
+    &quot;August&quot;,
+    &quot;September&quot;,
+    &quot;October&quot;,
+    &quot;November&quot;,
+    &quot;December&quot;];
+Date.dayNames =
+   [&quot;Sunday&quot;,
+    &quot;Monday&quot;,
+    &quot;Tuesday&quot;,
+    &quot;Wednesday&quot;,
+    &quot;Thursday&quot;,
+    &quot;Friday&quot;,
+    &quot;Saturday&quot;];
+Date.y2kYear = 50;
+Date.monthNumbers = {
+    Jan:0,
+    Feb:1,
+    Mar:2,
+    Apr:3,
+    May:4,
+    Jun:5,
+    Jul:6,
+    Aug:7,
+    Sep:8,
+    Oct:9,
+    Nov:10,
+    Dec:11};
+Date.patterns = {
+    ISO8601LongPattern:&quot;Y-m-d H:i:s&quot;,
+    ISO8601ShortPattern:&quot;Y-m-d&quot;,
+    ShortDatePattern: &quot;n/j/Y&quot;,
+    LongDatePattern: &quot;l, F d, Y&quot;,
+    FullDateTimePattern: &quot;l, F d, Y g:i:s A&quot;,
+    MonthDayPattern: &quot;F d&quot;,
+    ShortTimePattern: &quot;g:i A&quot;,
+    LongTimePattern: &quot;g:i:s A&quot;,
+    SortableDateTimePattern: &quot;Y-m-d\\TH:i:s&quot;,
+    UniversalSortableDateTimePattern: &quot;Y-m-d H:i:sO&quot;,
+    YearMonthPattern: &quot;F, Y&quot;};
+
+var date = new Date(&quot;1/1/2007 1:11:11&quot;);
+
+for (i = 0; i &lt; 4000; ++i) {
+    var shortFormat = date.dateFormat(&quot;Y-m-d&quot;);
+    var longFormat = date.dateFormat(&quot;l, F d, Y g:i:s A&quot;);
+    date.setTime(date.getTime() + 84266956);
+}
+
+// FIXME: Find a way to validate this test.
+// https://bugs.webkit.org/show_bug.cgi?id=114849
+
+} catch (e) {
+    print(&quot;JSC EXCEPTION FUZZ: Caught exception: &quot; + e);
+}
</ins><span class="cx">Property changes on: trunk/Source/JavaScriptCore/tests/exceptionFuzz/date-format-xparb.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="allowtabs"></a>
<div class="addfile"><h4>Added: allow-tabs</h4></div>
<a id="trunkSourceJavaScriptCoretestsexceptionFuzzearleyboyerjs"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/tests/exceptionFuzz/earley-boyer.js (0 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/exceptionFuzz/earley-boyer.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/tests/exceptionFuzz/earley-boyer.js        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -0,0 +1,4689 @@
</span><ins>+try {
+// This file is automatically generated by scheme2js, except for the
+// benchmark harness code at the beginning and end of the file.
+
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/*
+ * To use write/prints/... the default-output port has to be set first.
+ * Simply setting SC_DEFAULT_OUT and SC_ERROR_OUT to the desired values
+ * should do the trick.
+ * In the following example the std-out and error-port are redirected to
+ * a DIV.
+function initRuntime() {
+    function escapeHTML(s) {
+        var tmp = s;
+        tmp = tmp.replace(/&amp;/g, &quot;&amp;amp;&quot;);
+        tmp = tmp.replace(/&lt;/g, &quot;&amp;lt;&quot;);
+        tmp = tmp.replace(/&gt;/g, &quot;&amp;gt;&quot;);
+        tmp = tmp.replace(/ /g, &quot;&amp;nbsp;&quot;);
+        tmp = tmp.replace(/\n/g, &quot;&lt;br /&gt;&quot;);
+        tmp = tmp.replace(/\t/g, &quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp&quot;);
+        return tmp;
+        
+    }
+
+    document.write(&quot;&lt;div id='stdout'&gt;&lt;/div&gt;&quot;);
+    SC_DEFAULT_OUT = new sc_GenericOutputPort(
+        function(s) {
+            var stdout = document.getElementById('stdout');
+            stdout.innerHTML = stdout.innerHTML + escapeHTML(s);
+        });
+    SC_ERROR_OUT = SC_DEFAULT_OUT;
+}
+*/
+
+
+function sc_print_debug() {
+    sc_print.apply(null, arguments);
+}
+/*** META ((export *js*)) */
+var sc_JS_GLOBALS = this;
+
+var __sc_LINE=-1;
+var __sc_FILE=&quot;&quot;;
+
+/*** META ((export #t)) */
+function sc_alert() {
+   var len = arguments.length;
+   var s = &quot;&quot;;
+   var i;
+
+   for( i = 0; i &lt; len; i++ ) {
+       s += sc_toDisplayString(arguments[ i ]);
+   }
+
+   return alert( s );
+}
+
+/*** META ((export #t)) */
+function sc_typeof( x ) {
+   return typeof x;
+}
+
+/*** META ((export #t)) */
+function sc_error() {
+    var a = [sc_jsstring2symbol(&quot;*error*&quot;)];
+    for (var i = 0; i &lt; arguments.length; i++) {
+        a[i+1] = arguments[i];
+    }
+    throw a;
+}
+
+/*** META ((export #t)
+           (peephole (prefix &quot;throw &quot;)))
+*/
+function sc_raise(obj) {
+    throw obj;
+}
+
+/*** META ((export with-handler-lambda)) */
+function sc_withHandlerLambda(handler, body) {
+    try {
+        return body();
+    } catch(e) {
+        if (!e._internalException)
+            return handler(e);
+        else
+            throw e;
+    }
+}
+
+var sc_properties = new Object();
+
+/*** META ((export #t)) */
+function sc_putpropBang(sym, key, val) {
+    var ht = sc_properties[sym];
+    if (!ht) {
+        ht = new Object();
+        sc_properties[sym] = ht;
+    }
+    ht[key] = val;
+}
+
+/*** META ((export #t)) */
+function sc_getprop(sym, key) {
+    var ht = sc_properties[sym];
+    if (ht) {
+        if (key in ht)
+            return ht[key];
+        else
+            return false;
+    } else
+        return false;
+}
+
+/*** META ((export #t)) */
+function sc_rempropBang(sym, key) {
+    var ht = sc_properties[sym];
+    if (ht)
+        delete ht[key];
+}
+
+/*** META ((export #t)) */
+function sc_any2String(o) {
+    return jsstring2string(sc_toDisplayString(o));
+}    
+
+/*** META ((export #t)
+           (peephole (infix 2 2 &quot;===&quot;))
+           (type bool))
+*/
+function sc_isEqv(o1, o2) {
+    return (o1 === o2);
+}
+
+/*** META ((export #t)
+           (peephole (infix 2 2 &quot;===&quot;))
+           (type bool))
+*/
+function sc_isEq(o1, o2) {
+    return (o1 === o2);
+}
+
+/*** META ((export #t)
+           (type bool))
+*/
+function sc_isNumber(n) {
+    return (typeof n === &quot;number&quot;);
+}
+
+/*** META ((export #t)
+           (type bool))
+*/
+function sc_isComplex(n) {
+    return sc_isNumber(n);
+}
+
+/*** META ((export #t)
+           (type bool))
+*/
+function sc_isReal(n) {
+    return sc_isNumber(n);
+}
+
+/*** META ((export #t)
+           (type bool))
+*/
+function sc_isRational(n) {
+    return sc_isReal(n);
+}
+
+/*** META ((export #t)
+           (type bool))
+*/
+function sc_isInteger(n) {
+    return (parseInt(n) === n);
+}
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (postfix &quot;, false&quot;)))
+*/
+// we don't have exact numbers...
+function sc_isExact(n) {
+    return false;
+}
+
+/*** META ((export #t)
+           (peephole (postfix &quot;, true&quot;))
+           (type bool))
+*/
+function sc_isInexact(n) {
+    return true;
+}
+
+/*** META ((export = =fx =fl)
+           (type bool)
+           (peephole (infix 2 2 &quot;===&quot;)))
+*/
+function sc_equal(x) {
+    for (var i = 1; i &lt; arguments.length; i++)
+        if (x !== arguments[i])
+            return false;
+    return true;
+}
+
+/*** META ((export &lt; &lt;fx &lt;fl)
+           (type bool)
+           (peephole (infix 2 2 &quot;&lt;&quot;)))
+*/
+function sc_less(x) {
+    for (var i = 1; i &lt; arguments.length; i++) {
+        if (x &gt;= arguments[i])
+            return false;
+        x = arguments[i];
+    }
+    return true;
+}
+
+/*** META ((export &gt; &gt;fx &gt;fl)
+           (type bool)
+           (peephole (infix 2 2 &quot;&gt;&quot;)))
+*/
+function sc_greater(x, y) {
+    for (var i = 1; i &lt; arguments.length; i++) {
+        if (x &lt;= arguments[i])
+            return false;
+        x = arguments[i];
+    }
+    return true;
+}
+
+/*** META ((export &lt;= &lt;=fx &lt;=fl)
+           (type bool)
+           (peephole (infix 2 2 &quot;&lt;=&quot;)))
+*/
+function sc_lessEqual(x, y) {
+    for (var i = 1; i &lt; arguments.length; i++) {
+        if (x &gt; arguments[i])
+            return false;
+        x = arguments[i];
+    }
+    return true;
+}
+
+/*** META ((export &gt;= &gt;=fl &gt;=fx)
+           (type bool)
+           (peephole (infix 2 2 &quot;&gt;=&quot;)))
+*/
+function sc_greaterEqual(x, y) {
+    for (var i = 1; i &lt; arguments.length; i++) {
+        if (x &lt; arguments[i])
+            return false;
+        x = arguments[i];
+    }
+    return true;
+}
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (postfix &quot;=== 0&quot;)))
+*/
+function sc_isZero(x) {
+    return (x === 0);
+}
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (postfix &quot;&gt; 0&quot;)))
+*/
+function sc_isPositive(x) {
+    return (x &gt; 0);
+}
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (postfix &quot;&lt; 0&quot;)))
+*/
+function sc_isNegative(x) {
+    return (x &lt; 0);
+}
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (postfix &quot;%2===1&quot;)))
+*/
+function sc_isOdd(x) {
+    return (x % 2 === 1);
+}
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (postfix &quot;%2===0&quot;)))
+*/
+function sc_isEven(x) {
+    return (x % 2 === 0);
+}
+
+/*** META ((export #t)) */
+var sc_max = Math.max;
+/*** META ((export #t)) */
+var sc_min = Math.min;
+
+/*** META ((export + +fx +fl)
+           (peephole (infix 0 #f &quot;+&quot; &quot;0&quot;)))
+*/
+function sc_plus() {
+    var sum = 0;
+    for (var i = 0; i &lt; arguments.length; i++)
+        sum += arguments[i];
+    return sum;
+}
+
+/*** META ((export * *fx *fl)
+           (peephole (infix 0 #f &quot;*&quot; &quot;1&quot;)))
+*/
+function sc_multi() {
+    var product = 1;
+    for (var i = 0; i &lt; arguments.length; i++)
+        product *= arguments[i];
+    return product;
+}
+
+/*** META ((export - -fx -fl)
+           (peephole (minus)))
+*/
+function sc_minus(x) {
+    if (arguments.length === 1)
+        return -x;
+    else {
+        var res = x;
+        for (var i = 1; i &lt; arguments.length; i++)
+            res -= arguments[i];
+        return res;
+    }
+}
+
+/*** META ((export / /fl)
+           (peephole (div)))
+*/
+function sc_div(x) {
+    if (arguments.length === 1)
+        return 1/x;
+    else {
+        var res = x;
+        for (var i = 1; i &lt; arguments.length; i++)
+            res /= arguments[i];
+        return res;
+    }
+}
+
+/*** META ((export #t)) */
+var sc_abs = Math.abs;
+
+/*** META ((export quotient /fx)
+           (peephole (hole 2 &quot;parseInt(&quot; x &quot;/&quot; y &quot;)&quot;)))
+*/
+function sc_quotient(x, y) {
+    return parseInt(x / y);
+}
+
+/*** META ((export #t)
+           (peephole (infix 2 2 &quot;%&quot;)))
+*/
+function sc_remainder(x, y) {
+    return x % y;
+}
+
+/*** META ((export #t)
+           (peephole (modulo)))
+*/
+function sc_modulo(x, y) {
+    var remainder = x % y;
+    // if they don't have the same sign
+    if ((remainder * y) &lt; 0)
+        return remainder + y;
+    else
+        return remainder;
+}
+
+function sc_euclid_gcd(a, b) {
+    var temp;
+    if (a === 0) return b;
+    if (b === 0) return a;
+    if (a &lt; 0) {a = -a;};
+    if (b &lt; 0) {b = -b;};
+    if (b &gt; a) {temp = a; a = b; b = temp;};
+    while (true) {
+        a %= b;
+        if(a === 0) {return b;};
+        b %= a;
+        if(b === 0) {return a;};
+    };
+    return b;
+}
+
+/*** META ((export #t)) */
+function sc_gcd() {
+    var gcd = 0;
+    for (var i = 0; i &lt; arguments.length; i++)
+        gcd = sc_euclid_gcd(gcd, arguments[i]);
+    return gcd;
+}
+
+/*** META ((export #t)) */
+function sc_lcm() {
+    var lcm = 1;
+    for (var i = 0; i &lt; arguments.length; i++) {
+        var f = Math.round(arguments[i] / sc_euclid_gcd(arguments[i], lcm));
+        lcm *= Math.abs(f);
+    }
+    return lcm;
+}
+
+// LIMITATION: numerator and denominator don't make sense in floating point world.
+//var SC_MAX_DECIMALS = 1000000
+//
+// function sc_numerator(x) {
+//     var rounded = Math.round(x * SC_MAX_DECIMALS);
+//     return Math.round(rounded / sc_euclid_gcd(rounded, SC_MAX_DECIMALS));
+// }
+
+// function sc_denominator(x) {
+//     var rounded = Math.round(x * SC_MAX_DECIMALS);
+//     return Math.round(SC_MAX_DECIMALS / sc_euclid_gcd(rounded, SC_MAX_DECIMALS));
+// }
+
+/*** META ((export #t)) */
+var sc_floor = Math.floor;
+/*** META ((export #t)) */
+var sc_ceiling = Math.ceil;
+/*** META ((export #t)) */
+var sc_truncate = parseInt;
+/*** META ((export #t)) */
+var sc_round = Math.round;
+
+// LIMITATION: sc_rationalize doesn't make sense in a floating point world.
+
+/*** META ((export #t)) */
+var sc_exp = Math.exp;
+/*** META ((export #t)) */
+var sc_log = Math.log;
+/*** META ((export #t)) */
+var sc_sin = Math.sin;
+/*** META ((export #t)) */
+var sc_cos = Math.cos;
+/*** META ((export #t)) */
+var sc_tan = Math.tan;
+/*** META ((export #t)) */
+var sc_asin = Math.asin;
+/*** META ((export #t)) */
+var sc_acos = Math.acos;
+/*** META ((export #t)) */
+var sc_atan = Math.atan;
+
+/*** META ((export #t)) */
+var sc_sqrt = Math.sqrt;
+/*** META ((export #t)) */
+var sc_expt = Math.pow;
+
+// LIMITATION: we don't have complex numbers.
+// LIMITATION: the following functions are hence not implemented.
+// LIMITATION: make-rectangular, make-polar, real-part, imag-part, magnitude, angle
+// LIMITATION: 2 argument atan
+
+/*** META ((export #t)
+           (peephole (id)))
+*/
+function sc_exact2inexact(x) {
+    return x;
+}
+
+/*** META ((export #t)
+           (peephole (id)))
+*/
+function sc_inexact2exact(x) {
+    return x;
+}
+
+function sc_number2jsstring(x, radix) {
+    if (radix)
+        return x.toString(radix);
+    else
+        return x.toString();
+}
+
+function sc_jsstring2number(s, radix) {
+    if (s === &quot;&quot;) return false;
+
+    if (radix) {
+        var t = parseInt(s, radix);
+        if (!t &amp;&amp; t !== 0) return false;
+        // verify that each char is in range. (parseInt ignores leading
+        // white and trailing chars)
+        var allowedChars = &quot;01234567890abcdefghijklmnopqrstuvwxyz&quot;.substring(0, radix+1);
+        if ((new RegExp(&quot;^[&quot;+allowedChars+&quot;]*$&quot;, &quot;i&quot;)).test(s))
+            return t;
+        else return false;
+    } else {
+        var t = +s; // does not ignore trailing chars.
+        if (!t &amp;&amp; t !== 0) return false;
+        // simply verify that first char is not whitespace.
+        var c = s.charAt(0);
+        // if +c is 0, but the char is not &quot;0&quot;, then we have a whitespace.
+        if (+c === 0 &amp;&amp; c !== &quot;0&quot;) return false;
+        return t;
+    }
+}
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (not)))
+*/
+function sc_not(b) {
+    return b === false;
+}
+
+/*** META ((export #t)
+           (type bool))
+*/
+function sc_isBoolean(b) {
+    return (b === true) || (b === false);
+}
+
+function sc_Pair(car, cdr) {
+    this.car = car;
+    this.cdr = cdr;
+}
+
+sc_Pair.prototype.toString = function() {
+    return sc_toDisplayString(this);
+};
+sc_Pair.prototype.sc_toWriteOrDisplayString = function(writeOrDisplay) {
+    var current = this;
+
+    var res = &quot;(&quot;;
+
+    while(true) {
+        res += writeOrDisplay(current.car);
+        if (sc_isPair(current.cdr)) {
+            res += &quot; &quot;;
+            current = current.cdr;
+        } else if (current.cdr !== null) {
+            res += &quot; . &quot; + writeOrDisplay(current.cdr);
+            break;
+        } else // current.cdr == null
+            break;
+    }
+        
+    res += &quot;)&quot;;
+
+    return res;
+};
+sc_Pair.prototype.sc_toDisplayString = function() {
+    return this.sc_toWriteOrDisplayString(sc_toDisplayString);
+};
+sc_Pair.prototype.sc_toWriteString = function() {
+    return this.sc_toWriteOrDisplayString(sc_toWriteString);
+};
+// sc_Pair.prototype.sc_toWriteCircleString in IO.js
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (postfix &quot; instanceof sc_Pair&quot;)))
+*/
+function sc_isPair(p) {
+    return (p instanceof sc_Pair);
+}
+
+function sc_isPairEqual(p1, p2, comp) {
+    return (comp(p1.car, p2.car) &amp;&amp; comp(p1.cdr, p2.cdr));
+}
+
+/*** META ((export #t)
+           (peephole (hole 2 &quot;new sc_Pair(&quot; car &quot;, &quot; cdr &quot;)&quot;)))
+*/
+function sc_cons(car, cdr) {
+    return new sc_Pair(car, cdr);
+}
+
+/*** META ((export cons*)) */
+function sc_consStar() {
+    var res = arguments[arguments.length - 1];
+    for (var i = arguments.length-2; i &gt;= 0; i--)
+        res = new sc_Pair(arguments[i], res);
+    return res;
+}
+
+/*** META ((export #t)
+           (peephole (postfix &quot;.car&quot;)))
+*/
+function sc_car(p) {
+    return p.car;
+}
+
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr&quot;)))
+*/
+function sc_cdr(p) {
+    return p.cdr;
+}
+
+/*** META ((export #t)
+           (peephole (hole 2 p &quot;.car = &quot; val)))
+*/
+function sc_setCarBang(p, val) {
+    p.car = val;
+}
+
+/*** META ((export #t)
+           (peephole (hole 2 p &quot;.cdr = &quot; val)))
+*/
+function sc_setCdrBang(p, val) {
+    p.cdr = val;
+}
+
+/*** META ((export #t)
+           (peephole (postfix &quot;.car.car&quot;)))
+*/
+function sc_caar(p) { return p.car.car; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr.car&quot;)))
+*/
+function sc_cadr(p) { return p.cdr.car; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.car.cdr&quot;)))
+*/
+function sc_cdar(p) { return p.car.cdr; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr.cdr&quot;)))
+*/
+function sc_cddr(p) { return p.cdr.cdr; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.car.car.car&quot;)))
+*/
+function sc_caaar(p) { return p.car.car.car; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.car.cdr.car&quot;)))
+*/
+function sc_cadar(p) { return p.car.cdr.car; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr.car.car&quot;)))
+*/
+function sc_caadr(p) { return p.cdr.car.car; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr.cdr.car&quot;)))
+*/
+function sc_caddr(p) { return p.cdr.cdr.car; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.car.car.cdr&quot;)))
+*/
+function sc_cdaar(p) { return p.car.car.cdr; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr.car.cdr&quot;)))
+*/
+function sc_cdadr(p) { return p.cdr.car.cdr; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.car.cdr.cdr&quot;)))
+*/
+function sc_cddar(p) { return p.car.cdr.cdr; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr.cdr.cdr&quot;)))
+*/
+function sc_cdddr(p) { return p.cdr.cdr.cdr; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.car.car.car.car&quot;)))
+*/
+function sc_caaaar(p) { return p.car.car.car.car; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.car.cdr.car.car&quot;)))
+*/
+function sc_caadar(p) { return p.car.cdr.car.car; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr.car.car.car&quot;)))
+*/
+function sc_caaadr(p) { return p.cdr.car.car.car; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr.cdr.car.car&quot;)))
+*/
+function sc_caaddr(p) { return p.cdr.cdr.car.car; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.car.car.car.cdr&quot;)))
+*/
+function sc_cdaaar(p) { return p.car.car.car.cdr; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.car.cdr.car.cdr&quot;)))
+*/
+function sc_cdadar(p) { return p.car.cdr.car.cdr; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr.car.car.cdr&quot;)))
+*/
+function sc_cdaadr(p) { return p.cdr.car.car.cdr; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr.cdr.car.cdr&quot;)))
+*/
+function sc_cdaddr(p) { return p.cdr.cdr.car.cdr; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.car.car.cdr.car&quot;)))
+*/
+function sc_cadaar(p) { return p.car.car.cdr.car; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.car.cdr.cdr.car&quot;)))
+*/
+function sc_caddar(p) { return p.car.cdr.cdr.car; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr.car.cdr.car&quot;)))
+*/
+function sc_cadadr(p) { return p.cdr.car.cdr.car; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr.cdr.cdr.car&quot;)))
+*/
+function sc_cadddr(p) { return p.cdr.cdr.cdr.car; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.car.car.cdr.cdr&quot;)))
+*/
+function sc_cddaar(p) { return p.car.car.cdr.cdr; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.car.cdr.cdr.cdr&quot;)))
+*/
+function sc_cdddar(p) { return p.car.cdr.cdr.cdr; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr.car.cdr.cdr&quot;)))
+*/
+function sc_cddadr(p) { return p.cdr.car.cdr.cdr; }
+/*** META ((export #t)
+           (peephole (postfix &quot;.cdr.cdr.cdr.cdr&quot;)))
+*/
+function sc_cddddr(p) { return p.cdr.cdr.cdr.cdr; }
+
+/*** META ((export #t)) */
+function sc_lastPair(l) {
+    if (!sc_isPair(l)) sc_error(&quot;sc_lastPair: pair expected&quot;);
+    var res = l;
+    var cdr = l.cdr;
+    while (sc_isPair(cdr)) {
+        res = cdr;
+        cdr = res.cdr;
+    }
+    return res;
+}
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (postfix &quot; === null&quot;)))
+*/
+function sc_isNull(o) {
+    return (o === null);
+}
+
+/*** META ((export #t)
+           (type bool))
+*/
+function sc_isList(o) {
+    var rabbit;
+    var turtle;
+
+    var rabbit = o;
+    var turtle = o;
+    while (true) {
+        if (rabbit === null ||
+            (rabbit instanceof sc_Pair &amp;&amp; rabbit.cdr === null))
+            return true;  // end of list
+        else if ((rabbit instanceof sc_Pair) &amp;&amp;
+                 (rabbit.cdr instanceof sc_Pair)) {
+            rabbit = rabbit.cdr.cdr;
+            turtle = turtle.cdr;
+            if (rabbit === turtle) return false; // cycle
+        } else
+            return false; // not pair
+    }
+}
+
+/*** META ((export #t)) */
+function sc_list() {
+    var res = null;
+    var a = arguments;
+    for (var i = a.length-1; i &gt;= 0; i--)
+        res = new sc_Pair(a[i], res);
+    return res;
+}
+
+/*** META ((export #t)) */
+function sc_iota(num, init) {
+   var res = null;
+   if (!init) init = 0;
+   for (var i = num - 1; i &gt;= 0; i--)
+      res = new sc_Pair(i + init, res);
+   return res;
+}
+
+/*** META ((export #t)) */
+function sc_makeList(nbEls, fill) {
+    var res = null;
+    for (var i = 0; i &lt; nbEls; i++)
+        res = new sc_Pair(fill, res);
+    return res;
+}
+
+/*** META ((export #t)) */
+function sc_length(l) {
+    var res = 0;
+    while (l !== null) {
+        res++;
+        l = l.cdr;
+    }
+    return res;
+}
+
+/*** META ((export #t)) */
+function sc_remq(o, l) {
+    var dummy = { cdr : null };
+    var tail = dummy;
+    while (l !== null) {
+        if (l.car !== o) {
+            tail.cdr = sc_cons(l.car, null);
+            tail = tail.cdr;
+        }
+        l = l.cdr;
+    }
+    return dummy.cdr;
+}
+
+/*** META ((export #t)) */
+function sc_remqBang(o, l) {
+    var dummy = { cdr : null };
+    var tail = dummy;
+    var needsAssig = true;
+    while (l !== null) {
+        if (l.car === o) {
+            needsAssig = true;
+        } else {
+            if (needsAssig) {
+                tail.cdr = l;
+                needsAssig = false;
+            }
+            tail = l;
+        }
+        l = l.cdr;
+    }
+    tail.cdr = null;
+    return dummy.cdr;
+}
+
+/*** META ((export #t)) */
+function sc_delete(o, l) {
+    var dummy = { cdr : null };
+    var tail = dummy;
+    while (l !== null) {
+        if (!sc_isEqual(l.car, o)) {
+            tail.cdr = sc_cons(l.car, null);
+            tail = tail.cdr;
+        }
+        l = l.cdr;
+    }
+    return dummy.cdr;
+}
+
+/*** META ((export #t)) */
+function sc_deleteBang(o, l) {
+    var dummy = { cdr : null };
+    var tail = dummy;
+    var needsAssig = true;
+    while (l !== null) {
+        if (sc_isEqual(l.car, o)) {
+            needsAssig = true;
+        } else {
+            if (needsAssig) {
+                tail.cdr = l;
+                needsAssig = false;
+            }
+            tail = l;
+        }
+        l = l.cdr;
+    }
+    tail.cdr = null;
+    return dummy.cdr;
+}
+
+function sc_reverseAppendBang(l1, l2) {
+    var res = l2;
+    while (l1 !== null) {
+        var tmp = res;
+        res = l1;
+        l1 = l1.cdr;
+        res.cdr = tmp;
+    }
+    return res;
+}
+        
+function sc_dualAppend(l1, l2) {
+    if (l1 === null) return l2;
+    if (l2 === null) return l1;
+    var rev = sc_reverse(l1);
+    return sc_reverseAppendBang(rev, l2);
+}
+
+/*** META ((export #t)) */
+function sc_append() {
+    if (arguments.length === 0)
+        return null;
+    var res = arguments[arguments.length - 1];
+    for (var i = arguments.length - 2; i &gt;= 0; i--)
+        res = sc_dualAppend(arguments[i], res);
+    return res;
+}
+
+function sc_dualAppendBang(l1, l2) {
+    if (l1 === null) return l2;
+    if (l2 === null) return l1;
+    var tmp = l1;
+    while (tmp.cdr !== null) tmp=tmp.cdr;
+    tmp.cdr = l2;
+    return l1;
+}
+    
+/*** META ((export #t)) */
+function sc_appendBang() {
+    var res = null;
+    for (var i = 0; i &lt; arguments.length; i++)
+        res = sc_dualAppendBang(res, arguments[i]);
+    return res;
+}
+
+/*** META ((export #t)) */
+function sc_reverse(l1) {
+    var res = null;
+    while (l1 !== null) {
+        res = sc_cons(l1.car, res);
+        l1 = l1.cdr;
+    }
+    return res;
+}
+
+/*** META ((export #t)) */
+function sc_reverseBang(l) {
+    return sc_reverseAppendBang(l, null);
+}
+
+/*** META ((export #t)) */
+function sc_listTail(l, k) {
+    var res = l;
+    for (var i = 0; i &lt; k; i++) {
+        res = res.cdr;
+    }
+    return res;
+}
+
+/*** META ((export #t)) */
+function sc_listRef(l, k) {
+    return sc_listTail(l, k).car;
+}
+
+/* // unoptimized generic versions
+function sc_memX(o, l, comp) {
+    while (l != null) {
+        if (comp(l.car, o))
+            return l;
+        l = l.cdr;
+    }
+    return false;
+}
+function sc_memq(o, l) { return sc_memX(o, l, sc_isEq); }
+function sc_memv(o, l) { return sc_memX(o, l, sc_isEqv); }
+function sc_member(o, l) { return sc_memX(o, l, sc_isEqual); }
+*/
+
+/* optimized versions */
+/*** META ((export #t)) */
+function sc_memq(o, l) {
+    while (l !== null) {
+        if (l.car === o)
+            return l;
+        l = l.cdr;
+    }
+    return false;
+}
+/*** META ((export #t)) */
+function sc_memv(o, l) {
+    while (l !== null) {
+        if (l.car === o)
+            return l;
+        l = l.cdr;
+    }
+    return false;
+}
+/*** META ((export #t)) */
+function sc_member(o, l) {
+    while (l !== null) {
+        if (sc_isEqual(l.car,o))
+            return l;
+        l = l.cdr;
+    }
+    return false;
+}
+
+/* // generic unoptimized versions
+function sc_assX(o, al, comp) {
+    while (al != null) {
+        if (comp(al.car.car, o))
+            return al.car;
+        al = al.cdr;
+    }
+    return false;
+}
+function sc_assq(o, al) { return sc_assX(o, al, sc_isEq); }
+function sc_assv(o, al) { return sc_assX(o, al, sc_isEqv); }
+function sc_assoc(o, al) { return sc_assX(o, al, sc_isEqual); }
+*/
+// optimized versions
+/*** META ((export #t)) */
+function sc_assq(o, al) {
+    while (al !== null) {
+        if (al.car.car === o)
+            return al.car;
+        al = al.cdr;
+    }
+    return false;
+}
+/*** META ((export #t)) */
+function sc_assv(o, al) {
+    while (al !== null) {
+        if (al.car.car === o)
+            return al.car;
+        al = al.cdr;
+    }
+    return false;
+}
+/*** META ((export #t)) */
+function sc_assoc(o, al) {
+    while (al !== null) {
+        if (sc_isEqual(al.car.car, o))
+            return al.car;
+        al = al.cdr;
+    }
+    return false;
+}
+
+/* can be used for mutable strings and characters */
+function sc_isCharStringEqual(cs1, cs2) { return cs1.val === cs2.val; }
+function sc_isCharStringLess(cs1, cs2) { return cs1.val &lt; cs2.val; }
+function sc_isCharStringGreater(cs1, cs2) { return cs1.val &gt; cs2.val; }
+function sc_isCharStringLessEqual(cs1, cs2) { return cs1.val &lt;= cs2.val; }
+function sc_isCharStringGreaterEqual(cs1, cs2) { return cs1.val &gt;= cs2.val; }
+function sc_isCharStringCIEqual(cs1, cs2)
+    { return cs1.val.toLowerCase() === cs2.val.toLowerCase(); }
+function sc_isCharStringCILess(cs1, cs2)
+    { return cs1.val.toLowerCase() &lt; cs2.val.toLowerCase(); }
+function sc_isCharStringCIGreater(cs1, cs2)
+    { return cs1.val.toLowerCase() &gt; cs2.val.toLowerCase(); }
+function sc_isCharStringCILessEqual(cs1, cs2)
+    { return cs1.val.toLowerCase() &lt;= cs2.val.toLowerCase(); }
+function sc_isCharStringCIGreaterEqual(cs1, cs2)
+    { return cs1.val.toLowerCase() &gt;= cs2.val.toLowerCase(); }
+
+
+
+
+function sc_Char(c) {
+    var cached = sc_Char.lazy[c];
+    if (cached)
+        return cached;
+    this.val = c;
+    sc_Char.lazy[c] = this;
+    // add return, so FF does not complain.
+    return undefined;
+}
+sc_Char.lazy = new Object();
+// thanks to Eric
+sc_Char.char2readable = {
+    &quot;\000&quot;: &quot;#\\null&quot;,
+    &quot;\007&quot;: &quot;#\\bell&quot;,
+    &quot;\010&quot;: &quot;#\\backspace&quot;,
+    &quot;\011&quot;: &quot;#\\tab&quot;,
+    &quot;\012&quot;: &quot;#\\newline&quot;,
+    &quot;\014&quot;: &quot;#\\page&quot;,
+    &quot;\015&quot;: &quot;#\\return&quot;,
+    &quot;\033&quot;: &quot;#\\escape&quot;,
+    &quot;\040&quot;: &quot;#\\space&quot;,
+    &quot;\177&quot;: &quot;#\\delete&quot;,
+
+  /* poeticless names */
+    &quot;\001&quot;: &quot;#\\soh&quot;,
+    &quot;\002&quot;: &quot;#\\stx&quot;,
+    &quot;\003&quot;: &quot;#\\etx&quot;,
+    &quot;\004&quot;: &quot;#\\eot&quot;,
+    &quot;\005&quot;: &quot;#\\enq&quot;,
+    &quot;\006&quot;: &quot;#\\ack&quot;,
+
+    &quot;\013&quot;: &quot;#\\vt&quot;,
+    &quot;\016&quot;: &quot;#\\so&quot;,
+    &quot;\017&quot;: &quot;#\\si&quot;,
+
+    &quot;\020&quot;: &quot;#\\dle&quot;,
+    &quot;\021&quot;: &quot;#\\dc1&quot;,
+    &quot;\022&quot;: &quot;#\\dc2&quot;,
+    &quot;\023&quot;: &quot;#\\dc3&quot;,
+    &quot;\024&quot;: &quot;#\\dc4&quot;,
+    &quot;\025&quot;: &quot;#\\nak&quot;,
+    &quot;\026&quot;: &quot;#\\syn&quot;,
+    &quot;\027&quot;: &quot;#\\etb&quot;,
+
+    &quot;\030&quot;: &quot;#\\can&quot;,
+    &quot;\031&quot;: &quot;#\\em&quot;,
+    &quot;\032&quot;: &quot;#\\sub&quot;,
+    &quot;\033&quot;: &quot;#\\esc&quot;,
+    &quot;\034&quot;: &quot;#\\fs&quot;,
+    &quot;\035&quot;: &quot;#\\gs&quot;,
+    &quot;\036&quot;: &quot;#\\rs&quot;,
+    &quot;\037&quot;: &quot;#\\us&quot;};
+
+sc_Char.readable2char = {
+    &quot;null&quot;: &quot;\000&quot;,
+    &quot;bell&quot;: &quot;\007&quot;,
+    &quot;backspace&quot;: &quot;\010&quot;,
+    &quot;tab&quot;: &quot;\011&quot;,
+    &quot;newline&quot;: &quot;\012&quot;,
+    &quot;page&quot;: &quot;\014&quot;,
+    &quot;return&quot;: &quot;\015&quot;,
+    &quot;escape&quot;: &quot;\033&quot;,
+    &quot;space&quot;: &quot;\040&quot;,
+    &quot;delete&quot;: &quot;\000&quot;,
+    &quot;soh&quot;: &quot;\001&quot;,
+    &quot;stx&quot;: &quot;\002&quot;,
+    &quot;etx&quot;: &quot;\003&quot;,
+    &quot;eot&quot;: &quot;\004&quot;,
+    &quot;enq&quot;: &quot;\005&quot;,
+    &quot;ack&quot;: &quot;\006&quot;,
+    &quot;bel&quot;: &quot;\007&quot;,
+    &quot;bs&quot;: &quot;\010&quot;,
+    &quot;ht&quot;: &quot;\011&quot;,
+    &quot;nl&quot;: &quot;\012&quot;,
+    &quot;vt&quot;: &quot;\013&quot;,
+    &quot;np&quot;: &quot;\014&quot;,
+    &quot;cr&quot;: &quot;\015&quot;,
+    &quot;so&quot;: &quot;\016&quot;,
+    &quot;si&quot;: &quot;\017&quot;,
+    &quot;dle&quot;: &quot;\020&quot;,
+    &quot;dc1&quot;: &quot;\021&quot;,
+    &quot;dc2&quot;: &quot;\022&quot;,
+    &quot;dc3&quot;: &quot;\023&quot;,
+    &quot;dc4&quot;: &quot;\024&quot;,
+    &quot;nak&quot;: &quot;\025&quot;,
+    &quot;syn&quot;: &quot;\026&quot;,
+    &quot;etb&quot;: &quot;\027&quot;,
+    &quot;can&quot;: &quot;\030&quot;,
+    &quot;em&quot;: &quot;\031&quot;,
+    &quot;sub&quot;: &quot;\032&quot;,
+    &quot;esc&quot;: &quot;\033&quot;,
+    &quot;fs&quot;: &quot;\034&quot;,
+    &quot;gs&quot;: &quot;\035&quot;,
+    &quot;rs&quot;: &quot;\036&quot;,
+    &quot;us&quot;: &quot;\037&quot;,
+    &quot;sp&quot;: &quot;\040&quot;,
+    &quot;del&quot;: &quot;\177&quot;};
+    
+sc_Char.prototype.toString = function() {
+    return this.val;
+};
+// sc_toDisplayString == toString
+sc_Char.prototype.sc_toWriteString = function() {
+    var entry = sc_Char.char2readable[this.val];
+    if (entry)
+        return entry;
+    else
+        return &quot;#\\&quot; + this.val;
+};
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (postfix &quot;instanceof sc_Char&quot;)))
+*/
+function sc_isChar(c) {
+    return (c instanceof sc_Char);
+}
+
+/*** META ((export char=?)
+           (type bool)
+           (peephole (hole 2 c1 &quot;.val === &quot; c2 &quot;.val&quot;)))
+*/
+var sc_isCharEqual = sc_isCharStringEqual;
+/*** META ((export char&lt;?)
+           (type bool)
+           (peephole (hole 2 c1 &quot;.val &lt; &quot; c2 &quot;.val&quot;)))
+*/
+var sc_isCharLess = sc_isCharStringLess;
+/*** META ((export char&gt;?)
+           (type bool)
+           (peephole (hole 2 c1 &quot;.val &gt; &quot; c2 &quot;.val&quot;)))
+*/
+var sc_isCharGreater = sc_isCharStringGreater;
+/*** META ((export char&lt;=?)
+           (type bool)
+           (peephole (hole 2 c1 &quot;.val &lt;= &quot; c2 &quot;.val&quot;)))
+*/
+var sc_isCharLessEqual = sc_isCharStringLessEqual;
+/*** META ((export char&gt;=?)
+           (type bool)
+           (peephole (hole 2 c1 &quot;.val &gt;= &quot; c2 &quot;.val&quot;)))
+*/
+var sc_isCharGreaterEqual = sc_isCharStringGreaterEqual;
+/*** META ((export char-ci=?)
+           (type bool)
+           (peephole (hole 2 c1 &quot;.val.toLowerCase() === &quot; c2 &quot;.val.toLowerCase()&quot;)))
+*/
+var sc_isCharCIEqual = sc_isCharStringCIEqual;
+/*** META ((export char-ci&lt;?)
+           (type bool)
+           (peephole (hole 2 c1 &quot;.val.toLowerCase() &lt; &quot; c2 &quot;.val.toLowerCase()&quot;)))
+*/
+var sc_isCharCILess = sc_isCharStringCILess;
+/*** META ((export char-ci&gt;?)
+           (type bool)
+           (peephole (hole 2 c1 &quot;.val.toLowerCase() &gt; &quot; c2 &quot;.val.toLowerCase()&quot;)))
+*/
+var sc_isCharCIGreater = sc_isCharStringCIGreater;
+/*** META ((export char-ci&lt;=?)
+           (type bool)
+           (peephole (hole 2 c1 &quot;.val.toLowerCase() &lt;= &quot; c2 &quot;.val.toLowerCase()&quot;)))
+*/
+var sc_isCharCILessEqual = sc_isCharStringCILessEqual;
+/*** META ((export char-ci&gt;=?)
+           (type bool)
+           (peephole (hole 2 c1 &quot;.val.toLowerCase() &gt;= &quot; c2 &quot;.val.toLowerCase()&quot;)))
+*/
+var sc_isCharCIGreaterEqual = sc_isCharStringCIGreaterEqual;
+
+var SC_NUMBER_CLASS = &quot;0123456789&quot;;
+var SC_WHITESPACE_CLASS = ' \r\n\t\f';
+var SC_LOWER_CLASS = 'abcdefghijklmnopqrstuvwxyz';
+var SC_UPPER_CLASS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+
+function sc_isCharOfClass(c, cl) { return (cl.indexOf(c) != -1); }
+/*** META ((export #t)
+           (type bool))
+*/
+function sc_isCharAlphabetic(c)
+    { return sc_isCharOfClass(c.val, SC_LOWER_CLASS) ||
+          sc_isCharOfClass(c.val, SC_UPPER_CLASS); }
+/*** META ((export #t)
+           (type bool)
+           (peephole (hole 1 &quot;SC_NUMBER_CLASS.indexOf(&quot; c &quot;.val) != -1&quot;)))
+*/
+function sc_isCharNumeric(c)
+    { return sc_isCharOfClass(c.val, SC_NUMBER_CLASS); }
+/*** META ((export #t)
+           (type bool))
+*/
+function sc_isCharWhitespace(c) {
+    var tmp = c.val;
+    return tmp === &quot; &quot; || tmp === &quot;\r&quot; || tmp === &quot;\n&quot; || tmp === &quot;\t&quot; || tmp === &quot;\f&quot;;
+}
+/*** META ((export #t)
+           (type bool)
+           (peephole (hole 1 &quot;SC_UPPER_CLASS.indexOf(&quot; c &quot;.val) != -1&quot;)))
+*/
+function sc_isCharUpperCase(c)
+    { return sc_isCharOfClass(c.val, SC_UPPER_CLASS); }
+/*** META ((export #t)
+           (type bool)
+           (peephole (hole 1 &quot;SC_LOWER_CLASS.indexOf(&quot; c &quot;.val) != -1&quot;)))
+*/
+function sc_isCharLowerCase(c)
+    { return sc_isCharOfClass(c.val, SC_LOWER_CLASS); }
+
+/*** META ((export #t)
+           (peephole (postfix &quot;.val.charCodeAt(0)&quot;)))
+*/
+function sc_char2integer(c)
+    { return c.val.charCodeAt(0); }
+/*** META ((export #t)
+           (peephole (hole 1 &quot;new sc_Char(String.fromCharCode(&quot; n &quot;))&quot;)))
+*/
+function sc_integer2char(n)
+    { return new sc_Char(String.fromCharCode(n)); }
+
+/*** META ((export #t)
+           (peephole (hole 1 &quot;new sc_Char(&quot; c &quot;.val.toUpperCase())&quot;)))
+*/
+function sc_charUpcase(c)
+    { return new sc_Char(c.val.toUpperCase()); }
+/*** META ((export #t)
+           (peephole (hole 1 &quot;new sc_Char(&quot; c &quot;.val.toLowerCase())&quot;)))
+*/
+function sc_charDowncase(c)
+    { return new sc_Char(c.val.toLowerCase()); }
+
+function sc_makeJSStringOfLength(k, c) {
+    var fill;
+    if (c === undefined)
+        fill = &quot; &quot;;
+    else
+        fill = c;
+    var res = &quot;&quot;;
+    var len = 1;
+    // every round doubles the size of fill.
+    while (k &gt;= len) {
+        if (k &amp; len)
+            res = res.concat(fill);
+        fill = fill.concat(fill);
+        len *= 2;
+    }
+    return res;
+}
+
+function sc_makejsString(k, c) {
+    var fill;
+    if (c)
+        fill = c.val;
+    else
+        fill = &quot; &quot;;
+    return sc_makeJSStringOfLength(k, fill);
+}
+
+function sc_jsstring2list(s) {
+    var res = null;
+    for (var i = s.length - 1; i &gt;= 0; i--)
+        res = sc_cons(new sc_Char(s.charAt(i)), res);
+    return res;
+}
+
+function sc_list2jsstring(l) {
+    var a = new Array();
+    while(l !== null) {
+        a.push(l.car.val);
+        l = l.cdr;
+    }
+    return &quot;&quot;.concat.apply(&quot;&quot;, a);
+}
+
+var sc_Vector = Array;
+
+sc_Vector.prototype.sc_toWriteOrDisplayString = function(writeOrDisplay) {
+    if (this.length === 0) return &quot;#()&quot;;
+
+    var res = &quot;#(&quot; + writeOrDisplay(this[0]);
+    for (var i = 1; i &lt; this.length; i++)
+        res += &quot; &quot; + writeOrDisplay(this[i]);
+    res += &quot;)&quot;;
+    return res;
+};
+sc_Vector.prototype.sc_toDisplayString = function() {
+    return this.sc_toWriteOrDisplayString(sc_toDisplayString);
+};
+sc_Vector.prototype.sc_toWriteString = function() {
+    return this.sc_toWriteOrDisplayString(sc_toWriteString);
+};
+
+/*** META ((export vector? array?)
+           (type bool)
+           (peephole (postfix &quot; instanceof sc_Vector&quot;)))
+*/
+function sc_isVector(v) {
+    return (v instanceof sc_Vector);
+}
+
+// only applies to vectors
+function sc_isVectorEqual(v1, v2, comp) {
+    if (v1.length !== v2.length) return false;
+    for (var i = 0; i &lt; v1.length; i++)
+        if (!comp(v1[i], v2[i])) return false;
+    return true;
+}
+
+/*** META ((export make-vector make-array)) */
+function sc_makeVector(size, fill) {
+    var a = new sc_Vector(size);
+    if (fill !== undefined)
+        sc_vectorFillBang(a, fill);
+    return a;
+}
+
+/*** META ((export vector array)
+           (peephole (vector)))
+*/
+function sc_vector() {
+    var a = new sc_Vector();
+    for (var i = 0; i &lt; arguments.length; i++)
+        a.push(arguments[i]);
+    return a;
+}
+
+/*** META ((export vector-length array-length)
+           (peephole (postfix &quot;.length&quot;)))
+*/
+function sc_vectorLength(v) {
+    return v.length;
+}
+
+/*** META ((export vector-ref array-ref)
+           (peephole (hole 2 v &quot;[&quot; pos &quot;]&quot;)))
+*/
+function sc_vectorRef(v, pos) {
+    return v[pos];
+}
+
+/*** META ((export vector-set! array-set!)
+           (peephole (hole 3 v &quot;[&quot; pos &quot;] = &quot; val)))
+*/
+function sc_vectorSetBang(v, pos, val) {
+    v[pos] = val;
+}
+
+/*** META ((export vector-&gt;list array-&gt;list)) */
+function sc_vector2list(a) {
+    var res = null;
+    for (var i = a.length-1; i &gt;= 0; i--)
+        res = sc_cons(a[i], res);
+    return res;
+}
+
+/*** META ((export list-&gt;vector list-&gt;array)) */
+function sc_list2vector(l) {
+    var a = new sc_Vector();
+    while(l !== null) {
+        a.push(l.car);
+        l = l.cdr;
+    }
+    return a;
+}
+
+/*** META ((export vector-fill! array-fill!)) */
+function sc_vectorFillBang(a, fill) {
+    for (var i = 0; i &lt; a.length; i++)
+        a[i] = fill;
+}
+
+
+/*** META ((export #t)) */
+function sc_copyVector(a, len) {
+    if (len &lt;= a.length)
+        return a.slice(0, len);
+    else {
+        var tmp = a.concat();
+        tmp.length = len;
+        return tmp;
+    }
+}
+
+/*** META ((export #t)
+           (peephole (hole 3 a &quot;.slice(&quot; start &quot;,&quot; end &quot;)&quot;)))
+*/
+function sc_vectorCopy(a, start, end) {
+    return a.slice(start, end);
+}
+
+/*** META ((export #t)) */
+function sc_vectorCopyBang(target, tstart, source, sstart, send) {
+    if (!sstart) sstart = 0;
+    if (!send) send = source.length;
+
+    // if target == source we don't want to overwrite not yet copied elements.
+    if (tstart &lt;= sstart) {
+        for (var i = tstart, j = sstart; j &lt; send; i++, j++) {
+            target[i] = source[j];
+        }
+    } else {
+        var diff = send - sstart;
+        for (var i = tstart + diff - 1, j = send - 1;
+             j &gt;= sstart;
+             i--, j--) {
+            target[i] = source[j];
+        }
+    }
+    return target;
+}
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (hole 1 &quot;typeof &quot; o &quot; === 'function'&quot;)))
+*/
+function sc_isProcedure(o) {
+    return (typeof o === &quot;function&quot;);
+}
+
+/*** META ((export #t)) */
+function sc_apply(proc) {
+    var args = new Array();
+    // first part of arguments are not in list-form.
+    for (var i = 1; i &lt; arguments.length - 1; i++)
+        args.push(arguments[i]);
+    var l = arguments[arguments.length - 1];
+    while (l !== null) {
+        args.push(l.car);
+        l = l.cdr;
+    }
+    return proc.apply(null, args);
+}
+
+/*** META ((export #t)) */
+function sc_map(proc, l1) {
+    if (l1 === undefined)
+        return null;
+    // else
+    var nbApplyArgs = arguments.length - 1;
+    var applyArgs = new Array(nbApplyArgs);
+    var revres = null;
+    while (l1 !== null) {
+        for (var i = 0; i &lt; nbApplyArgs; i++) {
+            applyArgs[i] = arguments[i + 1].car;
+            arguments[i + 1] = arguments[i + 1].cdr;
+        }
+        revres = sc_cons(proc.apply(null, applyArgs), revres);
+    }
+    return sc_reverseAppendBang(revres, null);
+}
+
+/*** META ((export #t)) */
+function sc_mapBang(proc, l1) {
+    if (l1 === undefined)
+        return null;
+    // else
+    var l1_orig = l1;
+    var nbApplyArgs = arguments.length - 1;
+    var applyArgs = new Array(nbApplyArgs);
+    while (l1 !== null) {
+        var tmp = l1;
+        for (var i = 0; i &lt; nbApplyArgs; i++) {
+            applyArgs[i] = arguments[i + 1].car;
+            arguments[i + 1] = arguments[i + 1].cdr;
+        }
+        tmp.car = proc.apply(null, applyArgs);
+    }
+    return l1_orig;
+}
+     
+/*** META ((export #t)) */
+function sc_forEach(proc, l1) {
+    if (l1 === undefined)
+        return undefined;
+    // else
+    var nbApplyArgs = arguments.length - 1;
+    var applyArgs = new Array(nbApplyArgs);
+    while (l1 !== null) {
+        for (var i = 0; i &lt; nbApplyArgs; i++) {
+            applyArgs[i] = arguments[i + 1].car;
+            arguments[i + 1] = arguments[i + 1].cdr;
+        }
+        proc.apply(null, applyArgs);
+    }
+    // add return so FF does not complain.
+    return undefined;
+}
+
+/*** META ((export #t)) */
+function sc_filter(proc, l1) {
+    var dummy = { cdr : null };
+    var tail = dummy;
+    while (l1 !== null) {
+        if (proc(l1.car) !== false) {
+            tail.cdr = sc_cons(l1.car, null);
+            tail = tail.cdr;
+        }
+        l1 = l1.cdr;
+    }
+    return dummy.cdr;
+}
+
+/*** META ((export #t)) */
+function sc_filterBang(proc, l1) {
+    var head = sc_cons(&quot;dummy&quot;, l1);
+    var it = head;
+    var next = l1;
+    while (next !== null) {
+        if (proc(next.car) !== false) {
+            it.cdr = next
+            it = next;
+        }
+        next = next.cdr;
+    }
+    it.cdr = null;
+    return head.cdr;
+}
+
+function sc_filterMap1(proc, l1) {
+    var revres = null;
+    while (l1 !== null) {
+        var tmp = proc(l1.car)
+        if (tmp !== false) revres = sc_cons(tmp, revres);
+        l1 = l1.cdr;
+    }
+    return sc_reverseAppendBang(revres, null);
+}
+function sc_filterMap2(proc, l1, l2) {
+    var revres = null;
+    while (l1 !== null) {
+        var tmp = proc(l1.car, l2.car);
+        if(tmp !== false) revres = sc_cons(tmp, revres);
+        l1 = l1.cdr;
+        l2 = l2.cdr
+    }
+    return sc_reverseAppendBang(revres, null);
+}
+
+/*** META ((export #t)) */
+function sc_filterMap(proc, l1, l2, l3) {
+    if (l2 === undefined)
+        return sc_filterMap1(proc, l1);
+    else if (l3 === undefined)
+        return sc_filterMap2(proc, l1, l2);
+    // else
+    var nbApplyArgs = arguments.length - 1;
+    var applyArgs = new Array(nbApplyArgs);
+    var revres = null;
+    while (l1 !== null) {
+        for (var i = 0; i &lt; nbApplyArgs; i++) {
+            applyArgs[i] = arguments[i + 1].car;
+            arguments[i + 1] = arguments[i + 1].cdr;
+        }
+        var tmp = proc.apply(null, applyArgs);
+        if(tmp !== false) revres = sc_cons(tmp, revres);
+    }
+    return sc_reverseAppendBang(revres, null);
+}
+
+/*** META ((export #t)) */
+function sc_any(proc, l) {
+    var revres = null;
+    while (l !== null) {
+        var tmp = proc(l.car);
+        if(tmp !== false) return tmp;
+        l = l.cdr;
+    }
+    return false;
+}
+
+/*** META ((export any?)
+           (peephole (hole 2 &quot;sc_any(&quot; proc &quot;,&quot; l &quot;) !== false&quot;)))
+*/
+function sc_anyPred(proc, l) {
+    return sc_any(proc, l)!== false;
+}
+
+/*** META ((export #t)) */
+function sc_every(proc, l) {
+    var revres = null;
+    var tmp = true;
+    while (l !== null) {
+        tmp = proc(l.car);
+        if (tmp === false) return false;
+        l = l.cdr;
+    }
+    return tmp;
+}
+
+/*** META ((export every?)
+           (peephole (hole 2 &quot;sc_every(&quot; proc &quot;,&quot; l &quot;) !== false&quot;)))
+*/
+function sc_everyPred(proc, l) {
+    var tmp = sc_every(proc, l);
+    if (tmp !== false) return true;
+    return false;
+}
+
+/*** META ((export #t)
+           (peephole (postfix &quot;()&quot;)))
+*/
+function sc_force(o) {
+    return o();
+}
+
+/*** META ((export #t)) */
+function sc_makePromise(proc) {
+    var isResultReady = false;
+    var result = undefined;
+    return function() {
+        if (!isResultReady) {
+            var tmp = proc();
+            if (!isResultReady) {
+                isResultReady = true;
+                result = tmp;
+            }
+        }
+        return result;
+    };
+}
+
+function sc_Values(values) {
+    this.values = values;
+}
+
+/*** META ((export #t)
+           (peephole (values)))
+*/
+function sc_values() {
+    if (arguments.length === 1)
+        return arguments[0];
+    else
+        return new sc_Values(arguments);
+}
+
+/*** META ((export #t)) */
+function sc_callWithValues(producer, consumer) {
+    var produced = producer();
+    if (produced instanceof sc_Values)
+        return consumer.apply(null, produced.values);
+    else
+        return consumer(produced);
+}
+
+/*** META ((export #t)) */
+function sc_dynamicWind(before, thunk, after) {
+    before();
+    try {
+        var res = thunk();
+        return res;
+    } finally {
+        after();
+    }
+}
+
+
+// TODO: eval/scheme-report-environment/null-environment/interaction-environment
+
+// LIMITATION: 'load' doesn't exist without files.
+// LIMITATION: transcript-on/transcript-off doesn't exist without files.
+
+
+function sc_Struct(name) {
+    this.name = name;
+}
+sc_Struct.prototype.sc_toDisplayString = function() {
+    return &quot;#&lt;struct&quot; + sc_hash(this) + &quot;&gt;&quot;;
+};
+sc_Struct.prototype.sc_toWriteString = sc_Struct.prototype.sc_toDisplayString;
+
+/*** META ((export #t)
+           (peephole (hole 1 &quot;new sc_Struct(&quot; name &quot;)&quot;)))
+*/
+function sc_makeStruct(name) {
+    return new sc_Struct(name);
+}
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (postfix &quot; instanceof sc_Struct&quot;)))
+*/
+function sc_isStruct(o) {
+    return (o instanceof sc_Struct);
+}
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (hole 2 &quot;(&quot; 1 &quot; instanceof sc_Struct) &amp;&amp; ( &quot; 1 &quot;.name === &quot; 0 &quot;)&quot;)))
+*/
+function sc_isStructNamed(name, s) {
+    return ((s instanceof sc_Struct) &amp;&amp; (s.name === name));
+}
+
+/*** META ((export struct-field)
+           (peephole (hole 3 0 &quot;[&quot; 2 &quot;]&quot;)))
+*/
+function sc_getStructField(s, name, field) {
+    return s[field];
+}
+
+/*** META ((export struct-field-set!)
+           (peephole (hole 4 0 &quot;[&quot; 2 &quot;] = &quot; 3)))
+*/
+function sc_setStructFieldBang(s, name, field, val) {
+    s[field] = val;
+}
+
+/*** META ((export #t)
+           (peephole (prefix &quot;~&quot;)))
+*/
+function sc_bitNot(x) {
+    return ~x;
+}
+
+/*** META ((export #t)
+           (peephole (infix 2 2 &quot;&amp;&quot;)))
+*/
+function sc_bitAnd(x, y) {
+    return x &amp; y;
+}
+
+/*** META ((export #t)
+           (peephole (infix 2 2 &quot;|&quot;)))
+*/
+function sc_bitOr(x, y) {
+    return x | y;
+}
+
+/*** META ((export #t)
+           (peephole (infix 2 2 &quot;^&quot;)))
+*/
+function sc_bitXor(x, y) {
+    return x ^ y;
+}
+
+/*** META ((export #t)
+           (peephole (infix 2 2 &quot;&lt;&lt;&quot;)))
+*/
+function sc_bitLsh(x, y) {
+    return x &lt;&lt; y;
+}
+
+/*** META ((export #t)
+           (peephole (infix 2 2 &quot;&gt;&gt;&quot;)))
+*/
+function sc_bitRsh(x, y) {
+    return x &gt;&gt; y;
+}
+
+/*** META ((export #t)
+           (peephole (infix 2 2 &quot;&gt;&gt;&gt;&quot;)))
+*/
+function sc_bitUrsh(x, y) {
+    return x &gt;&gt;&gt; y;
+}
+
+/*** META ((export js-field js-property)
+           (peephole (hole 2 o &quot;[&quot; field &quot;]&quot;)))
+*/
+function sc_jsField(o, field) {
+    return o[field];
+}
+
+/*** META ((export js-field-set! js-property-set!)
+           (peephole (hole 3 o &quot;[&quot; field &quot;] = &quot; val)))
+*/
+function sc_setJsFieldBang(o, field, val) {
+    return o[field] = val;
+}
+
+/*** META ((export js-field-delete! js-property-delete!)
+           (peephole (hole 2 &quot;delete&quot; o &quot;[&quot; field &quot;]&quot;)))
+*/
+function sc_deleteJsFieldBang(o, field) {
+    delete o[field];
+}
+
+/*** META ((export #t)
+           (peephole (jsCall)))
+*/
+function sc_jsCall(o, fun) {
+    var args = new Array();
+    for (var i = 2; i &lt; arguments.length; i++)
+        args[i-2] = arguments[i];
+    return fun.apply(o, args);
+}
+
+/*** META ((export #t)
+           (peephole (jsMethodCall)))
+*/
+function sc_jsMethodCall(o, field) {
+    var args = new Array();
+    for (var i = 2; i &lt; arguments.length; i++)
+        args[i-2] = arguments[i];
+    return o[field].apply(o, args);
+}
+
+/*** META ((export new js-new)
+           (peephole (jsNew)))
+*/
+function sc_jsNew(c) {
+    var evalStr = &quot;new c(&quot;;
+    evalStr +=arguments.length &gt; 1? &quot;arguments[1]&quot;: &quot;&quot;;
+    for (var i = 2; i &lt; arguments.length; i++)
+        evalStr += &quot;, arguments[&quot; + i + &quot;]&quot;;
+    evalStr +=&quot;)&quot;;
+    return eval(evalStr);
+}    
+
+// ======================== RegExp ====================
+/*** META ((export #t)) */
+function sc_pregexp(re) {
+    return new RegExp(sc_string2jsstring(re));
+}
+
+/*** META ((export #t)) */
+function sc_pregexpMatch(re, s) {
+    var reg = (re instanceof RegExp) ? re : sc_pregexp(re);
+    var tmp = reg.exec(sc_string2jsstring(s));
+    
+    if (tmp == null) return false;
+    
+    var res = null;
+    for (var i = tmp.length-1; i &gt;= 0; i--) {
+        if (tmp[i] !== null) {
+            res = sc_cons(sc_jsstring2string(tmp[i]), res);
+        } else {
+            res = sc_cons(false, res);
+        }
+    }
+    return res;
+}
+   
+/*** META ((export #t)) */
+function sc_pregexpReplace(re, s1, s2) {
+   var reg;
+   var jss1 = sc_string2jsstring(s1);
+   var jss2 = sc_string2jsstring(s2);
+
+   if (re instanceof RegExp) {
+       if (re.global)
+           reg = re;
+       else
+           reg = new RegExp(re.source);
+   } else {
+       reg = new RegExp(sc_string2jsstring(re));
+   }
+
+   return jss1.replace(reg, jss2);
+}
+   
+/*** META ((export pregexp-replace*)) */
+function sc_pregexpReplaceAll(re, s1, s2) {
+   var reg;
+   var jss1 = sc_string2jsstring(s1);
+   var jss2 = sc_string2jsstring(s2);
+
+   if (re instanceof RegExp) {
+      if (re.global)
+          reg = re;
+      else
+          reg = new RegExp(re.source, &quot;g&quot;);
+   } else {
+       reg = new RegExp(sc_string2jsstring(re), &quot;g&quot;);
+   }
+
+   return jss1.replace(reg, jss2);
+}
+
+/*** META ((export #t)) */
+function sc_pregexpSplit(re, s) {
+   var reg = ((re instanceof RegExp) ?
+              re :
+              new RegExp(sc_string2jsstring(re)));
+   var jss = sc_string2jsstring(s);
+   var tmp = jss.split(reg);
+
+   if (tmp == null) return false;
+
+   return sc_vector2list(tmp);
+}
+   
+
+/* =========================================================================== */
+/* Other library stuff */
+/* =========================================================================== */
+
+/*** META ((export #t)
+           (peephole (hole 1 &quot;Math.floor(Math.random()*&quot; 'n &quot;)&quot;)))
+*/
+function sc_random(n) {
+    return Math.floor(Math.random()*n);
+}
+
+/*** META ((export current-date)
+           (peephole (hole 0 &quot;new Date()&quot;)))
+*/
+function sc_currentDate() {
+   return new Date();
+}
+
+function sc_Hashtable() {
+}
+sc_Hashtable.prototype.toString = function() {
+    return &quot;#{%hashtable}&quot;;
+};
+// sc_toWriteString == sc_toDisplayString == toString
+
+function sc_HashtableElement(key, val) {
+    this.key = key;
+    this.val = val;
+}
+
+/*** META ((export #t)
+           (peephole (hole 0 &quot;new sc_Hashtable()&quot;)))
+*/
+function sc_makeHashtable() {
+    return new sc_Hashtable();
+}
+
+/*** META ((export #t)) */
+function sc_hashtablePutBang(ht, key, val) {
+    var hash = sc_hash(key);
+    ht[hash] = new sc_HashtableElement(key, val);
+}
+
+/*** META ((export #t)) */
+function sc_hashtableGet(ht, key) {
+    var hash = sc_hash(key);
+    if (hash in ht)
+        return ht[hash].val;
+    else
+        return false;
+}
+
+/*** META ((export #t)) */
+function sc_hashtableForEach(ht, f) {
+    for (var v in ht) {
+        if (ht[v] instanceof sc_HashtableElement)
+            f(ht[v].key, ht[v].val);
+    }
+}
+
+/*** META ((export hashtable-contains?)
+           (peephole (hole 2 &quot;sc_hash(&quot; 1 &quot;) in &quot; 0)))
+*/
+function sc_hashtableContains(ht, key) {
+    var hash = sc_hash(key);
+    if (hash in ht)
+        return true;
+    else
+        return false;
+}
+
+var SC_HASH_COUNTER = 0;
+
+function sc_hash(o) {
+    if (o === null)
+        return &quot;null&quot;;
+    else if (o === undefined)
+        return &quot;undefined&quot;;
+    else if (o === true)
+        return &quot;true&quot;;
+    else if (o === false)
+        return &quot;false&quot;;
+    else if (typeof o === &quot;number&quot;)
+        return &quot;num-&quot; + o;
+    else if (typeof o === &quot;string&quot;)
+        return &quot;jsstr-&quot; + o;
+    else if (o.sc_getHash)
+        return o.sc_getHash();
+    else
+        return sc_counterHash.call(o);
+}
+function sc_counterHash() {
+    if (!this.sc_hash) {
+        this.sc_hash = &quot;hash-&quot; + SC_HASH_COUNTER;
+        SC_HASH_COUNTER++;
+    }
+    return this.sc_hash;
+}
+
+function sc_Trampoline(args, maxTailCalls) {
+    this['__trampoline return__'] = true;
+    this.args = args;
+    this.MAX_TAIL_CALLs = maxTailCalls;
+}
+// TODO: call/cc stuff
+sc_Trampoline.prototype.restart = function() {
+    var o = this;
+    while (true) {
+        // set both globals.
+        SC_TAIL_OBJECT.calls = o.MAX_TAIL_CALLs-1;
+        var fun = o.args.callee;
+        var res = fun.apply(SC_TAIL_OBJECT, o.args);
+        if (res instanceof sc_Trampoline)
+            o = res;
+        else
+            return res;
+    }
+}
+
+/*** META ((export bind-exit-lambda)) */
+function sc_bindExitLambda(proc) {
+    var escape_obj = new sc_BindExitException();
+    var escape = function(res) {
+        escape_obj.res = res;
+        throw escape_obj;
+    };
+    try {
+        return proc(escape);
+    } catch(e) {
+        if (e === escape_obj) {
+            return e.res;
+        }
+        throw e;
+    }
+}
+function sc_BindExitException() {
+    this._internalException = true;
+}
+
+var SC_SCM2JS_GLOBALS = new Object();
+
+// default tail-call depth.
+// normally the program should set it again. but just in case...
+var SC_TAIL_OBJECT = new Object();
+SC_SCM2JS_GLOBALS.TAIL_OBJECT = SC_TAIL_OBJECT;
+// ======================== I/O =======================
+
+/*------------------------------------------------------------------*/
+
+function sc_EOF() {
+}
+var SC_EOF_OBJECT = new sc_EOF();
+
+function sc_Port() {
+}
+
+/* --------------- Input ports -------------------------------------*/
+
+function sc_InputPort() {
+}
+sc_InputPort.prototype = new sc_Port();
+
+sc_InputPort.prototype.peekChar = function() {
+    if (!(&quot;peeked&quot; in this))
+        this.peeked = this.getNextChar();
+    return this.peeked;
+}
+sc_InputPort.prototype.readChar = function() {
+    var tmp = this.peekChar();
+    delete this.peeked;
+    return tmp;
+}
+sc_InputPort.prototype.isCharReady = function() {
+    return true;
+}
+sc_InputPort.prototype.close = function() {
+    // do nothing
+}
+
+/* .............. String port ..........................*/
+function sc_ErrorInputPort() {
+};
+sc_ErrorInputPort.prototype = new sc_InputPort();
+sc_ErrorInputPort.prototype.getNextChar = function() {
+    throw &quot;can't read from error-port.&quot;;
+};
+sc_ErrorInputPort.prototype.isCharReady = function() {
+    return false;
+};
+    
+
+/* .............. String port ..........................*/
+
+function sc_StringInputPort(jsStr) {
+    // we are going to do some charAts on the str.
+    // instead of recreating all the time a String-object, we
+    // create one in the beginning. (not sure, if this is really an optim)
+    this.str = new String(jsStr);
+    this.pos = 0;
+}
+sc_StringInputPort.prototype = new sc_InputPort();
+sc_StringInputPort.prototype.getNextChar = function() {
+    if (this.pos &gt;= this.str.length)
+        return SC_EOF_OBJECT;
+    return this.str.charAt(this.pos++);
+};
+
+/* ------------- Read and other lib-funs  -------------------------------*/
+function sc_Token(type, val, pos) {
+    this.type = type;
+    this.val = val;
+    this.pos = pos;
+}
+sc_Token.EOF = 0/*EOF*/;
+sc_Token.OPEN_PAR = 1/*OPEN_PAR*/;
+sc_Token.CLOSE_PAR = 2/*CLOSE_PAR*/;
+sc_Token.OPEN_BRACE = 3/*OPEN_BRACE*/;
+sc_Token.CLOSE_BRACE = 4/*CLOSE_BRACE*/;
+sc_Token.OPEN_BRACKET = 5/*OPEN_BRACKET*/;
+sc_Token.CLOSE_BRACKET = 6/*CLOSE_BRACKET*/;
+sc_Token.WHITESPACE = 7/*WHITESPACE*/;
+sc_Token.QUOTE = 8/*QUOTE*/;
+sc_Token.ID = 9/*ID*/;
+sc_Token.DOT = 10/*DOT*/;
+sc_Token.STRING = 11/*STRING*/;
+sc_Token.NUMBER = 12/*NUMBER*/;
+sc_Token.ERROR = 13/*ERROR*/;
+sc_Token.VECTOR_BEGIN = 14/*VECTOR_BEGIN*/;
+sc_Token.TRUE = 15/*TRUE*/;
+sc_Token.FALSE = 16/*FALSE*/;
+sc_Token.UNSPECIFIED = 17/*UNSPECIFIED*/;
+sc_Token.REFERENCE = 18/*REFERENCE*/;
+sc_Token.STORE = 19/*STORE*/;
+sc_Token.CHAR = 20/*CHAR*/;
+
+var SC_ID_CLASS = SC_LOWER_CLASS + SC_UPPER_CLASS + &quot;!$%*+-./:&lt;=&gt;?@^_~&quot;;
+function sc_Tokenizer(port) {
+    this.port = port;
+}
+sc_Tokenizer.prototype.peekToken = function() {
+    if (this.peeked)
+        return this.peeked;
+    var newToken = this.nextToken();
+    this.peeked = newToken;
+    return newToken;
+};
+sc_Tokenizer.prototype.readToken = function() {
+    var tmp = this.peekToken();
+    delete this.peeked;
+    return tmp;
+};
+sc_Tokenizer.prototype.nextToken = function() {
+    var port = this.port;
+    
+    function isNumberChar(c) {
+        return (c &gt;= &quot;0&quot; &amp;&amp; c &lt;= &quot;9&quot;);
+    };
+    function isIdOrNumberChar(c) {
+        return SC_ID_CLASS.indexOf(c) != -1 || // ID-char
+            (c &gt;= &quot;0&quot; &amp;&amp; c &lt;= &quot;9&quot;);
+    }
+    function isWhitespace(c) {
+        return c === &quot; &quot; || c === &quot;\r&quot; || c === &quot;\n&quot; || c === &quot;\t&quot; || c === &quot;\f&quot;;
+    };
+    function isWhitespaceOrEOF(c) {
+        return isWhitespace(c) || c === SC_EOF_OBJECT;
+    };
+
+    function readString() {
+        res = &quot;&quot;;
+        while (true) {
+            var c = port.readChar();
+            switch (c) {
+            case '&quot;':
+                return new sc_Token(11/*STRING*/, res);
+            case &quot;\\&quot;:
+                var tmp = port.readChar();
+                switch (tmp) {
+                case '0': res += &quot;\0&quot;; break;
+                case 'a': res += &quot;\a&quot;; break;
+                case 'b': res += &quot;\b&quot;; break;
+                case 'f': res += &quot;\f&quot;; break;
+                case 'n': res += &quot;\n&quot;; break;
+                case 'r': res += &quot;\r&quot;; break;
+                case 't': res += &quot;\t&quot;; break;
+                case 'v': res += &quot;\v&quot;; break;
+                case '&quot;': res += '&quot;'; break;
+                case '\\': res += '\\'; break;
+                case 'x':
+                    /* hexa-number */
+                    var nb = 0;
+                    while (true) {
+                        var hexC = port.peekChar();
+                        if (hexC &gt;= '0' &amp;&amp; hexC &lt;= '9') {
+                            port.readChar();
+                            nb = nb * 16 + hexC.charCodeAt(0) - '0'.charCodeAt(0);
+                        } else if (hexC &gt;= 'a' &amp;&amp; hexC &lt;= 'f') {
+                            port.readChar();
+                            nb = nb * 16 + hexC.charCodeAt(0) - 'a'.charCodeAt(0);
+                        } else if (hexC &gt;= 'A' &amp;&amp; hexC &lt;= 'F') {
+                            port.readChar();
+                            nb = nb * 16 + hexC.charCodeAt(0) - 'A'.charCodeAt(0);
+                        } else {
+                            // next char isn't part of hex.
+                            res += String.fromCharCode(nb);
+                            break;
+                        }
+                    }
+                    break;
+                default:
+                    if (tmp === SC_EOF_OBJECT) {
+                        return new sc_Token(13/*ERROR*/, &quot;unclosed string-literal&quot; + res);
+                    }
+                    res += tmp;
+                }
+                break;
+            default:
+                if (c === SC_EOF_OBJECT) {
+                    return new sc_Token(13/*ERROR*/, &quot;unclosed string-literal&quot; + res);
+                }
+                res += c;
+            }
+        }
+    };
+    function readIdOrNumber(firstChar) {
+        var res = firstChar;
+        while (isIdOrNumberChar(port.peekChar()))
+            res += port.readChar();
+        if (isNaN(res))
+            return new sc_Token(9/*ID*/, res);
+        else
+            return new sc_Token(12/*NUMBER*/, res - 0);
+    };
+    
+    function skipWhitespaceAndComments() {
+        var done = false;
+        while (!done) {
+            done = true;
+            while (isWhitespace(port.peekChar()))
+                port.readChar();
+            if (port.peekChar() === ';') {
+                port.readChar();
+                done = false;
+                while (true) {
+                    curChar = port.readChar();
+                    if (curChar === SC_EOF_OBJECT ||
+                        curChar === '\n')
+                        break;
+                }
+            }
+        }
+    };
+    
+    function readDot() {
+        if (isWhitespace(port.peekChar()))
+            return new sc_Token(10/*DOT*/);
+        else
+            return readIdOrNumber(&quot;.&quot;);
+    };
+
+    function readSharp() {
+        var c = port.readChar();
+        if (isWhitespace(c))
+            return new sc_Token(13/*ERROR*/, &quot;bad #-pattern0.&quot;);
+
+        // reference
+        if (isNumberChar(c)) {
+            var nb = c - 0;
+            while (isNumberChar(port.peekChar()))
+                nb = nb*10 + (port.readChar() - 0);
+            switch (port.readChar()) {
+            case '#':
+                return new sc_Token(18/*REFERENCE*/, nb);
+            case '=':
+                return new sc_Token(19/*STORE*/, nb);
+            default:
+                return new sc_Token(13/*ERROR*/, &quot;bad #-pattern1.&quot; + nb);
+            }
+        }
+
+        if (c === &quot;(&quot;)
+            return new sc_Token(14/*VECTOR_BEGIN*/);
+        
+        if (c === &quot;\\&quot;) { // character
+            var tmp = &quot;&quot;
+            while (!isWhitespaceOrEOF(port.peekChar()))
+                tmp += port.readChar();
+            switch (tmp.length) {
+            case 0: // it's escaping a whitespace char:
+                if (sc_isEOFObject(port.peekChar))
+                    return new sc_Token(13/*ERROR*/, &quot;bad #-pattern2.&quot;);
+                else
+                    return new sc_Token(20/*CHAR*/, port.readChar());
+            case 1:
+                return new sc_Token(20/*CHAR*/, tmp);
+            default:
+                var entry = sc_Char.readable2char[tmp.toLowerCase()];
+                if (entry)
+                    return new sc_Token(20/*CHAR*/, entry);
+                else
+                    return new sc_Token(13/*ERROR*/, &quot;unknown character description: #\\&quot; + tmp);
+            }
+        }
+
+        // some constants (#t, #f, #unspecified)
+        var res;
+        var needing;
+        switch (c) {
+        case 't': res = new sc_Token(15/*TRUE*/, true); needing = &quot;&quot;; break;
+        case 'f': res = new sc_Token(16/*FALSE*/, false); needing = &quot;&quot;; break;
+        case 'u': res = new sc_Token(17/*UNSPECIFIED*/, undefined); needing = &quot;nspecified&quot;; break;
+        default:
+            return new sc_Token(13/*ERROR*/, &quot;bad #-pattern3: &quot; + c);
+        }
+        while(true) {
+            c = port.peekChar();
+            if ((isWhitespaceOrEOF(c) || c === ')') &amp;&amp;
+                needing == &quot;&quot;)
+                return res;
+            else if (isWhitespace(c) || needing == &quot;&quot;)
+                return new sc_Token(13/*ERROR*/, &quot;bad #-pattern4 &quot; + c + &quot; &quot; + needing);
+            else if (needing.charAt(0) == c) {
+                port.readChar(); // consume
+                needing = needing.slice(1);
+            } else
+                return new sc_Token(13/*ERROR*/, &quot;bad #-pattern5&quot;);
+        }
+        
+    };
+
+    skipWhitespaceAndComments();
+    var curChar = port.readChar();
+    if (curChar === SC_EOF_OBJECT)
+        return new sc_Token(0/*EOF*/, curChar);
+    switch (curChar)
+    {
+    case &quot; &quot;:
+    case &quot;\n&quot;:
+    case &quot;\t&quot;:
+        return readWhitespace();
+    case &quot;(&quot;:
+        return new sc_Token(1/*OPEN_PAR*/);
+    case &quot;)&quot;:
+        return new sc_Token(2/*CLOSE_PAR*/);
+    case &quot;{&quot;:
+        return new sc_Token(3/*OPEN_BRACE*/);
+    case &quot;}&quot;:
+        return new sc_Token(4/*CLOSE_BRACE*/);
+    case &quot;[&quot;:
+        return new sc_Token(5/*OPEN_BRACKET*/);
+    case &quot;]&quot;:
+        return new sc_Token(6/*CLOSE_BRACKET*/);
+    case &quot;'&quot;:
+        return new sc_Token(8/*QUOTE*/);
+    case &quot;#&quot;:
+        return readSharp();
+    case &quot;.&quot;:
+        return readDot();
+    case '&quot;':
+        return readString();
+    default:
+        if (isIdOrNumberChar(curChar))
+            return readIdOrNumber(curChar);
+        throw &quot;unexpected character: &quot; + curChar;
+    }
+};
+
+function sc_Reader(tokenizer) {
+    this.tokenizer = tokenizer;
+    this.backref = new Array();
+}
+sc_Reader.prototype.read = function() {
+    function readList(listBeginType) {
+        function matchesPeer(open, close) {
+            return open === 1/*OPEN_PAR*/ &amp;&amp; close === 2/*CLOSE_PAR*/
+                    || open === 3/*OPEN_BRACE*/ &amp;&amp; close === 4/*CLOSE_BRACE*/
+                || open === 5/*OPEN_BRACKET*/ &amp;&amp; close === 6/*CLOSE_BRACKET*/;
+        };
+        var res = null;
+
+        while (true) {
+            var token = tokenizer.peekToken();
+            
+            switch (token.type) {
+            case 2/*CLOSE_PAR*/:
+            case 4/*CLOSE_BRACE*/:
+            case 6/*CLOSE_BRACKET*/:
+                if (matchesPeer(listBeginType, token.type)) {
+                    tokenizer.readToken(); // consume token
+                    return sc_reverseBang(res);
+                } else
+                    throw &quot;closing par doesn't match: &quot; + listBeginType
+                        + &quot; &quot; + listEndType;
+
+            case 0/*EOF*/:
+                throw &quot;unexpected end of file&quot;;
+
+            case 10/*DOT*/:
+                tokenizer.readToken(); // consume token
+                var cdr = this.read();
+                var par = tokenizer.readToken();
+                if (!matchesPeer(listBeginType, par.type))
+                    throw &quot;closing par doesn't match: &quot; + listBeginType
+                        + &quot; &quot; + par.type;
+                else
+                    return sc_reverseAppendBang(res, cdr);
+                
+
+            default:
+                res = sc_cons(this.read(), res);
+            }
+        }
+    };
+    function readQuote() {
+        return sc_cons(&quot;quote&quot;, sc_cons(this.read(), null));
+    };
+    function readVector() {
+        // opening-parenthesis is already consumed
+        var a = new Array();
+        while (true) {
+            var token = tokenizer.peekToken();
+            switch (token.type) {
+            case 2/*CLOSE_PAR*/:
+                tokenizer.readToken();
+                return a;
+                
+            default:
+                a.push(this.read());
+            }
+        }
+    };
+
+    function storeRefence(nb) {
+        var tmp = this.read();
+        this.backref[nb] = tmp;
+        return tmp;
+    };
+        
+    function readReference(nb) {
+        if (nb in this.backref)
+            return this.backref[nb];
+        else
+            throw &quot;bad reference: &quot; + nb;
+    };
+    
+    var tokenizer = this.tokenizer;
+
+    var token = tokenizer.readToken();
+
+    // handle error
+    if (token.type === 13/*ERROR*/)
+        throw token.val;
+    
+    switch (token.type) {
+    case 1/*OPEN_PAR*/:
+    case 3/*OPEN_BRACE*/:
+    case 5/*OPEN_BRACKET*/:
+        return readList.call(this, token.type);
+    case 8/*QUOTE*/:
+        return readQuote.call(this);
+    case 11/*STRING*/:
+        return sc_jsstring2string(token.val);
+    case 20/*CHAR*/:
+        return new sc_Char(token.val);
+    case 14/*VECTOR_BEGIN*/:
+        return readVector.call(this);
+    case 18/*REFERENCE*/:
+        return readReference.call(this, token.val);
+    case 19/*STORE*/:
+        return storeRefence.call(this, token.val);
+    case 9/*ID*/:
+        return sc_jsstring2symbol(token.val);
+    case 0/*EOF*/:
+    case 12/*NUMBER*/:
+    case 15/*TRUE*/:
+    case 16/*FALSE*/:
+    case 17/*UNSPECIFIED*/:
+        return token.val;
+    default:
+        throw &quot;unexpected token &quot; + token.type + &quot; &quot; + token.val;
+    }
+};
+
+/*** META ((export #t)) */
+function sc_read(port) {
+    if (port === undefined) // we assume the port hasn't been given.
+        port = SC_DEFAULT_IN; // THREAD: shared var...
+    var reader = new sc_Reader(new sc_Tokenizer(port));
+    return reader.read();
+}
+/*** META ((export #t)) */
+function sc_readChar(port) {
+    if (port === undefined) // we assume the port hasn't been given.
+        port = SC_DEFAULT_IN; // THREAD: shared var...
+    var t = port.readChar();
+    return t === SC_EOF_OBJECT? t: new sc_Char(t);
+}
+/*** META ((export #t)) */
+function sc_peekChar(port) {
+    if (port === undefined) // we assume the port hasn't been given.
+        port = SC_DEFAULT_IN; // THREAD: shared var...
+    var t = port.peekChar();
+    return t === SC_EOF_OBJECT? t: new sc_Char(t);
+}    
+/*** META ((export #t)
+           (type bool))
+*/
+function sc_isCharReady(port) {
+    if (port === undefined) // we assume the port hasn't been given.
+        port = SC_DEFAULT_IN; // THREAD: shared var...
+    return port.isCharReady();
+}
+/*** META ((export #t)
+           (peephole (postfix &quot;.close()&quot;)))
+*/
+function sc_closeInputPort(p) {
+    return p.close();
+}
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (postfix &quot; instanceof sc_InputPort&quot;)))
+*/
+function sc_isInputPort(o) {
+    return (o instanceof sc_InputPort);
+}
+
+/*** META ((export eof-object?)
+           (type bool)
+           (peephole (postfix &quot; === SC_EOF_OBJECT&quot;)))
+*/
+function sc_isEOFObject(o) {
+    return o === SC_EOF_OBJECT;
+}
+
+/*** META ((export #t)
+           (peephole (hole 0 &quot;SC_DEFAULT_IN&quot;)))
+*/
+function sc_currentInputPort() {
+    return SC_DEFAULT_IN;
+}
+
+/* ------------ file operations are not supported -----------*/
+/*** META ((export #t)) */
+function sc_callWithInputFile(s, proc) {
+    throw &quot;can't open &quot; + s;
+}
+
+/*** META ((export #t)) */
+function sc_callWithOutputFile(s, proc) {
+    throw &quot;can't open &quot; + s;
+}
+
+/*** META ((export #t)) */
+function sc_withInputFromFile(s, thunk) {
+    throw &quot;can't open &quot; + s;
+}
+
+/*** META ((export #t)) */
+function sc_withOutputToFile(s, thunk) {
+    throw &quot;can't open &quot; + s;
+}
+
+/*** META ((export #t)) */
+function sc_openInputFile(s) {
+    throw &quot;can't open &quot; + s;
+}
+
+/*** META ((export #t)) */
+function sc_openOutputFile(s) {
+    throw &quot;can't open &quot; + s;
+}
+
+/* ----------------------------------------------------------------------------*/
+/*** META ((export #t)) */
+function sc_basename(p) {
+   var i = p.lastIndexOf('/');
+
+   if(i &gt;= 0)
+      return p.substring(i + 1, p.length);
+   else
+      return '';
+}
+
+/*** META ((export #t)) */
+function sc_dirname(p) {
+   var i = p.lastIndexOf('/');
+
+   if(i &gt;= 0)
+      return p.substring(0, i);
+   else
+      return '';
+}
+
+/* ----------------------------------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_withInputFromPort(p, thunk) {
+    try {
+        var tmp = SC_DEFAULT_IN; // THREAD: shared var.
+        SC_DEFAULT_IN = p;
+        return thunk();
+    } finally {
+        SC_DEFAULT_IN = tmp;
+    }
+}
+
+/*** META ((export #t)) */
+function sc_withInputFromString(s, thunk) {
+    return sc_withInputFromPort(new sc_StringInputPort(sc_string2jsstring(s)), thunk);
+}
+
+/*** META ((export #t)) */
+function sc_withOutputToPort(p, thunk) {
+    try {
+        var tmp = SC_DEFAULT_OUT; // THREAD: shared var.
+        SC_DEFAULT_OUT = p;
+        return thunk();
+    } finally {
+        SC_DEFAULT_OUT = tmp;
+    }
+}
+
+/*** META ((export #t)) */
+function sc_withOutputToString(thunk) {
+    var p = new sc_StringOutputPort();
+    sc_withOutputToPort(p, thunk);
+    return p.close();
+}
+
+/*** META ((export #t)) */
+function sc_withOutputToProcedure(proc, thunk) {
+    var t = function(s) { proc(sc_jsstring2string(s)); };
+    return sc_withOutputToPort(new sc_GenericOutputPort(t), thunk);
+}
+
+/*** META ((export #t)
+           (peephole (hole 0 &quot;new sc_StringOutputPort()&quot;)))
+*/
+function sc_openOutputString() {
+    return new sc_StringOutputPort();
+}
+
+/*** META ((export #t)) */
+function sc_openInputString(str) {
+    return new sc_StringInputPort(sc_string2jsstring(str));
+}
+
+/* ----------------------------------------------------------------------------*/
+
+function sc_OutputPort() {
+}
+sc_OutputPort.prototype = new sc_Port();
+sc_OutputPort.prototype.appendJSString = function(obj) {
+    /* do nothing */
+}
+sc_OutputPort.prototype.close = function() {
+    /* do nothing */
+}
+
+function sc_StringOutputPort() {
+    this.res = &quot;&quot;;
+}
+sc_StringOutputPort.prototype = new sc_OutputPort();
+sc_StringOutputPort.prototype.appendJSString = function(s) {
+    this.res += s;
+}
+sc_StringOutputPort.prototype.close = function() {
+    return sc_jsstring2string(this.res);
+}
+
+/*** META ((export #t)) */
+function sc_getOutputString(sp) {
+    return sc_jsstring2string(sp.res);
+}
+    
+
+function sc_ErrorOutputPort() {
+}
+sc_ErrorOutputPort.prototype = new sc_OutputPort();
+sc_ErrorOutputPort.prototype.appendJSString = function(s) {
+    throw &quot;don't write on ErrorPort!&quot;;
+}
+sc_ErrorOutputPort.prototype.close = function() {
+    /* do nothing */
+}
+
+function sc_GenericOutputPort(appendJSString, close) {
+    this.appendJSString = appendJSString;
+    if (close)
+        this.close = close;
+}
+sc_GenericOutputPort.prototype = new sc_OutputPort();
+
+/*** META ((export #t)
+           (type bool)
+           (peephole (postfix &quot; instanceof sc_OutputPort&quot;)))
+*/
+function sc_isOutputPort(o) {
+    return (o instanceof sc_OutputPort);
+}
+
+/*** META ((export #t)
+           (peephole (postfix &quot;.close()&quot;)))
+*/
+function sc_closeOutputPort(p) {
+    return p.close();
+}
+
+/* ------------------ write ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_write(o, p) {
+    if (p === undefined) // we assume not given
+        p = SC_DEFAULT_OUT;
+    p.appendJSString(sc_toWriteString(o));
+}
+
+function sc_toWriteString(o) {
+    if (o === null)
+        return &quot;()&quot;;
+    else if (o === true)
+        return &quot;#t&quot;;
+    else if (o === false)
+        return &quot;#f&quot;;
+    else if (o === undefined)
+        return &quot;#unspecified&quot;;
+    else if (typeof o === 'function')
+        return &quot;#&lt;procedure &quot; + sc_hash(o) + &quot;&gt;&quot;;
+    else if (o.sc_toWriteString)
+        return o.sc_toWriteString();
+    else
+        return o.toString();
+}
+
+function sc_escapeWriteString(s) {
+    var res = &quot;&quot;;
+    var j = 0;
+    for (i = 0; i &lt; s.length; i++) {
+        switch (s.charAt(i)) {
+        case &quot;\0&quot;: res += s.substring(j, i) + &quot;\\0&quot;; j = i + 1; break;
+        case &quot;\b&quot;: res += s.substring(j, i) + &quot;\\b&quot;; j = i + 1; break;
+        case &quot;\f&quot;: res += s.substring(j, i) + &quot;\\f&quot;; j = i + 1; break;
+        case &quot;\n&quot;: res += s.substring(j, i) + &quot;\\n&quot;; j = i + 1; break;
+        case &quot;\r&quot;: res += s.substring(j, i) + &quot;\\r&quot;; j = i + 1; break;
+        case &quot;\t&quot;: res += s.substring(j, i) + &quot;\\t&quot;; j = i + 1; break;
+        case &quot;\v&quot;: res += s.substring(j, i) + &quot;\\v&quot;; j = i + 1; break;
+        case '&quot;': res += s.substring(j, i) + '\\&quot;'; j = i + 1; break;
+        case &quot;\\&quot;: res += s.substring(j, i) + &quot;\\\\&quot;; j = i + 1; break;
+        default:
+            var c = s.charAt(i);
+            if (&quot;\a&quot; !== &quot;a&quot; &amp;&amp; c == &quot;\a&quot;) {
+                res += s.substring(j, i) + &quot;\\a&quot;; j = i + 1; continue;
+            }
+            if (&quot;\v&quot; !== &quot;v&quot; &amp;&amp; c == &quot;\v&quot;) {
+                res += s.substring(j, i) + &quot;\\v&quot;; j = i + 1; continue;
+            }
+            //if (s.charAt(i) &lt; ' ' || s.charCodeAt(i) &gt; 127) {
+            // CARE: Manuel is this OK with HOP?
+            if (s.charAt(i) &lt; ' ') {
+                /* non printable character and special chars */
+                res += s.substring(j, i) + &quot;\\x&quot; + s.charCodeAt(i).toString(16);
+                j = i + 1;
+            }
+            // else just let i increase...
+        }
+    }
+    res += s.substring(j, i);
+    return res;
+}
+
+/* ------------------ display ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_display(o, p) {
+    if (p === undefined) // we assume not given
+        p = SC_DEFAULT_OUT;
+    p.appendJSString(sc_toDisplayString(o));
+}
+
+function sc_toDisplayString(o) {
+    if (o === null)
+        return &quot;()&quot;;
+    else if (o === true)
+        return &quot;#t&quot;;
+    else if (o === false)
+        return &quot;#f&quot;;
+    else if (o === undefined)
+        return &quot;#unspecified&quot;;
+    else if (typeof o === 'function')
+        return &quot;#&lt;procedure &quot; + sc_hash(o) + &quot;&gt;&quot;;
+    else if (o.sc_toDisplayString)
+        return o.sc_toDisplayString();
+    else
+        return o.toString();
+}
+
+/* ------------------ newline ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_newline(p) {
+    if (p === undefined) // we assume not given
+        p = SC_DEFAULT_OUT;
+    p.appendJSString(&quot;\n&quot;);
+}
+    
+/* ------------------ write-char ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_writeChar(c, p) {
+    if (p === undefined) // we assume not given
+        p = SC_DEFAULT_OUT;
+    p.appendJSString(c.val);
+}
+
+/* ------------------ write-circle ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_writeCircle(o, p) {
+    if (p === undefined) // we assume not given
+        p = SC_DEFAULT_OUT;
+    p.appendJSString(sc_toWriteCircleString(o));
+}
+
+function sc_toWriteCircleString(o) {
+    var symb = sc_gensym(&quot;writeCircle&quot;);
+    var nbPointer = new Object();
+    nbPointer.nb = 0;
+    sc_prepWriteCircle(o, symb, nbPointer);
+    return sc_genToWriteCircleString(o, symb);
+}
+
+function sc_prepWriteCircle(o, symb, nbPointer) {
+    // TODO sc_Struct
+    if (o instanceof sc_Pair ||
+        o instanceof sc_Vector) {
+        if (o[symb] !== undefined) {
+            // not the first visit.
+            o[symb]++;
+            // unless there is already a number, assign one.
+            if (!o[symb + &quot;nb&quot;]) o[symb + &quot;nb&quot;] = nbPointer.nb++;
+            return;
+        }
+        o[symb] = 0;
+        if (o instanceof sc_Pair) {
+            sc_prepWriteCircle(o.car, symb, nbPointer);
+            sc_prepWriteCircle(o.cdr, symb, nbPointer);
+        } else {
+            for (var i = 0; i &lt; o.length; i++)
+                sc_prepWriteCircle(o[i], symb, nbPointer);
+        }
+    }
+}
+
+function sc_genToWriteCircleString(o, symb) {
+    if (!(o instanceof sc_Pair ||
+          o instanceof sc_Vector))
+        return sc_toWriteString(o);
+    return o.sc_toWriteCircleString(symb);
+}
+sc_Pair.prototype.sc_toWriteCircleString = function(symb, inList) {
+    if (this[symb + &quot;use&quot;]) { // use-flag is set. Just use it.
+        var nb = this[symb + &quot;nb&quot;];
+        if (this[symb]-- === 0) { // if we are the last use. remove all fields.
+            delete this[symb];
+            delete this[symb + &quot;nb&quot;];
+            delete this[symb + &quot;use&quot;];
+        }
+        if (inList)
+            return '. #' + nb + '#';
+        else
+            return '#' + nb + '#';
+    }
+    if (this[symb]-- === 0) { // if we are the last use. remove all fields.
+        delete this[symb];
+        delete this[symb + &quot;nb&quot;];
+        delete this[symb + &quot;use&quot;];
+    }
+
+    var res = &quot;&quot;;
+    
+    if (this[symb] !== undefined) { // implies &gt; 0
+        this[symb + &quot;use&quot;] = true;
+        if (inList)
+            res += '. #' + this[symb + &quot;nb&quot;] + '=';
+        else
+            res += '#' + this[symb + &quot;nb&quot;] + '=';
+        inList = false;
+    }
+
+    if (!inList)
+        res += &quot;(&quot;;
+    
+    // print car
+    res += sc_genToWriteCircleString(this.car, symb);
+    
+    if (sc_isPair(this.cdr)) {
+        res += &quot; &quot; + this.cdr.sc_toWriteCircleString(symb, true);
+    } else if (this.cdr !== null) {
+        res += &quot; . &quot; + sc_genToWriteCircleString(this.cdr, symb);
+    }
+    if (!inList)
+        res += &quot;)&quot;;
+    return res;
+};
+sc_Vector.prototype.sc_toWriteCircleString = function(symb) {
+    if (this[symb + &quot;use&quot;]) { // use-flag is set. Just use it.
+        var nb = this[symb + &quot;nb&quot;];
+        if (this[symb]-- === 0) { // if we are the last use. remove all fields.
+            delete this[symb];
+            delete this[symb + &quot;nb&quot;];
+            delete this[symb + &quot;use&quot;];
+        }
+        return '#' + nb + '#';
+    }
+    if (this[symb]-- === 0) { // if we are the last use. remove all fields.
+        delete this[symb];
+        delete this[symb + &quot;nb&quot;];
+        delete this[symb + &quot;use&quot;];
+    }
+
+    var res = &quot;&quot;;
+    if (this[symb] !== undefined) { // implies &gt; 0
+        this[symb + &quot;use&quot;] = true;
+        res += '#' + this[symb + &quot;nb&quot;] + '=';
+    }
+    res += &quot;#(&quot;;
+    for (var i = 0; i &lt; this.length; i++) {
+        res += sc_genToWriteCircleString(this[i], symb);
+        if (i &lt; this.length - 1) res += &quot; &quot;;
+    }
+    res += &quot;)&quot;;
+    return res;
+};
+
+
+/* ------------------ print ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_print(s) {
+    if (arguments.length === 1) {
+        sc_display(s);
+        sc_newline();
+    }
+    else {
+        for (var i = 0; i &lt; arguments.length; i++)
+            sc_display(arguments[i]);
+        sc_newline();
+    }
+}
+
+/* ------------------ format ---------------------------------------------------*/
+/*** META ((export #t)) */
+function sc_format(s, args) {
+   var len = s.length;
+   var p = new sc_StringOutputPort();
+   var i = 0, j = 1;
+
+   while( i &lt; len ) {
+      var i2 = s.indexOf(&quot;~&quot;, i);
+
+      if (i2 == -1) {
+          p.appendJSString( s.substring( i, len ) );
+          return p.close();
+      } else {
+         if (i2 &gt; i) {
+            if (i2 == (len - 1)) {
+                p.appendJSString(s.substring(i, len));
+                return p.close();
+            } else {
+               p.appendJSString(s.substring(i, i2));
+               i = i2;
+            }
+         }
+
+         switch(s.charCodeAt(i2 + 1)) {
+            case 65:
+            case 97:
+               // a
+               sc_display(arguments[j], p);
+               i += 2; j++;
+               break;
+
+            case 83:
+            case 115:
+               // s
+               sc_write(arguments[j], p);
+               i += 2; j++;
+               break;
+
+            case 86:
+            case 118:
+               // v
+               sc_display(arguments[j], p);
+               p.appendJSString(&quot;\n&quot;);
+               i += 2; j++;
+               break;
+
+            case 67:
+            case 99:
+               // c
+               p.appendJSString(String.fromCharCode(arguments[j]));
+               i += 2; j++;
+               break;
+
+            case 88:
+            case 120:
+               // x
+               p.appendJSString(arguments[j].toString(6));
+               i += 2; j++;
+               break;
+
+            case 79:
+            case 111:
+               // o
+               p.appendJSString(arguments[j].toString(8));
+               i += 2; j++;
+               break;
+
+            case 66:
+            case 98:
+               // b
+               p.appendJSString(arguments[j].toString(2));
+               i += 2; j++;
+               break;
+               
+            case 37:
+            case 110:
+               // %, n
+               p.appendJSString(&quot;\n&quot;);
+               i += 2; break;
+
+            case 114:
+               // r
+               p.appendJSString(&quot;\r&quot;);
+               i += 2; break;
+
+            case 126:
+               // ~
+               p.appendJSString(&quot;~&quot;);
+               i += 2; break;
+
+            default:
+               sc_error( &quot;format: illegal ~&quot;
+                         + String.fromCharCode(s.charCodeAt(i2 + 1))
+                         + &quot; sequence&quot; );
+               return &quot;&quot;;
+         }
+      }
+   }
+
+   return p.close();
+}
+
+/* ------------------ global ports ---------------------------------------------------*/
+
+var SC_DEFAULT_IN = new sc_ErrorInputPort();
+var SC_DEFAULT_OUT = new sc_ErrorOutputPort();
+var SC_ERROR_OUT = new sc_ErrorOutputPort();
+
+var sc_SYMBOL_PREFIX = &quot;\u1E9C&quot;;
+var sc_KEYWORD_PREFIX = &quot;\u1E9D&quot;;
+
+/*** META ((export #t)
+           (peephole (id))) */
+function sc_jsstring2string(s) {
+    return s;
+}
+
+/*** META ((export #t)
+           (peephole (prefix &quot;'\\u1E9C' +&quot;)))
+*/
+function sc_jsstring2symbol(s) {
+    return sc_SYMBOL_PREFIX + s;
+}
+
+/*** META ((export #t)
+           (peephole (id)))
+*/
+function sc_string2jsstring(s) {
+    return s;
+}
+
+/*** META ((export #t)
+           (peephole (symbol2jsstring_immutable)))
+*/
+function sc_symbol2jsstring(s) {
+    return s.slice(1);
+}
+
+/*** META ((export #t)
+           (peephole (postfix &quot;.slice(1)&quot;)))
+*/
+function sc_keyword2jsstring(k) {
+    return k.slice(1);
+}
+
+/*** META ((export #t)
+           (peephole (prefix &quot;'\\u1E9D' +&quot;)))
+*/
+function sc_jsstring2keyword(s) {
+    return sc_KEYWORD_PREFIX + s;
+}
+
+/*** META ((export #t)
+           (type bool))
+*/
+function sc_isKeyword(s) {
+    return (typeof s === &quot;string&quot;) &amp;&amp;
+        (s.charAt(0) === sc_KEYWORD_PREFIX);
+}
+
+
+/*** META ((export #t)) */
+var sc_gensym = function() {
+    var counter = 1000;
+    return function(sym) {
+        counter++;
+        if (!sym) sym = sc_SYMBOL_PREFIX;
+        return sym + &quot;s&quot; + counter + &quot;~&quot; + &quot;^sC-GeNsYm &quot;;
+    };
+}();
+
+
+/*** META ((export #t)
+           (type bool))
+*/
+function sc_isEqual(o1, o2) {
+    return ((o1 === o2) ||
+            (sc_isPair(o1) &amp;&amp; sc_isPair(o2)
+             &amp;&amp; sc_isPairEqual(o1, o2, sc_isEqual)) ||
+            (sc_isVector(o1) &amp;&amp; sc_isVector(o2)
+             &amp;&amp; sc_isVectorEqual(o1, o2, sc_isEqual)));
+}
+
+/*** META ((export number-&gt;symbol integer-&gt;symbol)) */
+function sc_number2symbol(x, radix) {
+    return sc_SYMBOL_PREFIX + sc_number2jsstring(x, radix);
+}
+    
+/*** META ((export number-&gt;string integer-&gt;string)) */
+var sc_number2string = sc_number2jsstring;
+
+/*** META ((export #t)) */
+function sc_symbol2number(s, radix) {
+    return sc_jsstring2number(s.slice(1), radix);
+}
+
+/*** META ((export #t)) */
+var sc_string2number = sc_jsstring2number;
+
+/*** META ((export #t)
+           (peephole (prefix &quot;+&quot; s)))
+           ;; peephole will only apply if no radix is given.
+*/
+function sc_string2integer(s, radix) {
+    if (!radix) return +s;
+    return parseInt(s, radix);
+}
+
+/*** META ((export #t)
+           (peephole (prefix &quot;+&quot;)))
+*/
+function sc_string2real(s) {
+    return +s;
+}
+
+
+/*** META ((export #t)
+           (type bool))
+*/
+function sc_isSymbol(s) {
+    return (typeof s === &quot;string&quot;) &amp;&amp;
+        (s.charAt(0) === sc_SYMBOL_PREFIX);
+}
+
+/*** META ((export #t)
+           (peephole (symbol2string_immutable)))
+*/
+function sc_symbol2string(s) {
+    return s.slice(1);
+}
+
+/*** META ((export #t)
+           (peephole (prefix &quot;'\\u1E9C' +&quot;)))
+*/
+function sc_string2symbol(s) {
+    return sc_SYMBOL_PREFIX + s;
+}
+
+/*** META ((export symbol-append)
+           (peephole (symbolAppend_immutable)))
+*/
+function sc_symbolAppend() {
+    var res = sc_SYMBOL_PREFIX;
+    for (var i = 0; i &lt; arguments.length; i++)
+        res += arguments[i].slice(1);
+    return res;
+}
+
+/*** META ((export #t)
+           (peephole (postfix &quot;.val&quot;)))
+*/
+function sc_char2string(c) { return c.val; }
+
+/*** META ((export #t)
+           (peephole (hole 1 &quot;'\\u1E9C' + &quot; c &quot;.val&quot;)))
+*/
+function sc_char2symbol(c) { return sc_SYMBOL_PREFIX + c.val; }
+
+/*** META ((export #t)
+           (type bool))
+*/
+function sc_isString(s) {
+    return (typeof s === &quot;string&quot;) &amp;&amp;
+        (s.charAt(0) !== sc_SYMBOL_PREFIX);
+}
+
+/*** META ((export #t)) */
+var sc_makeString = sc_makejsString;
+
+
+/*** META ((export #t)) */
+function sc_string() {
+    for (var i = 0; i &lt; arguments.length; i++)
+        arguments[i] = arguments[i].val;
+    return &quot;&quot;.concat.apply(&quot;&quot;, arguments);
+}
+
+/*** META ((export #t)
+           (peephole (postfix &quot;.length&quot;)))
+*/
+function sc_stringLength(s) { return s.length; }
+
+/*** META ((export #t)) */
+function sc_stringRef(s, k) {
+    return new sc_Char(s.charAt(k));
+}
+
+/* there's no stringSet in the immutable version
+function sc_stringSet(s, k, c)
+*/
+
+
+/*** META ((export string=?)
+           (type bool)
+           (peephole (hole 2 str1 &quot; === &quot; str2)))
+*/
+function sc_isStringEqual(s1, s2) {
+    return s1 === s2;
+}
+/*** META ((export string&lt;?)
+           (type bool)
+           (peephole (hole 2 str1 &quot; &lt; &quot; str2)))
+*/
+function sc_isStringLess(s1, s2) {
+    return s1 &lt; s2;
+}
+/*** META ((export string&gt;?)
+           (type bool)
+           (peephole (hole 2 str1 &quot; &gt; &quot; str2)))
+*/
+function sc_isStringGreater(s1, s2) {
+    return s1 &gt; s2;
+}
+/*** META ((export string&lt;=?)
+           (type bool)
+           (peephole (hole 2 str1 &quot; &lt;= &quot; str2)))
+*/
+function sc_isStringLessEqual(s1, s2) {
+    return s1 &lt;= s2;
+}
+/*** META ((export string&gt;=?)
+           (type bool)
+           (peephole (hole 2 str1 &quot; &gt;= &quot; str2)))
+*/
+function sc_isStringGreaterEqual(s1, s2) {
+    return s1 &gt;= s2;
+}
+/*** META ((export string-ci=?)
+           (type bool)
+           (peephole (hole 2 str1 &quot;.toLowerCase() === &quot; str2 &quot;.toLowerCase()&quot;)))
+*/
+function sc_isStringCIEqual(s1, s2) {
+    return s1.toLowerCase() === s2.toLowerCase();
+}
+/*** META ((export string-ci&lt;?)
+           (type bool)
+           (peephole (hole 2 str1 &quot;.toLowerCase() &lt; &quot; str2 &quot;.toLowerCase()&quot;)))
+*/
+function sc_isStringCILess(s1, s2) {
+    return s1.toLowerCase() &lt; s2.toLowerCase();
+}
+/*** META ((export string-ci&gt;?)
+           (type bool)
+           (peephole (hole 2 str1 &quot;.toLowerCase() &gt; &quot; str2 &quot;.toLowerCase()&quot;)))
+*/
+function sc_isStringCIGreater(s1, s2) {
+    return s1.toLowerCase() &gt; s2.toLowerCase();
+}
+/*** META ((export string-ci&lt;=?)
+           (type bool)
+           (peephole (hole 2 str1 &quot;.toLowerCase() &lt;= &quot; str2 &quot;.toLowerCase()&quot;)))
+*/
+function sc_isStringCILessEqual(s1, s2) {
+    return s1.toLowerCase() &lt;= s2.toLowerCase();
+}
+/*** META ((export string-ci&gt;=?)
+           (type bool)
+           (peephole (hole 2 str1 &quot;.toLowerCase() &gt;= &quot; str2 &quot;.toLowerCase()&quot;)))
+*/
+function sc_isStringCIGreaterEqual(s1, s2) {
+    return s1.toLowerCase() &gt;= s2.toLowerCase();
+}
+
+/*** META ((export #t)
+           (peephole (hole 3 s &quot;.substring(&quot; start &quot;, &quot; end &quot;)&quot;)))
+*/
+function sc_substring(s, start, end) {
+    return s.substring(start, end);
+}
+
+/*** META ((export #t))
+*/
+function sc_isSubstring_at(s1, s2, i) {
+    return s2 == s1.substring(i, i+ s2.length);
+}
+
+/*** META ((export #t)
+           (peephole (infix 0 #f &quot;+&quot; &quot;''&quot;)))
+*/
+function sc_stringAppend() {
+    return &quot;&quot;.concat.apply(&quot;&quot;, arguments);
+}
+
+/*** META ((export #t)) */
+var sc_string2list = sc_jsstring2list;
+
+/*** META ((export #t)) */
+var sc_list2string = sc_list2jsstring;
+
+/*** META ((export #t)
+           (peephole (id)))
+*/
+function sc_stringCopy(s) {
+    return s;
+}
+
+/* there's no string-fill in the immutable version
+function sc_stringFill(s, c)
+*/
+
+/*** META ((export #t)
+           (peephole (postfix &quot;.slice(1)&quot;)))
+*/
+function sc_keyword2string(o) {
+    return o.slice(1);
+}
+
+/*** META ((export #t)
+           (peephole (prefix &quot;'\\u1E9D' +&quot;)))
+*/
+function sc_string2keyword(o) {
+    return sc_KEYWORD_PREFIX + o;
+}
+
+String.prototype.sc_toDisplayString = function() {
+    if (this.charAt(0) === sc_SYMBOL_PREFIX)
+        // TODO: care for symbols with spaces (escape-chars symbols).
+        return this.slice(1);
+    else if (this.charAt(0) === sc_KEYWORD_PREFIX)
+        return &quot;:&quot; + this.slice(1);
+    else
+        return this.toString();
+};
+
+String.prototype.sc_toWriteString = function() {
+    if (this.charAt(0) === sc_SYMBOL_PREFIX)
+        // TODO: care for symbols with spaces (escape-chars symbols).
+        return this.slice(1);
+    else if (this.charAt(0) === sc_KEYWORD_PREFIX)
+        return &quot;:&quot; + this.slice(1);
+    else
+        return '&quot;' + sc_escapeWriteString(this) + '&quot;';
+};
+/* Exported Variables */
+var BgL_testzd2boyerzd2;
+var BgL_nboyerzd2benchmarkzd2;
+var BgL_setupzd2boyerzd2;
+/* End Exports */
+
+var translate_term_nboyer;
+var translate_args_nboyer;
+var untranslate_term_nboyer;
+var BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer;
+var BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer;
+var translate_alist_nboyer;
+var apply_subst_nboyer;
+var apply_subst_lst_nboyer;
+var tautologyp_nboyer;
+var if_constructor_nboyer;
+var rewrite_count_nboyer;
+var rewrite_nboyer;
+var rewrite_args_nboyer;
+var unify_subst_nboyer;
+var one_way_unify1_nboyer;
+var false_term_nboyer;
+var true_term_nboyer;
+var trans_of_implies1_nboyer;
+var is_term_equal_nboyer;
+var is_term_member_nboyer;
+var const_nboyer;
+var sc_const_3_nboyer;
+var sc_const_4_nboyer;
+{
+    (sc_const_4_nboyer = (new sc_Pair(&quot;\u1E9Cimplies&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cimplies&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cimplies&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cimplies&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,(new sc_Pair(&quot;\u1E9Cu&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cimplies&quot;,(new sc_Pair(&quot;\u1E9Cu&quot;,(new sc_Pair(&quot;\u1E9Cw&quot;,null)))))),null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cimplies&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cw&quot;,null)))))),null)))))));
+    (sc_const_3_nboyer = sc_list((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccompile&quot;,(new sc_Pair(&quot;\u1E9Cform&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Creverse&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccodegen&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Coptimize&quot;,(new sc_Pair(&quot;\u1E9Cform&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnil&quot;,null)),null)))))),null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ceqp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cgreaterp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clesseqp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cgreatereqp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cboolean&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cor&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ct&quot;,null)),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cf&quot;,null)),null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ciff&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cimplies&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cimplies&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ceven1&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ct&quot;,null)),(new sc_Pair((new sc_Pair(&quot;\u1E9Codd&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Csub1&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccountps-&quot;,(new sc_Pair(&quot;\u1E9Cl&quot;,(new sc_Pair(&quot;\u1E9Cpred&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ccountps-loop&quot;,(new sc_Pair(&quot;\u1E9Cl&quot;,(new sc_Pair(&quot;\u1E9Cpred&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cfact-&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cfact-loop&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair((1),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Creverse-&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Creverse-loop&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnil&quot;,null)),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdivides&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cremainder&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cassume-true&quot;,(new sc_Pair(&quot;\u1E9Cvar&quot;,(new sc_Pair(&quot;\u1E9Calist&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ccons&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccons&quot;,(new sc_Pair(&quot;\u1E9Cvar&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ct&quot;,null)),null)))))),(new sc_Pair(&quot;\u1E9Calist&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cassume-false&quot;,(new sc_Pair(&quot;\u1E9Cvar&quot;,(new sc_Pair(&quot;\u1E9Calist&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ccons&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccons&quot;,(new sc_Pair(&quot;\u1E9Cvar&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cf&quot;,null)),null)))))),(new sc_Pair(&quot;\u1E9Calist&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctautology-checker&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ctautologyp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnormalize&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnil&quot;,null)),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cfalsify&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cfalsify1&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnormalize&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnil&quot;,null)),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cprime&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cadd1&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))),null)))))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cprime1&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Csub1&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))))),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair(&quot;\u1E9Cp&quot;,(new sc_Pair(&quot;\u1E9Cq&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair(&quot;\u1E9Cp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair(&quot;\u1E9Cq&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ct&quot;,null)),(new sc_Pair((new sc_Pair(&quot;\u1E9Cf&quot;,null)),null)))))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cf&quot;,null)),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cor&quot;,(new sc_Pair(&quot;\u1E9Cp&quot;,(new sc_Pair(&quot;\u1E9Cq&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair(&quot;\u1E9Cp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ct&quot;,null)),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair(&quot;\u1E9Cq&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ct&quot;,null)),(new sc_Pair((new sc_Pair(&quot;\u1E9Cf&quot;,null)),null)))))))),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair(&quot;\u1E9Cp&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair(&quot;\u1E9Cp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cf&quot;,null)),(new sc_Pair((new sc_Pair(&quot;\u1E9Ct&quot;,null)),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cimplies&quot;,(new sc_Pair(&quot;\u1E9Cp&quot;,(new sc_Pair(&quot;\u1E9Cq&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair(&quot;\u1E9Cp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair(&quot;\u1E9Cq&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ct&quot;,null)),(new sc_Pair((new sc_Pair(&quot;\u1E9Cf&quot;,null)),null)))))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ct&quot;,null)),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnumberp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,(new sc_Pair(&quot;\u1E9Cc&quot;,null)))))))),(new sc_Pair(&quot;\u1E9Cd&quot;,(new sc_Pair(&quot;\u1E9Ce&quot;,null)))))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,(new sc_Pair(&quot;\u1E9Cd&quot;,(new sc_Pair(&quot;\u1E9Ce&quot;,null)))))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair(&quot;\u1E9Cc&quot;,(new sc_Pair(&quot;\u1E9Cd&quot;,(new sc_Pair(&quot;\u1E9Ce&quot;,null)))))))),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cor&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnumberp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cc&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair(&quot;\u1E9Cc&quot;,null)))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnumberp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cor&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cmeaning&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus-tree&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))),(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cmeaning&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus-tree&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cmeaning&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus-tree&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cmeaning&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus-tree&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus-fringe&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))),(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cmeaning&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Creverse&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Creverse&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Creverse&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,null)))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cor&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cexec&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cpds&quot;,(new sc_Pair(&quot;\u1E9Cenvrn&quot;,null)))))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cexec&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cexec&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cpds&quot;,(new sc_Pair(&quot;\u1E9Cenvrn&quot;,null)))))))),(new sc_Pair(&quot;\u1E9Cenvrn&quot;,null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cmc-flatten&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cflatten&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cmember&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cor&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cmember&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cmember&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cmember&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Creverse&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cmember&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clength&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Creverse&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Clength&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cmember&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cintersect&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,(new sc_Pair(&quot;\u1E9Cc&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cmember&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cmember&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cc&quot;,null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnth&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),(new sc_Pair(&quot;\u1E9Ci&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cexp&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cj&quot;,(new sc_Pair(&quot;\u1E9Ck&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cexp&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair(&quot;\u1E9Cj&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cexp&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair(&quot;\u1E9Ck&quot;,null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cexp&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cj&quot;,(new sc_Pair(&quot;\u1E9Ck&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cexp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cexp&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair(&quot;\u1E9Cj&quot;,null)))))),(new sc_Pair(&quot;\u1E9Ck&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Creverse-loop&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Creverse&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Creverse-loop&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnil&quot;,null)),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Creverse&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccount-list&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Csort-lp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccount-list&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ccount-list&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cc&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,(new sc_Pair(&quot;\u1E9Cc&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cremainder&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cquotient&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cpower-eval&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cbig-plus1&quot;,(new sc_Pair(&quot;\u1E9Cl&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair(&quot;\u1E9Cbase&quot;,null)))))))),(new sc_Pair(&quot;\u1E9Cbase&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cpower-eval&quot;,(new sc_Pair(&quot;\u1E9Cl&quot;,(new sc_Pair(&quot;\u1E9Cbase&quot;,null)))))),(new sc_Pair(&quot;\u1E9Ci&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cpower-eval&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cbig-plus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair(&quot;\u1E9Cbase&quot;,null)))))))))),(new sc_Pair(&quot;\u1E9Cbase&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cpower-eval&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cbase&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cpower-eval&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cbase&quot;,null)))))),null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cremainder&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair((1),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cremainder&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cremainder&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cquotient&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair(&quot;\u1E9Cj&quot;,null)))))),(new sc_Pair(&quot;\u1E9Ci&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,null)))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cor&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cj&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cj&quot;,(new sc_Pair((1),null)))))),null)))),null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cremainder&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cpower-eval&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cpower-rep&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair(&quot;\u1E9Cbase&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cbase&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cpower-eval&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cbig-plus&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cpower-rep&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair(&quot;\u1E9Cbase&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cpower-rep&quot;,(new sc_Pair(&quot;\u1E9Cj&quot;,(new sc_Pair(&quot;\u1E9Cbase&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),(new sc_Pair(&quot;\u1E9Cbase&quot;,null)))))))))),(new sc_Pair(&quot;\u1E9Cbase&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair(&quot;\u1E9Cj&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cgcd&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cgcd&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnth&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),(new sc_Pair(&quot;\u1E9Ci&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnth&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnth&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clength&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,null)))),null)))))),null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair(&quot;\u1E9Cc&quot;,(new sc_Pair(&quot;\u1E9Cw&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cc&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cw&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cremainder&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cc&quot;,null)))))),null)))))),(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,(new sc_Pair(&quot;\u1E9Cc&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cadd1&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))),(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cadd1&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cgcd&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cgcd&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cvalue&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnormalize&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cvalue&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cflatten&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ccons&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnil&quot;,null)),null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnlistp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clistp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cgopher&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Clistp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Csamefringe&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cflatten&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cflatten&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cgreatest-factor&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cor&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair((1),null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cgreatest-factor&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((1),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((1),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnumberp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cgreatest-factor&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cor&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair((1),null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnumberp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))),null)))))),null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes-list&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes-list&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes-list&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cprime-list&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cprime-list&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cprime-list&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cw&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnumberp&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cor&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cw&quot;,(new sc_Pair((1),null)))))),null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cgreatereqp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cor&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cand&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnumberp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair((1),null)))))),null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cremainder&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),(new sc_Pair((1),null)))))),(new sc_Pair(sc_list(&quot;\u1E9Cand&quot;, (new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))),null)))), (new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))),null)))), (new sc_Pair(&quot;\u1E9Cnumberp&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,null)))), (new sc_Pair(&quot;\u1E9Cnumberp&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Csub1&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Csub1&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clength&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdelete&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cl&quot;,null)))))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Clength&quot;,(new sc_Pair(&quot;\u1E9Cl&quot;,null)))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cmember&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cl&quot;,null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Csort2&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdelete&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cl&quot;,null)))))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cdelete&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Csort2&quot;,(new sc_Pair(&quot;\u1E9Cl&quot;,null)))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdsort&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Csort2&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clength&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccons&quot;,(new sc_Pair(&quot;\u1E9Cx1&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccons&quot;,(new sc_Pair(&quot;\u1E9Cx2&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccons&quot;,(new sc_Pair(&quot;\u1E9Cx3&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccons&quot;,(new sc_Pair(&quot;\u1E9Cx4&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccons&quot;,(new sc_Pair(&quot;\u1E9Cx5&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccons&quot;,(new sc_Pair(&quot;\u1E9Cx6&quot;,(new sc_Pair(&quot;\u1E9Cx7&quot;,null)))))),null)))))),null)))))),null)))))),null)))))),null)))))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair((6),(new sc_Pair((new sc_Pair(&quot;\u1E9Clength&quot;,(new sc_Pair(&quot;\u1E9Cx7&quot;,null)))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cadd1&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cadd1&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))),(new sc_Pair((2),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cquotient&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))),(new sc_Pair((2),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cquotient&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair((2),null)))))),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Csigma&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),(new sc_Pair(&quot;\u1E9Ci&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cquotient&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cadd1&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,null)))),null)))))),(new sc_Pair((2),null)))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cadd1&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnumberp&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cadd1&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cadd1&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnot&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair(&quot;\u1E9Cz&quot;,null)))),null)))))),null)))))))),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cmeaning&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus-tree&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cdelete&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))),(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cmember&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cmeaning&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus-tree&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cmeaning&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cmeaning&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus-tree&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cadd1&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnumberp&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnth&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cnil&quot;,null)),(new sc_Pair(&quot;\u1E9Ci&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnil&quot;,null)),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clast&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clistp&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Clast&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clistp&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ccons&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccar&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clast&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,null)))),null)))),(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))))),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ct&quot;,null)),(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cf&quot;,null)),(new sc_Pair(&quot;\u1E9Cz&quot;,null)))))),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cassignment&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cassignedp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cassignment&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cassignment&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccar&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cgopher&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clistp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ccar&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cflatten&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cflatten&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ccdr&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cgopher&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clistp&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ccdr&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cflatten&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Ccons&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnil&quot;,null)),null)))))),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cquotient&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czerop&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))),(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),(new sc_Pair((new sc_Pair(&quot;\u1E9Cfix&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,null)))),null)))))))),null)))))), (new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cget&quot;,(new sc_Pair(&quot;\u1E9Cj&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cset&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,(new sc_Pair(&quot;\u1E9Cval&quot;,(new sc_Pair(&quot;\u1E9Cmem&quot;,null)))))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cif&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ceqp&quot;,(new sc_Pair(&quot;\u1E9Cj&quot;,(new sc_Pair(&quot;\u1E9Ci&quot;,null)))))),(new sc_Pair(&quot;\u1E9Cval&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cget&quot;,(new sc_Pair(&quot;\u1E9Cj&quot;,(new sc_Pair(&quot;\u1E9Cmem&quot;,null)))))),null)))))))),null))))))));
+    (const_nboyer = (new sc_Pair((new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cf&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cc&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Czero&quot;,null)),null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cy&quot;,(new sc_Pair(&quot;\u1E9Cf&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ctimes&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Cc&quot;,(new sc_Pair(&quot;\u1E9Cd&quot;,null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cz&quot;,(new sc_Pair(&quot;\u1E9Cf&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Creverse&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cappend&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cnil&quot;,null)),null)))))),null)))),null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cu&quot;,(new sc_Pair(&quot;\u1E9Cequal&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cplus&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cdifference&quot;,(new sc_Pair(&quot;\u1E9Cx&quot;,(new sc_Pair(&quot;\u1E9Cy&quot;,null)))))),null)))))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cw&quot;,(new sc_Pair(&quot;\u1E9Clessp&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Cremainder&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))))),(new sc_Pair((new sc_Pair(&quot;\u1E9Cmember&quot;,(new sc_Pair(&quot;\u1E9Ca&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Clength&quot;,(new sc_Pair(&quot;\u1E9Cb&quot;,null)))),null)))))),null)))))))),null)))))))))));
+    BgL_nboyerzd2benchmarkzd2 = function() {
+        var args = null;
+        for (var sc_tmp = arguments.length - 1; sc_tmp &gt;= 0; sc_tmp--) {
+            args = sc_cons(arguments[sc_tmp], args);
+        }
+        var n;
+        return ((n = ((args === null)?(0):(args.car))), (BgL_setupzd2boyerzd2()), (BgL_runzd2benchmarkzd2((&quot;nboyer&quot;+(sc_number2string(n))), (1), function() {
+            return (BgL_testzd2boyerzd2(n));
+        }, function(rewrites) {
+            if ((sc_isNumber(rewrites)))
+                switch (n) {
+                case (0):
+                    return (rewrites===(95024));
+                    break;
+                case (1):
+                    return (rewrites===(591777));
+                    break;
+                case (2):
+                    return (rewrites===(1813975));
+                    break;
+                case (3):
+                    return (rewrites===(5375678));
+                    break;
+                case (4):
+                    return (rewrites===(16445406));
+                    break;
+                case (5):
+                    return (rewrites===(51507739));
+                    break;
+                default:
+                    return true;
+                    break;
+                }
+            else
+                return false;
+        })));
+    };
+    BgL_setupzd2boyerzd2 = function() {
+        return true;
+    };
+    BgL_testzd2boyerzd2 = function() {
+        return true;
+    };
+    translate_term_nboyer = function(term) {
+        var lst;
+        return (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), ((lst = (term.cdr)), ((lst === null)?null:(new sc_Pair((translate_term_nboyer((lst.car))), (translate_args_nboyer((lst.cdr))))))))));
+    };
+    translate_args_nboyer = function(lst) {
+        var sc_lst_5;
+        var term;
+        return ((lst === null)?null:(new sc_Pair(((term = (lst.car)), (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr))))))), ((sc_lst_5 = (lst.cdr)), ((sc_lst_5 === null)?null:(new sc_Pair((translate_term_nboyer((sc_lst_5.car))), (translate_args_nboyer((sc_lst_5.cdr))))))))));
+    };
+    untranslate_term_nboyer = function(term) {
+        var optrOpnd;
+        var tail1131;
+        var L1127;
+        var falseHead1130;
+        var symbol_record;
+        if (!(term instanceof sc_Pair))
+            return term;
+        else
+            {
+                (falseHead1130 = (new sc_Pair(null, null)));
+                (L1127 = (term.cdr));
+                (tail1131 = falseHead1130);
+                while (!(L1127 === null)) {
+                    {
+                        (tail1131.cdr = (new sc_Pair((untranslate_term_nboyer((L1127.car))), null)));
+                        (tail1131 = (tail1131.cdr));
+                        (L1127 = (L1127.cdr));
+                    }
+                }
+                (optrOpnd = (falseHead1130.cdr));
+                return (new sc_Pair(((symbol_record = (term.car)), (symbol_record[(0)])), optrOpnd));
+            }
+    };
+    BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer = function(sym) {
+        var r;
+        var x;
+        return ((x = (sc_assq(sym, BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer))), ((x!== false)?(x.cdr):((r = [sym, null]), (BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = (new sc_Pair((new sc_Pair(sym, r)), BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer))), r)));
+    };
+    (BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = null);
+    translate_alist_nboyer = function(alist) {
+        var sc_alist_6;
+        var term;
+        return ((alist === null)?null:(new sc_Pair((new sc_Pair((alist.car.car), ((term = (alist.car.cdr)), (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr))))))))), ((sc_alist_6 = (alist.cdr)), ((sc_alist_6 === null)?null:(new sc_Pair((new sc_Pair((sc_alist_6.car.car), (translate_term_nboyer((sc_alist_6.car.cdr))))), (translate_alist_nboyer((sc_alist_6.cdr))))))))));
+    };
+    apply_subst_nboyer = function(alist, term) {
+        var lst;
+        var temp_temp;
+        return (!(term instanceof sc_Pair)?((temp_temp = (sc_assq(term, alist))), ((temp_temp!== false)?(temp_temp.cdr):term)):(new sc_Pair((term.car), ((lst = (term.cdr)), ((lst === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (lst.car))), (apply_subst_lst_nboyer(alist, (lst.cdr))))))))));
+    };
+    apply_subst_lst_nboyer = function(alist, lst) {
+        var sc_lst_7;
+        return ((lst === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (lst.car))), ((sc_lst_7 = (lst.cdr)), ((sc_lst_7 === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (sc_lst_7.car))), (apply_subst_lst_nboyer(alist, (sc_lst_7.cdr))))))))));
+    };
+    tautologyp_nboyer = function(sc_x_11, true_lst, false_lst) {
+        var tmp1125;
+        var x;
+        var tmp1126;
+        var sc_x_8;
+        var sc_tmp1125_9;
+        var sc_tmp1126_10;
+        var sc_x_11;
+        var true_lst;
+        var false_lst;
+        while (true) {
+            if ((((sc_tmp1126_10 = (is_term_equal_nboyer(sc_x_11, true_term_nboyer))), ((sc_tmp1126_10!== false)?sc_tmp1126_10:(is_term_member_nboyer(sc_x_11, true_lst))))!== false))
+                return true;
+            else
+                if ((((sc_tmp1125_9 = (is_term_equal_nboyer(sc_x_11, false_term_nboyer))), ((sc_tmp1125_9!== false)?sc_tmp1125_9:(is_term_member_nboyer(sc_x_11, false_lst))))!== false))
+                    return false;
+                else
+                    if (!(sc_x_11 instanceof sc_Pair))
+                        return false;
+                    else
+                        if (((sc_x_11.car)===if_constructor_nboyer))
+                            if ((((sc_x_8 = (sc_x_11.cdr.car)), (tmp1126 = (is_term_equal_nboyer(sc_x_8, true_term_nboyer))), ((tmp1126!== false)?tmp1126:(is_term_member_nboyer(sc_x_8, true_lst))))!== false))
+                                (sc_x_11 = (sc_x_11.cdr.cdr.car));
+                            else
+                                if ((((x = (sc_x_11.cdr.car)), (tmp1125 = (is_term_equal_nboyer(x, false_term_nboyer))), ((tmp1125!== false)?tmp1125:(is_term_member_nboyer(x, false_lst))))!== false))
+                                    (sc_x_11 = (sc_x_11.cdr.cdr.cdr.car));
+                                else
+                                    if (((tautologyp_nboyer((sc_x_11.cdr.cdr.car), (new sc_Pair((sc_x_11.cdr.car), true_lst)), false_lst))!== false))
+                                        {
+                                            (false_lst = (new sc_Pair((sc_x_11.cdr.car), false_lst)));
+                                            (sc_x_11 = (sc_x_11.cdr.cdr.cdr.car));
+                                        }
+                                    else
+                                        return false;
+                        else
+                            return false;
+        }
+    };
+    (if_constructor_nboyer = &quot;\u1E9C*&quot;);
+    (rewrite_count_nboyer = (0));
+    rewrite_nboyer = function(term) {
+        var term2;
+        var sc_term_12;
+        var lst;
+        var symbol_record;
+        var sc_lst_13;
+        {
+            (++rewrite_count_nboyer);
+            if (!(term instanceof sc_Pair))
+                return term;
+            else
+                {
+                    (sc_term_12 = (new sc_Pair((term.car), ((sc_lst_13 = (term.cdr)), ((sc_lst_13 === null)?null:(new sc_Pair((rewrite_nboyer((sc_lst_13.car))), (rewrite_args_nboyer((sc_lst_13.cdr))))))))));
+                    (lst = ((symbol_record = (term.car)), (symbol_record[(1)])));
+                    while (true) {
+                        if ((lst === null))
+                            return sc_term_12;
+                        else
+                            if ((((term2 = ((lst.car).cdr.car)), (unify_subst_nboyer = null), (one_way_unify1_nboyer(sc_term_12, term2)))!== false))
+                                return (rewrite_nboyer((apply_subst_nboyer(unify_subst_nboyer, ((lst.car).cdr.cdr.car)))));
+                            else
+                                (lst = (lst.cdr));
+                    }
+                }
+        }
+    };
+    rewrite_args_nboyer = function(lst) {
+        var sc_lst_14;
+        return ((lst === null)?null:(new sc_Pair((rewrite_nboyer((lst.car))), ((sc_lst_14 = (lst.cdr)), ((sc_lst_14 === null)?null:(new sc_Pair((rewrite_nboyer((sc_lst_14.car))), (rewrite_args_nboyer((sc_lst_14.cdr))))))))));
+    };
+    (unify_subst_nboyer = &quot;\u1E9C*&quot;);
+    one_way_unify1_nboyer = function(term1, term2) {
+        var lst1;
+        var lst2;
+        var temp_temp;
+        if (!(term2 instanceof sc_Pair))
+            {
+                (temp_temp = (sc_assq(term2, unify_subst_nboyer)));
+                if ((temp_temp!== false))
+                    return (is_term_equal_nboyer(term1, (temp_temp.cdr)));
+                else
+                    if ((sc_isNumber(term2)))
+                        return (sc_isEqual(term1, term2));
+                    else
+                        {
+                            (unify_subst_nboyer = (new sc_Pair((new sc_Pair(term2, term1)), unify_subst_nboyer)));
+                            return true;
+                        }
+            }
+        else
+            if (!(term1 instanceof sc_Pair))
+                return false;
+            else
+                if (((term1.car)===(term2.car)))
+                    {
+                        (lst1 = (term1.cdr));
+                        (lst2 = (term2.cdr));
+                        while (true) {
+                            if ((lst1 === null))
+                                return (lst2 === null);
+                            else
+                                if ((lst2 === null))
+                                    return false;
+                                else
+                                    if (((one_way_unify1_nboyer((lst1.car), (lst2.car)))!== false))
+                                        {
+                                            (lst1 = (lst1.cdr));
+                                            (lst2 = (lst2.cdr));
+                                        }
+                                    else
+                                        return false;
+                        }
+                    }
+                else
+                    return false;
+    };
+    (false_term_nboyer = &quot;\u1E9C*&quot;);
+    (true_term_nboyer = &quot;\u1E9C*&quot;);
+    trans_of_implies1_nboyer = function(n) {
+        var sc_n_15;
+        return ((sc_isEqual(n, (1)))?(sc_list(&quot;\u1E9Cimplies&quot;, (0), (1))):(sc_list(&quot;\u1E9Cand&quot;, (sc_list(&quot;\u1E9Cimplies&quot;, (n-(1)), n)), ((sc_n_15 = (n-(1))), ((sc_isEqual(sc_n_15, (1)))?(sc_list(&quot;\u1E9Cimplies&quot;, (0), (1))):(sc_list(&quot;\u1E9Cand&quot;, (sc_list(&quot;\u1E9Cimplies&quot;, (sc_n_15-(1)), sc_n_15)), (trans_of_implies1_nboyer((sc_n_15-(1)))))))))));
+    };
+    is_term_equal_nboyer = function(x, y) {
+        var lst1;
+        var lst2;
+        var r2;
+        var r1;
+        if ((x instanceof sc_Pair))
+            if ((y instanceof sc_Pair))
+                if ((((r1 = (x.car)), (r2 = (y.car)), (r1===r2))!== false))
+                    {
+                        (lst1 = (x.cdr));
+                        (lst2 = (y.cdr));
+                        while (true) {
+                            if ((lst1 === null))
+                                return (lst2 === null);
+                            else
+                                if ((lst2 === null))
+                                    return false;
+                                else
+                                    if (((is_term_equal_nboyer((lst1.car), (lst2.car)))!== false))
+                                        {
+                                            (lst1 = (lst1.cdr));
+                                            (lst2 = (lst2.cdr));
+                                        }
+                                    else
+                                        return false;
+                        }
+                    }
+                else
+                    return false;
+            else
+                return false;
+        else
+            return (sc_isEqual(x, y));
+    };
+    is_term_member_nboyer = function(x, lst) {
+        var x;
+        var lst;
+        while (true) {
+            if ((lst === null))
+                return false;
+            else
+                if (((is_term_equal_nboyer(x, (lst.car)))!== false))
+                    return true;
+                else
+                    (lst = (lst.cdr));
+        }
+    };
+    BgL_setupzd2boyerzd2 = function() {
+        var symbol_record;
+        var value;
+        var BgL_sc_symbolzd2record_16zd2;
+        var sym;
+        var sc_sym_17;
+        var term;
+        var lst;
+        var sc_term_18;
+        var sc_term_19;
+        {
+            (BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = null);
+            (if_constructor_nboyer = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer(&quot;\u1E9Cif&quot;)));
+            (false_term_nboyer = ((sc_term_19 = (new sc_Pair(&quot;\u1E9Cf&quot;,null))), (!(sc_term_19 instanceof sc_Pair)?sc_term_19:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_19.car))), (translate_args_nboyer((sc_term_19.cdr))))))));
+            (true_term_nboyer = ((sc_term_18 = (new sc_Pair(&quot;\u1E9Ct&quot;,null))), (!(sc_term_18 instanceof sc_Pair)?sc_term_18:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_18.car))), (translate_args_nboyer((sc_term_18.cdr))))))));
+            (lst = sc_const_3_nboyer);
+            while (!(lst === null)) {
+                {
+                    (term = (lst.car));
+                    if (((term instanceof sc_Pair)&amp;&amp;(((term.car)===&quot;\u1E9Cequal&quot;)&amp;&amp;((term.cdr.car) instanceof sc_Pair))))
+                        {
+                            (sc_sym_17 = ((term.cdr.car).car));
+                            (value = (new sc_Pair((!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr)))))), ((sym = ((term.cdr.car).car)), (BgL_sc_symbolzd2record_16zd2 = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer(sym))), (BgL_sc_symbolzd2record_16zd2[(1)])))));
+                            (symbol_record = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer(sc_sym_17)));
+                            (symbol_record[(1)] = value);
+                        }
+                    else
+                        (sc_error(&quot;ADD-LEMMA did not like term:  &quot;, term));
+                    (lst = (lst.cdr));
+                }
+            }
+            return true;
+        }
+    };
+    BgL_testzd2boyerzd2 = function(n) {
+        var optrOpnd;
+        var term;
+        var sc_n_20;
+        var answer;
+        var sc_term_21;
+        var sc_term_22;
+        {
+            (rewrite_count_nboyer = (0));
+            (term = sc_const_4_nboyer);
+            (sc_n_20 = n);
+            while (!(sc_n_20=== 0)) {
+                {
+                    (term = (sc_list(&quot;\u1E9Cor&quot;, term, (new sc_Pair(&quot;\u1E9Cf&quot;,null)))));
+                    (--sc_n_20);
+                }
+            }
+            (sc_term_22 = term);
+            if (!(sc_term_22 instanceof sc_Pair))
+                (optrOpnd = sc_term_22);
+            else
+                (optrOpnd = (new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_22.car))), (translate_args_nboyer((sc_term_22.cdr))))));
+            (sc_term_21 = (apply_subst_nboyer(((const_nboyer === null)?null:(new sc_Pair((new sc_Pair((const_nboyer.car.car), (translate_term_nboyer((const_nboyer.car.cdr))))), (translate_alist_nboyer((const_nboyer.cdr)))))), optrOpnd)));
+            (answer = (tautologyp_nboyer((rewrite_nboyer(sc_term_21)), null, null)));
+            (sc_write(rewrite_count_nboyer));
+            (sc_display(&quot; rewrites&quot;));
+            (sc_newline());
+            if ((answer!== false))
+                return rewrite_count_nboyer;
+            else
+                return false;
+        }
+    };
+}
+/* Exported Variables */
+var BgL_parsezd2ze3nbzd2treesze3;
+var BgL_earleyzd2benchmarkzd2;
+var BgL_parsezd2ze3parsedzf3zc2;
+var test;
+var BgL_parsezd2ze3treesz31;
+var BgL_makezd2parserzd2;
+/* End Exports */
+
+var const_earley;
+{
+    (const_earley = (new sc_Pair((new sc_Pair(&quot;\u1E9Cs&quot;,(new sc_Pair((new sc_Pair(&quot;\u1E9Ca&quot;,null)),(new sc_Pair((new sc_Pair(&quot;\u1E9Cs&quot;,(new sc_Pair(&quot;\u1E9Cs&quot;,null)))),null)))))),null)));
+    BgL_makezd2parserzd2 = function(grammar, lexer) {
+        var i;
+        var parser_descr;
+        var def_loop;
+        var nb_nts;
+        var names;
+        var steps;
+        var predictors;
+        var enders;
+        var starters;
+        var nts;
+        var sc_names_1;
+        var sc_steps_2;
+        var sc_predictors_3;
+        var sc_enders_4;
+        var sc_starters_5;
+        var nb_confs;
+        var BgL_sc_defzd2loop_6zd2;
+        var BgL_sc_nbzd2nts_7zd2;
+        var sc_nts_8;
+        var BgL_sc_defzd2loop_9zd2;
+        var ind;
+        {
+            ind = function(nt, sc_nts_10) {
+                var i;
+                {
+                    (i = ((sc_nts_10.length)-(1)));
+                    while (true) {
+                        if ((i&gt;=(0)))
+                            if ((sc_isEqual((sc_nts_10[i]), nt)))
+                                return i;
+                            else
+                                (--i);
+                        else
+                            return false;
+                    }
+                }
+            };
+            (sc_nts_8 = ((BgL_sc_defzd2loop_9zd2 = function(defs, sc_nts_11) {
+                var rule_loop;
+                var head;
+                var def;
+                return ((defs instanceof sc_Pair)?((def = (defs.car)), (head = (def.car)), (rule_loop = function(rules, sc_nts_12) {
+                    var nt;
+                    var l;
+                    var sc_nts_13;
+                    var rule;
+                    if ((rules instanceof sc_Pair))
+                        {
+                            (rule = (rules.car));
+                            (l = rule);
+                            (sc_nts_13 = sc_nts_12);
+                            while ((l instanceof sc_Pair)) {
+                                {
+                                    (nt = (l.car));
+                                    (l = (l.cdr));
+                                    (sc_nts_13 = (((sc_member(nt, sc_nts_13))!== false)?sc_nts_13:(new sc_Pair(nt, sc_nts_13))));
+                                }
+                            }
+                            return (rule_loop((rules.cdr), sc_nts_13));
+                        }
+                    else
+                        return (BgL_sc_defzd2loop_9zd2((defs.cdr), sc_nts_12));
+                }), (rule_loop((def.cdr), (((sc_member(head, sc_nts_11))!== false)?sc_nts_11:(new sc_Pair(head, sc_nts_11)))))):(sc_list2vector((sc_reverse(sc_nts_11)))));
+            }), (BgL_sc_defzd2loop_9zd2(grammar, null))));
+            (BgL_sc_nbzd2nts_7zd2 = (sc_nts_8.length));
+            (nb_confs = (((BgL_sc_defzd2loop_6zd2 = function(defs, BgL_sc_nbzd2confs_14zd2) {
+                var rule_loop;
+                var def;
+                return ((defs instanceof sc_Pair)?((def = (defs.car)), (rule_loop = function(rules, BgL_sc_nbzd2confs_15zd2) {
+                    var l;
+                    var BgL_sc_nbzd2confs_16zd2;
+                    var rule;
+                    if ((rules instanceof sc_Pair))
+                        {
+                            (rule = (rules.car));
+                            (l = rule);
+                            (BgL_sc_nbzd2confs_16zd2 = BgL_sc_nbzd2confs_15zd2);
+                            while ((l instanceof sc_Pair)) {
+                                {
+                                    (l = (l.cdr));
+                                    (++BgL_sc_nbzd2confs_16zd2);
+                                }
+                            }
+                            return (rule_loop((rules.cdr), (BgL_sc_nbzd2confs_16zd2+(1))));
+                        }
+                    else
+                        return (BgL_sc_defzd2loop_6zd2((defs.cdr), BgL_sc_nbzd2confs_15zd2));
+                }), (rule_loop((def.cdr), BgL_sc_nbzd2confs_14zd2))):BgL_sc_nbzd2confs_14zd2);
+            }), (BgL_sc_defzd2loop_6zd2(grammar, (0))))+BgL_sc_nbzd2nts_7zd2));
+            (sc_starters_5 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null)));
+            (sc_enders_4 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null)));
+            (sc_predictors_3 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null)));
+            (sc_steps_2 = (sc_makeVector(nb_confs, false)));
+            (sc_names_1 = (sc_makeVector(nb_confs, false)));
+            (nts = sc_nts_8);
+            (starters = sc_starters_5);
+            (enders = sc_enders_4);
+            (predictors = sc_predictors_3);
+            (steps = sc_steps_2);
+            (names = sc_names_1);
+            (nb_nts = (sc_nts_8.length));
+            (i = (nb_nts-(1)));
+            while ((i&gt;=(0))) {
+                {
+                    (sc_steps_2[i] = (i-nb_nts));
+                    (sc_names_1[i] = (sc_list((sc_nts_8[i]), (0))));
+                    (sc_enders_4[i] = (sc_list(i)));
+                    (--i);
+                }
+            }
+            def_loop = function(defs, conf) {
+                var rule_loop;
+                var head;
+                var def;
+                return ((defs instanceof sc_Pair)?((def = (defs.car)), (head = (def.car)), (rule_loop = function(rules, conf, rule_num) {
+                    var i;
+                    var sc_i_17;
+                    var nt;
+                    var l;
+                    var sc_conf_18;
+                    var sc_i_19;
+                    var rule;
+                    if ((rules instanceof sc_Pair))
+                        {
+                            (rule = (rules.car));
+                            (names[conf] = (sc_list(head, rule_num)));
+                            (sc_i_19 = (ind(head, nts)));
+                            (starters[sc_i_19] = (new sc_Pair(conf, (starters[sc_i_19]))));
+                            (l = rule);
+                            (sc_conf_18 = conf);
+                            while ((l instanceof sc_Pair)) {
+                                {
+                                    (nt = (l.car));
+                                    (steps[sc_conf_18] = (ind(nt, nts)));
+                                    (sc_i_17 = (ind(nt, nts)));
+                                    (predictors[sc_i_17] = (new sc_Pair(sc_conf_18, (predictors[sc_i_17]))));
+                                    (l = (l.cdr));
+                                    (++sc_conf_18);
+                                }
+                            }
+                            (steps[sc_conf_18] = ((ind(head, nts))-nb_nts));
+                            (i = (ind(head, nts)));
+                            (enders[i] = (new sc_Pair(sc_conf_18, (enders[i]))));
+                            return (rule_loop((rules.cdr), (sc_conf_18+(1)), (rule_num+(1))));
+                        }
+                    else
+                        return (def_loop((defs.cdr), conf));
+                }), (rule_loop((def.cdr), conf, (1)))):undefined);
+            };
+            (def_loop(grammar, (sc_nts_8.length)));
+            (parser_descr = [lexer, sc_nts_8, sc_starters_5, sc_enders_4, sc_predictors_3, sc_steps_2, sc_names_1]);
+            return function(input) {
+                var optrOpnd;
+                var sc_optrOpnd_20;
+                var sc_optrOpnd_21;
+                var sc_optrOpnd_22;
+                var loop1;
+                var BgL_sc_stateza2_23za2;
+                var toks;
+                var BgL_sc_nbzd2nts_24zd2;
+                var sc_steps_25;
+                var sc_enders_26;
+                var state_num;
+                var BgL_sc_statesza2_27za2;
+                var states;
+                var i;
+                var conf;
+                var l;
+                var tok_nts;
+                var sc_i_28;
+                var sc_i_29;
+                var l1;
+                var l2;
+                var tok;
+                var tail1129;
+                var L1125;
+                var goal_enders;
+                var BgL_sc_statesza2_30za2;
+                var BgL_sc_nbzd2nts_31zd2;
+                var BgL_sc_nbzd2confs_32zd2;
+                var nb_toks;
+                var goal_starters;
+                var sc_states_33;
+                var BgL_sc_nbzd2confs_34zd2;
+                var BgL_sc_nbzd2toks_35zd2;
+                var sc_toks_36;
+                var falseHead1128;
+                var sc_names_37;
+                var sc_steps_38;
+                var sc_predictors_39;
+                var sc_enders_40;
+                var sc_starters_41;
+                var sc_nts_42;
+                var lexer;
+                var sc_ind_43;
+                var make_states;
+                var BgL_sc_confzd2setzd2getza2_44za2;
+                var conf_set_merge_new_bang;
+                var conf_set_adjoin;
+                var BgL_sc_confzd2setzd2adjoinza2_45za2;
+                var BgL_sc_confzd2setzd2adjoinza2za2_46z00;
+                var conf_set_union;
+                var forw;
+                var is_parsed;
+                var deriv_trees;
+                var BgL_sc_derivzd2treesza2_47z70;
+                var nb_deriv_trees;
+                var BgL_sc_nbzd2derivzd2treesza2_48za2;
+                {
+                    sc_ind_43 = function(nt, sc_nts_49) {
+                        var i;
+                        {
+                            (i = ((sc_nts_49.length)-(1)));
+                            while (true) {
+                                if ((i&gt;=(0)))
+                                    if ((sc_isEqual((sc_nts_49[i]), nt)))
+                                        return i;
+                                    else
+                                        (--i);
+                                else
+                                    return false;
+                            }
+                        }
+                    };
+                    make_states = function(BgL_sc_nbzd2toks_50zd2, BgL_sc_nbzd2confs_51zd2) {
+                        var v;
+                        var i;
+                        var sc_states_52;
+                        {
+                            (sc_states_52 = (sc_makeVector((BgL_sc_nbzd2toks_50zd2+(1)), false)));
+                            (i = BgL_sc_nbzd2toks_50zd2);
+                            while ((i&gt;=(0))) {
+                                {
+                                    (v = (sc_makeVector((BgL_sc_nbzd2confs_51zd2+(1)), false)));
+                                    (v[(0)] = (-1));
+                                    (sc_states_52[i] = v);
+                                    (--i);
+                                }
+                            }
+                            return sc_states_52;
+                        }
+                    };
+                    BgL_sc_confzd2setzd2getza2_44za2 = function(state, BgL_sc_statezd2num_53zd2, sc_conf_54) {
+                        var conf_set;
+                        var BgL_sc_confzd2set_55zd2;
+                        return ((BgL_sc_confzd2set_55zd2 = (state[(sc_conf_54+(1))])), ((BgL_sc_confzd2set_55zd2!== false)?BgL_sc_confzd2set_55zd2:((conf_set = (sc_makeVector((BgL_sc_statezd2num_53zd2+(6)), false))), (conf_set[(1)] = (-3)), (conf_set[(2)] = (-1)), (conf_set[(3)] = (-1)), (conf_set[(4)] = (-1)), (state[(sc_conf_54+(1))] = conf_set), conf_set)));
+                    };
+                    conf_set_merge_new_bang = function(conf_set) {
+                        return ((conf_set[((conf_set[(1)])+(5))] = (conf_set[(4)])), (conf_set[(1)] = (conf_set[(3)])), (conf_set[(3)] = (-1)), (conf_set[(4)] = (-1)));
+                    };
+                    conf_set_adjoin = function(state, conf_set, sc_conf_56, i) {
+                        var tail;
+                        return ((tail = (conf_set[(3)])), (conf_set[(i+(5))] = (-1)), (conf_set[(tail+(5))] = i), (conf_set[(3)] = i), ((tail&lt;(0))?((conf_set[(0)] = (state[(0)])), (state[(0)] = sc_conf_56)):undefined));
+                    };
+                    BgL_sc_confzd2setzd2adjoinza2_45za2 = function(sc_states_57, BgL_sc_statezd2num_58zd2, l, i) {
+                        var conf_set;
+                        var sc_conf_59;
+                        var l1;
+                        var state;
+                        {
+                            (state = (sc_states_57[BgL_sc_statezd2num_58zd2]));
+                            (l1 = l);
+                            while ((l1 instanceof sc_Pair)) {
+                                {
+                                    (sc_conf_59 = (l1.car));
+                                    (conf_set = (BgL_sc_confzd2setzd2getza2_44za2(state, BgL_sc_statezd2num_58zd2, sc_conf_59)));
+                                    if (((conf_set[(i+(5))])=== false))
+                                        {
+                                            (conf_set_adjoin(state, conf_set, sc_conf_59, i));
+                                            (l1 = (l1.cdr));
+                                        }
+                                    else
+                                        (l1 = (l1.cdr));
+                                }
+                            }
+                            return undefined;
+                        }
+                    };
+                    BgL_sc_confzd2setzd2adjoinza2za2_46z00 = function(sc_states_60, BgL_sc_statesza2_61za2, BgL_sc_statezd2num_62zd2, sc_conf_63, i) {
+                        var BgL_sc_confzd2setza2_64z70;
+                        var BgL_sc_stateza2_65za2;
+                        var conf_set;
+                        var state;
+                        return ((state = (sc_states_60[BgL_sc_statezd2num_62zd2])), ((((conf_set = (state[(sc_conf_63+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)?((BgL_sc_stateza2_65za2 = (BgL_sc_statesza2_61za2[BgL_sc_statezd2num_62zd2])), (BgL_sc_confzd2setza2_64z70 = (BgL_sc_confzd2setzd2getza2_44za2(BgL_sc_stateza2_65za2, BgL_sc_statezd2num_62zd2, sc_conf_63))), (((BgL_sc_confzd2setza2_64z70[(i+(5))])=== false)?(conf_set_adjoin(BgL_sc_stateza2_65za2, BgL_sc_confzd2setza2_64z70, sc_conf_63, i)):undefined), true):false));
+                    };
+                    conf_set_union = function(state, conf_set, sc_conf_66, other_set) {
+                        var i;
+                        {
+                            (i = (other_set[(2)]));
+                            while ((i&gt;=(0))) {
+                                if (((conf_set[(i+(5))])=== false))
+                                    {
+                                        (conf_set_adjoin(state, conf_set, sc_conf_66, i));
+                                        (i = (other_set[(i+(5))]));
+                                    }
+                                else
+                                    (i = (other_set[(i+(5))]));
+                            }
+                            return undefined;
+                        }
+                    };
+                    forw = function(sc_states_67, BgL_sc_statezd2num_68zd2, sc_starters_69, sc_enders_70, sc_predictors_71, sc_steps_72, sc_nts_73) {
+                        var next_set;
+                        var next;
+                        var conf_set;
+                        var ender;
+                        var l;
+                        var starter_set;
+                        var starter;
+                        var sc_l_74;
+                        var sc_loop1_75;
+                        var head;
+                        var BgL_sc_confzd2set_76zd2;
+                        var BgL_sc_statezd2num_77zd2;
+                        var state;
+                        var sc_states_78;
+                        var preds;
+                        var BgL_sc_confzd2set_79zd2;
+                        var step;
+                        var sc_conf_80;
+                        var BgL_sc_nbzd2nts_81zd2;
+                        var sc_state_82;
+                        {
+                            (sc_state_82 = (sc_states_67[BgL_sc_statezd2num_68zd2]));
+                            (BgL_sc_nbzd2nts_81zd2 = (sc_nts_73.length));
+                            while (true) {
+                                {
+                                    (sc_conf_80 = (sc_state_82[(0)]));
+                                    if ((sc_conf_80&gt;=(0)))
+                                        {
+                                            (step = (sc_steps_72[sc_conf_80]));
+                                            (BgL_sc_confzd2set_79zd2 = (sc_state_82[(sc_conf_80+(1))]));
+                                            (head = (BgL_sc_confzd2set_79zd2[(4)]));
+                                            (sc_state_82[(0)] = (BgL_sc_confzd2set_79zd2[(0)]));
+                                            (conf_set_merge_new_bang(BgL_sc_confzd2set_79zd2));
+                                            if ((step&gt;=(0)))
+                                                {
+                                                    (sc_l_74 = (sc_starters_69[step]));
+                                                    while ((sc_l_74 instanceof sc_Pair)) {
+                                                        {
+                                                            (starter = (sc_l_74.car));
+                                                            (starter_set = (BgL_sc_confzd2setzd2getza2_44za2(sc_state_82, BgL_sc_statezd2num_68zd2, starter)));
+                                                            if (((starter_set[(BgL_sc_statezd2num_68zd2+(5))])=== false))
+                                                                {
+                                                                    (conf_set_adjoin(sc_state_82, starter_set, starter, BgL_sc_statezd2num_68zd2));
+                                                                    (sc_l_74 = (sc_l_74.cdr));
+                                                                }
+                                                            else
+                                                                (sc_l_74 = (sc_l_74.cdr));
+                                                        }
+                                                    }
+                                                    (l = (sc_enders_70[step]));
+                                                    while ((l instanceof sc_Pair)) {
+                                                        {
+                                                            (ender = (l.car));
+                                                            if ((((conf_set = (sc_state_82[(ender+(1))])), ((conf_set!== false)?(conf_set[(BgL_sc_statezd2num_68zd2+(5))]):false))!== false))
+                                                                {
+                                                                    (next = (sc_conf_80+(1)));
+                                                                    (next_set = (BgL_sc_confzd2setzd2getza2_44za2(sc_state_82, BgL_sc_statezd2num_68zd2, next)));
+                                                                    (conf_set_union(sc_state_82, next_set, next, BgL_sc_confzd2set_79zd2));
+                                                                    (l = (l.cdr));
+                                                                }
+                                                            else
+                                                                (l = (l.cdr));
+                                                        }
+                                                    }
+                                                }
+                                            else
+                                                {
+                                                    (preds = (sc_predictors_71[(step+BgL_sc_nbzd2nts_81zd2)]));
+                                                    (sc_states_78 = sc_states_67);
+                                                    (state = sc_state_82);
+                                                    (BgL_sc_statezd2num_77zd2 = BgL_sc_statezd2num_68zd2);
+                                                    (BgL_sc_confzd2set_76zd2 = BgL_sc_confzd2set_79zd2);
+                                                    sc_loop1_75 = function(l) {
+                                                        var sc_state_83;
+                                                        var BgL_sc_nextzd2set_84zd2;
+                                                        var sc_next_85;
+                                                        var pred_set;
+                                                        var i;
+                                                        var pred;
+                                                        if ((l instanceof sc_Pair))
+                                                            {
+                                                                (pred = (l.car));
+                                                                (i = head);
+                                                                while ((i&gt;=(0))) {
+                                                                    {
+                                                                        (pred_set = ((sc_state_83 = (sc_states_78[i])), (sc_state_83[(pred+(1))])));
+                                                                        if ((pred_set!== false))
+                                                                            {
+                                                                                (sc_next_85 = (pred+(1)));
+                                                                                (BgL_sc_nextzd2set_84zd2 = (BgL_sc_confzd2setzd2getza2_44za2(state, BgL_sc_statezd2num_77zd2, sc_next_85)));
+                                                                                (conf_set_union(state, BgL_sc_nextzd2set_84zd2, sc_next_85, pred_set));
+                                                                            }
+                                                                        (i = (BgL_sc_confzd2set_76zd2[(i+(5))]));
+                                                                    }
+                                                                }
+                                                                return (sc_loop1_75((l.cdr)));
+                                                            }
+                                                        else
+                                                            return undefined;
+                                                    };
+                                                    (sc_loop1_75(preds));
+                                                }
+                                        }
+                                    else
+                                        return undefined;
+                                }
+                            }
+                        }
+                    };
+                    is_parsed = function(nt, i, j, sc_nts_86, sc_enders_87, sc_states_88) {
+                        var conf_set;
+                        var state;
+                        var sc_conf_89;
+                        var l;
+                        var BgL_sc_ntza2_90za2;
+                        {
+                            (BgL_sc_ntza2_90za2 = (sc_ind_43(nt, sc_nts_86)));
+                            if ((BgL_sc_ntza2_90za2!== false))
+                                {
+                                    (sc_nts_86.length);
+                                    (l = (sc_enders_87[BgL_sc_ntza2_90za2]));
+                                    while (true) {
+                                        if ((l instanceof sc_Pair))
+                                            {
+                                                (sc_conf_89 = (l.car));
+                                                if ((((state = (sc_states_88[j])), (conf_set = (state[(sc_conf_89+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false))
+                                                    return true;
+                                                else
+                                                    (l = (l.cdr));
+                                            }
+                                        else
+                                            return false;
+                                    }
+                                }
+                            else
+                                return false;
+                        }
+                    };
+                    deriv_trees = function(sc_conf_91, i, j, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2) {
+                        var sc_loop1_98;
+                        var prev;
+                        var name;
+                        return ((name = (sc_names_94[sc_conf_91])), ((name!== false)?((sc_conf_91&lt;BgL_sc_nbzd2nts_97zd2)?(sc_list((sc_list(name, ((sc_toks_95[i]).car))))):(sc_list((sc_list(name))))):((prev = (sc_conf_91-(1))), (sc_loop1_98 = function(l1, l2) {
+                            var loop2;
+                            var ender_set;
+                            var state;
+                            var ender;
+                            var l1;
+                            var l2;
+                            while (true) {
+                                if ((l1 instanceof sc_Pair))
+                                    {
+                                        (ender = (l1.car));
+                                        (ender_set = ((state = (sc_states_96[j])), (state[(ender+(1))])));
+                                        if ((ender_set!== false))
+                                            {
+                                                loop2 = function(k, l2) {
+                                                    var loop3;
+                                                    var ender_trees;
+                                                    var prev_trees;
+                                                    var conf_set;
+                                                    var sc_state_99;
+                                                    var k;
+                                                    var l2;
+                                                    while (true) {
+                                                        if ((k&gt;=(0)))
+                                                            if (((k&gt;=i)&amp;&amp;(((sc_state_99 = (sc_states_96[k])), (conf_set = (sc_state_99[(prev+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)))
+                                                                {
+                                                                    (prev_trees = (deriv_trees(prev, i, k, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2)));
+                                                                    (ender_trees = (deriv_trees(ender, k, j, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2)));
+                                                                    loop3 = function(l3, l2) {
+                                                                        var l4;
+                                                                        var sc_l2_100;
+                                                                        var ender_tree;
+                                                                        if ((l3 instanceof sc_Pair))
+                                                                            {
+                                                                                (ender_tree = (sc_list((l3.car))));
+                                                                                (l4 = prev_trees);
+                                                                                (sc_l2_100 = l2);
+                                                                                while ((l4 instanceof sc_Pair)) {
+                                                                                    {
+                                                                                        (sc_l2_100 = (new sc_Pair((sc_append((l4.car), ender_tree)), sc_l2_100)));
+                                                                                        (l4 = (l4.cdr));
+                                                                                    }
+                                                                                }
+                                                                                return (loop3((l3.cdr), sc_l2_100));
+                                                                            }
+                                                                        else
+                                                                            return (loop2((ender_set[(k+(5))]), l2));
+                                                                    };
+                                                                    return (loop3(ender_trees, l2));
+                                                                }
+                                                            else
+                                                                (k = (ender_set[(k+(5))]));
+                                                        else
+                                                            return (sc_loop1_98((l1.cdr), l2));
+                                                    }
+                                                };
+                                                return (loop2((ender_set[(2)]), l2));
+                                            }
+                                        else
+                                            (l1 = (l1.cdr));
+                                    }
+                                else
+                                    return l2;
+                            }
+                        }), (sc_loop1_98((sc_enders_92[(sc_steps_93[prev])]), null)))));
+                    };
+                    BgL_sc_derivzd2treesza2_47z70 = function(nt, i, j, sc_nts_101, sc_enders_102, sc_steps_103, sc_names_104, sc_toks_105, sc_states_106) {
+                        var conf_set;
+                        var state;
+                        var sc_conf_107;
+                        var l;
+                        var trees;
+                        var BgL_sc_nbzd2nts_108zd2;
+                        var BgL_sc_ntza2_109za2;
+                        {
+                            (BgL_sc_ntza2_109za2 = (sc_ind_43(nt, sc_nts_101)));
+                            if ((BgL_sc_ntza2_109za2!== false))
+                                {
+                                    (BgL_sc_nbzd2nts_108zd2 = (sc_nts_101.length));
+                                    (l = (sc_enders_102[BgL_sc_ntza2_109za2]));
+                                    (trees = null);
+                                    while ((l instanceof sc_Pair)) {
+                                        {
+                                            (sc_conf_107 = (l.car));
+                                            if ((((state = (sc_states_106[j])), (conf_set = (state[(sc_conf_107+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false))
+                                                {
+                                                    (l = (l.cdr));
+                                                    (trees = (sc_append((deriv_trees(sc_conf_107, i, j, sc_enders_102, sc_steps_103, sc_names_104, sc_toks_105, sc_states_106, BgL_sc_nbzd2nts_108zd2)), trees)));
+                                                }
+                                            else
+                                                (l = (l.cdr));
+                                        }
+                                    }
+                                    return trees;
+                                }
+                            else
+                                return false;
+                        }
+                    };
+                    nb_deriv_trees = function(sc_conf_110, i, j, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2) {
+                        var sc_loop1_116;
+                        var tmp1124;
+                        var prev;
+                        return ((prev = (sc_conf_110-(1))), ((((tmp1124 = (sc_conf_110&lt;BgL_sc_nbzd2nts_115zd2)), ((tmp1124!== false)?tmp1124:((sc_steps_112[prev])&lt;(0))))!== false)?(1):((sc_loop1_116 = function(l, sc_n_118) {
+                            var nb_ender_trees;
+                            var nb_prev_trees;
+                            var conf_set;
+                            var state;
+                            var k;
+                            var n;
+                            var ender_set;
+                            var sc_state_117;
+                            var ender;
+                            var l;
+                            var sc_n_118;
+                            while (true) {
+                                if ((l instanceof sc_Pair))
+                                    {
+                                        (ender = (l.car));
+                                        (ender_set = ((sc_state_117 = (sc_states_114[j])), (sc_state_117[(ender+(1))])));
+                                        if ((ender_set!== false))
+                                            {
+                                                (k = (ender_set[(2)]));
+                                                (n = sc_n_118);
+                                                while ((k&gt;=(0))) {
+                                                    if (((k&gt;=i)&amp;&amp;(((state = (sc_states_114[k])), (conf_set = (state[(prev+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)))
+                                                        {
+                                                            (nb_prev_trees = (nb_deriv_trees(prev, i, k, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2)));
+                                                            (nb_ender_trees = (nb_deriv_trees(ender, k, j, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2)));
+                                                            (k = (ender_set[(k+(5))]));
+                                                            (n +=(nb_prev_trees*nb_ender_trees));
+                                                        }
+                                                    else
+                                                        (k = (ender_set[(k+(5))]));
+                                                }
+                                                return (sc_loop1_116((l.cdr), n));
+                                            }
+                                        else
+                                            (l = (l.cdr));
+                                    }
+                                else
+                                    return sc_n_118;
+                            }
+                        }), (sc_loop1_116((sc_enders_111[(sc_steps_112[prev])]), (0))))));
+                    };
+                    BgL_sc_nbzd2derivzd2treesza2_48za2 = function(nt, i, j, sc_nts_119, sc_enders_120, sc_steps_121, sc_toks_122, sc_states_123) {
+                        var conf_set;
+                        var state;
+                        var sc_conf_124;
+                        var l;
+                        var nb_trees;
+                        var BgL_sc_nbzd2nts_125zd2;
+                        var BgL_sc_ntza2_126za2;
+                        {
+                            (BgL_sc_ntza2_126za2 = (sc_ind_43(nt, sc_nts_119)));
+                            if ((BgL_sc_ntza2_126za2!== false))
+                                {
+                                    (BgL_sc_nbzd2nts_125zd2 = (sc_nts_119.length));
+                                    (l = (sc_enders_120[BgL_sc_ntza2_126za2]));
+                                    (nb_trees = (0));
+                                    while ((l instanceof sc_Pair)) {
+                                        {
+                                            (sc_conf_124 = (l.car));
+                                            if ((((state = (sc_states_123[j])), (conf_set = (state[(sc_conf_124+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false))
+                                                {
+                                                    (l = (l.cdr));
+                                                    (nb_trees = ((nb_deriv_trees(sc_conf_124, i, j, sc_enders_120, sc_steps_121, sc_toks_122, sc_states_123, BgL_sc_nbzd2nts_125zd2))+nb_trees));
+                                                }
+                                            else
+                                                (l = (l.cdr));
+                                        }
+                                    }
+                                    return nb_trees;
+                                }
+                            else
+                                return false;
+                        }
+                    };
+                    (lexer = (parser_descr[(0)]));
+                    (sc_nts_42 = (parser_descr[(1)]));
+                    (sc_starters_41 = (parser_descr[(2)]));
+                    (sc_enders_40 = (parser_descr[(3)]));
+                    (sc_predictors_39 = (parser_descr[(4)]));
+                    (sc_steps_38 = (parser_descr[(5)]));
+                    (sc_names_37 = (parser_descr[(6)]));
+                    (falseHead1128 = (new sc_Pair(null, null)));
+                    (L1125 = (lexer(input)));
+                    (tail1129 = falseHead1128);
+                    while (!(L1125 === null)) {
+                        {
+                            (tok = (L1125.car));
+                            (l1 = (tok.cdr));
+                            (l2 = null);
+                            while ((l1 instanceof sc_Pair)) {
+                                {
+                                    (sc_i_29 = (sc_ind_43((l1.car), sc_nts_42)));
+                                    if ((sc_i_29!== false))
+                                        {
+                                            (l1 = (l1.cdr));
+                                            (l2 = (new sc_Pair(sc_i_29, l2)));
+                                        }
+                                    else
+                                        (l1 = (l1.cdr));
+                                }
+                            }
+                            (sc_optrOpnd_22 = (new sc_Pair((tok.car), (sc_reverse(l2)))));
+                            (sc_optrOpnd_21 = (new sc_Pair(sc_optrOpnd_22, null)));
+                            (tail1129.cdr = sc_optrOpnd_21);
+                            (tail1129 = (tail1129.cdr));
+                            (L1125 = (L1125.cdr));
+                        }
+                    }
+                    (sc_optrOpnd_20 = (falseHead1128.cdr));
+                    (sc_toks_36 = (sc_list2vector(sc_optrOpnd_20)));
+                    (BgL_sc_nbzd2toks_35zd2 = (sc_toks_36.length));
+                    (BgL_sc_nbzd2confs_34zd2 = (sc_steps_38.length));
+                    (sc_states_33 = (make_states(BgL_sc_nbzd2toks_35zd2, BgL_sc_nbzd2confs_34zd2)));
+                    (goal_starters = (sc_starters_41[(0)]));
+                    (BgL_sc_confzd2setzd2adjoinza2_45za2(sc_states_33, (0), goal_starters, (0)));
+                    (forw(sc_states_33, (0), sc_starters_41, sc_enders_40, sc_predictors_39, sc_steps_38, sc_nts_42));
+                    (sc_i_28 = (0));
+                    while ((sc_i_28&lt;BgL_sc_nbzd2toks_35zd2)) {
+                        {
+                            (tok_nts = ((sc_toks_36[sc_i_28]).cdr));
+                            (BgL_sc_confzd2setzd2adjoinza2_45za2(sc_states_33, (sc_i_28+(1)), tok_nts, sc_i_28));
+                            (forw(sc_states_33, (sc_i_28+(1)), sc_starters_41, sc_enders_40, sc_predictors_39, sc_steps_38, sc_nts_42));
+                            (++sc_i_28);
+                        }
+                    }
+                    (nb_toks = (sc_toks_36.length));
+                    (BgL_sc_nbzd2confs_32zd2 = (sc_steps_38.length));
+                    (BgL_sc_nbzd2nts_31zd2 = (sc_nts_42.length));
+                    (BgL_sc_statesza2_30za2 = (make_states(nb_toks, BgL_sc_nbzd2confs_32zd2)));
+                    (goal_enders = (sc_enders_40[(0)]));
+                    (l = goal_enders);
+                    while ((l instanceof sc_Pair)) {
+                        {
+                            (conf = (l.car));
+                            (BgL_sc_confzd2setzd2adjoinza2za2_46z00(sc_states_33, BgL_sc_statesza2_30za2, nb_toks, conf, (0)));
+                            (l = (l.cdr));
+                        }
+                    }
+                    (i = nb_toks);
+                    while ((i&gt;=(0))) {
+                        {
+                            (states = sc_states_33);
+                            (BgL_sc_statesza2_27za2 = BgL_sc_statesza2_30za2);
+                            (state_num = i);
+                            (sc_enders_26 = sc_enders_40);
+                            (sc_steps_25 = sc_steps_38);
+                            (BgL_sc_nbzd2nts_24zd2 = BgL_sc_nbzd2nts_31zd2);
+                            (toks = sc_toks_36);
+                            (BgL_sc_stateza2_23za2 = (BgL_sc_statesza2_30za2[i]));
+                            loop1 = function() {
+                                var sc_loop1_127;
+                                var prev;
+                                var BgL_sc_statesza2_128za2;
+                                var sc_states_129;
+                                var j;
+                                var i;
+                                var sc_i_130;
+                                var head;
+                                var conf_set;
+                                var sc_conf_131;
+                                {
+                                    (sc_conf_131 = (BgL_sc_stateza2_23za2[(0)]));
+                                    if ((sc_conf_131&gt;=(0)))
+                                        {
+                                            (conf_set = (BgL_sc_stateza2_23za2[(sc_conf_131+(1))]));
+                                            (head = (conf_set[(4)]));
+                                            (BgL_sc_stateza2_23za2[(0)] = (conf_set[(0)]));
+                                            (conf_set_merge_new_bang(conf_set));
+                                            (sc_i_130 = head);
+                                            while ((sc_i_130&gt;=(0))) {
+                                                {
+                                                    (i = sc_i_130);
+                                                    (j = state_num);
+                                                    (sc_states_129 = states);
+                                                    (BgL_sc_statesza2_128za2 = BgL_sc_statesza2_27za2);
+                                                    (prev = (sc_conf_131-(1)));
+                                                    if (((sc_conf_131&gt;=BgL_sc_nbzd2nts_24zd2)&amp;&amp;((sc_steps_25[prev])&gt;=(0))))
+                                                        {
+                                                            sc_loop1_127 = function(l) {
+                                                                var k;
+                                                                var ender_set;
+                                                                var state;
+                                                                var ender;
+                                                                var l;
+                                                                while (true) {
+                                                                    if ((l instanceof sc_Pair))
+                                                                        {
+                                                                            (ender = (l.car));
+                                                                            (ender_set = ((state = (sc_states_129[j])), (state[(ender+(1))])));
+                                                                            if ((ender_set!== false))
+                                                                                {
+                                                                                    (k = (ender_set[(2)]));
+                                                                                    while ((k&gt;=(0))) {
+                                                                                        {
+                                                                                            if ((k&gt;=i))
+                                                                                                if (((BgL_sc_confzd2setzd2adjoinza2za2_46z00(sc_states_129, BgL_sc_statesza2_128za2, k, prev, i))!== false))
+                                                                                                    (BgL_sc_confzd2setzd2adjoinza2za2_46z00(sc_states_129, BgL_sc_statesza2_128za2, j, ender, k));
+                                                                                            (k = (ender_set[(k+(5))]));
+                                                                                        }
+                                                                                    }
+                                                                                    return (sc_loop1_127((l.cdr)));
+                                                                                }
+                                                                            else
+                                                                                (l = (l.cdr));
+                                                                        }
+                                                                    else
+                                                                        return undefined;
+                                                                }
+                                                            };
+                                                            (sc_loop1_127((sc_enders_26[(sc_steps_25[prev])])));
+                                                        }
+                                                    (sc_i_130 = (conf_set[(sc_i_130+(5))]));
+                                                }
+                                            }
+                                            return (loop1());
+                                        }
+                                    else
+                                        return undefined;
+                                }
+                            };
+                            (loop1());
+                            (--i);
+                        }
+                    }
+                    (optrOpnd = BgL_sc_statesza2_30za2);
+                    return [sc_nts_42, sc_starters_41, sc_enders_40, sc_predictors_39, sc_steps_38, sc_names_37, sc_toks_36, optrOpnd, is_parsed, BgL_sc_derivzd2treesza2_47z70, BgL_sc_nbzd2derivzd2treesza2_48za2];
+                }
+            };
+        }
+    };
+    BgL_parsezd2ze3parsedzf3zc2 = function(parse, nt, i, j) {
+        var is_parsed;
+        var states;
+        var enders;
+        var nts;
+        return ((nts = (parse[(0)])), (enders = (parse[(2)])), (states = (parse[(7)])), (is_parsed = (parse[(8)])), (is_parsed(nt, i, j, nts, enders, states)));
+    };
+    BgL_parsezd2ze3treesz31 = function(parse, nt, i, j) {
+        var BgL_sc_derivzd2treesza2_132z70;
+        var states;
+        var toks;
+        var names;
+        var steps;
+        var enders;
+        var nts;
+        return ((nts = (parse[(0)])), (enders = (parse[(2)])), (steps = (parse[(4)])), (names = (parse[(5)])), (toks = (parse[(6)])), (states = (parse[(7)])), (BgL_sc_derivzd2treesza2_132z70 = (parse[(9)])), (BgL_sc_derivzd2treesza2_132z70(nt, i, j, nts, enders, steps, names, toks, states)));
+    };
+    BgL_parsezd2ze3nbzd2treesze3 = function(parse, nt, i, j) {
+        var BgL_sc_nbzd2derivzd2treesza2_133za2;
+        var states;
+        var toks;
+        var steps;
+        var enders;
+        var nts;
+        return ((nts = (parse[(0)])), (enders = (parse[(2)])), (steps = (parse[(4)])), (toks = (parse[(6)])), (states = (parse[(7)])), (BgL_sc_nbzd2derivzd2treesza2_133za2 = (parse[(10)])), (BgL_sc_nbzd2derivzd2treesza2_133za2(nt, i, j, nts, enders, steps, toks, states)));
+    };
+    test = function(k) {
+        var x;
+        var p;
+        return ((p = (BgL_makezd2parserzd2(const_earley, function(l) {
+            var sc_x_134;
+            var tail1134;
+            var L1130;
+            var falseHead1133;
+            {
+                (falseHead1133 = (new sc_Pair(null, null)));
+                (tail1134 = falseHead1133);
+                (L1130 = l);
+                while (!(L1130 === null)) {
+                    {
+                        (tail1134.cdr = (new sc_Pair(((sc_x_134 = (L1130.car)), (sc_list(sc_x_134, sc_x_134))), null)));
+                        (tail1134 = (tail1134.cdr));
+                        (L1130 = (L1130.cdr));
+                    }
+                }
+                return (falseHead1133.cdr);
+            }
+        }))), (x = (p((sc_vector2list((sc_makeVector(k, &quot;\u1E9Ca&quot;))))))), (sc_length((BgL_parsezd2ze3treesz31(x, &quot;\u1E9Cs&quot;, (0), k)))));
+    };
+    BgL_earleyzd2benchmarkzd2 = function() {
+        var args = null;
+        for (var sc_tmp = arguments.length - 1; sc_tmp &gt;= 0; sc_tmp--) {
+            args = sc_cons(arguments[sc_tmp], args);
+        }
+        var k;
+        return ((k = ((args === null)?(7):(args.car))), (BgL_runzd2benchmarkzd2(&quot;earley&quot;, (1), function() {
+            return (test(k));
+        }, function(result) {
+            return ((sc_display(result)), (sc_newline()), result == 132);
+        })));
+    };
+}
+
+
+/************* END OF GENERATED CODE *************/
+// Invoke this function to run a benchmark.
+// The first argument is a string identifying the benchmark.
+// The second argument is the number of times to run the benchmark.
+// The third argument is a function that runs the benchmark.
+// The fourth argument is a unary function that warns if the result
+// returned by the benchmark is incorrect.
+//
+// Example:
+// RunBenchmark(&quot;new Array()&quot;,
+//              1,
+//              function () { new Array(1000000); }
+//              function (v) {
+//                return (v instanceof Array) &amp;&amp; (v.length == 1000000);
+//              });
+
+SC_DEFAULT_OUT = new sc_GenericOutputPort(function(s) {});
+SC_ERROR_OUT = SC_DEFAULT_OUT;
+
+function RunBenchmark(name, count, run, warn) {
+  for (var n = 0; n &lt; count; ++n) {
+    result = run();
+    if (!warn(result)) {
+      throw new Error(&quot;Earley or Boyer did incorrect number of rewrites&quot;);
+    }
+  }
+}
+
+var BgL_runzd2benchmarkzd2 = RunBenchmark;
+
+for (var i = 0; i &lt; 4; ++i) {
+  BgL_earleyzd2benchmarkzd2();
+  BgL_nboyerzd2benchmarkzd2();
+}
+
+} catch (e) {
+    print(&quot;JSC EXCEPTION FUZZ: Caught exception: &quot; + e);
+}
+
</ins><span class="cx">Property changes on: trunk/Source/JavaScriptCore/tests/exceptionFuzz/earley-boyer.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="allowtabs"></a>
<div class="addfile"><h4>Added: allow-tabs</h4></div>
<a id="trunkSourceJavaScriptCoretestsexceptionFuzzyaml"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/tests/exceptionFuzz.yaml (0 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/exceptionFuzz.yaml                                (rev 0)
+++ trunk/Source/JavaScriptCore/tests/exceptionFuzz.yaml        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+# Copyright (C) 2014 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer. 
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution. 
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+- path: exceptionFuzz
+  cmd: |
+      if $architecture !~ /x86/i and $hostOS == &quot;darwin&quot;
+          skip
+      else
+          runExceptionFuzz
+      end
</ins></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Tools/ChangeLog        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2014-07-15  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        Need ability to fuzz exception throwing
+        https://bugs.webkit.org/show_bug.cgi?id=134945
+        &lt;rdar://problem/17722027&gt;
+
+        Reviewed by Sam Weinig.
+        
+        Adds a new script, js-exception-fuzz, which will run some jsc command-line using
+        exception fuzzing. This means that we will force exceptions to be thrown in random
+        places to see how the engine reacts. This is now integrated with the various test
+        drivers, so run-javascriptcore-tests will run some exception fuzzing tests by
+        default.
+
+        * Scripts/jsc-stress-test-helpers/js-exception-fuzz: Added.
+        (fail):
+        * Scripts/run-javascriptcore-tests:
+        * Scripts/run-jsc-stress-tests:
+
</ins><span class="cx"> 2014-07-17  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix failing API tests.
</span></span></pre></div>
<a id="trunkToolsScriptsjscstresstesthelpersjsexceptionfuzz"></a>
<div class="addfile"><h4>Added: trunk/Tools/Scripts/jsc-stress-test-helpers/js-exception-fuzz (0 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/jsc-stress-test-helpers/js-exception-fuzz                                (rev 0)
+++ trunk/Tools/Scripts/jsc-stress-test-helpers/js-exception-fuzz        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -0,0 +1,141 @@
</span><ins>+#!/usr/bin/perl
+
+# Copyright (C) 2014 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer. 
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution. 
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+use strict;
+use FindBin;
+use Getopt::Long qw(:config pass_through);
+use POSIX;
+use String::ShellQuote;
+
+# We first want to run the test once to determine what the number of encountered
+# checks is. Then we want to run it again some number of times with random check
+# amounts. The test is successful if after printing a message that we're
+# intending to throw the fuzz exception, it prints another message saying that it
+# caught the exception.
+
+my $repeat = 100;
+my $seed = time();
+my $verbose = 0;
+
+# We allow flags to be passed via environment variables, which is rather useful for
+# running with the run-jsc-stress-tests harness.
+if (defined($ENV{JS_EFUZZ_REPEAT})) {
+    $repeat = $ENV{JS_EFUZZ_REPEAT};
+}
+if (defined($ENV{JS_EFUZZ_SEED})) {
+    $seed = $ENV{JS_EFUZZ_SEED};
+}
+if (defined($ENV{JS_EFUZZ_VERBOSE})) {
+    $verbose = $ENV{JS_EFUZZ_VERBOSE};
+}
+
+GetOptions(
+    'repeat=s' =&gt; \$repeat,
+    'seed=s' =&gt; \$seed,
+    'verbose' =&gt; \$verbose
+);
+
+my $commandString = shell_quote @ARGV;
+
+my $checkCount;
+
+sub fail {
+    my $context = shift;
+    flush STDOUT;
+    flush STDERR;
+    die &quot;Failure for command $commandString with seed $seed, repeat $repeat: $context&quot;;
+}
+
+open (my $testInput, &quot;$commandString --enableExceptionFuzz=true |&quot;) or fail(&quot;Cannot execute initial command when getting check count&quot;);
+while (my $inputLine = &lt;$testInput&gt;) {
+    chomp($inputLine);
+    my $handled = 0;
+    if ($inputLine =~ /^JSC EXCEPTION FUZZ:/) {
+        if ($' =~ /encountered ([0-9]+) checks\./) {
+            $checkCount = $1;
+        }
+        $handled = 1;
+    }
+    if (!$handled || $verbose) {
+        print &quot;checkCount: $inputLine\n&quot;;
+    }
+}
+close($testInput);
+
+if ($verbose) {
+    print &quot;Check count: $checkCount\n&quot;;
+    print &quot;Seed: $seed\n&quot;;
+}
+
+srand($seed);
+
+for (my $iteration = 0; $iteration &lt; $repeat; ++$iteration) {
+    my $target = int(rand() * $checkCount);
+    if ($verbose) {
+        print &quot;iteration($iteration) target($target): Running.\n&quot;;
+    }
+    open ($testInput, &quot;$commandString --enableExceptionFuzz=true --fireExceptionFuzzAt=$target |&quot;) or fail(&quot;Cannot execute command on iteration $iteration&quot;);
+    my $state = &quot;waiting&quot;;
+    while (my $inputLine = &lt;$testInput&gt;) {
+        chomp($inputLine);
+        my $handled = 0;
+        if ($inputLine =~ /^JSC EXCEPTION FUZZ:/) {
+            if ($' =~ /Throwing fuzz exception/) {
+                if ($verbose) {
+                    print &quot;iteration($iteration) target($target): Threw fuzz exception.\n&quot;;
+                }
+                if ($state eq &quot;waiting&quot;) {
+                    $state = &quot;thrown&quot;;
+                } else {
+                    fail(&quot;Unexpected $inputLine while in state $state for target $target&quot;);
+                }
+            } elsif ($' =~ /Caught exception/) {
+                if ($verbose) {
+                    print &quot;iteration($iteration) target($target): Caught fuzz exception.\n&quot;;
+                }
+                if ($state eq &quot;thrown&quot;) {
+                    $state = &quot;waiting&quot;;
+                } else {
+                    fail(&quot;Unexpected $inputLine while in state $state for target $target&quot;);
+                }
+            }
+            $handled = 1;
+        }
+        if (!$handled || $verbose) {
+            print &quot;iteration($iteration) target($target): $inputLine\n&quot;;
+        }
+    }
+    if ($state ne &quot;waiting&quot;) {
+        fail(&quot;Unexpected state $state at end for target $target&quot;);
+    }
+    close($testInput);
+    if ($? != 0) {
+        fail(&quot;Unexpected exit status $? for target $target&quot;);
+    }
+}
+
+if ($verbose) {
+    print &quot;Success!\n&quot;;
+}
</ins><span class="cx">Property changes on: trunk/Tools/Scripts/jsc-stress-test-helpers/js-exception-fuzz
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnexecutable"></a>
<div class="addfile"><h4>Added: svn:executable</h4></div>
<a id="trunkToolsScriptsrunjavascriptcoretests"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/run-javascriptcore-tests (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/run-javascriptcore-tests        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Tools/Scripts/run-javascriptcore-tests        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -237,6 +237,7 @@
</span><span class="cx">         &quot;/usr/bin/env&quot;, &quot;ruby&quot;, &quot;Tools/Scripts/run-jsc-stress-tests&quot;,
</span><span class="cx">         &quot;-j&quot;, jscPath($productDir), &quot;-o&quot;, $jscStressResultsDir,
</span><span class="cx">         &quot;PerformanceTests/SunSpider/tests/sunspider-1.0&quot;,
</span><ins>+        &quot;Source/JavaScriptCore/tests/exceptionFuzz.yaml&quot;,
</ins><span class="cx">         &quot;PerformanceTests/SunSpider/no-architecture-specific-optimizations.yaml&quot;,
</span><span class="cx">         &quot;PerformanceTests/SunSpider/tests/v8-v6&quot;,
</span><span class="cx">         &quot;Source/JavaScriptCore/tests/mozilla/mozilla-tests.yaml&quot;,
</span></span></pre></div>
<a id="trunkToolsScriptsrunjscstresstests"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/run-jsc-stress-tests (171212 => 171213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/run-jsc-stress-tests        2014-07-18 03:59:47 UTC (rev 171212)
+++ trunk/Tools/Scripts/run-jsc-stress-tests        2014-07-18 04:34:16 UTC (rev 171213)
</span><span class="lines">@@ -733,6 +733,10 @@
</span><span class="cx">     end
</span><span class="cx"> end
</span><span class="cx"> 
</span><ins>+def runExceptionFuzz
+    addRunCommand(&quot;exception-fuzz&quot;, [&quot;perl&quot;, (HELPERS_PATH + &quot;js-exception-fuzz&quot;).to_s, pathToVM.to_s, $benchmark.to_s], silentOutputHandler, simpleErrorHandler)
+end
+
</ins><span class="cx"> def runLayoutTest(kind, *options)
</span><span class="cx">     raise unless $benchmark.to_s =~ /\.js$/
</span><span class="cx">     testName = $~.pre_match
</span></span></pre>
</div>
</div>

</body>
</html>