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

PlutusCore.Evaluation.Machine.BuiltinCostModel

Synopsis

Documentation

data BuiltinCostModelBase f #

The main model which contains all data required to predict the cost of builtin functions. See md for how this is generated. Calibrated for the CEK machine.

Constructors

BuiltinCostModelBase 

Fields

Instances

Instances details
ConstraintsB BuiltinCostModelBase # 
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

Associated Types

type AllB c BuiltinCostModelBase

Methods

baddDicts :: forall (c :: k -> ToJSON (BuiltinCostModelBase CostingFun) #

 
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

Generic (BuiltinCostModelBase f) # 
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

Associated Types

type Rep (BuiltinCostModelBase f) :: Type -> Type #

AllArgumentModels Show f => Show (BuiltinCostModelBase f) # 
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

AllArgumentModels Default f => Default (BuiltinCostModelBase f) # 
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

AllArgumentModels NFData f => NFData (BuiltinCostModelBase f) # 
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

Methods

rnf :: BuiltinCostModelBase f -> () #

AllArgumentModels Eq f => Eq (BuiltinCostModelBase f) # 
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

type AllB (c :: Type -> Constraint) BuiltinCostModelBase # 
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

type AllB (c :: Type -> Constraint) BuiltinCostModelBase = GAll 0 c (GAllRepB BuiltinCostModelBase)
type Rep (BuiltinCostModelBase f) # 
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

type Rep (BuiltinCostModelBase f) = D1 ('MetaData "BuiltinCostModelBase" "PlutusCore.Evaluation.Machine.BuiltinCostModel" "plutus-core-1.60.0.0-inplace" 'False) (C1 ('MetaCons "BuiltinCostModelBase" 'PrefixI 'True) ((((((S1 ('MetaSel ('Just "paramAddInteger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: (S1 ('MetaSel ('Just "paramSubtractInteger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramMultiplyInteger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)))) :*: (S1 ('MetaSel ('Just "paramDivideInteger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: (S1 ('MetaSel ('Just "paramQuotientInteger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramRemainderInteger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments))))) :*: ((S1 ('MetaSel ('Just "paramModInteger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: (S1 ('MetaSel ('Just "paramEqualsInteger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramLessThanInteger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)))) :*: (S1 ('MetaSel ('Just "paramLessThanEqualsInteger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: (S1 ('MetaSel ('Just "paramAppendByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramConsByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)))))) :*: (((S1 ('MetaSel ('Just "paramSliceByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelThreeArguments)) :*: (S1 ('MetaSel ('Just "paramLengthOfByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramIndexByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)))) :*: (S1 ('MetaSel ('Just "paramEqualsByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: (S1 ('MetaSel ('Just "paramLessThanByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramLessThanEqualsByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments))))) :*: ((S1 ('MetaSel ('Just "paramSha2_256") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: (S1 ('MetaSel ('Just "paramSha3_256") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramBlake2b_256") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)))) :*: ((S1 ('MetaSel ('Just "paramVerifyEd25519Signature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelThreeArguments)) :*: S1 ('MetaSel ('Just "paramVerifyEcdsaSecp256k1Signature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelThreeArguments))) :*: (S1 ('MetaSel ('Just "paramVerifySchnorrSecp256k1Signature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelThreeArguments)) :*: S1 ('MetaSel ('Just "paramAppendString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments))))))) :*: ((((S1 ('MetaSel ('Just "paramEqualsString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: (S1 ('MetaSel ('Just "paramEncodeUtf8") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramDecodeUtf8") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)))) :*: (S1 ('MetaSel ('Just "paramIfThenElse") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelThreeArguments)) :*: (S1 ('MetaSel ('Just "paramChooseUnit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramTrace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments))))) :*: ((S1 ('MetaSel ('Just "paramFstPair") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: (S1 ('MetaSel ('Just "paramSndPair") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramChooseList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelThreeArguments)))) :*: (S1 ('MetaSel ('Just "paramMkCons") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: (S1 ('MetaSel ('Just "paramHeadList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramTailList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)))))) :*: (((S1 ('MetaSel ('Just "paramNullList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: (S1 ('MetaSel ('Just "paramChooseData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelSixArguments)) :*: S1 ('MetaSel ('Just "paramConstrData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)))) :*: (S1 ('MetaSel ('Just "paramMapData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: (S1 ('MetaSel ('Just "paramListData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramIData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument))))) :*: ((S1 ('MetaSel ('Just "paramBData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: (S1 ('MetaSel ('Just "paramUnConstrData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramUnMapData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)))) :*: ((S1 ('MetaSel ('Just "paramUnListData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramUnIData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument))) :*: (S1 ('MetaSel ('Just "paramUnBData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramEqualsData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)))))))) :*: (((((S1 ('MetaSel ('Just "paramMkPairData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: (S1 ('MetaSel ('Just "paramMkNilData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramMkNilPairData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)))) :*: (S1 ('MetaSel ('Just "paramSerialiseData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: (S1 ('MetaSel ('Just "paramBls12_381_G1_add") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramBls12_381_G1_neg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument))))) :*: ((S1 ('MetaSel ('Just "paramBls12_381_G1_scalarMul") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: (S1 ('MetaSel ('Just "paramBls12_381_G1_multiScalarMul") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramBls12_381_G1_equal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)))) :*: (S1 ('MetaSel ('Just "paramBls12_381_G1_compress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: (S1 ('MetaSel ('Just "paramBls12_381_G1_uncompress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramBls12_381_G1_hashToGroup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)))))) :*: (((S1 ('MetaSel ('Just "paramBls12_381_G2_add") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: (S1 ('MetaSel ('Just "paramBls12_381_G2_neg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramBls12_381_G2_scalarMul") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)))) :*: (S1 ('MetaSel ('Just "paramBls12_381_G2_equal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: (S1 ('MetaSel ('Just "paramBls12_381_G2_multiScalarMul") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramBls12_381_G2_compress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument))))) :*: ((S1 ('MetaSel ('Just "paramBls12_381_G2_uncompress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: (S1 ('MetaSel ('Just "paramBls12_381_G2_hashToGroup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramBls12_381_millerLoop") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)))) :*: ((S1 ('MetaSel ('Just "paramBls12_381_mulMlResult") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramBls12_381_finalVerify") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments))) :*: (S1 ('MetaSel ('Just "paramKeccak_256") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramBlake2b_224") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument))))))) :*: ((((S1 ('MetaSel ('Just "paramIntegerToByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelThreeArguments)) :*: (S1 ('MetaSel ('Just "paramByteStringToInteger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramAndByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelThreeArguments)))) :*: (S1 ('MetaSel ('Just "paramOrByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelThreeArguments)) :*: (S1 ('MetaSel ('Just "paramXorByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelThreeArguments)) :*: S1 ('MetaSel ('Just "paramComplementByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument))))) :*: ((S1 ('MetaSel ('Just "paramReadBit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: (S1 ('MetaSel ('Just "paramWriteBits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelThreeArguments)) :*: S1 ('MetaSel ('Just "paramReplicateByte") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)))) :*: ((S1 ('MetaSel ('Just "paramShiftByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramRotateByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments))) :*: (S1 ('MetaSel ('Just "paramCountSetBits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramFindFirstSetBit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)))))) :*: (((S1 ('MetaSel ('Just "paramRipemd_160") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: (S1 ('MetaSel ('Just "paramExpModInteger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelThreeArguments)) :*: S1 ('MetaSel ('Just "paramDropList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)))) :*: (S1 ('MetaSel ('Just "paramLengthOfArray") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: (S1 ('MetaSel ('Just "paramListToArray") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramIndexArray") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments))))) :*: ((S1 ('MetaSel ('Just "paramLookupCoin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelThreeArguments)) :*: (S1 ('MetaSel ('Just "paramValueContains") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramValueData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)))) :*: ((S1 ('MetaSel ('Just "paramUnValueData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelOneArgument)) :*: S1 ('MetaSel ('Just "paramInsertCoin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelFourArguments))) :*: (S1 ('MetaSel ('Just "paramUnionValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments)) :*: S1 ('MetaSel ('Just "paramScaleValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (f ModelTwoArguments))))))))))

data CostingFun model #

A type of costing functions parametric over a model type. In practice the we have one model type `ModelNArguments` for every N, where N is the arity of the builtin whose costs we want to model. Each model type has a number of constructors defining different "shapes" of N-parameter functions which calculate a cost given the sizes of the builtin's arguments.

Constructors

CostingFun 

Fields

Instances

Instances details
ToJSON (CostingFun model) # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.JSON

Methods

toJSON :: CostingFun model -> Value

toEncoding :: CostingFun model -> Encoding

toJSONList :: [CostingFun model] -> Value

toEncodingList :: [CostingFun model] -> Encoding

omitField :: CostingFun model -> Bool

Generic (CostingFun model) # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Associated Types

type Rep (CostingFun model) :: Type -> Type #

Methods

from :: CostingFun model -> Rep (CostingFun model) x #

to :: Rep (CostingFun model) x -> CostingFun model #

Show model => Show (CostingFun model) # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

showsPrec :: Int -> CostingFun model -> ShowS #

show :: CostingFun model -> String #

showList :: [CostingFun model] -> ShowS #

Default model => Default (CostingFun model) # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

def :: CostingFun model #

NFData model => NFData (CostingFun model) # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

rnf :: CostingFun model -> () #

Eq model => Eq (CostingFun model) # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

(==) :: CostingFun model -> CostingFun model -> Bool #

(/=) :: CostingFun model -> CostingFun model -> Bool #

type Rep (CostingFun model) # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

type Rep (CostingFun model) = D1 ('MetaData "CostingFun" "PlutusCore.Evaluation.Machine.CostingFun.Core" "plutus-core-1.60.0.0-inplace" 'False) (C1 ('MetaCons "CostingFun" 'PrefixI 'True) (S1 ('MetaSel ('Just "costingFunCpu") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 model) :*: S1 ('MetaSel ('Just "costingFunMemory") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 model)))

class UnimplementedCostingFun a where #

In the initial stages of implementing a new builtin it is necessary to provide a temporary costing function which is used until the builtin has been properly costed: `see CostModelGeneration.md`. Each `ModelNArguments` type defines an instance of this class where unimplementedCostingFun is a constant costing function which returns a very high cost for all inputs. This prevents new functions from being used in situations where costs are important until a sensible costing function has been implemented.

newtype Intercept #

A wrapped CostingInteger that is supposed to be used as an intercept.

Constructors

Intercept 

Instances

Instances details
ToJSON Slope # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.JSON

Methods

toJSON :: Slope -> Value

toEncoding :: Slope -> Encoding

toJSONList :: [Slope] -> Value

toEncodingList :: [Slope] -> Encoding

omitField :: Slope -> Bool

Generic Slope # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Associated Types

type Rep Slope :: Type -> Type #

Methods

from :: Slope -> Rep Slope x #

to :: Rep Slope x -> Slope #

Num Slope # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Show Slope # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

showsPrec :: Int -> Slope -> ShowS #

show :: Slope -> String #

showList :: [Slope] -> ShowS #

NFData Slope # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

rnf :: Slope -> () #

Eq Slope # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

(==) :: Slope -> Slope -> Bool #

(/=) :: Slope -> Slope -> Bool #

Lift Slope # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

lift :: Quote m => Slope -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Slope -> Code m Slope #

type Rep Slope # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

type Rep Slope = D1 ('MetaData "Slope" "PlutusCore.Evaluation.Machine.CostingFun.Core" "plutus-core-1.60.0.0-inplace" 'True) (C1 ('MetaCons "Slope" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSlope") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostingInteger)))

newtype Coefficient0 #

A wrapped CostingInteger that is supposed to be used as the degree 0 coefficient of a polynomial.

Instances

Instances details
ToJSON Coefficient0 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.JSON

Methods

toJSON :: Coefficient0 -> Value

toEncoding :: Coefficient0 -> Encoding

toJSONList :: [Coefficient0] -> Value

toEncodingList :: [Coefficient0] -> Encoding

omitField :: Coefficient0 -> Bool

Generic Coefficient0 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Associated Types

type Rep Coefficient0 :: Type -> Type #

Num Coefficient0 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Show Coefficient0 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

NFData Coefficient0 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

rnf :: Coefficient0 -> () #

Eq Coefficient0 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Lift Coefficient0 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

lift :: Quote m => Coefficient0 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Coefficient0 -> Code m Coefficient0 #

type Rep Coefficient0 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

type Rep Coefficient0 = D1 ('MetaData "Coefficient0" "PlutusCore.Evaluation.Machine.CostingFun.Core" "plutus-core-1.60.0.0-inplace" 'True) (C1 ('MetaCons "Coefficient0" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCoefficient0") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostingInteger)))

newtype Coefficient1 #

A wrapped CostingInteger that is supposed to be used as the degree 1 coefficient of a polynomial.

Instances

Instances details
ToJSON Coefficient1 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.JSON

Methods

toJSON :: Coefficient1 -> Value

toEncoding :: Coefficient1 -> Encoding

toJSONList :: [Coefficient1] -> Value

toEncodingList :: [Coefficient1] -> Encoding

omitField :: Coefficient1 -> Bool

Generic Coefficient1 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Associated Types

type Rep Coefficient1 :: Type -> Type #

Num Coefficient1 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Show Coefficient1 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

NFData Coefficient1 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

rnf :: Coefficient1 -> () #

Eq Coefficient1 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Lift Coefficient1 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

lift :: Quote m => Coefficient1 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Coefficient1 -> Code m Coefficient1 #

type Rep Coefficient1 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

type Rep Coefficient1 = D1 ('MetaData "Coefficient1" "PlutusCore.Evaluation.Machine.CostingFun.Core" "plutus-core-1.60.0.0-inplace" 'True) (C1 ('MetaCons "Coefficient1" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCoefficient1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostingInteger)))

newtype Coefficient2 #

A wrapped CostingInteger that is supposed to be used as the degree 2 coefficient of a polynomial.

Instances

Instances details
ToJSON Coefficient2 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.JSON

Methods

toJSON :: Coefficient2 -> Value

toEncoding :: Coefficient2 -> Encoding

toJSONList :: [Coefficient2] -> Value

toEncodingList :: [Coefficient2] -> Encoding

omitField :: Coefficient2 -> Bool

Generic Coefficient2 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Associated Types

type Rep Coefficient2 :: Type -> Type #

Num Coefficient2 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Show Coefficient2 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

NFData Coefficient2 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

rnf :: Coefficient2 -> () #

Eq Coefficient2 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Lift Coefficient2 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

lift :: Quote m => Coefficient2 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Coefficient2 -> Code m Coefficient2 #

type Rep Coefficient2 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

type Rep Coefficient2 = D1 ('MetaData "Coefficient2" "PlutusCore.Evaluation.Machine.CostingFun.Core" "plutus-core-1.60.0.0-inplace" 'True) (C1 ('MetaCons "Coefficient2" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCoefficient2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostingInteger)))

newtype Coefficient00 #

A wrapped CostingInteger that is supposed to be used as the degree (0,0) coefficient of a two-variable polynomial.

Instances

Instances details
ToJSON Coefficient00 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.JSON

Generic Coefficient00 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Associated Types

type Rep Coefficient00 :: Type -> Type #

Num Coefficient00 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Show Coefficient00 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

NFData Coefficient00 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

rnf :: Coefficient00 -> () #

Eq Coefficient00 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Lift Coefficient00 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

lift :: Quote m => Coefficient00 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Coefficient00 -> Code m Coefficient00 #

type Rep Coefficient00 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

type Rep Coefficient00 = D1 ('MetaData "Coefficient00" "PlutusCore.Evaluation.Machine.CostingFun.Core" "plutus-core-1.60.0.0-inplace" 'True) (C1 ('MetaCons "Coefficient00" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCoefficient00") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostingInteger)))

newtype Coefficient10 #

A wrapped CostingInteger that is supposed to be used as the degree (1,0) coefficient of a two-variable polynomial.

Instances

Instances details
ToJSON Coefficient10 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.JSON

Generic Coefficient10 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Associated Types

type Rep Coefficient10 :: Type -> Type #

Num Coefficient10 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Show Coefficient10 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

NFData Coefficient10 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

rnf :: Coefficient10 -> () #

Eq Coefficient10 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Lift Coefficient10 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

lift :: Quote m => Coefficient10 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Coefficient10 -> Code m Coefficient10 #

type Rep Coefficient10 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

type Rep Coefficient10 = D1 ('MetaData "Coefficient10" "PlutusCore.Evaluation.Machine.CostingFun.Core" "plutus-core-1.60.0.0-inplace" 'True) (C1 ('MetaCons "Coefficient10" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCoefficient10") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostingInteger)))

newtype Coefficient01 #

A wrapped CostingInteger that is supposed to be used as the degree (0,1) coefficient of a two-variable polynomial.

Instances

Instances details
ToJSON Coefficient01 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.JSON

Generic Coefficient01 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Associated Types

type Rep Coefficient01 :: Type -> Type #

Num Coefficient01 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Show Coefficient01 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

NFData Coefficient01 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

rnf :: Coefficient01 -> () #

Eq Coefficient01 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Lift Coefficient01 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

lift :: Quote m => Coefficient01 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Coefficient01 -> Code m Coefficient01 #

type Rep Coefficient01 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

type Rep Coefficient01 = D1 ('MetaData "Coefficient01" "PlutusCore.Evaluation.Machine.CostingFun.Core" "plutus-core-1.60.0.0-inplace" 'True) (C1 ('MetaCons "Coefficient01" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCoefficient01") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostingInteger)))

newtype Coefficient20 #

A wrapped CostingInteger that is supposed to be used as the degree (2,0) coefficient of a two-variable polynomial.

Instances

Instances details
ToJSON Coefficient20 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.JSON

Generic Coefficient20 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Associated Types

type Rep Coefficient20 :: Type -> Type #

Num Coefficient20 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Show Coefficient20 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

NFData Coefficient20 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

rnf :: Coefficient20 -> () #

Eq Coefficient20 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Lift Coefficient20 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

lift :: Quote m => Coefficient20 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Coefficient20 -> Code m Coefficient20 #

type Rep Coefficient20 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

type Rep Coefficient20 = D1 ('MetaData "Coefficient20" "PlutusCore.Evaluation.Machine.CostingFun.Core" "plutus-core-1.60.0.0-inplace" 'True) (C1 ('MetaCons "Coefficient20" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCoefficient20") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostingInteger)))

newtype Coefficient11 #

A wrapped CostingInteger that is supposed to be used as the degree (1,1) coefficient of a two-variable polynomial.

Instances

Instances details
ToJSON Coefficient11 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.JSON

Generic Coefficient11 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Associated Types

type Rep Coefficient11 :: Type -> Type #

Num Coefficient11 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Show Coefficient11 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

NFData Coefficient11 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

rnf :: Coefficient11 -> () #

Eq Coefficient11 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Lift Coefficient11 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

lift :: Quote m => Coefficient11 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Coefficient11 -> Code m Coefficient11 #

type Rep Coefficient11 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

type Rep Coefficient11 = D1 ('MetaData "Coefficient11" "PlutusCore.Evaluation.Machine.CostingFun.Core" "plutus-core-1.60.0.0-inplace" 'True) (C1 ('MetaCons "Coefficient11" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCoefficient11") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostingInteger)))

newtype Coefficient02 #

A wrapped CostingInteger that is supposed to be used as the degree (0,2) coefficient of a two-variable polynomial.

Instances

Instances details
ToJSON Coefficient02 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.JSON

Generic Coefficient02 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Associated Types

type Rep Coefficient02 :: Type -> Type #

Num Coefficient02 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Show Coefficient02 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

NFData Coefficient02 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

rnf :: Coefficient02 -> () #

Eq Coefficient02 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Lift Coefficient02 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Methods

lift :: Quote m => Coefficient02 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Coefficient02 -> Code m Coefficient02 #

type Rep Coefficient02 # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

type Rep Coefficient02 = D1 ('MetaData "Coefficient02" "PlutusCore.Evaluation.Machine.CostingFun.Core" "plutus-core-1.60.0.0-inplace" 'True) (C1 ('MetaCons "Coefficient02" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCoefficient02") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostingInteger)))

newtype Coefficient12 #

A wrapped CostingInteger that is supposed to be used as the degree (1,2) coefficient of a two-variable polynomial.

Instances

Instances details
ToJSON TwoVariableWithInteractionFunction # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.JSON

Generic TwoVariableWithInteractionFunction # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Associated Types

type Rep TwoVariableWithInteractionFunction :: Type -> Type #

Show TwoVariableWithInteractionFunction # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

NFData TwoVariableWithInteractionFunction # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Eq TwoVariableWithInteractionFunction # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

Lift TwoVariableWithInteractionFunction # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

type Rep TwoVariableWithInteractionFunction # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostingFun.Core

type Rep TwoVariableWithInteractionFunction = D1 ('MetaData "TwoVariableWithInteractionFunction" "PlutusCore.Evaluation.Machine.CostingFun.Core" "plutus-core-1.60.0.0-inplace" 'False) (C1 ('MetaCons "TwoVariableWithInteractionFunction" 'PrefixI 'True) ((S1 ('MetaSel ('Just "twoVariableWithInteractionFunctionC00") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Coefficient00) :*: S1 ('MetaSel ('Just "twoVariableWithInteractionFunctionC10") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Coefficient10)) :*: (S1 ('MetaSel ('Just "twoVariableWithInteractionFunctionC01") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Coefficient01) :*: S1 ('MetaSel ('Just "twoVariableWithInteractionFunctionC11") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Coefficient11))))

data ExpModCostingFunction #

c00 + c01x*y + c12x*y^2 This is used only for expModInteger, whose costing is quite complex.

Instances

Instances details
hashWithSalt.

Hashable is intended exclusively for use in in-memory data structures. . Hashable does not have a fixed standard. This allows it to improve over time. . Because it does not have a fixed standard, different computers or computers on different versions of the code will observe different hash values. As such, Hashable is not recommended for use other than in-memory datastructures. Specifically, Hashable is not intended for network use or in applications which persist hashed values. For stable hashing use named hashes: sha256, crc32, xxhash etc.

If you are looking for Hashable instance in time package, check time-compat

Instances

Instances details
Hashable Key 
Instance details

Defined in Data.Aeson.Key

Methods

hashWithSalt :: Text -> Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5, a6, a7) -> Int #

hash :: (a1, a2, a3, a4, a5, a6, a7) -> Int #

newtype MCostingFun a #

Same as CostingFun but maybe missing. We could use 'Compose Maybe CostinFun' instead but we would then need an orphan ToJSON instance.