plutus-core-1.34.1.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.Evaluation.Machine.MachineParameters

Synopsis

Documentation

data CostModel machinecosts builtincosts Source #

We need to account for the costs of evaluator steps and also built-in function evaluation. The models for these have different structures and are used in different parts of the code, so inside the valuator we pass separate objects about most of the time . It's convenient for clients of the evaluator to only have to worry about a single object, so the CostModel type bundles the two together. We could conceivably have different evaluators with different internal costs, so we keep the machine costs abstract. The model for Cek machine steps is in UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts.

Constructors

CostModel 

Fields

Instances

Instances details
(Show machinecosts, Show builtincosts) ⇒ Show (CostModel machinecosts builtincosts) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.MachineParameters

Methods

showsPrecIntCostModel machinecosts builtincosts → ShowS Source #

showCostModel machinecosts builtincosts → String Source #

showList ∷ [CostModel machinecosts builtincosts] → ShowS Source #

(Eq machinecosts, Eq builtincosts) ⇒ Eq (CostModel machinecosts builtincosts) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.MachineParameters

Methods

(==)CostModel machinecosts builtincosts → CostModel machinecosts builtincosts → Bool Source #

(/=)CostModel machinecosts builtincosts → CostModel machinecosts builtincosts → Bool Source #

machineCostModel ∷ ∀ machinecosts builtincosts machinecosts. Lens (CostModel machinecosts builtincosts) (CostModel machinecosts builtincosts) machinecosts machinecosts Source #

builtinCostModel ∷ ∀ machinecosts builtincosts builtincosts. Lens (CostModel machinecosts builtincosts) (CostModel machinecosts builtincosts) builtincosts builtincosts Source #

data MachineParameters machinecosts fun val Source #

At execution time we need a BuiltinsRuntime object which includes both the cost model for builtins and their denotations. This bundles one of those together with the cost model for evaluator steps. The term type will be CekValue when we're using this with the CEK machine.

Constructors

MachineParameters 

Fields

Instances

Instances details
Generic (MachineParameters machinecosts fun val) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.MachineParameters

Associated Types

type Rep (MachineParameters machinecosts fun val) ∷ TypeType Source #

Methods

fromMachineParameters machinecosts fun val → Rep (MachineParameters machinecosts fun val) x Source #

toRep (MachineParameters machinecosts fun val) x → MachineParameters machinecosts fun val Source #

(NFData machinecosts, Bounded fun, Enum fun) ⇒ NFData (MachineParameters machinecosts fun val) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.MachineParameters

Methods

rnfMachineParameters machinecosts fun val → () Source #

(NoThunks machinecosts, Bounded fun, Enum fun) ⇒ NoThunks (MachineParameters machinecosts fun val) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.MachineParameters

Methods

noThunksContextMachineParameters machinecosts fun val → IO (Maybe ThunkInfo) Source #

wNoThunksContextMachineParameters machinecosts fun val → IO (Maybe ThunkInfo) Source #

showTypeOfProxy (MachineParameters machinecosts fun val) → String Source #

type Rep (MachineParameters machinecosts fun val) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.MachineParameters

type Rep (MachineParameters machinecosts fun val) = D1 ('MetaData "MachineParameters" "PlutusCore.Evaluation.Machine.MachineParameters" "plutus-core-1.34.1.0-inplace" 'False) (C1 ('MetaCons "MachineParameters" 'PrefixI 'True) (S1 ('MetaSel ('Just "machineCosts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 machinecosts) :*: S1 ('MetaSel ('Just "builtinsRuntime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (BuiltinsRuntime fun val))))

mkMachineParameters ∷ (CostingPart uni fun ~ builtincosts, HasMeaningIn uni val, ToBuiltinMeaning uni fun) ⇒ BuiltinSemanticsVariant fun → CostModel machinecosts builtincosts → MachineParameters machinecosts fun val Source #

This just uses toBuiltinsRuntime function to convert a BuiltinCostModel to a BuiltinsRuntime.