CekMachine
scalus.uplc.eval.CekMachine
class CekMachine(val params: MachineParams, budgetSpender: BudgetSpender, logger: Logger, builtinsMeaning: BuiltinsMeaning)
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
andlogger
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.evaluateTerm(term)
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article