{-# LANGUAGE DataKinds #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module PlutusCore.Evaluation.Machine.ExBudgetingDefaults
( defaultBuiltinsRuntimeForSemanticsVariant
, defaultCekParametersForVariant
, defaultCostModelParamsForVariant
, cekCostModelForVariant
, defaultBuiltinsRuntimeForTesting
, defaultCekParametersForTesting
, defaultCekMachineCostsForTesting
, defaultCostModelParamsForTesting
, defaultBuiltinCostModelForTesting
, defaultCekCostModelForTesting
, defaultCekCostModelForTestingB
, unitCekMachineCosts
, unitCekParameters
)
where
import PlutusCore.Builtin
import PlutusCore.DataFilePaths qualified as DFP
import PlutusCore.Default
import PlutusCore.Evaluation.Machine.BuiltinCostModel
import PlutusCore.Evaluation.Machine.CostModelInterface
import PlutusCore.Evaluation.Machine.MachineParameters
import UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts
import UntypedPlutusCore.Evaluation.Machine.Cek.Internal
import Data.Aeson.THReader
import GHC.Magic (noinline)
import PlutusPrelude
builtinCostModelVariantA :: BuiltinCostModel
builtinCostModelVariantA :: BuiltinCostModel
builtinCostModelVariantA =
$$(readJSONFromFile DFP.builtinCostModelFileA)
{-# OPAQUE builtinCostModelVariantA #-}
cekMachineCostsVariantA :: CekMachineCosts
cekMachineCostsVariantA :: CekMachineCosts
cekMachineCostsVariantA =
$$(readJSONFromFile DFP.cekMachineCostsFileA)
{-# OPAQUE cekMachineCostsVariantA #-}
cekCostModelVariantA :: CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantA :: CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantA = CekMachineCosts
-> BuiltinCostModel -> CostModel CekMachineCosts BuiltinCostModel
forall machinecosts builtincosts.
machinecosts -> builtincosts -> CostModel machinecosts builtincosts
CostModel CekMachineCosts
cekMachineCostsVariantA BuiltinCostModel
builtinCostModelVariantA
builtinCostModelVariantB :: BuiltinCostModel
builtinCostModelVariantB :: BuiltinCostModel
builtinCostModelVariantB =
$$(readJSONFromFile DFP.builtinCostModelFileB)
{-# OPAQUE builtinCostModelVariantB #-}
cekMachineCostsVariantB :: CekMachineCosts
cekMachineCostsVariantB :: CekMachineCosts
cekMachineCostsVariantB =
$$(readJSONFromFile DFP.cekMachineCostsFileB)
{-# OPAQUE cekMachineCostsVariantB #-}
cekCostModelVariantB :: CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantB :: CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantB = CekMachineCosts
-> BuiltinCostModel -> CostModel CekMachineCosts BuiltinCostModel
forall machinecosts builtincosts.
machinecosts -> builtincosts -> CostModel machinecosts builtincosts
CostModel CekMachineCosts
cekMachineCostsVariantB BuiltinCostModel
builtinCostModelVariantB
builtinCostModelVariantC :: BuiltinCostModel
builtinCostModelVariantC :: BuiltinCostModel
builtinCostModelVariantC =
$$(readJSONFromFile DFP.builtinCostModelFileC)
{-# OPAQUE builtinCostModelVariantC #-}
cekMachineCostsVariantC :: CekMachineCosts
cekMachineCostsVariantC :: CekMachineCosts
cekMachineCostsVariantC =
$$(readJSONFromFile DFP.cekMachineCostsFileC)
{-# OPAQUE cekMachineCostsVariantC #-}
cekCostModelVariantC :: CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantC :: CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantC = CekMachineCosts
-> BuiltinCostModel -> CostModel CekMachineCosts BuiltinCostModel
forall machinecosts builtincosts.
machinecosts -> builtincosts -> CostModel machinecosts builtincosts
CostModel CekMachineCosts
cekMachineCostsVariantC BuiltinCostModel
builtinCostModelVariantC
cekCostModelForVariant :: BuiltinSemanticsVariant DefaultFun -> CostModel CekMachineCosts BuiltinCostModel
cekCostModelForVariant :: BuiltinSemanticsVariant DefaultFun
-> CostModel CekMachineCosts BuiltinCostModel
cekCostModelForVariant BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantA = CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantA
cekCostModelForVariant BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantB = CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantB
cekCostModelForVariant BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantC = CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantC
defaultCostModelParamsA :: Maybe CostModelParams
defaultCostModelParamsA :: Maybe CostModelParams
defaultCostModelParamsA = CostModel CekMachineCosts BuiltinCostModel -> Maybe CostModelParams
forall machinecosts builtincosts.
(ToJSON machinecosts, ToJSON builtincosts) =>
CostModel machinecosts builtincosts -> Maybe CostModelParams
extractCostModelParams CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantA
defaultCostModelParamsB :: Maybe CostModelParams
defaultCostModelParamsB :: Maybe CostModelParams
defaultCostModelParamsB = CostModel CekMachineCosts BuiltinCostModel -> Maybe CostModelParams
forall machinecosts builtincosts.
(ToJSON machinecosts, ToJSON builtincosts) =>
CostModel machinecosts builtincosts -> Maybe CostModelParams
extractCostModelParams CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantB
defaultCostModelParamsC :: Maybe CostModelParams
defaultCostModelParamsC :: Maybe CostModelParams
defaultCostModelParamsC = CostModel CekMachineCosts BuiltinCostModel -> Maybe CostModelParams
forall machinecosts builtincosts.
(ToJSON machinecosts, ToJSON builtincosts) =>
CostModel machinecosts builtincosts -> Maybe CostModelParams
extractCostModelParams CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantC
defaultCostModelParamsForVariant :: BuiltinSemanticsVariant DefaultFun -> Maybe CostModelParams
defaultCostModelParamsForVariant :: BuiltinSemanticsVariant DefaultFun -> Maybe CostModelParams
defaultCostModelParamsForVariant = \case
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantA -> Maybe CostModelParams
defaultCostModelParamsA
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantB -> Maybe CostModelParams
defaultCostModelParamsB
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantC -> Maybe CostModelParams
defaultCostModelParamsC
defaultCekParametersA :: Typeable ann => MachineParameters CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
defaultCekParametersA :: forall ann.
Typeable ann =>
MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
defaultCekParametersA =
(BuiltinSemanticsVariant DefaultFun
-> CostModel CekMachineCosts BuiltinCostModel
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann))
-> BuiltinSemanticsVariant DefaultFun
-> CostModel CekMachineCosts BuiltinCostModel
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
forall a. a -> a
noinline BuiltinSemanticsVariant DefaultFun
-> CostModel CekMachineCosts BuiltinCostModel
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
forall (uni :: * -> *) fun builtincosts val machinecosts.
(CostingPart uni fun ~ builtincosts, HasMeaningIn uni val,
ToBuiltinMeaning uni fun) =>
BuiltinSemanticsVariant fun
-> CostModel machinecosts builtincosts
-> MachineParameters machinecosts fun val
mkMachineParameters BuiltinSemanticsVariant DefaultFun
DefaultFunSemanticsVariantA CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantA
defaultCekParametersB :: Typeable ann => MachineParameters CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
defaultCekParametersB :: forall ann.
Typeable ann =>
MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
defaultCekParametersB =
(BuiltinSemanticsVariant DefaultFun
-> CostModel CekMachineCosts BuiltinCostModel
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann))
-> BuiltinSemanticsVariant DefaultFun
-> CostModel CekMachineCosts BuiltinCostModel
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
forall a. a -> a
noinline BuiltinSemanticsVariant DefaultFun
-> CostModel CekMachineCosts BuiltinCostModel
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
forall (uni :: * -> *) fun builtincosts val machinecosts.
(CostingPart uni fun ~ builtincosts, HasMeaningIn uni val,
ToBuiltinMeaning uni fun) =>
BuiltinSemanticsVariant fun
-> CostModel machinecosts builtincosts
-> MachineParameters machinecosts fun val
mkMachineParameters BuiltinSemanticsVariant DefaultFun
DefaultFunSemanticsVariantB CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantB
defaultCekParametersC :: Typeable ann => MachineParameters CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
defaultCekParametersC :: forall ann.
Typeable ann =>
MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
defaultCekParametersC =
(BuiltinSemanticsVariant DefaultFun
-> CostModel CekMachineCosts BuiltinCostModel
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann))
-> BuiltinSemanticsVariant DefaultFun
-> CostModel CekMachineCosts BuiltinCostModel
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
forall a. a -> a
noinline BuiltinSemanticsVariant DefaultFun
-> CostModel CekMachineCosts BuiltinCostModel
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
forall (uni :: * -> *) fun builtincosts val machinecosts.
(CostingPart uni fun ~ builtincosts, HasMeaningIn uni val,
ToBuiltinMeaning uni fun) =>
BuiltinSemanticsVariant fun
-> CostModel machinecosts builtincosts
-> MachineParameters machinecosts fun val
mkMachineParameters BuiltinSemanticsVariant DefaultFun
DefaultFunSemanticsVariantC CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantC
defaultBuiltinsRuntimeForSemanticsVariant
:: HasMeaningIn DefaultUni term
=> BuiltinSemanticsVariant DefaultFun
-> BuiltinsRuntime DefaultFun term
defaultBuiltinsRuntimeForSemanticsVariant :: forall term.
HasMeaningIn DefaultUni term =>
BuiltinSemanticsVariant DefaultFun
-> BuiltinsRuntime DefaultFun term
defaultBuiltinsRuntimeForSemanticsVariant BuiltinSemanticsVariant DefaultFun
semvar =
(BuiltinSemanticsVariant DefaultFun
-> BuiltinCostModel -> BuiltinsRuntime DefaultFun term)
-> BuiltinSemanticsVariant DefaultFun
-> BuiltinCostModel
-> BuiltinsRuntime DefaultFun term
forall a. a -> a
noinline BuiltinSemanticsVariant DefaultFun
-> BuiltinCostModel -> BuiltinsRuntime DefaultFun term
forall cost (uni :: * -> *) fun val.
(cost ~ CostingPart uni fun, ToBuiltinMeaning uni fun,
HasMeaningIn uni val) =>
BuiltinSemanticsVariant fun -> cost -> BuiltinsRuntime fun val
toBuiltinsRuntime BuiltinSemanticsVariant DefaultFun
semvar (BuiltinCostModel -> BuiltinsRuntime DefaultFun term)
-> BuiltinCostModel -> BuiltinsRuntime DefaultFun term
forall a b. (a -> b) -> a -> b
$ BuiltinSemanticsVariant DefaultFun -> BuiltinCostModel
builtinCostModelFor BuiltinSemanticsVariant DefaultFun
semvar
where builtinCostModelFor :: BuiltinSemanticsVariant DefaultFun -> BuiltinCostModel
builtinCostModelFor = \case
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantA -> BuiltinCostModel
builtinCostModelVariantA
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantB -> BuiltinCostModel
builtinCostModelVariantB
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantC -> BuiltinCostModel
builtinCostModelVariantC
defaultCekParametersForVariant
:: Typeable ann
=> BuiltinSemanticsVariant DefaultFun
-> MachineParameters CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
defaultCekParametersForVariant :: forall ann.
Typeable ann =>
BuiltinSemanticsVariant DefaultFun
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
defaultCekParametersForVariant = \case
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantA -> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
forall ann.
Typeable ann =>
MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
defaultCekParametersA
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantB -> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
forall ann.
Typeable ann =>
MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
defaultCekParametersB
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantC -> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
forall ann.
Typeable ann =>
MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
defaultCekParametersC
defaultBuiltinsRuntimeForTesting
:: HasMeaningIn DefaultUni term
=> BuiltinsRuntime DefaultFun term
defaultBuiltinsRuntimeForTesting :: forall term.
HasMeaningIn DefaultUni term =>
BuiltinsRuntime DefaultFun term
defaultBuiltinsRuntimeForTesting = BuiltinSemanticsVariant DefaultFun
-> BuiltinsRuntime DefaultFun term
forall term.
HasMeaningIn DefaultUni term =>
BuiltinSemanticsVariant DefaultFun
-> BuiltinsRuntime DefaultFun term
defaultBuiltinsRuntimeForSemanticsVariant BuiltinSemanticsVariant DefaultFun
DefaultFunSemanticsVariantC
defaultCekParametersForTesting :: Typeable ann => MachineParameters CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
defaultCekParametersForTesting :: forall ann.
Typeable ann =>
MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
defaultCekParametersForTesting = MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
forall ann.
Typeable ann =>
MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
defaultCekParametersC
defaultCekMachineCostsForTesting :: CekMachineCosts
defaultCekMachineCostsForTesting :: CekMachineCosts
defaultCekMachineCostsForTesting = CekMachineCosts
cekMachineCostsVariantC
defaultBuiltinCostModelForTesting :: BuiltinCostModel
defaultBuiltinCostModelForTesting :: BuiltinCostModel
defaultBuiltinCostModelForTesting = BuiltinCostModel
builtinCostModelVariantC
defaultCostModelParamsForTesting :: Maybe CostModelParams
defaultCostModelParamsForTesting :: Maybe CostModelParams
defaultCostModelParamsForTesting = Maybe CostModelParams
defaultCostModelParamsC
defaultCekCostModelForTesting :: CostModel CekMachineCosts BuiltinCostModel
defaultCekCostModelForTesting :: CostModel CekMachineCosts BuiltinCostModel
defaultCekCostModelForTesting = CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantC
defaultCekCostModelForTestingB :: CostModel CekMachineCosts BuiltinCostModel
defaultCekCostModelForTestingB :: CostModel CekMachineCosts BuiltinCostModel
defaultCekCostModelForTestingB = CostModel CekMachineCosts BuiltinCostModel
cekCostModelVariantB
unitCostOneArgument :: CostingFun ModelOneArgument
unitCostOneArgument :: CostingFun ModelOneArgument
unitCostOneArgument = ModelOneArgument -> ModelOneArgument -> CostingFun ModelOneArgument
forall model. model -> model -> CostingFun model
CostingFun (CostingInteger -> ModelOneArgument
ModelOneArgumentConstantCost CostingInteger
1) (CostingInteger -> ModelOneArgument
ModelOneArgumentConstantCost CostingInteger
0)
unitCostTwoArguments :: CostingFun ModelTwoArguments
unitCostTwoArguments :: CostingFun ModelTwoArguments
unitCostTwoArguments = ModelTwoArguments
-> ModelTwoArguments -> CostingFun ModelTwoArguments
forall model. model -> model -> CostingFun model
CostingFun (CostingInteger -> ModelTwoArguments
ModelTwoArgumentsConstantCost CostingInteger
1) (CostingInteger -> ModelTwoArguments
ModelTwoArgumentsConstantCost CostingInteger
0)
unitCostThreeArguments :: CostingFun ModelThreeArguments
unitCostThreeArguments :: CostingFun ModelThreeArguments
unitCostThreeArguments = ModelThreeArguments
-> ModelThreeArguments -> CostingFun ModelThreeArguments
forall model. model -> model -> CostingFun model
CostingFun (CostingInteger -> ModelThreeArguments
ModelThreeArgumentsConstantCost CostingInteger
1) (CostingInteger -> ModelThreeArguments
ModelThreeArgumentsConstantCost CostingInteger
0)
unitCostSixArguments :: CostingFun ModelSixArguments
unitCostSixArguments :: CostingFun ModelSixArguments
unitCostSixArguments = ModelSixArguments
-> ModelSixArguments -> CostingFun ModelSixArguments
forall model. model -> model -> CostingFun model
CostingFun (CostingInteger -> ModelSixArguments
ModelSixArgumentsConstantCost CostingInteger
1) (CostingInteger -> ModelSixArguments
ModelSixArgumentsConstantCost CostingInteger
0)
unitCostBuiltinCostModel :: BuiltinCostModel
unitCostBuiltinCostModel :: BuiltinCostModel
unitCostBuiltinCostModel = BuiltinCostModelBase
{
paramAddInteger :: CostingFun ModelTwoArguments
paramAddInteger = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramSubtractInteger :: CostingFun ModelTwoArguments
paramSubtractInteger = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramMultiplyInteger :: CostingFun ModelTwoArguments
paramMultiplyInteger = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramDivideInteger :: CostingFun ModelTwoArguments
paramDivideInteger = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramQuotientInteger :: CostingFun ModelTwoArguments
paramQuotientInteger = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramRemainderInteger :: CostingFun ModelTwoArguments
paramRemainderInteger = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramModInteger :: CostingFun ModelTwoArguments
paramModInteger = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramEqualsInteger :: CostingFun ModelTwoArguments
paramEqualsInteger = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramLessThanInteger :: CostingFun ModelTwoArguments
paramLessThanInteger = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramLessThanEqualsInteger :: CostingFun ModelTwoArguments
paramLessThanEqualsInteger = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramAppendByteString :: CostingFun ModelTwoArguments
paramAppendByteString = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramConsByteString :: CostingFun ModelTwoArguments
paramConsByteString = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramSliceByteString :: CostingFun ModelThreeArguments
paramSliceByteString = CostingFun ModelThreeArguments
unitCostThreeArguments
, paramLengthOfByteString :: CostingFun ModelOneArgument
paramLengthOfByteString = CostingFun ModelOneArgument
unitCostOneArgument
, paramIndexByteString :: CostingFun ModelTwoArguments
paramIndexByteString = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramEqualsByteString :: CostingFun ModelTwoArguments
paramEqualsByteString = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramLessThanByteString :: CostingFun ModelTwoArguments
paramLessThanByteString = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramLessThanEqualsByteString :: CostingFun ModelTwoArguments
paramLessThanEqualsByteString = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramSha2_256 :: CostingFun ModelOneArgument
paramSha2_256 = CostingFun ModelOneArgument
unitCostOneArgument
, paramSha3_256 :: CostingFun ModelOneArgument
paramSha3_256 = CostingFun ModelOneArgument
unitCostOneArgument
, paramBlake2b_256 :: CostingFun ModelOneArgument
paramBlake2b_256 = CostingFun ModelOneArgument
unitCostOneArgument
, paramVerifyEd25519Signature :: CostingFun ModelThreeArguments
paramVerifyEd25519Signature = CostingFun ModelThreeArguments
unitCostThreeArguments
, paramVerifyEcdsaSecp256k1Signature :: CostingFun ModelThreeArguments
paramVerifyEcdsaSecp256k1Signature = CostingFun ModelThreeArguments
unitCostThreeArguments
, paramVerifySchnorrSecp256k1Signature :: CostingFun ModelThreeArguments
paramVerifySchnorrSecp256k1Signature = CostingFun ModelThreeArguments
unitCostThreeArguments
, paramAppendString :: CostingFun ModelTwoArguments
paramAppendString = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramEqualsString :: CostingFun ModelTwoArguments
paramEqualsString = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramEncodeUtf8 :: CostingFun ModelOneArgument
paramEncodeUtf8 = CostingFun ModelOneArgument
unitCostOneArgument
, paramDecodeUtf8 :: CostingFun ModelOneArgument
paramDecodeUtf8 = CostingFun ModelOneArgument
unitCostOneArgument
, paramIfThenElse :: CostingFun ModelThreeArguments
paramIfThenElse = CostingFun ModelThreeArguments
unitCostThreeArguments
, paramChooseUnit :: CostingFun ModelTwoArguments
paramChooseUnit = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramTrace :: CostingFun ModelTwoArguments
paramTrace = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramFstPair :: CostingFun ModelOneArgument
paramFstPair = CostingFun ModelOneArgument
unitCostOneArgument
, paramSndPair :: CostingFun ModelOneArgument
paramSndPair = CostingFun ModelOneArgument
unitCostOneArgument
, paramChooseList :: CostingFun ModelThreeArguments
paramChooseList = CostingFun ModelThreeArguments
unitCostThreeArguments
, paramMkCons :: CostingFun ModelTwoArguments
paramMkCons = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramHeadList :: CostingFun ModelOneArgument
paramHeadList = CostingFun ModelOneArgument
unitCostOneArgument
, paramTailList :: CostingFun ModelOneArgument
paramTailList = CostingFun ModelOneArgument
unitCostOneArgument
, paramNullList :: CostingFun ModelOneArgument
paramNullList = CostingFun ModelOneArgument
unitCostOneArgument
, paramChooseData :: CostingFun ModelSixArguments
paramChooseData = CostingFun ModelSixArguments
unitCostSixArguments
, paramConstrData :: CostingFun ModelTwoArguments
paramConstrData = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramMapData :: CostingFun ModelOneArgument
paramMapData = CostingFun ModelOneArgument
unitCostOneArgument
, paramListData :: CostingFun ModelOneArgument
paramListData = CostingFun ModelOneArgument
unitCostOneArgument
, paramIData :: CostingFun ModelOneArgument
paramIData = CostingFun ModelOneArgument
unitCostOneArgument
, paramBData :: CostingFun ModelOneArgument
paramBData = CostingFun ModelOneArgument
unitCostOneArgument
, paramUnConstrData :: CostingFun ModelOneArgument
paramUnConstrData = CostingFun ModelOneArgument
unitCostOneArgument
, paramUnMapData :: CostingFun ModelOneArgument
paramUnMapData = CostingFun ModelOneArgument
unitCostOneArgument
, paramUnListData :: CostingFun ModelOneArgument
paramUnListData = CostingFun ModelOneArgument
unitCostOneArgument
, paramUnIData :: CostingFun ModelOneArgument
paramUnIData = CostingFun ModelOneArgument
unitCostOneArgument
, paramUnBData :: CostingFun ModelOneArgument
paramUnBData = CostingFun ModelOneArgument
unitCostOneArgument
, paramEqualsData :: CostingFun ModelTwoArguments
paramEqualsData = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramMkPairData :: CostingFun ModelTwoArguments
paramMkPairData = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramMkNilData :: CostingFun ModelOneArgument
paramMkNilData = CostingFun ModelOneArgument
unitCostOneArgument
, paramMkNilPairData :: CostingFun ModelOneArgument
paramMkNilPairData = CostingFun ModelOneArgument
unitCostOneArgument
, paramSerialiseData :: CostingFun ModelOneArgument
paramSerialiseData = CostingFun ModelOneArgument
unitCostOneArgument
, paramBls12_381_G1_add :: CostingFun ModelTwoArguments
paramBls12_381_G1_add = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramBls12_381_G1_neg :: CostingFun ModelOneArgument
paramBls12_381_G1_neg = CostingFun ModelOneArgument
unitCostOneArgument
, paramBls12_381_G1_scalarMul :: CostingFun ModelTwoArguments
paramBls12_381_G1_scalarMul = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramBls12_381_G1_equal :: CostingFun ModelTwoArguments
paramBls12_381_G1_equal = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramBls12_381_G1_compress :: CostingFun ModelOneArgument
paramBls12_381_G1_compress = CostingFun ModelOneArgument
unitCostOneArgument
, paramBls12_381_G1_uncompress :: CostingFun ModelOneArgument
paramBls12_381_G1_uncompress = CostingFun ModelOneArgument
unitCostOneArgument
, paramBls12_381_G1_hashToGroup :: CostingFun ModelTwoArguments
paramBls12_381_G1_hashToGroup = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramBls12_381_G2_add :: CostingFun ModelTwoArguments
paramBls12_381_G2_add = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramBls12_381_G2_neg :: CostingFun ModelOneArgument
paramBls12_381_G2_neg = CostingFun ModelOneArgument
unitCostOneArgument
, paramBls12_381_G2_scalarMul :: CostingFun ModelTwoArguments
paramBls12_381_G2_scalarMul = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramBls12_381_G2_equal :: CostingFun ModelTwoArguments
paramBls12_381_G2_equal = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramBls12_381_G2_compress :: CostingFun ModelOneArgument
paramBls12_381_G2_compress = CostingFun ModelOneArgument
unitCostOneArgument
, paramBls12_381_G2_uncompress :: CostingFun ModelOneArgument
paramBls12_381_G2_uncompress = CostingFun ModelOneArgument
unitCostOneArgument
, paramBls12_381_G2_hashToGroup :: CostingFun ModelTwoArguments
paramBls12_381_G2_hashToGroup = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramBls12_381_millerLoop :: CostingFun ModelTwoArguments
paramBls12_381_millerLoop = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramBls12_381_mulMlResult :: CostingFun ModelTwoArguments
paramBls12_381_mulMlResult = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramBls12_381_finalVerify :: CostingFun ModelTwoArguments
paramBls12_381_finalVerify = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramKeccak_256 :: CostingFun ModelOneArgument
paramKeccak_256 = CostingFun ModelOneArgument
unitCostOneArgument
, paramBlake2b_224 :: CostingFun ModelOneArgument
paramBlake2b_224 = CostingFun ModelOneArgument
unitCostOneArgument
, paramIntegerToByteString :: CostingFun ModelThreeArguments
paramIntegerToByteString = CostingFun ModelThreeArguments
unitCostThreeArguments
, paramByteStringToInteger :: CostingFun ModelTwoArguments
paramByteStringToInteger = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramAndByteString :: CostingFun ModelThreeArguments
paramAndByteString = CostingFun ModelThreeArguments
unitCostThreeArguments
, paramOrByteString :: CostingFun ModelThreeArguments
paramOrByteString = CostingFun ModelThreeArguments
unitCostThreeArguments
, paramXorByteString :: CostingFun ModelThreeArguments
paramXorByteString = CostingFun ModelThreeArguments
unitCostThreeArguments
, paramComplementByteString :: CostingFun ModelOneArgument
paramComplementByteString = CostingFun ModelOneArgument
unitCostOneArgument
, paramReadBit :: CostingFun ModelTwoArguments
paramReadBit = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramWriteBits :: CostingFun ModelThreeArguments
paramWriteBits = CostingFun ModelThreeArguments
unitCostThreeArguments
, paramReplicateByte :: CostingFun ModelTwoArguments
paramReplicateByte = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramShiftByteString :: CostingFun ModelTwoArguments
paramShiftByteString = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramRotateByteString :: CostingFun ModelTwoArguments
paramRotateByteString = CostingFun ModelTwoArguments
unitCostTwoArguments
, paramCountSetBits :: CostingFun ModelOneArgument
paramCountSetBits = CostingFun ModelOneArgument
unitCostOneArgument
, paramFindFirstSetBit :: CostingFun ModelOneArgument
paramFindFirstSetBit = CostingFun ModelOneArgument
unitCostOneArgument
, paramRipemd_160 :: CostingFun ModelOneArgument
paramRipemd_160 = CostingFun ModelOneArgument
unitCostOneArgument
, paramExpModInteger :: CostingFun ModelThreeArguments
paramExpModInteger = CostingFun ModelThreeArguments
unitCostThreeArguments
}
unitCekParameters :: Typeable ann => MachineParameters CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
unitCekParameters :: forall ann.
Typeable ann =>
MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
unitCekParameters =
(BuiltinSemanticsVariant DefaultFun
-> CostModel CekMachineCosts BuiltinCostModel
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann))
-> BuiltinSemanticsVariant DefaultFun
-> CostModel CekMachineCosts BuiltinCostModel
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
forall a. a -> a
noinline BuiltinSemanticsVariant DefaultFun
-> CostModel CekMachineCosts BuiltinCostModel
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
forall (uni :: * -> *) fun builtincosts val machinecosts.
(CostingPart uni fun ~ builtincosts, HasMeaningIn uni val,
ToBuiltinMeaning uni fun) =>
BuiltinSemanticsVariant fun
-> CostModel machinecosts builtincosts
-> MachineParameters machinecosts fun val
mkMachineParameters BuiltinSemanticsVariant DefaultFun
forall a. Default a => a
def (CostModel CekMachineCosts BuiltinCostModel
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann))
-> CostModel CekMachineCosts BuiltinCostModel
-> MachineParameters
CekMachineCosts DefaultFun (CekValue DefaultUni DefaultFun ann)
forall a b. (a -> b) -> a -> b
$
CekMachineCosts
-> BuiltinCostModel -> CostModel CekMachineCosts BuiltinCostModel
forall machinecosts builtincosts.
machinecosts -> builtincosts -> CostModel machinecosts builtincosts
CostModel CekMachineCosts
unitCekMachineCosts BuiltinCostModel
unitCostBuiltinCostModel