com.nicta.scoobi.impl.plan.mscr

Layering

trait Layering extends ShowNode

Simple layering algorithm using the Longest path method to assign nodes to layers.

See here for a good overview: http://www.cs.brown.edu/~rt/gdhandbook/chapters/hierarchical.pdf

In our case the layers have minimum height and possibly big width which is actually good if we run things in parallel

Linear Supertypes
ShowNode, CompNodes, CollectFunctions, GraphNodes, AttributionCore, Memoiser, AttributionCommon, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Layering
  2. ShowNode
  3. CompNodes
  4. CollectFunctions
  5. GraphNodes
  6. AttributionCore
  7. Memoiser
  8. AttributionCommon
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class CachedAttribute[T <: AnyRef, U] extends Attribute[T, U] with org.kiama.attribution.AttributionCore.IdMemoised[T, Option[U]]

    Definition Classes
    AttributionCore
  2. class CachedDynamicAttribute[T <: AnyRef, U] extends CachedAttribute[T, U]

    Definition Classes
    AttributionCore
  3. class CachedParamAttribute[A, T <: AnyRef, U] extends (A) ⇒ Attribute[T, U] with org.kiama.attribution.AttributionCore.Memoised[ParamAttributeKey, Option[U]]

    Definition Classes
    AttributionCore
  4. class CircularAttribute[T <: AnyRef, U] extends Attribute[T, U] with org.kiama.attribution.AttributionCore.IdMemoised[T, U]

    Definition Classes
    AttributionCore
  5. class ConstantAttribute[T <: AnyRef, U] extends Attribute[T, U]

    Definition Classes
    AttributionCommon
  6. trait IdMemoised[T, U] extends MemoisedBase[T, U]

    Definition Classes
    Memoiser
  7. case class Layer[T <: CompNode](nodes: Seq[T] = collection.this.Seq.apply[T]()) extends Product with Serializable

    A layer contains group by keys and floating nodes defining mscrs so that none of them have dependencies relationship

  8. trait Memoised[T, U] extends MemoisedBase[T, U]

    Definition Classes
    Memoiser
  9. trait MemoisedBase[T, U] extends AnyRef

    Definition Classes
    Memoiser
  10. type T = CompNode

    Definition Classes
    CompNodesGraphNodes

Abstract Value Members

  1. abstract def selectNode: (CompNode) ⇒ Boolean

    a function to select only some nodes in the graph.

    a function to select only some nodes in the graph. They must be of type T

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object Layer extends Serializable

  7. lazy val allSinks: CachedAttribute[CompNode, Seq[Sink]]

    collect all the sinks in the computation graph

    collect all the sinks in the computation graph

    Attributes
    protected
    Definition Classes
    CompNodes
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def attr[T <: AnyRef, U](name: String, f: (T) ⇒ U): CachedAttribute[T, U]

    Definition Classes
    AttributionCore
  10. def attr[T <: AnyRef, U](f: (T) ⇒ U): CachedAttribute[T, U]

    Definition Classes
    AttributionCore
    Annotations
    @macroImpl( ... )
  11. def childAttr[T <: Attributable, U](name: String, f: (T) ⇒ (Attributable) ⇒ U): CachedAttribute[T, U]

    Definition Classes
    AttributionCore
  12. def childAttr[T <: Attributable, U](f: (T) ⇒ (Attributable) ⇒ U): CachedAttribute[T, U]

    Definition Classes
    AttributionCore
    Annotations
    @macroImpl( ... )
  13. lazy val children: CachedAttribute[T, Seq[T]]

    compute the children of a node.

    compute the children of a node.

    This is similar to calling the initTree method on the node but this stores the information as an attribute instead of storing it as a tree. This is a way to avoid conflicts if we have 2 processes trying to initialise the same graph

    Definition Classes
    GraphNodes
  14. def circular[T <: AnyRef, U](name: String, init: U)(f: (T) ⇒ U): (T) ⇒ U

    Definition Classes
    AttributionCore
  15. def circular[T <: AnyRef, U](init: U)(f: (T) ⇒ U): (T) ⇒ U

    Definition Classes
    AttributionCore
    Annotations
    @macroImpl( ... )
  16. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def constant[T <: AnyRef, U](name: String, u: ⇒ U): Attribute[T, U]

    Definition Classes
    AttributionCommon
  18. def constant[T <: AnyRef, U](u: ⇒ U): Attribute[T, U]

    Definition Classes
    AttributionCommon
    Annotations
    @macroImpl( ... )
  19. lazy val descendents: CachedAttribute[T, Seq[T]]

    compute all the descendents of a node They are all the recursive children reachable from this node

    compute all the descendents of a node They are all the recursive children reachable from this node

    Definition Classes
    GraphNodes
  20. lazy val descendentsUntil: CachedParamAttribute[(T) ⇒ Boolean, T, Seq[T]]

    Definition Classes
    GraphNodes
  21. def dynAttr[T <: AnyRef, U](name: String, f: (T) ⇒ U): CachedDynamicAttribute[T, U]

    Definition Classes
    AttributionCore
  22. def dynAttr[T <: AnyRef, U](f: (T) ⇒ U): CachedDynamicAttribute[T, U]

    Definition Classes
    AttributionCore
    Annotations
    @macroImpl( ... )
  23. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  25. lazy val filledSink: CachedAttribute[String, String]

    this attribute stores the fact that a Sink has received data

    this attribute stores the fact that a Sink has received data

    Attributes
    protected
    Definition Classes
    CompNodes
  26. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  27. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  28. lazy val hasBeenFilled: (Sink) ⇒ Boolean

    returns

    true if a given Sink has already received data

    Attributes
    protected
    Definition Classes
    CompNodes
  29. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  30. def initAttributable[S <: T](s: S): S

    initialise the parent/child relationship recursively from node s

    initialise the parent/child relationship recursively from node s

    Definition Classes
    GraphNodes
  31. def initTree[T <: Attributable](t: T): Unit

    Definition Classes
    AttributionCommon
  32. lazy val inputs: CachedAttribute[CompNode, Seq[CompNode]]

    compute the inputs of a given node For a ParallelDo node this does not consider its environment

    compute the inputs of a given node For a ParallelDo node this does not consider its environment

    Definition Classes
    CompNodes
  33. implicit def internalToDynamicAttribute[T <: AnyRef, U](f: (T) ⇒ U): CachedDynamicAttribute[T, U]

    Definition Classes
    AttributionCore
  34. lazy val isACombine: PartialFunction[Any, Combine]

    return true if a CompNode is a Combine

    return true if a CompNode is a Combine

    Definition Classes
    CollectFunctions
  35. lazy val isAGroupByKey: PartialFunction[Any, GroupByKey]

    return true if a CompNode is a GroupByKey

    return true if a CompNode is a GroupByKey

    Definition Classes
    CollectFunctions
  36. lazy val isALoad: PartialFunction[CompNode, Load]

    return true if a CompNode is a Load

    return true if a CompNode is a Load

    Definition Classes
    CollectFunctions
  37. lazy val isAMaterialise: PartialFunction[Any, Materialise]

    return the node if a CompNode is a Materialise

    return the node if a CompNode is a Materialise

    Definition Classes
    CollectFunctions
  38. lazy val isAParallelDo: PartialFunction[Any, ParallelDo]

    return true if a CompNode is a ParallelDo

    return true if a CompNode is a ParallelDo

    Definition Classes
    CollectFunctions
  39. lazy val isAProcessNode: PartialFunction[Any, ProcessNode]

    return true if a CompNode is a ProcessNode

    return true if a CompNode is a ProcessNode

    Definition Classes
    CollectFunctions
  40. lazy val isCombine: (CompNode) ⇒ Boolean

    return true if a CompNode is a Combine

    return true if a CompNode is a Combine

    Definition Classes
    CollectFunctions
  41. lazy val isComputedValueNode: (CompNode) ⇒ Boolean

    return true if a CompNode needs to be computed

    return true if a CompNode needs to be computed

    Definition Classes
    CollectFunctions
  42. lazy val isCyclic: CachedAttribute[T, Boolean]

    return true if a CompNode has a cycle in its graph, this will be detected by Kiama throwing an exception when fetching the descendents of a node

    return true if a CompNode has a cycle in its graph, this will be detected by Kiama throwing an exception when fetching the descendents of a node

    Definition Classes
    GraphNodes
  43. lazy val isGroupByKey: (CompNode) ⇒ Boolean

    return true if a CompNode is a GroupByKey

    return true if a CompNode is a GroupByKey

    Definition Classes
    CollectFunctions
  44. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  45. lazy val isLoad: (CompNode) ⇒ Boolean

    return true if a CompNode is a Load

    return true if a CompNode is a Load

    Definition Classes
    CollectFunctions
  46. lazy val isMaterialise: (CompNode) ⇒ Boolean

    return true if a CompNode is a Materialise

    return true if a CompNode is a Materialise

    Definition Classes
    CollectFunctions
  47. lazy val isOp: (CompNode) ⇒ Boolean

    return true if a CompNode is an Op

    return true if a CompNode is an Op

    Definition Classes
    CollectFunctions
  48. lazy val isParallelDo: (CompNode) ⇒ Boolean

    return true if a CompNode is a ParallelDo

    return true if a CompNode is a ParallelDo

    Definition Classes
    CollectFunctions
  49. lazy val isReturn: (CompNode) ⇒ Boolean

    return true if a CompNode is a Return

    return true if a CompNode is a Return

    Definition Classes
    CollectFunctions
  50. lazy val isRoot: (CompNode) ⇒ Boolean

    return true if a CompNode is a Root

    return true if a CompNode is a Root

    Definition Classes
    CollectFunctions
  51. lazy val isSinkNode: (CompNode) ⇒ Boolean

    return true if a CompNode needs to be persisted

    return true if a CompNode needs to be persisted

    Definition Classes
    CollectFunctions
  52. lazy val isUsedAtMostOnce: CachedAttribute[T, Boolean]

    true if a node is used at most once

    true if a node is used at most once

    Definition Classes
    GraphNodes
  53. lazy val isValueNode: (CompNode) ⇒ Boolean

    return true if a CompNode needs to be loaded

    return true if a CompNode needs to be loaded

    Definition Classes
    CollectFunctions
  54. lazy val layer: (CompNode) ⇒ Option[Layer[T]]

    returns

    the layer that a selected node is in. None if this is not a selected node

  55. lazy val layers: (CompNode) ⇒ Seq[Layer[T]]

  56. lazy val longestPathSizeTo: (Seq[CompNode]) ⇒ (CompNode) ⇒ Int

  57. lazy val longestPathSizeToNode: (CompNode) ⇒ (CompNode) ⇒ Int

  58. lazy val longestPathToNode: (CompNode) ⇒ (CompNode) ⇒ Seq[CompNode]

  59. def markSinkAsFilled: (Sink) ⇒ String

    mark a sink as filled so it doesn't have to be recomputed

    mark a sink as filled so it doesn't have to be recomputed

    Attributes
    protected
    Definition Classes
    CompNodes
  60. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  61. val nodeHasBeenFilled: (CompNode) ⇒ Boolean

    returns

    true if a process node has been filled

    Attributes
    protected
    Definition Classes
    CompNodes
  62. final def notify(): Unit

    Definition Classes
    AnyRef
  63. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  64. def paramAttr[V, T <: AnyRef, U](name: String, f: (V) ⇒ (T) ⇒ U): CachedParamAttribute[V, T, U]

    Definition Classes
    AttributionCore
  65. def paramAttr[V, T <: AnyRef, U](f: (V) ⇒ (T) ⇒ U): CachedParamAttribute[V, T, U]

    Definition Classes
    AttributionCore
    Annotations
    @macroImpl( ... )
  66. lazy val parent: CachedAttribute[T, Option[T]]

    compute the parent of a node.

    compute the parent of a node. This relationship is actually maintained while getting the children of a node if the parent node has not been set while recursing for children, then it is None

    Definition Classes
    GraphNodes
  67. lazy val parents: CachedAttribute[T, Seq[T]]

    compute the parents of a node, that is all the chain of parents from this node up to the root of the graph

    compute the parents of a node, that is all the chain of parents from this node up to the root of the graph

    Definition Classes
    GraphNodes
  68. lazy val pathsToNode: (CompNode) ⇒ (CompNode) ⇒ Seq[Seq[CompNode]]

  69. def pretty(node: CompNode): (prettyPrinter)#Layout

    returns

    a nested text representation of the nodes graph

    Definition Classes
    ShowNode
  70. def prettyGraph(showComputationGraph: Boolean = false): (CompNode) ⇒ String

    returns

    a nested text representation of the nodes graph + graph if it's not too big

    Definition Classes
    ShowNode
  71. val prettyPrinter: PrettyPrinter

    Definition Classes
    ShowNode
  72. def reinit[S <: T](s: S): S

    reinitialise all the attributes related to a node, starting from all the parent/children relationships

    reinitialise all the attributes related to a node, starting from all the parent/children relationships

    reset the attributes, then recreate the parent/children relationships recursively

    Definition Classes
    GraphNodes
  73. def resetMemo(): Unit

    Definition Classes
    Memoiser
  74. def resetUses: Unit

    reinit usages

    reinit usages

    Attributes
    protected
    Definition Classes
    GraphNodes
  75. lazy val root: CachedAttribute[T, T]

    the root of the graph, computed from a given node

    the root of the graph, computed from a given node

    Definition Classes
    GraphNodes
  76. lazy val select: PartialFunction[CompNode, T]

  77. lazy val selected: (CompNode) ⇒ Boolean

  78. lazy val selectedDescendents: (CompNode) ⇒ Seq[T]

  79. lazy val shortestPathToNode: (CompNode) ⇒ (CompNode) ⇒ Seq[CompNode]

  80. implicit lazy val showCompNode: Show[CompNode]

    Show instance for a CompNode

    Show instance for a CompNode

    Definition Classes
    ShowNode
  81. implicit def showCompNodeInstance[T <: CompNode]: Show[T]

    Show is not covariant so it is necessary to add this implicit to prove that we can show subclasses of CompNode

    Show is not covariant so it is necessary to add this implicit to prove that we can show subclasses of CompNode

    Definition Classes
    ShowNode
  82. def showGraph(node: CompNode): String

    returns

    an ASCII representation of the nodes graph

    Definition Classes
    ShowNode
  83. lazy val showStructure: (CompNode) ⇒ String

    show the structure without the ids or type annotations

    show the structure without the ids or type annotations

    Definition Classes
    ShowNode
  84. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  85. def toString(): String

    Definition Classes
    AnyRef → Any
  86. lazy val transitiveUses: CachedAttribute[T, Set[T]]

    compute all the indirect uses of a given node, that is all the nodes which have this node as a descendent

    compute all the indirect uses of a given node, that is all the nodes which have this node as a descendent

    Definition Classes
    GraphNodes
  87. def tree[T <: Attributable, U <: Attributable](name: String, f: (T) ⇒ U): CachedAttribute[T, U]

    Definition Classes
    AttributionCore
  88. def tree[T <: Attributable, U <: Attributable](f: (T) ⇒ U): CachedAttribute[T, U]

    Definition Classes
    AttributionCore
    Annotations
    @macroImpl( ... )
  89. lazy val uses: CachedAttribute[T, Set[T]]

    the nodes which have this node as a direct child

    the nodes which have this node as a direct child

    for efficiency, this uses a table of all the nodes using a given one, computed from the root

    Definition Classes
    GraphNodes
  90. def usesAsEnvironment: CachedAttribute[CompNode, Seq[ParallelDo]]

    compute all the nodes which use a given node as an environment

    compute all the nodes which use a given node as an environment

    Definition Classes
    CompNodes
  91. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ShowNode

Inherited from CompNodes

Inherited from CollectFunctions

Inherited from GraphNodes

Inherited from AttributionCore

Inherited from Memoiser

Inherited from AttributionCommon

Inherited from AnyRef

Inherited from Any

Ungrouped