scalus.uplc.eval

Members list

Type members

Classlikes

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class BuiltinCostModel(addInteger: CostingFun[TwoArguments], subtractInteger: CostingFun[TwoArguments], multiplyInteger: CostingFun[TwoArguments], divideInteger: CostingFun[TwoArguments], quotientInteger: CostingFun[TwoArguments], remainderInteger: CostingFun[TwoArguments], modInteger: CostingFun[TwoArguments], equalsInteger: CostingFun[TwoArguments], lessThanInteger: CostingFun[TwoArguments], lessThanEqualsInteger: CostingFun[TwoArguments], appendByteString: CostingFun[TwoArguments], consByteString: CostingFun[TwoArguments], sliceByteString: CostingFun[ThreeArguments], lengthOfByteString: CostingFun[OneArgument], indexByteString: CostingFun[TwoArguments], equalsByteString: CostingFun[TwoArguments], lessThanByteString: CostingFun[TwoArguments], lessThanEqualsByteString: CostingFun[TwoArguments], sha2_256: CostingFun[OneArgument], sha3_256: CostingFun[OneArgument], blake2b_256: CostingFun[OneArgument], verifyEd25519Signature: CostingFun[ThreeArguments], verifyEcdsaSecp256k1Signature: CostingFun[ThreeArguments], verifySchnorrSecp256k1Signature: CostingFun[ThreeArguments], appendString: CostingFun[TwoArguments], equalsString: CostingFun[TwoArguments], encodeUtf8: CostingFun[OneArgument], decodeUtf8: CostingFun[OneArgument], ifThenElse: CostingFun[ThreeArguments], chooseUnit: CostingFun[TwoArguments], trace: CostingFun[TwoArguments], fstPair: CostingFun[OneArgument], sndPair: CostingFun[OneArgument], chooseList: CostingFun[ThreeArguments], mkCons: CostingFun[TwoArguments], headList: CostingFun[OneArgument], tailList: CostingFun[OneArgument], nullList: CostingFun[OneArgument], chooseData: CostingFun[SixArguments], constrData: CostingFun[TwoArguments], mapData: CostingFun[OneArgument], listData: CostingFun[OneArgument], iData: CostingFun[OneArgument], bData: CostingFun[OneArgument], unConstrData: CostingFun[OneArgument], unMapData: CostingFun[OneArgument], unListData: CostingFun[OneArgument], unIData: CostingFun[OneArgument], unBData: CostingFun[OneArgument], equalsData: CostingFun[TwoArguments], mkPairData: CostingFun[TwoArguments], mkNilData: CostingFun[OneArgument], mkNilPairData: CostingFun[OneArgument], serialiseData: CostingFun[OneArgument])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
class BuiltinError(builtin: DefaultFun, term: Term, cause: Throwable, env: CekValEnv) extends StackTraceMachineError

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
class BuiltinException(msg: String) extends MachineError

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
class CekMachine(val params: MachineParams, budgetSpender: BudgetSpender, logger: Logger, platformSpecific: PlatformSpecific) extends BuiltinsMeaning

CEK machine implementation based on Cardano Plutus CEK machine.

CEK machine implementation based on Cardano Plutus CEK machine.

The CEK machine is a stack-based abstract machine that is used to evaluate UPLC terms.

Value parameters

budgetSpender

The budget spender implementation

logger

The logger implementation

params

The machine parameters MachineParams

platformSpecific

The platform specific implementation of certain functions used by builtins

Attributes

See also
Note

The machine is stateless and can be reused for multiple evaluations. All the state is expected to be in the budgetSpender and logger implementations.

Example
 val term = LamAbs("x", Apply(Var(NamedDeBruijn("x", 0)), Var(NamedDeBruijn("x", 0))))
 val cek = new CekMachine(MachineParams.defaultParams, NoBudgetSpender, NoLogger, JVMPlatformSpecific)
 val res = cek.runCek(term)
Supertypes
class Object
trait Matchable
class Any
case class CekMachineCosts(startupCost: ExBudget, varCost: ExBudget, constCost: ExBudget, lamCost: ExBudget, delayCost: ExBudget, forceCost: ExBudget, applyCost: ExBudget, builtinCost: ExBudget, constrCost: ExBudget, caseCost: ExBudget)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
class CekResult(t: Term, val budget: ExBudget, val logs: Array[String])

Attributes

Supertypes
class Object
trait Matchable
class Any
enum CekValue

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ConstantOrTwoArguments(constant: CostingInteger, model: TwoArguments)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait CostModel

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class CostingFun[+M <: CostModel](cpu: M, memory: M)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final class CountingBudgetSpender extends BudgetSpender

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class ExBudget(cpu: ExCPU, memory: ExMemory)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ExBudget

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
ExBudget.type

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ExCPU

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
ExCPU.type
object ExMemory

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
ExMemory.type
class KnownTypeUnliftingError(expected: DefaultUni, actual: CekValue) extends BuiltinException

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
class Log extends Logger

Attributes

Supertypes
trait Logger
class Object
trait Matchable
class Any
trait Logger

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Log
object NoLogger
class MachineError(msg: String) extends RuntimeException

Attributes

Supertypes
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
case class MachineParams(machineCosts: CekMachineCosts, builtinCostModel: BuiltinCostModel)

The Plutus CEK machine parameters.

The Plutus CEK machine parameters.

Value parameters

builtinCostModel

The builtin cost model

machineCosts

The machine costs

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object MachineParams

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
trait MemoryUsage[A]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object MemoryUsage

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
class MissingCaseBranch(val tag: Long, env: CekValEnv) extends StackTraceMachineError

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class ModelConstantOrLinear(constant: CostingInteger, intercept: Intercept, slope: Slope)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object NoLogger extends Logger

Attributes

Supertypes
trait Logger
class Object
trait Matchable
class Any
Self type
NoLogger.type

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
trait OneArgument extends CostModel

Attributes

Companion
object
Supertypes
trait CostModel
class Object
trait Matchable
class Any
Known subtypes
class ConstantCost
class LinearCost
object OneArgument

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
case class OneVariableLinearFunction(intercept: Intercept, slope: Slope)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
class PlutusVM(platformSpecific: PlatformSpecific)

Plutus VM facade.

Plutus VM facade.

Value parameters

platformSpecific

The platform specific implementation of certain functions used by VM builtins

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object VM
final class RestrictingBudgetSpender(val maxBudget: ExBudget) extends BudgetSpender

Attributes

Supertypes
class Object
trait Matchable
class Any
trait SixArguments extends CostModel

Attributes

Companion
object
Supertypes
trait CostModel
class Object
trait Matchable
class Any
Known subtypes
class ConstantCost
object SixArguments

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
class StackTraceMachineError(msg: String, val env: CekValEnv) extends MachineError

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
enum StepKind

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class SubtractedSizesLinearFunction(intercept: Intercept, slope: Slope, minimum: CostingInteger)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final class TallyingBudgetSpender(val budgetSpender: BudgetSpender) extends BudgetSpender

Attributes

Supertypes
class Object
trait Matchable
class Any
trait ThreeArguments extends CostModel

Attributes

Companion
object
Supertypes
trait CostModel
class Object
trait Matchable
class Any
Known subtypes
class AddedSizes
class ConstantCost
class LinearInX
class LinearInY
class LinearInZ

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait TwoArguments extends CostModel

Attributes

Companion
object
Supertypes
trait CostModel
class Object
trait Matchable
class Any
Known subtypes
object TwoArguments

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
case class TwoVariableLinearFunction(intercept: Intercept, slopeX: Slope, slopeY: Slope)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class MachineError
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
object VM extends PlutusVM

Attributes

Supertypes
class PlutusVM
class Object
trait Matchable
class Any
Self type
VM.type

Deprecated classlikes

object Cek

Attributes

Deprecated
true
Supertypes
class Object
trait Matchable
class Any
Self type
Cek.type

Types

type ArgStack = Seq[CekValue]
type CekValEnv = Seq[(String, CekValue)]
type CostingInteger = Long
opaque type ExCPU
opaque type ExMemory