Skip to content

Commit

Permalink
rework expand (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjjfvi authored Mar 5, 2024
1 parent 8559f89 commit 32f80ba
Show file tree
Hide file tree
Showing 37 changed files with 135 additions and 120 deletions.
4 changes: 2 additions & 2 deletions src/host/readback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ impl<'a> ReadbackState<'a> {
/// `vars` map.
fn read_port(&mut self, port: Port, wire: Option<Wire>) -> Tree {
maybe_grow(move || match port.tag() {
Tag::Var => {
Tag::Var | Tag::Red => {
// todo: resolve redirects
let key = wire.unwrap().addr().min(port.addr());
Tree::Var {
nam: create_var(match self.vars.entry(key) {
Expand All @@ -53,7 +54,6 @@ impl<'a> ReadbackState<'a> {
}),
}
}
Tag::Red => self.read_wire(port.wire()),
Tag::Ref if port == Port::ERA => Tree::Era,
Tag::Ref => Tree::Ref { nam: self.host.back[&port.addr()].clone() },
Tag::Num => Tree::Num { val: port.num() },
Expand Down
86 changes: 51 additions & 35 deletions src/run/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ impl<'h, M: Mode> Net<'h, M> {
Net { linker: Linker::new(heap), tid: 0, tids: 1, trgs: Box::new_uninit_slice(1 << 16), root }
}

/// Boots a net from a Ref.
/// Boots a net from a Def.
pub fn boot(&mut self, def: &Def) {
let def = Port::new_ref(def);
trace!(self, def);
self.root.set_target(def);
self.call(Port::new_ref(def), self.root.as_var());
}
}

Expand All @@ -49,36 +47,6 @@ impl<'a, M: Mode> Net<'a, M> {
count
}

/// Expands [`Ref`] nodes in the tree connected to `root`.
#[inline(always)]
pub fn expand(&mut self) {
assert!(!M::LAZY);
fn go<M: Mode>(net: &mut Net<M>, wire: Wire, len: usize, key: usize) {
trace!(net.tracer, wire);
let port = wire.load_target();
trace!(net.tracer, port);
if port == Port::LOCK {
return;
}
if port.tag() == Ctr {
let node = port.traverse_node();
if len >= net.tids || key % 2 == 0 {
go(net, node.p1, len.saturating_mul(2), key / 2);
}
if len >= net.tids || key % 2 == 1 {
go(net, node.p2, len.saturating_mul(2), key / 2);
}
} else if port.tag() == Ref && port != Port::ERA {
let got = wire.swap_target(Port::LOCK);
if got != Port::LOCK {
trace!(net.tracer, port, wire);
net.call(port, Port::new_var(wire.addr()));
}
}
}
go(self, self.root.clone(), 1, self.tid);
}

// Lazy mode weak head normalizer
#[inline(always)]
fn weak_normal(&mut self, mut prev: Port, root: Wire) -> Port {
Expand Down Expand Up @@ -146,7 +114,55 @@ impl<'a, M: Mode> Net<'a, M> {
self.expand();
while !self.redexes.is_empty() {
self.reduce(usize::MAX);
self.expand();
}
}
}
}

impl<'h, M: Mode> Net<'h, M> {
/// Expands [`Tag::Ref`] nodes in the tree connected to `root`.
pub fn expand(&mut self) {
assert!(!M::LAZY);
let (new_root, out_port) = self.create_wire();
let old_root = std::mem::replace(&mut self.root, new_root);
self.link_wire_port(old_root, ExpandDef::new(out_port));
}
}

struct ExpandDef {
out: Port,
}

impl ExpandDef {
fn new(out: Port) -> Port {
Port::new_ref(Box::leak(Box::new(Def::new(LabSet::ALL, ExpandDef { out }))))
}
}

impl AsDef for ExpandDef {
unsafe fn call<M: Mode>(def: *const Def<Self>, net: &mut Net<M>, port: Port) {
if port.tag() == Tag::Ref && port != Port::ERA {
let other: *const Def = port.addr().def() as *const _;
if let Some(other) = Def::downcast_ptr::<Self>(other) {
let def = *Box::from_raw(def as *mut Def<Self>);
let other = *Box::from_raw(other as *mut Def<Self>);
return net.link_port_port(def.data.out, other.data.out);
} else {
return net.call(port, Port::new_ref(Def::upcast(unsafe { &*def })));
}
}
let def = *Box::from_raw(def as *mut Def<Self>);
match port.tag() {
Tag::Red => {
unreachable!()
}
Tag::Ref | Tag::Num | Tag::Var => net.link_port_port(def.data.out, port),
tag @ (Tag::Op | Tag::Mat | Tag::Ctr) => {
let old = port.consume_node();
let new = net.create_node(tag, old.lab);
net.link_port_port(def.data.out, new.p0);
net.link_wire_port(old.p1, ExpandDef::new(new.p1));
net.link_wire_port(old.p2, ExpandDef::new(new.p2));
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/run/parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ impl<'h, M: Mode> Net<'h, M> {
pub fn parallel_normal(&mut self) {
assert!(!M::LAZY);

self.expand();

const SHARE_LIMIT: usize = 1 << 12; // max share redexes per split
const LOCAL_LIMIT: usize = 1 << 18; // max local rewrites per epoch

Expand Down Expand Up @@ -77,7 +79,6 @@ impl<'h, M: Mode> Net<'h, M> {
fn main<M: Mode>(ctx: &mut ThreadContext<M>) {
loop {
reduce(ctx);
ctx.net.expand();
if count(ctx) == 0 {
break;
}
Expand Down
1 change: 0 additions & 1 deletion src/transform/pre_reduce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ impl Book {

let mut rt = run::Net::<run::Strict>::new(&area);
rt.boot(host.defs.get(nam).expect("No function."));
rt.expand();
rt.reduce(max_rwts as usize);

// Move interactions with inert defs back into the net redexes array
Expand Down
5 changes: 2 additions & 3 deletions tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,15 @@ fn test_cli_errors() {
fn test_apply_tree() {
use hvmc::run;
fn eval_with_args(fun: &str, args: &[&str]) -> Net {
let area = run::Heap::new_words(1 << 10);
let area = run::Heap::new_words(16);

let mut fun: Net = fun.parse().unwrap();
for arg in args {
let arg: Tree = arg.parse().unwrap();
fun.apply_tree(arg)
}
// TODO: When feature/sc-472/argument-passing, use encode_net instead.
let host = Host::default();

let host = Host::default();
let mut rnet = run::Net::<run::Strict>::new(&area);
let root_port = run::Trg::port(run::Port::new_var(rnet.root.addr()));
host.encode_net(&mut rnet, root_port, &fun);
Expand Down
24 changes: 12 additions & 12 deletions tests/lists.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ fn test_list_got() {
rwts_list.push(rwts.total())
}

assert_debug_snapshot!(rwts_list[0], @"579");
assert_debug_snapshot!(rwts_list[1], @"601");
assert_debug_snapshot!(rwts_list[2], @"645");
assert_debug_snapshot!(rwts_list[3], @"733");
assert_debug_snapshot!(rwts_list[4], @"909");
assert_debug_snapshot!(rwts_list[5], @"1261");
assert_debug_snapshot!(rwts_list[0], @"594");
assert_debug_snapshot!(rwts_list[1], @"623");
assert_debug_snapshot!(rwts_list[2], @"681");
assert_debug_snapshot!(rwts_list[3], @"797");
assert_debug_snapshot!(rwts_list[4], @"1029");
assert_debug_snapshot!(rwts_list[5], @"1493");

// Tests the linearity of the function
let delta = rwts_list[1] - rwts_list[0];
Expand All @@ -59,12 +59,12 @@ fn test_list_put() {
rwts_list.push(rwts.total())
}

assert_debug_snapshot!(rwts_list[0], @"570");
assert_debug_snapshot!(rwts_list[1], @"593");
assert_debug_snapshot!(rwts_list[2], @"639");
assert_debug_snapshot!(rwts_list[3], @"731");
assert_debug_snapshot!(rwts_list[4], @"915");
assert_debug_snapshot!(rwts_list[5], @"1283");
assert_debug_snapshot!(rwts_list[0], @"585");
assert_debug_snapshot!(rwts_list[1], @"615");
assert_debug_snapshot!(rwts_list[2], @"675");
assert_debug_snapshot!(rwts_list[3], @"795");
assert_debug_snapshot!(rwts_list[4], @"1035");
assert_debug_snapshot!(rwts_list[5], @"1515");

//Tests the linearity of the function
let delta = rwts_list[1] - rwts_list[0];
Expand Down
4 changes: 2 additions & 2 deletions tests/numeric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn test_add() {
let net = op_net(10, Op::Add, 2);
let (rwts, net) = normal(net, 16);
assert_snapshot!(Net::to_string(&net), @"#12");
assert_debug_snapshot!(rwts.total(), @"2");
assert_debug_snapshot!(rwts.total(), @"3");
}

#[test]
Expand Down Expand Up @@ -117,5 +117,5 @@ fn test_div_by_0() {
let net = op_net(9, Op::Div, 0);
let (rwts, net) = normal(net, 16);
assert_snapshot!(Net::to_string(&net), @"#0");
assert_debug_snapshot!(rwts.total(), @"2");
assert_debug_snapshot!(rwts.total(), @"3");
}
4 changes: 2 additions & 2 deletions tests/snapshots/tests__run@alloc_big_tree.hvmc.snap

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions tests/snapshots/tests__run@alloc_small_tree.hvmc.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ expression: output
input_file: tests/programs/alloc_small_tree.hvmc
---
(a (* a))
RWTS : 99
RWTS : 104
- ANNI : 43
- COMM : 13
- ERAS : 17
- DREF : 26
- DREF : 31
- OPER : 0
4 changes: 2 additions & 2 deletions tests/snapshots/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ expression: output
input_file: examples/arithmetic.hvmc
---
({3 </ a b> <% c d>} ({5 a c} [b d]))
RWTS : 7
RWTS : 18
- ANNI : 4
- COMM : 0
- ERAS : 0
- DREF : 3
- DREF : 14
- OPER : 0
4 changes: 2 additions & 2 deletions tests/snapshots/tests__run@chained_ops.hvmc.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ expression: output
input_file: tests/programs/chained_ops.hvmc
---
#7184190578800
RWTS : 27
RWTS : 28
- ANNI : 2
- COMM : 4
- ERAS : 0
- DREF : 1
- DREF : 2
- OPER : 20
4 changes: 2 additions & 2 deletions tests/snapshots/tests__run@church_encoding__church.hvmc.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ expression: output
input_file: examples/church_encoding/church.hvmc
---
({11 {7 (a {5 b c}) {9 (d a) ({5 c e} d)}} {3 (f e) {3 (g f) {3 (h g) {3 (i h) *}}}}} (i b))
RWTS : 37
RWTS : 65
- ANNI : 25
- COMM : 1
- ERAS : 0
- DREF : 11
- DREF : 39
- OPER : 0
4 changes: 2 additions & 2 deletions tests/snapshots/tests__run@church_exp.hvmc.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ expression: output
input_file: tests/programs/church_exp.hvmc
---
({2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 ({2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 a b} c} d} e} f} g} h} i} j} k} l} m} n} o} p} q} r} s} t} u} v} w} x} y} z} aa} ab} ac} ad} ae} af} ag} ah} ai} aj} ak} al} am} an} ao} ap} aq} ar} as} at} au} av} aw} ax} ay} az} ba} bb} bc} bd} be} bf} bg} bh} bi} bj} bk} bl} bm} bn} bo} bp} bq} br} bs} bt} bu} bv} bw} bx} by} bz} ca} cb} cc} cd} ce} cf} cg} ch} ci} cj} ck} cl} cm} cn} co} cp} cq} cr} cs} ct} cu} cv} cw} cx} cy} cz} da} db} dc} dd} de} df} dg} dh} di} dj} dk} dl} dm} dn} do} dp} dq} dr} ds} dt} du} dv} dw} dx} dy} dz} ea} eb} ec} ed} ee} ef} eg} eh} ei} ej} ek} el} em} en} eo} ep} eq} er} es} et} eu} ev} ew} ex} ey} ez} fa} fb} fc} fd} fe} ff} fg} fh} fi} fj} fk} fl} fm} fn} fo} fp} fq} fr} fs} ft} fu} fv} fw} fx} fy} fz} ga} gb} gc} gd} ge} gf} gg} gh} gi} gj} gk} gl} gm} gn} go} gp} gq} gr} gs} gt} gu} gv} gw} gx} gy} gz} ha} hb} hc} hd} he} hf} hg} hh} hi} hj} hk} hl} hm} hn} ho} hp} hq} hr} hs} ht} hu} hv} hw} hx} hy} hz} ia} ib} ic} id} ie} if} ig} ih} ii} ij} ik} il} im} in} io} ip} iq} ir} is} it} iu} iv} iw} ix} iy} iz} ja} jb} jc} jd} je} jf} jg} jh} ji} jj} jk} jl} jm} jn} jo} jp} jq} jr} js} jt} ju} jv} jw} jx} jy} jz} ka} kb} kc} kd} ke} kf} kg} kh} ki} kj} kk} kl} km} kn} ko} kp} kq} kr} ks} kt} ku} kv} kw} kx} ky} kz} la} lb} lc} ld} le} lf} lg} lh} li} lj} lk} ll} lm} ln} lo} lp} lq} lr} ls} lt} lu} lv} lw} lx} ly} lz} ma} mb} mc} md} me} mf} mg} mh} mi} mj} mk} ml} mm} mn} mo} mp} mq} mr} ms} mt} mu} mv} mw} mx} my) (my mz)} (mz na)} (na nb)} (nb nc)} (nc nd)} (nd ne)} (ne nf)} (nf ng)} (ng nh)} (nh ni)} (ni nj)} (nj nk)} (nk nl)} (nl nm)} (nm nn)} (nn no)} (no np)} (np nq)} (nq {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 mf mg} mh} mi} mj} mk} ml} mm} mn} mo} mp} mq} mr} ms} mt} mu} mv} mw} mx} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 lm ln} lo} lp} lq} lr} ls} lt} lu} lv} lw} lx} ly} lz} ma} mb} mc} md} me} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 kt ku} kv} kw} kx} ky} kz} la} lb} lc} ld} le} lf} lg} lh} li} lj} lk} ll} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 ka kb} kc} kd} ke} kf} kg} kh} ki} kj} kk} kl} km} kn} ko} kp} kq} kr} ks} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 jh ji} jj} jk} jl} jm} jn} jo} jp} jq} jr} js} jt} ju} jv} jw} jx} jy} jz} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 io ip} iq} ir} is} it} iu} iv} iw} ix} iy} iz} ja} jb} jc} jd} je} jf} jg} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 hv hw} hx} hy} hz} ia} ib} ic} id} ie} if} ig} ih} ii} ij} ik} il} im} in} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 hc hd} he} hf} hg} hh} hi} hj} hk} hl} hm} hn} ho} hp} hq} hr} hs} ht} hu} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 gj gk} gl} gm} gn} go} gp} gq} gr} gs} gt} gu} gv} gw} gx} gy} gz} ha} hb} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 fq fr} fs} ft} fu} fv} fw} fx} fy} fz} ga} gb} gc} gd} ge} gf} gg} gh} gi} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 ex ey} ez} fa} fb} fc} fd} fe} ff} fg} fh} fi} fj} fk} fl} fm} fn} fo} fp} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 ee ef} eg} eh} ei} ej} ek} el} em} en} eo} ep} eq} er} es} et} eu} ev} ew} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 dl dm} dn} do} dp} dq} dr} ds} dt} du} dv} dw} dx} dy} dz} ea} eb} ec} ed} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 cs ct} cu} cv} cw} cx} cy} cz} da} db} dc} dd} de} df} dg} dh} di} dj} dk} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 bz ca} cb} cc} cd} ce} cf} cg} ch} ci} cj} ck} cl} cm} cn} co} cp} cq} cr} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 bg bh} bi} bj} bk} bl} bm} bn} bo} bp} bq} br} bs} bt} bu} bv} bw} bx} by} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 an ao} ap} aq} ar} as} at} au} av} aw} ax} ay} az} ba} bb} bc} bd} be} bf} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 u v} w} x} y} z} aa} ab} ac} ad} ae} af} ag} ah} ai} aj} ak} al} am} {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 {2 b c} d} e} f} g} h} i} j} k} l} m} n} o} p} q} r} s} t} nr}}}}}}}}}}}}}}}}}}})} (a nr))
RWTS : 803
RWTS : 1_948
- ANNI : 401
- COMM : 380
- ERAS : 0
- DREF : 22
- DREF : 1_167
- OPER : 0
4 changes: 2 additions & 2 deletions tests/snapshots/tests__run@church_mul.hvmc.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ expression: output
input_file: tests/programs/church_mul.hvmc
---
({3 (a {3 b {5 c {7 d {9 e {11 f {13 g {15 h {17 i {19 j {21 k {23 l {25 m {27 n {29 o {31 p {33 q {35 r {37 s {39 t u}}}}}}}}}}}}}}}}}}}) {5 (v a) {7 (w v) {9 (x w) {11 (y x) {13 (z y) {15 (aa z) {17 (ab aa) {19 (ac ab) {21 (ad ac) {23 (ae ad) {25 (af ae) {27 (ag af) {29 (ah ag) {31 (ai ah) {33 (aj ai) {35 (ak aj) {37 (al ak) {39 (am al) ({3 c {5 d {7 e {9 f {11 g {13 h {15 i {17 j {19 k {21 l {23 m {25 n {27 o {29 p {31 q {33 r {35 s {37 t {39 u an}}}}}}}}}}}}}}}}}}} am)}}}}}}}}}}}}}}}}}}} (an b))
RWTS : 48
RWTS : 167
- ANNI : 25
- COMM : 19
- ERAS : 0
- DREF : 4
- DREF : 123
- OPER : 0
4 changes: 2 additions & 2 deletions tests/snapshots/tests__run@dec_bits.hvmc.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ expression: output
input_file: tests/programs/dec_bits.hvmc
---
(* (* (a a)))
RWTS : 180_036
RWTS : 180_043
- ANNI : 98_190
- COMM : 11
- ERAS : 32_738
- DREF : 49_097
- DREF : 49_104
- OPER : 0
4 changes: 2 additions & 2 deletions tests/snapshots/tests__run@dec_bits_tree.hvmc.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ expression: output
input_file: tests/programs/dec_bits_tree.hvmc
---
(((((((* (* (a a))) (* (* (b b)))) ((* (* (c c))) (* (* (d d))))) (((* (* (e e))) (* (* (f f)))) ((* (* (g g))) (* (* (h h)))))) ((((* (* (i i))) (* (* (j j)))) ((* (* (k k))) (* (* (l l))))) (((* (* (m m))) (* (* (n n)))) ((* (* (o o))) (* (* (p p))))))) (((((* (* (q q))) (* (* (r r)))) ((* (* (s s))) (* (* (t t))))) (((* (* (u u))) (* (* (v v)))) ((* (* (w w))) (* (* (x x)))))) ((((* (* (y y))) (* (* (z z)))) ((* (* (aa aa))) (* (* (ab ab))))) (((* (* (ac ac))) (* (* (ad ad)))) ((* (* (ae ae))) (* (* (af af)))))))) ((((((* (* (ag ag))) (* (* (ah ah)))) ((* (* (ai ai))) (* (* (aj aj))))) (((* (* (ak ak))) (* (* (al al)))) ((* (* (am am))) (* (* (an an)))))) ((((* (* (ao ao))) (* (* (ap ap)))) ((* (* (aq aq))) (* (* (ar ar))))) (((* (* (as as))) (* (* (at at)))) ((* (* (au au))) (* (* (av av))))))) (((((* (* (aw aw))) (* (* (ax ax)))) ((* (* (ay ay))) (* (* (az az))))) (((* (* (ba ba))) (* (* (bb bb)))) ((* (* (bc bc))) (* (* (bd bd)))))) ((((* (* (be be))) (* (* (bf bf)))) ((* (* (bg bg))) (* (* (bh bh))))) (((* (* (bi bi))) (* (* (bj bj)))) ((* (* (bk bk))) (* (* (bl bl)))))))))
RWTS : 2_874_410
RWTS : 2_874_985
- ANNI : 1_567_101
- COMM : 872
- ERAS : 522_751
- DREF : 783_686
- DREF : 784_261
- OPER : 0
4 changes: 2 additions & 2 deletions tests/snapshots/tests__run@lambda_calculus__hoas.hvmc.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ expression: output
input_file: examples/lambda_calculus/hoas.hvmc
---
(((a (((* a) b) (* (* b)))) c) (* (* c)))
RWTS : 868
RWTS : 886
- ANNI : 484
- COMM : 11
- ERAS : 141
- DREF : 232
- DREF : 250
- OPER : 0
Loading

0 comments on commit 32f80ba

Please sign in to comment.