Add the cost given by the descriptor to the accumulator and associate it with this operation node.
Add the cost given by the descriptor to the accumulator and associate it with this operation node.
Add the cost given by the kind to the accumulator and associate it with this operation node.
Add the cost given by the kind to the accumulator and associate it with this operation node.
Add the cost of a repeated operation to the accumulator and associate it with this operation.
Add the cost of a repeated operation to the accumulator and associate it with this operation. The number of items (loop iterations) is known in advance (like in Coll.map operation)
result type of the operation
cost descriptor of the operation
number of operations known in advance (before loop execution)
operation executed under the given cost
Add the cost of a repeated operation to the accumulator and associate it with this operation.
Add the cost of a repeated operation to the accumulator and associate it with this operation. The number of items (loop iterations) is known in advance (like in Coll.map operation)
cost descriptor of the operation
number of operations known in advance (before loop execution)
The companion node descriptor with opCode, cost and other metadata.
The companion node descriptor with opCode, cost and other metadata.
Defines an evaluation semantics of this tree node (aka Value or expression) in the given data environment.
Defines an evaluation semantics of this tree node (aka Value or expression) in the given data environment.
Should be implemented by all the ErgoTree nodes (aka operations).
Thus, the ErgoTree interpreter implementation consists of combined implementations of this method.
NOTE, this method shouldn't be called directly, instead use evalTo
method.
immutable map, which binds variables (given by ids) to the values
Evaluator which defines evaluation context, cost accumulator, settings etc.
the data value which is the result of evaluation
Evaluates this node to the value of the given expected type.
Evaluates this node to the value of the given expected type.
This method should called from all eval
implementations.
expected type of the resulting value
immutable map, which binds variables (given by ids) to the values
Evaluator which defines evaluation context, cost accumulator, settings etc.
the data value which is the result of evaluation
Unique id of the node class used in serialization of ErgoTree.
Unique id of the node class used in serialization of ErgoTree.
Every value represents an operation and that operation can be associated with a function type, describing functional meaning of the operation, kind of operation signature.
Every value represents an operation and that operation can be associated with a function type, describing functional meaning of the operation, kind of operation signature. Thus we can obtain global operation identifiers by combining Value.opName with Value.opType, so that if (v1.opName == v2.opName) && (v1.opType == v2.opType) then v1 and v2 are functionally point-wise equivalent. This in particular means that if two _different_ ops have the same opType they _should_ have different opNames. Thus defined op ids are used in a Cost Model - a table of all existing primitives coupled with performance parameters.
The type of the value represented by this node.
The type of the value represented by this node. If the value is an operation it is the type of operation result.
Frontend node to represent potential method call in a source code. Should be resolved during compilation to MethodCall. Cannot be serialized to ErgoTree.