Skip to content

Commit

Permalink
[Test] Turn off CSE for the 'patternMatching' test
Browse files Browse the repository at this point in the history
  • Loading branch information
effectfully committed Jun 27, 2024
1 parent b63c544 commit 2ddbfb4
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 51 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
({cpu: 5749488
| mem: 21176})
({cpu: 44508240
| mem: 160876})
105 changes: 56 additions & 49 deletions plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching.uplc.golden
Original file line number Diff line number Diff line change
@@ -1,58 +1,65 @@
program
1.1.0
(\d ->
(\cse ->
(\lessThanInteger ->
(\cse ->
(\cse ->
(\cse ->
(\cse ->
addInteger
(addInteger
(\ds ->
(\ds ->
(\x ->
(\y ->
(\z ->
(\w ->
(\lessThanInteger ->
addInteger
(addInteger
(addInteger (addInteger cse cse) cse)
cse)
(addInteger
(addInteger
(addInteger (force x) (force y))
(force z))
(force w))
(force
(case
(lessThanInteger
(addInteger (force y) (force z))
(addInteger (force x) (force w)))
[ (delay (addInteger (force x) (force z)))
, (delay
(addInteger (force y) (force w))) ])))
(force
(case
(lessThanInteger
(addInteger cse cse)
(addInteger cse cse))
[ (delay (addInteger cse cse))
, (delay (addInteger cse cse)) ])))
(force
(case
(lessThanInteger
(addInteger cse cse)
(addInteger cse cse))
[ (delay (addInteger cse cse))
, (delay (addInteger cse cse)) ])))
(case cse [(\x y z w -> x)]))
(case cse [(\x y z w -> w)]))
(case cse [(\x y z w -> y)]))
(case cse [(\x y z w -> z)]))
(\x y ->
force ifThenElse
(lessThanInteger x y)
(constr 0 [])
(constr 1 [])))
((\tup ->
force
(force ifThenElse
(equalsInteger 0 (force (force fstPair) tup))
(delay
((\l ->
(\l ->
(addInteger (force z) (force y))
(addInteger (force w) (force x)))
[ (delay (addInteger (force z) (force x)))
, (delay
(addInteger (force w) (force y))) ])))
(\x y ->
force ifThenElse
(lessThanInteger x y)
(constr 0 [])
(constr 1 [])))
(delay (case (force ds) [(\x y z w -> w)])))
(delay (case (force ds) [(\x y z w -> z)])))
(delay (case (force ds) [(\x y z w -> y)])))
(delay (case (force ds) [(\x y z w -> x)])))
(force ds))
(delay
((\tup ->
force
(force ifThenElse
(equalsInteger 0 (force (force fstPair) tup))
(delay
((\l ->
(\l ->
(\z w ->
constr 0
[ (unIData (force headList l))
, (unIData (force headList l))
, z
, w ])
(unIData (force headList l))
(unIData (force headList (force tailList l))))
(\l ->
(\z w ->
constr 0
[ (unIData (force headList l))
, (unIData (force headList l))
, z
, w ])
(unIData (force headList l))
(unIData (force headList (force tailList l))))
(force tailList l))
(force tailList l))
(force tailList l))
(force (force sndPair) tup)))
(delay (case error [error]))))
(unConstrData d)))
(force (force sndPair) tup)))
(delay (case error [error]))))
(unConstrData d))))
3 changes: 3 additions & 0 deletions plutus-tx-plugin/test/AsData/Budget/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:context-level=0 #-}
{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:defer-errors #-}
-- CSE is very unstable and produces different output, likely depending on the version of either
-- @unordered-containers@ or @hashable@.
{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:max-cse-iterations=0 #-}

module AsData.Budget.Spec where

Expand Down

0 comments on commit 2ddbfb4

Please sign in to comment.