Commit Graph

109 Commits

Author SHA1 Message Date
KtorZ bd956efd36
Rework acceptance test 014 to smaller reproducible scenario 2022-12-14 10:20:43 +01:00
KtorZ 7c54283e69
Add new acceptance test scenario (015)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:2388:21
    ╰─▶ not yet implemented
  ```
2022-12-14 10:20:43 +01:00
KtorZ 95df5f9137
Add new acceptance test scenario (014) 2022-12-14 09:45:26 +01:00
KtorZ bc7c236b3b
Add new acceptance test scenario (013)
```
  ERROR:
  The provided Plutus code called 'error'
  ```
2022-12-14 09:45:25 +01:00
KtorZ 9c902cdf89
Add new acceptance test scenario (012)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:3413:34
    ╰─▶ internal error: entered unreachable code: Var {
            scope: [
                0,
                1,
                3,
                24,
                25,
                29,
                32,
            ],
            constructor: ValueConstructor {
                public: false,
                variant: LocalVariable {
                    location: 46..62,
                },
                tipo: Fn {
                    args: [
                        Var {
                            tipo: RefCell {
                                value: Link {
                                    tipo: App {
                                        public: true,
                                        module: "",
                                        name: "Int",
                                        args: [],
                                    },
                                },
                            },
                        },
                    ],
                    ret: App {
                        public: true,
                        module: "",
                        name: "Bool",
                        args: [],
                    },
                },
            },
            name: "f",
            variant_name: "",
        }
  ```
2022-12-14 09:45:25 +01:00
KtorZ f53caff538
Add new acceptance test scenario (011)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:4022:40
    ╰─▶ called `Option::unwrap()` on a `None` value
  ```
2022-12-14 09:45:25 +01:00
rvcas 299cd1ac24
fix: tuples 2022-12-14 09:45:25 +01:00
KtorZ 37def91fc5
Add new acceptance test scenario (010)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:688:33
    ╰─▶ called `Option::unwrap()` on a `None` value
    help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
  ```
2022-12-14 09:45:24 +01:00
KtorZ 4217fd06b5
Add new acceptance test scenario (009)
Note: the problem is only present when importing a builtin explicitly.
  When using a qualified import, it compiles fine.

  ```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:3264:35
    ╰─▶ called `Option::unwrap()` on a `None` value
    help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
  ```
2022-12-14 09:45:24 +01:00
KtorZ adf34e9dc6
Add new acceptance test scenario (008)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:530:41
    ╰─▶ not yet implemented
    help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
  ```
2022-12-14 09:45:24 +01:00
KtorZ 022fc36dd2
Add new (failing) acceptance test (007)
```
  Error: aiken::check

    × Checking
    ╰─▶ Not a function
     ╭─[./007/lib/test.ak:4:1]
   4 │     [(a, b), ..rest] -> {
   5 │       let (a_tail, b_tail) = unzip(rest)
     ·                                   ──────
   6 │       ([a, ..a_tail], [b, ..b_tail])
     ╰────
  ```
2022-12-14 09:45:24 +01:00
KtorZ a62fb1905e
rename examples/tests/{a,b,c,d,e,f} into examples/acceptance_tests/00{1,2,3,4,5,6}
Also added a little Makefile to run them all in one go.
2022-12-14 09:45:24 +01:00
KtorZ b294063097
Add another acceptance test (f)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:4043:46
    ╰─▶ not yet implemented
    help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
  ```
2022-12-14 09:45:24 +01:00
KtorZ 603f4a6385
Add another failing example (e)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:1518:45
    ╰─▶ called `Option::unwrap()` on a `None` value
    help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
  ```
2022-12-14 09:45:24 +01:00
KtorZ 572121974e
Update generic syntax in tests. 2022-12-14 09:45:23 +01:00
KtorZ 8f69a4b600
Add another failing test example (d)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:3264:35
    ╰─▶ called `Option::unwrap()` on a `None` value
    help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
  ```
2022-12-14 09:45:23 +01:00
Kasey White d78e2c9c6f
feat: finish up generic match cases 2022-12-14 09:45:23 +01:00
rvcas 77386893d7
test: actually repeat 2022-12-14 09:45:23 +01:00
KtorZ 04c05f8d63
Add some tests that make the compiler panick. 2022-12-14 09:45:22 +01:00
rvcas 69db9696d6 feat: prefix tuples with hash again cause ambguity with call 2022-12-13 10:27:17 -05:00
rvcas 6dc4738b66 feat: update formatter for new changes 2022-12-12 19:22:11 -05:00
rvcas a4f6388eca feat: remove the need for # in front of tuples 2022-12-12 19:22:11 -05:00
rvcas 2ba712eef6
feat: start adding padding to test output 2022-12-08 19:25:28 -05:00
rvcas e9d8e1d317
feat: print budget consumed by test 2022-12-08 19:25:24 -05:00
KtorZ bc785673b2
Fix compilation errors for the newly introduce test & add type inference.
Tests are basically functions for which the return type should unify with bool. In principle, the type checker could also check that a test function has no arguments but, a test function with arguments wouldn't parse in the first place; feels a bit hacky but it works when considering the pipeline as a whole.

  Note that the code generation is still to be done.
2022-12-08 19:24:20 -05:00
Kasey White 80a9b7b36a feat: add map support and tuple deconstruction in let 2022-12-08 14:28:30 -05:00
Kasey White 2f7131e9b8 feat: add tuples and streamline conversion of types to and from data 2022-12-07 08:40:23 -05:00
rvcas d8ff574045
chore: nuke stdlib from main repo 2022-12-06 22:26:07 -05:00
rvcas 45990f1f84 feat: unify tuples and stdlib updates 2022-12-06 22:23:40 -05:00
Kasey White 3f47a1f4b8 fix: constr issue
- also fixed constant parsing
- added new cbor flag to eval

Co-authored-by: rvcas <x@rvcas.dev>
2022-12-05 22:55:57 -05:00
rvcas 7875af7d35 feat: better errors for incorrect contructor making 2022-12-05 18:11:04 -05:00
rvcas 7e6dc978a1 feat: commit latest build assets for sample 2022-12-05 14:18:44 -05:00
Kasey White 3e68204768 replace uplc with uplc_two and move structs over 2022-12-05 14:18:44 -05:00
Kasey White 0fda535c50 feat: add module constants except for tuple 2022-12-05 14:18:44 -05:00
Kasey White de9302a877 feat: finish list destructure in when matches 2022-12-05 14:18:44 -05:00
Kasey White f48039fd4f Add ability to generate ir with complex constructor cases 2022-12-05 14:18:44 -05:00
Kasey White 64cbae938d Add clause guard to IR and use it for complex clauses 2022-12-05 14:18:44 -05:00
Kasey White 044d609a24 feat: nested constr access and module funcs now work 2022-12-05 14:18:44 -05:00
Kasey White 3d3beef7d4 feat: uplc code gen for functions and minor recursion fix 2022-12-05 14:18:44 -05:00
Kasey White 8f984ad131 fix up function definitions in the IR 2022-12-05 14:18:44 -05:00
Kasey White 02ee129615 feat: function insertion IR done, code gen will be easy 2022-12-05 14:18:44 -05:00
rvcas 4129cf92c9 chore: commit assets 2022-12-05 14:18:44 -05:00
Kasey White 29a30aa61f feat: finished when constr is for IR and code gen 2022-12-05 14:18:44 -05:00
Kasey White 3fb3a3240a checkpoint 2022-12-05 14:18:44 -05:00
Kasey White 8b24a66b7e add field access and list patterns are finished
Co-authored-by: rvcas <x@rvcas.dev>
2022-12-05 14:18:44 -05:00
Kasey White abe29a3883 make progress on list deconstruction with IR 2022-12-05 14:18:44 -05:00
Kasey White 2a00b896fc create ir and start to replace plutus code gen with ir 2022-12-05 14:18:44 -05:00
rvcas 9ebc836b89 feat: handle punning in a non-ambiguous way 2022-12-04 21:12:29 -05:00
rvcas 391849bf37 feat: parser improvements
- record creation with punning
- disambiguate if condition from record creation with punning
- split parser tests up into many smaller ones
2022-12-04 21:12:29 -05:00
rvcas 5ec93a8692 feat: format bytearrays 2022-12-01 15:28:15 -05:00