All jets now compile cleanly.

This commit is contained in:
C. Guy Yarvin 2014-08-20 17:18:34 -04:00
parent 59c7d865dc
commit d9962abb69
55 changed files with 4228 additions and 4223 deletions

View File

@ -336,7 +336,8 @@ $(BIN)/meme: f/meme.o \
$(J164_3_OFILES) \
$(J164_4_OFILES) \
$(J164_5_OFILES) \
$(J164_6_OFILES)
$(J164_6_OFILES) \
$(J164_6_OFILES_UT)
$(CC) -g $< -lgmp -o $@
tags:

View File

@ -14,7 +14,7 @@
return u2_cm_bail(c3__exit);
}
else {
u2_noun hok = u2_cn_hook(u2k(cor), "mute");
u2_noun hok = u2_cj_hook(u2k(cor), "mute");
/* this takes advantage of the fact that mute's result, at the typeless
* C/Nock level, is identical to what a typed mule would produce,

View File

@ -8,24 +8,23 @@
/* ~(. al gen)
*/
static u2_noun
_al_core(u2_wire wir_r,
_al_core(
u2_noun van,
u2_noun gen)
{
u2_noun ter = u2_frag(u2_cv_con_3, van);
u2_weak hoc = u2_ds_look(wir_r, ter, "al");
u2_noun ter = u2_cr_at(u2_cv_con_3, van);
u2_weak hoc = u2_cj_look(ter, "al");
if ( u2_none == hoc ) {
return u2_cm_bail(c3__fail);
}
else {
u2_noun gat = u2_nk_soft(wir_r, u2_rx(wir_r, ter), hoc);
u2_noun cor = u2_rl_molt(wir_r, gat,
u2_cv_sam, u2_rx(wir_r, gen),
u2_noun gat = u2_cn_nock_on(u2k(ter), u2k(hoc));
u2_noun cor = u2_ci_molt(u2k(gat),
u2_cv_sam, u2k(gen),
0);
u2_rz(wir_r, hoc);
u2_rz(wir_r, gat);
u2z(hoc);
u2z(gat);
return cor;
}
@ -34,19 +33,19 @@ _al_core(u2_wire wir_r,
/* ~(bunt al gen)
*/
u2_noun // transfer
j2_mcy(Pt6, al, bunt)(u2_wire wir_r,
j2_mcy(Pt6, al, bunt)(
u2_noun van, // retain
u2_noun gen) // retain
{
u2_noun cor = _al_core(wir_r, van, gen);
u2_weak hoc = u2_ds_look(wir_r, cor, "bunt");
u2_noun cor = _al_core(van, gen);
u2_weak hoc = u2_cj_look(cor, "bunt");
if ( u2_none == hoc ) {
return u2_cm_bail(c3__fail);
} else {
u2_noun pro = u2_nk_soft(wir_r, cor, hoc);
u2_noun pro = u2_cn_nock_on(cor, u2k(hoc));
u2_rz(wir_r, hoc);
u2z(hoc);
return pro;
}
}
@ -54,21 +53,21 @@ j2_mcy(Pt6, al, bunt)(u2_wire wir_r,
/* ~(whip al gen)
*/
u2_noun // transfer
j2_mcy(Pt6, al, whip)(u2_wire wir_r,
j2_mcy(Pt6, al, whip)(
u2_noun van, // retain
u2_noun gen, // retain
u2_noun axe) //
{
u2_noun cor = _al_core(wir_r, van, gen);
u2_weak hoc = u2_ds_look(wir_r, cor, "whip");
u2_noun cor = _al_core(van, gen);
u2_weak hoc = u2_cj_look(cor, "whip");
if ( u2_none == hoc ) {
return u2_cm_bail(c3__fail);
} else {
u2_noun gat = u2_nk_soft(wir_r, cor, hoc);
u2_noun pro = u2_nk_mong(wir_r, gat, u2k(axe));
u2_noun gat = u2_cn_nock_on(cor, u2k(hoc));
u2_noun pro = u2_cn_slam_on(u2k(gat), u2k(axe));
u2_rz(wir_r, hoc);
u2z(hoc);
return pro;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
/* functions
*/
u2_noun // transfer
j2_mby(Pt6, bull)(u2_wire wir_r,
j2_mby(Pt6, bull)(
u2_noun bid, // retain
u2_noun der) // retain
{
@ -17,19 +17,19 @@
{
return c3__void;
}
else return u2_bt
(wir_r, c3__bull, u2_rx(wir_r, bid), u2_rx(wir_r, der));
else return u2nt
(c3__bull, u2k(bid), u2k(der));
}
u2_noun // transfer
j2_mb(Pt6, bull)(u2_wire wir_r,
j2_mb(Pt6, bull)(
u2_noun cor) // retain
{
u2_noun bid, der;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &bid, u2_cv_sam_3, &der, 0) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_mean(cor, u2_cv_sam_2, &bid, u2_cv_sam_3, &der, 0) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, bull)(wir_r, bid, der);
return j2_mby(Pt6, bull)(bid, der);
}
}

View File

@ -8,26 +8,26 @@
/* functions
*/
u2_noun // transfer
j2_mby(Pt6, cell)(u2_wire wir_r,
j2_mby(Pt6, cell)(
u2_noun hed, // retain
u2_noun tal) // retain
{
if ( (c3__void == hed) || (c3__void == tal) ) {
return c3__void;
} else {
return u2_bt(wir_r, c3__cell, u2_rx(wir_r, hed), u2_rx(wir_r, tal));
return u2nt(c3__cell, u2k(hed), u2k(tal));
}
}
u2_noun // transfer
j2_mb(Pt6, cell)(u2_wire wir_r,
j2_mb(Pt6, cell)(
u2_noun cor) // retain
{
u2_noun hed, tal;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &hed, u2_cv_sam_3, &tal, 0) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_mean(cor, u2_cv_sam_2, &hed, u2_cv_sam_3, &tal, 0) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, cell)(wir_r, hed, tal);
return j2_mby(Pt6, cell)(hed, tal);
}
}

View File

@ -8,7 +8,7 @@
/* functions
*/
u2_noun // transfer
j2_mbc(Pt6, comb)(u2_wire wir_r,
j2_mbc(Pt6, comb)(
u2_noun mal, // retain
u2_noun buz) // retain
{
@ -18,56 +18,56 @@
else {
u2_noun p_mal, q_mal, p_buz, q_buz, pp_buz, pq_buz;
if ( (u2_yes == u2_as_p(mal, u2_nock_0, &p_mal)) && (_0 != p_mal) ) {
if ( (u2_yes == u2_as_p(buz, u2_nock_0, &p_buz)) && (_0 != p_buz) ) {
return u2_rc(wir_r,
u2_nock_0,
j2_mbc(Pt3, peg)(wir_r, p_mal, p_buz));
if ( (u2_yes == u2_cr_p(mal, 0, &p_mal)) && (0 != p_mal) ) {
if ( (u2_yes == u2_cr_p(buz, 0, &p_buz)) && (0 != p_buz) ) {
return u2nc(
0,
j2_mbc(Pt3, peg)(p_mal, p_buz));
}
else if ( u2_yes == u2_as_pq(buz, u2_nock_2, &p_buz, &q_buz) &&
u2_yes == u2_as_p(p_buz, u2_nock_0, &pp_buz) &&
u2_yes == u2_as_p(q_buz, u2_nock_0, &pq_buz) )
else if ( u2_yes == u2_cr_pq(buz, 2, &p_buz, &q_buz) &&
u2_yes == u2_cr_p(p_buz, 0, &pp_buz) &&
u2_yes == u2_cr_p(q_buz, 0, &pq_buz) )
{
return u2_rt
(wir_r, u2_nock_2,
u2_rc(wir_r, u2_nock_0,
j2_mbc(Pt3, peg)(wir_r, p_mal, pp_buz)),
u2_rc(wir_r, u2_nock_0,
j2_mbc(Pt3, peg)(wir_r, p_mal, pq_buz)));
return u2nt
(2,
u2nc(0,
j2_mbc(Pt3, peg)(p_mal, pp_buz)),
u2nc(0,
j2_mbc(Pt3, peg)(p_mal, pq_buz)));
}
else return u2_rt(wir_r, u2_nock_7, u2_rx(wir_r, mal),
u2_rx(wir_r, buz));
else return u2nt(7, u2k(mal),
u2k(buz));
}
#if 1
else if ( (u2_yes == u2_as_bush(mal, &p_mal, &q_mal)) &&
(u2_yes == u2_dust(p_mal)) &&
(u2_yes == u2_dust(q_mal)) &&
(_0 == u2_h(q_mal)) &&
(_1 == u2_t(q_mal)) )
else if ( (u2_yes == u2_cr_bush(mal, &p_mal, &q_mal)) &&
(u2_yes == u2du(p_mal)) &&
(u2_yes == u2du(q_mal)) &&
(0 == u2h(q_mal)) &&
(1 == u2t(q_mal)) )
{
return u2_rt(wir_r, u2_nock_8, u2_rx(wir_r, p_mal),
u2_rx(wir_r, buz));
return u2nt(8, u2k(p_mal),
u2k(buz));
}
#endif
else if ( (u2_yes == u2_as_p(buz, u2_nock_0, &p_buz)) &&
(u2_yes == u2_sing(_1, p_buz)) )
else if ( (u2_yes == u2_cr_p(buz, 0, &p_buz)) &&
(u2_yes == u2_cr_sing(1, p_buz)) )
{
return u2_rx(wir_r, mal);
return u2k(mal);
}
else return u2_rt(wir_r, u2_nock_7, u2_rx(wir_r, mal),
u2_rx(wir_r, buz));
else return u2nt(7, u2k(mal),
u2k(buz));
}
}
u2_noun // transfer
j2_mb(Pt6, comb)(u2_wire wir_r,
j2_mb(Pt6, comb)(
u2_noun cor) // retain
{
u2_noun mal, buz;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &mal, u2_cv_sam_3, &buz, 0) ) {
if ( u2_no == u2_cr_mean(cor, u2_cv_sam_2, &mal, u2_cv_sam_3, &buz, 0) ) {
return u2_none;
} else {
return j2_mbc(Pt6, comb)(wir_r, mal, buz);
return j2_mbc(Pt6, comb)(mal, buz);
}
}

View File

@ -8,49 +8,49 @@
/* functions
*/
u2_noun // transfer
j2_mby(Pt6, cons)(u2_wire wir_r,
j2_mby(Pt6, cons)(
u2_noun vur, // retain
u2_noun sed) // retain
{
u2_noun p_vur, p_sed;
if ( u2_yes == u2_as_p(vur, u2_nock_1, &p_vur) &&
u2_yes == u2_as_p(sed, u2_nock_1, &p_sed) ) {
return u2_bt(wir_r, u2_nock_1,
u2_bx(wir_r, p_vur),
u2_bx(wir_r, p_sed));
if ( u2_yes == u2_cr_p(vur, 1, &p_vur) &&
u2_yes == u2_cr_p(sed, 1, &p_sed) ) {
return u2nt(1,
u2k(p_vur),
u2k(p_sed));
}
else if ( u2_yes == u2_as_p(vur, u2_nock_0, &p_vur) &&
u2_yes == u2_as_p(sed, u2_nock_0, &p_sed) &&
!(u2_yes == u2_sing(_1, p_vur)) &&
!(u2_yes == u2_sing(p_vur, p_sed)) &&
(_0 == u2_nord(p_vur, p_sed)) )
else if ( u2_yes == u2_cr_p(vur, 0, &p_vur) &&
u2_yes == u2_cr_p(sed, 0, &p_sed) &&
!(u2_yes == u2_cr_sing(1, p_vur)) &&
!(u2_yes == u2_cr_sing(p_vur, p_sed)) &&
(0 == u2_cr_nord(p_vur, p_sed)) )
{
u2_atom fub = j2_mbc(Pt1, div)(wir_r, p_vur, _2);
u2_atom nof = j2_mbc(Pt1, div)(wir_r, p_sed, _2);
u2_atom fub = j2_mbc(Pt1, div)(p_vur, 2);
u2_atom nof = j2_mbc(Pt1, div)(p_sed, 2);
if ( u2_yes == u2_sing(fub, nof) ) {
u2_rl_lose(wir_r, nof);
if ( u2_yes == u2_cr_sing(fub, nof) ) {
u2z(nof);
return u2_bc(wir_r, u2_nock_0, fub);
return u2nc(0, fub);
}
else {
u2_rl_lose(wir_r, fub);
u2_rl_lose(wir_r, nof);
u2z(fub);
u2z(nof);
}
}
return u2_bc(wir_r, u2_bx(wir_r, vur), u2_bx(wir_r, sed));
return u2nc(u2k(vur), u2k(sed));
}
u2_noun // transfer
j2_mb(Pt6, cons)(u2_wire wir_r,
j2_mb(Pt6, cons)(
u2_noun cor) // retain
{
u2_noun vur, sed;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &vur, u2_cv_sam_3, &sed, 0) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_mean(cor, u2_cv_sam_2, &vur, u2_cv_sam_3, &sed, 0) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, cons)(wir_r, vur, sed);
return j2_mby(Pt6, cons)(vur, sed);
}
}

View File

@ -8,26 +8,26 @@
/* functions
*/
u2_noun // transfer
j2_mby(Pt6, core)(u2_wire wir_r,
j2_mby(Pt6, core)(
u2_noun pac, // retain
u2_noun con) // retain
{
if ( (c3__void == pac) ) {
return c3__void;
} else {
return u2_bt(wir_r, c3__core, u2_rx(wir_r, pac), u2_rx(wir_r, con));
return u2nt(c3__core, u2k(pac), u2k(con));
}
}
u2_noun // transfer
j2_mb(Pt6, core)(u2_wire wir_r,
j2_mb(Pt6, core)(
u2_noun cor) // retain
{
u2_noun pac, con;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &pac, u2_cv_sam_3, &con, 0) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_mean(cor, u2_cv_sam_2, &pac, u2_cv_sam_3, &con, 0) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, core)(wir_r, pac, con);
return j2_mby(Pt6, core)(pac, con);
}
}

View File

@ -8,26 +8,26 @@
/* functions
*/
u2_noun // transfer
j2_mby(Pt6, cube)(u2_wire wir_r,
j2_mby(Pt6, cube)(
u2_noun dil, // retain
u2_noun goq) // retain
{
if ( c3__void == goq ) {
return c3__void;
}
else return u2_bt
(wir_r, c3__cube, u2_rx(wir_r, dil), u2_rx(wir_r, goq));
else return u2nt
(c3__cube, u2k(dil), u2k(goq));
}
u2_noun // transfer
j2_mb(Pt6, cube)(u2_wire wir_r,
j2_mb(Pt6, cube)(
u2_noun cor) // retain
{
u2_noun dil, goq;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &dil, u2_cv_sam_3, &goq, 0) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_mean(cor, u2_cv_sam_2, &dil, u2_cv_sam_3, &goq, 0) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, cube)(wir_r, dil, goq);
return j2_mby(Pt6, cube)(dil, goq);
}
}

View File

@ -8,26 +8,26 @@
/* functions
*/
u2_noun // transfer
j2_mby(Pt6, face)(u2_wire wir_r,
j2_mby(Pt6, face)(
u2_noun cog, // retain
u2_noun tip) // retain
{
if ( c3__void == tip ) {
return c3__void;
}
else return u2_bt
(wir_r, c3__face, u2_rx(wir_r, cog), u2_rx(wir_r, tip));
else return u2nt
(c3__face, u2k(cog), u2k(tip));
}
u2_noun // transfer
j2_mb(Pt6, face)(u2_wire wir_r,
j2_mb(Pt6, face)(
u2_noun cor) // retain
{
u2_noun cog, tip;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &cog, u2_cv_sam_3, &tip, 0) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_mean(cor, u2_cv_sam_2, &cog, u2_cv_sam_3, &tip, 0) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, face)(wir_r, cog, tip);
return j2_mby(Pt6, face)(cog, tip);
}
}

View File

@ -8,7 +8,7 @@
/* functions
*/
u2_noun // transfer
j2_mby(Pt6, fine)(u2_wire wir_r,
j2_mby(Pt6, fine)(
u2_noun fuv,
u2_noun lup, // retain
u2_noun mar) // retain
@ -16,23 +16,23 @@
if ( (c3__void == lup) || (c3__void == mar) ) {
return c3__void;
} else {
return u2_bq(wir_r, c3__fine, u2_rx(wir_r, fuv),
u2_rx(wir_r, lup),
u2_rx(wir_r, mar));
return u2nq(c3__fine, u2k(fuv),
u2k(lup),
u2k(mar));
}
}
u2_noun // transfer
j2_mb(Pt6, fine)(u2_wire wir_r,
j2_mb(Pt6, fine)(
u2_noun cor) // retain
{
u2_noun fuv, lup, mar;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &fuv,
if ( u2_no == u2_cr_mean(cor, u2_cv_sam_2, &fuv,
u2_cv_sam_6, &lup,
u2_cv_sam_7, &mar, 0) ) {
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, fine)(wir_r, fuv, lup, mar);
return j2_mby(Pt6, fine)(fuv, lup, mar);
}
}

View File

@ -8,18 +8,18 @@
/* functions
*/
static u2_bean
_fitz_fiz(u2_wire wir_r,
_fitz_fiz(
u2_noun yaz,
u2_noun wix)
{
c3_w yaz_w = u2_met(3, yaz);
c3_w wix_w = u2_met(3, wix);
c3_w yaz_w = u2_cr_met(3, yaz);
c3_w wix_w = u2_cr_met(3, wix);
c3_y yaz_y, wix_y;
yaz_y = (0 == yaz_w) ? 0 : u2_byte((yaz_w - 1), yaz);
yaz_y = (0 == yaz_w) ? 0 : u2_cr_byte((yaz_w - 1), yaz);
if ( (yaz_y < 'A') || (yaz_y > 'Z') ) yaz_y = 0;
wix_y = (0 == wix_w) ? 0 : u2_byte((wix_w - 1), wix);
wix_y = (0 == wix_w) ? 0 : u2_cr_byte((wix_w - 1), wix);
if ( (wix_y < 'A') || (wix_y > 'Z') ) wix_y = 0;
if ( yaz_y && wix_y ) {
@ -31,18 +31,18 @@
}
u2_noun // transfer
j2_mby(Pt6, fitz)(u2_wire wir_r,
j2_mby(Pt6, fitz)(
u2_noun yaz, // retain
u2_noun wix) // retain
{
c3_w i_w, met_w = c3_min(u2_met(3, yaz), u2_met(3, wix));
c3_w i_w, met_w = c3_min(u2_cr_met(3, yaz), u2_cr_met(3, wix));
if ( u2_no == _fitz_fiz(wir_r, yaz, wix) ) {
if ( u2_no == _fitz_fiz(yaz, wix) ) {
return u2_no;
}
for ( i_w = 0; i_w < met_w; i_w++ ) {
c3_y yaz_y = u2_byte(i_w, yaz);
c3_y wix_y = u2_byte(i_w, wix);
c3_y yaz_y = u2_cr_byte(i_w, yaz);
c3_y wix_y = u2_cr_byte(i_w, wix);
if ( (yaz_y >= 'A') && (yaz_y <= 'Z') ) yaz_y = 0;
if ( (wix_y >= 'A') && (wix_y <= 'Z') ) wix_y = 0;
@ -55,18 +55,18 @@
}
u2_noun // transfer
j2_mb(Pt6, fitz)(u2_wire wir_r,
j2_mb(Pt6, fitz)(
u2_noun cor) // retain
{
u2_noun yaz, wix;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &yaz, u2_cv_sam_3, &wix, 0)) ||
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &yaz, u2_cv_sam_3, &wix, 0)) ||
(u2_no == u2ud(yaz)) ||
(u2_no == u2ud(wix)) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, fitz)(wir_r, yaz, wix);
return j2_mby(Pt6, fitz)(yaz, wix);
}
}

View File

@ -8,42 +8,42 @@
/* functions
*/
u2_noun // transfer
j2_mby(Pt6, flan)(u2_wire wir_r,
j2_mby(Pt6, flan)(
u2_noun bos, // retain
u2_noun nif) // retain
{
if ( u2_yes == u2_sing(u2_nock_1, u2_h(bos)) ) {
if ( (u2_nul == u2_t(bos)) ) {
return u2_rx(wir_r, nif);
if ( u2_yes == u2_cr_sing(1, u2h(bos)) ) {
if ( (u2_nul == u2t(bos)) ) {
return u2k(nif);
}
else return u2_rx(wir_r, bos);
else return u2k(bos);
}
else {
if ( u2_yes == u2_sing(u2_nock_1, u2_h(nif)) ) {
if ( (u2_nul == u2_t(nif)) ) {
return u2_rx(wir_r, bos);
if ( u2_yes == u2_cr_sing(1, u2h(nif)) ) {
if ( (u2_nul == u2t(nif)) ) {
return u2k(bos);
}
else return u2_rx(wir_r, nif);
else return u2k(nif);
}
else {
return u2_bq
(wir_r, u2_nock_6,
u2_rx(wir_r, bos),
u2_rx(wir_r, nif),
u2_bc(wir_r, u2_nock_1, u2_no));
return u2nq
(6,
u2k(bos),
u2k(nif),
u2nc(1, u2_no));
}
}
}
u2_noun // transfer
j2_mb(Pt6, flan)(u2_wire wir_r,
j2_mb(Pt6, flan)(
u2_noun cor) // retain
{
u2_noun bos, nif;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &bos, u2_cv_sam_3, &nif, 0) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_mean(cor, u2_cv_sam_2, &bos, u2_cv_sam_3, &nif, 0) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, flan)(wir_r, bos, nif);
return j2_mby(Pt6, flan)(bos, nif);
}
}

View File

@ -8,50 +8,50 @@
/* functions
*/
static u2_noun // produce
_flay_roll(u2_wire wir_r,
_flay_roll(
u2_noun quz) // retain
{
if ( u2_no == u2_dust(quz) ) {
if ( u2_no == u2du(quz) ) {
return c3__void;
} else {
u2_noun voo = _flay_roll(wir_r, u2_t(quz));
u2_noun oon = j2_mby(Pt6, fork)(wir_r, u2_h(u2_h(quz)), voo);
u2_noun voo = _flay_roll(u2t(quz));
u2_noun oon = j2_mby(Pt6, fork)(u2h(u2h(quz)), voo);
u2_rz(wir_r, voo);
u2z(voo);
return oon;
}
}
u2_noun // produce
j2_mby(Pt6, flay)(u2_wire wir_r,
j2_mby(Pt6, flay)(
u2_noun pok) // retain
{
u2_noun p_pok = u2_h(pok);
u2_noun q_pok = u2_t(pok);
u2_noun p_pok = u2h(pok);
u2_noun q_pok = u2t(pok);
u2_noun typ;
switch ( u2_h(q_pok) ) {
default: return u2_bl_bail(wir_r, c3__fail);
switch ( u2h(q_pok) ) {
default: return u2_cm_bail(c3__fail);
case u2_yes: typ = u2_rx(wir_r, u2_t(q_pok));
case u2_yes: typ = u2k(u2t(q_pok));
break;
case u2_no: typ = _flay_roll(wir_r, u2_t(u2_t(q_pok)));
case u2_no: typ = _flay_roll(u2t(u2t(q_pok)));
break;
}
return u2_bc(wir_r, u2_rx(wir_r, p_pok), typ);
return u2nc(u2k(p_pok), typ);
}
u2_noun // transfer
j2_mb(Pt6, flay)(u2_wire wir_r,
j2_mb(Pt6, flay)(
u2_noun cor) // retain
{
u2_noun pok;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &pok, 0)) ||
(u2_no == u2_dust(pok)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &pok, 0)) ||
(u2_no == u2du(pok)) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, flay)(wir_r, pok);
return j2_mby(Pt6, flay)(pok);
}
}

View File

@ -8,37 +8,37 @@
/* functions
*/
u2_noun // transfer
j2_mby(Pt6, flip)(u2_wire wir_r,
j2_mby(Pt6, flip)(
u2_noun hel) // retain
{
if ( u2_yes == u2_sing(u2_nock_1, u2_h(hel)) ) {
if ( (u2_yes == u2_t(hel)) ) {
return u2_bc(wir_r, u2_nock_1, u2_no);
if ( u2_yes == u2_cr_sing(1, u2h(hel)) ) {
if ( (u2_yes == u2t(hel)) ) {
return u2nc(1, u2_no);
}
else {
c3_assert((u2_no == u2_t(hel)));
c3_assert((u2_no == u2t(hel)));
return u2_bc(wir_r, u2_nock_1, u2_yes);
return u2nc(1, u2_yes);
}
}
else {
return u2_bq
(wir_r, u2_nock_6,
u2_rx(wir_r, hel),
u2_bc(wir_r, u2_nock_1, u2_no),
u2_bc(wir_r, u2_nock_1, u2_yes));
return u2nq
(6,
u2k(hel),
u2nc(1, u2_no),
u2nc(1, u2_yes));
}
}
u2_noun // transfer
j2_mb(Pt6, flip)(u2_wire wir_r,
j2_mb(Pt6, flip)(
u2_noun cor) // retain
{
u2_noun hel;
if ( u2_none == (hel = u2_frag(u2_cv_sam, cor)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_none == (hel = u2_cr_at(u2_cv_sam, cor)) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, flip)(wir_r, hel);
return j2_mby(Pt6, flip)(hel);
}
}

View File

@ -8,42 +8,42 @@
/* functions
*/
u2_noun // transfer
j2_mby(Pt6, flor)(u2_wire wir_r,
j2_mby(Pt6, flor)(
u2_noun bos, // retain
u2_noun nif) // retain
{
if ( u2_yes == u2_sing(u2_nock_1, u2_h(bos)) ) {
if ( (u2_nul == u2_t(bos)) ) {
return u2_rx(wir_r, bos);
if ( u2_yes == u2_cr_sing(1, u2h(bos)) ) {
if ( (u2_nul == u2t(bos)) ) {
return u2k(bos);
}
else return u2_rx(wir_r, nif);
else return u2k(nif);
}
else {
if ( u2_yes == u2_sing(u2_nock_1, u2_h(nif)) ) {
if ( (u2_nul == u2_t(nif)) ) {
return u2_rx(wir_r, nif);
if ( u2_yes == u2_cr_sing(1, u2h(nif)) ) {
if ( (u2_nul == u2t(nif)) ) {
return u2k(nif);
}
else return u2_rx(wir_r, bos);
else return u2k(bos);
}
else {
return u2_bq
(wir_r, u2_nock_6,
u2_rx(wir_r, bos),
u2_bc(wir_r, u2_nock_1, u2_yes),
u2_rx(wir_r, nif));
return u2nq
(6,
u2k(bos),
u2nc(1, u2_yes),
u2k(nif));
}
}
}
u2_noun // transfer
j2_mb(Pt6, flor)(u2_wire wir_r,
j2_mb(Pt6, flor)(
u2_noun cor) // retain
{
u2_noun bos, nif;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &bos, u2_cv_sam_3, &nif, 0) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_mean(cor, u2_cv_sam_2, &bos, u2_cv_sam_3, &nif, 0) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, flor)(wir_r, bos, nif);
return j2_mby(Pt6, flor)(bos, nif);
}
}

View File

@ -8,32 +8,32 @@
/* functions
*/
u2_noun // transfer
j2_mby(Pt6, fork)(u2_wire wir_r,
j2_mby(Pt6, fork)(
u2_noun hoz, // retain
u2_noun bur) // retain
{
if ( u2_yes == u2_sing(hoz, bur) ) {
return u2_rx(wir_r, hoz);
if ( u2_yes == u2_cr_sing(hoz, bur) ) {
return u2k(hoz);
}
else if ( c3__void == bur ) {
return u2_rx(wir_r, hoz);
return u2k(hoz);
}
else if ( c3__void == hoz ) {
return u2_rx(wir_r, bur);
return u2k(bur);
}
else return u2_bt
(wir_r, c3__fork, u2_rx(wir_r, hoz), u2_rx(wir_r, bur));
else return u2nt
(c3__fork, u2k(hoz), u2k(bur));
}
u2_noun // transfer
j2_mb(Pt6, fork)(u2_wire wir_r,
j2_mb(Pt6, fork)(
u2_noun cor) // retain
{
u2_noun hoz, bur;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &hoz, u2_cv_sam_3, &bur, 0) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_mean(cor, u2_cv_sam_2, &hoz, u2_cv_sam_3, &bur, 0) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, fork)(wir_r, hoz, bur);
return j2_mby(Pt6, fork)(hoz, bur);
}
}

View File

@ -9,20 +9,20 @@
*/
/* _lily_hike_belt_root(): convert (pac) to a list of root tools.
*/
static u2_list
_lily_hike_belt_root(u2_ray wir_r,
u2_list pac)
static u2_noun
_lily_hike_belt_root(
u2_noun pac)
{
if ( (u2_nul == pac) ) {
return u2_nul;
}
else {
u2_axis axis = u2_h(u2_h(pac));
u2_tool tool = u2_t(u2_h(pac));
u2_list list_tool = _lily_hike_belt_root(wir_r, u2_t(pac));
u2_atom axis = u2h(u2h(pac));
u2_noun tool = u2t(u2h(pac));
u2_noun list_tool = _lily_hike_belt_root(u2t(pac));
if ( u2_yes == u2_sing(_1, axis) ) {
return u2_bc(wir_r, u2_rx(wir_r, tool),
if ( u2_yes == u2_cr_sing(1, axis) ) {
return u2nc(u2k(tool),
list_tool);
}
else return list_tool;
@ -31,28 +31,28 @@
/* _lily_hike_belt_l(): factor (pac) left.
*/
static u2_list
_lily_hike_belt_l(u2_ray wir_r,
u2_list pac)
static u2_noun
_lily_hike_belt_l(
u2_noun pac)
{
if ( (u2_nul == pac) ) {
return u2_nul;
}
else {
u2_axis axis = u2_h(u2_h(pac));
u2_tool tool = u2_t(u2_h(pac));
u2_list belt_l = _lily_hike_belt_l(wir_r, u2_t(pac));
u2_atom axis = u2h(u2h(pac));
u2_noun tool = u2t(u2h(pac));
u2_noun belt_l = _lily_hike_belt_l(u2t(pac));
{
if ( (_1 != axis) &&
(u2_yes == u2_sing(_2, j2_mbc(Pt3, cap)(wir_r, axis))) )
if ( (1 != axis) &&
(u2_yes == u2_cr_sing(2, j2_mbc(Pt3, cap)(axis))) )
{
u2_axis axis_tap = j2_mbc(Pt3, mas)(wir_r, axis);
u2_atom axis_tap = j2_mbc(Pt3, mas)(axis);
return u2_bc(wir_r,
u2_bc(wir_r,
u2_rx(wir_r, axis_tap),
u2_rx(wir_r, tool)),
return u2nc(
u2nc(
u2k(axis_tap),
u2k(tool)),
belt_l);
}
else return belt_l;
@ -62,27 +62,27 @@
/* _lily_hike_belt_r(): factor (pac) right.
*/
static u2_list // transfer
_lily_hike_belt_r(u2_ray wir_r,
u2_list pac) // retain
static u2_noun // transfer
_lily_hike_belt_r(
u2_noun pac) // retain
{
if ( (u2_nul == pac) ) {
return u2_nul;
}
else {
u2_axis axis = u2_h(u2_h(pac));
u2_tool tool = u2_t(u2_h(pac));
u2_list belt_r = _lily_hike_belt_r(wir_r, u2_t(pac));
u2_atom axis = u2h(u2h(pac));
u2_noun tool = u2t(u2h(pac));
u2_noun belt_r = _lily_hike_belt_r(u2t(pac));
{
if ( (_1 != axis) &&
(u2_yes == u2_sing(_3, j2_mbc(Pt3, cap)(wir_r, axis))) )
if ( (1 != axis) &&
(u2_yes == u2_cr_sing(3, j2_mbc(Pt3, cap)(axis))) )
{
u2_axis axis_tap = j2_mbc(Pt3, mas)(wir_r, axis);
u2_atom axis_tap = j2_mbc(Pt3, mas)(axis);
return u2_bc(wir_r,
u2_bc(wir_r, u2_rx(wir_r, axis_tap),
u2_rx(wir_r, tool)),
return u2nc(
u2nc(u2k(axis_tap),
u2k(tool)),
belt_r);
}
else return belt_r;
@ -93,54 +93,54 @@
/* functions
*/
u2_noun // transfer
j2_mby(Pt6, hike)(u2_wire wir_r,
j2_mby(Pt6, hike)(
u2_noun axe, // retain
u2_noun pac) // retain
{
if ( (u2_nul == pac) ) {
return u2_bc(wir_r, u2_nock_0, u2_rx(wir_r, axe));
return u2nc(0, u2k(axe));
}
else {
u2_noun zet = _lily_hike_belt_root(wir_r, pac);
u2_noun zet = _lily_hike_belt_root(pac);
if ( u2_nul != zet ) {
u2_noun fol = u2_rx(wir_r, u2_h(zet));
u2_noun fol = u2k(u2h(zet));
u2_rl_lose(wir_r, zet);
u2z(zet);
return fol;
}
else {
u2_noun tum = _lily_hike_belt_l(wir_r, pac);
u2_noun gam = _lily_hike_belt_r(wir_r, pac);
u2_noun hax = j2_mbc(Pt3, peg)(wir_r, axe, 2);
u2_noun moz = j2_mbc(Pt3, peg)(wir_r, axe, 3);
u2_noun zip = j2_mby(Pt6, hike)(wir_r, hax, tum);
u2_noun dof = j2_mby(Pt6, hike)(wir_r, moz, gam);
u2_noun fol = j2_mby(Pt6, cons)(wir_r, zip, dof);
u2_noun tum = _lily_hike_belt_l(pac);
u2_noun gam = _lily_hike_belt_r(pac);
u2_noun hax = j2_mbc(Pt3, peg)(axe, 2);
u2_noun moz = j2_mbc(Pt3, peg)(axe, 3);
u2_noun zip = j2_mby(Pt6, hike)(hax, tum);
u2_noun dof = j2_mby(Pt6, hike)(moz, gam);
u2_noun fol = j2_mby(Pt6, cons)(zip, dof);
u2_rl_lose(wir_r, tum);
u2_rl_lose(wir_r, gam);
u2_rl_lose(wir_r, hax);
u2_rl_lose(wir_r, moz);
u2_rl_lose(wir_r, zip);
u2_rl_lose(wir_r, dof);
u2z(tum);
u2z(gam);
u2z(hax);
u2z(moz);
u2z(zip);
u2z(dof);
return fol;
}
}
}
u2_noun // transfer
j2_mb(Pt6, hike)(u2_wire wir_r,
j2_mb(Pt6, hike)(
u2_noun cor) // retain
{
u2_noun axe, pac;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &axe, u2_cv_sam_3, &pac, 0)) ||
(u2_no == u2_stud(axe)) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &axe, u2_cv_sam_3, &pac, 0)) ||
(u2_no == u2ud(axe)) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, hike)(wir_r, axe, pac);
return j2_mby(Pt6, hike)(axe, pac);
}
}

View File

@ -8,7 +8,7 @@
/* internals
*/
static u2_noun
_look_in(u2_wire wir_r,
_look_in(
u2_noun cog,
u2_noun dab,
u2_atom axe)
@ -19,60 +19,60 @@
else {
u2_noun n_dab, l_dab, r_dab;
u2_as_trel(dab, &n_dab, &l_dab, &r_dab);
if ( u2_no == u2_dust(n_dab) ) {
return u2_bl_bail(wir_r, c3__fail);
u2_cr_trel(dab, &n_dab, &l_dab, &r_dab);
if ( u2_no == u2du(n_dab) ) {
return u2_cm_bail(c3__fail);
}
else {
u2_noun pn_dab = u2_h(n_dab);
u2_noun qn_dab = u2_t(n_dab);
u2_noun pn_dab = u2h(n_dab);
u2_noun qn_dab = u2t(n_dab);
if ( (u2_nul == l_dab) && (u2_nul == r_dab) ) {
if ( (u2_yes == u2_dust(qn_dab)) &&
(u2_yes == u2_sing(cog, pn_dab)) ) {
return u2_bt(wir_r, u2_nul,
u2_rx(wir_r, axe),
u2_rx(wir_r, qn_dab));
if ( (u2_yes == u2du(qn_dab)) &&
(u2_yes == u2_cr_sing(cog, pn_dab)) ) {
return u2nt(u2_nul,
u2k(axe),
u2k(qn_dab));
}
else {
return u2_nul;
}
}
else if ( (u2_nul == l_dab) ) {
if ( (u2_yes == u2_dust(qn_dab)) &&
(u2_yes == u2_sing(cog, pn_dab)) ) {
return u2_bt(wir_r, u2_nul,
j2_mbc(Pt3, peg)(wir_r, axe, _2),
u2_rx(wir_r, qn_dab));
if ( (u2_yes == u2du(qn_dab)) &&
(u2_yes == u2_cr_sing(cog, pn_dab)) ) {
return u2nt(u2_nul,
j2_mbc(Pt3, peg)(axe, 2),
u2k(qn_dab));
}
else {
if ( u2_yes == j2_mbc(Pt3, gor)(wir_r, cog, pn_dab) ) {
if ( u2_yes == j2_mbc(Pt3, gor)(cog, pn_dab) ) {
return u2_nul;
}
else {
u2_noun pro;
axe = j2_mbc(Pt3, peg)(wir_r, axe, _3);
pro = _look_in(wir_r, cog, r_dab, axe);
u2_rl_lose(wir_r, axe);
axe = j2_mbc(Pt3, peg)(axe, 3);
pro = _look_in(cog, r_dab, axe);
u2z(axe);
return pro;
}
}
}
else if ( (u2_nul == r_dab) ) {
if ( (u2_yes == u2_dust(qn_dab)) &&
(u2_yes == u2_sing(cog, pn_dab)) ) {
return u2_bt(wir_r, u2_nul,
j2_mbc(Pt3, peg)(wir_r, axe, _2),
u2_rx(wir_r, qn_dab));
if ( (u2_yes == u2du(qn_dab)) &&
(u2_yes == u2_cr_sing(cog, pn_dab)) ) {
return u2nt(u2_nul,
j2_mbc(Pt3, peg)(axe, 2),
u2k(qn_dab));
}
else {
if ( u2_yes == j2_mbc(Pt3, gor)(wir_r, cog, pn_dab) ) {
if ( u2_yes == j2_mbc(Pt3, gor)(cog, pn_dab) ) {
u2_noun pro;
axe = j2_mbc(Pt3, peg)(wir_r, axe, _3);
pro = _look_in(wir_r, cog, l_dab, axe);
u2_rl_lose(wir_r, axe);
axe = j2_mbc(Pt3, peg)(axe, 3);
pro = _look_in(cog, l_dab, axe);
u2z(axe);
return pro;
}
else {
@ -81,27 +81,27 @@
}
}
else {
if ( (u2_yes == u2_dust(qn_dab)) &&
(u2_yes == u2_sing(cog, pn_dab)) ) {
return u2_bt(wir_r, u2_nul,
j2_mbc(Pt3, peg)(wir_r, axe, _2),
u2_rx(wir_r, qn_dab));
if ( (u2_yes == u2du(qn_dab)) &&
(u2_yes == u2_cr_sing(cog, pn_dab)) ) {
return u2nt(u2_nul,
j2_mbc(Pt3, peg)(axe, 2),
u2k(qn_dab));
}
else {
if ( u2_yes == j2_mbc(Pt3, gor)(wir_r, cog, pn_dab) ) {
if ( u2_yes == j2_mbc(Pt3, gor)(cog, pn_dab) ) {
u2_noun pro;
axe = j2_mbc(Pt3, peg)(wir_r, axe, _6);
pro = _look_in(wir_r, cog, l_dab, axe);
u2_rl_lose(wir_r, axe);
axe = j2_mbc(Pt3, peg)(axe, 6);
pro = _look_in(cog, l_dab, axe);
u2z(axe);
return pro;
}
else {
u2_noun pro;
axe = j2_mbc(Pt3, peg)(wir_r, axe, _7);
pro = _look_in(wir_r, cog, r_dab, axe);
u2_rl_lose(wir_r, axe);
axe = j2_mbc(Pt3, peg)(axe, 7);
pro = _look_in(cog, r_dab, axe);
u2z(axe);
return pro;
}
}
@ -114,22 +114,22 @@
/* functions
*/
u2_noun // transfer
j2_mby(Pt6, look)(u2_wire wir_r,
j2_mby(Pt6, look)(
u2_noun cog, // retain
u2_noun dab) // retain
{
return _look_in(wir_r, cog, dab, _1);
return _look_in(cog, dab, 1);
}
u2_noun // transfer
j2_mb(Pt6, look)(u2_wire wir_r,
j2_mb(Pt6, look)(
u2_noun cor) // retain
{
u2_noun cog, dab;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &cog, u2_cv_sam_3, &dab, 0) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_mean(cor, u2_cv_sam_2, &cog, u2_cv_sam_3, &dab, 0) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, look)(wir_r, cog, dab);
return j2_mby(Pt6, look)(cog, dab);
}
}

View File

@ -8,28 +8,28 @@
/* functions
*/
u2_noun // transfer
j2_mby(Pt6, slot)(u2_wire wir_r,
j2_mby(Pt6, slot)(
u2_atom axe, // retain
u2_noun vax) // retain
{
u2_weak fag = u2_frag(axe, u2t(vax));
u2_weak fag = u2_cr_at(axe, u2t(vax));
fprintf(stderr, "slot axe %d\r\n", axe);
if ( u2_none == fag ) {
return u2_bl_bail(wir_r, c3__exit);
return u2_cm_bail(c3__exit);
}
else {
u2_noun typ = j2_mcy(Pt6, ut, peek)(
}
c3_w i_w, met_w = c3_min(u2_met(3, axe), u2_met(3, vax));
c3_w i_w, met_w = c3_min(u2_cr_met(3, axe), u2_cr_met(3, vax));
if ( u2_no == _slot_fiz(wir_r, axe, vax) ) {
if ( u2_no == _slot_fiz(axe, vax) ) {
return u2_no;
}
for ( i_w = 0; i_w < met_w; i_w++ ) {
c3_y axe_y = u2_byte(i_w, axe);
c3_y vax_y = u2_byte(i_w, vax);
c3_y axe_y = u2_cr_byte(i_w, axe);
c3_y vax_y = u2_cr_byte(i_w, vax);
if ( (axe_y >= 'A') && (axe_y <= 'Z') ) axe_y = 0;
if ( (vax_y >= 'A') && (vax_y <= 'Z') ) vax_y = 0;
@ -42,18 +42,18 @@
}
u2_noun // transfer
j2_mb(Pt6, slot)(u2_wire wir_r,
j2_mb(Pt6, slot)(
u2_noun cor) // retain
{
u2_noun axe, vax;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &axe, u2_cv_sam_3, &vax, 0)) ||
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &axe, u2_cv_sam_3, &vax, 0)) ||
(u2_no == u2ud(axe)) ||
(u2_no == u2du(vax)) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, slot)(wir_r, axe, vax);
return j2_mby(Pt6, slot)(axe, vax);
}
}

View File

@ -8,18 +8,18 @@
/* functions
*/
static u2_bean
_fitz_fiz(u2_wire wir_r,
_fitz_fiz(
u2_noun yaz,
u2_noun wix)
{
c3_w yaz_w = u2_met(3, yaz);
c3_w wix_w = u2_met(3, wix);
c3_w yaz_w = u2_cr_met(3, yaz);
c3_w wix_w = u2_cr_met(3, wix);
c3_y yaz_y, wix_y;
yaz_y = (0 == yaz_w) ? 0 : u2_byte((yaz_w - 1), yaz);
yaz_y = (0 == yaz_w) ? 0 : u2_cr_byte((yaz_w - 1), yaz);
if ( (yaz_y < 'A') || (yaz_y > 'Z') ) yaz_y = 0;
wix_y = (0 == wix_w) ? 0 : u2_byte((wix_w - 1), wix);
wix_y = (0 == wix_w) ? 0 : u2_cr_byte((wix_w - 1), wix);
if ( (wix_y < 'A') || (wix_y > 'Z') ) wix_y = 0;
if ( yaz_y && wix_y ) {
@ -31,18 +31,18 @@
}
u2_noun // transfer
j2_mby(Pt6, fitz)(u2_wire wir_r,
j2_mby(Pt6, fitz)(
u2_noun yaz, // retain
u2_noun wix) // retain
{
c3_w i_w, met_w = c3_min(u2_met(3, yaz), u2_met(3, wix));
c3_w i_w, met_w = c3_min(u2_cr_met(3, yaz), u2_cr_met(3, wix));
if ( u2_no == _fitz_fiz(wir_r, yaz, wix) ) {
if ( u2_no == _fitz_fiz(yaz, wix) ) {
return u2_no;
}
for ( i_w = 0; i_w < met_w; i_w++ ) {
c3_y yaz_y = u2_byte(i_w, yaz);
c3_y wix_y = u2_byte(i_w, wix);
c3_y yaz_y = u2_cr_byte(i_w, yaz);
c3_y wix_y = u2_cr_byte(i_w, wix);
if ( (yaz_y >= 'A') && (yaz_y <= 'Z') ) yaz_y = 0;
if ( (wix_y >= 'A') && (wix_y <= 'Z') ) wix_y = 0;
@ -55,18 +55,18 @@
}
u2_noun // transfer
j2_mb(Pt6, fitz)(u2_wire wir_r,
j2_mb(Pt6, fitz)(
u2_noun cor) // retain
{
u2_noun yaz, wix;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &yaz, u2_cv_sam_3, &wix, 0)) ||
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &yaz, u2_cv_sam_3, &wix, 0)) ||
(u2_no == u2ud(yaz)) ||
(u2_no == u2ud(wix)) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mby(Pt6, fitz)(wir_r, yaz, wix);
return j2_mby(Pt6, fitz)(yaz, wix);
}
}

View File

@ -8,8 +8,8 @@
{
u2_noun p_sut, q_sut, r_sut;
if ( u2_no == u2_dust(sut) ) switch ( sut ) {
default: return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2du(sut) ) switch ( sut ) {
default: return u2_cm_bail(c3__fail);
case c3__noun:
{
@ -18,28 +18,28 @@
{
}
}
else switch ( u2_h(sut) ) {
default: return u2_bl_bail(wir_r, c3__fail);
else switch ( u2h(sut) ) {
default: return u2_cm_bail(c3__fail);
case c3__atom: p_sut = u2_t(sut);
case c3__atom: p_sut = u2t(sut);
{
}
case c3__cell: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__cell: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
}
case c3__core: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__core: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
}
case c3__cube: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__cube: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
}
case c3__face: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__face: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
}
case c3__fork: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__fork: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
}
case c3__hold: p_sut = u2_t(sut);
case c3__hold: p_sut = u2t(sut);
{
}
}

View File

@ -9,23 +9,23 @@
*/
#if 0
static void
_dump_wall(u2_wire wir_r,
_dump_wall(
const c3_c* cap_c,
u2_noun wal)
{
if ( cap_c ) printf("%s:\n", cap_c);
while ( u2_nul != wal ) {
u2_noun h_wal = u2_h(wal);
u2_noun h_wal = u2h(wal);
while ( u2_nul != h_wal ) {
c3_assert(u2_h(h_wal) < 128);
c3_assert(u2h(h_wal) < 128);
putchar(u2_h(h_wal));
h_wal = u2_t(h_wal);
putchar(u2h(h_wal));
h_wal = u2t(h_wal);
}
putchar(10);
wal = u2_t(wal);
wal = u2t(wal);
}
}
#endif
@ -33,98 +33,98 @@
// duck: create a duck core for mean.
//
u2_noun // produce
j2_mcy(Pt6, ut, duck)(u2_wire wir_r,
j2_mcy(Pt6, ut, duck)(
u2_noun van, // retain
u2_noun typ) // retain
{
u2_noun von = u2_bn_molt(wir_r, van, u2_cv_sam, typ, 0);
u2_noun ret = u2_bn_hook(wir_r, von, "dune");
u2_noun von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(typ), 0);
u2_noun ret = u2_cj_hook(von, "dune");
u2_rz(wir_r, von);
u2z(von);
return ret;
}
// dung: create a dunk core for mean (noun caption)
//
u2_noun // produce
j2_mcy(Pt6, ut, dung)(u2_wire wir_r,
j2_mcy(Pt6, ut, dung)(
u2_noun van, // retain
u2_noun paz, // retain
u2_noun typ) // retain
{
u2_noun von = u2_bn_molt(wir_r, van, u2_cv_sam, typ, 0);
u2_noun duq = u2_bn_hook(wir_r, von, "dunk");
u2_noun ret = u2_bn_molt(wir_r, duq, u2_cv_sam, paz, 0);
u2_noun von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(typ), 0);
u2_noun duq = u2_cj_hook(von, "dunk");
u2_noun ret = u2_ci_molt(u2k(duq), u2_cv_sam, u2k(paz), 0);
u2_rz(wir_r, duq);
u2_rz(wir_r, von);
u2z(duq);
u2z(von);
return ret;
}
// dunq: create a dunk core for mean
//
u2_noun // produce
j2_mcy(Pt6, ut, dunq)(u2_wire wir_r,
j2_mcy(Pt6, ut, dunq)(
u2_noun van, // retain
const c3_c* paz_c, // retain
u2_noun typ) // retain
{
u2_noun von = u2_bn_molt(wir_r, van, u2_cv_sam, typ, 0);
u2_noun duq = u2_bn_hook(wir_r, von, "dunk");
u2_noun paz = u2_bn_string(wir_r, paz_c);
u2_noun ret = u2_bn_molt(wir_r, duq, u2_cv_sam, paz, 0);
u2_noun von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(typ), 0);
u2_noun duq = u2_cj_hook(von, "dunk");
u2_noun paz = u2_ci_string(paz_c);
u2_noun ret = u2_ci_molt(u2k(duq), u2_cv_sam, u2k(paz), 0);
u2_rz(wir_r, paz);
u2_rz(wir_r, duq);
u2_rz(wir_r, von);
u2z(paz);
u2z(duq);
u2z(von);
return ret;
}
// shew: create a show core for mean
//
u2_noun // produce
j2_mcy(Pt6, ut, shew)(u2_wire wir_r,
j2_mcy(Pt6, ut, shew)(
u2_noun van, // retain
u2_noun mol) // submit
{
u2_noun sho = u2_bn_hook(wir_r, van, "show");
u2_noun ret = u2_bn_molt(wir_r, sho, u2_cv_sam, mol, 0);
u2_noun sho = u2_cj_hook(van, "show");
u2_noun ret = u2_ci_molt(u2k(sho), u2_cv_sam, u2k(mol), 0);
u2_rz(wir_r, sho);
u2_rz(wir_r, mol);
u2z(sho);
u2z(mol);
return ret;
}
// shep: show with caption and style
//
u2_noun // produce
j2_mcy(Pt6, ut, shep)(u2_wire wir_r,
j2_mcy(Pt6, ut, shep)(
u2_noun van, // retain
const c3_c* paz_c, // retain
u2_noun sty, // retain
u2_noun mol) // submit
{
return j2_mcy(Pt6, ut, shew)
(wir_r, van,
u2_bc
(wir_r, u2_bc(wir_r, 'c', u2_bn_string(wir_r, paz_c)),
u2_bc(wir_r, u2_rx(wir_r, sty), mol)));
(van,
u2nc
(u2nc('c', u2_ci_string(paz_c)),
u2nc(u2k(sty), mol)));
}
/* declarations
*/
u2_noun // transfer
j2_mc(Pt6, ut, repo)(u2_wire wir_r,
j2_mc(Pt6, ut, repo)(
u2_noun cor); // retain
u2_noun // transfer
j2_mc(Pt6, ut, burn)(u2_wire wir_r,
j2_mc(Pt6, ut, burn)(
u2_noun cor); // retain
u2_noun // transfer
j2_mc(Pt6, ut, moot)(u2_wire wir_r,
j2_mc(Pt6, ut, moot)(
u2_noun cor); // retain
u2_weak
j2_mck(Pt6, ut, moot)(u2_wire wir_r,
j2_mck(Pt6, ut, moot)(
u2_noun cor); // retain
extern u2_ho_jet j2_mcj(Pt6, ut, busk)[];

View File

@ -8,70 +8,70 @@
/* logic
*/
static u2_noun
_burn_in(u2_wire wir_r,
_burn_in(
u2_noun van,
u2_noun sut,
u2_noun gil)
{
u2_noun p_sut, q_sut, pq_sut, qq_sut, rq_sut, prq_sut, qrq_sut;
if ( u2_no == u2_dust(sut) ) switch ( sut ) {
default: return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2du(sut) ) switch ( sut ) {
default: return u2_cm_bail(c3__fail);
case c3__noun: return _0;
case c3__noun: return 0;
case c3__void: {
return u2_bl_error(wir_r, "burn-void");
return u2_cm_error("burn-void");
}
}
else switch ( u2_h(sut) ) {
default: return u2_bl_bail(wir_r, c3__fail);
else switch ( u2h(sut) ) {
default: return u2_cm_bail(c3__fail);
case c3__atom: return _0;
case c3__bull: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__atom: return 0;
case c3__bull: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return _burn_in(wir_r, van, q_sut, gil);
return _burn_in(van, q_sut, gil);
}
case c3__cell: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__cell: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return u2_bc
(wir_r, _burn_in(wir_r, van, p_sut, gil),
_burn_in(wir_r, van, q_sut, gil));
return u2nc
(_burn_in(van, p_sut, gil),
_burn_in(van, q_sut, gil));
}
case c3__core: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
u2_bi_trel(wir_r, q_sut, &pq_sut, &qq_sut, &rq_sut);
u2_bi_cell(wir_r, rq_sut, &prq_sut, &qrq_sut);
case c3__core: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
u2_cx_trel(q_sut, &pq_sut, &qq_sut, &rq_sut);
u2_cx_cell(rq_sut, &prq_sut, &qrq_sut);
{
return u2_bc
(wir_r, u2_rx(wir_r, prq_sut),
_burn_in(wir_r, van, p_sut, gil));
return u2nc
(u2k(prq_sut),
_burn_in(van, p_sut, gil));
}
case c3__cube: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__cube: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return u2_rx(wir_r, p_sut);
return u2k(p_sut);
}
case c3__face: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__face: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return _burn_in(wir_r, van, q_sut, gil);
return _burn_in(van, q_sut, gil);
}
case c3__fork: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__fork: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return _burn_in(wir_r, van, p_sut, gil);
return _burn_in(van, p_sut, gil);
}
case c3__hold: p_sut = u2_t(sut);
case c3__hold: p_sut = u2t(sut);
{
if ( (u2_yes == j2_mcc(Pt4, in, has)(wir_r, gil, sut)) ) {
u2_noun sux = j2_mcy(Pt6, ut, dunq)(wir_r, van, "type", sut);
if ( (u2_yes == j2_mcc(Pt4, in, has)(gil, sut)) ) {
u2_noun sux = j2_mcy(Pt6, ut, dunq)(van, "type", sut);
u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, sux));
return u2_bl_error(wir_r, "burn-loop");
u2_ct_push(u2nc(c3__mean, sux));
return u2_cm_error("burn-loop");
}
else {
u2_noun zoc = j2_mcc(Pt4, in, put)(wir_r, gil, sut);
u2_type fop = j2_mcy(Pt6, ut, repo)(wir_r, van, sut);
u2_noun pro = _burn_in(wir_r, van, fop, zoc);
u2_noun zoc = j2_mcc(Pt4, in, put)(gil, sut);
u2_noun fop = j2_mcy(Pt6, ut, repo)(van, sut);
u2_noun pro = _burn_in(van, fop, zoc);
u2_rl_lose(wir_r, fop);
u2_rl_lose(wir_r, zoc);
u2z(fop);
u2z(zoc);
return pro;
}
@ -80,50 +80,50 @@
}
u2_noun // transfer
j2_mcx(Pt6, ut, burn)(u2_wire wir_r,
j2_mcx(Pt6, ut, burn)(
u2_noun van, // retain
u2_noun sut) // retain
{
return _burn_in(wir_r, van, sut, u2_nul);
return _burn_in(van, sut, u2_nul);
}
extern u2_ho_jet
j2_mbj(Pt6, ut)[];
u2_noun // transfer
j2_mcy(Pt6, ut, burn)(u2_wire wir_r,
j2_mcy(Pt6, ut, burn)(
u2_noun van, // retain
u2_noun sut) // retain
{
u2_ho_jet *jet_j = &j2_mbj(Pt6, ut)[0]; // total hack
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return j2_mcx(Pt6, ut, burn)(wir_r, van, sut);
return j2_mcx(Pt6, ut, burn)(van, sut);
}
else {
c3_m fun_m = c3__burn;
u2_noun pro = u2_rl_find(wir_r, fun_m, sut);
u2_noun pro = u2_ch_find(fun_m, sut);
if ( u2_none != pro ) {
return pro;
}
else {
pro = j2_mcx(Pt6, ut, burn)(wir_r, van, sut);
pro = j2_mcx(Pt6, ut, burn)(van, sut);
return u2_rl_save(wir_r, fun_m, sut, pro);
return u2_ch_save(fun_m, sut, pro);
}
}
}
u2_noun // transfer
j2_mc(Pt6, ut, burn)(u2_wire wir_r,
j2_mc(Pt6, ut, burn)(
u2_noun cor) // retain
{
u2_noun sut;
if ( u2_none == (sut = u2_frag(u2_cv_sam, cor)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_none == (sut = u2_cr_at(u2_cv_sam, cor)) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mcy(Pt6, ut, burn)(wir_r, cor, sut);
return j2_mcy(Pt6, ut, burn)(cor, sut);
}
}

View File

@ -11,15 +11,15 @@
/* logic
*/
u2_noun // transfer
j2_mcx(Pt6, ut, busk)(u2_wire wir_r,
j2_mcx(Pt6, ut, busk)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun cog, // retain
u2_noun hyp) // retain
{
u2_noun sep = j2_mcy(Pt6, ut, seep)(wir_r, van, sut, c3__both, hyp);
u2_noun bid = u2_bt(wir_r, u2k(cog), u2k(hyp), sep);
u2_noun ret = j2_mby(Pt6, bull)(wir_r, bid, sut);
u2_noun sep = j2_mcy(Pt6, ut, seep)(van, sut, c3__both, hyp);
u2_noun bid = u2nt(u2k(cog), u2k(hyp), sep);
u2_noun ret = j2_mby(Pt6, bull)(bid, sut);
u2z(bid);
@ -29,55 +29,55 @@
/* boilerplate
*/
u2_noun // transfer
j2_mc(Pt6, ut, busk)(u2_wire wir_r,
j2_mc(Pt6, ut, busk)(
u2_noun cor) // retain
{
u2_noun sut, cog, hyp, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &cog,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &cog,
u2_cv_sam_3, &hyp,
u2_cv_con, &van,
0)) ||
(u2_no == u2_stud(cog)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_no == u2ud(cog)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, busk)(wir_r, van, sut, cog, hyp);
return j2_mcx(Pt6, ut, busk)(van, sut, cog, hyp);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, busk)(u2_wire wir_r,
j2_mci(Pt6, ut, busk)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun cog, // retain
u2_noun hyp) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "busk");
u2_weak hoc = u2_cj_look(van, "busk");
if ( u2_none == hoc ) {
c3_assert(!"register busk");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam_2, cog,
u2_cv_sam_3, u2_rx(wir_r, hyp), 0);
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam_2, u2k(cog),
u2_cv_sam_3, u2k(hyp), 0);
if ( (u2_none == j2_mcj(Pt6, ut, busk)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, busk)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, busk)(u2_wire wir_r,
j2_mcy(Pt6, ut, busk)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun cog, // retain
@ -86,36 +86,36 @@
u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, busk)[0];
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
return j2_mcx(Pt6, ut, busk)(wir_r, van, sut, cog, hyp);
return j2_mcx(Pt6, ut, busk)(van, sut, cog, hyp);
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, busk)(wir_r, van, sut, cog, hyp);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, busk)(van, sut, cog, hyp);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}
}
u2_weak
j2_mck(Pt6, ut, busk)(u2_wire wir_r,
j2_mck(Pt6, ut, busk)(
u2_noun cor)
{
u2_noun sut, hyp, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam_3, &hyp, u2_cv_con, &van, &hyp, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_3, &hyp, u2_cv_con, &van, &hyp, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_none;
} else {
return u2_rc(wir_r, u2_rx(wir_r, sut), u2_rx(wir_r, hyp));
return u2nc(u2k(sut), u2k(hyp));
}
}

View File

@ -8,27 +8,27 @@
/* logic
*/
u2_noun // transfer
j2_mcx(Pt6, ut, bust)(u2_wire wir_r,
j2_mcx(Pt6, ut, bust)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun dib) // retain
{
u2_noun yam = j2_mcy(Pt6, ut, burn)(wir_r, van, sut);
u2_noun yib = u2_bc
(wir_r,
u2_bc(wir_r, u2_rx(wir_r, u2_bi_h(wir_r, u2_bi_h(wir_r, yam))),
u2_rx(wir_r, dib)),
u2_rx(wir_r, u2_bi_t(wir_r, yam)));
u2_noun woo = u2_bc(wir_r, c3__cnzy, u2_blip);
u2_noun wox = j2_mcy(Pt6, ut, mint)(wir_r, van, sut, c3__noun, woo);
u2_noun ret = u2_nk_nock(wir_r, yib, u2_t(wox));
u2_noun yam = j2_mcy(Pt6, ut, burn)(van, sut);
u2_noun yib = u2nc
(
u2nc(u2k(u2h(u2h(yam))),
u2k(dib)),
u2k(u2t(yam)));
u2_noun woo = u2nc(c3__cnzy, u2_blip);
u2_noun wox = j2_mcy(Pt6, ut, mint)(van, sut, c3__noun, woo);
u2_noun ret = u2_cn_nock_on(yib, u2k(u2t(wox)));
if ( u2_none == ret ) {
return u2_bl_error(wir_r, "bust-nock");
return u2_cm_error("bust-nock");
}
u2_rz(wir_r, wox);
u2_rz(wir_r, woo);
u2_rz(wir_r, yam);
u2z(wox);
u2z(woo);
u2z(yam);
return ret;
}
@ -39,49 +39,49 @@
j2_mcj(Pt6, ut, bust)[];
u2_noun // transfer
j2_mc(Pt6, ut, bust)(u2_wire wir_r,
j2_mc(Pt6, ut, bust)(
u2_noun cor) // retain
{
u2_noun sut, dib, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &dib, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &dib, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, bust)(wir_r, van, sut, dib);
return j2_mcx(Pt6, ut, bust)(van, sut, dib);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, bust)(u2_wire wir_r,
j2_mci(Pt6, ut, bust)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun dib) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "bust");
u2_weak hoc = u2_cj_look(van, "bust");
if ( u2_none == hoc ) {
c3_assert(!"register bust");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam, u2_rx(wir_r, dib), 0);
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam, u2k(dib), 0);
if ( (u2_none == j2_mcj(Pt6, ut, bust)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, bust)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, bust)(u2_wire wir_r,
j2_mcy(Pt6, ut, bust)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun dib) // retain
@ -90,50 +90,50 @@
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return j2_mcx(Pt6, ut, bust)(wir_r, van, sut, dib);
return j2_mcx(Pt6, ut, bust)(van, sut, dib);
}
else {
c3_m fun_m = c3__bust;
u2_noun pro = u2_rl_find_cell(wir_r, fun_m, sut, dib);
u2_noun pro = u2_ch_find_2(fun_m, sut, dib);
if ( u2_none != pro ) {
return pro;
}
else {
pro = j2_mcx(Pt6, ut, bust)(wir_r, van, sut, dib);
pro = j2_mcx(Pt6, ut, bust)(van, sut, dib);
return u2_rl_save_cell(wir_r, fun_m, sut, dib, pro);
return u2_ch_save_2(fun_m, sut, dib, pro);
}
}
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, bust)(wir_r, van, sut, dib);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, bust)(van, sut, dib);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}
}
u2_weak
j2_mck(Pt6, ut, bust)(u2_wire wir_r,
j2_mck(Pt6, ut, bust)(
u2_noun cor)
{
u2_noun sut, dib, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &dib, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &dib, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_none;
} else {
return u2_rc(wir_r, u2_rx(wir_r, sut), u2_rx(wir_r, dib));
return u2nc(u2k(sut), u2k(dib));
}
}

View File

@ -8,13 +8,13 @@
/* logic
*/
u2_bean // transfer
j2_mcx(Pt6, ut, conk)(u2_wire wir_r,
j2_mcx(Pt6, ut, conk)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun got) // retain
{
if ( u2_yes == u2ud(got) ) {
return j2_mby(Pt6, face)(wir_r, got, sut);
return j2_mby(Pt6, face)(got, sut);
}
else switch ( u2h(got) ) {
default: return u2_cm_bail(c3__fail);
@ -24,28 +24,28 @@
}
case 1: {
return j2_mby(Pt6, face)
(wir_r, u2h(u2t(got)),
j2_mcx(Pt6, ut, conk)(wir_r, van, sut, u2t(u2t(got))));
(u2h(u2t(got)),
j2_mcx(Pt6, ut, conk)(van, sut, u2t(u2t(got))));
}
case 2: {
u2_bean vet = u2_frag(j2_ut_van_vet, van);
u2_bean vet = u2_cr_at(j2_ut_van_vet, van);
u2_noun hed, tal, ret;
if ( u2_yes == vet ) {
u2_noun cel = u2nt(c3__cell, c3__noun, c3__noun);
if ( u2_no == j2_mcy(Pt6, ut, nest)(wir_r, van, cel, u2_yes, sut) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == j2_mcy(Pt6, ut, nest)(van, cel, u2_yes, sut) ) {
return u2_cm_bail(c3__fail);
}
u2z(cel);
}
hed = j2_mcy(Pt6, ut, peek)(wir_r, van, sut, c3__both, 2);
tal = j2_mcy(Pt6, ut, peek)(wir_r, van, sut, c3__both, 3);
hed = j2_mcy(Pt6, ut, peek)(van, sut, c3__both, 2);
tal = j2_mcy(Pt6, ut, peek)(van, sut, c3__both, 3);
ret = j2_mby(Pt6, cell)
(wir_r,
j2_mcx(Pt6, ut, conk)(wir_r, van, hed, u2h(u2t(got))),
j2_mcx(Pt6, ut, conk)(wir_r, van, tal, u2t(u2t(got))));
(
j2_mcx(Pt6, ut, conk)(van, hed, u2h(u2t(got))),
j2_mcx(Pt6, ut, conk)(van, tal, u2t(u2t(got))));
u2z(hed);
u2z(tal);
@ -61,53 +61,53 @@
j2_mcj(Pt6, ut, conk)[];
u2_noun // transfer
j2_mc(Pt6, ut, conk)(u2_wire wir_r,
j2_mc(Pt6, ut, conk)(
u2_noun cor) // retain
{
u2_noun sut, got, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &got,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &got,
u2_cv_con, &van,
0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, conk)(wir_r, van, sut, got);
return j2_mcx(Pt6, ut, conk)(van, sut, got);
}
}
u2_bean
j2_mci(Pt6, ut, conk)(u2_wire wir_r,
j2_mci(Pt6, ut, conk)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun got) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "conk");
u2_weak hoc = u2_cj_look(van, "conk");
if ( u2_none == hoc ) {
c3_assert(!"register conk");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat,
u2_cv_sam, u2_rx(wir_r, got),
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat),
u2_cv_sam, u2k(got),
0);
if ( (u2_none == j2_mcj(Pt6, ut, conk)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, conk)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, conk)(u2_wire wir_r,
j2_mcy(Pt6, ut, conk)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun got) // retain
@ -115,19 +115,19 @@
u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, conk)[0];
if ( jet_j->sat_s == u2_jet_live ) {
return j2_mcx(Pt6, ut, conk)(wir_r, van, sut, got);
return j2_mcx(Pt6, ut, conk)(van, sut, got);
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, conk)(wir_r, van, sut, got);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, conk)(van, sut, got);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}

View File

@ -8,36 +8,36 @@
/* logic
*/
static u2_noun
_crop_dext(u2_wire, u2_noun, u2_noun, u2_noun, u2_noun);
_crop_dext(u2_noun, u2_noun, u2_noun, u2_noun);
static u2_noun
_crop_sint(u2_wire, u2_noun, u2_noun, u2_noun, u2_noun);
_crop_sint(u2_noun, u2_noun, u2_noun, u2_noun);
static u2_noun
_crop_repo(u2_wire wir_r,
_crop_repo(
u2_noun van,
u2_noun sut,
u2_noun ref,
u2_noun bix)
{
u2_noun rep = j2_mcy(Pt6, ut, repo)(wir_r, van, sut);
u2_noun ret = _crop_dext(wir_r, van, rep, ref, bix);
u2_noun rep = j2_mcy(Pt6, ut, repo)(van, sut);
u2_noun ret = _crop_dext(van, rep, ref, bix);
if ( u2_yes == u2_sing(ret, rep) ) {
if ( u2_yes == u2_cr_sing(ret, rep) ) {
if ( c3__void == rep ) {
return c3__void;
} else {
u2_rz(wir_r, rep);
u2_rz(wir_r, ret);
return u2_rx(wir_r, sut);
u2z(rep);
u2z(ret);
return u2k(sut);
}
} else {
u2_rz(wir_r, rep);
u2z(rep);
return ret;
}
}
static u2_noun // produce
_crop_dext(u2_wire wir_r,
_crop_dext(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun ref, // retain
@ -45,130 +45,130 @@
{
u2_noun p_sut, q_sut, p_ref, q_ref;
if ( u2_no == u2_dust(ref) ) {
if ( u2_no == u2du(ref) ) {
switch ( ref ) {
case c3__void: return u2_rx(wir_r, sut);
case c3__void: return u2k(sut);
case c3__noun: return c3__void;
default: return u2_bl_bail(wir_r, c3__fail);
default: return u2_cm_bail(c3__fail);
}
}
if ( u2_yes == u2_sing(sut, ref) ) {
if ( u2_yes == u2_cr_sing(sut, ref) ) {
return c3__void;
}
if ( u2_no == u2_dust(sut) ) switch ( sut ) {
default: return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2du(sut) ) switch ( sut ) {
default: return u2_cm_bail(c3__fail);
case c3__noun: return _crop_repo(wir_r, van, sut, ref, bix);
case c3__noun: return _crop_repo(van, sut, ref, bix);
case c3__void: return c3__void;
}
else switch ( u2_h(sut) ) {
default: return u2_bl_bail(wir_r, c3__fail);
else switch ( u2h(sut) ) {
default: return u2_cm_bail(c3__fail);
case c3__atom:
{
if ( c3__atom == u2_h(ref) ) {
if ( c3__atom == u2h(ref) ) {
return c3__void;
}
else if ( c3__cell == u2_h(ref) ) {
return u2_rx(wir_r, sut);
else if ( c3__cell == u2h(ref) ) {
return u2k(sut);
}
else return _crop_sint(wir_r, van, sut, ref, bix);
else return _crop_sint(van, sut, ref, bix);
}
case c3__bull: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__bull: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun foz = _crop_dext(wir_r, van, q_sut, ref, bix);
u2_noun ret = j2_mby(Pt6, bull)(wir_r, p_sut, foz);
u2_noun foz = _crop_dext(van, q_sut, ref, bix);
u2_noun ret = j2_mby(Pt6, bull)(p_sut, foz);
u2_rz(wir_r, foz);
u2z(foz);
return ret;
}
case c3__cell: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__cell: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
if ( c3__atom == u2_h(ref) ) {
return u2_rx(wir_r, sut);
if ( c3__atom == u2h(ref) ) {
return u2k(sut);
}
else if ( c3__cell == u2_h(ref) ) {
u2_bi_cell(wir_r, u2_t(ref), &p_ref, &q_ref);
else if ( c3__cell == u2h(ref) ) {
u2_cx_cell(u2t(ref), &p_ref, &q_ref);
if ( u2_yes == j2_mcy(Pt6, ut, nest)
(wir_r, van, p_ref, u2_no, p_sut) )
(van, p_ref, u2_no, p_sut) )
{
u2_noun foz = _crop_dext(wir_r, van, q_sut, q_ref, bix);
u2_noun ret = j2_mby(Pt6, cell)(wir_r, p_sut, foz);
u2_noun foz = _crop_dext(van, q_sut, q_ref, bix);
u2_noun ret = j2_mby(Pt6, cell)(p_sut, foz);
u2_rz(wir_r, foz);
u2z(foz);
return ret;
}
else return u2_rx(wir_r, sut);
else return u2k(sut);
}
else return _crop_sint(wir_r, van, sut, ref, bix);
else return _crop_sint(van, sut, ref, bix);
}
case c3__core:
{
if ( (c3__atom == u2_h(ref)) || (c3__cell == u2_h(ref)) ) {
return u2_rx(wir_r, sut);
if ( (c3__atom == u2h(ref)) || (c3__cell == u2h(ref)) ) {
return u2k(sut);
}
else return _crop_sint(wir_r, van, sut, ref, bix);
else return _crop_sint(van, sut, ref, bix);
}
case c3__cube: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__cube: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
if ( (c3__cube == u2_h(ref)) &&
(u2_yes == u2_sing(p_sut, u2_h(u2_t(ref)))) )
if ( (c3__cube == u2h(ref)) &&
(u2_yes == u2_cr_sing(p_sut, u2h(u2t(ref)))) )
{
return c3__void;
}
else if ( (c3__atom == u2_h(ref)) || (c3__cell == u2_h(ref)) ) {
u2_noun foz = _crop_dext(wir_r, van, q_sut, ref, bix);
else if ( (c3__atom == u2h(ref)) || (c3__cell == u2h(ref)) ) {
u2_noun foz = _crop_dext(van, q_sut, ref, bix);
u2_noun ret;
if ( u2_yes == j2_mcy(Pt6, ut, firm)(wir_r, van, foz, p_sut) ) {
ret = j2_mby(Pt6, cube)(wir_r, p_sut, foz);
if ( u2_yes == j2_mcy(Pt6, ut, firm)(van, foz, p_sut) ) {
ret = j2_mby(Pt6, cube)(p_sut, foz);
}
else ret = c3__void;
u2_rz(wir_r, foz);
u2z(foz);
return ret;
}
else return _crop_sint(wir_r, van, sut, ref, bix);
else return _crop_sint(van, sut, ref, bix);
}
case c3__face: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__face: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun foz = _crop_dext(wir_r, van, q_sut, ref, bix);
u2_noun ret = j2_mby(Pt6, face)(wir_r, p_sut, foz);
u2_noun foz = _crop_dext(van, q_sut, ref, bix);
u2_noun ret = j2_mby(Pt6, face)(p_sut, foz);
u2_rz(wir_r, foz);
u2z(foz);
return ret;
}
case c3__fork: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__fork: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun dis = _crop_dext(wir_r, van, p_sut, ref, bix);
u2_noun dat = _crop_dext(wir_r, van, q_sut, ref, bix);
u2_noun ret = j2_mby(Pt6, fork)(wir_r, dis, dat);
u2_noun dis = _crop_dext(van, p_sut, ref, bix);
u2_noun dat = _crop_dext(van, q_sut, ref, bix);
u2_noun ret = j2_mby(Pt6, fork)(dis, dat);
u2_rz(wir_r, dis);
u2_rz(wir_r, dat);
u2z(dis);
u2z(dat);
return ret;
}
case c3__hold: p_sut = u2_t(sut);
case c3__hold: p_sut = u2t(sut);
{
u2_noun hud = u2_bc(wir_r, u2_rx(wir_r, sut), u2_rx(wir_r, ref));
u2_noun hud = u2nc(u2k(sut), u2k(ref));
if ( u2_yes == j2_mcc(Pt4, in, has)(wir_r, bix, hud) ) {
if ( u2_yes == j2_mcc(Pt4, in, has)(bix, hud) ) {
# if 0
u2_noun dun = j2_mcy(Pt6, ut, dunq)(wir_r, van, "type", sut);
u2_noun niz = j2_mcy(Pt6, ut, dunq)(wir_r, van, "over", ref);
u2_noun dun = j2_mcy(Pt6, ut, dunq)(van, "type", sut);
u2_noun niz = j2_mcy(Pt6, ut, dunq)(van, "over", ref);
u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, dun));
u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, niz));
u2_ct_push(u2nc(c3__mean, dun));
u2_ct_push(u2nc(c3__mean, niz));
# endif
return u2_bl_error(wir_r, "crop-loop");
return u2_cm_error("crop-loop");
} else {
u2_noun bux = j2_mcc(Pt4, in, put)(wir_r, bix, hud);
u2_noun ret = _crop_repo(wir_r, van, sut, ref, bux);
u2_noun bux = j2_mcc(Pt4, in, put)(bix, hud);
u2_noun ret = _crop_repo(van, sut, ref, bux);
u2_rz(wir_r, hud);
u2_rz(wir_r, bux);
u2z(hud);
u2z(bux);
return ret;
}
}
@ -176,7 +176,7 @@
}
static u2_noun // produce
_crop_sint(u2_wire wir_r,
_crop_sint(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun ref, // retain
@ -184,47 +184,47 @@
{
u2_noun p_ref, q_ref;
switch ( u2_h(ref) ) {
default: return u2_bl_bail(wir_r, c3__fail);
switch ( u2h(ref) ) {
default: return u2_cm_bail(c3__fail);
case c3__bull: u2_bi_cell(wir_r, u2_t(ref), &p_ref, &q_ref);
case c3__bull: u2_cx_cell(u2t(ref), &p_ref, &q_ref);
{
return _crop_dext(wir_r, van, sut, q_ref, bix);
return _crop_dext(van, sut, q_ref, bix);
}
case c3__core:
case c3__cube: {
return u2_rx(wir_r, sut);
return u2k(sut);
}
case c3__face: u2_bi_cell(wir_r, u2_t(ref), &p_ref, &q_ref);
case c3__face: u2_cx_cell(u2t(ref), &p_ref, &q_ref);
{
return _crop_dext(wir_r, van, sut, q_ref, bix);
return _crop_dext(van, sut, q_ref, bix);
}
case c3__fork: u2_bi_cell(wir_r, u2_t(ref), &p_ref, &q_ref);
case c3__fork: u2_cx_cell(u2t(ref), &p_ref, &q_ref);
{
u2_noun hin = _crop_dext(wir_r, van, sut, p_ref, bix);
u2_noun ret = _crop_dext(wir_r, van, hin, q_ref, bix);
u2_noun hin = _crop_dext(van, sut, p_ref, bix);
u2_noun ret = _crop_dext(van, hin, q_ref, bix);
u2_rz(wir_r, hin);
u2z(hin);
return ret;
}
case c3__hold: p_ref = u2_t(ref);
case c3__hold: p_ref = u2t(ref);
{
u2_noun rep = j2_mcy(Pt6, ut, repo)(wir_r, van, ref);
u2_noun ret = _crop_dext(wir_r, van, sut, rep, bix);
u2_noun rep = j2_mcy(Pt6, ut, repo)(van, ref);
u2_noun ret = _crop_dext(van, sut, rep, bix);
u2_rz(wir_r, rep);
u2z(rep);
return ret;
}
}
}
u2_noun // transfer
j2_mcx(Pt6, ut, crop)(u2_wire wir_r,
j2_mcx(Pt6, ut, crop)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun ref) // retain
{
return _crop_dext(wir_r, van, sut, ref, u2_nul);
return _crop_dext(van, sut, ref, u2_nul);
}
/* boilerplate
@ -233,49 +233,49 @@
j2_mcj(Pt6, ut, crop)[];
u2_noun // transfer
j2_mc(Pt6, ut, crop)(u2_wire wir_r,
j2_mc(Pt6, ut, crop)(
u2_noun cor) // retain
{
u2_noun sut, ref, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &ref, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &ref, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, crop)(wir_r, van, sut, ref);
return j2_mcx(Pt6, ut, crop)(van, sut, ref);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, crop)(u2_wire wir_r,
j2_mci(Pt6, ut, crop)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun ref) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "crop");
u2_weak hoc = u2_cj_look(van, "crop");
if ( u2_none == hoc ) {
c3_assert(!"register crop");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam, u2_rx(wir_r, ref), 0);
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam, u2k(ref), 0);
if ( (u2_none == j2_mcj(Pt6, ut, crop)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, crop)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, crop)(u2_wire wir_r,
j2_mcy(Pt6, ut, crop)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun ref) // retain
@ -284,50 +284,50 @@
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return j2_mcx(Pt6, ut, crop)(wir_r, van, sut, ref);
return j2_mcx(Pt6, ut, crop)(van, sut, ref);
}
else {
c3_m fun_m = c3__crop;
u2_noun pro = u2_rl_find_cell(wir_r, fun_m, sut, ref);
u2_noun pro = u2_ch_find_2(fun_m, sut, ref);
if ( u2_none != pro ) {
return pro;
}
else {
pro = j2_mcx(Pt6, ut, crop)(wir_r, van, sut, ref);
pro = j2_mcx(Pt6, ut, crop)(van, sut, ref);
return u2_rl_save_cell(wir_r, fun_m, sut, ref, pro);
return u2_ch_save_2(fun_m, sut, ref, pro);
}
}
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, crop)(wir_r, van, sut, ref);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, crop)(van, sut, ref);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}
}
u2_weak
j2_mck(Pt6, ut, crop)(u2_wire wir_r,
j2_mck(Pt6, ut, crop)(
u2_noun cor)
{
u2_noun sut, ref, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &ref, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &ref, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_none;
} else {
return u2_rc(wir_r, u2_rx(wir_r, sut), u2_rx(wir_r, ref));
return u2nc(u2k(sut), u2k(ref));
}
}

View File

@ -8,10 +8,10 @@
/* logic
*/
u2_noun
j2_mcx(Pt6, ut, cull)(u2_wire, u2_noun, u2_noun, u2_bean, u2_atom, u2_noun);
j2_mcx(Pt6, ut, cull)(u2_noun, u2_noun, u2_bean, u2_atom, u2_noun);
static u2_noun
_cull_in(u2_wire wir_r,
_cull_in(
u2_noun van, // retain
u2_noun sut, // retain
u2_bean pol, // retain
@ -23,104 +23,104 @@
{
u2_noun ret, p_sut, q_sut;
if ( u2_no == u2_dust(sut) ) switch ( sut ) {
default: return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2du(sut) ) switch ( sut ) {
default: return u2_cm_bail(c3__fail);
case c3__noun: {
u2_noun pyr = j2_mcy(Pt6, ut, repo)(wir_r, van, sut);
u2_noun yot = j2_mcx(Pt6, ut, cull)(wir_r, van, pyr, pol, axe, ref);
u2_noun pyr = j2_mcy(Pt6, ut, repo)(van, sut);
u2_noun yot = j2_mcx(Pt6, ut, cull)(van, pyr, pol, axe, ref);
if ( u2_yes == u2_sing(pyr, yot) ) {
ret = u2_rx(wir_r, sut);
if ( u2_yes == u2_cr_sing(pyr, yot) ) {
ret = u2k(sut);
} else {
ret = u2_rx(wir_r, yot);
ret = u2k(yot);
}
u2_rl_lose(wir_r, pyr);
u2_rl_lose(wir_r, yot);
u2z(pyr);
u2z(yot);
break;
}
case c3__void: {
ret = c3__void;
}
}
else switch ( u2_h(sut) ) {
default: return u2_bl_bail(wir_r, c3__fail);
else switch ( u2h(sut) ) {
default: return u2_cm_bail(c3__fail);
case c3__atom: {
ret = c3__void;
break;
}
case c3__bull: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__bull: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun hic = j2_mcx(Pt6, ut, cull)
(wir_r, van, q_sut, pol, axe, ref);
(van, q_sut, pol, axe, ref);
if ( u2_yes == u2_sing(hic, q_sut) ) {
ret = u2_rx(wir_r, sut);
if ( u2_yes == u2_cr_sing(hic, q_sut) ) {
ret = u2k(sut);
} else {
ret = j2_mby(Pt6, bull)(wir_r, p_sut, hic);
ret = j2_mby(Pt6, bull)(p_sut, hic);
}
u2_rl_lose(wir_r, hic);
u2z(hic);
break;
}
case c3__cell: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__cell: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun hub;
if ( _2 == now ) {
hub = j2_mcx(Pt6, ut, cull)(wir_r, van, p_sut, pol, lat, ref);
ret = j2_mby(Pt6, cell)(wir_r, hub, q_sut);
if ( 2 == now ) {
hub = j2_mcx(Pt6, ut, cull)(van, p_sut, pol, lat, ref);
ret = j2_mby(Pt6, cell)(hub, q_sut);
} else {
hub = j2_mcx(Pt6, ut, cull)(wir_r, van, q_sut, pol, lat, ref);
ret = j2_mby(Pt6, cell)(wir_r, p_sut, hub);
hub = j2_mcx(Pt6, ut, cull)(van, q_sut, pol, lat, ref);
ret = j2_mby(Pt6, cell)(p_sut, hub);
}
u2_rl_lose(wir_r, hub);
u2z(hub);
break;
}
case c3__core: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__core: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
if ( _3 != now ) {
ret = u2_rx(wir_r, sut);
if ( 3 != now ) {
ret = u2k(sut);
} else {
u2_noun hub = j2_mcx(Pt6, ut, cull)
(wir_r, van, p_sut, pol, lat, ref);
(van, p_sut, pol, lat, ref);
ret = j2_mby(Pt6, core)(wir_r, hub, q_sut);
ret = j2_mby(Pt6, core)(hub, q_sut);
u2_rl_lose(wir_r, hub);
u2z(hub);
}
break;
}
case c3__face: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__face: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun hic = j2_mcx(Pt6, ut, cull)
(wir_r, van, q_sut, pol, axe, ref);
(van, q_sut, pol, axe, ref);
if ( u2_yes == u2_sing(hic, q_sut) ) {
ret = u2_rx(wir_r, sut);
if ( u2_yes == u2_cr_sing(hic, q_sut) ) {
ret = u2k(sut);
} else {
ret = j2_mby(Pt6, face)(wir_r, p_sut, hic);
ret = j2_mby(Pt6, face)(p_sut, hic);
}
u2_rl_lose(wir_r, hic);
u2z(hic);
break;
}
case c3__fork: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__fork: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
if ( u2_yes == j2_mcc(Pt4, in, has)(wir_r, vil, sut) ) {
if ( u2_yes == j2_mcc(Pt4, in, has)(vil, sut) ) {
return c3__void;
} else {
u2_noun zoc = j2_mcc(Pt4, in, put)(wir_r, vil, sut);
u2_noun zoc = j2_mcc(Pt4, in, put)(vil, sut);
u2_noun sin = _cull_in
(wir_r, van, p_sut, pol, axe, ref, now, lat, zoc);
(van, p_sut, pol, axe, ref, now, lat, zoc);
u2_noun dex = _cull_in
(wir_r, van, q_sut, pol, axe, ref, now, lat, zoc);
(van, q_sut, pol, axe, ref, now, lat, zoc);
ret = j2_mby(Pt6, fork)(wir_r, sin, dex);
u2_rl_lose(wir_r, sin);
u2_rl_lose(wir_r, dex);
u2_rl_lose(wir_r, zoc);
ret = j2_mby(Pt6, fork)(sin, dex);
u2z(sin);
u2z(dex);
u2z(zoc);
return ret;
}
@ -128,45 +128,45 @@
case c3__cube:
case c3__hold:
{
u2_noun pyr = j2_mcy(Pt6, ut, repo)(wir_r, van, sut);
u2_noun yot = _cull_in(wir_r, van, pyr, pol, axe, ref, now, lat, vil);
u2_noun pyr = j2_mcy(Pt6, ut, repo)(van, sut);
u2_noun yot = _cull_in(van, pyr, pol, axe, ref, now, lat, vil);
if ( u2_yes == u2_sing(pyr, yot) ) {
if ( u2_yes == u2_cr_sing(pyr, yot) ) {
if ( c3__void == pyr ) {
ret = c3__void;
}
else ret = u2_rx(wir_r, sut);
else ret = u2k(sut);
} else {
ret = u2_rx(wir_r, yot);
ret = u2k(yot);
}
u2_rl_lose(wir_r, pyr);
u2_rl_lose(wir_r, yot);
u2z(pyr);
u2z(yot);
break;
}
}
u2_rl_lose(wir_r, lat);
u2z(lat);
return ret;
}
u2_noun // transfer
j2_mcx(Pt6, ut, cull)(u2_wire wir_r,
j2_mcx(Pt6, ut, cull)(
u2_noun van, // retain
u2_noun sut, // retain
u2_bean pol, // retain
u2_atom axe, // retain
u2_noun ref) // retain
{
if ( _1 == axe ) {
if ( 1 == axe ) {
if ( u2_yes == pol ) {
return j2_mcy(Pt6, ut, fuse)(wir_r, van, sut, ref);
return j2_mcy(Pt6, ut, fuse)(van, sut, ref);
} else {
return j2_mcy(Pt6, ut, crop)(wir_r, van, sut, ref);
return j2_mcy(Pt6, ut, crop)(van, sut, ref);
}
} else {
u2_atom now = j2_mbc(Pt3, cap)(wir_r, axe);
u2_atom lat = j2_mbc(Pt3, mas)(wir_r, axe);
u2_atom now = j2_mbc(Pt3, cap)(axe);
u2_atom lat = j2_mbc(Pt3, mas)(axe);
return _cull_in(wir_r, van, sut, pol, axe, ref, now, lat, u2_nul);
return _cull_in(van, sut, pol, axe, ref, now, lat, u2_nul);
}
}
@ -176,59 +176,59 @@
j2_mcj(Pt6, ut, cull)[];
u2_noun // transfer
j2_mc(Pt6, ut, cull)(u2_wire wir_r,
j2_mc(Pt6, ut, cull)(
u2_noun cor) // retain
{
u2_noun sut, axe, pol, ref, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &pol,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &pol,
u2_cv_sam_6, &axe,
u2_cv_sam_7, &ref,
u2_cv_con, &van, 0)) ||
(u2_no == u2_stud(axe)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_no == u2ud(axe)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, cull)(wir_r, van, sut, pol, axe, ref);
return j2_mcx(Pt6, ut, cull)(van, sut, pol, axe, ref);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, cull)(u2_wire wir_r,
j2_mci(Pt6, ut, cull)(
u2_noun van, // retain
u2_noun sut, // retain
u2_bean pol, // retain
u2_atom axe, // retain
u2_noun ref) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "cull");
u2_weak hoc = u2_cj_look(van, "cull");
if ( u2_none == hoc ) {
c3_assert(!"register cull");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat,
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat),
u2_cv_sam_2, pol,
u2_cv_sam_6, u2_rx(wir_r, axe),
u2_cv_sam_7, u2_rx(wir_r, ref),
u2_cv_sam_6, u2k(axe),
u2_cv_sam_7, u2k(ref),
0);
if ( (u2_none == j2_mcj(Pt6, ut, cull)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, cull)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, cull)(u2_wire wir_r,
j2_mcy(Pt6, ut, cull)(
u2_noun van, // retain
u2_noun sut, // retain
u2_bean pol, // retain
@ -239,56 +239,56 @@
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return j2_mcx(Pt6, ut, cull)(wir_r, van, sut, pol, axe, ref);
return j2_mcx(Pt6, ut, cull)(van, sut, pol, axe, ref);
}
else {
c3_m fun_m = c3__cull;
u2_noun pro = u2_rl_find_qual(wir_r, fun_m, sut, pol, axe, ref);
u2_noun pro = u2_ch_find_4(fun_m, sut, pol, axe, ref);
if ( u2_none != pro ) {
return pro;
}
else {
pro = j2_mcx(Pt6, ut, cull)(wir_r, van, sut, pol, axe, ref);
pro = j2_mcx(Pt6, ut, cull)(van, sut, pol, axe, ref);
return u2_rl_save_qual(wir_r, fun_m, sut, pol, axe, ref, pro);
return u2_ch_save_4(fun_m, sut, pol, axe, ref, pro);
}
}
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, cull)(wir_r, van, sut, pol, axe, ref);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, cull)(van, sut, pol, axe, ref);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}
}
u2_weak
j2_mck(Pt6, ut, cull)(u2_wire wir_r,
j2_mck(Pt6, ut, cull)(
u2_noun cor)
{
u2_noun sut, pol, axe, ref, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &pol,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &pol,
u2_cv_sam_6, &axe,
u2_cv_sam_7, &ref,
u2_cv_con, &van,
0)) ||
(pol > 1) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_none;
} else {
return u2_rq
(wir_r, u2_rx(wir_r, sut), pol, u2_rx(wir_r, axe), u2_rx(wir_r, ref));
return u2nq
(u2k(sut), pol, u2k(axe), u2k(ref));
}
}

File diff suppressed because it is too large Load Diff

View File

@ -8,40 +8,40 @@
/* logic
*/
u2_noun // transfer
j2_mcx(Pt6, ut, fink)(u2_wire wir_r,
j2_mcx(Pt6, ut, fink)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun dep, // retain
u2_noun way, // retain
u2_noun cog) // retain
{
// u2_noun dun = j2_mcy(Pt6, ut, dunq)(wir_r, van, "type", sut);
// u2_noun dun = j2_mcy(Pt6, ut, dunq)(van, "type", sut);
u2_noun nuc = (u2_blip == cog)
? j2_mcy(Pt6, ut, shew)
(wir_r, van,
u2_bc
(wir_r, u2_bc(wir_r, 'c', u2_bn_string(wir_r, "find-limb")),
(van,
u2nc
(u2nc('c', u2_ci_string("find-limb")),
'$'))
: j2_mcy(Pt6, ut, shep)
(wir_r, van, "find-limb", 'a', u2_rx(wir_r, cog));
(van, "find-limb", 'a', u2k(cog));
u2_noun pro;
// u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, dun));
u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, nuc));
// u2_ct_push(u2nc(c3__mean, dun));
u2_ct_push(u2nc(c3__mean, nuc));
{
u2_noun hoq = j2_mcy(Pt6, ut, find)(wir_r, van, sut, dep, way, cog);
u2_noun fin = u2_t(hoq);
u2_noun hoq = j2_mcy(Pt6, ut, find)(van, sut, dep, way, cog);
u2_noun fin = u2t(hoq);
if ( u2_nul == fin ) {
return u2_bl_error(wir_r, "find-none");
return u2_cm_error("find-none");
}
else {
pro = u2_rx(wir_r, u2_t(fin));
u2_rl_lose(wir_r, hoq);
pro = u2k(u2t(fin));
u2z(hoq);
}
}
u2_bl_drop(wir_r);
// u2_bl_drop(wir_r);
u2_ct_drop();
// u2_ct_drop();
return pro;
}
@ -52,59 +52,59 @@
j2_mcj(Pt6, ut, fink)[];
u2_noun // transfer
j2_mc(Pt6, ut, fink)(u2_wire wir_r,
j2_mc(Pt6, ut, fink)(
u2_noun cor) // retain
{
u2_noun sut, dep, way, cog, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &dep,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &dep,
u2_cv_sam_6, &way,
u2_cv_sam_7, &cog,
u2_cv_con, &van,
0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, fink)(wir_r, van, sut, dep, way, cog);
return j2_mcx(Pt6, ut, fink)(van, sut, dep, way, cog);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, fink)(u2_wire wir_r,
j2_mci(Pt6, ut, fink)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun dep, // retain
u2_noun way, // retain
u2_noun cog) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "fink");
u2_weak hoc = u2_cj_look(van, "fink");
if ( u2_none == hoc ) {
c3_assert(!"register fink");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat,
u2_cv_sam_2, u2_rx(wir_r, dep),
u2_cv_sam_6, u2_rx(wir_r, way),
u2_cv_sam_7, u2_rx(wir_r, cog),
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat),
u2_cv_sam_2, u2k(dep),
u2_cv_sam_6, u2k(way),
u2_cv_sam_7, u2k(cog),
0);
if ( (u2_none == j2_mcj(Pt6, ut, fink)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, fink)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, fink)(u2_wire wir_r,
j2_mcy(Pt6, ut, fink)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun dep,
@ -115,58 +115,58 @@
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return j2_mcx(Pt6, ut, fink)(wir_r, van, sut, dep, way, cog);
return j2_mcx(Pt6, ut, fink)(van, sut, dep, way, cog);
}
else {
c3_m fun_m = c3__fink;
u2_noun pro = u2_rl_find_qual(wir_r, fun_m, sut, dep, way, cog);
u2_noun pro = u2_ch_find_4(fun_m, sut, dep, way, cog);
if ( u2_none != pro ) {
return pro;
}
else {
pro = j2_mcx(Pt6, ut, fink)(wir_r, van, sut, dep, way, cog);
pro = j2_mcx(Pt6, ut, fink)(van, sut, dep, way, cog);
return u2_rl_save_qual(wir_r, fun_m, sut, dep, way, cog, pro);
return u2_ch_save_4(fun_m, sut, dep, way, cog, pro);
}
}
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, fink)(wir_r, van, sut, dep, way, cog);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, fink)(van, sut, dep, way, cog);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}
}
u2_weak
j2_mck(Pt6, ut, fink)(u2_wire wir_r,
j2_mck(Pt6, ut, fink)(
u2_noun cor)
{
u2_noun sut, dep, way, cog, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &dep,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &dep,
u2_cv_sam_6, &way,
u2_cv_sam_7, &cog,
u2_cv_con, &van,
0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_none;
} else {
return u2_rq
(wir_r, u2_rx(wir_r, sut),
u2_rx(wir_r, dep),
u2_rx(wir_r, way),
u2_rx(wir_r, cog));
return u2nq
(u2k(sut),
u2k(dep),
u2k(way),
u2k(cog));
}
}

View File

@ -8,37 +8,37 @@
/* logic
*/
static u2_bean
_fire_mull(u2_wire wir_r,
_fire_mull(
u2_noun van,
u2_noun sut,
u2_noun dox,
u2_noun gen)
{
u2_noun rib = u2_frag(j2_ut_van_rib, van);
u2_noun key = u2_bt(wir_r, u2_rx(wir_r, sut),
u2_rx(wir_r, dox),
u2_rx(wir_r, gen));
u2_noun rib = u2_cr_at(j2_ut_van_rib, van);
u2_noun key = u2nt(u2k(sut),
u2k(dox),
u2k(gen));
u2_bean ret;
if ( u2_yes == j2_mcc(Pt4, in, has)(wir_r, rib, key) ) {
if ( u2_yes == j2_mcc(Pt4, in, has)(rib, key) ) {
ret = u2_yes;
}
else {
u2_noun rob = j2_mcc(Pt4, in, put)(wir_r, rib, key);
u2_noun von = u2_bn_molt(wir_r, van,
j2_ut_van_rib, rob,
u2_noun rob = j2_mcc(Pt4, in, put)(rib, key);
u2_noun von = u2_ci_molt(u2k(van),
j2_ut_van_rib, u2k(rob),
0);
ret = j2_mcy(Pt6, ut, mull)(wir_r, von, sut, c3__noun, dox, gen);
ret = j2_mcy(Pt6, ut, mull)(von, sut, c3__noun, dox, gen);
u2_rz(wir_r, von);
u2_rz(wir_r, rob);
u2z(von);
u2z(rob);
}
u2_rz(wir_r, key);
u2z(key);
return ret;
}
static u2_noun
_fire_each(u2_wire wir_r,
_fire_each(
u2_noun van,
u2_noun vet,
u2_noun typ,
@ -47,62 +47,62 @@
u2_noun p_typ, q_typ, pq_typ, qq_typ, rq_typ;
u2_noun h_gat, t_gat;
if ( (u2_no == u2_dust(typ)) || (c3__core != u2_h(typ)) ) {
return u2_bl_error(wir_r, "fire-core");
if ( (u2_no == u2du(typ)) || (c3__core != u2h(typ)) ) {
return u2_cm_error("fire-core");
} else if
( (u2_no == u2_as_cell(u2_t(typ), &p_typ, &q_typ)) ||
(u2_no == u2_as_trel(q_typ, &pq_typ, &qq_typ, &rq_typ)) ||
(u2_no == u2_as_cell(gat, &h_gat, &t_gat)) )
( (u2_no == u2_cr_cell(u2t(typ), &p_typ, &q_typ)) ||
(u2_no == u2_cr_trel(q_typ, &pq_typ, &qq_typ, &rq_typ)) ||
(u2_no == u2_cr_cell(gat, &h_gat, &t_gat)) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
u2_noun dox = u2_bt
(wir_r, c3__core, u2_rx(wir_r, qq_typ), u2_rx(wir_r, q_typ));
u2_noun dox = u2nt
(c3__core, u2k(qq_typ), u2k(q_typ));
if ( c3__ash == u2_h(gat) ) {
if ( c3__ash == u2h(gat) ) {
if ( (u2_yes == vet) &&
(u2_no == j2_mcy(Pt6, ut, nest)
(wir_r, van, qq_typ, u2_yes, p_typ)) )
(van, qq_typ, u2_yes, p_typ)) )
{
#if 0
u2_noun dun = j2_mcy(Pt6, ut, dunq)(wir_r, van, "need", qq_typ);
u2_noun niz = j2_mcy(Pt6, ut, dunq)(wir_r, van, "have", p_typ);
u2_noun dun = j2_mcy(Pt6, ut, dunq)(van, "need", qq_typ);
u2_noun niz = j2_mcy(Pt6, ut, dunq)(van, "have", p_typ);
u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, niz));
u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, dun));
u2_ct_push(u2nc(c3__mean, niz));
u2_ct_push(u2nc(c3__mean, dun));
#endif
return u2_bl_error(wir_r, "fire-dry");
return u2_cm_error("fire-dry");
}
else {
return u2_bc(wir_r, dox, u2_rx(wir_r, t_gat));
return u2nc(dox, u2k(t_gat));
}
}
else {
c3_assert(c3__elm == u2_h(gat));
c3_assert(c3__elm == u2h(gat));
if ( (u2_yes == vet) &&
// (u2_no == u2_sing(p_typ, qq_typ)) &&
(u2_no == _fire_mull(wir_r, van, typ, dox, t_gat)) )
// (u2_no == u2_cr_sing(p_typ, qq_typ)) &&
(u2_no == _fire_mull(van, typ, dox, t_gat)) )
{
#if 0
u2_noun dun = j2_mcy(Pt6, ut, dunq)(wir_r, van, "wild", typ);
u2_noun niz = j2_mcy(Pt6, ut, dunq)(wir_r, van, "tame", dox);
u2_noun dun = j2_mcy(Pt6, ut, dunq)(van, "wild", typ);
u2_noun niz = j2_mcy(Pt6, ut, dunq)(van, "tame", dox);
u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, dun));
u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, niz));
u2_ct_push(u2nc(c3__mean, dun));
u2_ct_push(u2nc(c3__mean, niz));
#endif
return u2_bl_error(wir_r, "fire-wet");
return u2_cm_error("fire-wet");
}
else {
u2_rz(wir_r, dox);
return u2_bc(wir_r, u2_rx(wir_r, typ), u2_rx(wir_r, t_gat));
u2z(dox);
return u2nc(u2k(typ), u2k(t_gat));
}
}
}
}
static u2_noun
_fire_in(u2_wire wir_r,
_fire_in(
u2_noun van,
u2_noun vet,
u2_noun hag)
@ -111,45 +111,45 @@
return u2_nul;
}
else {
u2_noun i_hag = u2_h(hag);
u2_noun t_hag = u2_t(hag);
u2_noun i_hag = u2h(hag);
u2_noun t_hag = u2t(hag);
if ( u2_no == u2_dust(i_hag) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2du(i_hag) ) {
return u2_cm_bail(c3__fail);
} else {
return u2_bc
(wir_r, _fire_each(wir_r, van, vet, u2_h(i_hag), u2_t(i_hag)),
_fire_in(wir_r, van, vet, t_hag));
return u2nc
(_fire_each(van, vet, u2h(i_hag), u2t(i_hag)),
_fire_in(van, vet, t_hag));
}
}
}
u2_noun // produce
j2_mcx(Pt6, ut, fire)(u2_wire wir_r,
j2_mcx(Pt6, ut, fire)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun hag) // retain
{
u2_bean vet = u2_frag(j2_ut_van_vet, van);
u2_bean vet = u2_cr_at(j2_ut_van_vet, van);
{
if ( (u2_yes == u2_dust(hag)) && (u2_nul == u2_t(hag)) ) {
u2_noun i_hag = u2_h(hag);
u2_noun pi_hag = u2_h(i_hag);
u2_noun qi_hag = u2_t(i_hag);
if ( (u2_yes == u2du(hag)) && (u2_nul == u2t(hag)) ) {
u2_noun i_hag = u2h(hag);
u2_noun pi_hag = u2h(i_hag);
u2_noun qi_hag = u2t(i_hag);
if ( c3__elm == u2_h(qi_hag) ) {
u2_noun qqi_hag = u2_t(qi_hag);
if ( c3__elm == u2h(qi_hag) ) {
u2_noun qqi_hag = u2t(qi_hag);
if ( u2_yes == u2_dust(qqi_hag) &&
(u2_nul == u2_h(qqi_hag)) &&
(_1 == u2_t(qqi_hag)) )
if ( u2_yes == u2du(qqi_hag) &&
(u2_nul == u2h(qqi_hag)) &&
(1 == u2t(qqi_hag)) )
{
return u2_rx(wir_r, pi_hag);
return u2k(pi_hag);
}
}
}
}
return u2_bc(wir_r, c3__hold, _fire_in(wir_r, van, vet, hag));
return u2nc(c3__hold, _fire_in(van, vet, hag));
}
/* boilerplate
@ -158,49 +158,49 @@
j2_mcj(Pt6, ut, fire)[];
u2_noun // transfer
j2_mc(Pt6, ut, fire)(u2_wire wir_r,
j2_mc(Pt6, ut, fire)(
u2_noun cor) // retain
{
u2_noun sut, hag, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &hag, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &hag, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, fire)(wir_r, van, sut, hag);
return j2_mcx(Pt6, ut, fire)(van, sut, hag);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, fire)(u2_wire wir_r,
j2_mci(Pt6, ut, fire)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun hag) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "fire");
u2_weak hoc = u2_cj_look(van, "fire");
if ( u2_none == hoc ) {
c3_assert(!"register fire");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam, u2_rx(wir_r, hag), 0);
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam, u2k(hag), 0);
if ( (u2_none == j2_mcj(Pt6, ut, fire)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, fire)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, fire)(u2_wire wir_r,
j2_mcy(Pt6, ut, fire)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun hag) // retain
@ -208,19 +208,19 @@
u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, fire)[0];
if ( jet_j->sat_s == u2_jet_live ) {
return j2_mcx(Pt6, ut, fire)(wir_r, van, sut, hag);
return j2_mcx(Pt6, ut, fire)(van, sut, hag);
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, fire)(wir_r, van, sut, hag);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, fire)(van, sut, hag);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}

View File

@ -8,15 +8,15 @@
/* logic
*/
u2_noun // transfer
j2_mcx(Pt6, ut, firm)(u2_wire wir_r,
j2_mcx(Pt6, ut, firm)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun dib) // retain
{
u2_noun p_sut, q_sut;
if ( u2_no == u2_dust(sut) ) switch ( sut ) {
default: return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2du(sut) ) switch ( sut ) {
default: return u2_cm_bail(c3__fail);
case c3__noun:
{
@ -27,65 +27,65 @@
return u2_no;
}
}
else switch ( u2_h(sut) ) {
default: return u2_bl_bail(wir_r, c3__fail);
else switch ( u2h(sut) ) {
default: return u2_cm_bail(c3__fail);
case c3__atom: p_sut = u2_t(sut);
case c3__atom: p_sut = u2t(sut);
{
return u2_stud(dib);
return u2ud(dib);
}
case c3__bull: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__bull: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_weak nun = u2_frag(u2h(u2t(u2t(p_sut))), dib);
u2_weak nun = u2_cr_at(u2h(u2t(u2t(p_sut))), dib);
if ( u2_none == nun ) {
return u2_no;
} else {
return u2_and(j2_mcx(Pt6, ut, firm)(wir_r, van, q_sut, dib),
j2_mcx(Pt6, ut, firm)(wir_r, van, u2t(u2t(u2t(p_sut))),
return u2_and(j2_mcx(Pt6, ut, firm)(van, q_sut, dib),
j2_mcx(Pt6, ut, firm)(van, u2t(u2t(u2t(p_sut))),
nun));
}
}
case c3__cell: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__cell: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return u2_and
(u2_dust(dib),
u2_and(j2_mcx(Pt6, ut, firm)(wir_r, van, p_sut, u2_h(dib)),
j2_mcx(Pt6, ut, firm)(wir_r, van, q_sut, u2_t(dib))));
(u2du(dib),
u2_and(j2_mcx(Pt6, ut, firm)(van, p_sut, u2h(dib)),
j2_mcx(Pt6, ut, firm)(van, q_sut, u2t(dib))));
}
case c3__core: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__core: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun pq_sut, qq_sut, rq_sut, prq_sut, qrq_sut;
u2_bi_trel(wir_r, q_sut, &pq_sut, &qq_sut, &rq_sut);
u2_bi_cell(wir_r, rq_sut, &prq_sut, &qrq_sut);
u2_cx_trel(q_sut, &pq_sut, &qq_sut, &rq_sut);
u2_cx_cell(rq_sut, &prq_sut, &qrq_sut);
return u2_and
(u2_dust(dib),
(u2du(dib),
u2_and
(j2_mcx(Pt6, ut, firm)(wir_r, van, p_sut, u2_h(dib)),
((u2_nul == prq_sut) ? u2_bl_error(wir_r, "firm-core")
: u2_sing(prq_sut, u2_t(dib)))));
(j2_mcx(Pt6, ut, firm)(van, p_sut, u2h(dib)),
((u2_nul == prq_sut) ? u2_cm_error("firm-core")
: u2_cr_sing(prq_sut, u2t(dib)))));
}
case c3__cube: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__cube: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return u2_sing(dib, p_sut);
return u2_cr_sing(dib, p_sut);
}
case c3__face: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__face: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return j2_mcx(Pt6, ut, firm)(wir_r, van, q_sut, dib);
return j2_mcx(Pt6, ut, firm)(van, q_sut, dib);
}
case c3__fork: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__fork: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return u2_or(j2_mcx(Pt6, ut, firm)(wir_r, van, p_sut, dib),
j2_mcx(Pt6, ut, firm)(wir_r, van, q_sut, dib));
return u2_or(j2_mcx(Pt6, ut, firm)(van, p_sut, dib),
j2_mcx(Pt6, ut, firm)(van, q_sut, dib));
}
case c3__hold:
{
u2_noun goy = j2_mcy(Pt6, ut, repo)(wir_r, van, sut);
u2_noun ret = j2_mcx(Pt6, ut, firm)(wir_r, van, goy, dib);
u2_noun goy = j2_mcy(Pt6, ut, repo)(van, sut);
u2_noun ret = j2_mcx(Pt6, ut, firm)(van, goy, dib);
u2_rz(wir_r, goy);
u2z(goy);
return ret;
}
}
@ -97,49 +97,49 @@
j2_mcj(Pt6, ut, firm)[];
u2_noun // transfer
j2_mc(Pt6, ut, firm)(u2_wire wir_r,
j2_mc(Pt6, ut, firm)(
u2_noun cor) // retain
{
u2_noun sut, dib, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &dib, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &dib, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, firm)(wir_r, van, sut, dib);
return j2_mcx(Pt6, ut, firm)(van, sut, dib);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, firm)(u2_wire wir_r,
j2_mci(Pt6, ut, firm)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun dib) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "firm");
u2_weak hoc = u2_cj_look(van, "firm");
if ( u2_none == hoc ) {
c3_assert(!"register firm");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam, u2_rx(wir_r, dib), 0);
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam, u2k(dib), 0);
if ( (u2_none == j2_mcj(Pt6, ut, firm)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, firm)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, firm)(u2_wire wir_r,
j2_mcy(Pt6, ut, firm)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun dib) // retain
@ -148,50 +148,50 @@
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return j2_mcx(Pt6, ut, firm)(wir_r, van, sut, dib);
return j2_mcx(Pt6, ut, firm)(van, sut, dib);
}
else {
c3_m fun_m = c3__firm;
u2_noun pro = u2_rl_find_cell(wir_r, fun_m, sut, dib);
u2_noun pro = u2_ch_find_2(fun_m, sut, dib);
if ( u2_none != pro ) {
return pro;
}
else {
pro = j2_mcx(Pt6, ut, firm)(wir_r, van, sut, dib);
pro = j2_mcx(Pt6, ut, firm)(van, sut, dib);
return u2_rl_save_cell(wir_r, fun_m, sut, dib, pro);
return u2_ch_save_2(fun_m, sut, dib, pro);
}
}
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, firm)(wir_r, van, sut, dib);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, firm)(van, sut, dib);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}
}
u2_weak
j2_mck(Pt6, ut, firm)(u2_wire wir_r,
j2_mck(Pt6, ut, firm)(
u2_noun cor)
{
u2_noun sut, dib, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &dib, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &dib, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_none;
} else {
return u2_rc(wir_r, u2_rx(wir_r, sut), u2_rx(wir_r, dib));
return u2nc(u2k(sut), u2k(dib));
}
}

View File

@ -8,7 +8,7 @@
/* functions
*/
static u2_noun
_fish_in(u2_wire wir_r,
_fish_in(
u2_noun van,
u2_noun sut,
u2_atom axe,
@ -16,105 +16,105 @@
{
u2_noun p_sut, q_sut;
if ( u2_yes == u2_stud(sut) ) switch ( sut ) {
default: return u2_bl_bail(wir_r, c3__fail);
if ( u2_yes == u2ud(sut) ) switch ( sut ) {
default: return u2_cm_bail(c3__fail);
case c3__noun: {
return u2_bc(wir_r, _1, _0);
return u2nc(1, 0);
}
case c3__void: {
return u2_bc(wir_r, _1, _1);
return u2nc(1, 1);
}
}
else switch ( u2_h(sut) ) {
default: return u2_bl_bail(wir_r, c3__fail);
else switch ( u2h(sut) ) {
default: return u2_cm_bail(c3__fail);
case c3__atom: {
u2_noun ton = u2_bt(wir_r, _3, _0, u2_rx(wir_r, axe));
u2_noun pro = j2_mby(Pt6, flip)(wir_r, ton);
u2_noun ton = u2nt(3, 0, u2k(axe));
u2_noun pro = j2_mby(Pt6, flip)(ton);
u2_rl_lose(wir_r, ton);
u2z(ton);
return pro;
}
case c3__bull: {
return u2_bl_error(wir_r, "bull-fish");
return u2_cm_error("bull-fish");
}
case c3__cell: {
if ( (u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_cm_bail(c3__fail);
} else {
u2_noun hut = u2_bt(wir_r, _3, _0, u2_rx(wir_r, axe));
u2_noun lef = j2_mbc(Pt3, peg)(wir_r, axe, _2);
u2_noun rit = j2_mbc(Pt3, peg)(wir_r, axe, _3);
u2_noun hed = _fish_in(wir_r, van, p_sut, lef, vit);
u2_noun tal = _fish_in(wir_r, van, q_sut, rit, vit);
u2_noun hob = j2_mby(Pt6, flan)(wir_r, hed, tal);
u2_noun vug = j2_mby(Pt6, flan)(wir_r, hut, hob);
u2_noun hut = u2nt(3, 0, u2k(axe));
u2_noun lef = j2_mbc(Pt3, peg)(axe, 2);
u2_noun rit = j2_mbc(Pt3, peg)(axe, 3);
u2_noun hed = _fish_in(van, p_sut, lef, vit);
u2_noun tal = _fish_in(van, q_sut, rit, vit);
u2_noun hob = j2_mby(Pt6, flan)(hed, tal);
u2_noun vug = j2_mby(Pt6, flan)(hut, hob);
u2_rl_lose(wir_r, hob);
u2_rl_lose(wir_r, tal);
u2_rl_lose(wir_r, hed);
u2_rl_lose(wir_r, rit);
u2_rl_lose(wir_r, lef);
u2_rl_lose(wir_r, hut);
u2z(hob);
u2z(tal);
u2z(hed);
u2z(rit);
u2z(lef);
u2z(hut);
return vug;
}
}
case c3__core: {
return u2_bc(wir_r, _0, _0);
return u2nc(0, 0);
}
case c3__cube: {
if ( (u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_cm_bail(c3__fail);
} else {
return u2_bt
(wir_r, _5,
u2_bc(wir_r, _1, u2_rx(wir_r, p_sut)),
u2_bc(wir_r, _0, u2_rx(wir_r, axe)));
return u2nt
(5,
u2nc(1, u2k(p_sut)),
u2nc(0, u2k(axe)));
}
}
case c3__face: {
if ( (u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_cm_bail(c3__fail);
} else {
return _fish_in(wir_r, van, q_sut, axe, vit);
return _fish_in(van, q_sut, axe, vit);
}
}
case c3__fork: {
if ( (u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_cm_bail(c3__fail);
}
else {
u2_noun hed = _fish_in(wir_r, van, p_sut, axe, vit);
u2_noun tal = _fish_in(wir_r, van, q_sut, axe, vit);
u2_noun pro = j2_mby(Pt6, flor)(wir_r, hed, tal);
u2_noun hed = _fish_in(van, p_sut, axe, vit);
u2_noun tal = _fish_in(van, q_sut, axe, vit);
u2_noun pro = j2_mby(Pt6, flor)(hed, tal);
u2_rl_lose(wir_r, hed);
u2_rl_lose(wir_r, tal);
u2z(hed);
u2z(tal);
return pro;
}
}
case c3__hold: {
p_sut = u2_t(sut);
p_sut = u2t(sut);
{
if ( (u2_yes == j2_mcc(Pt4, in, has)(wir_r, vit, sut)) ) {
// u2_noun dun = j2_mcy(Pt6, ut, dunq)(wir_r, van, "type", sut);
if ( (u2_yes == j2_mcc(Pt4, in, has)(vit, sut)) ) {
// u2_noun dun = j2_mcy(Pt6, ut, dunq)(van, "type", sut);
u2_noun niz = j2_mcy(Pt6, ut, shep)
(wir_r, van, "axis", 'd', u2_rx(wir_r, axe));
(van, "axis", 'd', u2k(axe));
// u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, dun));
u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, niz));
// u2_ct_push(u2nc(c3__mean, dun));
u2_ct_push(u2nc(c3__mean, niz));
return u2_bl_error(wir_r, "fish-loop");
return u2_cm_error("fish-loop");
} else {
u2_noun zoc = j2_mcc(Pt4, in, put)(wir_r, vit, sut);
u2_noun fop = j2_mcy(Pt6, ut, rest)(wir_r, van, sut, p_sut);
u2_noun pro = _fish_in(wir_r, van, fop, axe, zoc);
u2_noun zoc = j2_mcc(Pt4, in, put)(vit, sut);
u2_noun fop = j2_mcy(Pt6, ut, rest)(van, sut, p_sut);
u2_noun pro = _fish_in(van, fop, axe, zoc);
u2_rl_lose(wir_r, fop);
u2_rl_lose(wir_r, zoc);
u2z(fop);
u2z(zoc);
return pro;
}
@ -123,12 +123,12 @@
}
}
u2_noun // transfer
j2_mcx(Pt6, ut, fish)(u2_wire wir_r,
j2_mcx(Pt6, ut, fish)(
u2_noun van, // retain
u2_noun sut, // retain
u2_atom axe) // retain
{
return _fish_in(wir_r, van, sut, axe, u2_nul);
return _fish_in(van, sut, axe, u2_nul);
}
@ -138,50 +138,50 @@
j2_mcj(Pt6, ut, fish)[];
u2_noun // transfer
j2_mc(Pt6, ut, fish)(u2_wire wir_r,
j2_mc(Pt6, ut, fish)(
u2_noun cor) // retain
{
u2_noun sut, axe, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &axe, u2_cv_con, &van, 0)) ||
(u2_no == u2_stud(axe)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &axe, u2_cv_con, &van, 0)) ||
(u2_no == u2ud(axe)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, fish)(wir_r, van, sut, axe);
return j2_mcx(Pt6, ut, fish)(van, sut, axe);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, fish)(u2_wire wir_r,
j2_mci(Pt6, ut, fish)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun axe) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "fish");
u2_weak hoc = u2_cj_look(van, "fish");
if ( u2_none == hoc ) {
c3_assert(!"register fish");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam, u2_rx(wir_r, axe), 0);
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam, u2k(axe), 0);
if ( (u2_none == j2_mcj(Pt6, ut, fish)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, fish)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, fish)(u2_wire wir_r,
j2_mcy(Pt6, ut, fish)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun axe) // retain
@ -190,50 +190,50 @@
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return j2_mcx(Pt6, ut, fish)(wir_r, van, sut, axe);
return j2_mcx(Pt6, ut, fish)(van, sut, axe);
}
else {
c3_m fun_m = c3__fish;
u2_noun pro = u2_rl_find_cell(wir_r, fun_m, sut, axe);
u2_noun pro = u2_ch_find_2(fun_m, sut, axe);
if ( u2_none != pro ) {
return pro;
}
else {
pro = j2_mcx(Pt6, ut, fish)(wir_r, van, sut, axe);
pro = j2_mcx(Pt6, ut, fish)(van, sut, axe);
return u2_rl_save_cell(wir_r, fun_m, sut, axe, pro);
return u2_ch_save_2(fun_m, sut, axe, pro);
}
}
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, fish)(wir_r, van, sut, axe);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, fish)(van, sut, axe);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}
}
u2_weak
j2_mck(Pt6, ut, fish)(u2_wire wir_r,
j2_mck(Pt6, ut, fish)(
u2_noun cor)
{
u2_noun sut, axe, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &axe, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &axe, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_none;
} else {
return u2_rc(wir_r, u2_rx(wir_r, sut), u2_rx(wir_r, axe));
return u2nc(u2k(sut), u2k(axe));
}
}

View File

@ -8,34 +8,34 @@
/* logic
*/
static u2_noun
_fuse_in(u2_wire, u2_noun, u2_noun, u2_noun, u2_noun);
_fuse_in(u2_noun, u2_noun, u2_noun, u2_noun);
static u2_noun
_fuse_repo(u2_wire wir_r,
_fuse_repo(
u2_noun van,
u2_noun sut,
u2_noun ref,
u2_noun bix)
{
u2_noun rep = j2_mcy(Pt6, ut, repo)(wir_r, van, sut);
u2_noun ret = _fuse_in(wir_r, van, rep, ref, bix);
u2_noun rep = j2_mcy(Pt6, ut, repo)(van, sut);
u2_noun ret = _fuse_in(van, rep, ref, bix);
if ( u2_yes == u2_sing(ret, rep) ) {
if ( u2_yes == u2_cr_sing(ret, rep) ) {
if ( c3__void == rep ) {
return c3__void;
} else {
u2_rz(wir_r, rep);
u2_rz(wir_r, ret);
return u2_rx(wir_r, sut);
u2z(rep);
u2z(ret);
return u2k(sut);
}
} else {
u2_rz(wir_r, rep);
u2z(rep);
return ret;
}
}
static u2_noun
_fuse_in(u2_wire wir_r,
_fuse_in(
u2_noun van,
u2_noun sut,
u2_noun ref,
@ -43,114 +43,114 @@
{
u2_noun p_sut, q_sut;
if ( u2_yes == u2_sing(sut, ref) || (c3__noun == ref) ) {
return u2_rx(wir_r, sut);
if ( u2_yes == u2_cr_sing(sut, ref) || (c3__noun == ref) ) {
return u2k(sut);
}
if ( u2_no == u2_dust(sut) ) switch ( sut ) {
default: return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2du(sut) ) switch ( sut ) {
default: return u2_cm_bail(c3__fail);
case c3__noun:
{
return u2_rx(wir_r, ref);
return u2k(ref);
}
case c3__void:
{
return c3__void;
}
}
else switch ( u2_h(sut) ) {
default: return u2_bl_bail(wir_r, c3__fail);
else switch ( u2h(sut) ) {
default: return u2_cm_bail(c3__fail);
case c3__atom:
{
if ( u2_yes == u2_dust(ref) ) {
if ( c3__atom == u2_h(ref) ) {
if ( u2_yes == j2_mby(Pt6, fitz)(wir_r, u2_t(ref), u2_t(sut)) ) {
return u2_rx(wir_r, sut);
} else return u2_rx(wir_r, ref);
if ( u2_yes == u2du(ref) ) {
if ( c3__atom == u2h(ref) ) {
if ( u2_yes == j2_mby(Pt6, fitz)(u2t(ref), u2t(sut)) ) {
return u2k(sut);
} else return u2k(ref);
}
else if ( c3__cell == u2_h(ref) ) {
else if ( c3__cell == u2h(ref) ) {
return c3__void;
}
}
return _fuse_in(wir_r, van, ref, sut, bix);
return _fuse_in(van, ref, sut, bix);
}
case c3__bull: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__bull: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun vot = _fuse_in(wir_r, van, q_sut, ref, bix);
u2_noun ret = j2_mby(Pt6, bull)(wir_r, p_sut, vot);
u2_noun vot = _fuse_in(van, q_sut, ref, bix);
u2_noun ret = j2_mby(Pt6, bull)(p_sut, vot);
u2_rl_lose(wir_r, vot);
u2z(vot);
return ret;
}
case c3__cell: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__cell: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun p_ref, q_ref;
if ( u2_yes == u2_as_pq(ref, c3__cell, &p_ref, &q_ref) ) {
u2_noun hed = _fuse_in(wir_r, van, p_sut, p_ref, bix);
u2_noun tal = _fuse_in(wir_r, van, q_sut, q_ref, bix);
u2_noun ret = j2_mby(Pt6, cell)(wir_r, hed, tal);
if ( u2_yes == u2_cr_pq(ref, c3__cell, &p_ref, &q_ref) ) {
u2_noun hed = _fuse_in(van, p_sut, p_ref, bix);
u2_noun tal = _fuse_in(van, q_sut, q_ref, bix);
u2_noun ret = j2_mby(Pt6, cell)(hed, tal);
u2_rl_lose(wir_r, hed);
u2_rl_lose(wir_r, tal);
u2z(hed);
u2z(tal);
return ret;
}
else return _fuse_in(wir_r, van, ref, sut, bix);
else return _fuse_in(van, ref, sut, bix);
}
case c3__core:
{
return _fuse_repo(wir_r, van, sut, ref, bix);
return _fuse_repo(van, sut, ref, bix);
}
case c3__cube: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__cube: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun foz = _fuse_in(wir_r, van, q_sut, ref, bix);
u2_noun foz = _fuse_in(van, q_sut, ref, bix);
u2_noun ret;
if ( u2_no == j2_mcy(Pt6, ut, firm)(wir_r, van, foz, p_sut) ) {
if ( u2_no == j2_mcy(Pt6, ut, firm)(van, foz, p_sut) ) {
ret = c3__void;
} else {
ret = j2_mby(Pt6, cube)(wir_r, p_sut, foz);
ret = j2_mby(Pt6, cube)(p_sut, foz);
}
u2_rz(wir_r, foz);
u2z(foz);
return ret;
}
case c3__face: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__face: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun vot = _fuse_in(wir_r, van, q_sut, ref, bix);
u2_noun ret = j2_mby(Pt6, face)(wir_r, p_sut, vot);
u2_noun vot = _fuse_in(van, q_sut, ref, bix);
u2_noun ret = j2_mby(Pt6, face)(p_sut, vot);
u2_rl_lose(wir_r, vot);
u2z(vot);
return ret;
}
case c3__fork: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__fork: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun dis = _fuse_in(wir_r, van, p_sut, ref, bix);
u2_noun dat = _fuse_in(wir_r, van, q_sut, ref, bix);
u2_noun ret = j2_mby(Pt6, fork)(wir_r, dis, dat);
u2_noun dis = _fuse_in(van, p_sut, ref, bix);
u2_noun dat = _fuse_in(van, q_sut, ref, bix);
u2_noun ret = j2_mby(Pt6, fork)(dis, dat);
u2_rl_lose(wir_r, dis);
u2_rl_lose(wir_r, dat);
u2z(dis);
u2z(dat);
return ret;
}
case c3__hold: p_sut = u2_t(sut);
case c3__hold: p_sut = u2t(sut);
{
u2_noun hud = u2_bc(wir_r, u2_rx(wir_r, sut), u2_rx(wir_r, ref));
u2_noun hud = u2nc(u2k(sut), u2k(ref));
if ( u2_yes == j2_mcc(Pt4, in, has)(wir_r, bix, hud) ) {
// u2_noun dun = j2_mcy(Pt6, ut, dunq)(wir_r, van, "type", sut);
// u2_noun niz = j2_mcy(Pt6, ut, dunq)(wir_r, van, "over", ref);
if ( u2_yes == j2_mcc(Pt4, in, has)(bix, hud) ) {
// u2_noun dun = j2_mcy(Pt6, ut, dunq)(van, "type", sut);
// u2_noun niz = j2_mcy(Pt6, ut, dunq)(van, "over", ref);
// u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, dun));
// u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, niz));
// u2_ct_push(u2nc(c3__mean, dun));
// u2_ct_push(u2nc(c3__mean, niz));
return u2_bl_error(wir_r, "fuse-loop");
return u2_cm_error("fuse-loop");
} else {
u2_noun bux = j2_mcc(Pt4, in, put)(wir_r, bix, hud);
u2_noun ret = _fuse_repo(wir_r, van, sut, ref, bux);
u2_noun bux = j2_mcc(Pt4, in, put)(bix, hud);
u2_noun ret = _fuse_repo(van, sut, ref, bux);
u2_rz(wir_r, hud);
u2_rz(wir_r, bux);
u2z(hud);
u2z(bux);
return ret;
}
}
@ -158,12 +158,12 @@
}
u2_noun // transfer
j2_mcx(Pt6, ut, fuse)(u2_wire wir_r,
j2_mcx(Pt6, ut, fuse)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun ref) // retain
{
return _fuse_in(wir_r, van, sut, ref, u2_nul);
return _fuse_in(van, sut, ref, u2_nul);
}
/* boilerplate
@ -172,49 +172,49 @@
j2_mcj(Pt6, ut, fuse)[];
u2_noun // transfer
j2_mc(Pt6, ut, fuse)(u2_wire wir_r,
j2_mc(Pt6, ut, fuse)(
u2_noun cor) // retain
{
u2_noun sut, ref, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &ref, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &ref, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, fuse)(wir_r, van, sut, ref);
return j2_mcx(Pt6, ut, fuse)(van, sut, ref);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, fuse)(u2_wire wir_r,
j2_mci(Pt6, ut, fuse)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun ref) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "fuse");
u2_weak hoc = u2_cj_look(van, "fuse");
if ( u2_none == hoc ) {
c3_assert(!"register fuse");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam, u2_rx(wir_r, ref), 0);
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam, u2k(ref), 0);
if ( (u2_none == j2_mcj(Pt6, ut, fuse)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, fuse)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, fuse)(u2_wire wir_r,
j2_mcy(Pt6, ut, fuse)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun ref) // retain
@ -223,50 +223,50 @@
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return j2_mcx(Pt6, ut, fuse)(wir_r, van, sut, ref);
return j2_mcx(Pt6, ut, fuse)(van, sut, ref);
}
else {
c3_m fun_m = c3__fuse;
u2_noun pro = u2_rl_find_cell(wir_r, fun_m, sut, ref);
u2_noun pro = u2_ch_find_2(fun_m, sut, ref);
if ( u2_none != pro ) {
return pro;
}
else {
pro = j2_mcx(Pt6, ut, fuse)(wir_r, van, sut, ref);
pro = j2_mcx(Pt6, ut, fuse)(van, sut, ref);
return u2_rl_save_cell(wir_r, fun_m, sut, ref, pro);
return u2_ch_save_2(fun_m, sut, ref, pro);
}
}
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, fuse)(wir_r, van, sut, ref);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, fuse)(van, sut, ref);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}
}
u2_weak
j2_mck(Pt6, ut, fuse)(u2_wire wir_r,
j2_mck(Pt6, ut, fuse)(
u2_noun cor)
{
u2_noun sut, ref, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &ref, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &ref, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_none;
} else {
return u2_rc(wir_r, u2_rx(wir_r, sut), u2_rx(wir_r, ref));
return u2nc(u2k(sut), u2k(ref));
}
}

View File

@ -8,79 +8,79 @@
/* logic
*/
u2_noun
j2_mcx(Pt6, ut, gain)(u2_wire, u2_noun, u2_noun, u2_noun);
j2_mcx(Pt6, ut, gain)(u2_noun, u2_noun, u2_noun);
static u2_noun // produce
_gain_wtpm(u2_wire wir_r,
_gain_wtpm(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun p_gen) // retain
{
if ( u2_no == u2_dust(p_gen) ) {
return u2_rx(wir_r, sut);
if ( u2_no == u2du(p_gen) ) {
return u2k(sut);
}
else {
u2_noun ip_gen = u2_h(p_gen);
u2_noun tp_gen = u2_t(p_gen);
u2_noun lev = j2_mcx(Pt6, ut, gain)(wir_r, van, sut, ip_gen);
u2_noun pro = _gain_wtpm(wir_r, van, lev, tp_gen);
u2_noun ip_gen = u2h(p_gen);
u2_noun tp_gen = u2t(p_gen);
u2_noun lev = j2_mcx(Pt6, ut, gain)(van, sut, ip_gen);
u2_noun pro = _gain_wtpm(van, lev, tp_gen);
u2_rl_lose(wir_r, lev);
u2z(lev);
return pro;
}
}
static u2_noun // produce
_gain_in(u2_wire wir_r,
_gain_in(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun gen) // retain
{
u2_noun p_gen, q_gen;
if ( u2_no == u2_dust(gen) ) {
return u2_rx(wir_r, sut);
} else switch ( u2_h(gen) ) {
default: return u2_rx(wir_r, sut);
if ( u2_no == u2du(gen) ) {
return u2k(sut);
} else switch ( u2h(gen) ) {
default: return u2k(sut);
case c3__wtts: {
if ( u2_no == u2_mean(gen, 6, &p_gen, 7, &q_gen, 0) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_mean(gen, 6, &p_gen, 7, &q_gen, 0) ) {
return u2_cm_bail(c3__fail);
} else {
u2_noun rac = j2_mcy(Pt6, ap, rake)(wir_r, q_gen);
u2_noun hap = j2_mcy(Pt6, ut, play)(wir_r, van, sut, p_gen);
u2_noun guz = j2_mcy(Pt6, ut, seek)(wir_r, van, sut, c3__read, rac);
u2_noun axe = u2_h(guz);
u2_noun rac = j2_mcy(Pt6, ap, rake)(q_gen);
u2_noun hap = j2_mcy(Pt6, ut, play)(van, sut, p_gen);
u2_noun guz = j2_mcy(Pt6, ut, seek)(van, sut, c3__read, rac);
u2_noun axe = u2h(guz);
u2_noun ret = j2_mcy(Pt6, ut, cull)
(wir_r, van, sut, u2_yes, axe, hap);
(van, sut, u2_yes, axe, hap);
u2_rz(wir_r, guz);
u2_rz(wir_r, hap);
u2_rz(wir_r, rac);
u2z(guz);
u2z(hap);
u2z(rac);
return ret;
}
}
case c3__wtpm: {
return _gain_wtpm(wir_r, van, sut, u2_t(gen));
return _gain_wtpm(van, sut, u2t(gen));
}
case c3__zpcb: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
case c3__zpcb: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
{
return j2_mcx(Pt6, ut, gain)(wir_r, van, sut, q_gen);
return j2_mcx(Pt6, ut, gain)(van, sut, q_gen);
}
case c3__zphs: p_gen = u2_t(gen);
case c3__zphs: p_gen = u2t(gen);
{
return j2_mcx(Pt6, ut, gain)(wir_r, van, sut, p_gen);
return j2_mcx(Pt6, ut, gain)(van, sut, p_gen);
}
}
}
u2_noun // transfer
j2_mcx(Pt6, ut, gain)(u2_wire wir_r,
j2_mcx(Pt6, ut, gain)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun gen) // retain
{
return _gain_in(wir_r, van, sut, gen);
return _gain_in(van, sut, gen);
}
/* boilerplate
@ -89,49 +89,49 @@
j2_mcj(Pt6, ut, gain)[];
u2_noun // transfer
j2_mc(Pt6, ut, gain)(u2_wire wir_r,
j2_mc(Pt6, ut, gain)(
u2_noun cor) // retain
{
u2_noun sut, gen, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &gen, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &gen, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, gain)(wir_r, van, sut, gen);
return j2_mcx(Pt6, ut, gain)(van, sut, gen);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, gain)(u2_wire wir_r,
j2_mci(Pt6, ut, gain)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun gen) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "gain");
u2_weak hoc = u2_cj_look(van, "gain");
if ( u2_none == hoc ) {
c3_assert(!"register gain");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam, u2_rx(wir_r, gen), 0);
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam, u2k(gen), 0);
if ( (u2_none == j2_mcj(Pt6, ut, gain)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, gain)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, gain)(u2_wire wir_r,
j2_mcy(Pt6, ut, gain)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun gen) // retain
@ -139,19 +139,19 @@
u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, gain)[0];
if ( jet_j->sat_s == u2_jet_live ) {
return j2_mcx(Pt6, ut, gain)(wir_r, van, sut, gen);
return j2_mcx(Pt6, ut, gain)(van, sut, gen);
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, gain)(wir_r, van, sut, gen);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, gain)(van, sut, gen);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}

View File

@ -9,10 +9,10 @@
/* internals
*/
static u2_noun
_heal_as(u2_wire, u2_noun, u2_noun, u2_noun, u2_atom, u2_noun);
_heal_as(u2_noun, u2_noun, u2_noun, u2_atom, u2_noun);
static u2_noun
_heal_by(u2_wire wir_r,
_heal_by(
u2_noun van,
u2_noun sut,
u2_noun qog,
@ -20,61 +20,61 @@
{
u2_noun p_sut, q_sut;
if ( u2_no == u2_dust(sut) ) {
return u2_bl_error(wir_r, "heal-name");
if ( u2_no == u2du(sut) ) {
return u2_cm_error("heal-name");
}
else switch ( u2_h(sut) ) {
default: return u2_bl_error(wir_r, "heal-name");
else switch ( u2h(sut) ) {
default: return u2_cm_error("heal-name");
case c3__core:
{
return u2_rx(wir_r, ref);
return u2k(ref);
}
case c3__bull: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__bull: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
if ( u2_yes == u2_sing(u2h(p_sut), u2_t(qog)) ) {
return u2_rx(wir_r, ref);
if ( u2_yes == u2_cr_sing(u2h(p_sut), u2t(qog)) ) {
return u2k(ref);
}
else {
u2_noun sub = _heal_by(wir_r, van, q_sut, qog, ref);
u2_noun sub = _heal_by(van, q_sut, qog, ref);
u2_noun ret;
ret = j2_mcy(Pt6, ut, busk)
(wir_r, van, sub, u2h(p_sut), u2h(u2t(p_sut)));
(van, sub, u2h(p_sut), u2h(u2t(p_sut)));
u2z(sub);
return ret;
}
}
case c3__face: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__face: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
if ( u2_yes == u2_sing(p_sut, u2_t(qog)) ) {
return j2_mby(Pt6, face)(wir_r, p_sut, ref);
if ( u2_yes == u2_cr_sing(p_sut, u2t(qog)) ) {
return j2_mby(Pt6, face)(p_sut, ref);
}
else return u2_bl_error(wir_r, "heal-name");
else return u2_cm_error("heal-name");
}
case c3__hold: {
u2_noun rep = j2_mcy(Pt6, ut, repo)(wir_r, van, sut);
u2_noun ret = _heal_by(wir_r, van, rep, qog, ref);
u2_noun rep = j2_mcy(Pt6, ut, repo)(van, sut);
u2_noun ret = _heal_by(van, rep, qog, ref);
u2_rz(wir_r, rep);
u2z(rep);
return ret;
}
case c3__fork: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__fork: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun dis = _heal_by(wir_r, van, p_sut, qog, ref);
u2_noun dat = _heal_by(wir_r, van, q_sut, qog, ref);
u2_noun ret = j2_mby(Pt6, fork)(wir_r, dis, dat);
u2_noun dis = _heal_by(van, p_sut, qog, ref);
u2_noun dat = _heal_by(van, q_sut, qog, ref);
u2_noun ret = j2_mby(Pt6, fork)(dis, dat);
u2_rl_lose(wir_r, dis);
u2_rl_lose(wir_r, dat);
u2z(dis);
u2z(dat);
return ret;
}
}
}
static u2_noun
_heal_to(u2_wire wir_r,
_heal_to(
u2_noun van,
u2_noun sut,
u2_noun gil,
@ -85,82 +85,82 @@
{
u2_noun p_sut, q_sut;
if ( u2_no == u2_dust(sut) ) {
if ( u2_no == u2du(sut) ) {
goto repo;
}
else switch ( u2_h(sut) ) {
else switch ( u2h(sut) ) {
default: goto repo;
case c3__atom: return c3__void;
case c3__bull: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__bull: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun sub = _heal_to(wir_r, van, q_sut, gil, qog, ref, now, lat);
u2_noun sub = _heal_to(van, q_sut, gil, qog, ref, now, lat);
u2_noun ret;
ret = j2_mcy(Pt6, ut, busk)
(wir_r, van, sub, u2h(p_sut), u2h(u2t(p_sut)));
(van, sub, u2h(p_sut), u2h(u2t(p_sut)));
u2z(sub);
return ret;
}
case c3__cell: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__cell: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun ter, ret;
if ( _2 == now ) {
ter = _heal_as(wir_r, van, p_sut, qog, lat, ref);
ret = j2_mby(Pt6, cell)(wir_r, ter, q_sut);
if ( 2 == now ) {
ter = _heal_as(van, p_sut, qog, lat, ref);
ret = j2_mby(Pt6, cell)(ter, q_sut);
} else {
ter = _heal_as(wir_r, van, q_sut, qog, lat, ref);
ret = j2_mby(Pt6, cell)(wir_r, p_sut, ter);
ter = _heal_as(van, q_sut, qog, lat, ref);
ret = j2_mby(Pt6, cell)(p_sut, ter);
}
u2_rz(wir_r, ter);
u2z(ter);
return ret;
}
case c3__core: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__core: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
if ( _3 != now ) {
return u2_bl_error(wir_r, "heal-core");
if ( 3 != now ) {
return u2_cm_error("heal-core");
} else {
u2_noun ter = _heal_as(wir_r, van, p_sut, qog, lat, ref);
u2_noun ret = j2_mby(Pt6, core)(wir_r, ter, q_sut);
u2_noun ter = _heal_as(van, p_sut, qog, lat, ref);
u2_noun ret = j2_mby(Pt6, core)(ter, q_sut);
u2_rz(wir_r, ter);
u2z(ter);
return ret;
}
}
case c3__face: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__face: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun dun = _heal_to(wir_r, van, q_sut, gil, qog, ref, now, lat);
u2_noun ret = j2_mby(Pt6, face)(wir_r, p_sut, dun);
u2_noun dun = _heal_to(van, q_sut, gil, qog, ref, now, lat);
u2_noun ret = j2_mby(Pt6, face)(p_sut, dun);
u2_rl_lose(wir_r, dun);
u2z(dun);
return ret;
}
case c3__fork: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__fork: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun dis = _heal_to(wir_r, van, p_sut, gil, qog, ref, now, lat);
u2_noun dat = _heal_to(wir_r, van, q_sut, gil, qog, ref, now, lat);
u2_noun ret = j2_mby(Pt6, fork)(wir_r, dis, dat);
u2_noun dis = _heal_to(van, p_sut, gil, qog, ref, now, lat);
u2_noun dat = _heal_to(van, q_sut, gil, qog, ref, now, lat);
u2_noun ret = j2_mby(Pt6, fork)(dis, dat);
u2_rl_lose(wir_r, dis);
u2_rl_lose(wir_r, dat);
u2z(dis);
u2z(dat);
return ret;
}
case c3__hold: {
if ( (u2_yes == j2_mcc(Pt4, in, has)(wir_r, gil, sut)) ) {
if ( (u2_yes == j2_mcc(Pt4, in, has)(gil, sut)) ) {
return c3__void;
}
else {
u2_noun zoc = j2_mcc(Pt4, in, put)(wir_r, gil, sut);
u2_type rep = j2_mcy(Pt6, ut, repo)(wir_r, van, sut);
u2_noun ret = _heal_to(wir_r, van, rep, zoc, qog, ref, now, lat);
u2_noun zoc = j2_mcc(Pt4, in, put)(gil, sut);
u2_noun rep = j2_mcy(Pt6, ut, repo)(van, sut);
u2_noun ret = _heal_to(van, rep, zoc, qog, ref, now, lat);
u2_rl_lose(wir_r, rep);
u2_rl_lose(wir_r, zoc);
u2z(rep);
u2z(zoc);
return ret;
}
@ -168,33 +168,33 @@
}
repo: {
u2_noun rep = j2_mcy(Pt6, ut, repo)(wir_r, van, sut);
u2_noun ret = _heal_to(wir_r, van, rep, gil, qog, ref, now, lat);
u2_noun rep = j2_mcy(Pt6, ut, repo)(van, sut);
u2_noun ret = _heal_to(van, rep, gil, qog, ref, now, lat);
u2_rz(wir_r, rep);
u2z(rep);
return ret;
}
}
static u2_noun
_heal_as(u2_wire wir_r,
_heal_as(
u2_noun van,
u2_noun sut,
u2_noun qog,
u2_atom axe,
u2_noun ref)
{
if ( _1 == axe ) {
if ( 1 == axe ) {
if ( u2_nul == qog ) {
return u2_rx(wir_r, ref);
} else return _heal_by(wir_r, van, sut, qog, ref);
return u2k(ref);
} else return _heal_by(van, sut, qog, ref);
}
else {
u2_atom now = j2_mbc(Pt3, cap)(wir_r, axe);
u2_atom lat = j2_mbc(Pt3, mas)(wir_r, axe);
u2_noun ret = _heal_to(wir_r, van, sut, u2_nul, qog, ref, now, lat);
u2_atom now = j2_mbc(Pt3, cap)(axe);
u2_atom lat = j2_mbc(Pt3, mas)(axe);
u2_noun ret = _heal_to(van, sut, u2_nul, qog, ref, now, lat);
u2_rz(wir_r, lat);
u2z(lat);
return ret;
}
}
@ -202,14 +202,14 @@
/* functions
*/
u2_noun // transfer
j2_mcx(Pt6, ut, heal)(u2_wire wir_r,
j2_mcx(Pt6, ut, heal)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun qog, // retain
u2_noun axe, // retain
u2_noun ref) // retain
{
return _heal_as(wir_r, van, sut, qog, axe, ref);
return _heal_as(van, sut, qog, axe, ref);
}
/* boilerplate
@ -218,59 +218,59 @@
j2_mcj(Pt6, ut, heal)[];
u2_noun // transfer
j2_mc(Pt6, ut, heal)(u2_wire wir_r,
j2_mc(Pt6, ut, heal)(
u2_noun cor) // retain
{
u2_noun van, sut, qog, axe, ref;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &qog,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &qog,
u2_cv_sam_6, &axe,
u2_cv_sam_7, &ref,
u2_cv_con, &van,
0)) ||
(u2_no == u2_stud(axe)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_no == u2ud(axe)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, heal)(wir_r, van, sut, qog, axe, ref);
return j2_mcx(Pt6, ut, heal)(van, sut, qog, axe, ref);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, heal)(u2_wire wir_r,
j2_mci(Pt6, ut, heal)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun qog, // retain
u2_noun axe, // retain
u2_noun ref) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "heal");
u2_weak hoc = u2_cj_look(van, "heal");
if ( u2_none == hoc ) {
c3_assert(!"register heal");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam_2, u2_rx(wir_r, qog),
u2_cv_sam_6, u2_rx(wir_r, axe),
u2_cv_sam_7, u2_rx(wir_r, ref),
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam_2, u2k(qog),
u2_cv_sam_6, u2k(axe),
u2_cv_sam_7, u2k(ref),
0);
if ( (u2_none == j2_mcj(Pt6, ut, heal)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, heal)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, heal)(u2_wire wir_r,
j2_mcy(Pt6, ut, heal)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun qog, // retain
@ -281,58 +281,58 @@
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return j2_mcx(Pt6, ut, heal)(wir_r, van, sut, qog, axe, ref);
return j2_mcx(Pt6, ut, heal)(van, sut, qog, axe, ref);
}
else {
c3_m fun_m = c3__heal;
u2_noun pro = u2_rl_find_qual(wir_r, fun_m, sut, qog, axe, ref);
u2_noun pro = u2_ch_find_4(fun_m, sut, qog, axe, ref);
if ( u2_none != pro ) {
return pro;
}
else {
pro = j2_mcx(Pt6, ut, heal)(wir_r, van, sut, qog, axe, ref);
pro = j2_mcx(Pt6, ut, heal)(van, sut, qog, axe, ref);
return u2_rl_save_qual(wir_r, fun_m, sut, qog, axe, ref, pro);
return u2_ch_save_4(fun_m, sut, qog, axe, ref, pro);
}
}
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, heal)(wir_r, van, sut, qog, axe, ref);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, heal)(van, sut, qog, axe, ref);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}
}
u2_weak
j2_mck(Pt6, ut, heal)(u2_wire wir_r,
j2_mck(Pt6, ut, heal)(
u2_noun cor)
{
u2_noun sut, qog, axe, ref, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &qog,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &qog,
u2_cv_sam_6, &axe,
u2_cv_sam_7, &ref,
u2_cv_con, &van,
0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_none;
} else {
return u2_rq
(wir_r, u2_rx(wir_r, qog),
u2_rx(wir_r, sut),
u2_rx(wir_r, axe),
u2_rx(wir_r, ref));
return u2nq
(u2k(qog),
u2k(sut),
u2k(axe),
u2k(ref));
}
}

View File

@ -8,79 +8,79 @@
/* logic
*/
u2_noun
j2_mcx(Pt6, ut, lose)(u2_wire, u2_noun, u2_noun, u2_noun);
j2_mcx(Pt6, ut, lose)(u2_noun, u2_noun, u2_noun);
static u2_noun // produce
_lose_wtbr(u2_wire wir_r,
_lose_wtbr(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun p_gen) // retain
{
if ( u2_no == u2_dust(p_gen) ) {
return u2_rx(wir_r, sut);
if ( u2_no == u2du(p_gen) ) {
return u2k(sut);
}
else {
u2_noun ip_gen = u2_h(p_gen);
u2_noun tp_gen = u2_t(p_gen);
u2_noun lev = j2_mcx(Pt6, ut, lose)(wir_r, van, sut, ip_gen);
u2_noun pro = _lose_wtbr(wir_r, van, lev, tp_gen);
u2_noun ip_gen = u2h(p_gen);
u2_noun tp_gen = u2t(p_gen);
u2_noun lev = j2_mcx(Pt6, ut, lose)(van, sut, ip_gen);
u2_noun pro = _lose_wtbr(van, lev, tp_gen);
u2_rl_lose(wir_r, lev);
u2z(lev);
return pro;
}
}
static u2_noun // produce
_lose_in(u2_wire wir_r,
_lose_in(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun gen) // retain
{
u2_noun p_gen, q_gen;
if ( u2_no == u2_dust(gen) ) {
return u2_rx(wir_r, sut);
} else switch ( u2_h(gen) ) {
default: return u2_rx(wir_r, sut);
if ( u2_no == u2du(gen) ) {
return u2k(sut);
} else switch ( u2h(gen) ) {
default: return u2k(sut);
case c3__wtts: {
if ( u2_no == u2_mean(gen, 6, &p_gen, 7, &q_gen, 0) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_mean(gen, 6, &p_gen, 7, &q_gen, 0) ) {
return u2_cm_bail(c3__fail);
} else {
u2_noun rac = j2_mcy(Pt6, ap, rake)(wir_r, q_gen);
u2_noun hap = j2_mcy(Pt6, ut, play)(wir_r, van, sut, p_gen);
u2_noun guz = j2_mcy(Pt6, ut, seek)(wir_r, van, sut, c3__read, rac);
u2_noun axe = u2_h(guz);
u2_noun rac = j2_mcy(Pt6, ap, rake)(q_gen);
u2_noun hap = j2_mcy(Pt6, ut, play)(van, sut, p_gen);
u2_noun guz = j2_mcy(Pt6, ut, seek)(van, sut, c3__read, rac);
u2_noun axe = u2h(guz);
u2_noun ret = j2_mcy(Pt6, ut, cull)
(wir_r, van, sut, u2_no, axe, hap);
(van, sut, u2_no, axe, hap);
u2_rz(wir_r, guz);
u2_rz(wir_r, hap);
u2_rz(wir_r, rac);
u2z(guz);
u2z(hap);
u2z(rac);
return ret;
}
}
case c3__wtbr: {
return _lose_wtbr(wir_r, van, sut, u2_t(gen));
return _lose_wtbr(van, sut, u2t(gen));
}
case c3__zpcb: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
case c3__zpcb: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
{
return j2_mcx(Pt6, ut, lose)(wir_r, van, sut, q_gen);
return j2_mcx(Pt6, ut, lose)(van, sut, q_gen);
}
case c3__zphs: p_gen = u2_t(gen);
case c3__zphs: p_gen = u2t(gen);
{
return j2_mcx(Pt6, ut, lose)(wir_r, van, sut, p_gen);
return j2_mcx(Pt6, ut, lose)(van, sut, p_gen);
}
}
}
u2_noun // transfer
j2_mcx(Pt6, ut, lose)(u2_wire wir_r,
j2_mcx(Pt6, ut, lose)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun gen) // retain
{
return _lose_in(wir_r, van, sut, gen);
return _lose_in(van, sut, gen);
}
/* boilerplate
@ -89,49 +89,49 @@
j2_mcj(Pt6, ut, lose)[];
u2_noun // transfer
j2_mc(Pt6, ut, lose)(u2_wire wir_r,
j2_mc(Pt6, ut, lose)(
u2_noun cor) // retain
{
u2_noun sut, gen, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &gen, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &gen, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, lose)(wir_r, van, sut, gen);
return j2_mcx(Pt6, ut, lose)(van, sut, gen);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, lose)(u2_wire wir_r,
j2_mci(Pt6, ut, lose)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun gen) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "lose");
u2_weak hoc = u2_cj_look(van, "lose");
if ( u2_none == hoc ) {
c3_assert(!"register lose");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam, u2_rx(wir_r, gen), 0);
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam, u2k(gen), 0);
if ( (u2_none == j2_mcj(Pt6, ut, lose)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, lose)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, lose)(u2_wire wir_r,
j2_mcy(Pt6, ut, lose)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun gen) // retain
@ -139,19 +139,19 @@
u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, lose)[0];
if ( jet_j->sat_s == u2_jet_live ) {
return j2_mcx(Pt6, ut, lose)(wir_r, van, sut, gen);
return j2_mcx(Pt6, ut, lose)(van, sut, gen);
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, lose)(wir_r, van, sut, gen);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, lose)(van, sut, gen);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}

File diff suppressed because it is too large Load Diff

View File

@ -8,10 +8,10 @@
/* logic
*/
extern u2_ho_jet j2_mbj(Pt6, ut)[];
static u2_bean _moot_in(u2_wire, u2_noun, u2_noun, u2_noun);
static u2_bean _moot_in(u2_noun, u2_noun, u2_noun);
static u2_bean
_moot_to(u2_wire wir_r,
_moot_to(
u2_noun van,
u2_noun sut,
u2_noun gil)
@ -19,33 +19,33 @@
u2_ho_jet *jet_j = &j2_mbj(Pt6, ut)[1]; // total hack
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return _moot_in(wir_r, van, sut, gil);
return _moot_in(van, sut, gil);
}
else {
c3_m fun_m = c3__moot;
u2_noun pro = u2_rl_find(wir_r, fun_m, sut);
u2_noun pro = u2_ch_find(fun_m, sut);
if ( u2_none != pro ) {
return pro;
}
else {
pro = _moot_in(wir_r, van, sut, gil);
pro = _moot_in(van, sut, gil);
return u2_rl_save(wir_r, fun_m, sut, pro);
return u2_ch_save(fun_m, sut, pro);
}
}
}
static u2_bean
_moot_in(u2_wire wir_r,
_moot_in(
u2_noun van,
u2_noun sut,
u2_noun gil)
{
u2_noun p_sut, q_sut;
if ( u2_no == u2_dust(sut) ) switch ( sut ) {
default: return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2du(sut) ) switch ( sut ) {
default: return u2_cm_bail(c3__fail);
case c3__noun: {
return u2_no;
@ -53,51 +53,51 @@
case c3__void: {
return u2_yes;
}
} else switch ( u2_h(sut) ) {
default: return u2_bl_bail(wir_r, c3__fail);
} else switch ( u2h(sut) ) {
default: return u2_cm_bail(c3__fail);
case c3__atom: p_sut = u2_t(sut);
case c3__atom: p_sut = u2t(sut);
{
return u2_no;
}
case c3__bull: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__bull: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return _moot_to(wir_r, van, q_sut, gil);
return _moot_to(van, q_sut, gil);
}
case c3__cell: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__cell: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return u2_or(_moot_to(wir_r, van, p_sut, gil),
_moot_to(wir_r, van, q_sut, gil));
return u2_or(_moot_to(van, p_sut, gil),
_moot_to(van, q_sut, gil));
}
case c3__core: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__core: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return _moot_to(wir_r, van, p_sut, gil);
return _moot_to(van, p_sut, gil);
}
case c3__cube: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__cube: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return u2_no;
}
case c3__face: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__face: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return _moot_to(wir_r, van, q_sut, gil);
return _moot_to(van, q_sut, gil);
}
case c3__fork: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__fork: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return u2_and(_moot_to(wir_r, van, p_sut, gil),
_moot_to(wir_r, van, q_sut, gil));
return u2_and(_moot_to(van, p_sut, gil),
_moot_to(van, q_sut, gil));
}
case c3__hold: p_sut = u2_t(sut);
case c3__hold: p_sut = u2t(sut);
{
if ( (u2_yes == j2_mcc(Pt4, in, has)(wir_r, gil, sut)) ) {
if ( (u2_yes == j2_mcc(Pt4, in, has)(gil, sut)) ) {
return u2_yes;
}
else {
u2_noun zoc = j2_mcc(Pt4, in, put)(wir_r, gil, sut);
u2_type fop = j2_mcy(Pt6, ut, rest)(wir_r, van, sut, p_sut);
u2_noun ret = _moot_to(wir_r, van, fop, zoc);
u2_noun zoc = j2_mcc(Pt4, in, put)(gil, sut);
u2_noun fop = j2_mcy(Pt6, ut, rest)(van, sut, p_sut);
u2_noun ret = _moot_to(van, fop, zoc);
u2_rl_lose(wir_r, fop);
u2_rl_lose(wir_r, zoc);
u2z(fop);
u2z(zoc);
return ret;
}
@ -110,36 +110,36 @@
j2_mbj(Pt6, ut)[];
u2_noun // transfer
j2_mcy(Pt6, ut, moot)(u2_wire wir_r,
j2_mcy(Pt6, ut, moot)(
u2_noun van, // retain
u2_noun sut) // retain
{
return _moot_to(wir_r, van, sut, u2_nul);
return _moot_to(van, sut, u2_nul);
}
u2_noun // transfer
j2_mc(Pt6, ut, moot)(u2_wire wir_r,
j2_mc(Pt6, ut, moot)(
u2_noun cor) // retain
{
u2_noun sut;
if ( u2_none == (sut = u2_frag(u2_cv_sam, cor)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_none == (sut = u2_cr_at(u2_cv_sam, cor)) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mcy(Pt6, ut, moot)(wir_r, cor, sut);
return j2_mcy(Pt6, ut, moot)(cor, sut);
}
}
u2_weak
j2_mck(Pt6, ut, moot)(u2_wire wir_r,
j2_mck(Pt6, ut, moot)(
u2_noun cor)
{
u2_noun sut;
if ( (u2_none == (sut = u2_frag(u2_cv_sam, cor))) ) {
if ( (u2_none == (sut = u2_cr_at(u2_cv_sam, cor))) ) {
return u2_none;
} else {
return u2_rx(wir_r, sut);
return u2k(sut);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -10,15 +10,15 @@
/* forward
*/
static u2_bean
_nest_sint(u2_wire, u2_noun, u2_noun, u2_bean, u2_noun, u2_noun);
_nest_sint(u2_noun, u2_noun, u2_bean, u2_noun, u2_noun);
static u2_bean
_nest_dext(u2_wire, u2_noun, u2_noun, u2_bean, u2_noun, u2_noun);
_nest_dext(u2_noun, u2_noun, u2_bean, u2_noun, u2_noun);
u2_ho_jet
j2_mcj(Pt6, ut, nest)[];
static u2_bean
_nest_cram(u2_wire wir_r,
_nest_cram(
u2_noun van,
u2_noun sut,
u2_bean tel,
@ -28,7 +28,7 @@
u2_noun gil)
{
if ( u2_nul == dab ) {
return u2_sing(u2_nul, hem);
return u2_cr_sing(u2_nul, hem);
} else if ( u2_nul == hem ) {
return u2_no;
} else {
@ -36,43 +36,43 @@
u2_noun n_hem, l_hem, r_hem;
u2_noun pn_hem, qn_hem, pn_dab, qn_dab;
u2_bi_trel(wir_r, dab, &n_dab, &l_dab, &r_dab);
u2_bi_trel(wir_r, hem, &n_hem, &l_hem, &r_hem);
u2_cx_trel(dab, &n_dab, &l_dab, &r_dab);
u2_cx_trel(hem, &n_hem, &l_hem, &r_hem);
if ( (u2_no == _nest_cram
(wir_r, van, sut, tel, ref, l_dab, l_hem, gil)) ||
(van, sut, tel, ref, l_dab, l_hem, gil)) ||
(u2_no == _nest_cram
(wir_r, van, sut, tel, ref, r_dab, r_hem, gil)) ) {
(van, sut, tel, ref, r_dab, r_hem, gil)) ) {
return u2_no;
}
u2_bi_cell(wir_r, n_dab, &pn_dab, &qn_dab);
u2_bi_cell(wir_r, n_hem, &pn_hem, &qn_hem);
u2_cx_cell(n_dab, &pn_dab, &qn_dab);
u2_cx_cell(n_hem, &pn_hem, &qn_hem);
if ( u2_no == u2_sing(pn_dab, pn_hem) ) {
if ( u2_no == u2_cr_sing(pn_dab, pn_hem) ) {
return u2_no;
} else {
if ( (u2_no == u2_dust(qn_dab)) || (u2_no == u2_dust(qn_hem)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2du(qn_dab)) || (u2_no == u2du(qn_hem)) ) {
return u2_cm_bail(c3__fail);
}
else switch ( u2_h(qn_dab) ) {
default: return u2_bl_bail(wir_r, c3__exit);
else switch ( u2h(qn_dab) ) {
default: return u2_cm_bail(c3__exit);
case c3__ash: {
if ( c3__ash != u2_h(qn_hem) ) {
if ( c3__ash != u2h(qn_hem) ) {
return u2_no;
} else {
u2_noun pqn_dab = u2_t(qn_dab);
u2_noun pqn_hem = u2_t(qn_hem);
u2_noun vis = j2_mcy(Pt6, ut, play)(wir_r, van, sut, pqn_dab);
u2_noun lon = j2_mcy(Pt6, ut, play)(wir_r, van, ref, pqn_hem);
u2_bean ret = _nest_dext(wir_r, van, vis, tel, lon, gil);
u2_noun pqn_dab = u2t(qn_dab);
u2_noun pqn_hem = u2t(qn_hem);
u2_noun vis = j2_mcy(Pt6, ut, play)(van, sut, pqn_dab);
u2_noun lon = j2_mcy(Pt6, ut, play)(van, ref, pqn_hem);
u2_bean ret = _nest_dext(van, vis, tel, lon, gil);
u2_rz(wir_r, vis);
u2_rz(wir_r, lon);
u2z(vis);
u2z(lon);
return ret;
}
}
case c3__elm: {
return u2_sing(qn_dab, qn_hem);
return u2_cr_sing(qn_dab, qn_hem);
}
}
}
@ -80,7 +80,7 @@
}
static u2_bean
_nest_cong(u2_wire wir_r,
_nest_cong(
u2_noun van,
u2_noun sut,
u2_bean tel,
@ -93,21 +93,21 @@
u2_noun prq_sut, qrq_sut, prq_ref, qrq_ref;
u2_bean ret;
u2_bi_trel(wir_r, sut, 0, &p_sut, &q_sut);
u2_bi_trel(wir_r, ref, 0, &p_ref, &q_ref);
u2_cx_trel(sut, 0, &p_sut, &q_sut);
u2_cx_trel(ref, 0, &p_ref, &q_ref);
u2_bi_trel(wir_r, q_sut, &pq_sut, &qq_sut, &rq_sut);
u2_bi_trel(wir_r, q_ref, &pq_ref, &qq_ref, &rq_ref);
u2_cx_trel(q_sut, &pq_sut, &qq_sut, &rq_sut);
u2_cx_trel(q_ref, &pq_ref, &qq_ref, &rq_ref);
u2_bi_cell(wir_r, rq_sut, &prq_sut, &qrq_sut);
u2_bi_cell(wir_r, rq_ref, &prq_ref, &qrq_ref);
u2_cx_cell(rq_sut, &prq_sut, &qrq_sut);
u2_cx_cell(rq_ref, &prq_ref, &qrq_ref);
if ( u2_yes == u2_sing(q_sut, q_ref) ) {
return _nest_dext(wir_r, van, p_sut, tel, p_ref, gil);
if ( u2_yes == u2_cr_sing(q_sut, q_ref) ) {
return _nest_dext(van, p_sut, tel, p_ref, gil);
}
else if ( (u2_no == _nest_dext(wir_r, van, qq_sut, tel, p_sut, gil)) ||
(u2_no == _nest_dext(wir_r, van, p_sut, tel, qq_sut, gil)) ||
(u2_no == _nest_dext(wir_r, van, qq_ref, tel, p_ref, gil)) )
else if ( (u2_no == _nest_dext(van, qq_sut, tel, p_sut, gil)) ||
(u2_no == _nest_dext(van, p_sut, tel, qq_sut, gil)) ||
(u2_no == _nest_dext(van, qq_ref, tel, p_ref, gil)) )
{
return u2_no;
}
@ -116,49 +116,49 @@
return u2_no;
}
else {
u2_noun hud = u2_bc(wir_r, u2_rx(wir_r, sut), u2_rx(wir_r, ref));
u2_noun hud = u2nc(u2k(sut), u2k(ref));
if ( (u2_yes == j2_mcc(Pt4, in, has)(wir_r, gil, hud)) ) {
u2_rl_lose(wir_r, hud);
if ( (u2_yes == j2_mcc(Pt4, in, has)(gil, hud)) ) {
u2z(hud);
return u2_yes;
}
else {
u2_noun zoc = j2_mcc(Pt4, in, put)(wir_r, gil, hud);
u2_noun tus = u2_bt(wir_r, c3__core,
u2_rx(wir_r, qq_sut),
u2_rx(wir_r, q_sut));
u2_noun fer = u2_bt(wir_r, c3__core,
u2_rx(wir_r, qq_ref),
u2_rx(wir_r, q_ref));
u2_noun zoc = j2_mcc(Pt4, in, put)(gil, hud);
u2_noun tus = u2nt(c3__core,
u2k(qq_sut),
u2k(q_sut));
u2_noun fer = u2nt(c3__core,
u2k(qq_ref),
u2k(q_ref));
ret = _nest_cram(wir_r, van, tus, tel, fer, qrq_sut, qrq_ref, zoc);
u2_rz(wir_r, fer);
u2_rz(wir_r, tus);
u2_rz(wir_r, zoc);
u2_rz(wir_r, hud);
ret = _nest_cram(van, tus, tel, fer, qrq_sut, qrq_ref, zoc);
u2z(fer);
u2z(tus);
u2z(zoc);
u2z(hud);
if ( u2_no == ret ) {
return u2_no;
}
else {
switch ( pq_sut ) {
default: return u2_bl_bail(wir_r, c3__fail);
default: return u2_cm_bail(c3__fail);
case c3__gold: {
return
u2_and(_nest_dext(wir_r, van, qq_sut, tel, qq_ref, gil),
_nest_dext(wir_r, van, qq_ref, tel, qq_sut, gil));
u2_and(_nest_dext(van, qq_sut, tel, qq_ref, gil),
_nest_dext(van, qq_ref, tel, qq_sut, gil));
}
case c3__iron: {
u2_noun s_sam = j2_mcy(Pt6, ut, peek)
(wir_r, van, qq_sut, c3__rite, _2);
(van, qq_sut, c3__rite, 2);
u2_noun r_sam = j2_mcy(Pt6, ut, peek)
(wir_r, van, qq_ref, c3__rite, _2);
u2_bean ret = _nest_dext(wir_r, van, r_sam, tel, s_sam, gil);
(van, qq_ref, c3__rite, 2);
u2_bean ret = _nest_dext(van, r_sam, tel, s_sam, gil);
u2_rz(wir_r, r_sam);
u2_rz(wir_r, s_sam);
u2z(r_sam);
u2z(s_sam);
return ret;
}
case c3__lead: {
@ -166,13 +166,13 @@
}
case c3__zinc: {
u2_noun s_pal = j2_mcy(Pt6, ut, peek)
(wir_r, van, qq_sut, c3__read, _2);
(van, qq_sut, c3__read, 2);
u2_noun r_pal = j2_mcy(Pt6, ut, peek)
(wir_r, van, qq_ref, c3__read, _2);
u2_bean ret = _nest_dext(wir_r, van, s_pal, tel, r_pal, gil);
(van, qq_ref, c3__read, 2);
u2_bean ret = _nest_dext(van, s_pal, tel, r_pal, gil);
u2_rz(wir_r, r_pal);
u2_rz(wir_r, s_pal);
u2z(r_pal);
u2z(s_pal);
return ret;
}
@ -184,7 +184,7 @@
}
static u2_bean
_nest_dext_in(u2_wire wir_r,
_nest_dext_in(
u2_noun van,
u2_noun sut,
u2_bean tel,
@ -193,88 +193,88 @@
{
u2_noun p_sut, q_sut, p_ref, q_ref;
if ( (u2_no == u2_dust(sut)) ) switch ( sut ) {
default: return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2du(sut)) ) switch ( sut ) {
default: return u2_cm_bail(c3__fail);
case c3__noun: {
return u2_yes;
}
case c3__void: {
return _nest_sint(wir_r, van, sut, tel, ref, gil);
return _nest_sint(van, sut, tel, ref, gil);
}
}
else switch ( u2_h(sut) ) {
default: return u2_bl_bail(wir_r, c3__fail);
else switch ( u2h(sut) ) {
default: return u2_cm_bail(c3__fail);
case c3__atom: {
if ( (u2_yes == u2_dust(ref)) && (c3__atom == u2_h(ref)) ) {
if ( u2_no == j2_mby(Pt6, fitz)(wir_r, u2_t(sut), u2_t(ref)) ) {
// u2_err(wir_r, "fitz: need", u2_t(sut));
// u2_err(wir_r, "fitz: have", u2_t(ref));
if ( (u2_yes == u2du(ref)) && (c3__atom == u2h(ref)) ) {
if ( u2_no == j2_mby(Pt6, fitz)(u2t(sut), u2t(ref)) ) {
// u2_err("fitz: need", u2t(sut));
// u2_err("fitz: have", u2t(ref));
return u2_no;
}
return u2_yes;
}
else return _nest_sint(wir_r, van, sut, tel, ref, gil);
else return _nest_sint(van, sut, tel, ref, gil);
}
case c3__bull: {
if ( (u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_cm_bail(c3__fail);
} else {
return _nest_dext(wir_r, van, q_sut, tel, ref, gil);
return _nest_dext(van, q_sut, tel, ref, gil);
}
}
case c3__cell: {
if ( (u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_cm_bail(c3__fail);
} else {
if ( u2_yes == u2_as_pq(ref, c3__cell, &p_ref, &q_ref) ) {
return u2_and(_nest_dext(wir_r, van, p_sut, tel, p_ref, gil),
_nest_dext(wir_r, van, q_sut, tel, q_ref, gil));
if ( u2_yes == u2_cr_pq(ref, c3__cell, &p_ref, &q_ref) ) {
return u2_and(_nest_dext(van, p_sut, tel, p_ref, gil),
_nest_dext(van, q_sut, tel, q_ref, gil));
}
else return _nest_sint(wir_r, van, sut, tel, ref, gil);
else return _nest_sint(van, sut, tel, ref, gil);
}
}
case c3__core: {
if ( u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut) ) {
return u2_cm_bail(c3__fail);
} else {
if ( (u2_yes == u2_as_pq(ref, c3__core, &p_ref, &q_ref)) ) {
return _nest_cong(wir_r, van, sut, tel, ref, gil);
if ( (u2_yes == u2_cr_pq(ref, c3__core, &p_ref, &q_ref)) ) {
return _nest_cong(van, sut, tel, ref, gil);
}
else return _nest_sint(wir_r, van, sut, tel, ref, gil);
else return _nest_sint(van, sut, tel, ref, gil);
}
}
case c3__cube: {
if ( u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut) ) {
return u2_cm_bail(c3__fail);
} else {
if ( u2_yes == u2_as_pq(ref, c3__cube, &p_ref, &q_ref) ) {
return u2_sing(p_sut, p_ref);
if ( u2_yes == u2_cr_pq(ref, c3__cube, &p_ref, &q_ref) ) {
return u2_cr_sing(p_sut, p_ref);
}
else return _nest_sint(wir_r, van, sut, tel, ref, gil);
else return _nest_sint(van, sut, tel, ref, gil);
}
}
case c3__face: {
if ( (u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_cm_bail(c3__fail);
} else {
return _nest_dext(wir_r, van, q_sut, tel, ref, gil);
return _nest_dext(van, q_sut, tel, ref, gil);
}
}
case c3__fork: {
if ( (u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_cm_bail(c3__fail);
}
else {
if ( u2_no == u2_dust(ref) ) switch ( ref ) {
default: return _nest_sint(wir_r, van, sut, tel, ref, gil);
if ( u2_no == u2du(ref) ) switch ( ref ) {
default: return _nest_sint(van, sut, tel, ref, gil);
case c3__noun:
break;
}
else switch ( u2_h(ref) ) {
default: return _nest_sint(wir_r, van, sut, tel, ref, gil);
else switch ( u2h(ref) ) {
default: return _nest_sint(van, sut, tel, ref, gil);
case c3__atom:
case c3__cell:
@ -283,27 +283,27 @@
break;
}
return u2_or(_nest_dext(wir_r, van, p_sut, u2_no, ref, gil),
_nest_dext(wir_r, van, q_sut, u2_no, ref, gil));
return u2_or(_nest_dext(van, p_sut, u2_no, ref, gil),
_nest_dext(van, q_sut, u2_no, ref, gil));
}
}
case c3__hold: p_sut = u2_t(sut);
case c3__hold: p_sut = u2t(sut);
{
u2_noun hud = u2_bc(wir_r, u2_rx(wir_r, sut),
u2_rx(wir_r, ref));
u2_noun hud = u2nc(u2k(sut),
u2k(ref));
if ( (u2_yes == j2_mcc(Pt4, in, has)(wir_r, gil, hud)) ) {
u2_rl_lose(wir_r, hud);
if ( (u2_yes == j2_mcc(Pt4, in, has)(gil, hud)) ) {
u2z(hud);
return u2_yes;
} else {
u2_noun zoc = j2_mcc(Pt4, in, put)(wir_r, gil, hud);
u2_type fop = j2_mcy(Pt6, ut, rest)(wir_r, van, sut, p_sut);
u2_bean hiv = _nest_dext(wir_r, van, fop, tel, ref, zoc);
u2_noun zoc = j2_mcc(Pt4, in, put)(gil, hud);
u2_noun fop = j2_mcy(Pt6, ut, rest)(van, sut, p_sut);
u2_bean hiv = _nest_dext(van, fop, tel, ref, zoc);
u2_rl_lose(wir_r, hud);
u2_rl_lose(wir_r, fop);
u2_rl_lose(wir_r, zoc);
u2z(hud);
u2z(fop);
u2z(zoc);
return hiv;
}
@ -312,37 +312,37 @@
}
static u2_bean
_nest_dext_to(u2_wire wir_r,
_nest_dext_to(
u2_noun van,
u2_noun sut,
u2_bean tel,
u2_noun ref,
u2_noun gil)
{
u2_bean tyn = _nest_dext_in(wir_r, van, sut, tel, ref, gil);
u2_bean tyn = _nest_dext_in(van, sut, tel, ref, gil);
if ( (u2_yes == tyn) || (u2_no == tel) ) {
return tyn;
} else {
// u2_noun dun = j2_mcy(Pt6, ut, dunq)(wir_r, van, "need", sut);
// u2_noun niz = j2_mcy(Pt6, ut, dunq)(wir_r, van, "have", ref);
// u2_noun dun = j2_mcy(Pt6, ut, dunq)(van, "need", sut);
// u2_noun niz = j2_mcy(Pt6, ut, dunq)(van, "have", ref);
// u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, dun));
// u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, niz));
// u2_ct_push(u2nc(c3__mean, dun));
// u2_ct_push(u2nc(c3__mean, niz));
return u2_bl_error(wir_r, "type-fail");
return u2_cm_error("type-fail");
}
}
static u2_bean
_nest_dext(u2_wire wir_r,
_nest_dext(
u2_noun van,
u2_noun sut,
u2_bean tel,
u2_noun ref,
u2_noun gil)
{
if ( (u2_yes == u2_sing(sut, ref)) ) {
if ( (u2_yes == u2_cr_sing(sut, ref)) ) {
return u2_yes;
}
@ -350,25 +350,25 @@
u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, nest)[0];
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return _nest_dext_to(wir_r, van, sut, tel, ref, gil);
return _nest_dext_to(van, sut, tel, ref, gil);
} else {
c3_m fun_m = c3__nest;
u2_noun pro = u2_rl_find_cell(wir_r, fun_m, sut, ref);
u2_noun pro = u2_ch_find_2(fun_m, sut, ref);
if ( u2_none != pro ) {
return pro;
}
else {
pro = _nest_dext_to(wir_r, van, sut, tel, ref, gil);
pro = _nest_dext_to(van, sut, tel, ref, gil);
return u2_rl_save_cell(wir_r, fun_m, sut, ref, pro);
return u2_ch_save_2(fun_m, sut, ref, pro);
}
}
}
}
static u2_bean
_nest_sint(u2_wire wir_r,
_nest_sint(
u2_noun van,
u2_noun sut,
u2_bean tel,
@ -377,76 +377,76 @@
{
u2_noun p_ref, q_ref;
if ( (u2_no == u2_dust(ref)) ) {
if ( (u2_no == u2du(ref)) ) {
switch ( ref ) {
default: return u2_bl_bail(wir_r, c3__fail);
default: return u2_cm_bail(c3__fail);
case c3__noun: return u2_no;
case c3__void: return u2_yes;
}
}
else {
switch ( u2_h(ref) ) {
switch ( u2h(ref) ) {
default: {
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
}
case c3__atom: return u2_no;
case c3__bull: {
if ( u2_no == u2_as_trel(ref, 0, &p_ref, &q_ref) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_trel(ref, 0, &p_ref, &q_ref) ) {
return u2_cm_bail(c3__fail);
} else {
return _nest_dext(wir_r, van, sut, tel, q_ref, gil);
return _nest_dext(van, sut, tel, q_ref, gil);
}
}
case c3__cell: return u2_no;
case c3__core: {
u2_type gam = j2_mcy(Pt6, ut, repo)(wir_r, van, ref);
u2_bean hiv = _nest_dext(wir_r, van, sut, tel, gam, gil);
u2_noun gam = j2_mcy(Pt6, ut, repo)(van, ref);
u2_bean hiv = _nest_dext(van, sut, tel, gam, gil);
u2_rl_lose(wir_r, gam);
u2z(gam);
return hiv;
}
case c3__cube: {
if ( u2_no == u2_as_trel(ref, 0, &p_ref, &q_ref) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_trel(ref, 0, &p_ref, &q_ref) ) {
return u2_cm_bail(c3__fail);
} else {
return _nest_dext(wir_r, van, sut, tel, q_ref, gil);
return _nest_dext(van, sut, tel, q_ref, gil);
}
}
case c3__face: {
if ( u2_no == u2_as_trel(ref, 0, &p_ref, &q_ref) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_trel(ref, 0, &p_ref, &q_ref) ) {
return u2_cm_bail(c3__fail);
} else {
return _nest_dext(wir_r, van, sut, tel, q_ref, gil);
return _nest_dext(van, sut, tel, q_ref, gil);
}
}
case c3__fork: {
if ( (u2_yes == u2_mean(ref, 6, &p_ref, 7, &q_ref, 0)) ) {
return u2_and(_nest_dext(wir_r, van, sut, u2_no, p_ref, gil),
_nest_dext(wir_r, van, sut, u2_no, q_ref, gil));
if ( (u2_yes == u2_cr_mean(ref, 6, &p_ref, 7, &q_ref, 0)) ) {
return u2_and(_nest_dext(van, sut, u2_no, p_ref, gil),
_nest_dext(van, sut, u2_no, q_ref, gil));
}
else return u2_bl_bail(wir_r, c3__fail);
else return u2_cm_bail(c3__fail);
}
case c3__hold: {
p_ref = u2_t(ref);
p_ref = u2t(ref);
{
u2_noun hud = u2_bc(wir_r, u2_rx(wir_r, sut),
u2_rx(wir_r, ref));
u2_noun hud = u2nc(u2k(sut),
u2k(ref));
if ( (u2_yes == j2_mcc(Pt4, in, has)(wir_r, gil, hud)) ) {
u2_rl_lose(wir_r, hud);
if ( (u2_yes == j2_mcc(Pt4, in, has)(gil, hud)) ) {
u2z(hud);
return u2_yes;
} else {
u2_noun zoc = j2_mcc(Pt4, in, put)(wir_r, gil, hud);
u2_type gam = j2_mcy(Pt6, ut, repo)(wir_r, van, ref);
u2_noun zoc = j2_mcc(Pt4, in, put)(gil, hud);
u2_noun gam = j2_mcy(Pt6, ut, repo)(van, ref);
{
u2_bean hiv = _nest_dext(wir_r, van, sut, tel, gam, zoc);
u2_bean hiv = _nest_dext(van, sut, tel, gam, zoc);
u2_rl_lose(wir_r, hud);
u2_rl_lose(wir_r, gam);
u2_rl_lose(wir_r, zoc);
u2z(hud);
u2z(gam);
u2z(zoc);
return hiv;
}
@ -458,67 +458,67 @@
}
u2_bean // transfer
j2_mcx(Pt6, ut, nest)(u2_wire wir_r,
j2_mcx(Pt6, ut, nest)(
u2_noun van, // retain
u2_noun sut, // retain
u2_bean tel, // retain
u2_noun ref) // retain
{
return _nest_dext(wir_r, van, sut, tel, ref, u2_nul);
return _nest_dext(van, sut, tel, ref, u2_nul);
}
/* boilerplate
*/
u2_noun // transfer
j2_mc(Pt6, ut, nest)(u2_wire wir_r,
j2_mc(Pt6, ut, nest)(
u2_noun cor) // retain
{
u2_noun sut, tel, ref, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &tel,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &tel,
u2_cv_sam_3, &ref,
u2_cv_con, &van,
0)) ||
(u2_no == u2_stud(tel)) || (tel > 1) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_no == u2ud(tel)) || (tel > 1) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, nest)(wir_r, van, sut, tel, ref);
return j2_mcx(Pt6, ut, nest)(van, sut, tel, ref);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, nest)(u2_wire wir_r,
j2_mci(Pt6, ut, nest)(
u2_noun van, // retain
u2_noun sut, // retain
u2_bean tel, // retain
u2_noun ref) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "nest");
u2_weak hoc = u2_cj_look(van, "nest");
if ( u2_none == hoc ) {
c3_assert(!"register nest");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam_2, tel,
u2_cv_sam_3, u2_rx(wir_r, ref), 0);
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam_2, tel,
u2_cv_sam_3, u2k(ref), 0);
if ( (u2_none == j2_mcj(Pt6, ut, nest)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, nest)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, nest)(u2_wire wir_r,
j2_mcy(Pt6, ut, nest)(
u2_noun van, // retain
u2_noun sut, // retain
u2_bean tel, // retain
@ -527,36 +527,36 @@
u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, nest)[0];
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
return j2_mcx(Pt6, ut, nest)(wir_r, van, sut, tel, ref);
return j2_mcx(Pt6, ut, nest)(van, sut, tel, ref);
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, nest)(wir_r, van, sut, tel, ref);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, nest)(van, sut, tel, ref);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}
}
u2_weak
j2_mck(Pt6, ut, nest)(u2_wire wir_r,
j2_mck(Pt6, ut, nest)(
u2_noun cor)
{
u2_noun sut, ref, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam_3, &ref, u2_cv_con, &van, &ref, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_3, &ref, u2_cv_con, &van, &ref, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_none;
} else {
return u2_rc(wir_r, u2_rx(wir_r, sut), u2_rx(wir_r, ref));
return u2nc(u2k(sut), u2k(ref));
}
}

View File

@ -8,24 +8,24 @@
/* logic
*/
u2_bean // transfer
j2_mcx(Pt6, ut, park)(u2_wire wir_r,
j2_mcx(Pt6, ut, park)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun way, // retain
u2_atom axe) // retain
{
if ( u2_no == u2_dust(sut) || c3__core != u2_h(sut) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2du(sut) || c3__core != u2h(sut) ) {
return u2_cm_bail(c3__fail);
}
// else if ( u2_no == u2_bn_hook(wir_r, van, "vet") ) {
else if ( u2_no == u2_frag(j2_ut_van_vet, van) ) {
// else if ( u2_no == u2_cj_hook(van, "vet") ) {
else if ( u2_no == u2_cr_at(j2_ut_van_vet, van) ) {
return u2_yes;
}
else {
u2_noun p_sut, q_sut, pq_sut;
u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
u2_bi_cell(wir_r, q_sut, &pq_sut, 0);
u2_cx_cell(u2t(sut), &p_sut, &q_sut);
u2_cx_cell(q_sut, &pq_sut, 0);
if ( c3__both == way ) {
if ( c3__gold == pq_sut ) {
@ -34,30 +34,30 @@
}
if ( c3__read == way ) {
switch ( pq_sut ) {
default: return u2_bl_bail(wir_r, c3__fail);
default: return u2_cm_bail(c3__fail);
case c3__gold: return u2_yes;
case c3__lead: return u2_no;
case c3__iron: return u2_no;
case c3__zinc: return
u2_and(u2_not(u2_sing(_1, axe)),
u2_sing(_2, j2_mbc(Pt3, cap)(wir_r, axe)));
u2_and(u2_not(u2_cr_sing(1, axe)),
u2_cr_sing(2, j2_mbc(Pt3, cap)(axe)));
}
}
else if ( c3__rite == way ) {
switch ( pq_sut ) {
default: return u2_bl_bail(wir_r, c3__fail);
default: return u2_cm_bail(c3__fail);
case c3__gold: return u2_yes;
case c3__lead: return u2_no;
case c3__iron: return
u2_and(u2_not(u2_sing(_1, axe)),
u2_sing(_2, j2_mbc(Pt3, cap)(wir_r, axe)));
u2_and(u2_not(u2_cr_sing(1, axe)),
u2_cr_sing(2, j2_mbc(Pt3, cap)(axe)));
case c3__zinc: return u2_no;
}
}
else if ( c3__free == way ) { return u2_yes; }
else return u2_bl_bail(wir_r, c3__fail);
else return u2_cm_bail(c3__fail);
}
}
@ -67,57 +67,57 @@
j2_mcj(Pt6, ut, park)[];
u2_noun // transfer
j2_mc(Pt6, ut, park)(u2_wire wir_r,
j2_mc(Pt6, ut, park)(
u2_noun cor) // retain
{
u2_noun sut, way, axe, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &way,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &way,
u2_cv_sam_3, &axe,
u2_cv_con, &van,
0)) ||
(u2_no == u2_stud(axe)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_no == u2ud(axe)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, park)(wir_r, van, sut, way, axe);
return j2_mcx(Pt6, ut, park)(van, sut, way, axe);
}
}
u2_bean
j2_mci(Pt6, ut, park)(u2_wire wir_r,
j2_mci(Pt6, ut, park)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun way, // retain
u2_noun axe) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "park");
u2_weak hoc = u2_cj_look(van, "park");
if ( u2_none == hoc ) {
c3_assert(!"register park");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat,
u2_cv_sam_2, u2_rx(wir_r, way),
u2_cv_sam_3, u2_rx(wir_r, axe),
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat),
u2_cv_sam_2, u2k(way),
u2_cv_sam_3, u2k(axe),
0);
if ( (u2_none == j2_mcj(Pt6, ut, park)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, park)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, park)(u2_wire wir_r,
j2_mcy(Pt6, ut, park)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun way, // retain
@ -126,19 +126,19 @@
u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, park)[0];
if ( jet_j->sat_s == u2_jet_live ) {
return j2_mcx(Pt6, ut, park)(wir_r, van, sut, way, axe);
return j2_mcx(Pt6, ut, park)(van, sut, way, axe);
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, park)(wir_r, van, sut, way, axe);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, park)(van, sut, way, axe);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}

View File

@ -8,10 +8,10 @@
/* logic
*/
u2_noun
j2_mcx(Pt6, ut, peek)(u2_wire, u2_noun, u2_noun, u2_noun, u2_atom);
j2_mcx(Pt6, ut, peek)(u2_noun, u2_noun, u2_noun, u2_atom);
static u2_noun // produce
_peek_in(u2_wire wir_r,
_peek_in(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun way, // retain
@ -21,8 +21,8 @@
u2_noun p_sut, q_sut;
u2_noun pro;
if ( (u2_no == u2_dust(sut)) ) switch ( sut ) {
default: return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2du(sut)) ) switch ( sut ) {
default: return u2_cm_bail(c3__fail);
case c3__noun: {
return c3__noun;
@ -31,34 +31,34 @@
return c3__void;
}
}
else switch ( u2_h(sut) ) {
default: return u2_bl_bail(wir_r, c3__fail);
else switch ( u2h(sut) ) {
default: return u2_cm_bail(c3__fail);
case c3__atom: {
return c3__void;
}
case c3__bull: {
if ( (u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_cm_bail(c3__fail);
} else {
return _peek_in(wir_r, van, q_sut, way, axe, gil);
return _peek_in(van, q_sut, way, axe, gil);
}
}
case c3__cell: {
if ( (u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_cm_bail(c3__fail);
} else {
u2_atom tip = j2_mbc(Pt3, cap)(wir_r, axe);
u2_atom tap = j2_mbc(Pt3, mas)(wir_r, axe);
u2_atom tip = j2_mbc(Pt3, cap)(axe);
u2_atom tap = j2_mbc(Pt3, mas)(axe);
if ( _2 == tip ) {
pro = j2_mcx(Pt6, ut, peek)(wir_r, van, p_sut, way, tap);
if ( 2 == tip ) {
pro = j2_mcx(Pt6, ut, peek)(van, p_sut, way, tap);
}
else {
pro = j2_mcx(Pt6, ut, peek)(wir_r, van, q_sut, way, tap);
pro = j2_mcx(Pt6, ut, peek)(van, q_sut, way, tap);
}
u2_rl_lose(wir_r, tap);
u2_rl_lose(wir_r, tip);
u2z(tap);
u2z(tip);
return pro;
}
@ -67,79 +67,79 @@
u2_noun pq_sut, qq_sut, rq_sut;
u2_noun prq_sut, qrq_sut;
if ( (u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut)) ||
(u2_no == u2_as_trel(q_sut, &pq_sut, &qq_sut, &rq_sut)) ||
(u2_no == u2_as_cell(rq_sut, &prq_sut, &qrq_sut)) )
if ( (u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut)) ||
(u2_no == u2_cr_trel(q_sut, &pq_sut, &qq_sut, &rq_sut)) ||
(u2_no == u2_cr_cell(rq_sut, &prq_sut, &qrq_sut)) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
u2_atom tip = j2_mbc(Pt3, cap)(wir_r, axe);
u2_atom tap = j2_mbc(Pt3, mas)(wir_r, axe);
u2_atom tip = j2_mbc(Pt3, cap)(axe);
u2_atom tap = j2_mbc(Pt3, mas)(axe);
if ( _3 == tip ) {
if ( u2_no == j2_mcy(Pt6, ut, park)(wir_r, van, sut, way, tap) )
if ( 3 == tip ) {
if ( u2_no == j2_mcy(Pt6, ut, park)(van, sut, way, tap) )
{
// u2_noun dun = j2_mcy(Pt6, ut, dunq)(wir_r, van, "type", sut);
// u2_noun dun = j2_mcy(Pt6, ut, dunq)(van, "type", sut);
u2_noun waz = j2_mcy(Pt6, ut, shep)
(wir_r, van, "axis", 'd', u2_rx(wir_r, axe));
(van, "axis", 'd', u2k(axe));
// u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, dun));
u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, waz));
// u2_ct_push(u2nc(c3__mean, dun));
u2_ct_push(u2nc(c3__mean, waz));
return u2_bl_error(wir_r, "peek-park");
return u2_cm_error("peek-park");
}
else pro = j2_mcx(Pt6, ut, peek)(wir_r, van, p_sut, way, tap);
else pro = j2_mcx(Pt6, ut, peek)(van, p_sut, way, tap);
}
else {
pro = c3__noun;
}
u2_rl_lose(wir_r, tap);
u2_rl_lose(wir_r, tip);
u2z(tap);
u2z(tip);
return pro;
}
}
case c3__cube: {
if ( (u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_cm_bail(c3__fail);
} else {
return _peek_in(wir_r, van, q_sut, way, axe, gil);
return _peek_in(van, q_sut, way, axe, gil);
}
}
case c3__face: {
if ( (u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_cm_bail(c3__fail);
} else {
return _peek_in(wir_r, van, q_sut, way, axe, gil);
return _peek_in(van, q_sut, way, axe, gil);
}
}
case c3__fork: {
if ( (u2_no == u2_as_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( (u2_no == u2_cr_trel(sut, 0, &p_sut, &q_sut)) ) {
return u2_cm_bail(c3__fail);
} else {
u2_noun hed = _peek_in(wir_r, van, p_sut, way, axe, gil);
u2_noun tal = _peek_in(wir_r, van, q_sut, way, axe, gil);
u2_noun hed = _peek_in(van, p_sut, way, axe, gil);
u2_noun tal = _peek_in(van, q_sut, way, axe, gil);
pro = j2_mby(Pt6, fork)(wir_r, hed, tal);
pro = j2_mby(Pt6, fork)(hed, tal);
u2_rl_lose(wir_r, hed);
u2_rl_lose(wir_r, tal);
u2z(hed);
u2z(tal);
return pro;
}
}
case c3__hold: {
p_sut = u2_t(sut);
if ( (u2_yes == j2_mcc(Pt4, in, has)(wir_r, gil, sut)) ) {
p_sut = u2t(sut);
if ( (u2_yes == j2_mcc(Pt4, in, has)(gil, sut)) ) {
return c3__void;
}
else {
u2_noun zoc = j2_mcc(Pt4, in, put)(wir_r, gil, sut);
u2_type fop = j2_mcy(Pt6, ut, repo)(wir_r, van, sut);
u2_noun pro = _peek_in(wir_r, van, fop, way, axe, zoc);
u2_noun zoc = j2_mcc(Pt4, in, put)(gil, sut);
u2_noun fop = j2_mcy(Pt6, ut, repo)(van, sut);
u2_noun pro = _peek_in(van, fop, way, axe, zoc);
u2_rl_lose(wir_r, fop);
u2_rl_lose(wir_r, zoc);
u2z(fop);
u2z(zoc);
return pro;
}
@ -148,16 +148,16 @@
}
u2_noun // transfer
j2_mcx(Pt6, ut, peek)(u2_wire wir_r,
j2_mcx(Pt6, ut, peek)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun way,
u2_atom axe) // retain
{
if ( _1 == axe ) {
return u2_rx(wir_r, sut);
if ( 1 == axe ) {
return u2k(sut);
}
else return _peek_in(wir_r, van, sut, way, axe, u2_nul);
else return _peek_in(van, sut, way, axe, u2_nul);
}
/* boilerplate
@ -166,57 +166,57 @@
j2_mcj(Pt6, ut, peek)[];
u2_noun // transfer
j2_mc(Pt6, ut, peek)(u2_wire wir_r,
j2_mc(Pt6, ut, peek)(
u2_noun cor) // retain
{
u2_noun sut, way, axe, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &way,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &way,
u2_cv_sam_3, &axe,
u2_cv_con, &van,
0)) ||
(u2_no == u2_stud(axe)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_no == u2ud(axe)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, peek)(wir_r, van, sut, way, axe);
return j2_mcx(Pt6, ut, peek)(van, sut, way, axe);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, peek)(u2_wire wir_r,
j2_mci(Pt6, ut, peek)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun way, // retain
u2_noun axe) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "peek");
u2_weak hoc = u2_cj_look(van, "peek");
if ( u2_none == hoc ) {
c3_assert(!"register peek");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat,
u2_cv_sam_2, u2_rx(wir_r, way),
u2_cv_sam_3, u2_rx(wir_r, axe),
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat),
u2_cv_sam_2, u2k(way),
u2_cv_sam_3, u2k(axe),
0);
if ( (u2_none == j2_mcj(Pt6, ut, peek)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, peek)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, peek)(u2_wire wir_r,
j2_mcy(Pt6, ut, peek)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun way, // retain
@ -226,54 +226,54 @@
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return j2_mcx(Pt6, ut, peek)(wir_r, van, sut, way, axe);
return j2_mcx(Pt6, ut, peek)(van, sut, way, axe);
}
else {
c3_m fun_m = c3__peek;
u2_noun pro = u2_rl_find_trel(wir_r, fun_m, sut, way, axe);
u2_noun pro = u2_ch_find_3(fun_m, sut, way, axe);
if ( u2_none != pro ) {
return pro;
}
else {
pro = j2_mcx(Pt6, ut, peek)(wir_r, van, sut, way, axe);
pro = j2_mcx(Pt6, ut, peek)(van, sut, way, axe);
return u2_rl_save_trel(wir_r, fun_m, sut, way, axe, pro);
return u2_ch_save_3(fun_m, sut, way, axe, pro);
}
}
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, peek)(wir_r, van, sut, way, axe);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, peek)(van, sut, way, axe);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}
}
u2_weak
j2_mck(Pt6, ut, peek)(u2_wire wir_r,
j2_mck(Pt6, ut, peek)(
u2_noun cor)
{
u2_noun sut, way, axe, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &way,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &way,
u2_cv_sam_3, &axe,
u2_cv_con, &van,
0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_none;
} else {
return u2_rt
(wir_r, u2_rx(wir_r, sut), u2_rx(wir_r, way), u2_rx(wir_r, axe));
return u2nt
(u2k(sut), u2k(way), u2k(axe));
}
}

View File

@ -7,102 +7,102 @@
/* logic
*/
# define _play_used(wir_r)
# define _play_used()
static u2_noun
_play_in(u2_wire, u2_noun, u2_noun, u2_noun);
_play_in(u2_noun, u2_noun, u2_noun);
static u2_noun // produce
_play_bean(u2_wire wir_r)
_play_bean(void)
{
return u2_bt(wir_r, c3__fork,
u2_bq(wir_r, c3__cube, _0, c3__atom, 'f'),
u2_bq(wir_r, c3__cube, _1, c3__atom, 'f'));
return u2nt(c3__fork,
u2nq(c3__cube, 0, c3__atom, 'f'),
u2nq(c3__cube, 1, c3__atom, 'f'));
}
static u2_noun // produce
_play_core(u2_wire wir_r,
_play_core(
u2_noun pac, // submit
u2_noun con) // submit
{
if ( (c3__void == pac) ) {
u2_rz(wir_r, con);
u2z(con);
return c3__void;
} else {
return u2_bt(wir_r, c3__core, pac, con);
return u2nt(c3__core, pac, con);
}
}
static u2_noun // produce
_play_loc(u2_wire wir_r,
_play_loc(
u2_noun van, // retain
u2_noun loc) // retain
{
u2_noun mol = u2_bc(wir_r, 'o', u2_rx(wir_r, loc));
u2_noun sho = u2_bn_hook(wir_r, van, "show");
u2_noun ret = u2_bn_molt(wir_r, sho, u2_cv_sam, mol, 0);
u2_noun mol = u2nc('o', u2k(loc));
u2_noun sho = u2_cj_hook(van, "show");
u2_noun ret = u2_ci_molt(u2k(sho), u2_cv_sam, u2k(mol), 0);
u2_rz(wir_r, mol);
u2_rz(wir_r, sho);
u2z(mol);
u2z(sho);
return ret;
}
static u2_noun // produce
_play_foil(u2_wire wir_r,
_play_foil(
u2_noun pok) // submit
{
u2_noun p_pok = u2_h(pok);
u2_noun q_pok = u2_t(pok);
u2_noun p_pok = u2h(pok);
u2_noun q_pok = u2t(pok);
u2_noun ret;
if ( u2_yes == u2_h(q_pok) ) {
u2_noun pq_pok = u2_t(q_pok);
if ( u2_yes == u2h(q_pok) ) {
u2_noun pq_pok = u2t(q_pok);
ret = u2_bc(wir_r,
u2_rx(wir_r, p_pok),
u2_bc(wir_r, u2_nul,
u2_bc(wir_r,
u2_bc(wir_r,
u2_rx(wir_r, pq_pok),
u2_bt(wir_r, c3__elm, u2_nul, _1)),
ret = u2nc(
u2k(p_pok),
u2nc(u2_nul,
u2nc(
u2nc(
u2k(pq_pok),
u2nt(c3__elm, u2_nul, 1)),
u2_nul)));
}
else {
u2_noun pq_pok = u2_h(u2_t(q_pok));
u2_noun qq_pok = u2_t(u2_t(q_pok));
u2_noun pq_pok = u2h(u2t(q_pok));
u2_noun qq_pok = u2t(u2t(q_pok));
ret = u2_bc(wir_r, u2_rx(wir_r, p_pok),
u2_bc(wir_r, u2_rx(wir_r, pq_pok),
u2_rx(wir_r, qq_pok)));
ret = u2nc(u2k(p_pok),
u2nc(u2k(pq_pok),
u2k(qq_pok)));
}
u2_rz(wir_r, pok);
u2z(pok);
return ret;
}
static u2_noun // produce
_play_edit(u2_wire wir_r,
_play_edit(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun mew, // retain
u2_noun rag) // submit
{
while ( 1 ) {
if ( u2_no == u2_dust(mew) ) {
if ( u2_no == u2du(mew) ) {
return rag;
} else {
u2_noun i_mew = u2_h(mew);
u2_noun t_mew = u2_t(mew);
u2_noun pi_mew = u2_h(i_mew);
u2_noun qi_mew = u2_t(i_mew);
u2_noun laf = _play_in(wir_r, van, sut, qi_mew);
u2_noun ruz = j2_mcy(Pt6, ut, tock)(wir_r, van, sut, pi_mew, laf, rag);
u2_noun i_mew = u2h(mew);
u2_noun t_mew = u2t(mew);
u2_noun pi_mew = u2h(i_mew);
u2_noun qi_mew = u2t(i_mew);
u2_noun laf = _play_in(van, sut, qi_mew);
u2_noun ruz = j2_mcy(Pt6, ut, tock)(van, sut, pi_mew, laf, rag);
u2_rz(wir_r, laf);
u2_rz(wir_r, rag);
rag = u2_rx(wir_r, u2_t(ruz));
u2_rz(wir_r, ruz);
u2z(laf);
u2z(rag);
rag = u2k(u2t(ruz));
u2z(ruz);
mew = t_mew;
}
@ -110,392 +110,392 @@
}
static u2_noun
_play_grow(u2_wire wir_r,
_play_grow(
u2_noun van,
u2_noun sut,
u2_atom mel,
u2_noun ruf,
u2_noun dab)
{
u2_noun dan = _play_in(wir_r, van, sut, ruf);
u2_noun dan = _play_in(van, sut, ruf);
return _play_core
(wir_r, dan,
u2_bt(wir_r, u2_rx(wir_r, mel),
u2_rx(wir_r, dan),
u2_bc(wir_r, u2_bc(wir_r, u2_nul, u2_nul),
u2_rx(wir_r, dab))));
(dan,
u2nt(u2k(mel),
u2k(dan),
u2nc(u2nc(u2_nul, u2_nul),
u2k(dab))));
}
static u2_noun
_play_in(u2_wire wir_r,
_play_in(
u2_noun van,
u2_noun sut,
u2_noun gen);
static u2_noun
_play_x(u2_wire wir_r,
_play_x(
u2_noun van,
u2_noun sut,
u2_noun gen)
{
#if 1
return _play_in(wir_r, van, sut, gen);
return _play_in(van, sut, gen);
#else
u2_noun zix = j2_mcy(Pt6, ut, shep)
(wir_r, van, "gene", 'q', u2_rx(wir_r, gen));
(van, "gene", 'q', u2k(gen));
u2_noun ret;
u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, zix));
u2_ct_push(u2nc(c3__mean, zix));
ret = _play_in(wir_r, van, sut, gen);
ret = _play_in(van, sut, gen);
u2_bl_drop(wir_r);
u2_ct_drop();
return ret;
#endif
}
static u2_noun
_play_in(u2_wire wir_r,
_play_in(
u2_noun van,
u2_noun sut,
u2_noun gen)
{
u2_noun p_gen, q_gen, r_gen;
if ( u2_no == u2_dust(gen) ) {
if ( u2_no == u2du(gen) ) {
open: {
u2_noun ter = u2_frag(u2_cv_con_3, van);
u2_noun rex = j2_mcy(Pt6, ap, open)(wir_r, ter, gen);
u2_noun ter = u2_cr_at(u2_cv_con_3, van);
u2_noun rex = j2_mcy(Pt6, ap, open)(ter, gen);
u2_noun ret;
if ( u2_yes == u2_sing(rex, gen) ) {
if ( u2_yes == u2_cr_sing(rex, gen) ) {
u2_noun zix = j2_mcy(Pt6, ut, shep)
(wir_r, van, "gene", 'q', u2_rx(wir_r, gen));
(van, "gene", 'q', u2k(gen));
u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, zix));
return u2_bl_error(wir_r, "play-open");
u2_ct_push(u2nc(c3__mean, zix));
return u2_cm_error("play-open");
}
ret = _play_x(wir_r, van, sut, rex);
u2_rl_lose(wir_r, rex);
ret = _play_x(van, sut, rex);
u2z(rex);
return ret;
}
}
else if ( u2_yes == u2_dust(u2_h(gen)) ) {
_play_used(wir_r);
else if ( u2_yes == u2du(u2h(gen)) ) {
_play_used();
{
u2_noun dis = _play_x(wir_r, van, sut, u2_h(gen));
u2_noun dat = _play_x(wir_r, van, sut, u2_t(gen));
u2_noun ret = j2_mby(Pt6, cell)(wir_r, dis, dat);
u2_noun dis = _play_x(van, sut, u2h(gen));
u2_noun dat = _play_x(van, sut, u2t(gen));
u2_noun ret = j2_mby(Pt6, cell)(dis, dat);
u2_rz(wir_r, dis);
u2_rz(wir_r, dat);
u2z(dis);
u2z(dat);
return ret;
}
}
else switch ( u2_h(gen) ) {
else switch ( u2h(gen) ) {
default: goto open;
case c3__bcpt: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__bcpt: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
u2_noun sep = j2_mcy(Pt6, ut, seep)(wir_r, van, sut, c3__read, p_gen);
u2_noun sep = j2_mcy(Pt6, ut, seep)(van, sut, c3__read, p_gen);
u2_noun axe = u2h(sep);
u2_noun rex = j2_mcy(Pt6, al, whip)(wir_r, van, q_gen, axe);
u2_noun ret = _play_x(wir_r, van, sut, rex);
u2_noun rex = j2_mcy(Pt6, al, whip)(van, q_gen, axe);
u2_noun ret = _play_x(van, sut, rex);
u2z(sep);
u2z(rex);
return ret;
}
case c3__wtts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__wtts: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
return _play_bean(wir_r);
return _play_bean();
}
case c3__wtcl: u2_bi_trel(wir_r, u2_t(gen), &p_gen, &q_gen, &r_gen);
_play_used(wir_r);
case c3__wtcl: u2_cx_trel(u2t(gen), &p_gen, &q_gen, &r_gen);
_play_used();
{
u2_noun fex = j2_mcy(Pt6, ut, gain)(wir_r, van, sut, p_gen);
u2_noun wux = j2_mcy(Pt6, ut, lose)(wir_r, van, sut, p_gen);
u2_noun fex = j2_mcy(Pt6, ut, gain)(van, sut, p_gen);
u2_noun wux = j2_mcy(Pt6, ut, lose)(van, sut, p_gen);
u2_noun dez = (fex == c3__void) ? c3__void
: _play_x(wir_r, van, fex, q_gen);
: _play_x(van, fex, q_gen);
u2_noun doz = (wux == c3__void) ? c3__void
: _play_x(wir_r, van, wux, r_gen);
u2_noun ret = j2_mby(Pt6, fork)(wir_r, dez, doz);
: _play_x(van, wux, r_gen);
u2_noun ret = j2_mby(Pt6, fork)(dez, doz);
u2_rz(wir_r, dez); u2_rz(wir_r, doz);
u2_rz(wir_r, fex); u2_rz(wir_r, wux);
u2z(dez); u2z(doz);
u2z(fex); u2z(wux);
return ret;
}
case c3__clhp: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__clhp: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
u2_noun dis = _play_x(wir_r, van, sut, p_gen);
u2_noun dat = _play_x(wir_r, van, sut, q_gen);
u2_noun ret = j2_mby(Pt6, cell)(wir_r, dis, dat);
u2_noun dis = _play_x(van, sut, p_gen);
u2_noun dat = _play_x(van, sut, q_gen);
u2_noun ret = j2_mby(Pt6, cell)(dis, dat);
u2_rz(wir_r, dis);
u2_rz(wir_r, dat);
u2z(dis);
u2z(dat);
return ret;
}
case c3__dtkt: p_gen = u2_t(gen);
_play_used(wir_r);
case c3__dtkt: p_gen = u2t(gen);
_play_used();
{
return c3__noun;
}
case c3__dtwt: p_gen = u2_t(gen);
_play_used(wir_r);
case c3__dtwt: p_gen = u2t(gen);
_play_used();
{
return _play_bean(wir_r);
return _play_bean();
}
case c3__dtts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__dtts: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
return _play_bean(wir_r);
return _play_bean();
}
case c3__dtls: p_gen = u2_t(gen);
_play_used(wir_r);
case c3__dtls: p_gen = u2t(gen);
_play_used();
{
return u2_bc(wir_r, c3__atom, u2_blip);
return u2nc(c3__atom, u2_blip);
}
case c3__dtzz: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__dtzz: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
u2_noun boc = (u2_no == u2_stud(q_gen))
u2_noun boc = (u2_no == u2ud(q_gen))
? c3__noun
: u2_bc(wir_r, c3__atom, u2_rx(wir_r, p_gen));
u2_noun ret = j2_mby(Pt6, cube)(wir_r, q_gen, boc);
: u2nc(c3__atom, u2k(p_gen));
u2_noun ret = j2_mby(Pt6, cube)(q_gen, boc);
u2_rz(wir_r, boc);
u2z(boc);
return ret;
}
case c3__dttr: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__dttr: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
return c3__noun;
}
case c3__dtzy: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__dtzy: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
if ( 'f' == p_gen ) {
if ( (q_gen > 1) ) {
return u2_cm_bail(c3__exit);
} else {
return _play_bean(wir_r);
return _play_bean();
}
}
else return u2_bc(wir_r, c3__atom, u2_rx(wir_r, p_gen));
else return u2nc(c3__atom, u2k(p_gen));
}
case c3__ktbr: p_gen = u2_t(gen);
_play_used(wir_r);
case c3__ktbr: p_gen = u2t(gen);
_play_used();
{
u2_noun boc = _play_x(wir_r, van, sut, p_gen);
u2_noun pro = j2_mcy(Pt6, ut, wrap)(wir_r, van, boc, c3__iron);
u2_noun boc = _play_x(van, sut, p_gen);
u2_noun pro = j2_mcy(Pt6, ut, wrap)(van, boc, c3__iron);
u2_rz(wir_r, boc);
u2z(boc);
return pro;
}
case c3__ktpm: p_gen = u2_t(gen);
_play_used(wir_r);
case c3__ktpm: p_gen = u2t(gen);
_play_used();
{
u2_noun boc = _play_x(wir_r, van, sut, p_gen);
u2_noun pro = j2_mcy(Pt6, ut, wrap)(wir_r, van, boc, c3__zinc);
u2_noun boc = _play_x(van, sut, p_gen);
u2_noun pro = j2_mcy(Pt6, ut, wrap)(van, boc, c3__zinc);
u2_rz(wir_r, boc);
u2z(boc);
return pro;
}
case c3__ktwt: p_gen = u2_t(gen);
_play_used(wir_r);
case c3__ktwt: p_gen = u2t(gen);
_play_used();
{
u2_noun boc = _play_x(wir_r, van, sut, p_gen);
u2_noun pro = j2_mcy(Pt6, ut, wrap)(wir_r, van, boc, c3__lead);
u2_noun boc = _play_x(van, sut, p_gen);
u2_noun pro = j2_mcy(Pt6, ut, wrap)(van, boc, c3__lead);
u2_rz(wir_r, boc);
u2z(boc);
return pro;
}
case c3__ktts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__ktts: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
u2_noun boc = _play_x(wir_r, van, sut, q_gen);
u2_noun ret = j2_mcy(Pt6, ut, conk)(wir_r, van, boc, p_gen);
u2_noun boc = _play_x(van, sut, q_gen);
u2_noun ret = j2_mcy(Pt6, ut, conk)(van, boc, p_gen);
u2_rz(wir_r, boc);
u2z(boc);
return ret;
}
case c3__ktzp: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__ktzp: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
u2_noun boc = _play_x(wir_r, van, sut, q_gen);
u2_noun ret = j2_mcy(Pt6, ut, conk)(wir_r, van, boc, p_gen);
u2_noun boc = _play_x(van, sut, q_gen);
u2_noun ret = j2_mcy(Pt6, ut, conk)(van, boc, p_gen);
u2_rz(wir_r, boc);
u2z(boc);
return ret;
}
case c3__ktsg: p_gen = u2_t(gen);
_play_used(wir_r);
case c3__ktsg: p_gen = u2t(gen);
_play_used();
{
return _play_x(wir_r, van, sut, p_gen);
return _play_x(van, sut, p_gen);
}
case c3__kthx: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__kthx: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
return _play_x(wir_r, van, sut, p_gen);
return _play_x(van, sut, p_gen);
}
case c3__ktls: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__ktls: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
return _play_x(wir_r, van, sut, p_gen);
return _play_x(van, sut, p_gen);
}
case c3__tsgr: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__tsgr: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
u2_noun boc = _play_x(wir_r, van, sut, p_gen);
u2_noun ret = _play_x(wir_r, van, boc, q_gen);
u2_noun boc = _play_x(van, sut, p_gen);
u2_noun ret = _play_x(van, boc, q_gen);
u2_rz(wir_r, boc);
u2z(boc);
return ret;
}
case c3__tstr: u2_bi_trel(wir_r, u2_t(gen), &p_gen, &q_gen, &r_gen);
_play_used(wir_r);
case c3__tstr: u2_cx_trel(u2t(gen), &p_gen, &q_gen, &r_gen);
_play_used();
{
u2_noun sep = j2_mcy(Pt6, ut, seep)(wir_r, van, sut, c3__both, q_gen);
u2_noun bid = u2_bt(wir_r, u2k(p_gen), u2k(q_gen), sep);
u2_noun boc = j2_mby(Pt6, bull)(wir_r, bid, sut);
u2_noun ret = _play_x(wir_r, van, boc, r_gen);
u2_noun sep = j2_mcy(Pt6, ut, seep)(van, sut, c3__both, q_gen);
u2_noun bid = u2nt(u2k(p_gen), u2k(q_gen), sep);
u2_noun boc = j2_mby(Pt6, bull)(bid, sut);
u2_noun ret = _play_x(van, boc, r_gen);
u2z(bid);
u2z(boc);
return ret;
}
case c3__cnts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__cnts: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
u2_noun sec = j2_mcy(Pt6, ut, seek)(wir_r, van, sut, c3__read, p_gen);
u2_noun lar = _play_foil(wir_r, sec);
u2_noun q_lar = u2_t(lar);
u2_noun qq_lar = u2_t(q_lar);
u2_noun mew = j2_mcy(Pt6, ut, snub)(wir_r, van, sut, q_gen);
u2_noun rag = _play_edit(wir_r, van, sut, mew, u2_rx(wir_r, qq_lar));
u2_noun ret = j2_mcy(Pt6, ut, fire)(wir_r, van, sut, rag);
u2_noun sec = j2_mcy(Pt6, ut, seek)(van, sut, c3__read, p_gen);
u2_noun lar = _play_foil(sec);
u2_noun q_lar = u2t(lar);
u2_noun qq_lar = u2t(q_lar);
u2_noun mew = j2_mcy(Pt6, ut, snub)(van, sut, q_gen);
u2_noun rag = _play_edit(van, sut, mew, u2k(qq_lar));
u2_noun ret = j2_mcy(Pt6, ut, fire)(van, sut, rag);
u2_rz(wir_r, rag);
u2_rz(wir_r, mew);
u2_rz(wir_r, lar);
u2z(rag);
u2z(mew);
u2z(lar);
return ret;
}
case c3__pmcl: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__pmcl: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
u2_noun ruf = u2_bt
(wir_r, c3__clhp,
u2_bc(wir_r, u2_nul, _1),
u2_rx(wir_r, p_gen));
u2_noun ret = _play_grow(wir_r, van, sut, c3__zinc, ruf, q_gen);
u2_noun ruf = u2nt
(c3__clhp,
u2nc(u2_nul, 1),
u2k(p_gen));
u2_noun ret = _play_grow(van, sut, c3__zinc, ruf, q_gen);
u2_rz(wir_r, ruf);
u2z(ruf);
return ret;
}
case c3__brcn: p_gen = u2_t(gen);
_play_used(wir_r);
case c3__brcn: p_gen = u2t(gen);
_play_used();
{
u2_noun ruf = u2_bc(wir_r, u2_nul, _1);
u2_noun ret = _play_grow(wir_r, van, sut, c3__gold, ruf, p_gen);
u2_noun ruf = u2nc(u2_nul, 1);
u2_noun ret = _play_grow(van, sut, c3__gold, ruf, p_gen);
u2_rz(wir_r, ruf);
u2z(ruf);
return ret;
}
case c3__pmcn: p_gen = u2_t(gen);
_play_used(wir_r);
case c3__pmcn: p_gen = u2t(gen);
_play_used();
{
u2_noun ruf = u2_bc(wir_r, u2_nul, _1);
u2_noun ret = _play_grow(wir_r, van, sut, c3__lead, ruf, p_gen);
u2_noun ruf = u2nc(u2_nul, 1);
u2_noun ret = _play_grow(van, sut, c3__lead, ruf, p_gen);
u2_rz(wir_r, ruf);
u2z(ruf);
return ret;
}
case c3__pmls: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__pmls: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
u2_noun ruf = u2_bt
(wir_r, c3__clhp,
u2_bc(wir_r, u2_nul, _1),
u2_rx(wir_r, p_gen));
u2_noun ret = _play_grow(wir_r, van, sut, c3__iron, ruf, q_gen);
u2_noun ruf = u2nt
(c3__clhp,
u2nc(u2_nul, 1),
u2k(p_gen));
u2_noun ret = _play_grow(van, sut, c3__iron, ruf, q_gen);
u2_rz(wir_r, ruf);
u2z(ruf);
return ret;
}
case c3__sgzp: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__sgzp: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
u2_noun typ = j2_mcy(Pt6, ut, play)(wir_r, van, sut, p_gen);
u2_noun dug = j2_mcy(Pt6, ut, duck)(wir_r, van, typ);
u2_noun typ = j2_mcy(Pt6, ut, play)(van, sut, p_gen);
u2_noun dug = j2_mcy(Pt6, ut, duck)(van, typ);
u2_noun ret;
u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, dug));
u2_ct_push(u2nc(c3__mean, dug));
{
ret = _play_x(wir_r, van, sut, q_gen);
ret = _play_x(van, sut, q_gen);
}
u2_bl_drop(wir_r);
u2_ct_drop();
u2_rz(wir_r, typ);
u2z(typ);
return ret;
}
case c3__sggr: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__sggr: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
return _play_x(wir_r, van, sut, q_gen);
return _play_x(van, sut, q_gen);
}
case c3__zpts: p_gen = u2_t(gen);
_play_used(wir_r);
case c3__zpts: p_gen = u2t(gen);
_play_used();
{
return c3__noun;
}
case c3__zpcm: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__zpcm: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
return _play_x(wir_r, van, sut, p_gen);
return _play_x(van, sut, p_gen);
}
case c3__zpcb: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
case c3__zpcb: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
{
u2_noun ret;
u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, _play_loc(wir_r, van, p_gen)));
u2_ct_push(u2nc(c3__mean, _play_loc(van, p_gen)));
{
ret = _play_x(wir_r, van, sut, q_gen);
ret = _play_x(van, sut, q_gen);
}
u2_bl_drop(wir_r);
u2_ct_drop();
return ret;
}
case c3__zpcn:
_play_used(wir_r);
_play_used();
{
u2_noun pet = u2_bn_hook(wir_r, van, "seed");
u2_noun ret = u2_rx(wir_r, u2_h(pet));
u2_noun pet = u2_cj_hook(van, "seed");
u2_noun ret = u2k(u2h(pet));
u2_rz(wir_r, pet);
u2z(pet);
return ret;
}
case c3__zpsm: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
_play_used(wir_r);
case c3__zpsm: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_play_used();
{
u2_noun zur = _play_x(wir_r, van, sut, p_gen);
u2_noun vos = _play_x(wir_r, van, sut, q_gen);
u2_noun ret = j2_mby(Pt6, cell)(wir_r, zur, vos);
u2_noun zur = _play_x(van, sut, p_gen);
u2_noun vos = _play_x(van, sut, q_gen);
u2_noun ret = j2_mby(Pt6, cell)(zur, vos);
u2_rz(wir_r, zur);
u2_rz(wir_r, vos);
u2z(zur);
u2z(vos);
return ret;
}
case c3__zpfs:
case c3__zpzp:
_play_used(wir_r);
_play_used();
{
return c3__void;
}
@ -503,15 +503,15 @@
}
u2_noun // transfer
j2_mcx(Pt6, ut, play)(u2_wire wir_r,
j2_mcx(Pt6, ut, play)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun gen) // retain
{
u2_noun von = u2_bn_molt(wir_r, van, j2_ut_van_vet, u2_no, 0);
u2_noun ret = _play_x(wir_r, von, sut, gen);
u2_noun von = u2_ci_molt(u2k(van), j2_ut_van_vet, u2_no, 0);
u2_noun ret = _play_x(von, sut, gen);
u2_rl_lose(wir_r, von);
u2z(von);
return ret;
}
@ -521,49 +521,49 @@
j2_mcj(Pt6, ut, play)[];
u2_noun // transfer
j2_mc(Pt6, ut, play)(u2_wire wir_r,
j2_mc(Pt6, ut, play)(
u2_noun cor) // retain
{
u2_noun sut, gen, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &gen, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &gen, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, play)(wir_r, van, sut, gen);
return j2_mcx(Pt6, ut, play)(van, sut, gen);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, play)(u2_wire wir_r,
j2_mci(Pt6, ut, play)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun gen) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "play");
u2_weak hoc = u2_cj_look(van, "play");
if ( u2_none == hoc ) {
c3_assert(!"register play");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam, u2_rx(wir_r, gen), 0);
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam, u2k(gen), 0);
if ( (u2_none == j2_mcj(Pt6, ut, play)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, play)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, play)(u2_wire wir_r,
j2_mcy(Pt6, ut, play)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun gen) // retain
@ -571,19 +571,19 @@
u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, play)[0];
if ( jet_j->sat_s == u2_jet_live ) {
return j2_mcx(Pt6, ut, play)(wir_r, van, sut, gen);
return j2_mcx(Pt6, ut, play)(van, sut, gen);
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, play)(wir_r, van, sut, gen);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, play)(van, sut, gen);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}

View File

@ -8,69 +8,69 @@
/* logic
*/
u2_noun // transfer
j2_mcy(Pt6, ut, repo)(u2_wire wir_r,
j2_mcy(Pt6, ut, repo)(
u2_noun van, // retain
u2_noun sut) // retain
{
u2_noun p_sut, q_sut;
if ( u2_no == u2_dust(sut) ) switch ( sut ) {
default: return u2_rx(wir_r, sut);
if ( u2_no == u2du(sut) ) switch ( sut ) {
default: return u2k(sut);
case c3__noun:
return u2_bt(wir_r, c3__fork,
u2_bc(wir_r, c3__atom, u2_blip),
u2_bt(wir_r, c3__cell, c3__noun, c3__noun));
return u2nt(c3__fork,
u2nc(c3__atom, u2_blip),
u2nt(c3__cell, c3__noun, c3__noun));
}
else switch ( u2_h(sut) ) {
else switch ( u2h(sut) ) {
default: {
return u2_bl_error(wir_r, "repo-flat");
return u2_cm_error("repo-flat");
}
case c3__bull: {
if ( u2_no == u2_as_cell(u2_t(sut), &p_sut, &q_sut)) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_cell(u2t(sut), &p_sut, &q_sut)) {
return u2_cm_bail(c3__fail);
} else {
return u2_rx(wir_r, q_sut);
return u2k(q_sut);
}
}
case c3__core: {
if ( u2_no == u2_as_cell(u2_t(sut), &p_sut, &q_sut) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_cell(u2t(sut), &p_sut, &q_sut) ) {
return u2_cm_bail(c3__fail);
} else {
return u2_bt(wir_r, c3__cell, c3__noun, u2_rx(wir_r, p_sut));
return u2nt(c3__cell, c3__noun, u2k(p_sut));
}
}
case c3__cube: {
if ( u2_no == u2_as_cell(u2_t(sut), &p_sut, &q_sut)) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_cell(u2t(sut), &p_sut, &q_sut)) {
return u2_cm_bail(c3__fail);
} else {
return u2_rx(wir_r, q_sut);
return u2k(q_sut);
}
}
case c3__face: {
if ( u2_no == u2_as_cell(u2_t(sut), &p_sut, &q_sut)) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_cell(u2t(sut), &p_sut, &q_sut)) {
return u2_cm_bail(c3__fail);
} else {
return u2_rx(wir_r, q_sut);
return u2k(q_sut);
}
}
case c3__hold: {
p_sut = u2_t(sut);
return j2_mcy(Pt6, ut, rest)(wir_r, van, sut, p_sut);
p_sut = u2t(sut);
return j2_mcy(Pt6, ut, rest)(van, sut, p_sut);
}
}
}
u2_noun // transfer
j2_mc(Pt6, ut, repo)(u2_wire wir_r,
j2_mc(Pt6, ut, repo)(
u2_noun cor) // retain
{
u2_noun sut;
if ( u2_none == (sut = u2_frag(u2_cv_sam, cor)) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_none == (sut = u2_cr_at(u2_cv_sam, cor)) ) {
return u2_cm_bail(c3__fail);
} else {
return j2_mcy(Pt6, ut, repo)(wir_r, cor, sut);
return j2_mcy(Pt6, ut, repo)(cor, sut);
}
}

View File

@ -8,98 +8,98 @@
/* logic
*/
static u2_noun
_rest_in_list(u2_wire wir_r,
_rest_in_list(
u2_noun van, // retain
u2_noun leg) // retain
{
if ( u2_nul == leg ) {
return u2_nul;
} else {
u2_noun i_leg = u2_h(leg);
u2_noun t_leg = u2_t(leg);
u2_noun i_leg = u2h(leg);
u2_noun t_leg = u2t(leg);
return u2_bc
(wir_r, j2_mcy(Pt6, ut, play)(wir_r, van, u2_h(i_leg), u2_t(i_leg)),
_rest_in_list(wir_r, van, t_leg));
return u2nc
(j2_mcy(Pt6, ut, play)(van, u2h(i_leg), u2t(i_leg)),
_rest_in_list(van, t_leg));
}
}
static u2_noun
_rest_in_stil(u2_wire wir_r,
_rest_in_stil(
u2_noun van,
u2_noun gar)
{
u2_noun gun = j2_mcc(Pt4, in, gas)(wir_r, u2_nul, gar);
u2_noun nog = j2_mcc(Pt4, in, tap)(wir_r, gun, u2_nul);
u2_noun gun = j2_mcc(Pt4, in, gas)(u2_nul, gar);
u2_noun nog = j2_mcc(Pt4, in, tap)(gun, u2_nul);
u2_rl_lose(wir_r, gun);
u2z(gun);
return nog;
}
static u2_noun // produce
_rest_in_fork(u2_wire wir_r,
_rest_in_fork(
u2_noun nog, // retain
u2_noun fub) // retain
{
if ( u2_no == u2_dust(nog) ) {
if ( u2_no == u2du(nog) ) {
return fub;
} else {
u2_noun buf = _rest_in_fork
(wir_r,
u2_t(nog),
j2_mby(Pt6, fork)(wir_r, u2_h(nog), fub));
(
u2t(nog),
j2_mby(Pt6, fork)(u2h(nog), fub));
u2_rz(wir_r, fub);
u2z(fub);
return buf;
}
}
static u2_noun // produce
_rest_in(u2_wire wir_r,
_rest_in(
u2_noun van, // retain
u2_noun leg) // retain
{
u2_noun gar = _rest_in_list(wir_r, van, leg);
u2_noun nog = _rest_in_stil(wir_r, van, gar);
u2_noun fub = _rest_in_fork(wir_r, nog, c3__void);
u2_noun gar = _rest_in_list(van, leg);
u2_noun nog = _rest_in_stil(van, gar);
u2_noun fub = _rest_in_fork(nog, c3__void);
u2_rl_lose(wir_r, gar);
u2_rl_lose(wir_r, nog);
u2z(gar);
u2z(nog);
return fub;
}
static u2_bean
_rest_hit_fan(u2_wire wir_r,
_rest_hit_fan(
u2_noun fan, // retain
u2_noun leg) // retain
{
if ( u2_nul == leg ) {
return u2_no;
} else {
return u2_or(j2_mcc(Pt4, in, has)(wir_r, fan, u2_h(leg)),
_rest_hit_fan(wir_r, fan, u2_t(leg)));
return u2_or(j2_mcc(Pt4, in, has)(fan, u2h(leg)),
_rest_hit_fan(fan, u2t(leg)));
}
}
u2_noun // produce
j2_mcx(Pt6, ut, rest)(u2_wire wir_r,
j2_mcx(Pt6, ut, rest)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun leg) // retain
{
u2_noun fan = u2_frag(j2_ut_van_fan, van);
u2_noun fan = u2_cr_at(j2_ut_van_fan, van);
if ( u2_yes == _rest_hit_fan(wir_r, fan, leg) ) {
return u2_bl_error(wir_r, "rest-loop");
if ( u2_yes == _rest_hit_fan(fan, leg) ) {
return u2_cm_error("rest-loop");
}
else {
u2_noun naf = j2_mcc(Pt4, in, gas)(wir_r, fan, leg);
u2_noun nav = u2_bn_molt(wir_r, van, j2_ut_van_fan, naf, 0);
u2_noun mez = _rest_in(wir_r, nav, leg);
u2_noun naf = j2_mcc(Pt4, in, gas)(fan, leg);
u2_noun nav = u2_ci_molt(u2k(van), j2_ut_van_fan, naf, 0);
u2_noun mez = _rest_in(nav, leg);
u2_rz(wir_r, naf);
u2_rz(wir_r, nav);
u2z(naf);
u2z(nav);
return mez;
}
}
@ -110,49 +110,49 @@
j2_mcj(Pt6, ut, rest)[];
u2_noun // transfer
j2_mc(Pt6, ut, rest)(u2_wire wir_r,
j2_mc(Pt6, ut, rest)(
u2_noun cor) // retain
{
u2_noun sut, leg, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &leg, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &leg, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, rest)(wir_r, van, sut, leg);
return j2_mcx(Pt6, ut, rest)(van, sut, leg);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, rest)(u2_wire wir_r,
j2_mci(Pt6, ut, rest)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun leg) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "rest");
u2_weak hoc = u2_cj_look(van, "rest");
if ( u2_none == hoc ) {
c3_assert(!"register rest");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam, u2_rx(wir_r, leg), 0);
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam, u2k(leg), 0);
if ( (u2_none == j2_mcj(Pt6, ut, rest)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, rest)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, rest)(u2_wire wir_r,
j2_mcy(Pt6, ut, rest)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun leg) // retain
@ -161,50 +161,50 @@
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return j2_mcx(Pt6, ut, rest)(wir_r, van, sut, leg);
return j2_mcx(Pt6, ut, rest)(van, sut, leg);
}
else {
c3_m fun_m = c3__rest;
u2_noun pro = u2_rl_find_cell(wir_r, fun_m, sut, leg);
u2_noun pro = u2_ch_find_2(fun_m, sut, leg);
if ( u2_none != pro ) {
return pro;
}
else {
pro = j2_mcx(Pt6, ut, rest)(wir_r, van, sut, leg);
pro = j2_mcx(Pt6, ut, rest)(van, sut, leg);
return u2_rl_save_cell(wir_r, fun_m, sut, leg, pro);
return u2_ch_save_2(fun_m, sut, leg, pro);
}
}
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, rest)(wir_r, van, sut, leg);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, rest)(van, sut, leg);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}
}
u2_weak
j2_mck(Pt6, ut, rest)(u2_wire wir_r,
j2_mck(Pt6, ut, rest)(
u2_noun cor)
{
u2_noun sut, leg, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &leg, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &leg, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_none;
} else {
return u2_rc(wir_r, u2_rx(wir_r, sut), u2_rx(wir_r, leg));
return u2nc(u2k(sut), u2k(leg));
}
}

View File

@ -8,25 +8,25 @@
/* logic
*/
static u2_noun // produce
_seek_flat(u2_wire wir_r,
_seek_flat(
u2_noun wob) // retain
{
if ( u2_nul == wob ) {
return u2_nul;
} else {
u2_noun i_wob = u2_h(wob);
u2_noun t_wob = u2_t(wob);
u2_noun i_wob = u2h(wob);
u2_noun t_wob = u2t(wob);
return u2_bc
(wir_r, u2_bc(wir_r, u2_rx(wir_r, u2_h(i_wob)),
u2_bt(wir_r, c3__ash, u2_nul, _1)),
_seek_flat(wir_r, t_wob));
return u2nc
(u2nc(u2k(u2h(i_wob)),
u2nt(c3__ash, u2_nul, 1)),
_seek_flat(t_wob));
}
}
#if 0
static u2_noun // transfer
_seek_silk_yew(u2_wire wir_r,
_seek_silk_yew(
u2_noun van, // retain
u2_noun syx, // retain
u2_noun qq_tor) // retain
@ -35,44 +35,44 @@
return u2_nul;
}
else {
u2_noun iqq_tor = u2_h(qq_tor);
u2_noun qiqq_tor = u2_t(iqq_tor);
u2_noun yon = _seek_silk_yew(wir_r, van, syx, u2_t(qq_tor));
u2_noun iqq_tor = u2h(qq_tor);
u2_noun qiqq_tor = u2t(iqq_tor);
u2_noun yon = _seek_silk_yew(van, syx, u2t(qq_tor));
if ( c3__yew != u2_h(qiqq_tor) ) {
if ( c3__yew != u2h(qiqq_tor) ) {
return yon;
} else {
u2_noun nuy = j2_mby(Pt6, look)(wir_r, syx, u2_t(qiqq_tor));
u2_noun nuy = j2_mby(Pt6, look)(syx, u2t(qiqq_tor));
if ( u2_nul == nuy ) {
return u2_bl_error(wir_r, "silk");
return u2_cm_error("silk");
}
else {
yon = u2_bc(wir_r, u2_rx(wir_r, u2_t(nuy)), yon);
u2_rz(wir_r, nuy);
yon = u2nc(u2k(u2t(nuy)), yon);
u2z(nuy);
return yon;
}
}
}
}
static u2_noun // retain
_seek_silk_yaw(u2_noun wir_r,
_seek_silk_yaw(u2_noun
u2_noun hey) // retain
{
u2_atom axe = 0;
while ( u2_nul != hey ) {
if ( axe == 0 ) {
axe = u2_h(u2_h(hey));
} else if ( axe != u2_h(u2_h(hey)) ) {
return u2_bl_error(wir_r, "silk");
axe = u2h(u2h(hey));
} else if ( axe != u2h(u2h(hey)) ) {
return u2_cm_error("silk");
}
hey = u2_t(hey);
hey = u2t(hey);
}
}
static u2_noun // transfer
_seek_silk_fum(u2_noun wir_r,
_seek_silk_fum(u2_noun
u2_noun hey, // retain
u2_noun qq_tor)
{
@ -80,14 +80,14 @@
return u2_nul;
}
c3_assert(u2_nul != hey);
return u2_bc
(wir_r, u2_bc(wir_r, u2_rx(wir_r, u2_h(u2_h(qq_tor))),
u2_rx(wir_r, u2_t(u2_h(hey)))),
_seek_silk_fum(wir_r, u2_t(hey), u2_t(qq_tor)));
return u2nc
(u2nc(u2k(u2h(u2h(qq_tor))),
u2k(u2t(u2h(hey)))),
_seek_silk_fum(u2t(hey), u2t(qq_tor)));
}
static u2_noun // transfer
_seek_silk(u2_wire wir_r,
_seek_silk(
u2_noun van, // retain
u2_noun syx, // retain
u2_noun tor) // retain
@ -95,124 +95,124 @@
u2_noun p_tor, q_tor, pq_tor, qq_tor;
u2_noun hey, ret;
u2_as_cell(tor, &p_tor, &q_tor);
if ( u2_yes == u2_h(q_tor) ) {
u2_cr_cell(tor, &p_tor, &q_tor);
if ( u2_yes == u2h(q_tor) ) {
return u2_nul;
}
u2_as_cell(u2_t(q_tor), &pq_tor, &qq_tor);
u2_cr_cell(u2t(q_tor), &pq_tor, &qq_tor);
hey = _seek_silk_yew(wir_r, van, syx, qq_tor);
hey = _seek_silk_yew(van, syx, qq_tor);
if ( u2_nul == hey ) {
return u2_nul;
}
if ( u2_ckb_lent(u2_rx(wir_r, hey)) !=
u2_ckb_lent(u2_rx(wir_r, qq_tor)) )
if ( u2_ckb_lent(u2k(hey)) !=
u2_ckb_lent(u2k(qq_tor)) )
{
return u2_bl_error(wir_r, "silk");
return u2_cm_error("silk");
}
ret = u2_bq
(wir_r, u2_nul,
ret = u2nq
(u2_nul,
u2_no,
j2_mbc(Pt3, peg)(wir_r, pq_tor, _seek_silk_yaw(wir_r, hey)),
_seek_silk_fum(wir_r, hey, qq_tor));
j2_mbc(Pt3, peg)(pq_tor, _seek_silk_yaw(hey)),
_seek_silk_fum(hey, qq_tor));
u2_rz(wir_r, hey);
u2z(hey);
return ret;
}
#endif
u2_noun // transfer
j2_mcx(Pt6, ut, seek)(u2_wire wir_r,
j2_mcx(Pt6, ut, seek)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun way, // retain
u2_noun hyp) // retain
{
if ( u2_nul == hyp ) {
return u2_bt
(wir_r, _1, u2_yes, u2_rx(wir_r, sut));
return u2nt
(1, u2_yes, u2k(sut));
}
else if ( u2_no == u2_dust(hyp) ) {
return u2_bl_bail(wir_r, c3__fail);
else if ( u2_no == u2du(hyp) ) {
return u2_cm_bail(c3__fail);
}
else {
u2_noun i_hyp = u2_h(hyp);
u2_noun t_hyp = u2_t(hyp);
u2_noun i_hyp = u2h(hyp);
u2_noun t_hyp = u2t(hyp);
u2_noun zar;
u2_noun p_zar, q_zar;
u2_noun yip, syp, ret;
if ( u2_yes == u2_dust(i_hyp) ) {
yip = u2_rx(wir_r, i_hyp);
if ( u2_yes == u2du(i_hyp) ) {
yip = u2k(i_hyp);
} else {
yip = u2_bt(wir_r, u2_no, 0, u2_rx(wir_r, i_hyp));
yip = u2nt(u2_no, 0, u2k(i_hyp));
}
zar = j2_mcx(Pt6, ut, seek)(wir_r, van, sut, way, t_hyp);
u2_as_cell(zar, &p_zar, &q_zar);
zar = j2_mcx(Pt6, ut, seek)(van, sut, way, t_hyp);
u2_cr_cell(zar, &p_zar, &q_zar);
#if 0
if ( u2_yes == u2_h(yip) ) {
if ( u2_yes == u2h(yip) ) {
sic = u2_nul;
} else {
// sic = _seek_silk(wir_r, van, u2_h(u2_t(yip)), zar);
// sic = _seek_silk(van, u2h(u2t(yip)), zar);
sic = u2_nul;
}
if ( u2_nul != sic ) {
u2_rz(wir_r, yip);
u2_rz(wir_r, zar);
u2z(yip);
u2z(zar);
return u2_t(sic);
return u2t(sic);
}
#endif
if ( u2_yes == u2_h(q_zar) ) {
syp = u2_rx(wir_r, u2_t(q_zar));
if ( u2_yes == u2h(q_zar) ) {
syp = u2k(u2t(q_zar));
} else {
u2_noun pq_zar, qq_zar;
u2_noun wip;
u2_as_cell(u2_t(q_zar), &pq_zar, &qq_zar);
wip = _seek_flat(wir_r, qq_zar);
syp = j2_mcy(Pt6, ut, fire)(wir_r, van, sut, wip);
u2_cr_cell(u2t(q_zar), &pq_zar, &qq_zar);
wip = _seek_flat(qq_zar);
syp = j2_mcy(Pt6, ut, fire)(van, sut, wip);
u2_rz(wir_r, wip);
u2z(wip);
}
if ( u2_no == u2_h(yip) ) {
if ( u2_no == u2h(yip) ) {
u2_noun p_yip, q_yip, hud;
if ( u2_no == u2_as_cell(u2_t(yip), &p_yip, &q_yip) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_cell(u2t(yip), &p_yip, &q_yip) ) {
return u2_cm_bail(c3__fail);
}
hud = j2_mcy(Pt6, ut, fink)(wir_r, van, syp, p_yip, way, q_yip);
hud = j2_mcy(Pt6, ut, fink)(van, syp, p_yip, way, q_yip);
{
u2_noun p_hud, q_hud;
u2_as_cell(hud, &p_hud, &q_hud);
u2_cr_cell(hud, &p_hud, &q_hud);
ret = u2_bc(wir_r, j2_mbc(Pt3, peg)(wir_r, p_zar, p_hud),
u2_rx(wir_r, q_hud));
u2_rz(wir_r, hud);
ret = u2nc(j2_mbc(Pt3, peg)(p_zar, p_hud),
u2k(q_hud));
u2z(hud);
}
}
else {
u2_noun p_yip = u2_t(yip);
u2_noun p_yip = u2t(yip);
if ( u2_no == u2_stud(p_yip) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2ud(p_yip) ) {
return u2_cm_bail(c3__fail);
}
else {
ret = u2_bt
(wir_r, j2_mbc(Pt3, peg)(wir_r, p_zar, p_yip),
ret = u2nt
(j2_mbc(Pt3, peg)(p_zar, p_yip),
u2_yes,
j2_mcy(Pt6, ut, peek)(wir_r, van, syp, way, p_yip));
j2_mcy(Pt6, ut, peek)(van, syp, way, p_yip));
}
}
u2_rz(wir_r, yip);
u2_rz(wir_r, syp);
u2_rz(wir_r, zar);
u2z(yip);
u2z(syp);
u2z(zar);
return ret;
}
}
@ -223,56 +223,56 @@
j2_mcj(Pt6, ut, seek)[];
u2_noun // transfer
j2_mc(Pt6, ut, seek)(u2_wire wir_r,
j2_mc(Pt6, ut, seek)(
u2_noun cor) // retain
{
u2_noun sut, way, hyp, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &way,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &way,
u2_cv_sam_3, &hyp,
u2_cv_con, &van,
0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, seek)(wir_r, van, sut, way, hyp);
return j2_mcx(Pt6, ut, seek)(van, sut, way, hyp);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, seek)(u2_wire wir_r,
j2_mci(Pt6, ut, seek)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun way, // retain
u2_noun hyp) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "seek");
u2_weak hoc = u2_cj_look(van, "seek");
if ( u2_none == hoc ) {
c3_assert(!"register seek");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat,
u2_cv_sam_2, u2_rx(wir_r, way),
u2_cv_sam_3, u2_rx(wir_r, hyp),
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat),
u2_cv_sam_2, u2k(way),
u2_cv_sam_3, u2k(hyp),
0);
if ( (u2_none == j2_mcj(Pt6, ut, seek)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, seek)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, seek)(u2_wire wir_r,
j2_mcy(Pt6, ut, seek)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun way, // retain
@ -282,46 +282,46 @@
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return j2_mcx(Pt6, ut, seek)(wir_r, van, sut, way, hyp);
return j2_mcx(Pt6, ut, seek)(van, sut, way, hyp);
}
else {
c3_m fun_m = c3__seek;
u2_noun pro = u2_rl_find_trel(wir_r, fun_m, sut, way, hyp);
u2_noun pro = u2_ch_find_3(fun_m, sut, way, hyp);
if ( u2_none != pro ) {
return pro;
}
else {
pro = j2_mcx(Pt6, ut, seek)(wir_r, van, sut, way, hyp);
pro = j2_mcx(Pt6, ut, seek)(van, sut, way, hyp);
return u2_rl_save_trel(wir_r, fun_m, sut, way, hyp, pro);
return u2_ch_save_3(fun_m, sut, way, hyp, pro);
}
}
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, seek)(wir_r, van, sut, way, hyp);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, seek)(van, sut, way, hyp);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, seep)(u2_wire wir_r,
j2_mcy(Pt6, ut, seep)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun way, // retain
u2_noun hyp) // retain
{
u2_noun zar = j2_mcy(Pt6, ut, seek)(wir_r, van, sut, way, hyp);
u2_noun zar = j2_mcy(Pt6, ut, seek)(van, sut, way, hyp);
u2_noun p_zar = u2h(zar);
u2_noun q_zar = u2t(zar);
@ -329,30 +329,30 @@
return u2_cm_bail(c3__exit);
}
else {
u2_noun ret = u2_bc(wir_r, u2_rx(wir_r, p_zar),
u2_rx(wir_r, u2t(q_zar)));
u2_noun ret = u2nc(u2k(p_zar),
u2k(u2t(q_zar)));
u2_rz(wir_r, zar);
u2z(zar);
return ret;
}
}
u2_weak
j2_mck(Pt6, ut, seek)(u2_wire wir_r,
j2_mck(Pt6, ut, seek)(
u2_noun cor)
{
u2_noun sut, way, hyp, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &way,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &way,
u2_cv_sam_3, &hyp,
u2_cv_con, &van,
0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_none;
} else {
return u2_rt
(wir_r, u2_rx(wir_r, sut), u2_rx(wir_r, way), u2_rx(wir_r, hyp));
return u2nt
(u2k(sut), u2k(way), u2k(hyp));
}
}

View File

@ -11,51 +11,51 @@
j2_mcj(Pt6, ut, sift)[];
u2_noun // transfer
j2_mc(Pt6, ut, sift)(u2_wire wir_r,
j2_mc(Pt6, ut, sift)(
u2_noun cor) // retain
{
u2_noun sut, ref, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &ref,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &ref,
u2_cv_con, &van,
0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcy(Pt6, ut, sift)(wir_r, van, sut, ref);
return j2_mcy(Pt6, ut, sift)(van, sut, ref);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, sift)(u2_wire wir_r,
j2_mci(Pt6, ut, sift)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun ref) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "sift");
u2_weak hoc = u2_cj_look(van, "sift");
if ( u2_none == hoc ) {
c3_assert(!"register sift");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam, u2_rx(wir_r, ref), 0);
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam, u2k(ref), 0);
if ( (u2_none == j2_mcj(Pt6, ut, sift)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
// c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, sift)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, sift)(u2_wire wir_r,
j2_mcy(Pt6, ut, sift)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun ref) // retain
@ -67,19 +67,19 @@
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return j2_mcx(Pt6, ut, sift)(wir_r, van, sut, ref);
return j2_mcx(Pt6, ut, sift)(van, sut, ref);
}
else {
c3_m fun_m = c3__sift;
u2_noun pro = u2_rl_find_trel(wir_r, fun_m, sut, ref);
u2_noun pro = u2_ch_find_3(fun_m, sut, ref);
if ( u2_none != pro ) {
return pro;
}
else {
pro = j2_mcx(Pt6, ut, sift)(wir_r, van, sut, ref);
pro = j2_mcx(Pt6, ut, sift)(van, sut, ref);
return u2_rl_save_trel(wir_r, fun_m, sut, ref, pro);
return u2_ch_save_3(fun_m, sut, ref, pro);
}
}
return pro;
@ -88,12 +88,12 @@
{
u2_noun cor, pro;
cor = j2_mci(Pt6, ut, sift)(wir_r, van, sut, ref);
cor = j2_mci(Pt6, ut, sift)(van, sut, ref);
pro = u2_nk_soft(wir_r, u2k(cor), u2h(cor));
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_cn_nock_on(u2k(cor), u2k(u2h(cor)));
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2z(cor);
return pro;
#endif
@ -101,20 +101,20 @@
}
u2_weak
j2_mck(Pt6, ut, sift)(u2_wire wir_r,
j2_mck(Pt6, ut, sift)(
u2_noun cor)
{
u2_noun sut, ref, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &ref,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &ref,
u2_cv_con, &van,
0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_none;
} else {
return u2_rc
(wir_r, u2_rx(wir_r, sut), u2_rx(wir_r, ref));
return u2nc
(u2k(sut), u2k(ref));
}
}

View File

@ -11,22 +11,22 @@
/* functions
*/
u2_noun // produce
j2_mcx(Pt6, ut, snub)(u2_wire wir_r,
j2_mcx(Pt6, ut, snub)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun har) // retain
{
if ( u2_no == u2_dust(har) ) {
if ( u2_no == u2du(har) ) {
return u2_nul;
} else {
u2_noun i_har = u2_h(har);
u2_noun t_har = u2_t(har);
u2_noun pi_har = u2_h(i_har);
u2_noun qi_har = u2_t(i_har);
u2_noun peh = j2_mbc(Pt2, flop)(wir_r, pi_har);
u2_noun ret = u2_bc(wir_r, u2_bc(wir_r, peh, u2k(qi_har)),
u2_noun i_har = u2h(har);
u2_noun t_har = u2t(har);
u2_noun pi_har = u2h(i_har);
u2_noun qi_har = u2t(i_har);
u2_noun peh = j2_mbc(Pt2, flop)(pi_har);
u2_noun ret = u2nc(u2nc(peh, u2k(qi_har)),
j2_mcx(Pt6, ut, snub)
(wir_r, van, sut, t_har));
(van, sut, t_har));
return ret;
}
@ -38,52 +38,52 @@
j2_mcj(Pt6, ut, snub)[];
u2_noun // transfer
j2_mc(Pt6, ut, snub)(u2_wire wir_r,
j2_mc(Pt6, ut, snub)(
u2_noun cor) // retain
{
u2_noun van, sut, har;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &har,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &har,
u2_cv_con, &van,
0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, snub)(wir_r, van, sut, har);
return j2_mcx(Pt6, ut, snub)(van, sut, har);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, snub)(u2_wire wir_r,
j2_mci(Pt6, ut, snub)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun har) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "snub");
u2_weak hoc = u2_cj_look(van, "snub");
if ( u2_none == hoc ) {
c3_assert(!"register snub");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam, u2_rx(wir_r, har),
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam, u2k(har),
0);
if ( (u2_none == j2_mcj(Pt6, ut, snub)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, snub)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, snub)(u2_wire wir_r,
j2_mcy(Pt6, ut, snub)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun har) // retain
@ -91,19 +91,19 @@
u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, snub)[0];
if ( jet_j->sat_s == u2_jet_live ) {
return j2_mcx(Pt6, ut, snub)(wir_r, van, sut, har);
return j2_mcx(Pt6, ut, snub)(van, sut, har);
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, snub)(wir_r, van, sut, har);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, snub)(van, sut, har);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}

View File

@ -6,13 +6,13 @@
#include "../pit.h"
static u2_noun
_tack_in(u2_wire, u2_noun, u2_noun, u2_noun, u2_noun, u2_atom);
_tack_in(u2_noun, u2_noun, u2_noun, u2_noun, u2_atom);
/* internals
*/
static u2_noun // transfer
_tack_in(u2_wire wir_r,
_tack_in(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun peh, // retain
@ -21,53 +21,53 @@
{
c3_assert(0);
if ( u2_no == u2_dust(peh) ) {
return u2_bc(wir_r, u2_rx(wir_r, axe), u2_rx(wir_r, mur));
if ( u2_no == u2du(peh) ) {
return u2nc(u2k(axe), u2k(mur));
}
else {
u2_noun i_peh = u2_h(peh);
u2_noun t_peh = u2_t(peh);
u2_noun i_peh = u2h(peh);
u2_noun t_peh = u2t(peh);
if ( (u2_yes == u2_stud(i_peh)) || (u2_no == u2_h(i_peh)) )
if ( (u2_yes == u2ud(i_peh)) || (u2_no == u2h(i_peh)) )
{
u2_noun pi_peh = (u2_yes == u2_stud(i_peh)) ? 0 : u2_h(u2_t(i_peh));
u2_noun qi_peh = (u2_yes == u2_stud(i_peh)) ? i_peh : u2_t(u2_t(i_peh));
u2_noun pi_peh = (u2_yes == u2ud(i_peh)) ? 0 : u2h(u2t(i_peh));
u2_noun qi_peh = (u2_yes == u2ud(i_peh)) ? i_peh : u2t(u2t(i_peh));
u2_noun pok = j2_mcy(Pt6, ut, fink)
(wir_r, van, sut, pi_peh, c3__rite, qi_peh);
u2_noun wuf = j2_mby(Pt6, flay)(wir_r, pok);
u2_noun p_wuf = u2_h(wuf);
u2_noun q_wuf = u2_t(wuf);
u2_noun nax = j2_mbc(Pt3, peg)(wir_r, axe, p_wuf);
u2_noun gav = _tack_in(wir_r, van, q_wuf, t_peh, mur, nax);
u2_noun p_gav = u2_h(gav);
u2_noun q_gav = u2_t(gav);
u2_noun qog = u2_bc(wir_r, u2_nul, u2_rx(wir_r, qi_peh));
u2_noun ret = u2_bc
(wir_r, u2_rx(wir_r, p_gav),
j2_mcy(Pt6, ut, heal)(wir_r, van, sut, qog, p_wuf, q_gav));
(van, sut, pi_peh, c3__rite, qi_peh);
u2_noun wuf = j2_mby(Pt6, flay)(pok);
u2_noun p_wuf = u2h(wuf);
u2_noun q_wuf = u2t(wuf);
u2_noun nax = j2_mbc(Pt3, peg)(axe, p_wuf);
u2_noun gav = _tack_in(van, q_wuf, t_peh, mur, nax);
u2_noun p_gav = u2h(gav);
u2_noun q_gav = u2t(gav);
u2_noun qog = u2nc(u2_nul, u2k(qi_peh));
u2_noun ret = u2nc
(u2k(p_gav),
j2_mcy(Pt6, ut, heal)(van, sut, qog, p_wuf, q_gav));
u2_rz(wir_r, qog);
u2_rz(wir_r, gav);
u2_rz(wir_r, nax);
u2_rz(wir_r, wuf);
u2_rz(wir_r, pok);
u2z(qog);
u2z(gav);
u2z(nax);
u2z(wuf);
u2z(pok);
return ret;
}
else {
u2_noun bax = u2_t(i_peh);
u2_noun vas = j2_mcy(Pt6, ut, peek)(wir_r, van, sut, c3__rite, bax);
u2_noun nax = j2_mbc(Pt3, peg)(wir_r, axe, bax);
u2_noun gav = _tack_in(wir_r, van, vas, t_peh, mur, nax);
u2_noun p_gav = u2_h(gav);
u2_noun q_gav = u2_t(gav);
u2_noun ret = u2_bc
(wir_r, u2_rx(wir_r, p_gav),
j2_mcy(Pt6, ut, heal)(wir_r, van, sut, u2_nul, bax, q_gav));
u2_noun bax = u2t(i_peh);
u2_noun vas = j2_mcy(Pt6, ut, peek)(van, sut, c3__rite, bax);
u2_noun nax = j2_mbc(Pt3, peg)(axe, bax);
u2_noun gav = _tack_in(van, vas, t_peh, mur, nax);
u2_noun p_gav = u2h(gav);
u2_noun q_gav = u2t(gav);
u2_noun ret = u2nc
(u2k(p_gav),
j2_mcy(Pt6, ut, heal)(van, sut, u2_nul, bax, q_gav));
u2_rz(wir_r, gav);
u2_rz(wir_r, nax);
u2_rz(wir_r, vas);
u2z(gav);
u2z(nax);
u2z(vas);
return ret;
}
@ -77,13 +77,13 @@
/* functions
*/
u2_noun // transfer
j2_mcx(Pt6, ut, tack)(u2_wire wir_r,
j2_mcx(Pt6, ut, tack)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun peh, // retain
u2_noun mur) // retain
{
return _tack_in(wir_r, van, sut, peh, mur, _1);
return _tack_in(van, sut, peh, mur, 1);
}
/* boilerplate
@ -92,55 +92,55 @@
j2_mcj(Pt6, ut, tack)[];
u2_noun // transfer
j2_mc(Pt6, ut, tack)(u2_wire wir_r,
j2_mc(Pt6, ut, tack)(
u2_noun cor) // retain
{
u2_noun van, sut, peh, mur;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &peh,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &peh,
u2_cv_sam_3, &mur,
u2_cv_con, &van,
0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, tack)(wir_r, van, sut, peh, mur);
return j2_mcx(Pt6, ut, tack)(van, sut, peh, mur);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, tack)(u2_wire wir_r,
j2_mci(Pt6, ut, tack)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun peh, // retain
u2_noun mur) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "tack");
u2_weak hoc = u2_cj_look(van, "tack");
if ( u2_none == hoc ) {
c3_assert(!"register tack");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam_2, u2_rx(wir_r, peh),
u2_cv_sam_3, u2_rx(wir_r, mur),
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam_2, u2k(peh),
u2_cv_sam_3, u2k(mur),
0);
if ( (u2_none == j2_mcj(Pt6, ut, tack)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, tack)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, tack)(u2_wire wir_r,
j2_mcy(Pt6, ut, tack)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun peh, // retain
@ -149,19 +149,19 @@
u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, tack)[0];
if ( jet_j->sat_s == u2_jet_live ) {
return j2_mcx(Pt6, ut, tack)(wir_r, van, sut, peh, mur);
return j2_mcx(Pt6, ut, tack)(van, sut, peh, mur);
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, tack)(wir_r, van, sut, peh, mur);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, tack)(van, sut, peh, mur);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}

View File

@ -8,41 +8,41 @@
/* internals
*/
static u2_noun // transfer
_tock_in(u2_wire wir_r,
_tock_in(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun peh, // retain
u2_noun mur, // retain
u2_noun men) // retain
{
if ( u2_no == u2_dust(men) ) {
return u2_bc(wir_r, u2_nul, u2_nul);
if ( u2_no == u2du(men) ) {
return u2nc(u2_nul, u2_nul);
}
else {
u2_noun i_men = u2_h(men);
u2_noun pi_men = u2_h(i_men);
u2_noun qi_men = u2_t(i_men);
u2_noun t_men = u2_t(men);
u2_noun geq = j2_mcy(Pt6, ut, tack)(wir_r, van, pi_men, peh, mur);
u2_noun p_geq = u2_h(geq);
u2_noun q_geq = u2_t(geq);
u2_noun mox = _tock_in(wir_r, van, sut, peh, mur, t_men);
u2_noun p_mox = u2_h(mox);
u2_noun q_mox = u2_t(mox);
u2_noun i_men = u2h(men);
u2_noun pi_men = u2h(i_men);
u2_noun qi_men = u2t(i_men);
u2_noun t_men = u2t(men);
u2_noun geq = j2_mcy(Pt6, ut, tack)(van, pi_men, peh, mur);
u2_noun p_geq = u2h(geq);
u2_noun q_geq = u2t(geq);
u2_noun mox = _tock_in(van, sut, peh, mur, t_men);
u2_noun p_mox = u2h(mox);
u2_noun q_mox = u2t(mox);
u2_noun ret;
ret = u2_bc(wir_r,
ret = u2nc(
( (u2_nul == p_mox)
? u2_bc(wir_r, u2_nul, u2_rx(wir_r, p_geq))
: (u2_no == u2_sing(p_geq, u2_t(p_mox)))
? u2_bl_bail(wir_r, c3__exit)
: u2_rx(wir_r, p_mox) ),
u2_bc(wir_r, u2_bc(wir_r, u2_rx(wir_r, q_geq),
u2_rx(wir_r, qi_men)),
u2_rx(wir_r, q_mox)));
? u2nc(u2_nul, u2k(p_geq))
: (u2_no == u2_cr_sing(p_geq, u2t(p_mox)))
? u2_cm_bail(c3__exit)
: u2k(p_mox) ),
u2nc(u2nc(u2k(q_geq),
u2k(qi_men)),
u2k(q_mox)));
u2_rz(wir_r, mox);
u2_rz(wir_r, geq);
u2z(mox);
u2z(geq);
return ret;
}
}
@ -50,24 +50,24 @@
/* functions
*/
u2_noun // transfer
j2_mcx(Pt6, ut, tock)(u2_wire wir_r,
j2_mcx(Pt6, ut, tock)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun peh, // retain
u2_noun mur, // retain
u2_noun men) // retain
{
u2_noun wib = _tock_in(wir_r, van, sut, peh, mur, men);
u2_noun p_wib = u2_h(wib);
u2_noun q_wib = u2_t(wib);
u2_noun wib = _tock_in(van, sut, peh, mur, men);
u2_noun p_wib = u2h(wib);
u2_noun q_wib = u2t(wib);
if ( u2_nul == p_wib ) {
return u2_bl_bail(wir_r, c3__exit);
return u2_cm_bail(c3__exit);
} else {
u2_noun ret = u2_bc(wir_r, u2_rx(wir_r, u2_t(p_wib)),
u2_rx(wir_r, q_wib));
u2_noun ret = u2nc(u2k(u2t(p_wib)),
u2k(q_wib));
u2_rz(wir_r, wib);
u2z(wib);
return ret;
}
}
@ -78,58 +78,58 @@
j2_mcj(Pt6, ut, tock)[];
u2_noun // transfer
j2_mc(Pt6, ut, tock)(u2_wire wir_r,
j2_mc(Pt6, ut, tock)(
u2_noun cor) // retain
{
u2_noun van, sut, peh, mur, men;
if ( (u2_no == u2_mean(cor, u2_cv_sam_2, &peh,
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &peh,
u2_cv_sam_6, &mur,
u2_cv_sam_7, &men,
u2_cv_con, &van,
0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, tock)(wir_r, van, sut, peh, mur, men);
return j2_mcx(Pt6, ut, tock)(van, sut, peh, mur, men);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, tock)(u2_wire wir_r,
j2_mci(Pt6, ut, tock)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun peh, // retain
u2_noun mur, // retain
u2_noun men) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "tock");
u2_weak hoc = u2_cj_look(van, "tock");
if ( u2_none == hoc ) {
c3_assert(!"register tock");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam_2, u2_rx(wir_r, peh),
u2_cv_sam_6, u2_rx(wir_r, mur),
u2_cv_sam_7, u2_rx(wir_r, men),
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam_2, u2k(peh),
u2_cv_sam_6, u2k(mur),
u2_cv_sam_7, u2k(men),
0);
if ( (u2_none == j2_mcj(Pt6, ut, tock)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, tock)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, tock)(u2_wire wir_r,
j2_mcy(Pt6, ut, tock)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun peh, // retain
@ -139,19 +139,19 @@
u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, tock)[0];
if ( jet_j->sat_s == u2_jet_live ) {
return j2_mcx(Pt6, ut, tock)(wir_r, van, sut, peh, mur, men);
return j2_mcx(Pt6, ut, tock)(van, sut, peh, mur, men);
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, tock)(wir_r, van, sut, peh, mur, men);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, tock)(van, sut, peh, mur, men);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}

View File

@ -6,49 +6,49 @@
#include "../pit.h"
static u2_noun // produce
j2_mcx(Pt6, ut, wrap)(u2_wire wir_r,
j2_mcx(Pt6, ut, wrap)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun yoz) // retain
{
u2_noun p_sut, q_sut;
if ( u2_no == u2_dust(sut) ) {
return u2_bl_error(wir_r, "wrap-type");
if ( u2_no == u2du(sut) ) {
return u2_cm_error("wrap-type");
}
else switch ( u2_h(sut) ) {
default: return u2_bl_error(wir_r, "wrap-type");
else switch ( u2h(sut) ) {
default: return u2_cm_error("wrap-type");
case c3__core: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__core: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
u2_noun pq_sut, qq_sut, rq_sut;
if ( u2_no == u2_as_trel(q_sut, &pq_sut, &qq_sut, &rq_sut) ) {
return u2_bl_bail(wir_r, c3__fail);
if ( u2_no == u2_cr_trel(q_sut, &pq_sut, &qq_sut, &rq_sut) ) {
return u2_cm_bail(c3__fail);
}
else if ( c3__gold != pq_sut ) {
return u2_bl_error(wir_r, "wrap-gold");
return u2_cm_error("wrap-gold");
}
else {
return u2_bt(wir_r, c3__core,
u2_rx(wir_r, p_sut),
u2_bt(wir_r, u2_rx(wir_r, yoz),
u2_rx(wir_r, qq_sut),
u2_rx(wir_r, rq_sut)));
return u2nt(c3__core,
u2k(p_sut),
u2nt(u2k(yoz),
u2k(qq_sut),
u2k(rq_sut)));
}
}
case c3__fork: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
case c3__fork: u2_cx_cell(u2t(sut), &p_sut, &q_sut);
{
return j2_mby(Pt6, fork)
(wir_r, j2_mcx(Pt6, ut, wrap)(wir_r, van, p_sut, yoz),
j2_mcx(Pt6, ut, wrap)(wir_r, van, q_sut, yoz));
(j2_mcx(Pt6, ut, wrap)(van, p_sut, yoz),
j2_mcx(Pt6, ut, wrap)(van, q_sut, yoz));
}
case c3__hold:
{
u2_type fop = j2_mcy(Pt6, ut, repo)(wir_r, van, sut);
u2_noun pro = j2_mcx(Pt6, ut, wrap)(wir_r, van, fop, yoz);
u2_noun fop = j2_mcy(Pt6, ut, repo)(van, sut);
u2_noun pro = j2_mcx(Pt6, ut, wrap)(van, fop, yoz);
u2_rl_lose(wir_r, fop);
u2z(fop);
return pro;
}
}
@ -60,49 +60,49 @@
j2_mcj(Pt6, ut, wrap)[];
u2_noun // transfer
j2_mc(Pt6, ut, wrap)(u2_wire wir_r,
j2_mc(Pt6, ut, wrap)(
u2_noun cor) // retain
{
u2_noun sut, yoz, van;
if ( (u2_no == u2_mean(cor, u2_cv_sam, &yoz, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_frag(u2_cv_sam, van))) )
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam, &yoz, u2_cv_con, &van, 0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_bl_bail(wir_r, c3__fail);
return u2_cm_bail(c3__fail);
} else {
return j2_mcx(Pt6, ut, wrap)(wir_r, van, sut, yoz);
return j2_mcx(Pt6, ut, wrap)(van, sut, yoz);
}
}
u2_weak // transfer
j2_mci(Pt6, ut, wrap)(u2_wire wir_r,
j2_mci(Pt6, ut, wrap)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun yoz) // retain
{
u2_weak hoc = u2_ds_look(wir_r, van, "wrap");
u2_weak hoc = u2_cj_look(van, "wrap");
if ( u2_none == hoc ) {
c3_assert(!"register wrap");
return u2_none;
} else {
u2_weak von = u2_rl_molt(wir_r, van, u2_cv_sam, u2_rx(wir_r, sut), 0);
u2_weak gat = u2_nk_soft(wir_r, von, hoc);
u2_weak cor = u2_rl_molt(wir_r, gat, u2_cv_sam, u2_rx(wir_r, yoz), 0);
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat), u2_cv_sam, u2k(yoz), 0);
if ( (u2_none == j2_mcj(Pt6, ut, wrap)[0].xip) ) {
u2_noun xip = u2_ds_find(wir_r, cor);
u2_noun xip = u2_cj_find(cor);
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, wrap)[0].xip = xip;
}
u2_rl_lose(wir_r, gat);
u2z(gat);
return cor;
}
}
u2_noun // transfer
j2_mcy(Pt6, ut, wrap)(u2_wire wir_r,
j2_mcy(Pt6, ut, wrap)(
u2_noun van, // retain
u2_noun sut, // retain
u2_noun yoz) // retain
@ -111,33 +111,33 @@
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
if ( !(jet_j->sat_s & u2_jet_memo) ) {
return j2_mcx(Pt6, ut, wrap)(wir_r, van, sut, yoz);
return j2_mcx(Pt6, ut, wrap)(van, sut, yoz);
}
else {
c3_m fun_m = c3__wrap;
u2_noun pro = u2_rl_find_cell(wir_r, fun_m, sut, yoz);
u2_noun pro = u2_ch_find_2(fun_m, sut, yoz);
if ( u2_none != pro ) {
return pro;
}
else {
pro = j2_mcx(Pt6, ut, wrap)(wir_r, van, sut, yoz);
pro = j2_mcx(Pt6, ut, wrap)(van, sut, yoz);
return u2_rl_save_cell(wir_r, fun_m, sut, yoz, pro);
return u2_ch_save_2(fun_m, sut, yoz, pro);
}
}
}
else {
u2_noun cor, fol, pro;
cor = j2_mci(Pt6, ut, wrap)(wir_r, van, sut, yoz);
fol = u2_h(cor);
cor = j2_mci(Pt6, ut, wrap)(van, sut, yoz);
fol = u2h(cor);
pro = u2_ho_use(wir_r, jet_j, cor, fol);
if ( u2_none == pro ) return u2_bl_bail(wir_r, c3__fail);
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
u2_rz(wir_r, cor);
u2_rz(wir_r, fol);
u2z(cor);
u2z(fol);
return pro;
}

View File

@ -8,11 +8,13 @@
*** u2_cc_: constants.
*** u2_ch_: memoization.
*** u2_ci_: noun constructors
*** u2_cj_: jets.
*** u2_cm_: system management etc.
*** u2_cn_: nock interpreter.
*** u2_co_: fundamental macros.
*** u2_cr_: read functions which never bail out.
*** u2_cs_: structures and definitions.
*** u2_ct_: tracing.
*** u2_cx_: read functions which do bail out.
***
*** u2_cr_ and u2_cx_ functions use retain conventions; the caller
@ -700,6 +702,15 @@
u2_noun b,
u2_noun* c);
/* u2_cr_bush():
**
** Factor [a] as a bush [b.[p q] c].
*/
u2_bean
u2_cr_bush(u2_noun a,
u2_noun* b,
u2_noun* c);
/* u2_cr_pq():
**
** & [0] if [a] is of the form [b *c d].
@ -860,7 +871,7 @@
c3_i
u2_cm_bail(c3_m how_m);
/* u2_cm_error(): bail out with %exit, pushing error.
/* u2_cm_error(): bail out with %exit, ct_pushing error.
*/
c3_i
u2_cm_error(c3_c* str_c);
@ -1107,15 +1118,20 @@
u2_noun
u2_cn_slam_in(u2_noun fly, u2_noun gat, u2_noun sam);
/* u2_cn_nock_an(): as slam_in(), but with empty fly.
*/
u2_noun
u2_cn_nock_an(u2_noun bus, u2_noun fol);
/** Jet firing.
/** Jet firing. (Change retain protocols!)
**/
/* u2_cj_hook():
**
** Execute hook from core.
*/
u2_noun
u2_cj_hook(u2_noun cor,
u2_cj_hook(u2_noun cor, // retain!
const c3_c* tam_c);
/* u2_cj_look():
@ -1123,13 +1139,31 @@
** Produce hook formula from core, or u2_none.
*/
u2_noun // produce
u2_cj_look(u2_noun cor, // retain
const c3_c* tam_c); // retain
u2_cj_look(u2_noun cor, // retain!
const c3_c* tam_c); // retain!
/* u2_cj_find(): find chip by core, or none.
*/
u2_weak // senior
u2_cj_find(u2_noun cor); // retain
u2_cj_find(u2_noun cor); // retain!
/** Tracing.
**/
/* u2_ct_push(): push on trace stack.
*/
void
u2_ct_push(u2_noun mon);
/* u2_ct_mean(): push `[%mean roc]` on trace stack.
*/
void
u2_ct_mean(u2_noun roc);
/* u2_ct_drop(): drop from meaning stack.
*/
void
u2_ct_drop(void);
/** Memoization.