HBAL Typechecker
Examples:
test_arith.hbal
test_call.hbal
test_jumps.hbal
test_list_paper.hbal
test_move.hbal
test_move_macro.hbal
test_parser.hbal
test_trees.hbal
sign main: { sp: [[code]+]+, r5:[<>]+, r6:[<>]+, r7:[<>]+ } <> main: (* create the tree * 1 * / \ * 2 3 * * result in r5 *) (* r7 : leaf(3) *) use r7 T(int+); arithi r3 <- r0 + 3; store r7[1] <- r3; foldleaf int+, r7[0]; (* r6 : leaf(2) *) use r6 T(int+); arithi r3 <- r0 + 2; store r6[1] <- r3; foldleaf int+, r6[0]; (* r5 : node(r6,r7) *) use r5 T(int+); arithi r3 <- r0 + 1; store r5[1] <- r3; store r5[2] <- r6; store r5[3] <- r7; foldnode int+, r5[0]; ret main; <>