Instance Constructors
-
new
CircularAttribute
(init: U, f: $eq$eq$greater[T, U])
Value Members
-
def
!=
(arg0: AnyRef): Boolean
-
def
!=
(arg0: Any): Boolean
-
def
##
(): Int
-
def
==
(arg0: AnyRef): Boolean
-
def
==
(arg0: Any): Boolean
-
def
andThen
[C]
(k: (U) ⇒ C): PartialFunction[T, C]
-
def
apply
(t: T): U
-
def
asInstanceOf
[T0]
: T0
-
def
clone
(): AnyRef
-
def
compose
[A]
(g: (A) ⇒ T): (A) ⇒ U
-
def
eq
(arg0: AnyRef): Boolean
-
def
equals
(arg0: Any): Boolean
-
def
finalize
(): Unit
-
def
getClass
(): java.lang.Class[_]
-
def
hashCode
(): Int
-
def
isDefinedAt
(t: T): Boolean
-
def
isInstanceOf
[T0]
: Boolean
-
def
lift
: (T) ⇒ Option[U]
-
def
ne
(arg0: AnyRef): Boolean
-
def
notify
(): Unit
-
def
notifyAll
(): Unit
-
def
orElse
[A1 <: T, B1 >: U]
(that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
-
def
synchronized
[T0]
(arg0: ⇒ T0): T0
-
def
toString
(): String
-
def
wait
(): Unit
-
def
wait
(arg0: Long, arg1: Int): Unit
-
def
wait
(arg0: Long): Unit
Inherited from PartialFunction[T, U]
Inherited from (T) ⇒ U
Inherited from AnyRef
Inherited from Any
An attribute of a node type T with value of type U which has a circular definition. The value of the attribute is computed by the function f which may itself use the value of the attribute. init specifies an initial value for the attribute. The attribute (and any circular attributes on which it depends) are evaluated until no value changes (i.e., a fixed point is reached). The final result is memoised so that subsequent evaluations return the same value.
This code implements the basic circular evaluation algorithm from "Circular Reference Attributed Grammars - their Evaluation and Applications", by Magnusson and Hedin from LDTA 2003.