Commit Graph

45 Commits

Author SHA1 Message Date
rvcas 8a7df7f66b
test: add empty list test 2023-07-04 17:19:29 -04:00
microproofs 42544af799 fix: safe encode bits to check for 2^num_bits <= byte we are encoding
fix: I thought namedDeBruijn takes advantage of Binder for encoding and decoding.
It does not...
fix: Debruijn was being converted to NamedDeBruijn incorrectly
2023-06-30 23:06:38 -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
KtorZ 1d3315005c
Support some single-character escape sequences in UPLC
Fixes #472.

  This also partially addresses #195. However, as pointed out in one of
  the comment, there's no 'official rule' when it comes to what should
  be considered valid escape sequences. Haskell relies mostly on the
  AttoParsec library and Rust also has its own set of rules.

  This is in particular true for unicode escape sequences, but there is
  a common middleground for some usual single character escapes such as
  \n or \\. So we now at least support these.

  For more complicated escape sequence, please refer to #195 for now and
  keep the discussion going there.
2023-03-30 11:50:59 +02:00
rvcas c1d67e95e1
feat: fix errors and add tests for BigInt changes 2023-02-09 15:01:30 -05:00
rvcas a365649360 chore: clippy autofix 2023-02-01 18:53:11 -05:00
rvcas c8efe60843 feat: use Rc for more things, fib_iter runs almost 3 seconds faster now 2023-02-01 18:53:11 -05:00
rvcas b3266fb837 chore: clippy warnings 2022-12-20 16:32:31 -05:00
Kasey White c89690aa77 Create unknown constructor error for decode 2022-10-23 17:54:21 -04:00
Kasey White 360a5b6017 preceding bytes output changes if you error before position 5 2022-10-23 17:54:21 -04:00
Kasey White 15cfb22c8f more detailed parse errors when decoding with flat 2022-10-23 17:54:21 -04:00
alessandrokonrad 28b9fed8e5 added i128 integer support 2022-10-17 08:35:45 -04:00
Kasey White 6ccd0aa2fb adding better debug for wrong term tag in uplc 2022-09-19 14:59:55 -04:00
rvcas 348ed3b719
fix: changes from pallas bump
Co-authored-by: Kasey White <kwhitemsg@gmail.com>
2022-09-14 22:00:52 -04:00
rvcas cf27c0c755
feat: apply redeemers and datum to script 2022-09-14 18:51:08 -04:00
Kasey White 2bb482d9ec Using rc we now get code that runs much faster and
can run jpg contract with no inputs
2022-08-17 22:40:32 -04:00
rvcas b83394be74 feat: decode proto list and proto pair
Co-authored-by: Kasey White <kwhitemsg@gmail.com>
2022-08-05 00:38:41 -04:00
rvcas e8f783e7bb feat: decode plutus data 2022-08-05 00:38:41 -04:00
rvcas fa3c88a31e feat: add from_cbor and from_hex 2022-08-05 00:38:41 -04:00
rvcas e6be899b2a feat: fill in encode constant todos 2022-08-05 00:38:41 -04:00
rvcas 61b70e7e3d feat: encode plutus data 2022-08-05 00:38:41 -04:00
Kasey White d14920265e flat encoding for list and pairs
Co-authored-by: rvcas <x@rvcas.dev>
2022-08-05 00:38:41 -04:00
rvcas 8e8f1270b5 feat: to_cbor and to_hex for Program 2022-08-03 17:17:15 -04:00
Kasey White be38d1eebe fix fmt error 2022-07-24 19:58:20 -04:00
Kasey White ac3ab5b47a chore: start decoding docs and fix wording for encode docs 2022-07-24 19:58:20 -04:00
rvcas 9e62181caa feat: new Error not a constant 2022-07-24 19:51:57 -04:00
rvcas f332dfeb38 feat: 3 new error cases and more generic pretty printing 2022-07-24 19:51:57 -04:00
rvcas f7fba12a5f
chore: flat is taken in crates.io 2022-06-14 19:11:00 -04:00
Kasey White be477917f2 fix: fixed edge cases to get flat encode and decode working with stress test case 2022-06-08 03:33:09 -04:00
rvcas 60a920a0ac
fix: more subtle things 2022-06-06 22:51:09 -04:00
rvcas d4251206e7
feat: fake named debruijn 2022-06-05 22:47:04 -04:00
rvcas 349364d867
chore: builtins implement Copy 2022-06-04 14:06:46 -04:00
rvcas 1ecd47a361
feat: clean up errors 2022-06-04 14:01:45 -04:00
rvcas 2f51b23e7e
feat: debruijn conversions and binder
Co-authored-by: Kasey White <kwhitemsg@gmail.com>
2022-06-04 11:15:34 -04:00
rvcas f8edb5d519
feat: start debruijn conversion
Co-authored-by: Kasey White <kwhitemsg@gmail.com>
2022-06-03 00:36:39 -04:00
rvcas 83d6b5243e
feat: get program ready for debruijn 2022-06-02 21:39:09 -04:00
rvcas c7037ff8d9
feat: get string interning working
Co-authored-by: Kasey White <kwhitemsg@gmail.com>
2022-06-01 01:11:30 -04:00
Kasey White 581b8fc85d feat: flat tweaks and string interning
Co-authored-by: rvcas <x@rvcas.dev>
2022-05-31 22:57:55 -04:00
rvcas 31e7d63d9a
chore: use ref to get slice 2022-05-30 18:26:49 -04:00
rvcas 3f1ddef635
chore: slight clean up 2022-05-30 18:05:50 -04:00
Kasey White 83a784c745 add simple test for decoding 2022-05-30 17:12:32 -04:00
Kasey White d4b659c04e feat: finish up most of decoding (integer, decodeListWith, Term, Program, Version, Constant, Builtin) 2022-05-30 16:49:43 -04:00
Kasey White 4fb508e3b2 Add decoding for bytestring, string, char, bool, and filler 2022-05-30 02:32:39 -04:00
rvcas 0a476d0592
feat: prepare decoding traits and make new Flat trait 2022-05-28 20:12:03 -04:00
Kasey White 41487733f7 feat: builtin encoding
Co-authored-by: rvcas <x@rvcas.dev>
2022-05-28 00:23:34 -04:00