org.bitbucket.inkytonik.kiama.attribution
An attribute of a node type T
with value of type U
, supported by a memo
table and circularity test.
A cached dynamic attribute of a node type T
with value of type U
, supported
by a memo table and circularity test.
A variation of the CachedAttribute
class for parameterised attributes.
An attribute of a node type T
with value of type U
which has a circular
definition.
A constant attribute of a node type T
with value of type 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.
As for the other attr
with the first argument specifying a name for
the constructed attribute.
As for the other attr
with the first argument specifying a name for
the constructed attribute.
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.
As for the other circular
with the first argument specifying a name for
the constructed attribute.
As for the other circular
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.
As for the other constant
with the first argument specifying a name for
the constructed attribute.
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.
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.
As for the other dynAttr
with the first argument specifying a name for
the constructed attribute.
As for the other dynAttr
with the first argument specifying a name for
the constructed attribute.
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.
Define a parameterised attribute of T
nodes of type U
by the function
f
, which takes an argument of type V
.
Define a parameterised attribute of T
nodes of type U
by the function
f
, which takes an argument of type V
. The computed attribute value
for a given V
and T
pair is cached so it will be computed at most
once.
As for the other paramAttr
with the first argument specifying a name for
the constructed attribute.
As for the other paramAttr
with the first argument specifying a name for
the constructed attribute.
An attribution module. Use an instance of this module to encapuslate related attributes. You should ensure that more than one circular attribute evaluation from a single module is not executing at the same time because the current implementation has shared state between related circular attributes. If your attributes are unrelated (i.e., can't possibly call each other) you should base them on different attribution module instances and then it is safe for attributes from different collections to execute in parallel.