Commit Graph

546 Commits

Author SHA1 Message Date
KtorZ 216dab99d4
chore: Release 2024-06-06 11:19:34 +02:00
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