Add PlutusV3 conformance tests and also control budgets

There were some odd discrepancy for `integerToByteString` on the mem
  side. Either 1 or about 1000 mem units off; which I couldn't quite
  figure out. Yet, it proves useful to validate builtin at large and
  ensure we have a valid cost model for v3.
This commit is contained in:
KtorZ
2024-08-14 02:42:04 +02:00
parent f879f6d183
commit 2cb87f4f8f
2893 changed files with 6385 additions and 13 deletions

View File

@@ -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)))
)

View File

@@ -0,0 +1,2 @@
({cpu: 115100
| mem: 600})

View File

@@ -0,0 +1 @@
(program 1.1.0 (con integer 1))

View File

@@ -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)))
)

View File

@@ -0,0 +1,2 @@
({cpu: 115100
| mem: 600})

View File

@@ -0,0 +1 @@
(program 1.1.0 (con integer 2))

View File

@@ -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])))
)

View File

@@ -0,0 +1,2 @@
({cpu: 459577
| mem: 1202})

View File

@@ -0,0 +1 @@
(program 1.1.0 (con integer 5))

View File

@@ -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])))
)

View File

@@ -0,0 +1,2 @@
({cpu: 459577
| mem: 1202})

View File

@@ -0,0 +1 @@
(program 1.1.0 (con integer 1))

View File

@@ -0,0 +1,4 @@
-- case of non-constr
(program 1.1.0
(case (con integer 1) (lam x x) (lam x x))
)

View File

@@ -0,0 +1 @@
evaluation failure

View File

@@ -0,0 +1 @@
evaluation failure

View File

@@ -0,0 +1,4 @@
-- branch with wrong arguments
(program 1.1.0
(case (constr 0 (con integer 0)) (con integer 1) (lam x (con integer 2)))
)

View File

@@ -0,0 +1 @@
evaluation failure

View File

@@ -0,0 +1 @@
evaluation failure

View File

@@ -0,0 +1,4 @@
-- nullary case
(program 1.1.0
(case (constr 0) (con integer 1) (con integer 2))
)

View File

@@ -0,0 +1,2 @@
({cpu: 69100
| mem: 400})

View File

@@ -0,0 +1 @@
(program 1.1.0 (con integer 1))

View File

@@ -0,0 +1,4 @@
-- empty case, aka -XEmptyCase
(program 1.1.0
(case (constr 0))
)

View File

@@ -0,0 +1 @@
evaluation failure

View File

@@ -0,0 +1 @@
evaluation failure