From 40024462b898901f404bd3bfe0ce840e2ba83ae0 Mon Sep 17 00:00:00 2001 From: tjjfvi Date: Mon, 27 May 2024 12:49:31 -0400 Subject: [PATCH] rename to hvm-64 --- .github/workflows/bench.yml | 8 +- .github/workflows/delete-cancelled.yml | 4 +- Cargo.lock | 40 +- Cargo.toml | 16 +- README.md | 524 +----------------- ast/Cargo.toml | 6 +- ast/src/ast.rs | 2 +- ast/src/parser.rs | 4 +- cspell.json | 3 - examples/{arithmetic.hvm2 => arithmetic.bend} | 0 examples/{arithmetic.hvmc => arithmetic.hvm} | 0 .../{church.hvm2 => church.bend} | 0 .../{church.hvmc => church.hvm} | 0 .../lambda_calculus/{hoas.hvm2 => hoas.bend} | 0 .../lambda_calculus/{hoas.hvmc => hoas.hvm} | 0 .../{num_add.hvm2 => num_add.bend} | 0 .../machine_u32/{num_add.hvmc => num_add.hvm} | 0 .../{num_match.hvm2 => num_match.bend} | 0 .../{num_match.hvmc => num_match.hvm} | 0 ...ic_sort_lam.hvm2 => bitonic_sort_lam.bend} | 0 ...nic_sort_lam.hvmc => bitonic_sort_lam.hvm} | 0 .../{merge_sort.hvm2 => merge_sort.bend} | 0 .../merge/{merge_sort.hvmc => merge_sort.hvm} | 0 ...adix_sort_ctr.hvm2 => radix_sort_ctr.bend} | 0 ...radix_sort_ctr.hvmc => radix_sort_ctr.hvm} | 0 ...adix_sort_lam.hvm2 => radix_sort_lam.bend} | 0 ...radix_sort_lam.hvmc => radix_sort_lam.hvm} | 0 host/Cargo.toml | 10 +- host/src/calc_labels.rs | 2 +- host/src/encode.rs | 6 +- host/src/host.rs | 4 +- host/src/readback.rs | 6 +- host/src/stdlib.rs | 12 +- runtime/Cargo.toml | 6 +- runtime/src/runtime.rs | 4 +- runtime/src/trace.rs | 18 +- src/args.rs | 12 +- src/compile.rs | 22 +- src/compile/include_files.rs | 8 +- src/full.rs | 20 +- src/main.rs | 36 +- tests/cli.rs | 54 +- tests/compile_files.sh | 4 +- tests/lists.rs | 6 +- tests/loaders.rs | 10 +- ...alloc_big_tree.hvmc => alloc_big_tree.hvm} | 0 ..._small_tree.hvm2 => alloc_small_tree.bend} | 0 ...c_small_tree.hvmc => alloc_small_tree.hvm} | 0 .../programs/{bool_and.hvmc => bool_and.hvm} | 0 .../{chained_ops.hvm2 => chained_ops.bend} | 0 .../{chained_ops.hvmc => chained_ops.hvm} | 0 .../{church_exp.hvmc => church_exp.hvm} | 0 .../{church_mul.hvm2 => church_mul.bend} | 0 .../{church_mul.hvmc => church_mul.hvm} | 0 .../{commutation.hvmc => commutation.hvm} | 0 .../programs/{dec_bits.hvmc => dec_bits.hvm} | 0 .../{dec_bits_tree.hvmc => dec_bits_tree.hvm} | 0 tests/programs/{era_era.hvmc => era_era.hvm} | 0 tests/programs/{f32.hvmc => f32.hvm} | 0 ...eduction.hvm2 => heavy_pre_reduction.bend} | 0 ...reduction.hvmc => heavy_pre_reduction.hvm} | 0 .../{list_put_got.hvm2 => list_put_got.bend} | 0 .../{list_put_got.hvmc => list_put_got.hvm} | 0 tests/programs/{log.hvm2 => log.bend} | 0 tests/programs/{log.hvmc => log.hvm} | 0 .../{neg_fusion.hvm2 => neg_fusion.bend} | 0 .../{neg_fusion.hvmc => neg_fusion.hvm} | 0 tests/programs/{nums.hvmc => nums.hvm} | 0 tests/programs/{ops.hvmc => ops.hvm} | 0 tests/programs/{queue.hvm2 => queue.bend} | 0 tests/programs/{queue.hvmc => queue.hvm} | 0 .../{all_tree.hvm2 => all_tree.bend} | 0 .../{all_tree.hvmc => all_tree.hvm} | 0 .../{apelacion.hvm2 => apelacion.bend} | 0 .../{apelacion.hvmc => apelacion.hvm} | 0 .../stress_tests/{boom.hvmc => boom.hvm} | 0 .../stress_tests/{burn.hvmc => burn.hvm} | 0 .../{fib_rec.hvm2 => fib_rec.bend} | 0 .../{fib_rec.hvmc => fib_rec.hvm} | 0 .../{sum_rec.hvm2 => sum_rec.bend} | 0 .../{sum_rec.hvmc => sum_rec.hvm} | 0 .../{sum_tail.hvm2 => sum_tail.bend} | 0 .../{sum_tail.hvmc => sum_tail.hvm} | 0 .../{sum_tree.hvm2 => sum_tree.bend} | 0 .../{sum_tree.hvmc => sum_tree.hvm} | 0 .../{tuple_rots.hvm2 => tuple_rots.bend} | 0 .../{tuple_rots.hvmc => tuple_rots.hvm} | 0 .../{very_large.hvmc => very_large.hvm} | 0 ...s__pre_reduce_run@alloc_big_tree.hvm.snap} | 2 +- ..._pre_reduce_run@alloc_small_tree.hvm.snap} | 2 +- ...tests__pre_reduce_run@arithmetic.hvm.snap} | 2 +- ...> tests__pre_reduce_run@bool_and.hvm.snap} | 2 +- ...ests__pre_reduce_run@chained_ops.hvm.snap} | 2 +- ...duce_run@church_encoding__church.hvm.snap} | 2 +- ...tests__pre_reduce_run@church_exp.hvm.snap} | 2 +- ...tests__pre_reduce_run@church_mul.hvm.snap} | 2 +- ...ests__pre_reduce_run@commutation.hvm.snap} | 2 +- ...> tests__pre_reduce_run@dec_bits.hvm.snap} | 2 +- ...ts__pre_reduce_run@dec_bits_tree.hvm.snap} | 2 +- ...=> tests__pre_reduce_run@era_era.hvm.snap} | 2 +- ...nap => tests__pre_reduce_run@f32.hvm.snap} | 2 +- ...e_reduce_run@heavy_pre_reduction.hvm.snap} | 2 +- ...reduce_run@lambda_calculus__hoas.hvm.snap} | 2 +- ...sts__pre_reduce_run@list_put_got.hvm.snap} | 2 +- ...nap => tests__pre_reduce_run@log.hvm.snap} | 2 +- ..._reduce_run@machine_u32__num_add.hvm.snap} | 2 +- ...educe_run@machine_u32__num_match.hvm.snap} | 2 +- ...tests__pre_reduce_run@neg_fusion.hvm.snap} | 2 +- ...ap => tests__pre_reduce_run@nums.hvm.snap} | 2 +- ...nap => tests__pre_reduce_run@ops.hvm.snap} | 2 +- ...p => tests__pre_reduce_run@queue.hvm.snap} | 2 +- ...@sort__bitonic__bitonic_sort_lam.hvm.snap} | 2 +- ...duce_run@sort__merge__merge_sort.hvm.snap} | 2 +- ..._run@sort__radix__radix_sort_ctr.hvm.snap} | 2 +- ..._run@sort__radix__radix_sort_lam.hvm.snap} | 2 +- ...educe_run@stress_tests__all_tree.hvm.snap} | 2 +- ...duce_run@stress_tests__apelacion.hvm.snap} | 2 +- ...re_reduce_run@stress_tests__boom.hvm.snap} | 2 +- ...re_reduce_run@stress_tests__burn.hvm.snap} | 2 +- ...reduce_run@stress_tests__fib_rec.hvm.snap} | 2 +- ...reduce_run@stress_tests__sum_rec.hvm.snap} | 2 +- ...educe_run@stress_tests__sum_tail.hvm.snap} | 2 +- ...educe_run@stress_tests__sum_tree.hvm.snap} | 2 +- ...uce_run@stress_tests__tuple_rots.hvm.snap} | 2 +- ...tests__pre_reduce_run@very_large.hvm.snap} | 2 +- ...nap => tests__run@alloc_big_tree.hvm.snap} | 2 +- ...p => tests__run@alloc_small_tree.hvm.snap} | 2 +- ...mc.snap => tests__run@arithmetic.hvm.snap} | 2 +- ...hvmc.snap => tests__run@bool_and.hvm.snap} | 2 +- ...c.snap => tests__run@chained_ops.hvm.snap} | 2 +- ...sts__run@church_encoding__church.hvm.snap} | 2 +- ...mc.snap => tests__run@church_exp.hvm.snap} | 2 +- ...mc.snap => tests__run@church_mul.hvm.snap} | 2 +- ...c.snap => tests__run@commutation.hvm.snap} | 2 +- ...hvmc.snap => tests__run@dec_bits.hvm.snap} | 2 +- ...snap => tests__run@dec_bits_tree.hvm.snap} | 2 +- ....hvmc.snap => tests__run@era_era.hvm.snap} | 2 +- ...@f32.hvmc.snap => tests__run@f32.hvm.snap} | 2 +- ...> tests__run@heavy_pre_reduction.hvm.snap} | 2 +- ...tests__run@lambda_calculus__hoas.hvm.snap} | 2 +- ....snap => tests__run@list_put_got.hvm.snap} | 2 +- ...@log.hvmc.snap => tests__run@log.hvm.snap} | 2 +- ... tests__run@machine_u32__num_add.hvm.snap} | 2 +- ...ests__run@machine_u32__num_match.hvm.snap} | 2 +- ...mc.snap => tests__run@neg_fusion.hvm.snap} | 2 +- ...ums.hvmc.snap => tests__run@nums.hvm.snap} | 2 +- ...@ops.hvmc.snap => tests__run@ops.hvm.snap} | 2 +- ...ue.hvmc.snap => tests__run@queue.hvm.snap} | 2 +- ...@sort__bitonic__bitonic_sort_lam.hvm.snap} | 2 +- ...sts__run@sort__merge__merge_sort.hvm.snap} | 2 +- ..._run@sort__radix__radix_sort_ctr.hvm.snap} | 2 +- ..._run@sort__radix__radix_sort_lam.hvm.snap} | 2 +- ...ests__run@stress_tests__all_tree.hvm.snap} | 2 +- ...sts__run@stress_tests__apelacion.hvm.snap} | 2 +- ...=> tests__run@stress_tests__boom.hvm.snap} | 2 +- ...=> tests__run@stress_tests__burn.hvm.snap} | 2 +- ...tests__run@stress_tests__fib_rec.hvm.snap} | 2 +- ...tests__run@stress_tests__sum_rec.hvm.snap} | 2 +- ...ests__run@stress_tests__sum_tail.hvm.snap} | 2 +- ...ests__run@stress_tests__sum_tree.hvm.snap} | 2 +- ...ts__run@stress_tests__tuple_rots.hvm.snap} | 2 +- ...mc.snap => tests__run@very_large.hvm.snap} | 2 +- tests/tests.rs | 10 +- tests/transform.rs | 6 +- transform/Cargo.toml | 12 +- transform/src/coalesce_ctrs.rs | 4 +- transform/src/encode_adts.rs | 4 +- transform/src/eta_reduce.rs | 4 +- transform/src/inline.rs | 4 +- transform/src/pre_reduce.rs | 20 +- transform/src/prune.rs | 4 +- transform/src/transform.rs | 2 +- util/Cargo.toml | 2 +- 173 files changed, 272 insertions(+), 795 deletions(-) rename examples/{arithmetic.hvm2 => arithmetic.bend} (100%) rename examples/{arithmetic.hvmc => arithmetic.hvm} (100%) rename examples/church_encoding/{church.hvm2 => church.bend} (100%) rename examples/church_encoding/{church.hvmc => church.hvm} (100%) rename examples/lambda_calculus/{hoas.hvm2 => hoas.bend} (100%) rename examples/lambda_calculus/{hoas.hvmc => hoas.hvm} (100%) rename examples/machine_u32/{num_add.hvm2 => num_add.bend} (100%) rename examples/machine_u32/{num_add.hvmc => num_add.hvm} (100%) rename examples/machine_u32/{num_match.hvm2 => num_match.bend} (100%) rename examples/machine_u32/{num_match.hvmc => num_match.hvm} (100%) rename examples/sort/bitonic/{bitonic_sort_lam.hvm2 => bitonic_sort_lam.bend} (100%) rename examples/sort/bitonic/{bitonic_sort_lam.hvmc => bitonic_sort_lam.hvm} (100%) rename examples/sort/merge/{merge_sort.hvm2 => merge_sort.bend} (100%) rename examples/sort/merge/{merge_sort.hvmc => merge_sort.hvm} (100%) rename examples/sort/radix/{radix_sort_ctr.hvm2 => radix_sort_ctr.bend} (100%) rename examples/sort/radix/{radix_sort_ctr.hvmc => radix_sort_ctr.hvm} (100%) rename examples/sort/radix/{radix_sort_lam.hvm2 => radix_sort_lam.bend} (100%) rename examples/sort/radix/{radix_sort_lam.hvmc => radix_sort_lam.hvm} (100%) rename tests/programs/{alloc_big_tree.hvmc => alloc_big_tree.hvm} (100%) rename tests/programs/{alloc_small_tree.hvm2 => alloc_small_tree.bend} (100%) rename tests/programs/{alloc_small_tree.hvmc => alloc_small_tree.hvm} (100%) rename tests/programs/{bool_and.hvmc => bool_and.hvm} (100%) rename tests/programs/{chained_ops.hvm2 => chained_ops.bend} (100%) rename tests/programs/{chained_ops.hvmc => chained_ops.hvm} (100%) rename tests/programs/{church_exp.hvmc => church_exp.hvm} (100%) rename tests/programs/{church_mul.hvm2 => church_mul.bend} (100%) rename tests/programs/{church_mul.hvmc => church_mul.hvm} (100%) rename tests/programs/{commutation.hvmc => commutation.hvm} (100%) rename tests/programs/{dec_bits.hvmc => dec_bits.hvm} (100%) rename tests/programs/{dec_bits_tree.hvmc => dec_bits_tree.hvm} (100%) rename tests/programs/{era_era.hvmc => era_era.hvm} (100%) rename tests/programs/{f32.hvmc => f32.hvm} (100%) rename tests/programs/{heavy_pre_reduction.hvm2 => heavy_pre_reduction.bend} (100%) rename tests/programs/{heavy_pre_reduction.hvmc => heavy_pre_reduction.hvm} (100%) rename tests/programs/{list_put_got.hvm2 => list_put_got.bend} (100%) rename tests/programs/{list_put_got.hvmc => list_put_got.hvm} (100%) rename tests/programs/{log.hvm2 => log.bend} (100%) rename tests/programs/{log.hvmc => log.hvm} (100%) rename tests/programs/{neg_fusion.hvm2 => neg_fusion.bend} (100%) rename tests/programs/{neg_fusion.hvmc => neg_fusion.hvm} (100%) rename tests/programs/{nums.hvmc => nums.hvm} (100%) rename tests/programs/{ops.hvmc => ops.hvm} (100%) rename tests/programs/{queue.hvm2 => queue.bend} (100%) rename tests/programs/{queue.hvmc => queue.hvm} (100%) rename tests/programs/stress_tests/{all_tree.hvm2 => all_tree.bend} (100%) rename tests/programs/stress_tests/{all_tree.hvmc => all_tree.hvm} (100%) rename tests/programs/stress_tests/{apelacion.hvm2 => apelacion.bend} (100%) rename tests/programs/stress_tests/{apelacion.hvmc => apelacion.hvm} (100%) rename tests/programs/stress_tests/{boom.hvmc => boom.hvm} (100%) rename tests/programs/stress_tests/{burn.hvmc => burn.hvm} (100%) rename tests/programs/stress_tests/{fib_rec.hvm2 => fib_rec.bend} (100%) rename tests/programs/stress_tests/{fib_rec.hvmc => fib_rec.hvm} (100%) rename tests/programs/stress_tests/{sum_rec.hvm2 => sum_rec.bend} (100%) rename tests/programs/stress_tests/{sum_rec.hvmc => sum_rec.hvm} (100%) rename tests/programs/stress_tests/{sum_tail.hvm2 => sum_tail.bend} (100%) rename tests/programs/stress_tests/{sum_tail.hvmc => sum_tail.hvm} (100%) rename tests/programs/stress_tests/{sum_tree.hvm2 => sum_tree.bend} (100%) rename tests/programs/stress_tests/{sum_tree.hvmc => sum_tree.hvm} (100%) rename tests/programs/stress_tests/{tuple_rots.hvm2 => tuple_rots.bend} (100%) rename tests/programs/stress_tests/{tuple_rots.hvmc => tuple_rots.hvm} (100%) rename tests/programs/{very_large.hvmc => very_large.hvm} (100%) rename tests/snapshots/{tests__pre_reduce_run@alloc_big_tree.hvmc.snap => tests__pre_reduce_run@alloc_big_tree.hvm.snap} (99%) rename tests/snapshots/{tests__pre_reduce_run@alloc_small_tree.hvmc.snap => tests__pre_reduce_run@alloc_small_tree.hvm.snap} (88%) rename tests/snapshots/{tests__pre_reduce_run@arithmetic.hvmc.snap => tests__pre_reduce_run@arithmetic.hvm.snap} (91%) rename tests/snapshots/{tests__pre_reduce_run@bool_and.hvmc.snap => tests__pre_reduce_run@bool_and.hvm.snap} (90%) rename tests/snapshots/{tests__pre_reduce_run@chained_ops.hvmc.snap => tests__pre_reduce_run@chained_ops.hvm.snap} (89%) rename tests/snapshots/{tests__pre_reduce_run@church_encoding__church.hvmc.snap => tests__pre_reduce_run@church_encoding__church.hvm.snap} (90%) rename tests/snapshots/{tests__pre_reduce_run@church_exp.hvmc.snap => tests__pre_reduce_run@church_exp.hvm.snap} (99%) rename tests/snapshots/{tests__pre_reduce_run@church_mul.hvmc.snap => tests__pre_reduce_run@church_mul.hvm.snap} (95%) rename tests/snapshots/{tests__pre_reduce_run@commutation.hvmc.snap => tests__pre_reduce_run@commutation.hvm.snap} (89%) rename tests/snapshots/{tests__pre_reduce_run@dec_bits.hvmc.snap => tests__pre_reduce_run@dec_bits.hvm.snap} (90%) rename tests/snapshots/{tests__pre_reduce_run@dec_bits_tree.hvmc.snap => tests__pre_reduce_run@dec_bits_tree.hvm.snap} (96%) rename tests/snapshots/{tests__pre_reduce_run@era_era.hvmc.snap => tests__pre_reduce_run@era_era.hvm.snap} (90%) rename tests/snapshots/{tests__pre_reduce_run@f32.hvmc.snap => tests__pre_reduce_run@f32.hvm.snap} (93%) rename tests/snapshots/{tests__pre_reduce_run@heavy_pre_reduction.hvmc.snap => tests__pre_reduce_run@heavy_pre_reduction.hvm.snap} (87%) rename tests/snapshots/{tests__pre_reduce_run@lambda_calculus__hoas.hvmc.snap => tests__pre_reduce_run@lambda_calculus__hoas.hvm.snap} (89%) rename tests/snapshots/{tests__pre_reduce_run@list_put_got.hvmc.snap => tests__pre_reduce_run@list_put_got.hvm.snap} (99%) rename tests/snapshots/{tests__pre_reduce_run@log.hvmc.snap => tests__pre_reduce_run@log.hvm.snap} (91%) rename tests/snapshots/{tests__pre_reduce_run@machine_u32__num_add.hvmc.snap => tests__pre_reduce_run@machine_u32__num_add.hvm.snap} (88%) rename tests/snapshots/{tests__pre_reduce_run@machine_u32__num_match.hvmc.snap => tests__pre_reduce_run@machine_u32__num_match.hvm.snap} (88%) rename tests/snapshots/{tests__pre_reduce_run@neg_fusion.hvmc.snap => tests__pre_reduce_run@neg_fusion.hvm.snap} (89%) rename tests/snapshots/{tests__pre_reduce_run@nums.hvmc.snap => tests__pre_reduce_run@nums.hvm.snap} (93%) rename tests/snapshots/{tests__pre_reduce_run@ops.hvmc.snap => tests__pre_reduce_run@ops.hvm.snap} (94%) rename tests/snapshots/{tests__pre_reduce_run@queue.hvmc.snap => tests__pre_reduce_run@queue.hvm.snap} (92%) rename tests/snapshots/{tests__pre_reduce_run@sort__bitonic__bitonic_sort_lam.hvmc.snap => tests__pre_reduce_run@sort__bitonic__bitonic_sort_lam.hvm.snap} (87%) rename tests/snapshots/{tests__pre_reduce_run@sort__merge__merge_sort.hvmc.snap => tests__pre_reduce_run@sort__merge__merge_sort.hvm.snap} (91%) rename tests/snapshots/{tests__pre_reduce_run@sort__radix__radix_sort_ctr.hvmc.snap => tests__pre_reduce_run@sort__radix__radix_sort_ctr.hvm.snap} (87%) rename tests/snapshots/{tests__pre_reduce_run@sort__radix__radix_sort_lam.hvmc.snap => tests__pre_reduce_run@sort__radix__radix_sort_lam.hvm.snap} (87%) rename tests/snapshots/{tests__pre_reduce_run@stress_tests__all_tree.hvmc.snap => tests__pre_reduce_run@stress_tests__all_tree.hvm.snap} (87%) rename tests/snapshots/{tests__pre_reduce_run@stress_tests__apelacion.hvmc.snap => tests__pre_reduce_run@stress_tests__apelacion.hvm.snap} (87%) rename tests/snapshots/{tests__pre_reduce_run@stress_tests__boom.hvmc.snap => tests__pre_reduce_run@stress_tests__boom.hvm.snap} (88%) rename tests/snapshots/{tests__pre_reduce_run@stress_tests__burn.hvmc.snap => tests__pre_reduce_run@stress_tests__burn.hvm.snap} (91%) rename tests/snapshots/{tests__pre_reduce_run@stress_tests__fib_rec.hvmc.snap => tests__pre_reduce_run@stress_tests__fib_rec.hvm.snap} (87%) rename tests/snapshots/{tests__pre_reduce_run@stress_tests__sum_rec.hvmc.snap => tests__pre_reduce_run@stress_tests__sum_rec.hvm.snap} (87%) rename tests/snapshots/{tests__pre_reduce_run@stress_tests__sum_tail.hvmc.snap => tests__pre_reduce_run@stress_tests__sum_tail.hvm.snap} (87%) rename tests/snapshots/{tests__pre_reduce_run@stress_tests__sum_tree.hvmc.snap => tests__pre_reduce_run@stress_tests__sum_tree.hvm.snap} (87%) rename tests/snapshots/{tests__pre_reduce_run@stress_tests__tuple_rots.hvmc.snap => tests__pre_reduce_run@stress_tests__tuple_rots.hvm.snap} (88%) rename tests/snapshots/{tests__pre_reduce_run@very_large.hvmc.snap => tests__pre_reduce_run@very_large.hvm.snap} (99%) rename tests/snapshots/{tests__run@alloc_big_tree.hvmc.snap => tests__run@alloc_big_tree.hvm.snap} (99%) rename tests/snapshots/{tests__run@alloc_small_tree.hvmc.snap => tests__run@alloc_small_tree.hvm.snap} (81%) rename tests/snapshots/{tests__run@arithmetic.hvmc.snap => tests__run@arithmetic.hvm.snap} (86%) rename tests/snapshots/{tests__run@bool_and.hvmc.snap => tests__run@bool_and.hvm.snap} (83%) rename tests/snapshots/{tests__run@chained_ops.hvmc.snap => tests__run@chained_ops.hvm.snap} (83%) rename tests/snapshots/{tests__run@church_encoding__church.hvmc.snap => tests__run@church_encoding__church.hvm.snap} (85%) rename tests/snapshots/{tests__run@church_exp.hvmc.snap => tests__run@church_exp.hvm.snap} (99%) rename tests/snapshots/{tests__run@church_mul.hvmc.snap => tests__run@church_mul.hvm.snap} (93%) rename tests/snapshots/{tests__run@commutation.hvmc.snap => tests__run@commutation.hvm.snap} (82%) rename tests/snapshots/{tests__run@dec_bits.hvmc.snap => tests__run@dec_bits.hvm.snap} (83%) rename tests/snapshots/{tests__run@dec_bits_tree.hvmc.snap => tests__run@dec_bits_tree.hvm.snap} (96%) rename tests/snapshots/{tests__run@era_era.hvmc.snap => tests__run@era_era.hvm.snap} (83%) rename tests/snapshots/{tests__run@f32.hvmc.snap => tests__run@f32.hvm.snap} (90%) rename tests/snapshots/{tests__run@heavy_pre_reduction.hvmc.snap => tests__run@heavy_pre_reduction.hvm.snap} (79%) rename tests/snapshots/{tests__run@lambda_calculus__hoas.hvmc.snap => tests__run@lambda_calculus__hoas.hvm.snap} (83%) rename tests/snapshots/{tests__run@list_put_got.hvmc.snap => tests__run@list_put_got.hvm.snap} (99%) rename tests/snapshots/{tests__run@log.hvmc.snap => tests__run@log.hvm.snap} (84%) rename tests/snapshots/{tests__run@machine_u32__num_add.hvmc.snap => tests__run@machine_u32__num_add.hvm.snap} (81%) rename tests/snapshots/{tests__run@machine_u32__num_match.hvmc.snap => tests__run@machine_u32__num_match.hvm.snap} (80%) rename tests/snapshots/{tests__run@neg_fusion.hvmc.snap => tests__run@neg_fusion.hvm.snap} (83%) rename tests/snapshots/{tests__run@nums.hvmc.snap => tests__run@nums.hvm.snap} (90%) rename tests/snapshots/{tests__run@ops.hvmc.snap => tests__run@ops.hvm.snap} (91%) rename tests/snapshots/{tests__run@queue.hvmc.snap => tests__run@queue.hvm.snap} (88%) rename tests/snapshots/{tests__run@sort__bitonic__bitonic_sort_lam.hvmc.snap => tests__run@sort__bitonic__bitonic_sort_lam.hvm.snap} (78%) rename tests/snapshots/{tests__run@sort__merge__merge_sort.hvmc.snap => tests__run@sort__merge__merge_sort.hvm.snap} (87%) rename tests/snapshots/{tests__run@sort__radix__radix_sort_ctr.hvmc.snap => tests__run@sort__radix__radix_sort_ctr.hvm.snap} (80%) rename tests/snapshots/{tests__run@sort__radix__radix_sort_lam.hvmc.snap => tests__run@sort__radix__radix_sort_lam.hvm.snap} (80%) rename tests/snapshots/{tests__run@stress_tests__all_tree.hvmc.snap => tests__run@stress_tests__all_tree.hvm.snap} (79%) rename tests/snapshots/{tests__run@stress_tests__apelacion.hvmc.snap => tests__run@stress_tests__apelacion.hvm.snap} (79%) rename tests/snapshots/{tests__run@stress_tests__boom.hvmc.snap => tests__run@stress_tests__boom.hvm.snap} (80%) rename tests/snapshots/{tests__run@stress_tests__burn.hvmc.snap => tests__run@stress_tests__burn.hvm.snap} (87%) rename tests/snapshots/{tests__run@stress_tests__fib_rec.hvmc.snap => tests__run@stress_tests__fib_rec.hvm.snap} (79%) rename tests/snapshots/{tests__run@stress_tests__sum_rec.hvmc.snap => tests__run@stress_tests__sum_rec.hvm.snap} (79%) rename tests/snapshots/{tests__run@stress_tests__sum_tail.hvmc.snap => tests__run@stress_tests__sum_tail.hvm.snap} (80%) rename tests/snapshots/{tests__run@stress_tests__sum_tree.hvmc.snap => tests__run@stress_tests__sum_tree.hvm.snap} (79%) rename tests/snapshots/{tests__run@stress_tests__tuple_rots.hvmc.snap => tests__run@stress_tests__tuple_rots.hvm.snap} (81%) rename tests/snapshots/{tests__run@very_large.hvmc.snap => tests__run@very_large.hvm.snap} (99%) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 9481b791..9cf036de 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -28,13 +28,13 @@ jobs: git clone https://github.com/higherorderco/hvm-compare-perf cd hvm-compare-perf NO_COLOR=1 cargo run bench \ - --core ../hvm-core \ + --core ../hvm-64 \ -r main -r ${{ github.sha }} \ -m intr-singl -m intr-multi \ - > ../hvm-core/table + > ../hvm-64/table - name: write comment run: | - echo 'Perf run for [`'`git rev-parse --short ${{ github.sha }}`'`](https://github.com/higherorderco/hvm-core/commit/${{ github.sha }}):' >> comment + echo 'Perf run for [`'`git rev-parse --short ${{ github.sha }}`'`](https://github.com/higherorderco/hvm-64/commit/${{ github.sha }}):' >> comment echo '```' >> comment cat table >> comment echo '```' >> comment @@ -50,7 +50,7 @@ jobs: gh api graphql -F pr=${{ github.event.number }} -f query=' query($pr: Int!) { organization(login: "higherorderco") { - repository(name: "hvm-core") { + repository(name: "hvm-64") { pullRequest(number: $pr) { comments(last: 100) { nodes { id author { login } } diff --git a/.github/workflows/delete-cancelled.yml b/.github/workflows/delete-cancelled.yml index 98a69975..117cd050 100644 --- a/.github/workflows/delete-cancelled.yml +++ b/.github/workflows/delete-cancelled.yml @@ -5,12 +5,12 @@ on: inputs: run_id: type: string - description: "" + description: "" jobs: delete: runs-on: ubuntu-latest steps: - - run: gh api "repos/higherorderco/hvm-core/actions/runs/${{ inputs.run_id }}" -X DELETE + - run: gh api "repos/higherorderco/hvm-64/actions/runs/${{ inputs.run_id }}" -X DELETE env: GH_TOKEN: ${{ secrets.PAT }} diff --git a/Cargo.lock b/Cargo.lock index 6fdc86c2..da146ad8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -276,15 +276,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "809e18805660d7b6b2e2b9f316a5099521b5998d5cba4dda11b5157a21aaef03" [[package]] -name = "hvmc" +name = "hvm64" version = "0.2.26" dependencies = [ "clap", - "hvmc-ast", - "hvmc-host", - "hvmc-runtime", - "hvmc-transform", - "hvmc-util", + "hvm64-ast", + "hvm64-host", + "hvm64-runtime", + "hvm64-transform", + "hvm64-util", "insta", "libloading", "ordered-float", @@ -294,50 +294,50 @@ dependencies = [ ] [[package]] -name = "hvmc-ast" +name = "hvm64-ast" version = "0.1.0" dependencies = [ "TSPL", "arrayvec", - "hvmc-util", + "hvm64-util", "ordered-float", "thiserror", ] [[package]] -name = "hvmc-host" +name = "hvm64-host" version = "0.1.0" dependencies = [ - "hvmc-ast", - "hvmc-runtime", - "hvmc-util", + "hvm64-ast", + "hvm64-runtime", + "hvm64-util", "parking_lot", ] [[package]] -name = "hvmc-runtime" +name = "hvm64-runtime" version = "0.1.0" dependencies = [ - "hvmc-util", + "hvm64-util", "nohash-hasher", "parking_lot", ] [[package]] -name = "hvmc-transform" +name = "hvm64-transform" version = "0.1.0" dependencies = [ - "hvmc-ast", - "hvmc-host", - "hvmc-runtime", - "hvmc-util", + "hvm64-ast", + "hvm64-host", + "hvm64-runtime", + "hvm64-util", "ordered-float", "parking_lot", "thiserror", ] [[package]] -name = "hvmc-util" +name = "hvm64-util" version = "0.1.0" dependencies = [ "arrayvec", diff --git a/Cargo.toml b/Cargo.toml index aa359fc6..3c82ad53 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,14 +13,14 @@ missing_safety_doc = "allow" new_ret_no_self = "allow" [package] -name = "hvmc" +name = "hvm64" version = "0.2.26" edition = "2021" description = "HVM-Core is a massively parallel Interaction Combinator evaluator." license = "MIT" [[bin]] -name = "hvmc" +name = "hvm64" path = "src/main.rs" bench = false required-features = ["std"] @@ -39,11 +39,11 @@ ordered-float = { version = "4.2.0" } parking_lot = "0.12.2" thiserror = "1.0.58" -hvmc-ast = { path = "./ast" } -hvmc-runtime = { path = "./runtime" } -hvmc-transform = { path = "./transform" } -hvmc-util = { path = "./util" } -hvmc-host = { path = "./host" } +hvm64-ast = { path = "./ast" } +hvm64-runtime = { path = "./runtime" } +hvm64-transform = { path = "./transform" } +hvm64-util = { path = "./util" } +hvm64-host = { path = "./host" } [dev-dependencies] insta = { version = "1.34.0", features = ["glob"] } @@ -52,4 +52,4 @@ serial_test = "3.0.0" [features] default = ["std"] std = [] -trace = ["hvmc-runtime/trace"] +trace = ["hvm64-runtime/trace"] diff --git a/README.md b/README.md index e54ed457..f2620bed 100644 --- a/README.md +++ b/README.md @@ -1,523 +1,3 @@ -# HVM-Core: a parallel Interaction Combinator evaluator +# HVM-64 -HVM-Core is a parallel evaluator for extended [Symmetric Interaction Combinators](https://www-lipn.univ-paris13.fr/~mazza/papers/CombSem-MSCS.pdf). - -We provide a raw syntax for specifying nets and a Rust implementation that -achieves up to **10 billion rewrites per second** on Apple M3 Max CPU. HVM's -optimal evaluation semantics and concurrent model of computation make it a great -compile target for high-level languages seeking massive parallelism. - -HVM-Core will be used as the compile target for -[HVM](https://github.com/higherorderco/hvm) on its upcoming update. - -## Usage - -Install HVM-Core as: - -``` -cargo +nightly install hvm-core -``` - -Then, run the interpreter as: - -``` -hvmc run file.hvmc -s -``` - -Or compile it to a faster executable: - -``` -hvmc compile file.hvmc -./file -``` - -Both versions will compute the program's normal form using all available cores. - -## Example - -HVMC is a low-level compile target for high-level languages. It provides a raw -syntax for wiring interaction nets. For example: - -```javascript -@add = (<+ a b> (a b)) - -@sum = (?<(#1 @sumS) a> a) - -@sumS = ({2 a b} c) - & @add ~ (e (d c)) - & @sum ~ (a d) - & @sum ~ (b e) - -@main = a - & @sum ~ (#24 a) -``` - -The file above implements a recursive sum. As you can see, its syntax isn't -meant to be very human readable. Fortunately, we have -[HVM-Lang](https://github.com/HigherOrderCO/hvm-lang), a tool that generates -`.hvmc` files from a familiar functional syntax. On HVM-Lang, you can write -instead: - -```javascript -add a b = (+ a b) - -sum 0 = 1 -sum +p = (add (sum p) (sum p)) - -main = (sum 24) -``` - -Which compiles to the first program via `hvml compile main.hvm`. For more -examples, see the [`/examples`](/examples) directory. If you do want to -understand the hardcore syntax, keep reading. - -## Language - -HVM-Core's textual syntax represents interaction combinators via an AST: - -``` - ::= - ::= "*" - ::= "(" " " ")" - ::= "[" " " "]" - ::= "{"