trait SigmaDslModule extends Scalan with SigmaDslDefs
- Alphabetic
- By Inheritance
- SigmaDslModule
- SigmaDslDefs
- SigmaDsl
- Scalan
- DefRewriting
- Modules
- Entities
- Thunks
- IfThenElse
- Functions
- ProgramGraphs
- AstGraphs
- Transforming
- UniversalOps
- Equal
- OrderingOps
- LogicalOps
- UnBinOps
- NumericOps
- Tuples
- MethodCalls
- TypeDescs
- Base
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- abstract class BaseDef[+T] extends Scalan.Node with Scalan.Def[T]
Base class for most predefined operations.
Base class for most predefined operations.
- Definition Classes
- Base
- abstract class CompanionDef[T] extends Scalan.Node with Scalan.Def[T]
Base class for virtualized instances of type companions.
Base class for virtualized instances of type companions. Each virtualized entity type (trait or class) may have virtualized companion class.
- Definition Classes
- Base
- case class Const[T](x: T)(implicit eT: Scalan.Elem[T]) extends Scalan.BaseDef[T] with Product with Serializable
Default node type for embedding of literal values to graph IR.
Default node type for embedding of literal values to graph IR. This can be used or those types
T
whenElem[T]
is defined, butLiftable[_,T]
is not, i.e. for non-liftable types.- x
literal value
- eT
type descriptor of IR type T
- Definition Classes
- Base
- trait Def[+T] extends Scalan.Node
Base type for all graph nodes (aka computable value definitions).
Base type for all graph nodes (aka computable value definitions). Each graph node or definition represent one operation node of the data flow graph.
- Definition Classes
- Base
- class EntityObject extends AnyRef
Base class for all objects generated for virtualized types to support staged evaluation machinery.
Base class for all objects generated for virtualized types to support staged evaluation machinery. Each object contains definitions which can be imported when necessary. All that objects are registered in
entityObjects
hash map, which is done while IR cake is constructed.- Definition Classes
- Base
- case class EntityObjectOwner(obj: Scalan.EntityObject) extends Scalan.OwnerKind with Product with Serializable
- Definition Classes
- Base
- abstract class Node extends Product
Base class for all IR nodes/operations/definitions.
Base class for all IR nodes/operations/definitions.
- Definition Classes
- Base
- class NotImplementedStagingException extends Scalan.StagingException
- Definition Classes
- Base
- sealed abstract class OwnerKind extends AnyRef
Variants of
owner
parameter of constructors of nested classes: 1) predefined node classes are owned by IR cake (ScalanOwner) 2) entity classes are owned by enclosing EntityObjectVariants of
owner
parameter of constructors of nested classes: 1) predefined node classes are owned by IR cake (ScalanOwner) 2) entity classes are owned by enclosing EntityObject- Definition Classes
- Base
- case class Placeholder[T](eT: Scalan.LElem[T]) extends Scalan.Node with Scalan.Def[T] with Product with Serializable
Symbols may temporary refer to this node until their target node is updated.
Symbols may temporary refer to this node until their target node is updated.
- Definition Classes
- Base
- abstract class Ref[+T] extends AnyRef
Abstract representation of a computable value.
Abstract representation of a computable value. Default implementation is a simple lightweight reference to the corresponding definition. Every Ref have direct access to its Def via
node
property. Every Ref is typed, and the type is avaliable viaelem
property.- Definition Classes
- Base
- See also
SingleRep
- final class SingleRef[+T] extends Scalan.Ref[T]
A Ref is a symbolic reference used internally to refer to graph nodes.
A Ref is a symbolic reference used internally to refer to graph nodes. Light weight stateless immutable reference to a graph node (Def[T]). Two symbols are equal if they refer to the nodes with the same id, which is due to Def unification means equal symbols refer to the same instance of Def.
- Definition Classes
- Base
- class StagingException extends RuntimeException
- Definition Classes
- Base
- abstract class Transformer extends AnyRef
Base class for Ref to Ref transformations.
Base class for Ref to Ref transformations. Each transformer keeps a mapping data between references to original nodes and references to the corresponding transformed nodes.
- Definition Classes
- Base
- case class Variable[T](varId: Int)(implicit eT: Scalan.LElem[T]) extends Scalan.Node with Scalan.Def[T] with Product with Serializable
Node class for typed variables.
Node class for typed variables. In particular for lambda-bound variables.
- varId
is independent from nodeId, shouldn't be used as node id.
- eT
type descriptor of the variable type
- Definition Classes
- Base
- abstract class CompanionElem[T] extends Scalan.Elem[T]
Base class for all descriptors of staged companions
Base class for all descriptors of staged companions
- Definition Classes
- Entities
- trait ConcreteElem[TData, TClass] extends Scalan.EntityElem[TClass]
Base class for all descriptors of staged classes.
Base class for all descriptors of staged classes.
- Definition Classes
- Entities
- trait ConcreteElem1[A, TData, TClass, C[_]] extends Scalan.EntityElem1[A, TClass, C]
Base class for all descriptors of staged classes with one type parameter.
Base class for all descriptors of staged classes with one type parameter. Note, it doesn't inherit from ConcreteElem
- Definition Classes
- Entities
- abstract class EntityElem[A] extends Scalan.Elem[A] with Equals
Base class for all descriptors of staged traits.
Base class for all descriptors of staged traits. See derived classes in
impl
packages.- Definition Classes
- Entities
- abstract class EntityElem1[A, To, C[_]] extends Scalan.EntityElem[To]
Base class for all descriptors of staged traits with one type parameter.
Base class for all descriptors of staged traits with one type parameter.
- Definition Classes
- Entities
- case class InvokeFailure(exception: Throwable) extends Scalan.InvokeResult with Product with Serializable
Exception thrown during MethodCall invocation.
Exception thrown during MethodCall invocation.
- Definition Classes
- MethodCalls
- sealed abstract class InvokeResult extends AnyRef
Result of MethodCall invocation.
Result of MethodCall invocation.
- Definition Classes
- MethodCalls
- See also
tryInvoke
- case class InvokeSuccess(result: Scalan.Ref[_]) extends Scalan.InvokeResult with Product with Serializable
Successful MethodCall invocation with the given result.
Successful MethodCall invocation with the given result.
- Definition Classes
- MethodCalls
- case class MethodCall extends Scalan.Node with Scalan.Def[Any] with Product with Serializable
Graph node to represent invocation of the method of some class.
Graph node to represent invocation of the method of some class.
- Definition Classes
- MethodCalls
- case class NewObject[A](eA: Scalan.Elem[A], args: Seq[Any]) extends Scalan.BaseDef[A] with Product with Serializable
Represents invocation of constructor of the class described by
eA
.Represents invocation of constructor of the class described by
eA
.- eA
class descriptor for new instance
- args
arguments of class constructor
- Definition Classes
- MethodCalls
- abstract class BaseElem[A] extends Scalan.Elem[A] with Serializable with Equals
- Definition Classes
- TypeDescs
- class BaseElemLiftable[A] extends Scalan.BaseElem[A]
Type descriptor for primitive types.
Type descriptor for primitive types. There is implicit
val
declaration for each primitive type.- Definition Classes
- TypeDescs
- abstract class Cont[F[_]] extends Scalan.TypeDesc
Descriptor of type constructor of
* -> *
kind.Descriptor of type constructor of
* -> *
kind. Type constructor is not a type, but rather a function from type to type. It contains methods which abstract relationship between typesT
,F[T]
etc.- Definition Classes
- TypeDescs
- Annotations
- @implicitNotFound()
- abstract class Elem[A] extends Scalan.TypeDesc
Type descriptor of staged types, which correspond to source (unstaged) RTypes defined outside of IR cake.
Type descriptor of staged types, which correspond to source (unstaged) RTypes defined outside of IR cake.
- A
the type represented by this descriptor
- Definition Classes
- TypeDescs
- Annotations
- @implicitNotFound()
- class ElemCacheEntry extends AnyRef
Elements cache information for each Elem class.
Elements cache information for each Elem class.
- Definition Classes
- TypeDescs
- case class EnvRep[A](run: (Scalan.DataEnv) => (Scalan.DataEnv, Scalan.Ref[A])) extends Product with Serializable
State monad for symbols computed in a data environment.
State monad for symbols computed in a data environment.
DataEnv
is used as the state of the state monad.- Definition Classes
- TypeDescs
- case class FuncElem[A, B](eDom: Scalan.Elem[A], eRange: Scalan.Elem[B]) extends Scalan.Elem[(A) => B] with Product with Serializable
Type descriptor for
A => B
type where descriptors forA
andB
are given as arguments.Type descriptor for
A => B
type where descriptors forA
andB
are given as arguments.- Definition Classes
- TypeDescs
- trait Functor[F[_]] extends Scalan.Cont[F]
- Definition Classes
- TypeDescs
- sealed abstract class MethodDesc extends AnyRef
Abstract class for a method descriptors to assist invocation of MethodCall nodes.
Abstract class for a method descriptors to assist invocation of MethodCall nodes.
- Definition Classes
- TypeDescs
- case class PairElem[A, B](eFst: Scalan.Elem[A], eSnd: Scalan.Elem[B]) extends Scalan.Elem[(A, B)] with Product with Serializable
Type descriptor for
(A, B)
type where descriptors forA
andB
are given as arguments.Type descriptor for
(A, B)
type where descriptors forA
andB
are given as arguments.- Definition Classes
- TypeDescs
- case class RMethodDesc(method: RMethod) extends Scalan.MethodDesc with Product with Serializable
Decriptor for a method of a class.
Decriptor for a method of a class.
- method
The RMethod object representing the method.
- Definition Classes
- TypeDescs
- case class SumElem[A, B](eLeft: Scalan.Elem[A], eRight: Scalan.Elem[B]) extends Scalan.Elem[Scalan.|[A, B]] with Product with Serializable
Type descriptor for
A | B
type where descriptors forA
andB
are given as arguments.Type descriptor for
A | B
type where descriptors forA
andB
are given as arguments.- Definition Classes
- TypeDescs
- abstract class TypeDesc extends Serializable
- Definition Classes
- TypeDescs
- case class WMethodDesc(wrapSpec: WrapSpec, method: RMethod) extends Scalan.MethodDesc with Product with Serializable
Descriptor for a method of a wrapper class.
Descriptor for a method of a wrapper class.
- wrapSpec
The wrapping specification of the method.
- method
The RMethod object representing the method.
- Definition Classes
- TypeDescs
- implicit class EqualOps[A] extends AnyRef
Extension methods to construct ApplyBinOp nodes
Extension methods to construct ApplyBinOp nodes
- Definition Classes
- Equal
- case class Equals[A]()(implicit evidence$1: Scalan.Elem[A]) extends Scalan.BinOp[A, Boolean] with Product with Serializable
Binary operation representing structural equality between arguments.
Binary operation representing structural equality between arguments.
- Definition Classes
- Equal
- case class NotEquals[A]()(implicit evidence$2: Scalan.Elem[A]) extends Scalan.BinOp[A, Boolean] with Product with Serializable
Binary operation representing structural inequality between arguments.
Binary operation representing structural inequality between arguments.
- Definition Classes
- Equal
- case class Apply[A, B](f: Scalan.Ref[(A) => B], arg: Scalan.Ref[A], mayInline: Boolean = true) extends Scalan.Node with Scalan.Def[B] with Product with Serializable
- Definition Classes
- Functions
- implicit class FuncExtensions[A, B] extends AnyRef
- Definition Classes
- Functions
- class Lambda[A, B] extends Scalan.AstGraph with Scalan.Def[(A) => B]
Represent lambda expression as IR node.
Represent lambda expression as IR node.
- Definition Classes
- Functions
- implicit class LambdaOps[A, B] extends AnyRef
- Definition Classes
- Functions
- class LambdaStack extends AnyRef
- Definition Classes
- Functions
- class ElseIfBranch[T] extends AnyRef
Defines syntax available after
IF (cond) THEN thenp ELSEIF (cond1)
Defines syntax available after
IF (cond) THEN thenp ELSEIF (cond1)
- Definition Classes
- IfThenElse
- class IfBranch extends AnyRef
Defines syntax available after
IF (cond)
Defines syntax available after
IF (cond)
- Definition Classes
- IfThenElse
- case class IfThenElseLazy[T](cond: Scalan.Ref[Boolean], thenp: Scalan.Ref[Scalan.Thunk[T]], elsep: Scalan.Ref[Scalan.Thunk[T]]) extends Scalan.Node with Scalan.Def[T] with Product with Serializable
IR node to represent IF condition with lazy branches.
IR node to represent IF condition with lazy branches.
- Definition Classes
- IfThenElse
- class ThenIfBranch[T] extends AnyRef
Defines syntax available after
IF (cond) THEN thenp
Defines syntax available after
IF (cond) THEN thenp
- Definition Classes
- IfThenElse
- implicit class RepBooleanOps extends AnyRef
Extension methods over
Ref[Boolean]
.Extension methods over
Ref[Boolean]
.- Definition Classes
- LogicalOps
- abstract class DivOp[T] extends Scalan.EndoBinOp[T]
Base class for descriptors of binary division operations.
Base class for descriptors of binary division operations.
- Definition Classes
- NumericOps
- case class IntegralDivide[T](i: ExactIntegral[T])(implicit elem: Scalan.Elem[T]) extends Scalan.DivOp[T] with Product with Serializable
Descriptor of binary
/
operation (integral division).Descriptor of binary
/
operation (integral division).- Definition Classes
- NumericOps
- case class IntegralMod[T](i: ExactIntegral[T])(implicit elem: Scalan.Elem[T]) extends Scalan.DivOp[T] with Product with Serializable
Descriptor of binary
%
operation (remainder of integral division).Descriptor of binary
%
operation (remainder of integral division).- Definition Classes
- NumericOps
- implicit class IntegralOpsCls[T] extends AnyRef
Extension methods over
Ref[T]
where T is instance of ExactIntegral type-class.Extension methods over
Ref[T]
where T is instance of ExactIntegral type-class.- Definition Classes
- NumericOps
- case class NumericMinus[T](n: ExactNumeric[T])(implicit evidence$4: Scalan.Elem[T]) extends Scalan.EndoBinOp[T] with Product with Serializable
Descriptor of binary
-
operation.Descriptor of binary
-
operation.- Definition Classes
- NumericOps
- case class NumericNegate[T](n: ExactNumeric[T])(implicit evidence$7: Scalan.Elem[T]) extends Scalan.UnOp[T, T] with Product with Serializable
Descriptor of unary
-
operation.Descriptor of unary
-
operation.- Definition Classes
- NumericOps
- implicit class NumericOpsCls[T] extends AnyRef
Extension methods over
Ref[T]
where T is instance of ExactNumeric type-class.Extension methods over
Ref[T]
where T is instance of ExactNumeric type-class.- Definition Classes
- NumericOps
- case class NumericPlus[T](n: ExactNumeric[T])(implicit evidence$3: Scalan.Elem[T]) extends Scalan.EndoBinOp[T] with Product with Serializable
Descriptor of binary
+
operation.Descriptor of binary
+
operation.- Definition Classes
- NumericOps
- case class NumericTimes[T](n: ExactNumeric[T])(implicit evidence$5: Scalan.Elem[T]) extends Scalan.EndoBinOp[T] with Product with Serializable
Descriptor of binary
*
operation.Descriptor of binary
*
operation.- Definition Classes
- NumericOps
- case class NumericToInt[T](n: ExactNumeric[T]) extends Scalan.UnOp[T, Int] with Product with Serializable
Descriptor of unary
ToInt
conversion operation.Descriptor of unary
ToInt
conversion operation.- Definition Classes
- NumericOps
- case class NumericToLong[T](n: ExactNumeric[T]) extends Scalan.UnOp[T, Long] with Product with Serializable
Descriptor of unary
ToLong
conversion operation.Descriptor of unary
ToLong
conversion operation.- Definition Classes
- NumericOps
- case class OrderingCompare[T](ord: ExactOrdering[T]) extends Scalan.BinOp[T, Int] with Product with Serializable
Descriptor of binary
compare
operation.Descriptor of binary
compare
operation.- Definition Classes
- OrderingOps
- case class OrderingGT[T](ord: ExactOrdering[T]) extends Scalan.BinOp[T, Boolean] with Product with Serializable
Descriptor of binary
>
operation.Descriptor of binary
>
operation.- Definition Classes
- OrderingOps
- case class OrderingGTEQ[T](ord: ExactOrdering[T]) extends Scalan.BinOp[T, Boolean] with Product with Serializable
Descriptor of binary
>=
operation.Descriptor of binary
>=
operation.- Definition Classes
- OrderingOps
- case class OrderingLT[T](ord: ExactOrdering[T]) extends Scalan.BinOp[T, Boolean] with Product with Serializable
Descriptor of binary
<
operation.Descriptor of binary
<
operation.- Definition Classes
- OrderingOps
- case class OrderingLTEQ[T](ord: ExactOrdering[T]) extends Scalan.BinOp[T, Boolean] with Product with Serializable
Descriptor of binary
<=
operation.Descriptor of binary
<=
operation.- Definition Classes
- OrderingOps
- case class OrderingMax[T](ord: ExactOrdering[T])(implicit evidence$1: Scalan.Elem[T]) extends Scalan.BinOp[T, T] with Product with Serializable
Descriptor of binary
max
operation.Descriptor of binary
max
operation.- Definition Classes
- OrderingOps
- case class OrderingMin[T](ord: ExactOrdering[T])(implicit evidence$2: Scalan.Elem[T]) extends Scalan.BinOp[T, T] with Product with Serializable
Descriptor of binary
min
operation.Descriptor of binary
min
operation.- Definition Classes
- OrderingOps
- class OrderingOpsCls[T] extends AnyRef
Extension method over
Ref[T]
given an instance of ExactOrdering for T.Extension method over
Ref[T]
given an instance of ExactOrdering for T.- Definition Classes
- OrderingOps
- case class LiftableThunk[ST, T](lT: Liftable[ST, T]) extends Liftable[Scalan.SThunk[ST], Scalan.Thunk[T]] with Product with Serializable
Implementation of Liftable type class for
Thunk[T]
given liftable forT
.Implementation of Liftable type class for
Thunk[T]
given liftable forT
.- Definition Classes
- Thunks
- implicit class RepThunkOps[T] extends AnyRef
Extension methods on
Ref[Thunk[T]]
values.Extension methods on
Ref[Thunk[T]]
values.- Definition Classes
- Thunks
- trait Thunk[+A] extends AnyRef
Phantom type to define thunk-typed graph nodes and thunk based lazy operations.
- class ThunkCompanion extends AnyRef
A class of factory to create new Thunks by use
Thunk { ... }
expressions.A class of factory to create new Thunks by use
Thunk { ... }
expressions.- Definition Classes
- Thunks
- case class ThunkConst[ST, T](constValue: Scalan.SThunk[ST], lT: Liftable[ST, T]) extends Scalan.BaseDef[Scalan.Thunk[T]] with LiftedConst[Scalan.SThunk[ST], Scalan.Thunk[T]] with Product with Serializable
Graph node to represent constants of type Thunk.
- class ThunkDef[A] extends Scalan.AstGraph with Scalan.Def[Scalan.Thunk[A]]
Graph node representing thunk with reified body.
Graph node representing thunk with reified body. Each thunk node is a specialized implementation of AstGraph abstract class.
- Definition Classes
- Thunks
- case class ThunkElem[A](eItem: Scalan.Elem[A]) extends Scalan.EntityElem1[A, Scalan.Thunk[A], Scalan.Thunk] with Product with Serializable
Implements a type descriptor of
Thunk[A]
type given the instance ofA
.Implements a type descriptor of
Thunk[A]
type given the instance ofA
.- Definition Classes
- Thunks
- case class ThunkForce[A](thunk: Scalan.Ref[Scalan.Thunk[A]]) extends Scalan.Node with Scalan.Def[A] with Product with Serializable
Graph node to represent thunk forcing operation.
Graph node to represent thunk forcing operation.
- Definition Classes
- Thunks
- class ThunkScope extends AnyRef
Helper object to handle construction of nested thunks.
Helper object to handle construction of nested thunks. One instance is created for each ThunkDef under construction. This corresponds to syntactic nesting of thunks.
- Definition Classes
- Thunks
- class ThunkStack extends AnyRef
The stack of nested thunks during graph construction.
The stack of nested thunks during graph construction.
- Definition Classes
- Thunks
- case class First[A, B](pair: Scalan.Ref[(A, B)]) extends Scalan.Node with Scalan.Def[A] with Product with Serializable
- Definition Classes
- Tuples
- implicit class ListOps[A, B] extends AnyRef
- Definition Classes
- Tuples
- case class Second[A, B](pair: Scalan.Ref[(A, B)]) extends Scalan.Node with Scalan.Def[B] with Product with Serializable
- Definition Classes
- Tuples
- case class Tup[A, B](a: Scalan.Ref[A], b: Scalan.Ref[B]) extends Scalan.Node with Scalan.Def[(A, B)] with Product with Serializable
- Definition Classes
- Tuples
- implicit class TupleOps2[A, B] extends AnyRef
- Definition Classes
- Tuples
- implicit class TupleOps3[A, B, C] extends AnyRef
- Definition Classes
- Tuples
- implicit class TupleOps4[A, B, C, D] extends AnyRef
- Definition Classes
- Tuples
- implicit class TupleOps5[A, B, C, D, E] extends AnyRef
- Definition Classes
- Tuples
- case class ApplyBinOp[A, R](op: Scalan.BinOp[A, R], lhs: Scalan.Ref[A], rhs: Scalan.Ref[A]) extends Scalan.BaseDef[R] with Product with Serializable
Graph node which represents application of the given binary operation to the given arguments.
Graph node which represents application of the given binary operation to the given arguments.
- Definition Classes
- UnBinOps
- case class ApplyBinOpLazy[A, R](op: Scalan.BinOp[A, R], lhs: Scalan.Ref[A], rhs: Scalan.Ref[Scalan.Thunk[A]]) extends Scalan.BaseDef[R] with Product with Serializable
Graph node which represents application of the given binary operation to the given arguments where the second argument is lazy.
Graph node which represents application of the given binary operation to the given arguments where the second argument is lazy.
- Definition Classes
- UnBinOps
- case class ApplyUnOp[A, R](op: Scalan.UnOp[A, R], arg: Scalan.Ref[A]) extends Scalan.BaseDef[R] with Product with Serializable
Graph node which represents application of the given unary operation to the given argument.
Graph node which represents application of the given unary operation to the given argument.
- Definition Classes
- UnBinOps
- abstract class BinOp[A, R] extends AnyRef
Base class for descriptors of binary operations.
Base class for descriptors of binary operations.
- Definition Classes
- UnBinOps
- abstract class UnOp[A, R] extends AnyRef
Base class for descriptors of unary operations.
Base class for descriptors of unary operations.
- Definition Classes
- UnBinOps
- case class Convert[From, To](eFrom: Scalan.Elem[From], eTo: Scalan.Elem[To], x: Scalan.Ref[Scalan.Def[_]], conv: Scalan.Ref[(From) => To]) extends Scalan.BaseDef[To] with Product with Serializable
- Definition Classes
- UniversalOps
- case class Downcast[From, To](input: Scalan.Ref[From], eTo: Scalan.Elem[To]) extends Scalan.BaseDef[To] with Product with Serializable
- Definition Classes
- UniversalOps
- case class HashCode[A]() extends Scalan.UnOp[A, Int] with Product with Serializable
- Definition Classes
- UniversalOps
- case class OpCost(lambdaVar: Scalan.Sym, costedValueId: Int, args: Seq[Scalan.Ref[Int]], opCost: Scalan.Ref[Int]) extends Scalan.BaseDef[Int] with Product with Serializable
Special graph node to represent accumulation of the operation costs.
Special graph node to represent accumulation of the operation costs. In general, due to node sharing it is incorrect to just sum up all the
args
costs and addresCost
to that value. Example:
val x = .. val y = op1(x) val z = op2(x) val res = op3(y, z)
The naive summation will lead to the cost of xis accumulated both into
cost of yand into
cost of z, so in the
cost of resit is accumulated twice. To avoid this problem OpCost nodes require special handling in during evaluation.
- lambdaVar
the variable of the lambda in which scope this node is created. This makes this node belong to the lambda body, even if it doesn't otherwise depend on lambda argument.
- costedValueId
The id of the node for which this node represents cost
- args
costs of the arguments, which are here represent dependency information.
- opCost
operation cost, which should be added to the current scope accumulated cost
- Definition Classes
- UniversalOps
- implicit class RepUniversalOps[A] extends AnyRef
- Definition Classes
- UniversalOps
- case class SizeOf[T](value: Scalan.Ref[T]) extends Scalan.BaseDef[Long] with Product with Serializable
Represents calculation of size in bytes of the given value.
Represents calculation of size in bytes of the given value. The descriptor value.elem can be used to decompose value into components.
- Definition Classes
- UniversalOps
- case class ToString[A]() extends Scalan.UnOp[A, String] with Product with Serializable
- Definition Classes
- UniversalOps
- case class Upcast[From, To](input: Scalan.Ref[From], eTo: Scalan.Elem[To]) extends Scalan.BaseDef[To] with Product with Serializable
- Definition Classes
- UniversalOps
- abstract class AstGraph extends Scalan.Node
Base class for all compound nodes with schedule (e.g.
Base class for all compound nodes with schedule (e.g. Lambda, ThunkDef). The graph is directed acyclic (i.e. DAG) in which edges go from
boundVars
down toroots
.- Definition Classes
- AstGraphs
- case class GraphNode(sym: Scalan.Sym, usages: Buffer[Int]) extends Product with Serializable
GraphNode is created for each symbol of the AstGraph and represents graph linking structure
GraphNode is created for each symbol of the AstGraph and represents graph linking structure
- Definition Classes
- AstGraphs
- class PGraphUsages extends DFunc[Int, Buffer[Int]]
Deboxed function to obtain usages of a given node.
Deboxed function to obtain usages of a given node. Represents adjacency matrix of the reversed graph
g
.- Definition Classes
- ProgramGraphs
- case class ProgramGraph(roots: Seq[Scalan.Sym], mapping: Nullable[Scalan.Transformer], filterNode: Nullable[(Scalan.Sym) => Boolean]) extends Scalan.AstGraph with Product with Serializable
Immutable graph collected from
roots
following Ref.node.deps links.Immutable graph collected from
roots
following Ref.node.deps links.- Definition Classes
- ProgramGraphs
- class DefaultPass extends Scalan.Pass
Default pass to be used when IR is used without special compiler configuration.
Default pass to be used when IR is used without special compiler configuration.
- Definition Classes
- Transforming
- case class MapTransformer(subst: HashMap[Scalan.Sym, Scalan.Sym]) extends Scalan.Transformer with Product with Serializable
Concrete and default implementation of Transformer using underlying HashMap.
Concrete and default implementation of Transformer using underlying HashMap. HOTSPOT: don't beatify the code
- Definition Classes
- Transforming
- abstract class Mirror extends AnyRef
Base class for mirrors of graph nodes.
Base class for mirrors of graph nodes. Provides default implementations which can be overriden if special logic is required. HOTSPOT: don't beautify the code
- Definition Classes
- Transforming
- implicit class PartialRewriter extends Scalan.Rewriter
Turns partial function into rewriter (i.e.
Turns partial function into rewriter (i.e. set of rewriting rules)
- Definition Classes
- Transforming
- abstract class Pass extends AnyRef
Descriptor of a current compiler pass.
Descriptor of a current compiler pass. Compiler can be configured to perform one pass after another. Each pass has name, configuration parameters, finalizaton logic etc.
- Definition Classes
- Transforming
- case class PassConfig(shouldUnpackTuples: Boolean = false, shouldExtractFields: Boolean = true, constantPropagation: Boolean = true, shouldSlice: Boolean = false) extends Product with Serializable
Configuration parameters of the Pass descriptor.
Configuration parameters of the Pass descriptor.
- Definition Classes
- Transforming
- abstract class Rewriter extends AnyRef
- Definition Classes
- Transforming
- trait AvlTree extends sigmastate.eval.SigmaLibrary.Node with sigmastate.eval.SigmaLibrary.Def[sigmastate.eval.SigmaLibrary.AvlTree]
- Definition Classes
- SigmaDsl
- trait AvlTreeCompanion extends AnyRef
- Definition Classes
- SigmaDsl
- trait BigInt extends sigmastate.eval.SigmaLibrary.Node with sigmastate.eval.SigmaLibrary.Def[sigmastate.eval.SigmaLibrary.BigInt]
- Definition Classes
- SigmaDsl
- trait BigIntCompanion extends AnyRef
- Definition Classes
- SigmaDsl
- trait Box extends sigmastate.eval.SigmaLibrary.Node with sigmastate.eval.SigmaLibrary.Def[sigmastate.eval.SigmaLibrary.Box]
- Definition Classes
- SigmaDsl
- trait BoxCompanion extends AnyRef
- Definition Classes
- SigmaDsl
- trait Context extends sigmastate.eval.SigmaLibrary.Node with sigmastate.eval.SigmaLibrary.Def[sigmastate.eval.SigmaLibrary.Context]
- Definition Classes
- SigmaDsl
- trait ContextCompanion extends AnyRef
- Definition Classes
- SigmaDsl
- trait CostModelCompanion extends AnyRef
- Definition Classes
- SigmaDsl
- trait GroupElement extends sigmastate.eval.SigmaLibrary.Node with sigmastate.eval.SigmaLibrary.Def[sigmastate.eval.SigmaLibrary.GroupElement]
- Definition Classes
- SigmaDsl
- trait GroupElementCompanion extends AnyRef
- Definition Classes
- SigmaDsl
- trait Header extends sigmastate.eval.SigmaLibrary.Node with sigmastate.eval.SigmaLibrary.Def[sigmastate.eval.SigmaLibrary.Header]
- Definition Classes
- SigmaDsl
- trait HeaderCompanion extends AnyRef
- Definition Classes
- SigmaDsl
- trait PreHeader extends sigmastate.eval.SigmaLibrary.Node with sigmastate.eval.SigmaLibrary.Def[sigmastate.eval.SigmaLibrary.PreHeader]
- Definition Classes
- SigmaDsl
- trait PreHeaderCompanion extends AnyRef
- Definition Classes
- SigmaDsl
- trait SigmaContractCompanion extends AnyRef
- Definition Classes
- SigmaDsl
- trait SigmaDslBuilder extends sigmastate.eval.SigmaLibrary.Node with sigmastate.eval.SigmaLibrary.Def[sigmastate.eval.SigmaLibrary.SigmaDslBuilder]
- Definition Classes
- SigmaDsl
- trait SigmaDslBuilderCompanion extends AnyRef
- Definition Classes
- SigmaDsl
- trait SigmaProp extends sigmastate.eval.SigmaLibrary.Node with sigmastate.eval.SigmaLibrary.Def[sigmastate.eval.SigmaLibrary.SigmaProp]
- Definition Classes
- SigmaDsl
- trait SigmaPropCompanion extends AnyRef
- Definition Classes
- SigmaDsl
- type DataEnv = Map[sigmastate.eval.SigmaLibrary.Sym, AnyRef]
Immutable data environment used to assign data values to graph nodes.
Immutable data environment used to assign data values to graph nodes.
- Definition Classes
- TypeDescs
- type EndoBinOp[A] = sigmastate.eval.SigmaLibrary.BinOp[A, A]
- Definition Classes
- UnBinOps
- type EndoUnOp[A] = sigmastate.eval.SigmaLibrary.UnOp[A, A]
- Definition Classes
- UnBinOps
- type LElem[A] = Lazy[sigmastate.eval.SigmaLibrary.Elem[A]]
Type descriptor which is computed lazily on demand.
Type descriptor which is computed lazily on demand.
- Definition Classes
- TypeDescs
- type LambdaData[A, B] = (sigmastate.eval.SigmaLibrary.Lambda[A, B], Nullable[(sigmastate.eval.SigmaLibrary.Ref[A]) => sigmastate.eval.SigmaLibrary.Ref[B]], sigmastate.eval.SigmaLibrary.Ref[A], sigmastate.eval.SigmaLibrary.Ref[B])
- Definition Classes
- Functions
- type PGraph = sigmastate.eval.SigmaLibrary.ProgramGraph
- Definition Classes
- ProgramGraphs
- type RFunc[-A, +B] = sigmastate.eval.SigmaLibrary.Ref[(A) => B]
- Definition Classes
- Base
- type RPair[+A, +B] = sigmastate.eval.SigmaLibrary.Ref[(A, B)]
- Definition Classes
- Base
- type SThunk[T] = () => T
Runtime representation of lazy values.
- type Schedule = Seq[sigmastate.eval.SigmaLibrary.Sym]
Type synonim for graph schedules.
Type synonim for graph schedules.
- Definition Classes
- AstGraphs
- type ScheduleIds = Buffer[Int]
Alternative representation of schedules using node ids.
Alternative representation of schedules using node ids.
- Definition Classes
- AstGraphs
- type Subst = HashMap[sigmastate.eval.SigmaLibrary.Sym, sigmastate.eval.SigmaLibrary.Sym]
- Definition Classes
- Functions
- type Sym = sigmastate.eval.SigmaLibrary.Ref[_]
Untyped shortcut sinonim of Ref, which is used as untyped reference to graph nodes (definitions).
Untyped shortcut sinonim of Ref, which is used as untyped reference to graph nodes (definitions). Following a tradition in compiler engineering we call references to definitions as symbols.
- Definition Classes
- Base
- type Th[+T] = sigmastate.eval.SigmaLibrary.Ref[sigmastate.eval.SigmaLibrary.Thunk[T]]
- Definition Classes
- Thunks
- type |[+A, +B] = Either[A, B]
- Definition Classes
- Base
Value Members
- object &&
Logical AND between two pattern matches of the save value
x
.Logical AND between two pattern matches of the save value
x
. Can be used to construct patterns likecase P1 && P2 => ...
- Definition Classes
- Base
- object Def
- Definition Classes
- Base
- object ExpWithElem
- Definition Classes
- Base
- object Liftables
Data type
ST
is liftable is there is Liftable[ST, T] instance for some typeT
.Data type
ST
is liftable is there is Liftable[ST, T] instance for some typeT
. Liftable typeclass allows to define which types can have values embedded as literals into graph IR.- Definition Classes
- Base
- case object NoOwner extends Scalan.OwnerKind with Product with Serializable
- Definition Classes
- Base
- case object ScalanOwner extends Scalan.OwnerKind with Product with Serializable
- Definition Classes
- Base
- case object InvokeImpossible extends Scalan.InvokeResult with Product with Serializable
Invocation is not possible, e.g.
Invocation is not possible, e.g. when receiver doesn't implemented the method.
- Definition Classes
- MethodCalls
- object Elem extends Serializable
- Definition Classes
- TypeDescs
- object EnvRep extends Serializable
- Definition Classes
- TypeDescs
- object ConstantLambda
Matcher for lambdas which don't depend on their arguments (but can close over other expressions, unlike VeryConstantLambda).
Matcher for lambdas which don't depend on their arguments (but can close over other expressions, unlike VeryConstantLambda).
- Definition Classes
- Functions
- object IdentityLambda
- Definition Classes
- Functions
- object Lambda
- Definition Classes
- Functions
- object VeryConstantLambda
Matcher for lambdas which return staging-time constants.
Matcher for lambdas which return staging-time constants. VeryConstantLambda(x) should be equivalent to ConstantLambda(Def(Const(x)))
- Definition Classes
- Functions
- object ConstantThunk
- Definition Classes
- Thunks
- object ThunkDef
- Definition Classes
- Thunks
- object IsPair
- Definition Classes
- Tuples
- object Pair
- Definition Classes
- Tuples
- object MapTransformer extends Serializable
- Definition Classes
- Transforming
- object Pass
- Definition Classes
- Transforming
- def !!!(msg: String, e: Throwable, syms: sigmastate.eval.SigmaLibrary.Ref[_]*): Nothing
- Definition Classes
- Base
- def !!!(msg: String, syms: sigmastate.eval.SigmaLibrary.Ref[_]*): Nothing
- Definition Classes
- Base
- def !!!: Nothing
Helper methods to throw errors
Helper methods to throw errors
- Definition Classes
- Base
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ???(value: Any, syms: sigmastate.eval.SigmaLibrary.Ref[_]*): Nothing
- Definition Classes
- Base
- def ???: Nothing
- Definition Classes
- Base
- val And: sigmastate.eval.SigmaLibrary.EndoBinOp[Boolean]
Logical AND binary operation.
Logical AND binary operation.
- Definition Classes
- LogicalOps
- val AnyElement: sigmastate.eval.SigmaLibrary.Elem[Any]
Type descriptor for
Any
, cannot be used implicitly.Type descriptor for
Any
, cannot be used implicitly.- Definition Classes
- TypeDescs
- val BinaryXorOp: sigmastate.eval.SigmaLibrary.EndoBinOp[Boolean]
Logical XOR binary operation.
Logical XOR binary operation.
- Definition Classes
- LogicalOps
- implicit val BooleanElement: sigmastate.eval.SigmaLibrary.Elem[Boolean]
- Definition Classes
- TypeDescs
- val BooleanToInt: sigmastate.eval.SigmaLibrary.UnOp[Boolean, Int]
Boolean to Int conversion unary operation.
Boolean to Int conversion unary operation.
- Definition Classes
- LogicalOps
- implicit val ByteElement: sigmastate.eval.SigmaLibrary.Elem[Byte]
- Definition Classes
- TypeDescs
- val DefaultMirror: sigmastate.eval.SigmaLibrary.Mirror
Default Mirror instance which is used in core IR methods.
Default Mirror instance which is used in core IR methods.
- Definition Classes
- Transforming
- val EmptyArrayOfSym: Array[sigmastate.eval.SigmaLibrary.Sym]
Immutable empty array of symbols, can be used to avoid unnecessary allocations.
Immutable empty array of symbols, can be used to avoid unnecessary allocations.
- Definition Classes
- Base
- val EmptyDSetOfInt: Set[Int]
Used internally in IR and should be used with care since it is mutable.
Used internally in IR and should be used with care since it is mutable. At the same time, it is used in the hotspot and allows to avoid roughly tens of thousands of allocations per second. WARNING: Mutations of this instance can lead to undefined behavior.
- Attributes
- protected
- Definition Classes
- Base
- val EmptySeqOfSym: Seq[sigmastate.eval.SigmaLibrary.Sym]
Immutable empty Seq, can be used to avoid unnecessary allocations.
Immutable empty Seq, can be used to avoid unnecessary allocations.
- Definition Classes
- Base
- val EmptyTypeArgs: ListMap[String, (sigmastate.eval.SigmaLibrary.TypeDesc, Variance)]
Since ListMap is immutable this empty map can be shared by all other maps created from it.
Since ListMap is immutable this empty map can be shared by all other maps created from it.
- Definition Classes
- TypeDescs
- implicit final def FuncElemExtensions[A, B](eAB: sigmastate.eval.SigmaLibrary.Elem[(A) => B]): sigmastate.eval.SigmaLibrary.FuncElem[A, B]
- Definition Classes
- TypeDescs
- def IF(cond: sigmastate.eval.SigmaLibrary.Ref[Boolean]): sigmastate.eval.SigmaLibrary.IfBranch
If c then t else e construction with standard lazy evaluation of branches.
If c then t else e construction with standard lazy evaluation of branches. The representation uses Thunk for each branch
- Definition Classes
- IfThenElse
- implicit val IntElement: sigmastate.eval.SigmaLibrary.Elem[Int]
- Definition Classes
- TypeDescs
- final def IntZero: sigmastate.eval.SigmaLibrary.Ref[Int]
Zero literal node, which is lazily created and can be efficiently reused.
Zero literal node, which is lazily created and can be efficiently reused. Much faster alternative to
(0: Rep[Int])
ortoRep(0)
.- Definition Classes
- Base
- Annotations
- @inline()
- val LazyAnyElement: Lazy[sigmastate.eval.SigmaLibrary.Elem[Any]]
Predefined Lazy value saved here to be used in hotspot code.
Predefined Lazy value saved here to be used in hotspot code.
- Definition Classes
- TypeDescs
- implicit val LongElement: sigmastate.eval.SigmaLibrary.Elem[Long]
- Definition Classes
- TypeDescs
- val NoRewriting: sigmastate.eval.SigmaLibrary.Rewriter
Identity rewriter, i.e.
Identity rewriter, i.e. doesn't change the graph when applied.
- Definition Classes
- Transforming
- val Not: sigmastate.eval.SigmaLibrary.EndoUnOp[Boolean]
Logical NOT unary operation.
Logical NOT unary operation.
- Definition Classes
- LogicalOps
- val Or: sigmastate.eval.SigmaLibrary.EndoBinOp[Boolean]
Logical AND binary operation.
Logical AND binary operation.
- Definition Classes
- LogicalOps
- implicit def OrderingToOrderingOps[T](x: T)(implicit n: ExactOrdering[T], et: sigmastate.eval.SigmaLibrary.Elem[T]): sigmastate.eval.SigmaLibrary.OrderingOpsCls[T]
- Definition Classes
- OrderingOps
- implicit final def PairElemExtensions[A, B](eAB: sigmastate.eval.SigmaLibrary.Elem[(A, B)]): sigmastate.eval.SigmaLibrary.PairElem[A, B]
- Definition Classes
- TypeDescs
- implicit val ShortElement: sigmastate.eval.SigmaLibrary.Elem[Short]
- Definition Classes
- TypeDescs
- implicit val StringElement: sigmastate.eval.SigmaLibrary.Elem[String]
- Definition Classes
- TypeDescs
- implicit final def SumElemExtensions[A, B](eAB: sigmastate.eval.SigmaLibrary.Elem[sigmastate.eval.SigmaLibrary.|[A, B]]): sigmastate.eval.SigmaLibrary.SumElem[A, B]
- Definition Classes
- TypeDescs
- val Thunk: sigmastate.eval.SigmaLibrary.ThunkCompanion
Allow expressions like
Thunk { ... }
to create new Thunks.Allow expressions like
Thunk { ... }
to create new Thunks.- Definition Classes
- Thunks
- final def TypeArgs(descs: (String, (sigmastate.eval.SigmaLibrary.TypeDesc, Variance))*): ListMap[String, (sigmastate.eval.SigmaLibrary.TypeDesc, Variance)]
- Definition Classes
- TypeDescs
- implicit val UnitElement: sigmastate.eval.SigmaLibrary.Elem[Unit]
- Definition Classes
- TypeDescs
- val _currentPass: sigmastate.eval.SigmaLibrary.Pass
- Definition Classes
- Transforming
- def alphaEqual(s1: sigmastate.eval.SigmaLibrary.Sym, s2: sigmastate.eval.SigmaLibrary.Sym): Boolean
- Definition Classes
- Functions
- def applyBinOp[A, R](op: sigmastate.eval.SigmaLibrary.BinOp[A, R], lhs: sigmastate.eval.SigmaLibrary.Ref[A], rhs: sigmastate.eval.SigmaLibrary.Ref[A]): sigmastate.eval.SigmaLibrary.Ref[R]
Overridable constructor of a binary operation node.
Overridable constructor of a binary operation node.
- Definition Classes
- UnBinOps
- def applyBinOpLazy[A, R](op: sigmastate.eval.SigmaLibrary.BinOp[A, R], lhs: sigmastate.eval.SigmaLibrary.Ref[A], rhs: sigmastate.eval.SigmaLibrary.Ref[sigmastate.eval.SigmaLibrary.Thunk[A]]): sigmastate.eval.SigmaLibrary.Ref[R]
Overridable constructor of a binary operation node with lazy argument.
Overridable constructor of a binary operation node with lazy argument.
- Definition Classes
- UnBinOps
- def applyUnOp[A, R](op: sigmastate.eval.SigmaLibrary.UnOp[A, R], arg: sigmastate.eval.SigmaLibrary.Ref[A]): sigmastate.eval.SigmaLibrary.Ref[R]
Overridable constructor of an unary operation node.
Overridable constructor of an unary operation node.
- Definition Classes
- UnBinOps
- final def asElem[T](d: sigmastate.eval.SigmaLibrary.TypeDesc): sigmastate.eval.SigmaLibrary.Elem[T]
Helper type case method.
Helper type case method.
- Definition Classes
- TypeDescs
- Annotations
- @inline()
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def asRep[T](x: sigmastate.eval.SigmaLibrary.Ref[_]): sigmastate.eval.SigmaLibrary.Ref[T]
Helper to type cast node references.
Helper to type cast node references.
- Definition Classes
- Base
- Annotations
- @inline()
- def assertElem(value: sigmastate.eval.SigmaLibrary.Ref[_], elem: sigmastate.eval.SigmaLibrary.Elem[_], hint: => String): Unit
- Definition Classes
- TypeDescs
- def assertElem(value: sigmastate.eval.SigmaLibrary.Ref[_], elem: sigmastate.eval.SigmaLibrary.Elem[_]): Unit
- Definition Classes
- TypeDescs
- def assertEqualElems[A](e1: sigmastate.eval.SigmaLibrary.Elem[A], e2: sigmastate.eval.SigmaLibrary.Elem[A], m: => String): Unit
- Definition Classes
- TypeDescs
- def assertValueIdForOpCost[A, B](value: sigmastate.eval.SigmaLibrary.Ref[A], cost: sigmastate.eval.SigmaLibrary.Ref[B]): Unit
- Definition Classes
- UniversalOps
- def beginPass(pass: sigmastate.eval.SigmaLibrary.Pass): Unit
Called to setup IR before the new pass is executed.
Called to setup IR before the new pass is executed.
- Definition Classes
- Transforming
- val cacheElems: Boolean
Whether IR type descriptors should be cached.
Whether IR type descriptors should be cached.
- Definition Classes
- Base
- val cachePairs: Boolean
Whether Tup instances should be cached.
Whether Tup instances should be cached.
- Definition Classes
- Base
- final def cachedElemByClass[E <: sigmastate.eval.SigmaLibrary.Elem[_]](args: AnyRef*)(implicit clazz: RClass[E]): E
Retrieve an instance of the given Elem class by either looking up in the cache or creating a new one.
Retrieve an instance of the given Elem class by either looking up in the cache or creating a new one. We assume that all Elem instances are uniquely defined by (clazz, args)
- args
arguments of Elem class constructor
- clazz
Elem class
- Definition Classes
- TypeDescs
- def canBeInvoked(d: sigmastate.eval.SigmaLibrary.Def[_], m: RMethod, args: Array[AnyRef]): Boolean
Method invocation checker.
Method invocation checker.
- Attributes
- protected
- Definition Classes
- MethodCalls
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compose[A, B, C](f: sigmastate.eval.SigmaLibrary.Ref[(B) => C], g: sigmastate.eval.SigmaLibrary.Ref[(A) => B]): sigmastate.eval.SigmaLibrary.Ref[(A) => C]
Composition of two functions (in mathematical notation), where first
g
is applied and themf
.Composition of two functions (in mathematical notation), where first
g
is applied and themf
.- Definition Classes
- Functions
- def constFun[A, B](x: sigmastate.eval.SigmaLibrary.Ref[B])(implicit e: sigmastate.eval.SigmaLibrary.Elem[A]): sigmastate.eval.SigmaLibrary.Ref[(A) => B]
- Definition Classes
- Functions
- final def container[F[_]](implicit arg0: sigmastate.eval.SigmaLibrary.Cont[F]): sigmastate.eval.SigmaLibrary.Cont[F]
- Definition Classes
- TypeDescs
- implicit final def containerElem[F[_], A](implicit arg0: sigmastate.eval.SigmaLibrary.Cont[F], arg1: sigmastate.eval.SigmaLibrary.Elem[A]): sigmastate.eval.SigmaLibrary.Elem[F[A]]
- Definition Classes
- TypeDescs
- def createDefinition[T](optScope: Nullable[sigmastate.eval.SigmaLibrary.ThunkScope], s: sigmastate.eval.SigmaLibrary.Ref[T], d: sigmastate.eval.SigmaLibrary.Def[T]): sigmastate.eval.SigmaLibrary.Ref[T]
Create new definition entry in either given Thunk or in the global hash table.
Create new definition entry in either given Thunk or in the global hash table.
- optScope
optional thunk scope to put given definition
- s
symbol refering to
d
- d
definition node to add to the scope of globally
- returns
reference to
d
(which iss
)
- Attributes
- protected
- Definition Classes
- Base
- def currentPass: sigmastate.eval.SigmaLibrary.Pass
IR global current Pass, changes when the compier switches from one pass to the next one.
IR global current Pass, changes when the compier switches from one pass to the next one. Should remain constant during the whole pass execution.
- Definition Classes
- Transforming
- val debugModeSanityChecks: Boolean
Whether to perform extended checks of correctness, expected invariants and data consistency.
Whether to perform extended checks of correctness, expected invariants and data consistency. NOTE: Since it may add substantial overhead, set it to
false
before using in production.- Definition Classes
- Base
- def defCount: Int
Returns a number of definitions added to this IR context.
Returns a number of definitions added to this IR context.
- Definition Classes
- Base
- def def_unapply[T](e: sigmastate.eval.SigmaLibrary.Ref[T]): Nullable[sigmastate.eval.SigmaLibrary.Def[T]]
- Definition Classes
- Base
- def delayInvoke: Nothing
- Definition Classes
- MethodCalls
- def downcast[To](value: sigmastate.eval.SigmaLibrary.Ref[_])(implicit arg0: sigmastate.eval.SigmaLibrary.Elem[To]): sigmastate.eval.SigmaLibrary.Ref[To]
- Definition Classes
- UniversalOps
- val elemCache: AVHashMap[RClass[_], sigmastate.eval.SigmaLibrary.ElemCacheEntry]
- Attributes
- protected
- Definition Classes
- TypeDescs
- final def element[A](implicit ea: sigmastate.eval.SigmaLibrary.Elem[A]): sigmastate.eval.SigmaLibrary.Elem[A]
- Definition Classes
- TypeDescs
- final def emptyDBufferOfSym: Buffer[sigmastate.eval.SigmaLibrary.Sym]
Create a new empty buffer around pre-allocated empty array.
Create a new empty buffer around pre-allocated empty array. This method is preferred, rather that creating empty debox.Buffer directly because it allows to avoid allocation of the empty array.
- Definition Classes
- Base
- Annotations
- @inline()
- def emptyMatchSubst: sigmastate.eval.SigmaLibrary.Subst
- Definition Classes
- Functions
- Annotations
- @inline()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equalValues[A](x: Any, y: Any)(implicit eA: sigmastate.eval.SigmaLibrary.Elem[A]): Boolean
- Attributes
- protected
- Definition Classes
- Equal
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit def extendThunkElement[T](elem: sigmastate.eval.SigmaLibrary.Elem[sigmastate.eval.SigmaLibrary.Thunk[T]]): sigmastate.eval.SigmaLibrary.ThunkElem[T]
Implicit conversion (downcast) to access
ThunkElem.eItem
field.Implicit conversion (downcast) to access
ThunkElem.eItem
field.- Definition Classes
- Thunks
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def findGlobalDefinition[T](d: sigmastate.eval.SigmaLibrary.Def[T]): sigmastate.eval.SigmaLibrary.Ref[T]
Lookup definition in this IR context's hash table of definitions.
Lookup definition in this IR context's hash table of definitions.
- returns
node reference to an instance stored in hash table, which is equal to
d
and null if there is no definition which is equal tod
- Definition Classes
- Base
- def findOrCreateDefinition[T](d: sigmastate.eval.SigmaLibrary.Def[T], newSym: => sigmastate.eval.SigmaLibrary.Ref[T]): sigmastate.eval.SigmaLibrary.Ref[T]
Lookup
d
in the heap of nodes.Lookup
d
in the heap of nodes. If the lookup is successfull, then its reference is returned. If the node is not found in the heap, then it is added andd.self
reference is returned.- d
node to be added to the head of nodes
- newSym
producer of the reference to be used as the reference to
d
node.- returns
return a reference to
d
node in the heap HOTSPOT:
- Definition Classes
- Base
- def forceThunkByMirror[A](thunk: sigmastate.eval.SigmaLibrary.Th[A], subst: sigmastate.eval.SigmaLibrary.MapTransformer = MapTransformer.empty()): sigmastate.eval.SigmaLibrary.Ref[A]
Inlines the given thunk by cloning all its nodes and applying the given substitution (transformer).
Inlines the given thunk by cloning all its nodes and applying the given substitution (transformer).
- thunk
reference to the thunk node
- subst
transformer to be applied for each mirrored (cloned) node.
- returns
the reference to the graph node, which represents the resulting value of the thunk
- Definition Classes
- Thunks
- def forceThunkDefByMirror[A](th: sigmastate.eval.SigmaLibrary.ThunkDef[A], subst: sigmastate.eval.SigmaLibrary.MapTransformer = MapTransformer.empty()): sigmastate.eval.SigmaLibrary.Ref[A]
Inlines the given thunk by cloning all its nodes and applying the given substitution (transformer).
Inlines the given thunk by cloning all its nodes and applying the given substitution (transformer).
- th
the thunk node
- subst
transformer to be applied for each mirrored (cloned) node.
- returns
the reference to the graph node, which represents the resulting value of the thunk
- Definition Classes
- Thunks
- final def freshId: Int
Get next fresh node id
Get next fresh node id
- Definition Classes
- Base
- Annotations
- @inline()
- final def freshSym[T](d: sigmastate.eval.SigmaLibrary.Def[T]): sigmastate.eval.SigmaLibrary.Ref[T]
Lookup of create reference to the given definition.
Lookup of create reference to the given definition. To lookup
d.nodeId
is used as the index in the_symbolTable
. If Ref is not found in_symbolTable
, then new Ref instance is created and stored in_symbolTable
atd.nodeId
index.- Definition Classes
- Base
- Annotations
- @inline()
- implicit final def fun[A, B](f: (sigmastate.eval.SigmaLibrary.Ref[A]) => sigmastate.eval.SigmaLibrary.Ref[B])(implicit eA: sigmastate.eval.SigmaLibrary.LElem[A]): sigmastate.eval.SigmaLibrary.Ref[(A) => B]
Executes given lambda to construct Lambda node.
Executes given lambda to construct Lambda node. The function
f
can be called with any symbol and has an effect of growing a graph starting from the argument symbol. If a reference toVariable
node is passed as argument, then the constructed graph nodes can be collected to Lambda node forming its body and schedule.- f
function which execution will create body nodes
- eA
arguments type descriptor
- Definition Classes
- Functions
- implicit final def fun2[A, B, C](f: (sigmastate.eval.SigmaLibrary.Ref[A], sigmastate.eval.SigmaLibrary.Ref[B]) => sigmastate.eval.SigmaLibrary.Ref[C])(implicit eA: sigmastate.eval.SigmaLibrary.LElem[A], eB: sigmastate.eval.SigmaLibrary.LElem[B]): sigmastate.eval.SigmaLibrary.Ref[((A, B)) => C]
- Definition Classes
- Functions
- implicit final def funcElement[A, B](implicit ea: sigmastate.eval.SigmaLibrary.Elem[A], eb: sigmastate.eval.SigmaLibrary.Elem[B]): sigmastate.eval.SigmaLibrary.Elem[(A) => B]
Implicitly defines element type for functions.
Implicitly defines element type for functions.
- Definition Classes
- TypeDescs
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getEntityObject(name: String): Nullable[sigmastate.eval.SigmaLibrary.EntityObject]
- Definition Classes
- Base
- Annotations
- @inline()
- def getOwnerKind(constructor: RConstructor[_]): sigmastate.eval.SigmaLibrary.OwnerKind
Returns OwnerKind for the given constructor, using its first parameter.
Returns OwnerKind for the given constructor, using its first parameter.
- Attributes
- protected
- Definition Classes
- Base
- final def getSourceValues(dataEnv: sigmastate.eval.SigmaLibrary.DataEnv, forWrapper: Boolean, stagedValues: AnyRef*): Seq[AnyRef]
- Definition Classes
- TypeDescs
- final def getSym(id: Int): sigmastate.eval.SigmaLibrary.Sym
Lookup node reference by its id.
Lookup node reference by its id. This is simple array access by index O(1) operation.
- Definition Classes
- Base
- Annotations
- @inline()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def identityFun[A](implicit e: sigmastate.eval.SigmaLibrary.Elem[A]): sigmastate.eval.SigmaLibrary.Ref[(A) => A]
- Definition Classes
- Functions
- def ifThenElseLazy[T](cond: sigmastate.eval.SigmaLibrary.Ref[Boolean], thenp: => sigmastate.eval.SigmaLibrary.Ref[T], elsep: => sigmastate.eval.SigmaLibrary.Ref[T]): sigmastate.eval.SigmaLibrary.Ref[T]
Constructs IfThenElse node wrapping by-name args into ThunkDef nodes.
Constructs IfThenElse node wrapping by-name args into ThunkDef nodes.
- Definition Classes
- IfThenElse
- def integral[T](implicit arg0: ExactIntegral[T]): ExactIntegral[T]
Return an ExactIntegral for a given type T.
Return an ExactIntegral for a given type T.
- Definition Classes
- NumericOps
- def invokeUnlifted(e: sigmastate.eval.SigmaLibrary.Elem[_], mc: sigmastate.eval.SigmaLibrary.MethodCall, dataEnv: sigmastate.eval.SigmaLibrary.DataEnv): Any
Invoke source type method corresponding to the given MethodCall node.
Invoke source type method corresponding to the given MethodCall node. This method delegated the work to the given element instance.
- e
type descriptor of receiver node
- mc
IR node representing method invocation
- dataEnv
environment where each symbol of 'mc' has associated data value
- returns
data value returned from invoked method
- Definition Classes
- TypeDescs
- val isInlineThunksOnForce: Boolean
Specifies thunk staging strategy with respect to handling thunk_force operation.
Specifies thunk staging strategy with respect to handling thunk_force operation.
- Definition Classes
- Thunks
- See also
thunk_force
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isInvokeEnabled(d: sigmastate.eval.SigmaLibrary.Def[_], m: RMethod): Boolean
Method invocation enabler.
Method invocation enabler.
- returns
true if the given method can be invoked on the given node.
- Definition Classes
- MethodCalls
- final def isOne[T](x: T, n: ExactNumeric[T]): Boolean
Compares the given value with 1 of the given ExactNumeric instance.
Compares the given value with 1 of the given ExactNumeric instance.
- Definition Classes
- NumericOps
- Annotations
- @inline()
- final def isZero[T](x: T, n: ExactNumeric[T]): Boolean
Compares the given value with zero of the given ExactNumeric instance.
Compares the given value with zero of the given ExactNumeric instance.
- Definition Classes
- NumericOps
- Annotations
- @inline()
- val keepOriginalFunc: Boolean
Global flag governing lambda reification in
fun
andmkLambda
.Global flag governing lambda reification in
fun
andmkLambda
. If this flag istrue
then originalf: Ref[A] => Ref[B]
function is stored in Lambda node. As a consequence iff
is not stored, thenunfoldLambda
is done bymirrorLambda
.- Definition Classes
- Functions
- val lambdaStack: List[sigmastate.eval.SigmaLibrary.Lambda[_, _]]
- Definition Classes
- Functions
- implicit def liftToRep[A](x: A)(implicit arg0: sigmastate.eval.SigmaLibrary.Elem[A]): sigmastate.eval.SigmaLibrary.Ref[A]
- Definition Classes
- Base
- Annotations
- @inline()
- implicit def liftableThunk[ST, T](implicit lT: Liftable[ST, T]): Liftable[sigmastate.eval.SigmaLibrary.SThunk[ST], sigmastate.eval.SigmaLibrary.Thunk[T]]
- Definition Classes
- Thunks
- def logWarn(msg: => String): Unit
Log warning message to the log.
Log warning message to the log. This is default and simple implementation, which can be overriden.
- Definition Classes
- Base
- def matchAny(a1: Any, a2: Any, allowInexactMatch: Boolean, subst: sigmastate.eval.SigmaLibrary.Subst): Nullable[sigmastate.eval.SigmaLibrary.Subst]
- Attributes
- protected
- Definition Classes
- Functions
- def matchDefs(d1: sigmastate.eval.SigmaLibrary.Def[_], d2: sigmastate.eval.SigmaLibrary.Def[_], allowInexactMatch: Boolean, subst: sigmastate.eval.SigmaLibrary.Subst): Nullable[sigmastate.eval.SigmaLibrary.Subst]
- def matchExps(s1: sigmastate.eval.SigmaLibrary.Sym, s2: sigmastate.eval.SigmaLibrary.Sym, allowInexactMatch: Boolean, subst: sigmastate.eval.SigmaLibrary.Subst): Nullable[sigmastate.eval.SigmaLibrary.Subst]
- Attributes
- protected
- Definition Classes
- Functions
- def matchIterators(i1: Iterator[_], i2: Iterator[_], allowInexactMatch: Boolean, subst: sigmastate.eval.SigmaLibrary.Subst): Nullable[sigmastate.eval.SigmaLibrary.Subst]
- Attributes
- protected
- Definition Classes
- Functions
- def mirrorApply[A, B](lam: sigmastate.eval.SigmaLibrary.Lambda[A, B], s: sigmastate.eval.SigmaLibrary.Ref[A]): sigmastate.eval.SigmaLibrary.Ref[B]
- Definition Classes
- Functions
- def mkApply[A, B](f: sigmastate.eval.SigmaLibrary.Ref[(A) => B], x: sigmastate.eval.SigmaLibrary.Ref[A]): sigmastate.eval.SigmaLibrary.Ref[B]
- Definition Classes
- Functions
- def mkLambda[A, B, C](f: (sigmastate.eval.SigmaLibrary.Ref[A], sigmastate.eval.SigmaLibrary.Ref[B]) => sigmastate.eval.SigmaLibrary.Ref[C])(implicit eA: sigmastate.eval.SigmaLibrary.LElem[A], eB: sigmastate.eval.SigmaLibrary.LElem[B]): sigmastate.eval.SigmaLibrary.Ref[((A, B)) => C]
- Definition Classes
- Functions
- def mkLambda[A, B, C](f: (sigmastate.eval.SigmaLibrary.Ref[A]) => (sigmastate.eval.SigmaLibrary.Ref[B]) => sigmastate.eval.SigmaLibrary.Ref[C])(implicit eA: sigmastate.eval.SigmaLibrary.LElem[A], eB: sigmastate.eval.SigmaLibrary.Elem[B]): sigmastate.eval.SigmaLibrary.Ref[(A) => (B) => C]
- Definition Classes
- Functions
- def mkLambda[A, B](f: (sigmastate.eval.SigmaLibrary.Ref[A]) => sigmastate.eval.SigmaLibrary.Ref[B], mayInline: Boolean, alphaEquality: Boolean, keepOriginalFunc: Boolean)(implicit eA: sigmastate.eval.SigmaLibrary.LElem[A]): sigmastate.eval.SigmaLibrary.Ref[(A) => B]
- Definition Classes
- Functions
- def mkMethodCall(receiver: sigmastate.eval.SigmaLibrary.Sym, method: RMethod, args: Seq[AnyRef], neverInvoke: Boolean, isAdapterCall: Boolean, resultElem: sigmastate.eval.SigmaLibrary.Elem[_]): sigmastate.eval.SigmaLibrary.Sym
Creates new MethodCall node and returns its node ref.
Creates new MethodCall node and returns its node ref.
- Definition Classes
- MethodCalls
- val nInitialDefs: Int
- Definition Classes
- Base
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newObjEx[A](args: Any*)(implicit eA: sigmastate.eval.SigmaLibrary.Elem[A]): sigmastate.eval.SigmaLibrary.Ref[A]
Creates new NewObject node and returns its node ref.
Creates new NewObject node and returns its node ref.
- Definition Classes
- MethodCalls
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def numeric[T](implicit arg0: ExactNumeric[T]): ExactNumeric[T]
Return an ExactNumeric for a given type T.
Return an ExactNumeric for a given type T.
- Definition Classes
- NumericOps
- def okRegisterModules: Boolean
Whether staged modules should be registered when cake is constructed and initialized.
Whether staged modules should be registered when cake is constructed and initialized.
- Definition Classes
- Modules
- def onReset(): Unit
Called during resetContext() operation after the core context state has been reset.
Called during resetContext() operation after the core context state has been reset. Derived classes can override to define application specific initialization. Don't forget to call super method in the beginning of your overriding method.
- Attributes
- protected
- Definition Classes
- Base
- def opCost(costedValue: sigmastate.eval.SigmaLibrary.Sym, args: Seq[sigmastate.eval.SigmaLibrary.Ref[Int]], opCost: sigmastate.eval.SigmaLibrary.Ref[Int]): sigmastate.eval.SigmaLibrary.Ref[Int]
- Definition Classes
- UniversalOps
- implicit final def pairElement[A, B](implicit ea: sigmastate.eval.SigmaLibrary.Elem[A], eb: sigmastate.eval.SigmaLibrary.Elem[B]): sigmastate.eval.SigmaLibrary.Elem[(A, B)]
Implicitly defines element type for pairs.
Implicitly defines element type for pairs.
- Definition Classes
- TypeDescs
- def patternMatch(s1: sigmastate.eval.SigmaLibrary.Sym, s2: sigmastate.eval.SigmaLibrary.Sym): Nullable[sigmastate.eval.SigmaLibrary.Subst]
- Definition Classes
- Functions
- def placeholder[T](implicit eT: sigmastate.eval.SigmaLibrary.LElem[T]): sigmastate.eval.SigmaLibrary.Ref[T]
- Definition Classes
- Base
- Annotations
- @inline()
- def propagateBinOp[T, R](op: sigmastate.eval.SigmaLibrary.BinOp[T, R], x: sigmastate.eval.SigmaLibrary.Ref[T], y: sigmastate.eval.SigmaLibrary.Ref[T]): sigmastate.eval.SigmaLibrary.Ref[R]
Perform constant propagation if enabled and both arguments are Const.
Perform constant propagation if enabled and both arguments are Const.
- returns
null if propagation is not done
- Definition Classes
- DefRewriting
- def propagateUnOp[T, R](op: sigmastate.eval.SigmaLibrary.UnOp[T, R], x: sigmastate.eval.SigmaLibrary.Ref[T]): sigmastate.eval.SigmaLibrary.Ref[R]
Perform constant propagation if enabled and argument is Const.
Perform constant propagation if enabled and argument is Const.
- returns
null if propagation is not done
- Definition Classes
- DefRewriting
- def registerEntityObject(name: String, obj: sigmastate.eval.SigmaLibrary.EntityObject): Unit
- Attributes
- protected
- Definition Classes
- Base
- def registerModule(moduleInfo: ModuleInfo): Unit
Called once for each staged module during this cake initialization.
Called once for each staged module during this cake initialization.
- Attributes
- protected
- Definition Classes
- Modules
- implicit def reifyObject[A](obj: sigmastate.eval.SigmaLibrary.Def[A]): sigmastate.eval.SigmaLibrary.Ref[A]
Implicit injection of new definition (graph node) into universum of nodes with collapsing semantics.
Implicit injection of new definition (graph node) into universum of nodes with collapsing semantics. If there exists node
n
in this IR such thatobj equals n
, then the value ofn.self
is returned, i.e. the new nodeobj
is collapsed with already existing one. This has an effect of Common Subexpression Elimination (CSE) when an expression tree is transformed to the graph and identical subtrees are collapsed. After a reference to the node is obtained, global rewriting rules are examined and the reference may be replaced with a new one.- Definition Classes
- Base
- implicit def repOrderingToOrderingOps[T](x: sigmastate.eval.SigmaLibrary.Ref[T])(implicit n: ExactOrdering[T]): sigmastate.eval.SigmaLibrary.OrderingOpsCls[T]
- Definition Classes
- OrderingOps
- implicit def repToThunk[A](block: sigmastate.eval.SigmaLibrary.Ref[A]): sigmastate.eval.SigmaLibrary.Ref[sigmastate.eval.SigmaLibrary.Thunk[A]]
- Definition Classes
- Thunks
- def resetContext(): Unit
- Definition Classes
- Base
- final def rewriteBinOp[A, R](op: sigmastate.eval.SigmaLibrary.BinOp[A, R], x: sigmastate.eval.SigmaLibrary.Ref[A], y: sigmastate.eval.SigmaLibrary.Ref[A]): sigmastate.eval.SigmaLibrary.Ref[_]
Rewrites application of given binary operation to the given arguments.
Rewrites application of given binary operation to the given arguments.
- returns
null if no rewriting is defined.
- Definition Classes
- DefRewriting
- final def rewriteBoolConsts(lhs: sigmastate.eval.SigmaLibrary.Sym, rhs: sigmastate.eval.SigmaLibrary.Sym, ifTrue: (sigmastate.eval.SigmaLibrary.Sym) => sigmastate.eval.SigmaLibrary.Sym, ifFalse: (sigmastate.eval.SigmaLibrary.Sym) => sigmastate.eval.SigmaLibrary.Sym, ifEqual: (sigmastate.eval.SigmaLibrary.Sym) => sigmastate.eval.SigmaLibrary.Sym, ifNegated: (sigmastate.eval.SigmaLibrary.Sym) => sigmastate.eval.SigmaLibrary.Sym): sigmastate.eval.SigmaLibrary.Sym
Helper method which defines rewriting rules with boolean constants.
Helper method which defines rewriting rules with boolean constants.
- Definition Classes
- LogicalOps
- Annotations
- @inline()
- def rewriteDef[T](d: sigmastate.eval.SigmaLibrary.Def[T]): sigmastate.eval.SigmaLibrary.Ref[_]
Rewrites given node to another equivalent node and returns its reference.
Rewrites given node to another equivalent node and returns its reference.
- d
node to be matched against rewrite patterns
- returns
reference of new node if RW pattern is found and applied null if no rewriting is defined.
- Definition Classes
- DefRewriting
- def rewriteNonInvokableMethodCall(mc: sigmastate.eval.SigmaLibrary.MethodCall): sigmastate.eval.SigmaLibrary.Ref[_]
This method is called for each MethodCall node which is about to be added to the graph.
This method is called for each MethodCall node which is about to be added to the graph. This means
mc
has been examined by all the rewrite rules, but has not need rewritten. Now, if this method returns null, then mc will be added to the graph. However, in this method,mc
can be examined by a second set of RW rules (kind of lower priority rules). These rules kind of context dependent, because at this point we know that the first RW set didn't triggered any rewrite.- Definition Classes
- MethodCalls
- final def rewriteUnOp[A, R](op: sigmastate.eval.SigmaLibrary.UnOp[A, R], x: sigmastate.eval.SigmaLibrary.Ref[A]): sigmastate.eval.SigmaLibrary.Ref[_]
Rewrites application of given unary operation to the given argument.
Rewrites application of given unary operation to the given argument.
- returns
null if no rewriting is defined.
- Definition Classes
- DefRewriting
- def sizeOf[T](value: sigmastate.eval.SigmaLibrary.Ref[T]): sigmastate.eval.SigmaLibrary.Ref[Long]
- Definition Classes
- UniversalOps
- def stagingExceptionMessage(message: String, syms: Seq[sigmastate.eval.SigmaLibrary.Ref[_]]): String
Prettyprint exception message
Prettyprint exception message
- Attributes
- protected
- Definition Classes
- Base
- implicit final def sumElement[A, B](implicit ea: sigmastate.eval.SigmaLibrary.Elem[A], eb: sigmastate.eval.SigmaLibrary.Elem[B]): sigmastate.eval.SigmaLibrary.Elem[sigmastate.eval.SigmaLibrary.|[A, B]]
Implicitly defines element type for sum types.
Implicitly defines element type for sum types.
- Definition Classes
- TypeDescs
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def throwInvocationException(whatFailed: String, cause: Throwable, receiver: sigmastate.eval.SigmaLibrary.Sym, m: RMethod, args: Seq[Any]): Nothing
- Definition Classes
- MethodCalls
- implicit val thunkCont: sigmastate.eval.SigmaLibrary.Cont[sigmastate.eval.SigmaLibrary.Thunk]
Thunk is an instance of container type class Cont.
- implicit def thunkElement[T](implicit eItem: sigmastate.eval.SigmaLibrary.Elem[T]): sigmastate.eval.SigmaLibrary.Elem[sigmastate.eval.SigmaLibrary.Thunk[T]]
Implicitly defines element type for thunks (aka lazy values).
Implicitly defines element type for thunks (aka lazy values).
- Definition Classes
- Thunks
- val thunkStack: sigmastate.eval.SigmaLibrary.ThunkStack
- Attributes
- protected
- Definition Classes
- Thunks
- def thunk_create[A](block: => sigmastate.eval.SigmaLibrary.Ref[A]): sigmastate.eval.SigmaLibrary.Ref[sigmastate.eval.SigmaLibrary.Thunk[A]]
Constructs a new thunk node by executing the given
block
and collecting all the graph node created along the way.Constructs a new thunk node by executing the given
block
and collecting all the graph node created along the way. This methods: 1) starts a new nested ThunkScope, 2) executes theblock
to obtain resulting graph node 3) schedule thunk body for execution order 4) adds a new ThunkDef node and returns its reference.- returns
a reference to the newly created ThunkDef node
- Definition Classes
- Thunks
- def thunk_force[A](t: sigmastate.eval.SigmaLibrary.Th[A]): sigmastate.eval.SigmaLibrary.Ref[A]
Logical force of the thunk.
Logical force of the thunk. Depending on isInlineThunksOnForce it either inlines the thunk body or creates a new ThunkForce node.
- returns
a reference to the graph node, which represent the result of the thunk's evaluation.
- Definition Classes
- Thunks
- def thunk_map[A, B](t: sigmastate.eval.SigmaLibrary.Th[A], f: sigmastate.eval.SigmaLibrary.Ref[(A) => B]): sigmastate.eval.SigmaLibrary.Th[B]
- Definition Classes
- Thunks
- def thunk_map1[A, B](t: sigmastate.eval.SigmaLibrary.Th[A], f: (sigmastate.eval.SigmaLibrary.Ref[A]) => sigmastate.eval.SigmaLibrary.Ref[B]): sigmastate.eval.SigmaLibrary.Th[B]
- Definition Classes
- Thunks
- def toExp[T](d: sigmastate.eval.SigmaLibrary.Def[T], newSym: => sigmastate.eval.SigmaLibrary.Ref[T]): sigmastate.eval.SigmaLibrary.Ref[T]
Updates the universe of symbols and definitions, then rewrites until fix-point
Updates the universe of symbols and definitions, then rewrites until fix-point
- d
A new graph node to add to the universe
- newSym
A symbol that will be used if d doesn't exist in the universe
- returns
The symbol of the graph which is semantically(up to rewrites) equivalent to d
- implicit final def toLazyElem[A](implicit eA: sigmastate.eval.SigmaLibrary.Elem[A]): sigmastate.eval.SigmaLibrary.LElem[A]
- Definition Classes
- TypeDescs
- def toRep[A](x: A)(implicit eA: sigmastate.eval.SigmaLibrary.Elem[A]): sigmastate.eval.SigmaLibrary.Ref[A]
Lifting of data values to IR nodes.
Lifting of data values to IR nodes.
- Definition Classes
- Base
- def toString(): String
- Definition Classes
- AnyRef → Any
- def transformProductParam(x: Any, t: sigmastate.eval.SigmaLibrary.Transformer): Any
Transforms this object into new one by applying
t
to every Ref inside its structure.Transforms this object into new one by applying
t
to every Ref inside its structure. The structure is build out of Seq, Array, Option and Def values. Other structure items remain unchanged and copied to the new instance. HOTSPOT: don't beautify the code- Attributes
- protected
- Definition Classes
- Base
- def tryConvert[From, To](eFrom: sigmastate.eval.SigmaLibrary.Elem[From], eTo: sigmastate.eval.SigmaLibrary.Elem[To], x: sigmastate.eval.SigmaLibrary.Ref[sigmastate.eval.SigmaLibrary.Def[_]], conv: sigmastate.eval.SigmaLibrary.Ref[(From) => To]): sigmastate.eval.SigmaLibrary.Ref[To]
- Definition Classes
- UniversalOps
- val tuplesCache: AVHashMap[sigmastate.eval.SigmaLibrary.Ref[_], (sigmastate.eval.SigmaLibrary.Ref[_], sigmastate.eval.SigmaLibrary.Ref[_])]
- Definition Classes
- Tuples
- def unfoldLambda[A, B](f: sigmastate.eval.SigmaLibrary.Ref[(A) => B], x: sigmastate.eval.SigmaLibrary.Ref[A]): sigmastate.eval.SigmaLibrary.Ref[B]
- Definition Classes
- Functions
- def unfoldLambda[A, B](lam: sigmastate.eval.SigmaLibrary.Lambda[A, B], x: sigmastate.eval.SigmaLibrary.Ref[A]): sigmastate.eval.SigmaLibrary.Ref[B]
- Definition Classes
- Functions
- val unfoldWithOriginalFunc: Boolean
Turns on/off lambda unfolding using original function
f
stored in the Lambda node.Turns on/off lambda unfolding using original function
f
stored in the Lambda node. If this flag isfalse
then this function cannot be used even if it is present in the node.- Definition Classes
- Functions
- def unrefDelegate[T <: AnyRef](x: sigmastate.eval.SigmaLibrary.Ref[T])(implicit ct: ClassTag[T]): T
Create delegate instance suitable for method invocation.
Create delegate instance suitable for method invocation. It is used when T is a class or a trait and the node referred by x doesn't conform to T. This method returns dynamically constructed instance, which conforms to T. Whenever a method of T is called on that instance, the call is intercepted and
DelegatedInterceptionHandler.invoke
method is called, then a new MethodCall can be constructed (which is befavior by default).- Attributes
- protected
- Definition Classes
- MethodCalls
- def unzipPair[A, B](p: sigmastate.eval.SigmaLibrary.Ref[(A, B)]): (sigmastate.eval.SigmaLibrary.Ref[A], sigmastate.eval.SigmaLibrary.Ref[B])
- Definition Classes
- Tuples
- def upcast[To](value: sigmastate.eval.SigmaLibrary.Ref[_])(implicit arg0: sigmastate.eval.SigmaLibrary.Elem[To]): sigmastate.eval.SigmaLibrary.Ref[To]
- Definition Classes
- UniversalOps
- def upcastFun[A, B >: A](implicit arg0: sigmastate.eval.SigmaLibrary.Elem[A]): sigmastate.eval.SigmaLibrary.Ref[(A) => B]
- Definition Classes
- Functions
- final def updateSymbolTable[T](s: sigmastate.eval.SigmaLibrary.Ref[T], d: sigmastate.eval.SigmaLibrary.Def[T]): sigmastate.eval.SigmaLibrary.Ref[T]
Create or find symbol (node Ref) which refers to the given node in the table of all created symbols.
Create or find symbol (node Ref) which refers to the given node in the table of all created symbols. The d.nodeId is the index in the _symbolTable which is DBuffer (backed by Array)
- returns
new of existing symbol HOTSPOT: the method should be allocation-free (make it sure by examining the generated Java code)
- Definition Classes
- Base
- val useAlphaEquality: Boolean
Global lambda equality mode used by default.
Global lambda equality mode used by default. It is used in
fun
andfun2
lambda builders. If this flag istrue
then Lambda nodes are equal if they are the same up to renaming of symbols. (see Lambda.equals()). Each Lambda node has independent equality mode flag which is setup in the constructor.- Definition Classes
- Functions
- final def valueFromRep[A](x: sigmastate.eval.SigmaLibrary.Ref[A]): A
Extract data value from Const node or throw an exception.
Extract data value from Const node or throw an exception.
- Definition Classes
- Base
- Annotations
- @inline()
- def variable[T](implicit eT: sigmastate.eval.SigmaLibrary.LElem[T]): sigmastate.eval.SigmaLibrary.Ref[T]
- Definition Classes
- Base
- Annotations
- @inline()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- implicit def zipPair[A, B](p: (sigmastate.eval.SigmaLibrary.Ref[A], sigmastate.eval.SigmaLibrary.Ref[B])): sigmastate.eval.SigmaLibrary.Ref[(A, B)]
- Definition Classes
- Tuples
- object AvlTree extends sigmastate.eval.SigmaLibrary.EntityObject
- Definition Classes
- SigmaDslDefs
- object BigInt extends sigmastate.eval.SigmaLibrary.EntityObject
- Definition Classes
- SigmaDslDefs
- object Box extends sigmastate.eval.SigmaLibrary.EntityObject
- Definition Classes
- SigmaDslDefs
- object Context extends sigmastate.eval.SigmaLibrary.EntityObject
- Definition Classes
- SigmaDslDefs
- object GroupElement extends sigmastate.eval.SigmaLibrary.EntityObject
- Definition Classes
- SigmaDslDefs
- object Header extends sigmastate.eval.SigmaLibrary.EntityObject
- Definition Classes
- SigmaDslDefs
- object PreHeader extends sigmastate.eval.SigmaLibrary.EntityObject
- Definition Classes
- SigmaDslDefs
- object SigmaDslBuilder extends sigmastate.eval.SigmaLibrary.EntityObject
- Definition Classes
- SigmaDslDefs
- object SigmaProp extends sigmastate.eval.SigmaLibrary.EntityObject
- Definition Classes
- SigmaDslDefs