org.kiama.attribution

UncachedAttributionCore

trait UncachedAttributionCore extends AttributionCommon with Memoiser

Reusable implementation of attribution of syntax trees in a functional style with attribute values computed each time they are accessed.

Source
UncachedAttributionCore.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. UncachedAttributionCore
  2. Memoiser
  3. AttributionCommon
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class ConstantAttribute[T, U] extends Attribute[T, U]

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

    A constant attribute of a node type T with value of type U. The value is given by the computation u which is evaluated at most once.

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

    A memoised entity that weakly holds onto its keys and uses identity to compare them.

    A memoised entity that weakly holds onto its keys and uses identity to compare them.

    Definition Classes
    Memoiser
  3. trait Memoised[T, U] extends MemoisedBase[T, U]

    A memoised entity that uses equality to compare keys.

    A memoised entity that uses equality to compare keys.

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

    Common interface for encapsulation of memoisation for a single memoised entity backed by a configurable cache.

    Common interface for encapsulation of memoisation for a single memoised entity backed by a configurable cache.

    Definition Classes
    Memoiser
  5. class UncachedAttribute[T, U] extends Attribute[T, U] with IdMemoised[T, Unit]

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

    An attribute of a node type T with value of type U, supported by a circularity test. The value of the attribute is computed by the function f. f will be called each time the value of the attribute is accessed. f should not itself require the value of this attribute. If it does, a circularity error is reported by throwing an IllegalStateException.

  6. class UncachedParamAttribute[A, T, U] extends (A) ⇒ Attribute[T, U] with Memoised[ParamAttributeKey, Unit]

    A variation of the UncachedAttribute class for parameterised attributes.

Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def attr[T, U](name: String, f: (T) ⇒ U): UncachedAttribute[T, U]

    As for the other attr with the first argument specifying a name for the constructed attribute.

  6. macro def attr[T, U](f: (T) ⇒ U): UncachedAttribute[T, U]

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

    Define an uncached 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.

  7. def childAttr[T <: Attributable, U](name: String, f: (T) ⇒ (Attributable) ⇒ U): UncachedAttribute[T, U]

    As for the other childAttr with the first argument specifying a name for the constructed attribute.

  8. macro def childAttr[T <: Attributable, U](f: (T) ⇒ (Attributable) ⇒ U): UncachedAttribute[T, U]

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

    Define an uncached 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.

  9. def clone(): AnyRef

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

    As for the other constant with the first argument specifying a name for the constructed attribute.

    As for the other constant with the first argument specifying a name for the constructed attribute.

    Definition Classes
    AttributionCommon
  11. macro def constant[T, U](u: ⇒ U): Attribute[T, U]

    Define a constant attribute of T nodes of type U given by the value u.

    Define a constant attribute of T nodes of type U given by the value u. u is evaluated at most once.

    Definition Classes
    AttributionCommon
  12. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Definition Classes
    AnyRef → Any
  17. 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
    AttributionCommon
  18. final def isInstanceOf[T0]: Boolean

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

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

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

    Definition Classes
    AnyRef
  22. def paramAttr[V, T, U](name: String, f: (V) ⇒ (T) ⇒ U): UncachedParamAttribute[V, T, U]

    As for the other paramAttr with the first argument specifying a name for the constructed attribute.

  23. macro def paramAttr[V, T, U](f: (V) ⇒ (T) ⇒ U): UncachedParamAttribute[V, T, U]

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

    Define a parameterised uncached 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.

  24. def resetMemo(): Unit

    Lazily reset all memoisation tables.

    Lazily reset all memoisation tables. The actual resets will only happen the next time the value of each attribute is accessed.

    Definition Classes
    Memoiser
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  26. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Memoiser

Inherited from AttributionCommon

Inherited from AnyRef

Inherited from Any

Ungrouped