Matthias Benkort
28515e70ec
Merge pull request #950 from hadelive/k256-error
...
Fix k256 error does not implement clone
2024-05-30 13:42:57 +02:00
hade
740e140c89
fix: custom k256 error
2024-05-30 16:13:51 +07:00
hade
b367ec2113
fix: fmt check
2024-05-30 16:09:32 +07:00
hade
ad3c9f24b7
chore: minimal pallas dependencies
2024-05-30 15:09:05 +07:00
rvcas
338fc0eba6
chore: Release
2024-05-23 16:45:10 -04:00
rvcas
ff50d4d2cf
chore: Release
2024-05-23 16:23:59 -04:00
KtorZ
8e0f32a577
Fix negative evaluation costs
...
Whoopsie.
2024-05-23 11:21:47 +02:00
microproofs
3d06129d9b
add test for curry optimization that is a reduced case of #945
2024-05-22 15:46:32 -04:00
microproofs
d6cc450ce4
The actual issue with #945 is that the curry builtin reducer could sometimes place fully applied builtins that could evaluate and fail above where they were actually used. This happened with builtins that were called with the same constants enough times for the curry builtin to try hoist to a higher scope. This is now fixed by detecting which builtins are safe to evaluate in advance before we hoist fully applied builtins
2024-05-22 15:22:31 -04:00
microproofs
c16bd06e97
make sure traverse_uplc_with_helper is always passing the arg to lambda before running the with function.
...
Breaks #945 again
2024-05-22 11:58:05 -04:00
microproofs
489eff7f5b
Closes #945
...
Switch to depth first optimization passes instead of breadth first for inlining. Need to think more on how to do breadth first optimization passes
2024-05-21 17:12:57 -04:00
rvcas
e28b0df840
fix: add v3 mapping for builtin semantics relates to #907
2024-05-21 17:06:18 -04:00
rvcas
f306f1715a
feat: use plutus version in address command
...
relates to #907
2024-05-21 17:04:25 -04:00
rvcas
3bc3792aa3
feat: add plutus version to aiken.toml
...
relates to #907
2024-05-21 17:02:20 -04:00
rvcas
f8ce46d0f4
chore(ci): run cargo dist init
2024-05-08 11:05:30 -04:00
microproofs
945a3f743b
feat: builtin wrapper reduction optimization
2024-04-26 19:24:04 +02:00
rvcas
9d49be46b8
chore: add some docs to the uplc crate
2024-04-08 14:30:07 -04:00
microproofs
21b1e29f09
chore: clippy fix
2024-03-27 16:39:52 -04:00
rvcas
075668b52e
chore: Release
2024-03-25 22:09:37 -04:00
KtorZ
4e8042fd06
chore: Release
2024-03-22 16:10:17 +01:00
rvcas
fe6710935d
feat: impl serde on errythang
2024-03-08 19:19:07 -05:00
microproofs
94f383762c
step up the optimizations a bit more by inlining a small function
2024-03-08 00:12:44 -05:00
microproofs
1edd1a1fa3
change currying to happen with 3 or more occurrences
2024-03-08 00:12:44 -05:00
microproofs
e9122de061
more identity reduce testing
2024-03-08 00:12:44 -05:00
microproofs
dabaae8ca6
more identity and inline tests
2024-03-08 00:12:44 -05:00
microproofs
97b0cf6813
reorganize shrinker tests
2024-03-08 00:12:44 -05:00
microproofs
eb709d6fc3
reorder tests to match order of functions
2024-03-08 00:12:44 -05:00
KtorZ
bff822ea7f
Rework unit test report to leverage new reification
...
And also provide slightly better errors when traces, or trace-if-false operators are present.
2024-03-07 01:20:40 +01:00
microproofs
2bc433f61e
fix: need to use temp_term for counting var occurrences in identity reducer
...
chore: Adding more shrinker tests and fixed some of the existing ones
2024-03-05 12:08:18 -05:00
microproofs
27eb1a3e04
Change all uses of interning besides the uplc parser to use the new CodeGenInterner
2024-03-04 11:03:23 -05:00
microproofs
d971d9818b
update tests and ensure identity reducer handles no_inline lambda
2024-03-04 10:52:56 -05:00
microproofs
af6c107187
remove unneeded assert
2024-03-04 10:52:56 -05:00
microproofs
06ca22c26a
update inliner to handle no_inline functions
2024-03-04 10:52:56 -05:00
microproofs
4e928f39db
start adding no inline flag to functions
2024-03-04 10:52:56 -05:00
microproofs
2aaa46e54c
remove print
2024-03-04 10:52:56 -05:00
microproofs
c6ef37cc5c
checkpoint
2024-03-04 10:52:56 -05:00
microproofs
4e0aaf970f
update tests and fix final unique issues
2024-03-04 10:52:56 -05:00
microproofs
62963f7fc2
feat: finish curry optmization, improve inline optimization further, and add a subtract integer to add integer conversion
2024-03-04 10:52:56 -05:00
microproofs
7d8fdc0f22
prevent curried function hoisting if occurrences is 0
2024-03-04 10:52:56 -05:00
microproofs
258b5abf23
now currying works
2024-03-04 10:52:56 -05:00
microproofs
3b55a32583
finish up curry optimization on builtins
2024-03-04 10:52:56 -05:00
microproofs
58d586c5cf
large refactor to reduce complexity
2024-03-04 10:52:56 -05:00
microproofs
8f84eb382f
commit some changes so far
2024-03-04 10:52:56 -05:00
microproofs
9a52258e14
chugging along with a small refactor and some more work toward currying
2024-03-04 10:52:56 -05:00
microproofs
2f72510102
chore: Add back curry code removed in a previous commit
2024-03-04 10:52:56 -05:00
KtorZ
30841fe000
Rework generate_raw to avoid need to intern in prop tests
...
Also, this commit makes `apply_term` automatically re-intern the
program since it isn't safe to apply any term onto a UPLC program. In
particular, terms that introduce new let-bindings (via lambdas) will
mess with the already generated DeBruijn indices.
The problem doesn't occur for pure constant terms like Data. So we
still have a safe and fast version 'apply_data' when needed.
2024-03-03 19:33:27 +01:00
KtorZ
14f1025f0b
Display counterexamples as Aiken values instead of raw UPLC.
2024-03-03 19:33:24 +01:00
KtorZ
a703db4d14
Borrow integrated shrinking approach from MiniThesis.
2024-03-03 19:33:24 +01:00
KtorZ
3762473a60
Add preliminary plumbing to run property test through the CLI.
...
This is very very rough at the moment. But it does a couple of thing:
1. The 'ArgVia' now contains an Expr/TypedExpr which should unify to a Fuzzer. This is to avoid having to introduce custom logic to handle fuzzer referencing. So this now accepts function call, field access etc.. so long as they unify to the right thing.
2. I've done quite a lot of cleanup in aiken-project mostly around the tests and the naming surrounding them. What we used to call 'Script' is now called 'Test' and is an enum between UnitTest (ex-Script) and PropertyTest. I've moved some boilerplate and relevant function under those module Impl.
3. I've completed the end-to-end pipeline of:
- Compiling the property test
- Compiling the fuzzer
- Generating an initial seed
- Running property tests sequentially, threading the seed through each step.
An interesting finding is that, I had to wrap the prop test in a similar wrapper that we use for validator, to ensure we convert primitive types wrapped in Data back to UPLC terms. This is necessary because the fuzzer return a ProtoPair (and soon an Array) which holds 'Data'.
At the moment, we do nothing with the size, though the size should ideally grow after each iteration (up to a certain cap).
In addition, there are a couple of todo/fixme that I left in the code as reminders of what's left to do beyond the obvious (error and success reporting, testing, etc..)
2024-03-03 19:33:24 +01:00
rvcas
d698f76e3c
fix(codegen): builtin calls for g1 and g2 where flipped
...
closes #840
2024-02-29 12:13:51 -05:00
rvcas
d18caaeecb
feat(cli): support mainnet address output
...
closes #832
2024-02-27 21:55:18 -05: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
8d59ba1c77
chore: update the conformance tests
2024-02-20 13:05:28 -05:00
rvcas
a15fead982
chore: remove unused import
2024-02-20 13:05:28 -05:00
rvcas
20917bbd5b
feat(machine): fix Value::Constr fields order
...
cc @MicroProofs
2024-02-20 13:05:28 -05:00
rvcas
028528899c
feat(runtime): implement byteStringToInteger and add conformance tests
2024-02-20 13:05:28 -05:00
rvcas
da6e5ec6d1
feat: implement integerToByteString
...
Co-authored-by: Kasey White <kwhitemsg@gmail.com>
2024-02-20 13:05:28 -05:00
rvcas
c7dd4d0e48
feat(aiken-lang): expose integerToByteString and byteStringToInteger
2024-02-20 13:05:28 -05:00
rvcas
fc3bc4d9ff
feat(cost_model): add costing for integerToByteString and byteStringToInteger
2024-02-20 13:05:28 -05:00
rvcas
70d4d7fdeb
feat(runtime): add force count and arity for integerToByteString and byteStringToInteger
2024-02-20 13:05:28 -05:00
rvcas
b0eade209b
feat(DefaultFunction): add IntegerToByteString and ByteString
2024-02-20 13:05:28 -05:00
microproofs
982eff449e
chore: Release
2024-01-31 13:48:20 -05:00
rvcas
3a7a0c1971
chore: remove unused deps
2024-01-30 12:28:18 -05:00
microproofs
8584adc1b7
chore: Release
2024-01-25 15:10:11 -05:00
rvcas
defd36ad8c
chore: Release
2024-01-25 11:07:32 -05:00
rvcas
1ab6d050af
chore: bump pallas
2024-01-25 11:07:18 -05:00
rvcas
589bb9a4b3
chore: change how we depend on pallas
2024-01-24 21:26:48 -05: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
Niels Mündler
f934e87b1d
Reuse "convert_tag_to_constr"
2024-01-13 13:23:58 -05:00
Niels Mündler
cda1716d47
Unify construction of PlutusData objects from int + fields
2024-01-13 13:23:58 -05:00
Niels Mündler
742a728d53
Fix conformance test to make a point
2024-01-13 13:23:58 -05:00
Niels Mündler
316842876d
Fix PlutusData Constr test case
2024-01-13 13:23:58 -05:00
Niels Mündler
4bd8ab890a
Add reverse mapping for PlutusData constr
2024-01-13 13:23:58 -05:00
Niels Mündler
0ae631a1fe
Fix parsing Constr PlutusData
2024-01-13 13:23:58 -05:00
microproofs
4a8fecb70a
fix: satisfy clippy's demands
2024-01-11 14:53:02 -05:00
Mitchell Turner
7992a50bec
Make foreign `Language` type publicly available ( #793 )
...
* Make foreign type public available
* Fix formatting
2024-01-08 13:31:21 -08: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
Niels Mündler
b6acdde552
Use to_i64 for clarity
2023-12-19 12:20:10 -05:00
Niels Mündler
d06f2f6008
Formatting
2023-12-19 12:20:10 -05:00
Niels Mündler
eefd26c6fa
Add acceptance tests for this tricky case
2023-12-19 12:20:10 -05:00
Niels Mündler
fb56700bde
Fix and re-enable pretty print test for bigint
2023-12-19 12:20:10 -05:00
Niels Mündler
89e518f878
Deduplicate code
2023-12-19 12:20:10 -05:00
Niels Mündler
ba76c1d2cf
Adjust acceptance tests and fix IData and UData
2023-12-19 12:20:10 -05:00
Niels Mündler
022503e254
Fix to_pallas_bigint
2023-12-19 12:20:10 -05:00
Niels Mündler
1b1636ab0e
Fix parsing of negative bigint
2023-12-19 12:20:10 -05:00
Niels Mündler
0cfcd78039
Use more clear functions
2023-12-15 21:59:57 -05:00
Niels Mündler
8c619954d3
Add conformance test for big ints
2023-12-15 21:59:57 -05:00
Niels Mündler
ceb6d63e95
Add parsing for big builtins
2023-12-15 21:59:57 -05:00
microproofs
6a10be3e82
chore: remove redundant clone
2023-12-15 21:58:02 -05:00
microproofs
a0ec92897b
chore: clean up pr
2023-12-15 21:58:02 -05:00
microproofs
2cd1379aec
for now comment out curry code so the rest of the changes
...
can be merged to main
2023-12-15 21:58:02 -05:00
microproofs
c0c9f2f432
commit latest changes
2023-12-15 21:58:02 -05:00
microproofs
058a190294
feat: implement curried tree pruning
2023-12-15 21:58:02 -05:00
microproofs
51079b8590
fix: builtin_force_reducer wasn't handling double forces correctly
2023-12-15 21:58:02 -05:00
microproofs
4015550f55
start testing the first stage of currying builtins
2023-12-15 21:58:02 -05:00
microproofs
249581e1bc
chore: continuing progress on implementing currying optimization for builtins
...
Introduced some new abstractions to make a different number of args easier to deal with
2023-12-15 21:58:02 -05:00
microproofs
8fdedb754e
chore: continue more on curry optimizations
2023-12-15 21:58:02 -05:00
microproofs
88e21449c5
chore: comment fixes
2023-12-15 21:58:02 -05:00
microproofs
5c688b1404
Feat: refactor optimizations to use tree traversal algorithm
...
This makes each optimization a single function that acts on an existing tree traversal function
2023-12-15 21:58:02 -05:00