1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-30 05:42:26 +03:00
juvix/tests
Paul Cadman 18cca89296
Add frontend support for Anoma Resource Machine builtins (#3113)
This PR adds frontend builtin support for the Anoma Resource machine
functions provided in
[resource-machine.hoon](4897751366/hoon/resource-machine.hoon),
*except* for the `prove-logic` function which still needs some
discussion.

Users must now mark the Anoma `Resource` type with
`builtin-anoma-resource` and the Anoma `Action` type with
`builtin-anoma-action`. This is required because the resource machine
functions use these types.

The compiler does not check that the constructors of `Resource` and
`Action` match the RM spec. I made this decision because the Anoma types
are sill in flux and it's easier to change if correctness is delegated
to the RM library for now. We can add the constructor checks when the
Anoma RM interface is stable.

The test file
[test085.juvix](47ba3e2746/tests/Anoma/Compilation/positive/test085.juvix)
demonstrates how each builtin should be used.

### Core Evaluator

The Core evaluator does not support these builtin functions in normal
mode. When used for normalisation (e.g when used in the constant folding
pass) the Core evaluator leaves the builtin functions unchanged.

### Nock Evaluator

The Nock evaluator does not intercept the Anoma lib functions that the
builtins correspond to in the Nock backend. It executes the underlying
Nock code instead. This means that several of the functions cannot be
tested because they're either too slow (e.g commitment) or do not have
an implementation in the Nock code (e.g addDelta).

* Closes: https://github.com/anoma/juvix/issues/3084
2024-10-22 13:10:08 +02:00
..
Anoma/Compilation Add frontend support for Anoma Resource Machine builtins (#3113) 2024-10-22 13:10:08 +02:00
Asm Remove copy propagation from the native/WASM and Rust pipelines (#2846) 2024-06-20 12:44:15 +02:00
benchmark Merge if -> ite renaming from stdlib (#2869) 2024-07-02 10:03:06 +02:00
Casm Update standard library coding style according to the guidelines (#3092) 2024-10-14 15:56:54 +02:00
Compilation Allow @ in constructor declarations (#3099) 2024-10-15 19:15:37 +02:00
Core Add frontend support for Anoma stdlib sha256 (#3109) 2024-10-17 19:11:26 +02:00
examplesExpected Add a test suite for milestone examples (#1920) 2023-03-24 13:16:26 +00:00
Internal Update standard library coding style according to the guidelines (#3092) 2024-10-14 15:56:54 +02:00
negative Fix named application bug (#3075) 2024-10-03 16:26:59 +01:00
nockma/positive Fix bugs in the Nockma prettyprinter and parser (#2632) 2024-02-09 14:59:42 +01:00
positive Allow @ in constructor declarations (#3099) 2024-10-15 19:15:37 +02:00
Reg/positive Copy propagation in JuvixReg (#2828) 2024-06-18 21:38:02 +02:00
runtime/positive Add an if instruction to JuvixReg (#2855) 2024-06-26 19:08:33 +02:00
Rust/Compilation/positive Update standard library coding style according to the guidelines (#3092) 2024-10-14 15:56:54 +02:00
smoke Remove VampIR compile command and tests (#3104) 2024-10-16 15:03:14 +02:00
Tree Fix JuvixTree unification (#3087) 2024-10-09 15:33:42 +02:00
VampIR Merge if -> ite renaming from stdlib (#2869) 2024-07-02 10:03:06 +02:00
WithoutPackageFile Fix #2510 (#2512) 2023-11-17 16:10:38 +01:00
.gitattributes Juvix C runtime (#1580) 2022-11-03 09:38:09 +01:00