-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fill in machine todos and cost model for case and constr
This allows for several more tests to pass **Had to remove case-7 since it was incorrectly passing before**
- Loading branch information
1 parent
0382e5c
commit 1567e42
Showing
24 changed files
with
60 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
crates/uplc/test_data/conformance/evaluation/term/case/case-1/case-1.uplc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- select first branch | ||
(program 1.1.0 | ||
(case (constr 0 (con integer 0)) (lam x (con integer 1)) (lam x (con integer 2))) | ||
) |
1 change: 1 addition & 0 deletions
1
crates/uplc/test_data/conformance/evaluation/term/case/case-1/case-1.uplc.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(program 1.1.0 (con integer 1)) |
4 changes: 4 additions & 0 deletions
4
crates/uplc/test_data/conformance/evaluation/term/case/case-2/case-2.uplc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- select second branch | ||
(program 1.1.0 | ||
(case (constr 1 (con integer 0)) (lam x (con integer 1)) (lam x (con integer 2))) | ||
) |
1 change: 1 addition & 0 deletions
1
crates/uplc/test_data/conformance/evaluation/term/case/case-2/case-2.uplc.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(program 1.1.0 (con integer 2)) |
4 changes: 4 additions & 0 deletions
4
crates/uplc/test_data/conformance/evaluation/term/case/case-3/case-3.uplc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- select first branch and do computation with the args | ||
(program 1.1.0 | ||
(case (constr 0 (con integer 3) (con integer 2)) (lam x (lam y [(builtin addInteger) x y])) (lam x (lam y [(builtin subtractInteger) x y]))) | ||
) |
1 change: 1 addition & 0 deletions
1
crates/uplc/test_data/conformance/evaluation/term/case/case-3/case-3.uplc.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(program 1.1.0 (con integer 5)) |
4 changes: 4 additions & 0 deletions
4
crates/uplc/test_data/conformance/evaluation/term/case/case-4/case-4.uplc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- select second branch and do computation with the args | ||
(program 1.1.0 | ||
(case (constr 1 (con integer 3) (con integer 2)) (lam x (lam y [(builtin addInteger) x y])) (lam x (lam y [(builtin subtractInteger) x y]))) | ||
) |
1 change: 1 addition & 0 deletions
1
crates/uplc/test_data/conformance/evaluation/term/case/case-4/case-4.uplc.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(program 1.1.0 (con integer 1)) |
4 changes: 4 additions & 0 deletions
4
crates/uplc/test_data/conformance/evaluation/term/case/case-5/case-5.uplc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- case of non-constr | ||
(program 1.1.0 | ||
(case (con integer 1) (lam x x) (lam x x)) | ||
) |
1 change: 1 addition & 0 deletions
1
crates/uplc/test_data/conformance/evaluation/term/case/case-5/case-5.uplc.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
evaluation failure |
4 changes: 0 additions & 4 deletions
4
crates/uplc/test_data/conformance/evaluation/term/case/case-7/case-7.uplc
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
crates/uplc/test_data/conformance/evaluation/term/case/case-7/case-7.uplc.expected
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
crates/uplc/test_data/conformance/evaluation/term/case/case-8/case-8.uplc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- nullary case | ||
(program 1.1.0 | ||
(case (constr 0) (con integer 1) (con integer 2)) | ||
) |
1 change: 1 addition & 0 deletions
1
crates/uplc/test_data/conformance/evaluation/term/case/case-8/case-8.uplc.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(program 1.1.0 (con integer 1)) |
4 changes: 4 additions & 0 deletions
4
crates/uplc/test_data/conformance/evaluation/term/case/case-9/case-9.uplc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- empty case, aka -XEmptyCase | ||
(program 1.1.0 | ||
(case (constr 0)) | ||
) |
1 change: 1 addition & 0 deletions
1
crates/uplc/test_data/conformance/evaluation/term/case/case-9/case-9.uplc.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
evaluation failure |
4 changes: 4 additions & 0 deletions
4
crates/uplc/test_data/conformance/evaluation/term/constr/constr-1/constr-1.uplc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- empty constr | ||
(program 1.1.0 | ||
(constr 0 ) | ||
) |
1 change: 1 addition & 0 deletions
1
crates/uplc/test_data/conformance/evaluation/term/constr/constr-1/constr-1.uplc.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(program 1.1.0 (constr 0)) |
4 changes: 4 additions & 0 deletions
4
crates/uplc/test_data/conformance/evaluation/term/constr/constr-2/constr-2.uplc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- constr with an argument | ||
(program 1.1.0 | ||
(constr 0 (con integer 1)) | ||
) |
1 change: 1 addition & 0 deletions
1
crates/uplc/test_data/conformance/evaluation/term/constr/constr-2/constr-2.uplc.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(program 1.1.0 (constr 0 (con integer 1))) |