cardano-ledger-test-9.9.9.9: Testing harness, tests and benchmarks for Shelley style cardano ledgers
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Constrained.Shrink

Synopsis

Documentation

shrinkEnvDependGraph era → Env era → [Env era] Source #

Shrink an environment subject to the constraints in the given dependency graph. The strategy is * pick a variable * shrink its value to something that still satisfies the defining constraints for the variable * adjust the values for variables depending on the picked variables to fix constraint violations resulting from the changed value Note that the DependGraph tells us the dependency order of the variables: a variable only depends on the variables before it in the graph, so when shrinking the value of a variable we only need to adjust the values of later variables.