diff --git a/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching-budget.budget.golden b/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching-budget.budget.golden index 542195af9f6..5deb77ea964 100644 --- a/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching-budget.budget.golden +++ b/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching-budget.budget.golden @@ -1,2 +1,2 @@ -({cpu: 5749488 -| mem: 21176}) \ No newline at end of file +({cpu: 44508240 +| mem: 160876}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching.uplc.golden b/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching.uplc.golden index 85394b1a586..7e125d2f069 100644 --- a/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching.uplc.golden +++ b/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching.uplc.golden @@ -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))) \ No newline at end of file + (force (force sndPair) tup))) + (delay (case error [error])))) + (unConstrData d)))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-budget-manual.budget.golden b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-budget-manual.budget.golden index 824333ee094..24188fb61f5 100644 --- a/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-budget-manual.budget.golden +++ b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-budget-manual.budget.golden @@ -1,2 +1,2 @@ -({cpu: 7269599 -| mem: 24274}) \ No newline at end of file +({cpu: 17110184 +| mem: 58758}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-budget.budget.golden b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-budget.budget.golden index b24fc9187b8..ff24ac18aaf 100644 --- a/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-budget.budget.golden +++ b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-budget.budget.golden @@ -1,2 +1,2 @@ -({cpu: 12721754 -| mem: 45526}) \ No newline at end of file +({cpu: 28330286 +| mem: 104626}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-manual.uplc.golden b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-manual.uplc.golden index a6f1ba700d8..24757f54b62 100644 --- a/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-manual.uplc.golden +++ b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-manual.uplc.golden @@ -1,71 +1,106 @@ program 1.1.0 (\d -> - (\cse -> - (\cse -> - (\cse -> - (\cse -> - (\cse -> - (\cse -> - (\lessThanInteger -> - addInteger - (addInteger - (addInteger - (addInteger (addInteger cse cse) cse) - cse) - (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)) ]))) - (\x y -> - force ifThenElse - (lessThanInteger x y) - (constr 0 []) - (constr 1 []))) - ((\d -> - force - (force ifThenElse - (equalsInteger 0 cse) - (delay (unIData d)) - (delay error))) - (force headList - (force tailList - (force tailList - (force tailList - (force (force sndPair) cse))))))) - ((\d -> - force - (force ifThenElse - (equalsInteger 0 cse) - (delay (unIData d)) - (delay error))) - (force headList - (force tailList - (force tailList (force (force sndPair) cse)))))) - ((\d -> - force - (force ifThenElse - (equalsInteger 0 cse) - (delay (unIData d)) - (delay error))) - (force headList - (force tailList (force (force sndPair) cse))))) - ((\d -> - force - (force ifThenElse - (equalsInteger 0 cse) - (delay (unIData d)) - (delay error))) - (force headList (force (force sndPair) cse)))) - (force (force fstPair) cse)) - (unConstrData d)) \ No newline at end of file + (\int1Manual -> + (\x -> + (\int2Manual -> + (\y -> + (\int3Manual -> + (\z -> + (\int4Manual -> + (\w -> + (\lessThanInteger -> + addInteger + (addInteger + (addInteger + (addInteger (addInteger x y) z) + w) + (force + (case + (lessThanInteger + (addInteger y z) + (addInteger x w)) + [ (delay (addInteger x z)) + , (delay (addInteger y w)) ]))) + (force + (case + (lessThanInteger + (addInteger + (int3Manual d) + (int2Manual d)) + (addInteger + (int4Manual d) + (int1Manual d))) + [ (delay + (addInteger + (int3Manual d) + (int1Manual d))) + , (delay + (addInteger + (int4Manual d) + (int2Manual d))) ]))) + (\x y -> + force ifThenElse + (lessThanInteger x y) + (constr 0 []) + (constr 1 []))) + (int4Manual d)) + (\ds -> + (\tup -> + (\i -> + (\d -> + force + (force ifThenElse + (equalsInteger 0 i) + (delay (unIData d)) + (delay error))) + (force headList + (force tailList + (force tailList + (force tailList + (force (force sndPair) tup)))))) + (force (force fstPair) tup)) + (unConstrData ds))) + (int3Manual d)) + (\ds -> + (\tup -> + (\i -> + (\d -> + force + (force ifThenElse + (equalsInteger 0 i) + (delay (unIData d)) + (delay error))) + (force headList + (force tailList + (force tailList + (force (force sndPair) tup))))) + (force (force fstPair) tup)) + (unConstrData ds))) + (int2Manual d)) + (\ds -> + (\tup -> + (\i -> + (\d -> + force + (force ifThenElse + (equalsInteger 0 i) + (delay (unIData d)) + (delay error))) + (force headList + (force tailList (force (force sndPair) tup)))) + (force (force fstPair) tup)) + (unConstrData ds))) + (int1Manual d)) + (\ds -> + (\tup -> + (\i -> + (\d -> + force + (force ifThenElse + (equalsInteger 0 i) + (delay (unIData d)) + (delay error))) + (force headList (force (force sndPair) tup))) + (force (force fstPair) tup)) + (unConstrData ds))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields.uplc.golden b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields.uplc.golden index c9f674502f1..2662f162244 100644 --- a/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields.uplc.golden +++ b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields.uplc.golden @@ -1,41 +1,58 @@ program 1.1.0 (\d -> - (\cse -> - (\cse -> - (\cse -> - (\cse -> - (\cse -> - (\lessThanInteger -> - addInteger - (addInteger - (addInteger - (addInteger (addInteger cse cse) cse) - cse) - (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)) ]))) - (\x y -> - force ifThenElse - (lessThanInteger x y) - (constr 0 []) - (constr 1 []))) - (cse (\ds ds ds ds -> ds) (\void -> error))) - (cse (\ds ds ds ds -> ds) (\void -> error))) - (cse (\ds ds ds ds -> ds) (\void -> error))) - (cse (\ds ds ds ds -> ds) (\void -> error))) - (\cont fail -> + (\`$mInts` -> + (\int -> + (\x -> + (\int -> + (\y -> + (\int -> + (\z -> + (\int -> + (\w -> + (\lessThanInteger -> + addInteger + (addInteger + (addInteger + (addInteger (addInteger x y) z) + w) + (force + (case + (lessThanInteger + (addInteger y z) + (addInteger x w)) + [ (delay (addInteger x z)) + , (delay (addInteger y w)) ]))) + (force + (case + (lessThanInteger + (addInteger (int d) (int d)) + (addInteger (int d) (int d))) + [ (delay + (addInteger (int d) (int d))) + , (delay + (addInteger + (int d) + (int d))) ]))) + (\x y -> + force ifThenElse + (lessThanInteger x y) + (constr 0 []) + (constr 1 []))) + (int d)) + (\ds -> + `$mInts` + ds + (\ds ds ds ds -> ds) + (\void -> error))) + (int d)) + (\ds -> + `$mInts` ds (\ds ds ds ds -> ds) (\void -> error))) + (int d)) + (\ds -> `$mInts` ds (\ds ds ds ds -> ds) (\void -> error))) + (int d)) + (\ds -> `$mInts` ds (\ds ds ds ds -> ds) (\void -> error))) + (\scrut cont fail -> (\tup -> force (force ifThenElse @@ -53,4 +70,4 @@ program (force tailList l)) (force (force sndPair) tup))) (delay (fail ())))) - (unConstrData d))) \ No newline at end of file + (unConstrData scrut))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/AsData/Budget/Spec.hs b/plutus-tx-plugin/test/AsData/Budget/Spec.hs index d1041a54c47..92f27a36182 100644 --- a/plutus-tx-plugin/test/AsData/Budget/Spec.hs +++ b/plutus-tx-plugin/test/AsData/Budget/Spec.hs @@ -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