cardano-ledger-conformance-0.1.0.0: Testing utilities for conformance testing
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Conformance.ExecSpecRule.Core

Documentation

class (ForAllRuleTypes (HasSpec fn) rule era, ForAllRuleTypes ToExpr rule era, ForAllRuleTypes NFData rule era, Eq (Event (EraRule rule era)), Typeable (Event (EraRule rule era)), KnownSymbol rule, STS (EraRule rule era), BaseM (EraRule rule era) ~ ShelleyBase, SpecTranslate (ExecContext fn rule era) (PredicateFailure (EraRule rule era))) ⇒ ExecSpecRule fn (rule ∷ Symbol) era where Source #

Minimal complete definition

environmentSpec, stateSpec, signalSpec, runAgdaRule

Associated Types

type ExecContext fn rule era Source #

type ExecContext fn rule era = ()

Methods

environmentSpecExecContext fn rule era → Specification fn (Environment (EraRule rule era)) Source #

stateSpecExecContext fn rule era → Environment (EraRule rule era) → Specification fn (State (EraRule rule era)) Source #

signalSpecExecContext fn rule era → Environment (EraRule rule era) → State (EraRule rule era) → Specification fn (Signal (EraRule rule era)) Source #

genExecContextGen (ExecContext fn rule era) Source #

default genExecContextArbitrary (ExecContext fn rule era) ⇒ Gen (ExecContext fn rule era) Source #

runAgdaRuleSpecRep (Environment (EraRule rule era)) → SpecRep (State (EraRule rule era)) → SpecRep (Signal (EraRule rule era)) → Either (NonEmpty (SpecRep (PredicateFailure (EraRule rule era)))) (SpecRep (State (EraRule rule era))) Source #

translateInputsEnvironment (EraRule rule era) → State (EraRule rule era) → Signal (EraRule rule era) → ExecContext fn rule era → ImpTestM era (SpecRep (Environment (EraRule rule era)), SpecRep (State (EraRule rule era)), SpecRep (Signal (EraRule rule era))) Source #

default translateInputs ∷ (ForAllRuleTypes (SpecTranslate (ExecContext fn rule era)) rule era, ToExpr (SpecRep (Environment (EraRule rule era))), ToExpr (SpecRep (State (EraRule rule era))), ToExpr (SpecRep (Signal (EraRule rule era)))) ⇒ Environment (EraRule rule era) → State (EraRule rule era) → Signal (EraRule rule era) → ExecContext fn rule era → ImpTestM era (SpecRep (Environment (EraRule rule era)), SpecRep (State (EraRule rule era)), SpecRep (Signal (EraRule rule era))) Source #

testConformance ∷ (ShelleyEraImp era, SpecTranslate (ExecContext fn rule era) (State (EraRule rule era)), NFData (SpecRep (Environment (EraRule rule era))), NFData (SpecRep (State (EraRule rule era))), NFData (SpecRep (Signal (EraRule rule era))), NFData (SpecRep (PredicateFailure (EraRule rule era))), ToExpr (SpecRep (Environment (EraRule rule era))), ToExpr (SpecRep (State (EraRule rule era))), ToExpr (SpecRep (Signal (EraRule rule era))), ToExpr (SpecRep (PredicateFailure (EraRule rule era))), FixupSpecRep (SpecRep (PredicateFailure (EraRule rule era))), FixupSpecRep (SpecRep (State (EraRule rule era))), Eq (SpecRep (PredicateFailure (EraRule rule era))), Eq (SpecRep (State (EraRule rule era)))) ⇒ ExecContext fn rule era → Environment (EraRule rule era) → State (EraRule rule era) → Signal (EraRule rule era) → Property Source #

Instances

Instances details
IsConwayUniv fn ⇒ ExecSpecRule fn "CERT" Conway Source # 
Instance details

Defined in Test.Cardano.Ledger.Conformance.ExecSpecRule.Conway

Associated Types

type ExecContext fn "CERT" Conway Source #

(NFData (SpecRep (ConwayGovPredFailure Conway)), IsConwayUniv fn) ⇒ ExecSpecRule fn "GOV" Conway Source # 
Instance details

Defined in Test.Cardano.Ledger.Conformance.ExecSpecRule.Conway

Associated Types

type ExecContext fn "GOV" Conway Source #

IsConwayUniv fn ⇒ ExecSpecRule fn "RATIFY" Conway Source # 
Instance details

Defined in Test.Cardano.Ledger.Conformance.ExecSpecRule.Conway

Associated Types

type ExecContext fn "RATIFY" Conway Source #

Methods

environmentSpecExecContext fn "RATIFY" ConwaySpecification fn (Environment (EraRule "RATIFY" Conway)) Source #

stateSpecExecContext fn "RATIFY" ConwayEnvironment (EraRule "RATIFY" Conway) → Specification fn (State (EraRule "RATIFY" Conway)) Source #

signalSpecExecContext fn "RATIFY" ConwayEnvironment (EraRule "RATIFY" Conway) → State (EraRule "RATIFY" Conway) → Specification fn (Signal (EraRule "RATIFY" Conway)) Source #

genExecContextGen (ExecContext fn "RATIFY" Conway) Source #

runAgdaRuleSpecRep (Environment (EraRule "RATIFY" Conway)) → SpecRep (State (EraRule "RATIFY" Conway)) → SpecRep (Signal (EraRule "RATIFY" Conway)) → Either (NonEmpty (SpecRep (PredicateFailure (EraRule "RATIFY" Conway)))) (SpecRep (State (EraRule "RATIFY" Conway))) Source #

translateInputsEnvironment (EraRule "RATIFY" Conway) → State (EraRule "RATIFY" Conway) → Signal (EraRule "RATIFY" Conway) → ExecContext fn "RATIFY" ConwayImpTestM Conway (SpecRep (Environment (EraRule "RATIFY" Conway)), SpecRep (State (EraRule "RATIFY" Conway)), SpecRep (Signal (EraRule "RATIFY" Conway))) Source #

testConformanceExecContext fn "RATIFY" ConwayEnvironment (EraRule "RATIFY" Conway) → State (EraRule "RATIFY" Conway) → Signal (EraRule "RATIFY" Conway) → Property Source #

IsConwayUniv fn ⇒ ExecSpecRule fn "UTXO" Conway Source # 
Instance details

Defined in Test.Cardano.Ledger.Conformance.ExecSpecRule.Conway

Associated Types

type ExecContext fn "UTXO" Conway Source #

conformsToImpl ∷ ∀ (rule ∷ Symbol) fn era. (ShelleyEraImp era, ExecSpecRule fn rule era, NFData (SpecRep (Environment (EraRule rule era))), NFData (SpecRep (State (EraRule rule era))), NFData (SpecRep (Signal (EraRule rule era))), NFData (SpecRep (PredicateFailure (EraRule rule era))), ToExpr (SpecRep (Environment (EraRule rule era))), ToExpr (SpecRep (State (EraRule rule era))), ToExpr (SpecRep (Signal (EraRule rule era))), ToExpr (SpecRep (PredicateFailure (EraRule rule era))), ToExpr (ExecContext fn rule era), SpecTranslate (ExecContext fn rule era) (State (EraRule rule era)), FixupSpecRep (SpecRep (PredicateFailure (EraRule rule era))), FixupSpecRep (SpecRep (State (EraRule rule era))), Eq (SpecRep (PredicateFailure (EraRule rule era))), Eq (SpecRep (State (EraRule rule era)))) ⇒ Property Source #

generatesWithin ∷ ∀ a. (NFData a, ToExpr a, Typeable a) ⇒ Gen a → IntSpec Source #

runConformance ∷ ∀ (rule ∷ Symbol) (fn ∷ [Type] → TypeType) era. (ExecSpecRule fn rule era, NFData (SpecRep (Environment (EraRule rule era))), NFData (SpecRep (State (EraRule rule era))), NFData (SpecRep (Signal (EraRule rule era))), NFData (SpecRep (PredicateFailure (EraRule rule era))), ToExpr (SpecRep (Environment (EraRule rule era))), ToExpr (SpecRep (State (EraRule rule era))), ToExpr (SpecRep (Signal (EraRule rule era))), SpecTranslate (ExecContext fn rule era) (State (EraRule rule era)), FixupSpecRep (SpecRep (PredicateFailure (EraRule rule era))), FixupSpecRep (SpecRep (State (EraRule rule era)))) ⇒ ExecContext fn rule era → Environment (EraRule rule era) → State (EraRule rule era) → Signal (EraRule rule era) → ImpTestM era (Either (NonEmpty (SpecRep (PredicateFailure (EraRule rule era)))) (SpecRep (State (EraRule rule era))), Either (NonEmpty (SpecRep (PredicateFailure (EraRule rule era)))) (SpecRep (State (EraRule rule era)))) Source #

checkConformance ∷ (ToExpr (SpecRep (PredicateFailure (EraRule rule era))), ToExpr (SpecRep (State (EraRule rule era))), Eq (SpecRep (PredicateFailure (EraRule rule era))), Eq (SpecRep (State (EraRule rule era)))) ⇒ Either (NonEmpty (SpecRep (PredicateFailure (EraRule rule era)))) (SpecRep (State (EraRule rule era))) → Either (NonEmpty (SpecRep (PredicateFailure (EraRule rule era)))) (SpecRep (State (EraRule rule era))) → ImpTestM era () Source #