org.kiama.attribution

Attribution

object Attribution extends Attribution

Module for cached attributes.

Source
Attribution.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Attribution
  2. Attribution
  3. AttributionBase
  4. AnyRef
  5. Any
Visibility
  1. Public
  2. All

Type Members

  1. abstract class Attribute[T <: AnyRef, U] extends (T) ⇒ U

    Common functionality for all attributes.

  2. abstract class CachedAttribute[T <: AnyRef, U] extends Attribute[T, U]

    An attribute of a node type T with value of type U, supported by a memo table and circularity test.

  3. abstract class CachedDynamicAttribute[T <: AnyRef, U] extends CachedAttribute[T, U]

    A cached dynamic attribute of a node type T with value of type U, supported by a memo table and circularity test.

  4. abstract class CachedParamAttribute[A, T <: AnyRef, U] extends (A) ⇒ Attribute[T, U]

    A variation of the CachedAttribute class for parameterised attributes.

  5. abstract class CircularAttribute[T <: AnyRef, U] extends Attribute[T, U]

    An attribute of a node type T with value of type U which has a circular definition.

  6. abstract class ConstantAttribute[T <: AnyRef, U] extends Attribute[T, U]

    A constant attribute of a node type T with value of type U.

  7. class ParamAttributeKey extends AnyRef

    Support for parameterised attributes: argument, node pair comparison.

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. final def asInstanceOf[T0]: T0

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

    Define a named cached attribute of T nodes of type U by the function f, which should not depend on the value of this attribute.

    Define a named cached attribute of T nodes of type U by the function f, which should not depend on the value of this attribute. The computed attribute value is cached so it will be computed at most once. name is used in debugging output to identify this attribute.

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

    Define an anonymous cached attribute of T nodes of type U by the function f, which should not depend on the value of this attribute.

    Define an anonymous cached attribute of T nodes of type U by the function f, which should not depend on the value of this attribute. The computed attribute value is cached so it will be computed at most once.

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

    Define a cached attribute of T nodes of type U by the function f, which should not depend on the value of this attribute.

    Define a cached attribute of T nodes of type U by the function f, which should not depend on the value of this attribute. The computed attribute value is cached so it will be computed at most once. If optNameDef is not None, then optNameDef.get is used in debugging output to identify this attribute.

    Definition Classes
    Attribution
  10. def childAttr[T <: Attributable, U](name: String)(f: (T) ⇒ (Attributable) ⇒ U): CachedAttribute[T, U]

    Define a named attribute of T nodes of type U by the function f, which takes the current node and its parent as its arguments.

    Define a named attribute of T nodes of type U by the function f, which takes the current node and its parent as its arguments. T must be a sub-type of Attributable so that parents can be accessed generically. name is used in debugging output to identify this attribute and its parameter.

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

    Define an anonymous attribute of T nodes of type U by the function f, which takes the current node and its parent as its arguments.

    Define an anonymous attribute of T nodes of type U by the function f, which takes the current node and its parent as its arguments. T must be a sub-type of Attributable so that parents can be accessed generically.

    Definition Classes
    Attribution
  12. def childAttr[T <: Attributable, U](optName: Option[String])(f: (T) ⇒ (Attributable) ⇒ U): CachedAttribute[T, U]

    Define an attribute of T nodes of type U by the function f, which takes the current node and its parent as its arguments.

    Define an attribute of T nodes of type U by the function f, which takes the current node and its parent as its arguments. T must be a sub-type of Attributable so that parents can be accessed generically. If optNameDef is not None, then optNameDef.get is used in debugging output to identify this attribute.

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

    Define a named circular attribute of T nodes of type U by the function f.

    Define a named circular attribute of T nodes of type U by the function f. f is allowed to depend on the value of this attribute, which will be given by init initially and will be evaluated iteratively until a fixed point is reached (in conjunction with other circular attributes on which it depends). The final value is cached. name is used in debugging output to identify this attribute.

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

    Define an anonymous circular attribute of T nodes of type U by the function f.

    Define an anonymous circular attribute of T nodes of type U by the function f. f is allowed to depend on the value of this attribute, which will be given by init initially and will be evaluated iteratively until a fixed point is reached (in conjunction with other circular attributes on which it depends). The final value is cached.

    Definition Classes
    AttributionBase
  15. def circular[T <: AnyRef, U](optNameDef: Option[String])(init: U)(f: (T) ⇒ U): (T) ⇒ U

    Define an optionally named circular attribute of T nodes of type U by the function f.

    Define an optionally named circular attribute of T nodes of type U by the function f. f is allowed to depend on the value of this attribute, which will be given by init initially and will be evaluated iteratively until a fixed point is reached (in conjunction with other circular attributes on which it depends). The final value is cached. If optNameDef is not None, then optNameDef.get is used in debugging output to identify this attribute.

    Definition Classes
    AttributionBase
  16. def clone(): AnyRef

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

    Define an optionally named constanat attribute of T nodes of type U given by the value u.

    Define an optionally named constanat attribute of T nodes of type U given by the value u. u is evaluated at most once. name is used in debugging output to identify this attribute.

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

    Define an anonymous constanat attribute of T nodes of type U given by the value u.

    Define an anonymous constanat attribute of T nodes of type U given by the value u. u is evaluated at most once.

    Definition Classes
    AttributionBase
  19. def constant[T <: AnyRef, U](optNameDef: Option[String])(u: ⇒ U): Attribute[T, U]

    Define an optionally named constanat attribute of T nodes of type U given by the value u.

    Define an optionally named constanat attribute of T nodes of type U given by the value u. u is evaluated at most once. If optNameDef is not None, then optNameDef.get is used in debugging output to identify this attribute.

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

    Define a named cached dynamic attribute of T nodes of type U by the partial functionf, which should not depend on the value of this attribute.

    Define a named cached dynamic attribute of T nodes of type U by the partial functionf, which should not depend on the value of this attribute. The computed attribute value is cached so it will be computed at most once. name is used in debugging output to identify this attribute.

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

    Define an anonymous cached dynamic attribute of T nodes of type U by the partial function f, which should not depend on the value of this attribute.

    Define an anonymous cached dynamic attribute of T nodes of type U by the partial function f, which should not depend on the value of this attribute. The computed attribute value is cached so it will be computed at most once.

    Definition Classes
    Attribution
  22. def dynAttr[T <: AnyRef, U](optNameDef: Option[String])(f: (T) ⇒ U): CachedDynamicAttribute[T, U]

    Define a cached dynamic attribute of T nodes of type U by the partial function f, which should not depend on the value of this attribute.

    Define a cached dynamic attribute of T nodes of type U by the partial function f, which should not depend on the value of this attribute. The computed attribute value is cached so it will be computed at most once. If optNameDef is not None, then optNameDef.get is used in debugging output to identify this attribute.

    Definition Classes
    Attribution
  23. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  25. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  27. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  28. def initTree[T <: Attributable](t: T): Unit

    Initialise the Attributable tree rooted at t so that it is ready for attribution.

    Initialise the Attributable tree rooted at t so that it is ready for attribution. At present, the only initialisation performed is to set node attributes such as parent and children so that nodes can generically refer to their neighbours. If you wish to use any of these properties, you must call this method before doing so. Otherwise, the node properties should not be used and there is no need to call this method.

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

    Implicitly converts functions to dynamic attributes.

    Implicitly converts functions to dynamic attributes. This conversion allows us to use simpler types for dynamic attributes, but still extend them later.

    Definition Classes
    Attribution
  30. final def isInstanceOf[T0]: Boolean

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

    Definition Classes
    AnyRef
  32. final def notify(): Unit

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

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

    Define a named parameterised attribute of T nodes of type U by the function f, which takes an argument of type A.

    Define a named parameterised attribute of T nodes of type U by the function f, which takes an argument of type A. The computed attribute value for a given T and A pair is cached so it will be computed at most once. name and the A value are used in debugging output to identify this attribute and its parameter.

    Definition Classes
    Attribution
  35. def paramAttr[A, T <: AnyRef, U](f: (A) ⇒ (T) ⇒ U): CachedParamAttribute[A, T, U]

    Define an anonymous parameterised attribute of T nodes of type U by the function f, which takes an argument of type A.

    Define an anonymous parameterised attribute of T nodes of type U by the function f, which takes an argument of type A. The computed attribute value for a given T and A pair is cached so it will be computed at most once.

    Definition Classes
    Attribution
  36. def paramAttr[A, T <: AnyRef, U](optNameDef: Option[String])(f: (A) ⇒ (T) ⇒ U): CachedParamAttribute[A, T, U]

    Define a parameterised attribute of T nodes of type U by the function f, which takes an argument of type A.

    Define a parameterised attribute of T nodes of type U by the function f, which takes an argument of type A. The computed attribute value for a given T and A pair is cached so it will be computed at most once. If optNameDef is not None, then optNameDef.get and the A value are used in debugging output to identify this attribute.

    Definition Classes
    Attribution
  37. def resetMemo(): Unit

    Lazily reset all memoisation tables.

    Lazily reset all memoisation tables.

    Definition Classes
    Attribution
  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  39. def toString(): String

    Definition Classes
    AnyRef → Any
  40. def tree[T <: Attributable, U <: Attributable](name: String)(f: (T) ⇒ U): CachedAttribute[T, U]

    Define a named attribute as per attr, except that the attribute must have a tree value and will be spliced into the tree to have the same parent as the node on which it is defined.

    Define a named attribute as per attr, except that the attribute must have a tree value and will be spliced into the tree to have the same parent as the node on which it is defined. This kind of attribute is used to generate new trees that must share context with the node on which they are defined. name is used in debugging output to identify this attribute and its parameter.

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

    Define an anonymous attribute as per attr, except that the attribute must have a tree value and will be spliced into the tree to have the same parent as the node on which it is defined.

    Define an anonymous attribute as per attr, except that the attribute must have a tree value and will be spliced into the tree to have the same parent as the node on which it is defined. This kind of attribute is used to generate new trees that must share context with the node on which they are defined.

    Definition Classes
    Attribution
  42. def tree[T <: Attributable, U <: Attributable](optName: Option[String])(f: (T) ⇒ U): CachedAttribute[T, U]

    Define an optionally named attribute as per attr, except that the attribute must have a tree value and will be spliced into the tree to have the same parent as the node on which it is defined.

    Define an optionally named attribute as per attr, except that the attribute must have a tree value and will be spliced into the tree to have the same parent as the node on which it is defined. This kind of attribute is used to generate new trees that must share context with the node on which they are defined. If optNameDef is not None, then optNameDef.get is used in debugging output to identify this attribute.

    Definition Classes
    Attribution
  43. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Attribution

Inherited from AttributionBase

Inherited from AnyRef

Inherited from Any