Skip to content

Commit

Permalink
Kwxm/conformance/write bits 2 (#6596)
Browse files Browse the repository at this point in the history
* Rename some tests and add some new ones

* Tell Agda about some failing tests; remove some duplicates

* Remove duplicate in list of ignored Agda tests
  • Loading branch information
kwxm authored Oct 27, 2024
1 parent 7f6fefe commit faca16e
Show file tree
Hide file tree
Showing 63 changed files with 156 additions and 227 deletions.
10 changes: 8 additions & 2 deletions plutus-conformance/agda/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ failingBudgetTests =
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-16"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-17"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-18"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-19"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-20"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-21"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-22"
Expand All @@ -143,12 +142,19 @@ failingBudgetTests =
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-25"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-26"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-27"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-28"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-29"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-30"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-31"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-32"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-33"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-34"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-35"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-36"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-37"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-38"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-39"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-40"
, "test-cases/uplc/evaluation/builtin/semantics/writeBits/case-41"
]

-- Run the tests: see Note [Evaluation with and without costing] above.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #00) ] (con (list integer) [5]) ]
[ [ (builtin writeBits) (con bytestring #00) ] (con (list integer) [-1]) ]
(con bool True)
])
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
({cpu: 412093
| mem: 801})
evaluation failure
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(program 1.0.0 (con bytestring #20))
evaluation failure
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #ff) ] (con (list integer) [5]) ]
(con bool False)
[ [ (builtin writeBits) (con bytestring #00) ] (con (list integer) [0]) ]
(con bool True)
])
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(program 1.0.0 (con bytestring #df))
(program 1.0.0 (con bytestring #01))
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #f4ff) ] (con (list integer) [10]) ]
(con bool False)
[ [ (builtin writeBits) (con bytestring #00) ] (con (list integer) [1]) ]
(con bool True)
])
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(program 1.0.0 (con bytestring #f0ff))
(program 1.0.0 (con bytestring #02))
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #f4ff) ] (con (list integer) [10,1]) ]
(con bool False)
[ [ (builtin writeBits) (con bytestring #00) ] (con (list integer) [2]) ]
(con bool True)
])
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
({cpu: 430941
({cpu: 412093
| mem: 801})
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(program 1.0.0 (con bytestring #f0fd))
(program 1.0.0 (con bytestring #04))
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #f4ff) ] (con (list integer) [10]) ]
(con bool False)
[ [ (builtin writeBits) (con bytestring #00) ] (con (list integer) [3]) ]
(con bool True)
])
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(program 1.0.0 (con bytestring #f0ff))
(program 1.0.0 (con bytestring #08))
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #f4ff) ] (con (list integer) [10,1]) ]
(con bool False)
[ [ (builtin writeBits) (con bytestring #00) ] (con (list integer) [4]) ]
(con bool True)
])
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
({cpu: 430941
({cpu: 412093
| mem: 801})
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(program 1.0.0 (con bytestring #f0fd))
(program 1.0.0 (con bytestring #10))
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #f4ff) ] (con (list integer) [1,10]) ]
(con bool False)
[ [ (builtin writeBits) (con bytestring #00) ] (con (list integer) [5]) ]
(con bool True)
])
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
({cpu: 430941
({cpu: 412093
| mem: 801})
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(program 1.0.0 (con bytestring #f0fd))
(program 1.0.0 (con bytestring #20))
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
(program 1.0.0
[
[
(builtin writeBits)
[
[
[
(builtin writeBits)
(con bytestring #00ff)
]
(con (list integer) [10])
]
(con bool True)
]
(con (list integer) [10])
]
(con bool False)
]
)
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #00) ] (con (list integer) [6]) ]
(con bool True)
])
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
({cpu: 808086
| mem: 1402})
({cpu: 412093
| mem: 801})
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(program 1.0.0 (con bytestring #00ff))
(program 1.0.0 (con bytestring #40))
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
(program 1.0.0
[
[
(builtin writeBits)
[
[
[
(builtin writeBits)
(con bytestring #00ff)
]
(con (list integer) [10])
]
(con bool False)
]
(con (list integer) [10])
]
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #00) ] (con (list integer) [7]) ]
(con bool True)
]
)
])
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
({cpu: 808086
| mem: 1402})
({cpu: 412093
| mem: 801})
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(program 1.0.0 (con bytestring #04ff))
(program 1.0.0 (con bytestring #80))
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #ff) ] (con (list integer) [0]) ]
[ [ (builtin writeBits) (con bytestring #00) ] (con (list integer) [8]) ]
(con bool True)
])
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
({cpu: 412093
| mem: 801})
evaluation failure
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(program 1.0.0 (con bytestring #ff))
evaluation failure
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #00) ] (con (list integer) [0]) ]
[ [ (builtin writeBits) (con bytestring #f4ff) ] (con (list integer) [10]) ]
(con bool False)
])
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(program 1.0.0 (con bytestring #00))
(program 1.0.0 (con bytestring #f0ff))
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
(program 1.0.0
[
[
[
(builtin writeBits)
(con bytestring #00000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
]
(con (list integer) [340, 342, 343])
]
(con bool True)
]
)
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #f4ff) ] (con (list integer) [1,10]) ]
(con bool False)
])
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
({cpu: 449789
| mem: 806})
({cpu: 430941
| mem: 801})
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
(program
1.0.0
(con
bytestring
#d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000
)
)
(program 1.0.0 (con bytestring #f0fd))
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
-- Later updates to duplicate indices take precedence.
(program 1.0.0
[
[
(builtin writeBits)
[
[
[
(builtin writeBits)
(con bytestring #00000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
]
(con (list integer) [340, 342, 343, 340, 342, 343])
]
(con bool True)
]
(con (list integer) [340, 342, 343])
]
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #f4ff) ] (con (list integer) [10,1]) ]
(con bool False)
]
)
])
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
({cpu: 940022
| mem: 1412})
({cpu: 430941
| mem: 801})
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
(program
1.0.0
(con
bytestring
#00000000000000000000000000000000000000000000000000000000000000000000000000000000000000
)
)
(program 1.0.0 (con bytestring #f0fd))
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
(program 1.0.0
[
[
[
(builtin writeBits)
(con bytestring #00000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
]
(con (list integer) [340, 342, 343])
]
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #f4ff) ] (con (list integer) [10,1,10,1,1,1,1,10,10,10,1,1,1,1,1,1,10,1]) ]
(con bool False)
]
)
])
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
({cpu: 449789
| mem: 806})
({cpu: 732509
| mem: 801})
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
(program
1.0.0
(con
bytestring
#00000000000000000000000000000000000000000000000000000000000000000000000000000000000000
)
)
(program 1.0.0 (con bytestring #f0fd))
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
(program 1.0.0
[
[
[
(builtin writeBits)
(con bytestring #00000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
]
(con (list integer) [340, 342, 343, 343, 342, 340, 340, 343, 342, 340, 340, 340])
]
(con bool True)
]
)
(program 1.0.0 [
[ [ (builtin writeBits) (con bytestring #f4ff) ] (con (list integer) [1,10,1,10,1,10,1,10,1,10,1,10,10,10,10,11,11,9]) ]
(con bool False)
])
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
({cpu: 619421
| mem: 806})
({cpu: 732509
| mem: 801})
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
(program
1.0.0
(con
bytestring
#d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000
)
)
(program 1.0.0 (con bytestring #f0fd))
Loading

1 comment on commit faca16e

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Plutus Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: faca16e Previous: 7f6fefe Ratio
validation-auction_1-1 255.5 μs 211.7 μs 1.21
validation-future-settle-early-2 765.3 μs 702.3 μs 1.09
validation-future-settle-early-3 767 μs 529.1 μs 1.45
validation-future-settle-early-4 854.3 μs 595.7 μs 1.43
validation-game-sm-success_2-4 334.5 μs 237.1 μs 1.41
validation-game-sm-success_2-5 907.1 μs 630.3 μs 1.44
validation-game-sm-success_2-6 334 μs 230.9 μs 1.45
validation-multisig-sm-1 560.2 μs 419.8 μs 1.33
validation-uniswap-6 393.9 μs 316.1 μs 1.25
validation-decode-auction_1-2 606.3 μs 529.2 μs 1.15
validation-decode-auction_1-3 751.2 μs 529 μs 1.42
validation-decode-auction_1-4 270.9 μs 191.4 μs 1.42
validation-decode-escrow-redeem_2-3 335.3 μs 306.7 μs 1.09
validation-decode-future-pay-out-2 447.6 μs 308.5 μs 1.45
validation-decode-future-pay-out-3 450.4 μs 308 μs 1.46
validation-decode-future-pay-out-4 981.6 μs 671 μs 1.46
validation-decode-future-settle-early-1 337.8 μs 227.7 μs 1.48
validation-decode-future-settle-early-2 451.1 μs 307.8 μs 1.47
validation-decode-game-sm-success_1-1 750 μs 708.1 μs 1.06
validation-decode-game-sm-success_1-3 749.3 μs 710.9 μs 1.05
validation-decode-game-sm-success_1-4 232.6 μs 220.5 μs 1.05
validation-decode-game-sm-success_2-4 232.2 μs 220.9 μs 1.05
validation-decode-ping-pong_2-1 701.2 μs 661.5 μs 1.06
validation-decode-prism-1 227.6 μs 216.6 μs 1.05
validation-decode-stablecoin_1-3 1207 μs 882.7 μs 1.37
validation-decode-stablecoin_1-4 229.1 μs 158.5 μs 1.45
validation-decode-uniswap-1 249.1 μs 234.8 μs 1.06
validation-decode-uniswap-2 339.9 μs 241.3 μs 1.41
validation-decode-uniswap-4 253.7 μs 219.2 μs 1.16
validation-decode-uniswap-5 1046 μs 915.3 μs 1.14
marlowe-semantics/0104010200020000040103020102020004040300030304040400010301040303 1116 μs 777.5 μs 1.44
marlowe-semantics/331e4a1bb30f28d7073c54f9a13c10ae19e2e396c299a0ce101ee6bf4b2020db 619.9 μs 468.2 μs 1.32
marlowe-semantics/33c3efd79d9234a78262b52bc6bbf8124cb321a467dedb278328215167eca455 899.4 μs 634.1 μs 1.42
marlowe-semantics/383683bfcecdab0f4df507f59631c702bd11a81ca3841f47f37633e8aacbb5de 1090 μs 770 μs 1.42
marlowe-semantics/3bb75b2e53eb13f718eacd3263ab4535f9137fabffc9de499a0de7cabb335479 433.1 μs 305.6 μs 1.42
marlowe-semantics/3db496e6cd39a8b888a89d0de07dace4397878958cab3b9d9353978b08c36d8a 1182 μs 835.8 μs 1.41
marlowe-semantics/44a9e339fa25948b48637fe7e10dcfc6d1256319a7b5ce4202cb54dfef8e37e7 431.2 μs 306.4 μs 1.41
marlowe-semantics/4c3efd13b6c69112a8a888372d56c86e60c232125976f29b1c3e21d9f537845c 1477 μs 1041 μs 1.42
marlowe-semantics/4d7adf91bfc93cebe95a7e054ec17cfbb912b32bd8aecb48a228b50e02b055c8 996.4 μs 704.6 μs 1.41
marlowe-semantics/4f9e8d361b85e62db2350dd3ae77463540e7af0d28e1eb68faeecc45f4655f57 573.1 μs 405.8 μs 1.41
marlowe-semantics/52df7c8dfaa5f801cd837faa65f2fd333665fff00a555ce8c55e36ddc003007a 510.6 μs 361.6 μs 1.41
marlowe-semantics/53ed4db7ab33d6f907eec91a861d1188269be5ae1892d07ee71161bfb55a7cb7 521.4 μs 369.1 μs 1.41
marlowe-semantics/55dfe42688ad683b638df1fa7700219f00f53b335a85a2825502ab1e0687197e 432 μs 306.1 μs 1.41
marlowe-semantics/56333d4e413dbf1a665463bf68067f63c118f38f7539b7ba7167d577c0c8b8ce 1122 μs 792.6 μs 1.42
marlowe-semantics/57728d8b19b0e06412786f3dfed9e1894cd0ad1d2bc2bd497ec0ecb68f989d2b 433.1 μs 306.8 μs 1.41
marlowe-semantics/5abae75af26f45658beccbe48f7c88e74efdfc0b8409ba1e98f95fa5b6caf999 696 μs 489.1 μs 1.42
marlowe-semantics/5d0a88250f13c49c20e146819357a808911c878a0e0a7d6f7fe1d4a619e06112 1479 μs 1046 μs 1.41
marlowe-semantics/5e274e0f593511543d41570a4b03646c1d7539062b5728182e073e5760561a66 1451 μs 1027 μs 1.41
marlowe-semantics/5e2c68ac9f62580d626636679679b97109109df7ac1a8ce86d3e43dfb5e4f6bc 584.2 μs 526.9 μs 1.11
marlowe-semantics/67ba5a9a0245ee3aff4f34852b9889b8c810fccd3dce2a23910bddd35c503b71 7862 μs 5737 μs 1.37
marlowe-semantics/6d88f7294dd2b5ce02c3dc609bc7715bd508009738401d264bf9b3eb7c6f49c1 698.3 μs 495.9 μs 1.41
marlowe-semantics/70f65b21b77ddb451f3df9d9fb403ced3d10e1e953867cc4900cc25e5b9dec47 1127 μs 795.6 μs 1.42
marlowe-semantics/71965c9ccae31f1ffc1d85aa20a356d4ed97a420954018d8301ec4f9783be0d7 678.7 μs 481.1 μs 1.41
marlowe-semantics/74c67f2f182b9a0a66c62b95d6fac5ace3f7e71ea3abfc52ffbe3ecb93436ea2 1143 μs 807.1 μs 1.42
marlowe-semantics/7529b206a78becb793da74b78c04d9d33a2540a1abd79718e681228f4057403a 1141 μs 805.9 μs 1.42
marlowe-semantics/75a8bb183688bce447e00f435a144c835435e40a5defc6f3b9be68b70b4a3db6 994.3 μs 702.9 μs 1.41
marlowe-semantics/7a758e17486d1a30462c32a5d5309bd1e98322a9dcbe277c143ed3aede9d265f 732.1 μs 515.3 μs 1.42
marlowe-semantics/7cbc5644b745f4ea635aca42cce5e4a4b9d2e61afdb3ac18128e1688c07071ba 688 μs 483.8 μs 1.42
marlowe-semantics/82213dfdb6a812b40446438767c61a388d2c0cfd0cbf7fd4a372b0dc59fa17e1 1833 μs 1297 μs 1.41
marlowe-semantics/8c7fdc3da6822b5112074380003524f50fb3a1ce6db4e501df1086773c6c0201 1668 μs 1177 μs 1.42
marlowe-semantics/8d9ae67656a2911ab15a8e5301c960c69aa2517055197aff6b60a87ff718d66c 509.5 μs 361.1 μs 1.41
marlowe-semantics/9fabc4fc3440cdb776b28c9bb1dd49c9a5b1605fe1490aa3f4f64a3fa8881b25 1463 μs 1195 μs 1.22
marlowe-semantics/a85173a832db3ea944fafc406dfe3fa3235254897d6d1d0e21bc380147687bd5 523.5 μs 368.8 μs 1.42
marlowe-semantics/a9a853b6d083551f4ed2995551af287880ef42aee239a2d9bc5314d127cce592 732.2 μs 518.6 μs 1.41
marlowe-semantics/acb9c83c2b78dabef8674319ad69ba54912cd9997bdf2d8b2998c6bfeef3b122 938.5 μs 663.2 μs 1.42
marlowe-semantics/acce04815e8fd51be93322888250060da173eccf3df3a605bd6bc6a456cde871 396.3 μs 280.1 μs 1.41
marlowe-semantics/ad6db94ed69b7161c7604568f44358e1cc11e81fea90e41afebd669e51bb60c8 840.5 μs 670.4 μs 1.25
marlowe-role-payout/da353bf9219801fa1bf703fc161497570954e9af7e10ffe95c911a9ef97e77bd 255.2 μs 179 μs 1.43
marlowe-role-payout/dc45c5f1b700b1334db99f50823321daaef0e6925b9b2fabbc9df7cde65af62e 253.7 μs 179.7 μs 1.41
marlowe-role-payout/df487b2fd5c1583fa33644423849bc1ab5f02f37edc0c235f34ef01cb12604f6 257.7 μs 181.6 μs 1.42
marlowe-role-payout/eabeeae18131af89fa57936c0e9eb8d2c7adba534f7e1a517d75410028fa0d6c 246 μs 173.1 μs 1.42
marlowe-role-payout/ec4712ee820eb959a43ebedfab6735f2325fa52994747526ffd2a4f4f84dd58e 280 μs 196.7 μs 1.42
marlowe-role-payout/ee3962fbd7373360f46decef3c9bda536a0b1daf6cda3b8a4bcfd6deeb5b4c53 281.9 μs 198.9 μs 1.42
marlowe-role-payout/f1a1e6a487f91feca5606f72bbb1e948c71abf043c6a0ea83bfea9ec6a0f08d8 247.9 μs 173.6 μs 1.43
marlowe-role-payout/f2932e4ca4bbb94b0a9ffbe95fcb7bd5639d9751d75d56d5e14efa5bbed981df 243.8 μs 171.1 μs 1.42
marlowe-role-payout/f53e8cafe26647ccce51e4c31db13608aea1f39034c0f52dee2e5634ef66e747 266.5 μs 187.1 μs 1.42
marlowe-role-payout/f7275afb60e33a550df13a132102e7e925dd28965a4efbe510a89b077ff9417f 246.4 μs 172.8 μs 1.43
marlowe-role-payout/fc8c5f45ffcdb024c21e0f34b22c23de8045a94d5e1a5bda1555c45ddb059f82 255.2 μs 179.4 μs 1.42
marlowe-role-payout/ff38b1ec89952d0247630f107a90cbbeb92ecbfcd19b284f60255718e4ec7548 290.6 μs 205.3 μs 1.42

This comment was automatically generated by workflow using github-action-benchmark.

CC: @IntersectMBO/plutus-core

Please sign in to comment.