Skip to content

Commit

Permalink
[Test] Turn off CSE for problematic tests (#6249)
Browse files Browse the repository at this point in the history
  • Loading branch information
effectfully committed Jun 26, 2024
1 parent dcd6f5d commit b63c544
Show file tree
Hide file tree
Showing 7 changed files with 439 additions and 479 deletions.
3 changes: 3 additions & 0 deletions plutus-tx-plugin/test/AssocMap/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
{-# LANGUAGE ViewPatterns #-}
{-# 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 #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MonoLocalBinds #-}

Expand Down
4 changes: 2 additions & 2 deletions plutus-tx-plugin/test/Budget/9.6/map1-budget.budget.golden
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
({cpu: 306174770
| mem: 869909})
({cpu: 306457186
| mem: 870413})
201 changes: 98 additions & 103 deletions plutus-tx-plugin/test/Budget/9.6/map1.uplc.golden
Original file line number Diff line number Diff line change
Expand Up @@ -10,110 +10,105 @@ program
(\concatBuiltinStrings
n ->
(\nt ->
(\cse ->
(\nt ->
(\lookup ->
constr 0
[ (lookup (\i -> iData i) unBData n nt)
, (lookup
(\i -> iData i)
unBData
cse
nt)
, (lookup
(\i -> iData i)
unBData
(addInteger 10 n)
nt)
, (lookup
(\i -> iData i)
unBData
(addInteger 20 n)
nt)
, (lookup
(\i -> iData i)
unBData
cse
nt) ])
(\`$dToData`
`$dUnsafeFromData`
ds
ds ->
force
(case
((\k ->
fix1
(\go
xs ->
force
(force chooseList)
xs
(\ds -> constr 1 [])
(\ds ->
(\hd ->
force
(force
ifThenElse
(equalsData
k
(\nt ->
(\lookup ->
constr 0
[ (lookup (\i -> iData i) unBData n nt)
, (lookup
(\i -> iData i)
unBData
(addInteger 5 n)
nt)
, (lookup
(\i -> iData i)
unBData
(addInteger 10 n)
nt)
, (lookup
(\i -> iData i)
unBData
(addInteger 20 n)
nt)
, (lookup
(\i -> iData i)
unBData
(addInteger 5 n)
nt) ])
(\`$dToData`
`$dUnsafeFromData`
ds
ds ->
force
(case
((\k ->
fix1
(\go
xs ->
force
(force chooseList)
xs
(\ds -> constr 1 [])
(\ds ->
(\hd ->
force
(force
ifThenElse
(equalsData
k
(force
(force
(force
fstPair)
hd))
(delay
((\ds ->
constr 0
[ (force
(force
sndPair)
hd) ])
(force
tailList
xs)))
(delay
(go
(force
tailList
xs)))))
(force headList
xs))
(constr 0 []))
ds)
(`$dToData` ds))
[ (\a ->
delay
(constr 0
[ (`$dUnsafeFromData`
a) ]))
, (delay (constr 1 [])) ])))
((\k ->
fix1
(\go xs ->
force (force chooseList)
xs
(\ds -> [])
(\ds ->
(\hd ->
(\tl ->
force
(force ifThenElse
(equalsData
k
(force
(force
fstPair)
hd))
(delay tl)
(delay
(force mkCons
hd
(go tl)))))
(force tailList xs))
(force headList xs))
(constr 0 []))
nt)
(iData cse)))
(addInteger 5 n))
fstPair)
hd))
(delay
((\ds ->
constr 0
[ (force
(force
sndPair)
hd) ])
(force
tailList
xs)))
(delay
(go
(force
tailList
xs)))))
(force headList xs))
(constr 0 []))
ds)
(`$dToData` ds))
[ (\a ->
delay
(constr 0
[(`$dUnsafeFromData` a)]))
, (delay (constr 1 [])) ])))
((\k ->
fix1
(\go xs ->
force (force chooseList)
xs
(\ds -> [])
(\ds ->
(\hd ->
(\tl ->
force
(force ifThenElse
(equalsData
k
(force
(force fstPair)
hd))
(delay tl)
(delay
(force mkCons
hd
(go tl)))))
(force tailList xs))
(force headList xs))
(constr 0 []))
nt)
(iData (addInteger 5 n))))
((\z ->
(\go eta ->
go eta)
Expand Down
4 changes: 2 additions & 2 deletions plutus-tx-plugin/test/Budget/9.6/map2-budget.budget.golden
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
({cpu: 126454952
| mem: 394122})
({cpu: 126689368
| mem: 394326})
Loading

0 comments on commit b63c544

Please sign in to comment.