KtorZ
4ff11f4229
Fix acceptance test 087 following BigInt seralization fix.
2024-03-02 14:11:22 +01:00
KtorZ
2b8e99a1b8
Fix CI script for acceptance tests, and have them run in parallel.
2024-03-02 14:11:22 +01:00
KtorZ
46c357df7b
Fix Int/BigInt pivot
...
We've been wrongly representing large ints as BigInt, causing them to
behave differently in the VM through builtins like 'serialise_data'.
Indeed, we expect anything that fits in 8 bytes to be encoded as Major
Type 0 or 1. But we were switching to encoding as Major type 6
(tagged, PosBigInt, NegBigInt) for much smaller values! Anything
outside of the range [-2^32, 2^32-1] would be treated as big int
(positive or negative).
Why? Because we checked whether a value i would fit in an i64, and if
it didn't we treated it as big int. But the reality is more subtle...
Fortunately, Rust has i128 and the minicbor library implements TryFrom
which enforces that the value fits in a range of [-2^64, 2^64 - 1], so
we're back on track easily.
2024-02-25 14:09:56 -05:00
rvcas
9e3f348c6c
chore: commit artifacts from acceptance tests
2024-02-13 21:29:46 -05:00
rvcas
0ccfe60072
feat: support nested void matching
2024-02-13 21:29:24 -05:00
microproofs
d8cdeba6fd
chore: lastest acceptance test lock and plutus.json files
2024-01-31 00:07:43 -05:00
microproofs
444bccf19c
fix: change list_access_to_uplc to properly handle list discards
2024-01-30 23:53:33 -05:00
microproofs
ede6c22267
remove traces from test 89
2024-01-25 14:24:21 -05:00
microproofs
78d2049d7b
fix: Using the wrong match string for discards in FieldsExpose
...
Also need to return a lambda wrapped term from list_access_to_uplc under all conditions
2024-01-25 14:18:36 -05:00
microproofs
b15e6c296b
Add a few more expect cases to test 40
2024-01-24 16:29:40 -05:00
KtorZ
b50e4ab63a
Re-format and re-run all acceptance tests.
2024-01-20 10:44:16 +01:00
KtorZ
50ebfc6090
remove wrongly committed acceptance test blueprints
...
Actually copy-pasted from 090
2024-01-20 10:38:40 +01:00
KtorZ
bf96c3afd2
Add more tests & rename 'Invalid' -> 'Unfinished'
2024-01-20 10:26:33 +01:00
KtorZ
8a90e9eda0
Improve behavior and reporting of tests expected to fail
...
Fixes #786 .
2024-01-19 18:20:58 +01:00
KtorZ
0e2b8ae251
Bump pallas dependencies to include flat bigint patch
...
Fixes #796 .
2024-01-18 18:26:21 +01:00
microproofs
c7af27a6ba
fix: generic edge case with tuples that allowed 2 tuples and 3 tuples to use the same monomorphized function.
...
Also massively reduced the space taken up by generics in scripts when using generics with list and tuples
2024-01-13 17:46:32 -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
rvcas
b17b7f287c
chore: update to pallas v0.20.0
2023-12-04 21:44:19 -05:00
rvcas
7c4cabada9
chore: add latest acceptance artifacts
2023-12-04 21:10:55 -05:00
rvcas
abd18656e3
fix: unable to have newline after expect bool shortcut
2023-11-20 11:44:16 -05:00
rvcas
7118253401
fix: if branches, final_else, and anon fns should all be "top level"
2023-11-20 11:44:16 -05:00
microproofs
446ef11606
chore: finishing acceptance test 29
...
and updating acceptance test lock files
2023-11-08 14:31:44 -05:00
microproofs
7d319077e6
chore: clean up validator comments and
...
commit script context test lockfile
2023-11-06 15:49:13 -05:00
microproofs
5d56d41a68
chore: update lock files for acceptance tests
2023-11-06 15:37:04 -05:00
microproofs
598ec5eaef
Use a better algorithm for inlining single occurrences
2023-11-06 15:37:04 -05:00
microproofs
68d9a21c6a
commit current lock files
2023-10-07 19:42:24 -04:00
KtorZ
524d0dadf5
Add compiler's version to blueprint.
2023-10-06 14:17:55 +02:00
rvcas
135dbd8335
feat: handle pipe fn infer TODOs
...
This improves error messages for `a |> b(x)`.
We need to do a special check when looping over the args
and unifying. This information is within a function that does not belong
to pipe typer so I used a closure to forward along a way to add
metadata to the error when the first argument in the loop has a
unification error. Simply adding the metadata at the pipe typer
level is not good enough because then we may annotate regular
unification errors from the args.
2023-10-03 01:17:15 -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
eb0b4dd6d8
update lock files
2023-09-25 21:16:19 -04:00
microproofs
b8737a1021
add one more test for unbound generics
2023-09-25 21:16:19 -04:00
microproofs
534eb62a07
fix: There was a stack overflow due to passing unbound types to a function
2023-09-25 21:16:19 -04:00
microproofs
1cab479b81
fix: dependency hoisting for cyclic functions
...
Add more tests
2023-09-25 21:16:19 -04:00
microproofs
ae3053522e
feat: Update cyclic functions to be aware of being in a cycle.
...
Finish the creation of cyclic functions
The last part is to update vars that call into a function in the cycle
2023-09-25 21:16:19 -04:00
KtorZ
984237075a
Add new acceptance test scenario: 066
...
Mutua recursion.
2023-09-25 21:16:19 -04:00
rvcas
4ca8681ca0
chore: commit example lock files
2023-09-20 13:26:49 -04:00
rvcas
bc0824f4eb
chore: new aiken.lock files for examples
2023-09-13 18:17:40 -04:00
KtorZ
c711a97e69
Throttle calls to package registry for version resolution
...
The 'HEAD' call that is done to resolve package revisions from
unpinned versions is already quite cheap, but it would still be better
to avoid overloading Github with such calls; especially for users of a
language-server that would compile on-the-fly very often. Upstream
packages don't change often so there's no need to constantly check the
etag.
So we now keep a local version of etags that we fetched, as well as a
timestamp from the last time we fetched them so that we only re-fetch
them if more than an hour has elapsed. This should be fairly resilient
while still massively improving the UX for people showing up after a
day and trying to use latest 'main' features.
This means that we now effectively have two caching levels:
- In the manifest, we store previously fetched etags.
- In the filesystem, we have a cache of already downloaded zip archives.
The first cache is basically invalidated every hour, while the second
cache is only invalidated when a etag changes. For pinned versions,
nothing is invalidated as they are considered immutable.
2023-09-13 17:17:32 -04:00
rvcas
f4d0f231d7
test: fix acceptance tests
2023-08-16 14:52:06 -04:00
rvcas
80e4a5c6a2
chore: remove build folder
2023-08-16 14:17:33 -04:00
microproofs
eda388fb29
test(aiken-lang): add a new test for list edge case in when clause patterns
2023-08-08 20:47:35 -04:00
Pi Lanningham
0d99afe5e2
Cargo fmt
2023-08-07 19:00:39 -04:00
Pi Lanningham
c45caaefc8
Rudimentary implementation
...
Adds an identify_recursive_static_params; doesn't handle all shadowing cases yet
2023-08-07 19:00:39 -04:00
microproofs
6254eeb2ed
add acceptance test 88
2023-08-07 12:02:44 -04:00
microproofs
f7d278a472
fix: 2 acceptance tests were throwing errors due to exhaustiveness checker
2023-08-07 12:02:44 -04:00
microproofs
36c80f36c1
fix tests
2023-08-07 12:02:44 -04:00
microproofs
bfa4cc2efc
fix: some function dependency tree path was not being updated in order
...
fix: revert to old implicit way of casting to data for now
2023-08-07 12:02:44 -04:00
rvcas
2253e29d42
chore: commit acceptance test plutus files
2023-07-17 17:34:00 -04:00
rvcas
0be09cd9e5
chore: use fmt to update examples
2023-07-12 09:16:37 -04:00
KtorZ
2a747305f7
Fixes evaluation of large positive bigint in the UPLC machine
...
Fixes #511 .
2023-07-05 18:52:14 +02:00
microproofs
67c072a1a9
test: add acceptance test 86
...
fix: prevent mutual recursion for expect type code gen functions
2023-07-04 12:24:25 -04:00
microproofs
8b3504e9a1
fix: `expect _ = ...` not including the cast from data logic if the type is data and right hand has a type annotation
2023-06-23 18:39:12 -04:00
microproofs
226556bdd6
fix: builtins using the incorrect data to type conversion when used as a function param.
2023-06-23 14:31:19 -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
microproofs
dbfa08a5a7
fix: issue with tuple clause
...
It was not consuming the next case if there was no condition being checked in the clause.
Now it properly always consumes the next clause unless last clause.
2023-06-23 12:36:15 -04:00
microproofs
5362714a63
chore: update tests
2023-06-22 18:20:31 -04:00
microproofs
626033ff9b
fix: attempt to convert from opaque before doing monomorphization
2023-06-22 18:20:31 -04:00
microproofs
24f5c4de6b
fix: the final clause of a when expecting another clause afterwards in nested list cases.
...
fix: all elements were being destructured in tuple clauses even if not used
2023-06-19 21:43:38 -04:00
rvcas
37b2f0c239
fix: gift card example stdlib update
...
closes #596
2023-06-13 00:38:29 -04:00
Justin Syme
e0e6ee1fa9
Update multi.ak
...
Updated using `from_minted_value`
2023-06-07 17:37:30 -04:00
Justin Syme
fc9a60494e
Update oneshot.ak
...
Updated with
`|> from_minted_value`
2023-06-07 17:37:30 -04:00
rvcas
feb2698e5e
chore: commit multi-validator plutus.json
2023-06-07 15:42:42 -04:00
Kasey White
73c9ac3409
feat: create multi validator for gift card.
...
This version of gift card allows for minting many gift cards in a tx under the same policy by policy creator. Also allows batch redeem.
2023-06-07 15:42:42 -04:00
microproofs
5faa925aea
fix: error when using nested boolean checks in when conditions
2023-06-06 03:04:12 -04:00
microproofs
bfd2a50a6b
fix: zero arg functions were grabbing extra dependencies they didn't need to
...
fix: Had the wrong conversion for constant maps to plutus data. Fixed to check for right conversion
2023-06-04 15:23:36 -04:00
rvcas
335cc0c8bc
feat(cli): rework uplc subcommands
...
closes #553
* rename flat to encode
* rename unflat to decode
* alias both to their old names
* both only print to stdout
use can pipe to file
* split cbor and hex flags
* hex flag works for either cbor or flat
* encode takes --to flag
[name, named-debruijn, debruijn]
* decode takes --from flag
[name, named-debruijn, debruijn]
2023-06-01 23:50:59 -04:00
microproofs
4838ebd39e
feat: record modules are no longer unimplemented for no fields
...
refactor: remove some clones and use a ref instead
test: add acceptance test 81
2023-05-14 18:30:51 -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
c3184c544c
fix: wrap data reduce had the wrong argument called in recursively, thus skipping over cases that should have been reduced
...
chore: Add unit tests on for uplc optimizations
2023-04-26 17:22:16 -04:00
microproofs
b050018a37
test fix: blueprint change
2023-04-25 02:06:56 -04:00
rvcas
3891016bc3
chore(gift_card): better input id
2023-04-21 12:07:18 -04:00
rvcas
6ab42735b0
fix: switch back to blockfrost kupmios + demeter setup showing strange behavior
2023-04-21 11:59:31 -04:00
microproofs
672a900243
chore: converted acceptance tests 5-7
2023-04-19 20:03:41 -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
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
microproofs
fc1b8738df
fix: fixed how the ir was generating for expect Void, expect Bool, let Void
...
add some acceptance tests for the various scenarios
2023-04-12 22:37:33 -04:00
KtorZ
0846fe2d5f
Add new failing test case for 048 (clause guards)
...
It seems like we don't properly handle clause guards for wildcard
patterns. Seems like a codegen issue here as the code type-check
properly.
2023-04-12 08:24:18 +02:00
Kasey White
ff290bc582
add expect false test
2023-04-09 17:43:56 -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
897011e9bc
misc changes
2023-04-09 17:43:56 -04:00
Kasey White
f4ba6b8985
fix: unused validator args had an incorrect if check
2023-04-09 17:43:56 -04:00
Kasey White
3f45b524b8
feat: unused validator args are not expect checked
2023-04-09 17:43:56 -04:00
Kasey White
8c8312a412
fix: expect true was always expecting false
2023-04-09 17:43:56 -04:00
KtorZ
23b72e18f3
Add new acceptance test scenario: expect unary constructors.
...
```
Error:
× Main thread panicked.
├─▶ at crates/aiken-lang/src/gen_uplc.rs:1852:33
╰─▶ called `Option::unwrap()` on a `None` value
```
2023-04-09 17:43:56 -04:00
rvcas
1444c9328d
fix some typos
2023-04-07 16:51:18 -04:00
rvcas
d0d482b3cb
chore(gift_card): run fmt
2023-04-07 16:35:58 -04:00
rvcas
4e380012fb
chore(gift_card): use kupmios backed by demeter for lucid
2023-04-06 21:35:08 -04:00
KtorZ
814157dd7b
Fix formatter inconsistency with record spread patterns.
2023-03-30 13:02:20 +02:00
KtorZ
17431daaa4
Correctly nest multiline pipeline expressions.
2023-03-30 12:48:15 +02:00
rvcas
703429af98
chore: commit plutus.json
2023-03-27 20:00:32 -04:00
Kasey White
b2dcb112c9
fix last 2 acceptance tests
2023-03-27 20:00:32 -04:00
Kasey White
32d34d5fd3
create struct Air Env
...
refactor out some to_strings
2023-03-27 20:00:32 -04:00
rvcas
0060d29265
chore: update gift card example to use new validator syntax
2023-03-27 13:39:34 -04:00
Kasey White
bb820ebdd8
fix: trace and scope issues
...
fix scope issues involving fieldsexpose and other destructureing pattern
fix trace to extract string from term.
2023-03-21 12:38:13 -04:00
Kasey White
6e5b24a937
refactor the rest of the term builders to use more concise code
2023-03-21 00:50:13 -04:00
Kasey White
50db958d06
update codegen to use more streamlined uplc building methods
2023-03-21 00:50:13 -04:00
KtorZ
6422027c6c
Fix README template for newly generated projects, and hello, world
2023-03-18 22:23:55 +01:00
KtorZ
a4c7337df2
Add new acceptance scenario 079 (double validators)
2023-03-17 18:40:49 -04:00