test: add all plutus conformance tests

This commit is contained in:
rvcas
2023-11-15 00:07:00 -05:00
committed by Lucas
parent b80db2f7f8
commit b6f6064aaf
880 changed files with 5384 additions and 2 deletions

View File

@@ -0,0 +1,94 @@
(program
1.0.0
[
[
(force (force (delay (delay (lam f (lam x [ f x ]))))))
[
(builtin addInteger)
[
(lam
x0
[
[
(builtin multiplyInteger)
[ [ (builtin multiplyInteger) x0 ] x0 ]
]
[
[
(builtin subtractInteger)
[
[ (builtin subtractInteger) (con integer 0) ]
(con integer 1)
]
]
[
[ (builtin subtractInteger) (con integer 3) ] (con integer 0)
]
]
]
)
[
(lam
x1
[
[
(builtin subtractInteger)
[
[ (builtin multiplyInteger) (con integer 0) ]
(con integer 2)
]
]
[ [ (builtin addInteger) (con integer 0) ] (con integer 1) ]
]
)
[
(lam
x2
[
[ (builtin subtractInteger) (con integer 2) ] (con integer 2)
]
)
[ (builtin sha3_256) (con bytestring #76) ]
]
]
]
]
]
[
(lam
x0
[
[
(builtin addInteger)
[
[
(builtin addInteger)
[
[ (builtin multiplyInteger) (con integer 2) ] (con integer 1)
]
]
[ [ (builtin addInteger) (con integer 2) ] (con integer 3) ]
]
]
[
[
(builtin subtractInteger)
[ [ (builtin subtractInteger) (con integer 1) ] (con integer 2) ]
]
[ [ (builtin subtractInteger) (con integer 2) ] (con integer 1) ]
]
]
)
[
[ (builtin lessThanInteger) (con integer 3) ]
[
[
(builtin multiplyInteger)
[ [ (builtin addInteger) (con integer 2) ] (con integer 1) ]
]
[ [ (builtin subtractInteger) (con integer 2) ] (con integer 0) ]
]
]
]
]
)

View File

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

View File

@@ -0,0 +1,106 @@
(program
1.0.0
[
[
[
(force (force (delay (delay (lam f (lam x [ f x ]))))))
(builtin addInteger)
]
[
(lam
x0
[
[
(builtin multiplyInteger)
[
[
(builtin subtractInteger)
[
[ (builtin subtractInteger) (con integer 3) ]
(con integer 2)
]
]
[ [ (builtin addInteger) (con integer 2) ] (con integer 0) ]
]
]
[
[
(builtin subtractInteger)
[
[ (builtin multiplyInteger) (con integer 3) ] (con integer 0)
]
]
[ [ (builtin multiplyInteger) (con integer 1) ] (con integer 1) ]
]
]
)
[
[
(builtin lessThanEqualsInteger)
[
[
(builtin subtractInteger)
[
[ (builtin multiplyInteger) (con integer 3) ] (con integer 3)
]
]
[ [ (builtin subtractInteger) (con integer 2) ] (con integer 3) ]
]
]
[
[
(builtin addInteger)
[ [ (builtin addInteger) (con integer 2) ] (con integer 3) ]
]
[ [ (builtin subtractInteger) (con integer 3) ] (con integer 3) ]
]
]
]
]
[
(lam
x0
[
(lam
x2
[
[
(builtin addInteger)
[
[ (builtin subtractInteger) (con integer 0) ] (con integer 3)
]
]
[ [ (builtin subtractInteger) (con integer 2) ] (con integer 1) ]
]
)
[
[
(builtin subtractInteger)
[ [ (builtin addInteger) (con integer 1) ] (con integer 1) ]
]
[ [ (builtin subtractInteger) (con integer 2) ] (con integer 0) ]
]
]
)
[
(lam
x1
[
[
(builtin lessThanInteger)
[ [ (builtin multiplyInteger) (con integer 0) ] (con integer 3) ]
]
[ [ (builtin addInteger) (con integer 0) ] (con integer 1) ]
]
)
[
[
(builtin equalsInteger)
[ [ (builtin multiplyInteger) (con integer 3) ] (con integer 2) ]
]
[ [ (builtin subtractInteger) (con integer 2) ] (con integer 0) ]
]
]
]
]
)

View File

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

View File

@@ -0,0 +1,50 @@
(program
1.0.0
[
[
(builtin remainderInteger)
[
(lam
x0
[
[
(builtin addInteger)
[
(lam
x1
[ [ (builtin addInteger) (con integer 3) ] (con integer 3) ]
)
[
[ (builtin lessThanInteger) (con integer 1) ] (con integer 0)
]
]
]
[
(lam
x2
[
[ (builtin subtractInteger) (con integer 1) ] (con integer 3)
]
)
[
[ (builtin equalsByteString) (con bytestring #7063) ]
(con bytestring #716466)
]
]
]
)
[
(builtin sha2_256)
[
[
(builtin appendByteString)
[ (builtin sha2_256) (con bytestring #67696d) ]
]
[ (builtin sha2_256) (con bytestring #767174) ]
]
]
]
]
(con integer 0)
]
)

View File

@@ -0,0 +1,44 @@
(program
1.0.0
[
[ (force (force (delay (delay (lam x (lam y x)))))) (con integer 0) ]
[
[
(builtin divideInteger)
[
(lam
x0
[
(lam x2 x2)
[
[
(builtin multiplyInteger)
[
[ (builtin multiplyInteger) (con integer 2) ]
(con integer 0)
]
]
[
[ (builtin subtractInteger) (con integer 1) ] (con integer 1)
]
]
]
)
[
(lam x1 (con integer 1))
[
[
(builtin subtractInteger)
[
[ (builtin multiplyInteger) (con integer 2) ] (con integer 3)
]
]
[ [ (builtin multiplyInteger) (con integer 2) ] (con integer 2) ]
]
]
]
]
(con integer 0)
]
]
)

View File

@@ -0,0 +1,91 @@
(program
1.0.0
[
[
[
(force
(delay
(lam
b
(lam
x
(lam
y
[
[ [ [ (force (builtin ifThenElse)) b ] x ] y ] (con unit ())
]
)
)
)
)
)
[
(lam
x0
[
[
(builtin equalsByteString)
[
(builtin sha2_256) [ (builtin sha3_256) (con bytestring #64) ]
]
]
x0
]
)
[
[
(builtin appendByteString)
[
(lam x1 [ (builtin sha3_256) (con bytestring #78) ])
[ (builtin sha3_256) (con bytestring #726e) ]
]
]
(con bytestring #6973)
]
]
]
[
(force (force (delay (delay (lam x (lam y x))))))
[
(lam
x0
[
(lam x2 x0)
[ (builtin sha2_256) [ (builtin sha3_256) (con bytestring #) ] ]
]
)
[
[
(builtin subtractInteger)
[
[
(builtin addInteger)
[
[ (builtin subtractInteger) (con integer 2) ]
(con integer 2)
]
]
[
[ (builtin subtractInteger) (con integer 1) ] (con integer 3)
]
]
]
[
(lam
x1
[
[ (builtin subtractInteger) (con integer 3) ] (con integer 3)
]
)
[
[ (builtin equalsByteString) (con bytestring #6c7a) ]
(con bytestring #6673)
]
]
]
]
]
]
[ (force (force (delay (delay (lam x (lam y x)))))) (con integer 0) ]
]
)

View File

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

View File

@@ -0,0 +1,51 @@
(program
1.0.0
[
[
[
(force
(delay
(lam
f
[
(force
(force
(delay
(delay
(lam
f
[
(force (delay (lam s [ s s ])))
(lam
s
(lam
x
[
[ f [ (force (delay (lam s [ s s ]))) s ] ] x
]
)
)
]
)
)
)
)
)
(lam
rec
(lam
z
(lam n [ [ (force n) z ] (lam n' [ [ rec [ f z ] ] n' ]) ])
)
)
]
)
)
)
[ (builtin addInteger) (con integer 1) ]
]
(con integer 0)
]
[ (lam n (delay (lam z (lam f [ f n ])))) (delay (lam z (lam f z))) ]
]
)

View File

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

View File

@@ -0,0 +1,64 @@
(program
1.0.0
[
[
[
(force
(force
(delay
(delay
(lam
f
[
(force
(force
(delay
(delay
(lam
f
[
(force (delay (lam s [ s s ])))
(lam
s
(lam
x
[
[
f [ (force (delay (lam s [ s s ]))) s ]
]
x
]
)
)
]
)
)
)
)
)
(lam
rec
(lam
z
(lam
xs
[
[ (force xs) z ]
(lam x (lam xs' [ [ rec [ [ f z ] x ] ] xs' ]))
]
)
)
)
]
)
)
)
)
)
(builtin addInteger)
]
(con integer 0)
]
(force (delay (delay (lam z (lam f z)))))
]
)

View File

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

View File

@@ -0,0 +1 @@
(program 1.0.0 (lam n (delay (lam z (lam f [ f [ [ (force n) z ] f ] ])))))

View File

@@ -0,0 +1 @@
(program 1.0.0 (lam n (delay (lam z (lam f [ f [ [ (force n) z ] f ] ])))))

View File

@@ -0,0 +1 @@
(program 1.0.0 (delay (lam z (lam f z))))

View File

@@ -0,0 +1 @@
(program 1.0.0 (delay (lam z (lam f z))))

View File

@@ -0,0 +1,176 @@
(program
1.0.0
[
[
(force
[
(force
(force
(force
(force
(delay
(delay
(delay
(delay
(lam
f_7
[
[
(force
(delay
(lam
by_1
[
(force
(force
(delay
(delay
(lam
f_2
[
(force
(delay
(lam s_1 [ s_1 s_1 ])
)
)
(lam
s_3
(lam
x_4
[
[
f_2
[
(force
(delay
(lam
s_1
[ s_1 s_1 ]
)
)
)
s_3
]
]
x_4
]
)
)
]
)
)
)
)
)
(lam
rec_8
(lam
h_11
(delay
(lam
fr_14
[
(force
[
by_1
(delay
(lam
fq_16
[
(force
[ rec_8 h_11 ]
)
[
(force h_11) fq_16
]
]
)
)
]
)
fr_14
]
)
)
)
)
]
)
)
)
(lam
k_9
(delay
(lam
h_12
[
[
h_12
(lam
x_15
[
(force k_9)
(lam
f_0_13
(lam f_1_14 [ f_0_13 x_15 ])
)
]
)
]
(lam
x_18
[
(force k_9)
(lam
f_0_16
(lam f_1_17 [ f_1_17 x_18 ])
)
]
)
]
)
)
)
]
f_7
]
)
)
)
)
)
)
)
)
)
(delay
(lam
choose_5
(lam
even_0
(lam
odd_1
[
[
choose_5
(lam n_2 [ [ (force n_2) (con bool True) ] odd_1 ])
]
(lam n_3 [ [ (force n_3) (con bool False) ] even_0 ])
]
)
)
)
)
]
)
(lam arg_0_0 (lam arg_1_1 arg_0_0))
]
[
(lam n_0 (delay (lam z_2 (lam f_3 [ f_3 n_0 ]))))
[
(lam n_0 (delay (lam z_2 (lam f_3 [ f_3 n_0 ]))))
(delay (lam z_1 (lam f_2 z_1)))
]
]
]
)

View File

@@ -0,0 +1 @@
(program 1.0.0 (con bool True))

View File

@@ -0,0 +1,179 @@
(program
1.0.0
[
[
(force
[
(force
(force
(force
(force
(delay
(delay
(delay
(delay
(lam
f_7
[
[
(force
(delay
(lam
by_1
[
(force
(force
(delay
(delay
(lam
f_2
[
(force
(delay
(lam s_1 [ s_1 s_1 ])
)
)
(lam
s_3
(lam
x_4
[
[
f_2
[
(force
(delay
(lam
s_1
[ s_1 s_1 ]
)
)
)
s_3
]
]
x_4
]
)
)
]
)
)
)
)
)
(lam
rec_8
(lam
h_11
(delay
(lam
fr_14
[
(force
[
by_1
(delay
(lam
fq_16
[
(force
[ rec_8 h_11 ]
)
[
(force h_11) fq_16
]
]
)
)
]
)
fr_14
]
)
)
)
)
]
)
)
)
(lam
k_9
(delay
(lam
h_12
[
[
h_12
(lam
x_15
[
(force k_9)
(lam
f_0_13
(lam f_1_14 [ f_0_13 x_15 ])
)
]
)
]
(lam
x_18
[
(force k_9)
(lam
f_0_16
(lam f_1_17 [ f_1_17 x_18 ])
)
]
)
]
)
)
)
]
f_7
]
)
)
)
)
)
)
)
)
)
(delay
(lam
choose_5
(lam
even_0
(lam
odd_1
[
[
choose_5
(lam n_2 [ [ (force n_2) (con bool True) ] odd_1 ])
]
(lam n_3 [ [ (force n_3) (con bool False) ] even_0 ])
]
)
)
)
)
]
)
(lam arg_0_0 (lam arg_1_1 arg_0_0))
]
[
(lam n_0 (delay (lam z_2 (lam f_3 [ f_3 n_0 ]))))
[
(lam n_0 (delay (lam z_2 (lam f_3 [ f_3 n_0 ]))))
[
(lam n_0 (delay (lam z_2 (lam f_3 [ f_3 n_0 ]))))
(delay (lam z_1 (lam f_2 z_1)))
]
]
]
]
)

View File

@@ -0,0 +1 @@
(program 1.0.0 (con bool False))

View File

@@ -0,0 +1,416 @@
(program
1.0.0
[
[
[
(force
(force
(delay
(delay
(lam
f_2
[
(force
(force
(delay
(delay
(lam
f_2
[
(force (delay (lam s_1 [ s_1 s_1 ])))
(lam
s_3
(lam
x_4
[
[
f_2
[
(force (delay (lam s_1 [ s_1 s_1 ])))
s_3
]
]
x_4
]
)
)
]
)
)
)
)
)
(lam
rec_3
(lam
z_4
(lam
xs_5
[
[ (force xs_5) z_4 ]
(lam
x_6
(lam
xs'_7 [ [ rec_3 [ [ f_2 z_4 ] x_6 ] ] xs'_7 ]
)
)
]
)
)
)
]
)
)
)
)
)
(lam
acc_0
(lam
n_1
[
[ (builtin addInteger) acc_0 ]
[
[
[
(force
(delay
(lam
f_1
[
(force
(force
(delay
(delay
(lam
f_2
[
(force (delay (lam s_1 [ s_1 s_1 ])))
(lam
s_3
(lam
x_4
[
[
f_2
[
(force
(delay
(lam s_1 [ s_1 s_1 ])
)
)
s_3
]
]
x_4
]
)
)
]
)
)
)
)
)
(lam
rec_2
(lam
z_3
(lam
n_4
[
[ (force n_4) z_3 ]
(lam n'_5 [ [ rec_2 [ f_1 z_3 ] ] n'_5 ])
]
)
)
)
]
)
)
)
[ (builtin addInteger) (con integer 1) ]
]
(con integer 0)
]
n_1
]
]
)
)
]
(con integer 0)
]
[
[
(force
[
(force
(force
(force
(force
(delay
(delay
(delay
(delay
(lam
f_7
[
[
(force
(delay
(lam
by_1
[
(force
(force
(delay
(delay
(lam
f_2
[
(force
(delay
(lam s_1 [ s_1 s_1 ])
)
)
(lam
s_3
(lam
x_4
[
[
f_2
[
(force
(delay
(lam
s_1
[
s_1 s_1
]
)
)
)
s_3
]
]
x_4
]
)
)
]
)
)
)
)
)
(lam
rec_8
(lam
h_11
(delay
(lam
fr_14
[
(force
[
by_1
(delay
(lam
fq_16
[
(force
[ rec_8 h_11 ]
)
[
(force h_11)
fq_16
]
]
)
)
]
)
fr_14
]
)
)
)
)
]
)
)
)
(lam
k_9
(delay
(lam
h_12
[
[
h_12
(lam
x_15
[
(force k_9)
(lam
f_0_13
(lam f_1_14 [ f_0_13 x_15 ])
)
]
)
]
(lam
x_18
[
(force k_9)
(lam
f_0_16
(lam f_1_17 [ f_1_17 x_18 ])
)
]
)
]
)
)
)
]
f_7
]
)
)
)
)
)
)
)
)
)
(delay
(lam
choose_9
(lam
even_0
(lam
odd_1
[
[
choose_9
(lam
l_4
[
[
(force l_4)
(force (delay (delay (lam z_2 (lam f_3 z_2)))))
]
(lam
head_2
(lam
tail_3
[
[
(force
(delay
(lam
x_1
(lam
xs_2
(delay
(lam
z_4
(lam f_5 [ [ f_5 x_1 ] xs_2 ])
)
)
)
)
)
)
head_2
]
[ odd_1 tail_3 ]
]
)
)
]
)
]
(lam
l_7
[
[
(force l_7)
(force (delay (delay (lam z_2 (lam f_3 z_2)))))
]
(lam head_5 (lam tail_6 [ even_0 tail_6 ]))
]
)
]
)
)
)
)
]
)
(lam arg_0_0 (lam arg_1_1 arg_0_0))
]
[
[
(force
(delay
(lam
x_1 (lam xs_2 (delay (lam z_4 (lam f_5 [ [ f_5 x_1 ] xs_2 ]))))
)
)
)
[
(lam n_0 (delay (lam z_2 (lam f_3 [ f_3 n_0 ]))))
(delay (lam z_1 (lam f_2 z_1)))
]
]
[
[
(force
(delay
(lam
x_1
(lam xs_2 (delay (lam z_4 (lam f_5 [ [ f_5 x_1 ] xs_2 ]))))
)
)
)
[
(lam n_0 (delay (lam z_2 (lam f_3 [ f_3 n_0 ]))))
[
(lam n_0 (delay (lam z_2 (lam f_3 [ f_3 n_0 ]))))
(delay (lam z_1 (lam f_2 z_1)))
]
]
]
[
[
(force
(delay
(lam
x_1
(lam xs_2 (delay (lam z_4 (lam f_5 [ [ f_5 x_1 ] xs_2 ]))))
)
)
)
[
(lam n_0 (delay (lam z_2 (lam f_3 [ f_3 n_0 ]))))
[
(lam n_0 (delay (lam z_2 (lam f_3 [ f_3 n_0 ]))))
[
(lam n_0 (delay (lam z_2 (lam f_3 [ f_3 n_0 ]))))
(delay (lam z_1 (lam f_2 z_1)))
]
]
]
]
(force (delay (delay (lam z_2 (lam f_3 z_2)))))
]
]
]
]
]
)

View File

@@ -0,0 +1 @@
(program 1.0.0 (con integer 4))

View File

@@ -0,0 +1,184 @@
(program
1.0.0
[
(lam
i
[
[
[
(force
(force
(delay
(delay
(lam
f
[
(force
(force
(delay
(delay
(lam
f
[
(force (delay (lam s [ s s ])))
(lam
s
(lam
x
[
[
f
[
(force (delay (lam s [ s s ]))) s
]
]
x
]
)
)
]
)
)
)
)
)
(lam
rec
(lam
z
(lam
xs
[
[ (force xs) z ]
(lam x (lam xs' [ [ rec [ [ f z ] x ] ] xs' ]))
]
)
)
)
]
)
)
)
)
)
(builtin multiplyInteger)
]
(con integer 1)
]
[
[
(lam
n
(lam
m
[
[
(force
(force
(delay
(delay
(lam
f
[
(force (delay (lam s [ s s ])))
(lam
s
(lam
x
[
[
f [ (force (delay (lam s [ s s ]))) s ]
]
x
]
)
)
]
)
)
)
)
)
(lam
rec
(lam
n'
[
[
[
(force
(delay
(lam
b
(lam
x
(lam
y
[
[
[
[ (force (builtin ifThenElse)) b ]
x
]
y
]
(con unit ())
]
)
)
)
)
)
[ [ (builtin lessThanEqualsInteger) n' ] m ]
]
(lam
u
[
[
(force
(delay
(lam
x
(lam
xs
(delay (lam z (lam f [ [ f x ] xs ])))
)
)
)
)
n'
]
[
rec
[
(lam
i
[
[ (builtin addInteger) i ]
(con integer 1)
]
)
n'
]
]
]
)
]
(lam u (force (delay (delay (lam z (lam f z))))))
]
)
)
]
n
]
)
)
(con integer 1)
]
i
]
]
)
(con integer 4)
]
)

View File

@@ -0,0 +1 @@
(program 1.0.0 (con integer 24))

View File

@@ -0,0 +1,77 @@
(program
1.0.0
[
(lam
i0
[
[
(force
(force
(delay
(delay
(lam
f
[
(force (delay (lam s [ s s ])))
(lam
s
(lam
x [ [ f [ (force (delay (lam s [ s s ]))) s ] ] x ]
)
)
]
)
)
)
)
)
(lam
rec
(lam
i
[
[
[
(force
(delay
(lam
b
(lam
x
(lam
y
[
[ [ [ (force (builtin ifThenElse)) b ] x ] y ]
(con unit ())
]
)
)
)
)
)
[ [ (builtin lessThanEqualsInteger) i ] (con integer 1) ]
]
(lam u i)
]
(lam
u
[
[
(builtin addInteger)
[
rec [ [ (builtin subtractInteger) i ] (con integer 1) ]
]
]
[ rec [ [ (builtin subtractInteger) i ] (con integer 2) ] ]
]
)
]
)
)
]
i0
]
)
(con integer 0)
]
)

View File

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

View File

@@ -0,0 +1 @@
(program 1.0.0 (lam x (force x)))

View File

@@ -0,0 +1 @@
(program 1.0.0 (lam x (force x)))

View File

@@ -0,0 +1,19 @@
(program
1.0.0
[
[
[
[
[
(force (builtin ifThenElse))
[ [ (builtin lessThanInteger) (con integer 1) ] (con integer 3) ]
]
(builtin addInteger)
]
(builtin subtractInteger)
]
(con integer 1)
]
(con integer 3)
]
)

View File

@@ -0,0 +1 @@
(program 1.0.0 (con integer 4))

View File

@@ -0,0 +1 @@
(program 1.0.0 (lam i [ [ (builtin addInteger) i ] (con integer 1) ]))

View File

@@ -0,0 +1 @@
(program 1.0.0 (lam i [ [ (builtin addInteger) i ] (con integer 1) ]))