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
(* test if the expansion of the move macro typechecks *) sign main: { sp: [[code]+]+ , r2: [L(int+)]+, r3: [L(int+)-]+ } cpcons: { sp: [[code]+]+, r2: [int+ * int+ * [L(int+)]+]+, r3: [L(int+)-]+ } cpdone: { sp: [[code]+]+ , r2: [L(int+)-]+, r3: [L(int+)]+ } <> main: (* move r3[0] <- r2[0], L(int+); *) caselist int+, r2[0], cpcons; foldnil int+, r3[0]; jmp cpdone; cpcons: (* move r3[1] <- r2[1], int+; *) load r4 <- r2[1]; store r3[1] <- r4; (* move r3[2] <- r2[2], [L(int+)]+; *) load r4 <- r2[2]; store r3[2] <- r4; foldcons int+, r3[0]; cpdone: ret main; <>