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:
@@ -0,0 +1 @@
|
||||
(program 1.0.0 [(lam x x) (con unit ())])
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 64100
|
||||
| mem: 500})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (con unit ()))
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 [(lam x x) (con integer 0)])
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 64100
|
||||
| mem: 500})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (con integer 0))
|
||||
@@ -0,0 +1,3 @@
|
||||
(program 1.0.0
|
||||
[(lam x (con bool False)) (con integer 42)]
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 64100
|
||||
| mem: 500})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (con bool False))
|
||||
@@ -0,0 +1,3 @@
|
||||
(program 1.0.0
|
||||
[(lam x x) (con integer 42)]
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 64100
|
||||
| mem: 500})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (con integer 42))
|
||||
@@ -0,0 +1,3 @@
|
||||
(program 1.0.0
|
||||
[[(lam x x) (lam y y)] (con integer 42)]
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 112100
|
||||
| mem: 800})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (con integer 42))
|
||||
@@ -0,0 +1,3 @@
|
||||
(program 1.0.0
|
||||
[(lam x x) (lam y y)]
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 64100
|
||||
| mem: 500})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (lam y y))
|
||||
@@ -0,0 +1,3 @@
|
||||
(program 1.0.0
|
||||
[(lam x (lam y x)) (con integer 42)]
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 64100
|
||||
| mem: 500})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (lam y (con integer 42)))
|
||||
@@ -0,0 +1,3 @@
|
||||
(program 1.0.0
|
||||
[(lam x (lam y x)) (con integer 42) (con bool False)]
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 112100
|
||||
| mem: 800})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (con integer 42))
|
||||
@@ -0,0 +1,3 @@
|
||||
(program 1.0.0
|
||||
[(lam f (lam x (lam y [f x y]))) (lam a (lam b a)) (con bool False) (con bool True)]
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 256100
|
||||
| mem: 1700})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (con bool False))
|
||||
@@ -0,0 +1,2 @@
|
||||
-- addInteger is monomorphic so it must not be forced
|
||||
(program 1.0.0 [(force (builtin addInteger)) (con integer 5) (con integer 6)])
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -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)))
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 80100
|
||||
| mem: 600})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.1.0 (con integer 1))
|
||||
@@ -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)))
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 80100
|
||||
| mem: 600})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.1.0 (con integer 2))
|
||||
@@ -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])))
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 277308
|
||||
| mem: 1202})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.1.0 (con integer 5))
|
||||
@@ -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])))
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 277308
|
||||
| mem: 1202})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.1.0 (con integer 1))
|
||||
@@ -0,0 +1,4 @@
|
||||
-- case of non-constr
|
||||
(program 1.1.0
|
||||
(case (con integer 1) (lam x x) (lam x x))
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -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)))
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -0,0 +1,4 @@
|
||||
-- nullary case
|
||||
(program 1.1.0
|
||||
(case (constr 0) (con integer 1) (con integer 2))
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 48100
|
||||
| mem: 400})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.1.0 (con integer 1))
|
||||
@@ -0,0 +1,4 @@
|
||||
-- empty case, aka -XEmptyCase
|
||||
(program 1.1.0
|
||||
(case (constr 0))
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 [ (lam i_0 (lam j_1 i_0)) (con integer 1) ])
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 64100
|
||||
| mem: 500})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (lam j_0 (con integer 1)))
|
||||
@@ -0,0 +1,4 @@
|
||||
-- empty constr
|
||||
(program 1.1.0
|
||||
(constr 0 )
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 16100
|
||||
| mem: 200})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.1.0 (constr 0))
|
||||
@@ -0,0 +1,4 @@
|
||||
-- constr with an argument
|
||||
(program 1.1.0
|
||||
(constr 0 (con integer 1))
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 32100
|
||||
| mem: 300})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.1.0 (constr 0 (con integer 1)))
|
||||
@@ -0,0 +1,4 @@
|
||||
-- constr can have arbitrary terms in it
|
||||
(program 1.1.0
|
||||
(constr 1 (con integer 1) (lam x x) (constr 0 (con integer 1)))
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 80100
|
||||
| mem: 600})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.1.0 (constr 1 (con integer 1) (lam x x) (constr 0 (con integer 1))))
|
||||
@@ -0,0 +1,4 @@
|
||||
-- constr is strict in all its arguments
|
||||
(program 1.1.0
|
||||
(constr 0 (error))
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -0,0 +1,4 @@
|
||||
-- constr is strict in all its arguments
|
||||
(program 1.1.0
|
||||
(constr 0 (con integer 1) (error))
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -0,0 +1,3 @@
|
||||
(program 1.0.0
|
||||
[(lam x (con integer 4)) (delay (error))]
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 64100
|
||||
| mem: 500})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (con integer 4))
|
||||
@@ -0,0 +1,3 @@
|
||||
(program 1.0.0
|
||||
[(lam x x) (delay (error))]
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 64100
|
||||
| mem: 500})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (delay (error )))
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (lam x (delay x)))
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 16100
|
||||
| mem: 200})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (lam x (delay x)))
|
||||
@@ -0,0 +1,2 @@
|
||||
-- can only force a delay or a forceable (polymorphic) builtin
|
||||
(program 1.0.0 (force (con integer 5)))
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -0,0 +1,3 @@
|
||||
(program 1.0.0
|
||||
[(lam x (force x)) (delay (con integer 4))]
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 96100
|
||||
| mem: 700})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (con integer 4))
|
||||
@@ -0,0 +1,3 @@
|
||||
(program 1.0.0
|
||||
[(lam x (force [(lam y y) x])) (delay (con integer 4))]
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 144100
|
||||
| mem: 1000})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (con integer 4))
|
||||
@@ -0,0 +1,3 @@
|
||||
(program 1.0.0
|
||||
(force (lam x x))
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -0,0 +1 @@
|
||||
evaluation failure
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (lam x x))
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 16100
|
||||
| mem: 200})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (lam x x))
|
||||
@@ -0,0 +1,3 @@
|
||||
(program 1.0.0
|
||||
(lam x (con integer 23))
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
({cpu: 16100
|
||||
| mem: 200})
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 (lam x (con integer 23)))
|
||||
@@ -0,0 +1 @@
|
||||
(program 1.0.0 [(con integer 3) (con integer 4)])
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user