From 51ae3da6e34f18e9aee19205ca5a46787aea9a95 Mon Sep 17 00:00:00 2001 From: Romain Soulat <117812549+RSoulatIOHK@users.noreply.github.com> Date: Fri, 12 Jul 2024 00:59:03 +0200 Subject: [PATCH] fix: parameter 33 should be a Rational (#6302) --- .../documentation-traceability.md | 125 +- .../certification/testing-traceability.md | 18 +- .../data/defaultConstitution.json | 6 +- .../GoldenTests/sorted.cbor.size.golden | 2 +- .../GoldenTests/sorted.large.budget.golden | 2 +- .../Validator/GoldenTests/sorted.pir.golden | 42 +- .../GoldenTests/sorted.small.budget.golden | 2 +- .../Validator/GoldenTests/sorted.uplc.golden | 1502 +++++++++-------- .../GoldenTests/unsorted.cbor.size.golden | 2 +- .../GoldenTests/unsorted.large.budget.golden | 2 +- .../Validator/GoldenTests/unsorted.pir.golden | 42 +- .../GoldenTests/unsorted.small.budget.golden | 2 +- .../GoldenTests/unsorted.uplc.golden | 123 +- .../test/Helpers/Guardrail.hs | 8 +- .../test/Helpers/MultiParam.hs | 2 +- .../test/Helpers/Spec/IntervalSpec.hs | 2 +- .../test/Helpers/TestBuilders.hs | 2 +- .../test/Generators/QuickCheck/Utils.hs | 2 +- 18 files changed, 961 insertions(+), 925 deletions(-) diff --git a/cardano-constitution/certification/documentation-traceability.md b/cardano-constitution/certification/documentation-traceability.md index aebba6a9b04..aafdd40e8e5 100644 --- a/cardano-constitution/certification/documentation-traceability.md +++ b/cardano-constitution/certification/documentation-traceability.md @@ -2,7 +2,7 @@ ## Version -Version 1.1 +Version 1.2 ## Authors @@ -22,20 +22,21 @@ Romain Soulat | --- | --- | --- | --- | | 1.0 | 2024-05-13 | Romain Soulat | Initial version | | 1.1 | 2024-05-14 | Romain Soulat | Updated with new version of defaultConstitution.json | +| 1.2 | 2024-07-04 | Romain Soulat | Updated with new version of defaultConstitution.json | ## References - Interim Constitution - - SHA 256: `7b4e7c896a8b48b1f1109c92934f1858ae7941183e223a35bf4e9a8e` - - URL: + - SHA 256: `6010c89fb4edef2467979db5ea181ff7eda7d93d71bf304aa1bc88defedb5c26` + - URL: - CDDL description of the protocol parameters - - SHA 256: `5c712c432227acff7e4c26576343fcfe966a66dd0a09db1e61821b55283da47f` - - URL: + - SHA 256: `5ef21d4aaeba11bfef903734b580f68102ebfab8e12be8144ec5e01b19b0a3c1` + - URL: - JSON used to generate the constitution script - - SHA 256: `9dfa556ee6321ed389444f186ce9d26c637359749be11d516c944711c8ef5af7` - - URL: + - SHA 256: `6ed0900d3dda83924ca1008e4acbfc708b24a3c0b2e7c14cdd73f61e786d58fc` + - URL: ## Introduction @@ -45,63 +46,63 @@ This document provides a traceability between the Interim Constitution, the cddl The Interim Constitution is a human readable document that describes the protocol parameters. The CDDL description of the protocol parameters is a machine readable document that describes the protocol parameters. -| Interim Constitution Parameter Name | CDDL Parameter number | CDDL Parameter name (in comments) | +| Interim Constitution Parameter Name | CDDL Parameter number | CDDL Parameter name (in comments) | Types (CDDL <-> Haskell)| |---|---|---| -| txFeePerByte | 0 | min fee a | -| txFeeFixed | 1 | min fee b | -| maxBlockBodySize | 2 | max block body size | -| maxTxSize | 3 | max transaction size | -| maxBlockHeaderSize | 4 | max block header size | -| stakeAddressDeposit | 5 | key deposit | -| stakePoolDeposit | 6 | pool deposit | -| poolRetireMaxEpoch | 7 | maximum epoch | -| stakePoolTargetNum | 8 | n_opt: desired number of stake pool | -| poolPledgeInfluence | 9 | pool pledge influence | -| monetaryExpansion | 10 | expansion rate | -| treasuryCut | 11 | treasury growth rate | +| txFeePerByte | 0 | min fee a | (coin <-> Integer) | +| txFeeFixed | 1 | min fee b | (coin <-> Integer) | +| maxBlockBodySize | 2 | max block body size | (uint.size4 <-> Integer) | +| maxTxSize | 3 | max transaction size | (uint.size4 <-> Integer) | +| maxBlockHeaderSize | 4 | max block header size | (uint.size2 <-> Integer) | +| stakeAddressDeposit | 5 | key deposit | (coin <-> Integer) | +| stakePoolDeposit | 6 | pool deposit | (coin <-> Integer) | +| poolRetireMaxEpoch | 7 | maximum epoch | (epoch_interval <-> Integer) | +| stakePoolTargetNum | 8 | n_opt: desired number of stake pool | (uint.size2 <-> Integer) | +| poolPledgeInfluence | 9 | pool pledge influence | (nonnegative_interval <-> Rational) | +| monetaryExpansion | 10 | expansion rate | (unit_interval <-> Rational) | +| treasuryCut | 11 | treasury growth rate | (unit_interval <-> Rational) | | BLANK NO PARAMETER | 12 | BLANK NO PARAMETER | | BLANK NO PARAMETER | 13 | BLANK NO PARAMETER | | BLANK NO PARAMETER | 14 | BLANK NO PARAMETER | | BLANK NO PARAMETER | 15 | BLANK NO PARAMETER | -| minPoolCost | 16 | min pool cost | -| utxoCostPerByte | 17 | ada per utxo byte | -| costModels | 18 | cost models for script language | -| executionUnitPrices | 19 | execution costs | -| executionUnitPrices[priceMemory] | 19.0 | execution costs mem| -| executionUnitPrices[priceSteps] | 19.1 | execution costs steps| -| maxTxExecutionUnits | 20 | max tx ex units | -| maxTxExecutionUnits[mem] | 20.0 | | -| maxTxExecutionUnits[steps] | 20.1 | | -| maxBlockExecutionUnits | 21 | max block ex units | -| maxBlockExecutionUnits[mem] | 21.0 | | -| maxBlockExecutionUnits[steps] | 21.1 | | -| maxValueSize | 22 | max value size | -| collateralPercentage | 23 | collateral percentage | -| maxCollateralInputs | 24 | max collateral inputs | -| poolVotingThresholds | 25 | pool voting thresholds | -| poolVotingThresholds[pvtMotionNoConfidence] | 25.0 | motion no confidence | -| poolVotingThresholds[pvtCommitteeNormal] | 25.1 | committee normal | -| poolVotingThresholds[pvtCommitteeNoConfidence] | 25.2 | committee no conficence | -| poolVotingThresholds[pvtHardForkInitiation] | 25.3 | hard fork initiation | -| poolVotingThresholds[pvtPPSecurityGroup] | 25.4 | security relevant parameter voting threshold| -| dRepVotingThresholds | 26 | DRep voting threshold | -| dRepVotingThresholds[dvtMotionNoConfidence] | 26.0 | motion no confidence | -| dRepVotingThresholds[dvtCommitteeNormal] | 26.1 | committee normal | -| dRepVotingThresholds[dvtCommitteeNoConfidence] | 26.2 | committee no confidence | -| dRepVotingThresholds[dvtUpdateToConstitution] | 26.3 | update constitution | -| dRepVotingThresholds[dvtHardForkInitiation] | 26.4 | hard fork initiation | -| dRepVotingThresholds[dvtPPNetworkGroup] | 26.5 | PP network group | -| dRepVotingThresholds[dvtPPEconomicGroup] | 26.6 | PP economic group | -| dRepVotingThresholds[dvtPPTechnicalGroup] | 26.7 | PP technical group | -| dRepVotingThresholds[dvtPPGovGroup] | 26.8 | PP governance group | -| dRepVotingThresholds[dvtTreasuryWithdrawal] | 26.9 | treasury withdrawal | -| committeeMinSize | 27 | min committee size | -| committeeMaxTermLimit | 28 | committee term limit | -| govActionLifetime | 29 | governance action validity lifetime | -| govDeposit | 30 | governance action deposit | -| dRepDeposit | 31 | DRep deposit | -| dRepActivity | 32 | DRep inactivity period | -| minFeeRefScriptCoinsPerByte | 33 | MinFee RefScriptCostPerByte | +| minPoolCost | 16 | min pool cost | (coin <-> Integer) | +| utxoCostPerByte | 17 | ada per utxo byte | (coin <-> Integer) | +| costModels | 18 | cost models for script language | (costMdls <-> Any) | +| executionUnitPrices | 19 | execution costs | ex_unit_prices | +| executionUnitPrices[priceMemory] | 19.0 | execution costs mem | (nonnegative_interval <-> Rational) | +| executionUnitPrices[priceSteps] | 19.1 | execution costs steps | (nonnegative_interval <-> Rational) | +| maxTxExecutionUnits | 20 | max tx ex units | ex_units | +| maxTxExecutionUnits[mem] | 20.0 | | (uint <-> Integer) | +| maxTxExecutionUnits[steps] | 20.1 | | (uint <-> Integer) | +| maxBlockExecutionUnits | 21 | max block ex units | ex_units | +| maxBlockExecutionUnits[mem] | 21.0 | | (uint <-> Integer) | +| maxBlockExecutionUnits[steps] | 21.1 | | (uint <-> Integer) | +| maxValueSize | 22 | max value size | (uint.size4 <-> Integer) | +| collateralPercentage | 23 | collateral percentage | (uint.size2 <-> Integer) | +| maxCollateralInputs | 24 | max collateral inputs | (uint.size2 <-> Integer) | +| poolVotingThresholds | 25 | pool_voting_thresholds | pool_voting_thresholds | +| poolVotingThresholds[pvtMotionNoConfidence] | 25.0 | motion no confidence | (unit_interval <-> Rational) | +| poolVotingThresholds[pvtCommitteeNormal] | 25.1 | committee normal | (unit_interval <-> Rational) | +| poolVotingThresholds[pvtCommitteeNoConfidence] | 25.2 | committee no conficence | (unit_interval <-> Rational) | +| poolVotingThresholds[pvtHardForkInitiation] | 25.3 | hard fork initiation | (unit_interval <-> Rational) | +| poolVotingThresholds[pvtPPSecurityGroup] | 25.4 | security relevant parameter voting threshold | (unit_interval <-> Rational) | +| dRepVotingThresholds | 26 | DRep voting threshold | drep_voting_thresholds | +| dRepVotingThresholds[dvtMotionNoConfidence] | 26.0 | motion no confidence | (unit_interval <-> Rational) | +| dRepVotingThresholds[dvtCommitteeNormal] | 26.1 | committee normal | (unit_interval <-> Rational) | +| dRepVotingThresholds[dvtCommitteeNoConfidence] | 26.2 | committee no confidence | (unit_interval <-> Rational) | +| dRepVotingThresholds[dvtUpdateToConstitution] | 26.3 | update constitution | (unit_interval <-> Rational) | +| dRepVotingThresholds[dvtHardForkInitiation] | 26.4 | hard fork initiation | (unit_interval <-> Rational) | +| dRepVotingThresholds[dvtPPNetworkGroup] | 26.5 | PP network group | (unit_interval <-> Rational) | +| dRepVotingThresholds[dvtPPEconomicGroup] | 26.6 | PP economic group | (unit_interval <-> Rational) | +| dRepVotingThresholds[dvtPPTechnicalGroup] | 26.7 | PP technical group | (unit_interval <-> Rational) | +| dRepVotingThresholds[dvtPPGovGroup] | 26.8 | PP governance group | (unit_interval <-> Rational) | +| dRepVotingThresholds[dvtTreasuryWithdrawal] | 26.9 | treasury withdrawal | (unit_interval <-> Rational) | +| committeeMinSize | 27 | min committee size | (uint.size2 <-> Integer) | +| committeeMaxTermLimit | 28 | committee term limit | (epoch_interval <-> Integer) | +| govActionLifetime | 29 | governance action validity lifetime | (epoch_interval <-> Integer) | +| govDeposit | 30 | governance action deposit | (coin <-> Integer) | +| dRepDeposit | 31 | DRep deposit | (coin <-> Integer) | +| dRepActivity | 32 | DRep inactivity period | (epoch_interval <-> Integer) | +| minFeeRefScriptCoinsPerByte | 33 | MinFee RefScriptCostPerByte | (nonnegative_interval <-> Rational) | ## Documentation Traceability @@ -116,7 +117,7 @@ They will be fixed in a subsequent version. | Interim Constitution Guardrail | Entry in the JSON file | Status | | --- | --- | -- | | PARAM-01 | No parameter falls under this requirement | :white_check_mark: | -| PARAM-02 | `"18": { "type": "any"}` | :white_check_mark: | +| PARAM-02 | `"18": { "type": "costMdls"}` | :white_check_mark: | ### Section 2.1 @@ -208,8 +209,8 @@ No additional entries in object "19[0]" in the JSON file. :white_check_mark | Interim Constitution Guardrail | Entry in the JSON file | Status | | --- | --- | -- | -| MFRS-01 | In "33": `"maxValue": 1000` | :white_check_mark: | -| MFRS-02 | In "33": `"minValue": 0` | :white_check_mark: | +| MFRS-01 | In "33": `"maxValue": { "numerator": 1000, "denominator": 1 }` | :white_check_mark: | +| MFRS-02 | In "33": `"minValue": { "numerator": 0, "denominator": 1 }` | :white_check_mark: | No additional entries in object "33" in the JSON file. :white_check_mark: diff --git a/cardano-constitution/certification/testing-traceability.md b/cardano-constitution/certification/testing-traceability.md index 17b6dc1866f..d1e001557ae 100644 --- a/cardano-constitution/certification/testing-traceability.md +++ b/cardano-constitution/certification/testing-traceability.md @@ -2,7 +2,7 @@ # Version -Version: 1.1 +Version: 1.2 ## Authors @@ -21,16 +21,16 @@ Romain Soulat (romain.soulat@iohk.io) |---|---|---|---| | 1.0 | April, 30, 2024 | Bogdan Manole, Romain Soulat | Initial version | | 1.1 | May, 14, 2024 | Romain Soulat | Update to May 07 version of the Constitution | +| 1.2 | July, 04, 2024 | Romain Soulat | Changed parameter 33 to new type, updated the documents versions | ## References -- [Constitution](https://docs.google.com/document/d/1GwI_6qzfTa5V_BeEY4f-rZNhbfA8lXon) - - SHA 256: `XX` - - Date: May, 14, 2024 (latest) +- Interim Constitution + - SHA 256: `6010c89fb4edef2467979db5ea181ff7eda7d93d71bf304aa1bc88defedb5c26` + - URL: -- Testing Framework - - Old constitution repo Commit: c422981 - - Date: May, 15, 2024 +- [Testing Framework](https://github.com/IntersectMBO/constitution-priv/tree/d62d2cc5ab90356a36cd4fd1c3c0146a381c2e6a) + - Date: July, 04, 2024 ## Traceability @@ -147,8 +147,8 @@ The script assumes all the guarantees provided by the ledger rules and types. |Guardrail ID | Checkable | Checked by (if applicable)|Validation | |---|:---:|---|:---:| -| MFRS-01 | :white_check_mark: | ("MFRS-01", "minFeeRefScriptCoinsPerByte must not exceed 1,000 (0.001 ada)") `MustNotBe` NG 1_000 | :white_check_mark: | -| MFRS-02 | :white_check_mark: | ("MFRS-02", "minFeeRefScriptCoinsPerByte must not be negative") `MustNotBe` NL 0 | :white_check_mark: | +| MFRS-01 | :white_check_mark: | ("MFRS-01", "minFeeRefScriptCoinsPerByte must not exceed 1,000 (0.001 ada)") `MustNotBe` NG (1_000 % 1) | :white_check_mark: | +| MFRS-02 | :white_check_mark: | ("MFRS-02", "minFeeRefScriptCoinsPerByte must not be negative") `MustNotBe` NL (0 % 1) | :white_check_mark: | | MFRS-03 | :x: | | :white_check_mark: | | MFRS-04 | :x: | | :white_check_mark: | diff --git a/cardano-constitution/data/defaultConstitution.json b/cardano-constitution/data/defaultConstitution.json index 34d5bfcce12..8146907333d 100644 --- a/cardano-constitution/data/defaultConstitution.json +++ b/cardano-constitution/data/defaultConstitution.json @@ -733,14 +733,14 @@ }, "33": { - "type": "integer", + "type": "unit_interval", "predicates": [ { - "maxValue": 1000, + "maxValue": { "numerator": 1000, "denominator": 1 }, "$comment": "minFeeRefScriptCoinsPerByte must not exceed 1,000 (0.001 ada)" }, { - "minValue": 0, + "minValue": { "numerator": 0, "denominator": 1 }, "$comment": "minFeeRefScriptCoinsPerByte must not be negative" } ], diff --git a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.cbor.size.golden b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.cbor.size.golden index cce01b7dde6..b9dc6e97900 100644 --- a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.cbor.size.golden +++ b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.cbor.size.golden @@ -1 +1 @@ -2117 \ No newline at end of file +2135 \ No newline at end of file diff --git a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.large.budget.golden b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.large.budget.golden index 223bfad975c..d6ce7d922a4 100644 --- a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.large.budget.golden +++ b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.large.budget.golden @@ -1 +1 @@ -ExBudget {exBudgetCPU = ExCPU 592788400, exBudgetMemory = ExMemory 2937357} \ No newline at end of file +ExBudget {exBudgetCPU = ExCPU 601572171, exBudgetMemory = ExMemory 2972418} \ No newline at end of file diff --git a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.pir.golden b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.pir.golden index f5a7442d234..031b613ff79 100644 --- a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.pir.golden +++ b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.pir.golden @@ -5186,13 +5186,13 @@ {integer} {ParamValue} 33 - (ParamInteger + (ParamRational ((let a = Tuple2 PredKey (List - integer) + Rational) in \(g : all b. @@ -5220,7 +5220,7 @@ Tuple2 PredKey (List - integer) -> + Rational) -> a -> a) (n : @@ -5229,64 +5229,68 @@ (Tuple2 {PredKey} {List - integer} + Rational} MinValue ((let a = List - integer + Rational in \(c : - integer -> + Rational -> a -> a) (n : a) -> c - 0 + (unsafeRatio + 0 + 1) n) (\(ds : - integer) + Rational) (ds : List - integer) -> + Rational) -> Cons - {integer} + {Rational} ds ds) (Nil - {integer}))) + {Rational}))) (c (Tuple2 {PredKey} {List - integer} + Rational} MaxValue ((let a = List - integer + Rational in \(c : - integer -> + Rational -> a -> a) (n : a) -> c - 1000 + (unsafeRatio + 1000 + 1) n) (\(ds : - integer) + Rational) (ds : List - integer) -> + Rational) -> Cons - {integer} + {Rational} ds ds) (Nil - {integer}))) + {Rational}))) n))))) n))))))))))))))))))))))))))))))) in diff --git a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.small.budget.golden b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.small.budget.golden index f0501f61e9d..6d0ae38c41f 100644 --- a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.small.budget.golden +++ b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.small.budget.golden @@ -1 +1 @@ -ExBudget {exBudgetCPU = ExCPU 88974882, exBudgetMemory = ExMemory 403294} \ No newline at end of file +ExBudget {exBudgetCPU = ExCPU 91621157, exBudgetMemory = ExMemory 414205} \ No newline at end of file diff --git a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.uplc.golden b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.uplc.golden index 1518a4172e9..db609c9b03e 100644 --- a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.uplc.golden +++ b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.uplc.golden @@ -43,697 +43,704 @@ (\cse -> (\cse -> (\cse -> - (\cse -> - (\fun - ds -> - force - (case - ((\cse -> - (\x -> - force + (\fun + ds -> + force + (case + ((\cse -> + (\x -> + force + (force (force - (force - ifThenElse - (equalsInteger - 0 - x) + ifThenElse + (equalsInteger + 0 + x) + (delay (delay - (delay - (constr 0 - [ (go - (unMapData + (constr 0 + [ (go + (unMapData + (force + headList (force - headList + tailList (force - tailList (force - (force - sndPair) - cse))))) ]))) + sndPair) + cse))))) ]))) + (delay (delay - (delay + (force (force (force - (force - ifThenElse - (equalsInteger - 2 - x) + ifThenElse + (equalsInteger + 2 + x) + (delay (delay - (delay - (constr 1 - [ ]))) + (constr 1 + [ ]))) + (delay (delay - (delay - error)))))))))) + error)))))))))) + (force (force - (force - fstPair) - cse)) - (unConstrData + fstPair) + cse)) + (unConstrData + (force + headList (force - headList + tailList (force tailList (force - tailList (force - (force - sndPair) - (unConstrData - ((\cse -> - force + sndPair) + (unConstrData + ((\cse -> + force + (force (force - (force - ifThenElse - (equalsInteger - 5 + ifThenElse + (equalsInteger + 5 + (force (force - (force - fstPair) - cse)) + fstPair) + cse)) + (delay (delay - (delay + (force + headList (force - headList + tailList (force - tailList (force - (force - sndPair) - cse))))) + sndPair) + cse))))) + (delay (delay - (delay - error))))) - (unConstrData + error))))) + (unConstrData + (force + headList (force - headList + tailList (force tailList (force - tailList (force - (force - sndPair) - (unConstrData - ds)))))))))))))) - [ (\cparams -> - delay - (force - (case - (fun - cparams) - [ (delay - ()) - , (delay - error) ]))) - , (delay - ()) ])) - (runRules - (constr 1 - [ (constr 0 - [ 0 - , (constr 1 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ 30 - , cse ]) ]) - , cse ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 1 - , (constr 1 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ 100000 - , cse ]) ]) - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 10000000 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 2 - , (constr 1 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ 24576 - , (constr 0 - [ ]) ]) ]) - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 122880 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 3 - , (constr 1 - [ (constr 1 - [ cse - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 32768 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 4 - , (constr 1 - [ (constr 1 - [ cse - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 5000 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 5 - , (constr 1 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ 1000000 - , cse ]) ]) - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 5000000 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 6 - , (constr 1 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ 250000000 - , cse ]) ]) - , cse ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 7 - , (constr 1 - [ (constr 1 - [ cse - , (constr 0 - [ ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 8 - , (constr 1 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ 250 - , cse ]) ]) - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 2000 - , (constr 0 - [ ]) ]) ]) - , cse ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 9 - , (constr 3 - [ (constr 1 - [ cse - , cse ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 10 - , (constr 3 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ (cse - 1000) - , cse ]) ]) - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ (cse - 200) - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 11 - , (constr 3 - [ (constr 1 - [ cse - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ (cse - 10) - , cse ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 16 - , (constr 1 - [ (constr 1 - [ cse - , cse ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 17 - , (constr 1 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ 3000 - , cse ]) ]) - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 6500 - , (constr 0 - [ ]) ]) ]) - , cse ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 18 - , (constr 0 - [ ]) ]) - , (constr 1 - [ (constr 0 - [ 19 - , (constr 2 - [ (constr 1 - [ (constr 3 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ (cse - 25) - , (constr 0 - [ ]) ]) ]) - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ (cse - 5) - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) - , (constr 1 - [ (constr 3 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ (cse - 20000) - , (constr 0 - [ ]) ]) ]) - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ (cse - 5000) - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 20 - , (constr 2 - [ (constr 1 - [ (constr 1 - [ (constr 1 - [ cse - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 40000000 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) - , (constr 1 - [ (constr 1 - [ (constr 1 - [ cse - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 15000000000 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 21 - , (constr 2 - [ (constr 1 - [ (constr 1 - [ (constr 1 - [ cse - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 120000000 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) - , (constr 1 - [ (constr 1 - [ (constr 1 - [ cse - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 40000000000 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 22 - , (constr 1 - [ (constr 1 - [ cse - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 12288 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 23 - , (constr 1 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ 100 - , cse ]) ]) - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 200 - , (constr 0 - [ ]) ]) ]) - , cse ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 24 - , (constr 1 - [ (constr 1 - [ cse - , (constr 0 - [ ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 25 - , (constr 2 - [ (constr 1 - [ cse - , (constr 1 - [ cse - , (constr 1 - [ cse - , (constr 1 - [ cse - , cse ]) ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 26 - , (constr 2 - [ (constr 1 - [ cse - , (constr 1 - [ cse - , (constr 1 - [ cse - , (constr 1 - [ cse - , (constr 1 - [ cse - , (constr 1 - [ cse - , (constr 1 - [ cse - , (constr 1 - [ cse - , (constr 1 - [ (constr 3 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ cse - , cse ]) ]) - , cse ]) ]) - , cse ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 27 - , (constr 1 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ 0 - , (constr 1 - [ 3 - , (constr 0 - [ ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 28 - , (constr 1 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ 0 - , (constr 1 - [ 18 - , (constr 0 - [ ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 293 - , (constr 0 - [ ]) ]) ]) - , cse ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 29 - , (constr 1 - [ (constr 1 - [ cse - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 15 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 30 - , (constr 1 - [ (constr 1 - [ cse - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 10000000000000 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 31 - , (constr 1 - [ (constr 1 - [ cse - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 100000000000 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 32 - , (constr 1 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ 13 - , cse ]) ]) - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 37 - , (constr 0 - [ ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) - , (constr 1 - [ (constr 0 - [ 33 - , (constr 1 - [ (constr 1 - [ cse - , cse ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) - (constr 3 - [ (constr 1 - [ (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ cse - , (constr 1 - [ cse - , (constr 0 - [ ]) ]) ]) ]) - , cse ]) ])) + sndPair) + (unConstrData + ds)))))))))))))) + [ (\cparams -> + delay + (force + (case + (fun + cparams) + [ (delay + ()) + , (delay + error) ]))) + , (delay + ()) ])) + (runRules + (constr 1 + [ (constr 0 + [ 0 + , (constr 1 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ 30 + , cse ]) ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 1000 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 1 + , (constr 1 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ 100000 + , cse ]) ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 10000000 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 2 + , (constr 1 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ 24576 + , (constr 0 + [ ]) ]) ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 122880 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 3 + , (constr 1 + [ (constr 1 + [ cse + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 32768 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 4 + , (constr 1 + [ (constr 1 + [ cse + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 5000 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 5 + , (constr 1 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ 1000000 + , cse ]) ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 5000000 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 6 + , (constr 1 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ 250000000 + , cse ]) ]) + , cse ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 7 + , (constr 1 + [ (constr 1 + [ cse + , (constr 0 + [ ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 8 + , (constr 1 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ 250 + , cse ]) ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 2000 + , (constr 0 + [ ]) ]) ]) + , cse ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 9 + , (constr 3 + [ (constr 1 + [ cse + , cse ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 10 + , (constr 3 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ (cse + 1000) + , cse ]) ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ (cse + 200) + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 11 + , (constr 3 + [ (constr 1 + [ cse + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ (cse + 10) + , cse ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 16 + , (constr 1 + [ (constr 1 + [ cse + , cse ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 17 + , (constr 1 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ 3000 + , cse ]) ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 6500 + , (constr 0 + [ ]) ]) ]) + , cse ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 18 + , (constr 0 + [ ]) ]) + , (constr 1 + [ (constr 0 + [ 19 + , (constr 2 + [ (constr 1 + [ (constr 3 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ (cse + 25) + , (constr 0 + [ ]) ]) ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ (cse + 5) + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) + , (constr 1 + [ (constr 3 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ (cse + 20000) + , (constr 0 + [ ]) ]) ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ (cse + 5000) + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 20 + , (constr 2 + [ (constr 1 + [ (constr 1 + [ (constr 1 + [ cse + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 40000000 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) + , (constr 1 + [ (constr 1 + [ (constr 1 + [ cse + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 15000000000 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 21 + , (constr 2 + [ (constr 1 + [ (constr 1 + [ (constr 1 + [ cse + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 120000000 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) + , (constr 1 + [ (constr 1 + [ (constr 1 + [ cse + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 40000000000 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 22 + , (constr 1 + [ (constr 1 + [ cse + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 12288 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 23 + , (constr 1 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ 100 + , cse ]) ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 200 + , (constr 0 + [ ]) ]) ]) + , cse ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 24 + , (constr 1 + [ (constr 1 + [ cse + , (constr 0 + [ ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 25 + , (constr 2 + [ (constr 1 + [ cse + , (constr 1 + [ cse + , (constr 1 + [ cse + , (constr 1 + [ cse + , cse ]) ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 26 + , (constr 2 + [ (constr 1 + [ cse + , (constr 1 + [ cse + , (constr 1 + [ cse + , (constr 1 + [ cse + , (constr 1 + [ cse + , (constr 1 + [ cse + , (constr 1 + [ cse + , (constr 1 + [ cse + , (constr 1 + [ (constr 3 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ cse + , cse ]) ]) + , cse ]) ]) + , cse ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 27 + , (constr 1 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ 0 + , (constr 1 + [ 3 + , (constr 0 + [ ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 28 + , (constr 1 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ 0 + , (constr 1 + [ 18 + , (constr 0 + [ ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 293 + , (constr 0 + [ ]) ]) ]) + , cse ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 29 + , (constr 1 + [ (constr 1 + [ cse + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 15 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 30 + , (constr 1 + [ (constr 1 + [ cse + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 10000000000000 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 31 + , (constr 1 + [ (constr 1 + [ cse + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 100000000000 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 32 + , (constr 1 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ 13 + , cse ]) ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 37 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 1 + [ (constr 0 + [ 33 + , (constr 3 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , cse ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ (unsafeRatio + 1000 + 1) + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) (constr 3 [ (constr 1 - [ cse - , (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ cse , (constr 1 [ cse - , (constr 1 - [ cse - , (constr 0 - [ ]) ]) ]) ]) - , (constr 0 - [ ]) ]) ]) ])) + , (constr 0 + [ ]) ]) ]) ]) + , cse ]) ])) (constr 3 [ (constr 1 [ cse @@ -746,72 +753,83 @@ , cse ]) ]) , (constr 0 [ ]) ]) ]) ])) - (constr 1 - [ (constr 3 - [ (constr 1 + (constr 3 + [ (constr 1 + [ cse + , (constr 1 [ (constr 0 - [ (constr 1 + [ (constr 0 [ ]) , (constr 1 [ cse - , (constr 0 - [ ]) ]) ]) - , cse ]) ]) - , (constr 0 - [ ]) ])) + , (constr 1 + [ (cse + 5) + , (constr 0 + [ ]) ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ])) (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ cse - , (constr 1 - [ cse - , (constr 0 - [ ]) ]) ]) ]) + [ (constr 3 + [ (constr 1 + [ (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ cse + , (constr 0 + [ ]) ]) ]) + , cse ]) ]) , (constr 0 [ ]) ])) - (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ cse + (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) , (constr 1 [ cse - , (constr 0 - [ ]) ]) ]) ])) + , (constr 1 + [ cse + , (constr 0 + [ ]) ]) ]) ]) + , (constr 0 + [ ]) ])) (constr 0 [ (constr 1 [ ]) , (constr 1 - [ (cse - 10) - , cse ]) ])) - (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , cse ]) - , (constr 0 - [ ]) ])) - (constr 0 - [ (constr 1 - [ ]) - , (constr 1 - [ 0 - , (constr 1 - [ 1000000 - , (constr 0 - [ ]) ]) ]) ])) - (constr 1 - [ (constr 0 - [ (constr 2 - [ ]) - , cse ]) - , (constr 0 - [ ]) ])) + [ cse + , (constr 1 + [ cse + , (constr 0 + [ ]) ]) ]) ])) + (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ cse + , cse ]) ])) + (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , cse ]) + , (constr 0 + [ ]) ])) + (constr 0 + [ (constr 1 + [ ]) + , (constr 1 + [ 0 + , (constr 1 + [ 1000000 + , (constr 0 + [ ]) ]) ]) ])) (constr 1 - [ cse + [ (constr 0 + [ (constr 2 + [ ]) + , cse ]) , (constr 0 [ ]) ])) (constr 1 @@ -825,13 +843,7 @@ , (constr 0 [ ]) ])) (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 1000 - , (constr 0 - [ ]) ]) ]) + [ cse , (constr 0 [ ]) ])) (constr 1 @@ -843,38 +855,38 @@ , (constr 0 [ ]) ])) (cse - 10)) + 1)) (cse - 2)) + 1)) (cse - 20)) + 4)) (cse - 100)) - (constr 0 - [ (constr 1 - [ ]) - , cse ])) + 10)) + (cse + 2)) (cse - 5)) - (cse 1)) - (constr 0 - [ (constr 1 - []) - , (constr 1 - [ 1 - , (constr 0 - [ ]) ]) ])) - (cse 1)) - (cse 4)) - (unsafeRatio 3)) + 10)) + (constr 0 + [ (constr 1 + [ ]) + , cse ])) + (cse 100)) + (constr 0 + [ (constr 1 + []) + , (constr 1 + [ 1 + , (constr 0 + [ ]) ]) ])) + (cse 20)) + (unsafeRatio 0)) (unsafeRatio 13)) - (unsafeRatio 9)) - (constr 1 - [0, (constr 0 [])])) - (unsafeRatio 0)) - (unsafeRatio 4)) - (unsafeRatio 51)) - (unsafeRatio 1)) + (unsafeRatio 1)) + (unsafeRatio 3)) + (unsafeRatio 51)) + (unsafeRatio 9)) + (constr 1 [0, (constr 0 [])])) + (unsafeRatio 4)) (fix1 (\go l -> force (force chooseList) diff --git a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.cbor.size.golden b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.cbor.size.golden index 75b941c9f10..b3aededa3a9 100644 --- a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.cbor.size.golden +++ b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.cbor.size.golden @@ -1 +1 @@ -2108 \ No newline at end of file +2128 \ No newline at end of file diff --git a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.large.budget.golden b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.large.budget.golden index ee24d370424..f7f97495af1 100644 --- a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.large.budget.golden +++ b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.large.budget.golden @@ -1 +1 @@ -ExBudget {exBudgetCPU = ExCPU 906954570, exBudgetMemory = ExMemory 4552727} \ No newline at end of file +ExBudget {exBudgetCPU = ExCPU 915786341, exBudgetMemory = ExMemory 4588088} \ No newline at end of file diff --git a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.pir.golden b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.pir.golden index 33ec488cbc1..8cbf06182e7 100644 --- a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.pir.golden +++ b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.pir.golden @@ -5048,13 +5048,13 @@ {integer} {ParamValue} 33 - (ParamInteger + (ParamRational ((let a = Tuple2 PredKey (List - integer) + Rational) in \(g : all b. @@ -5082,7 +5082,7 @@ Tuple2 PredKey (List - integer) -> + Rational) -> a -> a) (n : @@ -5091,64 +5091,68 @@ (Tuple2 {PredKey} {List - integer} + Rational} MinValue ((let a = List - integer + Rational in \(c : - integer -> + Rational -> a -> a) (n : a) -> c - 0 + (unsafeRatio + 0 + 1) n) (\(ds : - integer) + Rational) (ds : List - integer) -> + Rational) -> Cons - {integer} + {Rational} ds ds) (Nil - {integer}))) + {Rational}))) (c (Tuple2 {PredKey} {List - integer} + Rational} MaxValue ((let a = List - integer + Rational in \(c : - integer -> + Rational -> a -> a) (n : a) -> c - 1000 + (unsafeRatio + 1000 + 1) n) (\(ds : - integer) + Rational) (ds : List - integer) -> + Rational) -> Cons - {integer} + {Rational} ds ds) (Nil - {integer}))) + {Rational}))) n))))) n)))))))))))))))))))))))))))))) !fun : List (Tuple2 data data) -> Bool diff --git a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.small.budget.golden b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.small.budget.golden index cf43939887d..41b796f5651 100644 --- a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.small.budget.golden +++ b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.small.budget.golden @@ -1 +1 @@ -ExBudget {exBudgetCPU = ExCPU 86200992, exBudgetMemory = ExMemory 388492} \ No newline at end of file +ExBudget {exBudgetCPU = ExCPU 88895267, exBudgetMemory = ExMemory 399703} \ No newline at end of file diff --git a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.uplc.golden b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.uplc.golden index 147270c1963..1f88e6a462c 100644 --- a/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.uplc.golden +++ b/cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.uplc.golden @@ -222,7 +222,16 @@ , (constr 1 [ 30 , cse ]) ]) - , cse ]) ]) ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 1000 + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) , (constr 1 [ (constr 0 [ 1 @@ -762,10 +771,24 @@ , (constr 1 [ (constr 0 [ 33 - , (constr 1 + , (constr 3 [ (constr 1 - [ cse - , cse ]) ]) ]) + [ (constr 0 + [ (constr 1 + [ ]) + , cse ]) + , (constr 1 + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ (unsafeRatio + 1000 + 1) + , (constr 0 + [ ]) ]) ]) + , (constr 0 + [ ]) ]) ]) ]) ]) , (constr 0 [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) (constr 3 @@ -777,7 +800,10 @@ [ ]) , (constr 1 [ cse - , cse ]) ]) + , (constr 1 + [ cse + , (constr 0 + [ ]) ]) ]) ]) , (constr 0 [ ]) ]) ]) ])) (constr 3 @@ -789,10 +815,7 @@ [ ]) , (constr 1 [ cse - , (constr 1 - [ cse - , (constr 0 - [ ]) ]) ]) ]) + , cse ]) ]) , (constr 0 [ ]) ]) ]) ])) (constr 3 @@ -871,68 +894,60 @@ , (constr 0 [ ]) ])) (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 500000000 - , (constr 0 - [ ]) ]) ]) + [ cse , (constr 0 [ ]) ])) (constr 1 - [ cse + [ (constr 0 + [ (constr 0 + [ ]) + , (constr 1 + [ 500000000 + , (constr 0 + [ ]) ]) ]) , (constr 0 [ ]) ])) (constr 1 - [ (constr 0 - [ (constr 0 - [ ]) - , (constr 1 - [ 1000 - , (constr 0 - [ ]) ]) ]) + [ (cse + 1) , (constr 0 [ ]) ])) (constr 1 [ cse , (constr 0 [ ]) ])) - (constr 1 - [ (cse - 4) - , (constr 0 - [ ]) ])) + (cse + 10)) (cse - 1)) - (cse - 10)) + 4)) + (constr 0 + [ (constr 1 + [ ]) + , cse ])) (cse - 2)) - (constr 0 - [ (constr 1 - [ ]) - , cse ])) + 20)) + (cse + 5)) (cse - 100)) - (cse 10)) - (constr 0 - [ (constr 1 - []) - , (constr 1 - [ 1 - , (constr 0 - [ ]) ]) ])) - (cse 5)) - (cse 20)) - (unsafeRatio 0 1)) - (unsafeRatio 9)) + 10)) + (cse 100)) + (cse 1)) + (constr 0 + [ (constr 1 + []) + , (constr 1 + [ 1 + , (constr 0 + [ ]) ]) ])) + (cse 2)) + (unsafeRatio 1)) + (unsafeRatio 51)) (unsafeRatio 3)) - (unsafeRatio 1)) - (unsafeRatio 4)) - (unsafeRatio 13)) + (unsafeRatio 9)) + (unsafeRatio 13)) + (unsafeRatio 4)) (constr 1 [0, (constr 0 [])])) - (unsafeRatio 51)) + (unsafeRatio 0)) (fix1 (\go l -> force (force chooseList) diff --git a/cardano-constitution/test/Helpers/Guardrail.hs b/cardano-constitution/test/Helpers/Guardrail.hs index 4ebf080b9ff..19b81350f7d 100644 --- a/cardano-constitution/test/Helpers/Guardrail.hs +++ b/cardano-constitution/test/Helpers/Guardrail.hs @@ -183,10 +183,10 @@ executionUnitPrices = ParamList @Rational 19 "executionUnitPrices" ] `WithinDomain` (0.0, 1.0) ] -minFeeRefScriptCoinsPerByte :: Guardrail (Param (Scalar Integer)) -minFeeRefScriptCoinsPerByte = Param @Integer 33 "minFeeRefScriptCoinsPerByte" 1 - [ ("MFRS-01", "minFeeRefScriptCoinsPerByte must not exceed 1,000 (0.001 ada)") `MustNotBe` NG 1_000 - , ("MFRS-02", "minFeeRefScriptCoinsPerByte must not be negative") `MustNotBe` NL 0 +minFeeRefScriptCoinsPerByte :: Guardrail (Param (Scalar Rational)) +minFeeRefScriptCoinsPerByte = Param @Rational 33 "minFeeRefScriptCoinsPerByte" 1 + [ ("MFRS-01", "minFeeRefScriptCoinsPerByte must not exceed 1,000 (0.001 ada)") `MustNotBe` NG (1_000 % 1) + , ("MFRS-02", "minFeeRefScriptCoinsPerByte must not be negative") `MustNotBe` NL (0 % 1) ] `WithinDomain` (-5_000,10_000) diff --git a/cardano-constitution/test/Helpers/MultiParam.hs b/cardano-constitution/test/Helpers/MultiParam.hs index 816743273d4..4d3d46ba16b 100644 --- a/cardano-constitution/test/Helpers/MultiParam.hs +++ b/cardano-constitution/test/Helpers/MultiParam.hs @@ -63,7 +63,7 @@ multiParamProp' :: (Testable prop) -> Gen ParamValues -> ((Bool, ParamValues) -> prop) -> PropertyWithTestState -multiParamProp' testNo gen extraGen finalProp ref = withMaxSuccess 9_999 $ +multiParamProp' testNo gen extraGen finalProp ref = withMaxSuccess 100 $ TSQ.forAll (combine2Gen gen extraGen) $ \(params',extraParams) -> monadicIO $ do diff --git a/cardano-constitution/test/Helpers/Spec/IntervalSpec.hs b/cardano-constitution/test/Helpers/Spec/IntervalSpec.hs index 90e35051357..b12060d3c8d 100644 --- a/cardano-constitution/test/Helpers/Spec/IntervalSpec.hs +++ b/cardano-constitution/test/Helpers/Spec/IntervalSpec.hs @@ -91,7 +91,7 @@ internalTests = testGroup "Tools: Intervals" [ \x -> x >= 65 % 100 && x <= 90 % 100 , TSQ.testProperty "rationals should be generated within the boundaries" $ - withMaxSuccess 600 $ TSQ.forAll (choose' @Rational (0,1)) $ + withMaxSuccess 100 $ TSQ.forAll (choose' @Rational (0,1)) $ \x -> x >= 0 && x <= 100 ] ] diff --git a/cardano-constitution/test/Helpers/TestBuilders.hs b/cardano-constitution/test/Helpers/TestBuilders.hs index fbdd2d94676..f144f23fcb0 100644 --- a/cardano-constitution/test/Helpers/TestBuilders.hs +++ b/cardano-constitution/test/Helpers/TestBuilders.hs @@ -227,7 +227,7 @@ oneParamProp' :: (ToJSON a,Show a, Testable prop, ToData a) -> Gen a -> ((Bool, a) -> prop) -> PropertyWithTestState -oneParamProp' paramIx toData' gen finalProp ref = withMaxSuccess 600 $ TSQ.forAll gen $ +oneParamProp' paramIx toData' gen finalProp ref = withMaxSuccess 100 $ TSQ.forAll gen $ \value -> monadicIO $ do let (V3.ArbitraryContext ctx) = V3.simpleContextWithParam (toData' value) diff --git a/plutus-core/plutus-core/test/Generators/QuickCheck/Utils.hs b/plutus-core/plutus-core/test/Generators/QuickCheck/Utils.hs index 95d50209ec2..be02a252470 100644 --- a/plutus-core/plutus-core/test/Generators/QuickCheck/Utils.hs +++ b/plutus-core/plutus-core/test/Generators/QuickCheck/Utils.hs @@ -21,7 +21,7 @@ test_multiSplitSound = , ("multiSplit0", multiSplit0 0.1) ] pure . testProperty name $ \(xs :: [Int]) -> - withMaxSuccess 10000 . forAll (split xs) $ \aSplit -> + withMaxSuccess 100 . forAll (split xs) $ \aSplit -> xs === concat aSplit -- | Show the distribution of lists generated by a split function for a list of the given length.