Commit Graph

122 Commits

Author SHA1 Message Date
KtorZ
84c4ccaf4c Forbid opaque types in the application binary interface.
We cannot enforce internal invariants on opaque types from only structural checks on Data. Thus, it is forbidden to find an opaque type in an outward-facing interface. Instead, users should rely on intermediate representations and lift them into opaque types using constructors and methods provided by the type (e.g. Dict.from_list, Rational.from_int, Rational.new, ...)
2024-03-03 13:55:10 +01:00
rvcas
ac0c73a56a chore: clippy fixes 2024-02-13 20:26:12 -05:00
microproofs
6e2f9b9eb9 fix tests 2024-02-07 12:48:07 -05:00
microproofs
713b16e25d we now build forwards when it comes to piplines and expressions
so this test got reordered
2024-02-07 12:36:35 -05:00
KtorZ
3c8460e6af Allow annotating Data for blueprint
This commit allows Data to be optionally annotated with a
  phantom-type. This doesn't change anything in codegen but we can now
  leverage this information to generate better blueprint schemas.
2024-02-07 11:48:52 -05:00
rvcas
589bb9a4b3 chore: change how we depend on pallas 2024-01-24 21:26:48 -05:00
microproofs
ae0b428658 update tests to account for new verbose tracing 2024-01-24 16:29:40 -05:00
microproofs
f79b37d551 Replace 'bool' with 'TraceLevel' in codegen
Co-authored-by: KtorZ <matthias.benkort@gmail.com>
2024-01-19 14:30:15 +01:00
KtorZ
0e2b8ae251 Bump pallas dependencies to include flat bigint patch
Fixes #796.
2024-01-18 18:26:21 +01:00
microproofs
4a8fecb70a fix: satisfy clippy's demands 2024-01-11 14:53:02 -05:00
microproofs
394cac86b8 feat: expect on a type now can take in a msg when in trace mode 2024-01-04 16:03:51 -05:00
microproofs
71cfb6f6af feat: Add specific messages for using expect with booleans
TODO: fill out the rest of the expects with messages
2024-01-04 16:03:51 -05:00
microproofs
7d319077e6 chore: clean up validator comments and
commit script context test lockfile
2023-11-06 15:49:13 -05:00
microproofs
2f694b01cb chore: use insta snapshot for blueprint validator tests 2023-11-06 15:37:04 -05:00
microproofs
a86f08c6d1 update tests for new trace reduction 2023-10-07 19:42:24 -04:00
KtorZ
524d0dadf5 Add compiler's version to blueprint. 2023-10-06 14:17:55 +02:00
microproofs
8a1c824dd7 chore: add specific error for when the validator returns false 2023-10-04 11:08:22 -04:00
microproofs
83f0dd2cbe chore: fix blueprint validator tests 2023-09-29 17:47:39 -04:00
microproofs
47596f0324 feat: Remove tuple_index and record_access in favor of faster more direct functions for
accessing an item in a tuple or a field in a record
2023-09-28 01:05:05 -04:00
microproofs
1bcc9e8524 fix: expect on tuples from data now checks for no more items after the last 2023-09-26 12:49:50 -04:00
rvcas
7b915b7dcf chore: allow clippy::arc_with_non_send_sync in tests 2023-09-13 19:07:45 -04:00
rvcas
d808197507 chore: clippy fix 2023-09-13 18:17:59 -04:00
KtorZ
961e323c36 Enable iterating over validator's parameters with a callback
This is how we'll construct parameters interactively. We need to lookup the definition, and provide a data representation for it.
2023-08-19 13:39:39 -04:00
microproofs
90c7753201 update tests for new recursion optmization 2023-08-07 19:00:39 -04:00
microproofs
36c80f36c1 fix tests 2023-08-07 12:02:44 -04:00
rvcas
8a7df7f66b test: add empty list test 2023-07-04 17:19:29 -04:00
Pi Lanningham
4a8cb72708 Add a blueprint policy command
Computes the policy ID of a minting policy; added guards for blueprint address to check that it's not a minting policy; Wasn't 100% sure where the errors should live, so I'm happy to move them if there's objections
2023-07-01 16:17:10 -04:00
microproofs
db369da96e feat: Make traces produced by expect dependent on
the value of the tracing flag.
2023-06-23 14:03:23 -04:00
rvcas
cf6d04e95b chore: some clippy warnings 2023-06-02 19:47:52 -04:00
rvcas
9c29f4f26b fix: blueprints gen failing on List
closes #569

* added new methods to Definitions
  it doesn't use expect
* lookup was failing for the special map/pair case
  when resolving list generics

Co-authored-by: Pi <pi@sundaeswap.finance>
2023-06-02 17:53:10 -04:00
microproofs
deee50b77e fix: just change as_key
Co-authored-by: Lucas Rosa <x@rvcas.dev>
2023-05-31 00:27:31 -04:00
microproofs
a6807f0bfb fix: seems like definition lookups weren't working
Co-authored-by: Lucas Rosa <x@rvcas.dev>
2023-05-31 00:18:05 -04:00
microproofs
b36cf1c029 chore: refactor default functions in uplc_code_gen.
feat: Add an identity optimization to remove functions that return the argument only.
2023-05-08 16:15:09 -04:00
microproofs
0d0c96deda commit validator changes and tests 2023-04-28 17:05:46 -04:00
microproofs
b050018a37 test fix: blueprint change 2023-04-25 02:06:56 -04:00
microproofs
9bb1a88f23 fix: expect [] on a non-empty list now fails. 2023-04-21 17:39:21 -04:00
microproofs
c2ee631d07 feat: new setup for the gen_uplc testing
* new test only module aiken_project::tests
* move TestProject to tests/mod.rs
* new tests go in gen_uplc.rs
2023-04-19 16:08:55 -04:00
microproofs
23a7e7e680 chore: convert acceptance test 5
Also constructors with no fields are now converted to a constant data term.
2023-04-19 16:08:55 -04:00
microproofs
022d557906 chore: convert acceptance test 4 2023-04-19 16:08:55 -04:00
microproofs
7da3ac2c99 chore: convert acceptance test 3 2023-04-19 16:08:55 -04:00
microproofs
7dd13f8d73 feat: add end to end tests to replace acceptance tests with strict uplc comparison.
Add acceptance tests 1,2, 6 as end to end tests
2023-04-19 16:08:55 -04:00
Kasey White
02d57cc076 tests pass now after adding in final wrapper as air elements 2023-04-09 17:43:56 -04:00
Kasey White
9e95e24624 now tests are passing 2023-04-09 17:43:56 -04:00
Kasey White
4d97719e6d update blueprint tests with new hashes and script outputs 2023-04-09 17:43:56 -04:00
Kasey White
abd97f0ade changed assert_on_list from being defined at uplc level to being defined at air level to enable proper hoisting 2023-04-09 17:43:56 -04:00
KtorZ
4799af3242 Rework 'blueprint apply' command and wrap up wiring up validation.
The apply command now works only from a serialized CBOR data (instead of a UPLC syntax). So it is no longer possible to specify arbitrary cbor terms through the CLI. I believe it to be an acceptable limitation for now; especially given that Aiken will never generate blueprints with non-data terms at the interface boundary.
2023-04-08 08:57:40 +02:00
KtorZ
bf222a3ea2 Fix reference JSON deserialization. 2023-04-08 08:57:40 +02:00
KtorZ
c18deecdc8 Show slightly better schema mismatch errors
Display terms as CBOR diagnostic when they are Plutus data.
2023-04-08 08:57:38 +02:00
KtorZ
176cb45524 Factor out error (schema mismatch) creation during blueprint validation. 2023-04-08 08:57:04 +02:00
KtorZ
7d6612b108 Rework parameter validation to work from 'Constant' instead of 'Term'
This simplifies the code and makes it more efficient as we no longer need to wrap and unwrap constant terms constantly.
2023-04-08 08:57:03 +02:00