
<HTML><HEAD><TITLE>CosmicOS message</TITLE></HEAD>
<BODY BGCOLOR='#ffffff'>
<HR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT><A NAME='50'><FONT COLOR=red>#&nbsp;GATE probing networks of unless gates</FONT></A></TT><BR>
<TT>[<A HREF='sound.cgi?s=2110132101100010302321100321001001003023211003210110001130232110032100111113023211103210110010032211111032210010010033221011000113332210101013221100321001113221111322100032210011133221011001003332210000322111110322100111332033221111103221001113321332211111032210011133210332211111032210011133211332210011111333221001113333221001001003332233'>hear</A>] </TT><TT>(define set-input /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;? circuit /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;? index /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;? value /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;assign wire <font style='background-color: #cdffff'>(list-ref </font><font style='background-color: #9bffff'>(circuit)</font><font style='background-color: #cdffff'> </font><font style='background-color: #cdcdff'>(index)</font><font style='background-color: #cdffff'>)</font> </TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;<font style='background-color: #ffcdff'>(map </font><font style='background-color: #ff9bff'>(? w </font><font style='background-color: #ff69ff'>(if </font><font style='background-color: #ff37ff'>(equal </font><font style='background-color: #ff05ff'>(w)</font><font style='background-color: #ff37ff'> </font><font style='background-color: #ff37cd'>(wire)</font><font style='background-color: #ff37ff'>)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #ff69cd'>(vector </font><font style='background-color: #ff699b'>(list-ref </font><font style='background-color: #ff6969'>(w)</font><font style='background-color: #ff699b'> 0)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #cd69cd'>(list-ref </font><font style='background-color: #9b69cd'>(w)</font><font style='background-color: #cd69cd'> 1)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #ff37cd'>(list-ref </font><font style='background-color: #ff05cd'>(w)</font><font style='background-color: #ff37cd'> 2)</font><font style='background-color: #ff69cd'>			</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #ff699b'>(list-ref </font><font style='background-color: #ff6969'>(w)</font><font style='background-color: #ff699b'> 3)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #cd69cd'>(value)</font><font style='background-color: #ff69cd'>)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #cd69ff'>(w)</font><font style='background-color: #ff69ff'>)</font><font style='background-color: #ff9bff'>)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #ffcdcd'>(circuit)</font><font style='background-color: #ffcdff'>)</font>);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=2110132101100101302321100321001001003023211003210110001130232111032101100110322111101302321001001003302321110321011001003221111103221001001003302321011322101132210110011033213322101100011333023211111032210110010033210032233'>hear</A>] </TT><TT>(define read-output /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;? circuit /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;? index /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;assign len <font style='background-color: #cdffff'>(list-length / circuit)</font> /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;assign wire <font style='background-color: #ffcdff'>(list-ref </font><font style='background-color: #ff9bff'>(circuit)</font><font style='background-color: #ffcdff'> / - </font><font style='background-color: #ffcdcd'>(- </font><font style='background-color: #ffcd9b'>(len)</font><font style='background-color: #ffcdcd'> 1)</font><font style='background-color: #ffcdff'> </font><font style='background-color: #cdcdff'>(index)</font><font style='background-color: #ffcdff'>)</font> /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;list-ref <font style='background-color: #ffffcd'>(wire)</font> 4);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=2110132101100111302321100321001001003023211003210110100030232110032101101001322111132211322101101000332033221011001113221001100113221011010013023210010010033322101132210110100033213322101101001333221001001003332233'>hear</A>] </TT><TT>(define sim /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;? circuit / ? steps / ? setter</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;<font style='background-color: #cdffff'>(if </font><font style='background-color: #9bffff'>(&gt; </font><font style='background-color: #69ffff'>(steps)</font><font style='background-color: #9bffff'> 0)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #cdcdff'>(sim </font><font style='background-color: #cd9bff'>(simulate-unless </font><font style='background-color: #cd69ff'>(setter / circuit)</font><font style='background-color: #cd9bff'>)</font><font style='background-color: #cdcdff'> </font><font style='background-color: #cdcdcd'>(- </font><font style='background-color: #cdcd9b'>(steps)</font><font style='background-color: #cdcdcd'> 1)</font><font style='background-color: #cdcdff'> </font><font style='background-color: #9bcdff'>(setter)</font><font style='background-color: #cdcdff'>)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #cdffcd'>(circuit)</font><font style='background-color: #cdffff'>)</font>);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=21101321011010103023211003210010010030232110032101101001302321011001113221001001003322111101302321001001003322101101001332233'>hear</A>] </TT><TT>(define smart-sim /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;? circuit /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;? setter /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;sim <font style='background-color: #cdffff'>(circuit)</font> <font style='background-color: #ffcdff'>(list-length / circuit)</font> <font style='background-color: #ffffcd'>(setter)</font>);</TT><BR>
<BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>#&nbsp;test cos_not gate</TT><BR>
<TT>[<A HREF='sound.cgi?s=2110132101101011302321100321001013023211103211011013221010101003302321110321101101322101101010322110110133221100321101101322101100010322110110133203221001013333302321011001013221101101332032233'>hear</A>] </TT><TT>(define cos_not_harness /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;? x /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;assign c <font style='background-color: #cdffff'>(cos_not_gate)</font> / </TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;assign c <font style='background-color: #ffcdff'>(smart-sim </font><font style='background-color: #ff9bff'>(c)</font><font style='background-color: #ffcdff'> </font><font style='background-color: #ffcdcd'>(? c </font><font style='background-color: #ffcd9b'>(set-input </font><font style='background-color: #ffcd69'>(c)</font><font style='background-color: #ffcd9b'> 0 </font><font style='background-color: #cdcd9b'>(x)</font><font style='background-color: #ffcd9b'>)</font><font style='background-color: #ffcdcd'>)</font><font style='background-color: #ffcdff'>)</font> /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;read-output <font style='background-color: #ffffcd'>(c)</font> 0);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=2103221011003302321011010113023210101132233'>hear</A>] </TT><TT>(= <font style='background-color: #cdffff'>(false)</font> / cos_not_harness / true);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=2103221010113302321011010113023210110032233'>hear</A>] </TT><TT>(= <font style='background-color: #cdffff'>(true)</font> / cos_not_harness / false);</TT><BR>
<BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>#&nbsp;test cos_and gate</TT><BR>
<TT>[<A HREF='sound.cgi?s=21101321011011003023211003210010130232110032100100302321110321101101322101010110330232111032110110132210110101032211011013322110032110110132210110001032210110001032211011013320322100101333213221001003333302321011001013221101101332032233'>hear</A>] </TT><TT>(define cos_and_harness /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;? x / ? y /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;assign c <font style='background-color: #cdffff'>(cos_and_gate)</font> / </TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;assign c <font style='background-color: #ffcdff'>(smart-sim </font><font style='background-color: #ff9bff'>(c)</font><font style='background-color: #ffcdff'> </font><font style='background-color: #ffcdcd'>(? c </font><font style='background-color: #ffcd9b'>(set-input </font><font style='background-color: #ffcd69'>(set-input </font><font style='background-color: #ffcd37'>(c)</font><font style='background-color: #ffcd69'> 0 </font><font style='background-color: #cdcd69'>(x)</font><font style='background-color: #ffcd69'>)</font><font style='background-color: #ffcd9b'> 1 </font><font style='background-color: #cdcd9b'>(y)</font><font style='background-color: #ffcd9b'>)</font><font style='background-color: #ffcdcd'>)</font><font style='background-color: #ffcdff'>)</font> /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;read-output <font style='background-color: #ffffcd'>(c)</font> 0);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=2103221011003302321011011003221011003322101100332233'>hear</A>] </TT><TT>(= <font style='background-color: #cdffff'>(false)</font> / cos_and_harness <font style='background-color: #ffcdff'>(false)</font> <font style='background-color: #ffffcd'>(false)</font>);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=2103221011003302321011011003221011003322101011332233'>hear</A>] </TT><TT>(= <font style='background-color: #cdffff'>(false)</font> / cos_and_harness <font style='background-color: #ffcdff'>(false)</font> <font style='background-color: #ffffcd'>(true)</font>);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=2103221011003302321011011003221010113322101100332233'>hear</A>] </TT><TT>(= <font style='background-color: #cdffff'>(false)</font> / cos_and_harness <font style='background-color: #ffcdff'>(true)</font> <font style='background-color: #ffffcd'>(false)</font>);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=2103221010113302321011011003221010113322101011332233'>hear</A>] </TT><TT>(= <font style='background-color: #cdffff'>(true)</font> / cos_and_harness <font style='background-color: #ffcdff'>(true)</font> <font style='background-color: #ffffcd'>(true)</font>);</TT><BR>
<BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>#&nbsp;this code is more awkward than it needs to be -</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>#&nbsp;should make circuits mutable</TT><BR>

</BODY>
</HTML>
