Object/Class

sigmastate.interpreter

ErgoTreeEvaluator

Related Docs: class ErgoTreeEvaluator | package interpreter

Permalink

object ErgoTreeEvaluator

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ErgoTreeEvaluator
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type DataEnv = Map[Int, Any]

    Permalink

    Immutable data environment used to assign data values to graph nodes.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val DataBlockSize: Int

    Permalink

    Size of data block in bytes.

    Size of data block in bytes. Used in JIT cost calculations.

    See also

    sigmastate.NEQ,

  5. val DefaultEvalSettings: EvalSettings

    Permalink

    Default global EvalSettings instance.

  6. val DefaultProfiler: Profiler

    Permalink

    A profiler which is used by default if EvalSettings.isMeasureOperationTime is enabled.

  7. val EmptyDataEnv: DataEnv

    Permalink

    Empty data environment.

  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def error(msg: String): Nothing

    Permalink
  13. def eval(sigmaContext: Context, costAccumulator: CostAccumulator, constants: Seq[Constant[SType]], exp: SValue, evalSettings: EvalSettings): (Any, Int)

    Permalink

    Evaluate the given expression in the given Ergo context using the given settings.

    Evaluate the given expression in the given Ergo context using the given settings. The given Value is evaluated as-is and is not changed during evaluation.

    sigmaContext

    special.sigma.Context instance used for script execution

    costAccumulator

    CostAccumulator instance used for accumulating costs

    constants

    collection of segregated constants which can be refered by ConstantPlaceholders in exp

    exp

    ErgoTree expression represented as sigmastate.Values.Value

    evalSettings

    evaluation settings

    returns

    1) the result of evaluating exp in a given context and 2) an accumulated JIT cost estimation.

  14. def eval(context: ErgoLikeContext, constants: Seq[Constant[SType]], exp: SValue, evalSettings: EvalSettings): (Any, Int)

    Permalink

    Evaluate the given expression in the given Ergo context using the given settings.

    Evaluate the given expression in the given Ergo context using the given settings. The given Value is evaluated as-is and is not changed during evaluation.

    context

    ErgoLikeContext used for script execution

    constants

    collection of segregated constants which can be refered by ConstantPlaceholders in exp

    exp

    ErgoTree expression represented as Value

    evalSettings

    evaluation settings

    returns

    1) the result of evaluating exp in a given context and 2) an accumulated JIT cost estimation.

  15. def evalToCrypto(context: ErgoLikeContext, ergoTree: ErgoTree, evalSettings: EvalSettings): JitReductionResult

    Permalink

    Evaluate the given ErgoTree in the given Ergo context using the given settings.

    Evaluate the given ErgoTree in the given Ergo context using the given settings. The given ErgoTree is evaluated as-is and is not changed during evaluation.

    context

    ErgoLikeContext used for script execution

    ergoTree

    script represented as ErgoTree

    evalSettings

    evaluation settings

    returns

    a sigma protocol proposition (as SigmaBoolean) and accumulated JIT cost estimation.

  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def fixedCostOp[R <: AnyRef](costInfo: OperationCostInfo[FixedCost])(block: ⇒ R)(implicit E: ErgoTreeEvaluator): R

    Permalink

    Executes FixedCost code block and use the given evaluator E to perform profiling and cost tracing.

    Executes FixedCost code block and use the given evaluator E to perform profiling and cost tracing. This helper method allows implementation of cost-aware code blocks by using thread-local instance of ErgoTreeEvaluator. If the currentEvaluator DynamicVariable is not initialized (equals to null), then the block is executed with minimal overhead.

    costInfo

    operation descriptor

    block

    block of code to be executed (given as lazy by-name argument)

    E

    evaluator to be used (or null if it is not available on the current thread), in which case the method is equal to the block execution.

    returns

    result of code block execution HOTSPOT: don't beautify the code Note, null is used instead of Option to avoid allocations.

  18. def forProfiling(profiler: Profiler, evalSettings: EvalSettings): ErgoTreeEvaluator

    Permalink

    Creates a new ErgoTreeEvaluator instance with the given profiler and settings.

    Creates a new ErgoTreeEvaluator instance with the given profiler and settings. The returned evaluator can be used to initialize the currentEvaluator variable. As a result, cost-aware operations (code blocks) can be implemented, even when those operations don't involve ErgoTree evaluation. As an example, see methods in sigmastate.SigSerializer and sigmastate.FiatShamirTree where cost-aware code blocks are used.

  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. def getCurrentEvaluator: ErgoTreeEvaluator

    Permalink

    Returns a current evaluator for the current thread.

  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def perItemCostOp[R](costInfo: OperationCostInfo[PerItemCost], nItems: Int)(block: () ⇒ R)(implicit E: ErgoTreeEvaluator): R

    Permalink

    Executes PerItemCost code block and use the given evaluator E to perform profiling and cost tracing.

    Executes PerItemCost code block and use the given evaluator E to perform profiling and cost tracing. This helper method allows implementation of cost-aware code blocks by using thread-local instance of ErgoTreeEvaluator. If the currentEvaluator DynamicVariable is not initialized (equals to null), then the block is executed with minimal overhead.

    costInfo

    operation descriptor

    nItems

    number of data items in the operation

    block

    block of code to be executed (given as lazy by-name argument)

    E

    evaluator to be used (or null if it is not available on the current thread), in which case the method is equal to the block execution.

    returns

    result of code block execution HOTSPOT: don't beautify the code Note, null is used instead of Option to avoid allocations.

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped